]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100417
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.489 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809   --disable-rpath-hack    don't add rpath options for additional libraries
810
811 Some influential environment variables:
812   CC          C compiler command
813   CFLAGS      C compiler flags
814   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
815               nonstandard directory <lib dir>
816   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
817               headers in a nonstandard directory <include dir>
818   CPP         C preprocessor
819   CXX         C++ compiler command
820   CXXFLAGS    C++ compiler flags
821   CXXCPP      C++ preprocessor
822
823 Use these variables to override the choices made by `configure' or to help
824 it to find libraries and programs with nonstandard names/locations.
825
826 EOF
827 fi
828
829 if test "$ac_init_help" = "recursive"; then
830   # If there are subdirs, report their specific --help.
831   ac_popdir=`pwd`
832   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
833     cd $ac_subdir
834     # A "../" for each directory in /$ac_subdir.
835     ac_dots=`echo $ac_subdir |
836              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
837
838     case $srcdir in
839     .) # No --srcdir option.  We are building in place.
840       ac_sub_srcdir=$srcdir ;;
841     [\\/]* | ?:[\\/]* ) # Absolute path.
842       ac_sub_srcdir=$srcdir/$ac_subdir ;;
843     *) # Relative path.
844       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
845     esac
846
847     # Check for guested configure; otherwise get Cygnus style configure.
848     if test -f $ac_sub_srcdir/configure.gnu; then
849       echo
850       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
851     elif test -f $ac_sub_srcdir/configure; then
852       echo
853       $SHELL $ac_sub_srcdir/configure  --help=recursive
854     elif test -f $ac_sub_srcdir/configure.ac ||
855            test -f $ac_sub_srcdir/configure.in; then
856       echo
857       $ac_configure --help
858     else
859       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
860     fi
861     cd $ac_popdir
862   done
863 fi
864
865 test -n "$ac_init_help" && exit 0
866 if $ac_init_version; then
867   cat <<\EOF
868
869 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
870 Free Software Foundation, Inc.
871 This configure script is free software; the Free Software Foundation
872 gives unlimited permission to copy, distribute and modify it.
873 EOF
874   exit 0
875 fi
876 exec 5>config.log
877 cat >&5 <<EOF
878 This file contains any messages produced by compilers while
879 running configure, to aid debugging if configure makes a mistake.
880
881 It was created by $as_me, which was
882 generated by GNU Autoconf 2.52.20100320.  Invocation command line was
883
884   $ $0 $@
885
886 EOF
887 {
888 cat <<_ASUNAME
889 ## ---------- ##
890 ## Platform.  ##
891 ## ---------- ##
892
893 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
894 uname -m = `(uname -m) 2>/dev/null || echo unknown`
895 uname -r = `(uname -r) 2>/dev/null || echo unknown`
896 uname -s = `(uname -s) 2>/dev/null || echo unknown`
897 uname -v = `(uname -v) 2>/dev/null || echo unknown`
898
899 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
900 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
901
902 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
903 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
904 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
905 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
906 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
907 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
908 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
909
910 PATH = $PATH
911
912 _ASUNAME
913 } >&5
914
915 cat >&5 <<EOF
916 ## ------------ ##
917 ## Core tests.  ##
918 ## ------------ ##
919
920 EOF
921
922 # Keep a trace of the command line.
923 # Strip out --no-create and --no-recursion so they do not pile up.
924 # Also quote any args containing shell meta-characters.
925 ac_configure_args=
926 ac_sep=
927 for ac_arg
928 do
929   case $ac_arg in
930   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
931   | --no-cr | --no-c) ;;
932   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
933   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
934   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
935     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
936     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
937     ac_sep=" " ;;
938   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
939      ac_sep=" " ;;
940   esac
941   # Get rid of the leading space.
942 done
943
944 # When interrupted or exit'd, cleanup temporary files, and complete
945 # config.log.  We remove comments because anyway the quotes in there
946 # would cause problems or look ugly.
947 trap 'exit_status=$?
948   # Save into config.log some information that might help in debugging.
949   echo >&5
950   echo "## ----------------- ##" >&5
951   echo "## Cache variables.  ##" >&5
952   echo "## ----------------- ##" >&5
953   echo >&5
954   # The following way of writing the cache mishandles newlines in values,
955 {
956   (set) 2>&1 |
957     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
958     *ac_space=\ *)
959       sed -n \
960         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
961           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
962       ;;
963     *)
964       sed -n \
965         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
966       ;;
967     esac;
968 } >&5
969   sed "/^$/d" confdefs.h >conftest.log
970   if test -s conftest.log; then
971     echo >&5
972     echo "## ------------ ##" >&5
973     echo "## confdefs.h.  ##" >&5
974     echo "## ------------ ##" >&5
975     echo >&5
976     cat conftest.log >&5
977   fi
978   (echo; echo) >&5
979   test "$ac_signal" != 0 &&
980     echo "$as_me: caught signal $ac_signal" >&5
981   echo "$as_me: exit $exit_status" >&5
982   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
983     exit $exit_status
984      ' 0
985 for ac_signal in 1 2 13 15; do
986   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
987 done
988 ac_signal=0
989
990 # confdefs.h avoids OS command line length limits that DEFS can exceed.
991 rm -rf conftest* confdefs.h
992 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
993 echo >confdefs.h
994
995 # Let the site file select an alternate cache file if it wants to.
996 # Prefer explicitly selected file to automatically selected ones.
997 if test -z "$CONFIG_SITE"; then
998   if test "x$prefix" != xNONE; then
999     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1000   else
1001     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1002   fi
1003 fi
1004 for ac_site_file in $CONFIG_SITE; do
1005   if test -r "$ac_site_file"; then
1006     { echo "$as_me:1006: loading site script $ac_site_file" >&5
1007 echo "$as_me: loading site script $ac_site_file" >&6;}
1008     cat "$ac_site_file" >&5
1009     . "$ac_site_file"
1010   fi
1011 done
1012
1013 if test -r "$cache_file"; then
1014   # Some versions of bash will fail to source /dev/null (special
1015   # files actually), so we avoid doing that.
1016   if test -f "$cache_file"; then
1017     { echo "$as_me:1017: loading cache $cache_file" >&5
1018 echo "$as_me: loading cache $cache_file" >&6;}
1019     case $cache_file in
1020       [\\/]* | ?:[\\/]* ) . $cache_file;;
1021       *)                      . ./$cache_file;;
1022     esac
1023   fi
1024 else
1025   { echo "$as_me:1025: creating cache $cache_file" >&5
1026 echo "$as_me: creating cache $cache_file" >&6;}
1027   >$cache_file
1028 fi
1029
1030 # Check that the precious variables saved in the cache have kept the same
1031 # value.
1032 ac_cache_corrupted=false
1033 for ac_var in `(set) 2>&1 |
1034                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1035   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1036   eval ac_new_set=\$ac_env_${ac_var}_set
1037   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1038   eval ac_new_val="\$ac_env_${ac_var}_value"
1039   case $ac_old_set,$ac_new_set in
1040     set,)
1041       { echo "$as_me:1041: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1042 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1043       ac_cache_corrupted=: ;;
1044     ,set)
1045       { echo "$as_me:1045: error: \`$ac_var' was not set in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,);;
1049     *)
1050       if test "x$ac_old_val" != "x$ac_new_val"; then
1051         { echo "$as_me:1051: error: \`$ac_var' has changed since the previous run:" >&5
1052 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1053         { echo "$as_me:1053:   former value:  $ac_old_val" >&5
1054 echo "$as_me:   former value:  $ac_old_val" >&2;}
1055         { echo "$as_me:1055:   current value: $ac_new_val" >&5
1056 echo "$as_me:   current value: $ac_new_val" >&2;}
1057         ac_cache_corrupted=:
1058       fi;;
1059   esac
1060   # Pass precious variables to config.status.  It doesn't matter if
1061   # we pass some twice (in addition to the command line arguments).
1062   if test "$ac_new_set" = set; then
1063     case $ac_new_val in
1064     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1065       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1066       ac_configure_args="$ac_configure_args '$ac_arg'"
1067       ;;
1068     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1069        ;;
1070     esac
1071   fi
1072 done
1073 if $ac_cache_corrupted; then
1074   { echo "$as_me:1074: error: changes in the environment can compromise the build" >&5
1075 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1076   { { echo "$as_me:1076: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1077 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1078    { (exit 1); exit 1; }; }
1079 fi
1080
1081 ac_ext=c
1082 ac_cpp='$CPP $CPPFLAGS'
1083 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1084 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1085 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1086 ac_main_return=return
1087
1088 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1089   *c*,-n*) ECHO_N= ECHO_C='
1090 ' ECHO_T='      ' ;;
1091   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1092   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1093 esac
1094 echo "#! $SHELL" >conftest.sh
1095 echo  "exit 0"   >>conftest.sh
1096 chmod +x conftest.sh
1097 if { (echo "$as_me:1097: PATH=\".;.\"; conftest.sh") >&5
1098   (PATH=".;."; conftest.sh) 2>&5
1099   ac_status=$?
1100   echo "$as_me:1100: \$? = $ac_status" >&5
1101   (exit $ac_status); }; then
1102   ac_path_separator=';'
1103 else
1104   ac_path_separator=:
1105 fi
1106 PATH_SEPARATOR="$ac_path_separator"
1107 rm -f conftest.sh
1108
1109 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1110
1111 top_builddir=`pwd`
1112
1113 echo "$as_me:1113: checking for egrep" >&5
1114 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1115 if test "${ac_cv_prog_egrep+set}" = set; then
1116   echo $ECHO_N "(cached) $ECHO_C" >&6
1117 else
1118   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1119     then ac_cv_prog_egrep='grep -E'
1120     else ac_cv_prog_egrep='egrep'
1121     fi
1122 fi
1123 echo "$as_me:1123: result: $ac_cv_prog_egrep" >&5
1124 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1125  EGREP=$ac_cv_prog_egrep
1126
1127 test -z "$EGREP" && { { echo "$as_me:1127: error: No egrep program found" >&5
1128 echo "$as_me: error: No egrep program found" >&2;}
1129    { (exit 1); exit 1; }; }
1130
1131 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1134 cf_cv_abi_version=${NCURSES_MAJOR}
1135 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1136 cf_cv_timestamp=`date`
1137 echo "$as_me:1137: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1138 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1139
1140 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1141
1142 # Check whether --with-rel-version or --without-rel-version was given.
1143 if test "${with_rel_version+set}" = set; then
1144   withval="$with_rel_version"
1145   { echo "$as_me:1145: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1146 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1147  cf_cv_rel_version=$withval
1148 fi;
1149
1150  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1151  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1152
1153 if test -n "$NCURSES_MAJOR" ; then
1154   case $NCURSES_MAJOR in #(vi
1155   [0-9]*) #(vi
1156         ;;
1157   *)
1158         { { echo "$as_me:1158: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1159 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1160    { (exit 1); exit 1; }; }
1161         ;;
1162   esac
1163 else
1164   { { echo "$as_me:1164: error: Release major-version value is empty" >&5
1165 echo "$as_me: error: Release major-version value is empty" >&2;}
1166    { (exit 1); exit 1; }; }
1167 fi
1168
1169 if test -n "$NCURSES_MINOR" ; then
1170   case $NCURSES_MINOR in #(vi
1171   [0-9]*) #(vi
1172         ;;
1173   *)
1174         { { echo "$as_me:1174: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1175 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1176    { (exit 1); exit 1; }; }
1177         ;;
1178   esac
1179 else
1180   { { echo "$as_me:1180: error: Release minor-version value is empty" >&5
1181 echo "$as_me: error: Release minor-version value is empty" >&2;}
1182    { (exit 1); exit 1; }; }
1183 fi
1184
1185 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1186
1187 # Check whether --with-abi-version or --without-abi-version was given.
1188 if test "${with_abi_version+set}" = set; then
1189   withval="$with_abi_version"
1190   { echo "$as_me:1190: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1191 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1192  cf_cv_abi_version=$withval
1193 fi;
1194
1195 if test -n "$cf_cv_abi_version" ; then
1196   case $cf_cv_abi_version in #(vi
1197   [0-9]*) #(vi
1198         ;;
1199   *)
1200         { { echo "$as_me:1200: error: ABI version is not a number: $cf_cv_abi_version" >&5
1201 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1202    { (exit 1); exit 1; }; }
1203         ;;
1204   esac
1205 else
1206   { { echo "$as_me:1206: error: ABI version value is empty" >&5
1207 echo "$as_me: error: ABI version value is empty" >&2;}
1208    { (exit 1); exit 1; }; }
1209 fi
1210
1211 ac_aux_dir=
1212 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1213   if test -f $ac_dir/install-sh; then
1214     ac_aux_dir=$ac_dir
1215     ac_install_sh="$ac_aux_dir/install-sh -c"
1216     break
1217   elif test -f $ac_dir/install.sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install.sh -c"
1220     break
1221   elif test -f $ac_dir/shtool; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/shtool install -c"
1224     break
1225   fi
1226 done
1227 if test -z "$ac_aux_dir"; then
1228   { { echo "$as_me:1228: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1229 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1230    { (exit 1); exit 1; }; }
1231 fi
1232 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1233 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1234 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1235
1236 # Make sure we can run config.sub.
1237 $ac_config_sub sun4 >/dev/null 2>&1 ||
1238   { { echo "$as_me:1238: error: cannot run $ac_config_sub" >&5
1239 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1240    { (exit 1); exit 1; }; }
1241
1242 echo "$as_me:1242: checking build system type" >&5
1243 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1244 if test "${ac_cv_build+set}" = set; then
1245   echo $ECHO_N "(cached) $ECHO_C" >&6
1246 else
1247   ac_cv_build_alias=$build_alias
1248 test -z "$ac_cv_build_alias" &&
1249   ac_cv_build_alias=`$ac_config_guess`
1250 test -z "$ac_cv_build_alias" &&
1251   { { echo "$as_me:1251: error: cannot guess build type; you must specify one" >&5
1252 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1253    { (exit 1); exit 1; }; }
1254 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1255   { { echo "$as_me:1255: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1256 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1257    { (exit 1); exit 1; }; }
1258
1259 fi
1260 echo "$as_me:1260: result: $ac_cv_build" >&5
1261 echo "${ECHO_T}$ac_cv_build" >&6
1262 build=$ac_cv_build
1263 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1264 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1265 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1266
1267 echo "$as_me:1267: checking host system type" >&5
1268 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1269 if test "${ac_cv_host+set}" = set; then
1270   echo $ECHO_N "(cached) $ECHO_C" >&6
1271 else
1272   ac_cv_host_alias=$host_alias
1273 test -z "$ac_cv_host_alias" &&
1274   ac_cv_host_alias=$ac_cv_build_alias
1275 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1276   { { echo "$as_me:1276: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1277 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1278    { (exit 1); exit 1; }; }
1279
1280 fi
1281 echo "$as_me:1281: result: $ac_cv_host" >&5
1282 echo "${ECHO_T}$ac_cv_host" >&6
1283 host=$ac_cv_host
1284 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1285 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1286 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1287
1288 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1289         echo "$as_me:1289: checking target system type" >&5
1290 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1291 if test "${ac_cv_target+set}" = set; then
1292   echo $ECHO_N "(cached) $ECHO_C" >&6
1293 else
1294   ac_cv_target_alias=$target_alias
1295 test "x$ac_cv_target_alias" = "x" &&
1296   ac_cv_target_alias=$ac_cv_host_alias
1297 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1298   { { echo "$as_me:1298: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1299 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1300    { (exit 1); exit 1; }; }
1301
1302 fi
1303 echo "$as_me:1303: result: $ac_cv_target" >&5
1304 echo "${ECHO_T}$ac_cv_target" >&6
1305 target=$ac_cv_target
1306 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1307 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1308 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1309
1310 # The aliases save the names the user supplied, while $host etc.
1311 # will get canonicalized.
1312 test -n "$target_alias" &&
1313   test "$program_prefix$program_suffix$program_transform_name" = \
1314     NONENONEs,x,x, &&
1315   program_prefix=${target_alias}-
1316         system_name="$host_os"
1317 else
1318         system_name="`(uname -s -r) 2>/dev/null`"
1319         if test -z "$system_name" ; then
1320                 system_name="`(hostname) 2>/dev/null`"
1321         fi
1322 fi
1323 test -n "$system_name" && cat >>confdefs.h <<EOF
1324 #define SYSTEM_NAME "$system_name"
1325 EOF
1326
1327 if test "${cf_cv_system_name+set}" = set; then
1328   echo $ECHO_N "(cached) $ECHO_C" >&6
1329 else
1330   cf_cv_system_name="$system_name"
1331 fi
1332
1333 test -z "$system_name" && system_name="$cf_cv_system_name"
1334 test -n "$cf_cv_system_name" && echo "$as_me:1334: result: Configuring for $cf_cv_system_name" >&5
1335 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1336
1337 if test ".$system_name" != ".$cf_cv_system_name" ; then
1338         echo "$as_me:1338: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1339 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1340         { { echo "$as_me:1340: error: \"Please remove config.cache and try again.\"" >&5
1341 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1342    { (exit 1); exit 1; }; }
1343 fi
1344
1345 # Check whether --with-system-type or --without-system-type was given.
1346 if test "${with_system_type+set}" = set; then
1347   withval="$with_system_type"
1348   { echo "$as_me:1348: WARNING: overriding system type to $withval" >&5
1349 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1350  cf_cv_system_name=$withval
1351 fi;
1352
1353 ###     Save the given $CFLAGS to allow user-override.
1354 cf_user_CFLAGS="$CFLAGS"
1355
1356 ###     Default install-location
1357
1358 echo "$as_me:1358: checking for prefix" >&5
1359 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1360 if test "x$prefix" = "xNONE" ; then
1361         case "$cf_cv_system_name" in
1362                 # non-vendor systems don't have a conflict
1363         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1364                 prefix=/usr
1365                 ;;
1366         *)      prefix=$ac_default_prefix
1367                 ;;
1368         esac
1369 fi
1370 echo "$as_me:1370: result: $prefix" >&5
1371 echo "${ECHO_T}$prefix" >&6
1372
1373 if test "x$prefix" = "xNONE" ; then
1374 echo "$as_me:1374: checking for default include-directory" >&5
1375 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1376 test -n "$verbose" && echo 1>&6
1377 for cf_symbol in \
1378         $includedir \
1379         $includedir/ncurses \
1380         $prefix/include \
1381         $prefix/include/ncurses \
1382         /usr/local/include \
1383         /usr/local/include/ncurses \
1384         /usr/include \
1385         /usr/include/ncurses
1386 do
1387         cf_dir=`eval echo $cf_symbol`
1388         if test -f $cf_dir/curses.h ; then
1389         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1390                 includedir="$cf_symbol"
1391                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1392                 break
1393         fi
1394         fi
1395         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1396 done
1397 echo "$as_me:1397: result: $includedir" >&5
1398 echo "${ECHO_T}$includedir" >&6
1399 fi
1400
1401 ###     Checks for programs.
1402 ac_ext=c
1403 ac_cpp='$CPP $CPPFLAGS'
1404 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1405 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1406 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1407 ac_main_return=return
1408 if test -n "$ac_tool_prefix"; then
1409   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1410 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1411 echo "$as_me:1411: checking for $ac_word" >&5
1412 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1413 if test "${ac_cv_prog_CC+set}" = set; then
1414   echo $ECHO_N "(cached) $ECHO_C" >&6
1415 else
1416   if test -n "$CC"; then
1417   ac_cv_prog_CC="$CC" # Let the user override the test.
1418 else
1419   ac_save_IFS=$IFS; IFS=$ac_path_separator
1420 ac_dummy="$PATH"
1421 for ac_dir in $ac_dummy; do
1422   IFS=$ac_save_IFS
1423   test -z "$ac_dir" && ac_dir=.
1424   $as_executable_p "$ac_dir/$ac_word" || continue
1425 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1426 echo "$as_me:1426: found $ac_dir/$ac_word" >&5
1427 break
1428 done
1429
1430 fi
1431 fi
1432 CC=$ac_cv_prog_CC
1433 if test -n "$CC"; then
1434   echo "$as_me:1434: result: $CC" >&5
1435 echo "${ECHO_T}$CC" >&6
1436 else
1437   echo "$as_me:1437: result: no" >&5
1438 echo "${ECHO_T}no" >&6
1439 fi
1440
1441 fi
1442 if test -z "$ac_cv_prog_CC"; then
1443   ac_ct_CC=$CC
1444   # Extract the first word of "gcc", so it can be a program name with args.
1445 set dummy gcc; ac_word=$2
1446 echo "$as_me:1446: checking for $ac_word" >&5
1447 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1448 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1449   echo $ECHO_N "(cached) $ECHO_C" >&6
1450 else
1451   if test -n "$ac_ct_CC"; then
1452   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1453 else
1454   ac_save_IFS=$IFS; IFS=$ac_path_separator
1455 ac_dummy="$PATH"
1456 for ac_dir in $ac_dummy; do
1457   IFS=$ac_save_IFS
1458   test -z "$ac_dir" && ac_dir=.
1459   $as_executable_p "$ac_dir/$ac_word" || continue
1460 ac_cv_prog_ac_ct_CC="gcc"
1461 echo "$as_me:1461: found $ac_dir/$ac_word" >&5
1462 break
1463 done
1464
1465 fi
1466 fi
1467 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1468 if test -n "$ac_ct_CC"; then
1469   echo "$as_me:1469: result: $ac_ct_CC" >&5
1470 echo "${ECHO_T}$ac_ct_CC" >&6
1471 else
1472   echo "$as_me:1472: result: no" >&5
1473 echo "${ECHO_T}no" >&6
1474 fi
1475
1476   CC=$ac_ct_CC
1477 else
1478   CC="$ac_cv_prog_CC"
1479 fi
1480
1481 if test -z "$CC"; then
1482   if test -n "$ac_tool_prefix"; then
1483   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1484 set dummy ${ac_tool_prefix}cc; ac_word=$2
1485 echo "$as_me:1485: checking for $ac_word" >&5
1486 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1487 if test "${ac_cv_prog_CC+set}" = set; then
1488   echo $ECHO_N "(cached) $ECHO_C" >&6
1489 else
1490   if test -n "$CC"; then
1491   ac_cv_prog_CC="$CC" # Let the user override the test.
1492 else
1493   ac_save_IFS=$IFS; IFS=$ac_path_separator
1494 ac_dummy="$PATH"
1495 for ac_dir in $ac_dummy; do
1496   IFS=$ac_save_IFS
1497   test -z "$ac_dir" && ac_dir=.
1498   $as_executable_p "$ac_dir/$ac_word" || continue
1499 ac_cv_prog_CC="${ac_tool_prefix}cc"
1500 echo "$as_me:1500: found $ac_dir/$ac_word" >&5
1501 break
1502 done
1503
1504 fi
1505 fi
1506 CC=$ac_cv_prog_CC
1507 if test -n "$CC"; then
1508   echo "$as_me:1508: result: $CC" >&5
1509 echo "${ECHO_T}$CC" >&6
1510 else
1511   echo "$as_me:1511: result: no" >&5
1512 echo "${ECHO_T}no" >&6
1513 fi
1514
1515 fi
1516 if test -z "$ac_cv_prog_CC"; then
1517   ac_ct_CC=$CC
1518   # Extract the first word of "cc", so it can be a program name with args.
1519 set dummy cc; ac_word=$2
1520 echo "$as_me:1520: checking for $ac_word" >&5
1521 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1522 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1523   echo $ECHO_N "(cached) $ECHO_C" >&6
1524 else
1525   if test -n "$ac_ct_CC"; then
1526   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1527 else
1528   ac_save_IFS=$IFS; IFS=$ac_path_separator
1529 ac_dummy="$PATH"
1530 for ac_dir in $ac_dummy; do
1531   IFS=$ac_save_IFS
1532   test -z "$ac_dir" && ac_dir=.
1533   $as_executable_p "$ac_dir/$ac_word" || continue
1534 ac_cv_prog_ac_ct_CC="cc"
1535 echo "$as_me:1535: found $ac_dir/$ac_word" >&5
1536 break
1537 done
1538
1539 fi
1540 fi
1541 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1542 if test -n "$ac_ct_CC"; then
1543   echo "$as_me:1543: result: $ac_ct_CC" >&5
1544 echo "${ECHO_T}$ac_ct_CC" >&6
1545 else
1546   echo "$as_me:1546: result: no" >&5
1547 echo "${ECHO_T}no" >&6
1548 fi
1549
1550   CC=$ac_ct_CC
1551 else
1552   CC="$ac_cv_prog_CC"
1553 fi
1554
1555 fi
1556 if test -z "$CC"; then
1557   # Extract the first word of "cc", so it can be a program name with args.
1558 set dummy cc; ac_word=$2
1559 echo "$as_me:1559: checking for $ac_word" >&5
1560 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1561 if test "${ac_cv_prog_CC+set}" = set; then
1562   echo $ECHO_N "(cached) $ECHO_C" >&6
1563 else
1564   if test -n "$CC"; then
1565   ac_cv_prog_CC="$CC" # Let the user override the test.
1566 else
1567   ac_prog_rejected=no
1568   ac_save_IFS=$IFS; IFS=$ac_path_separator
1569 ac_dummy="$PATH"
1570 for ac_dir in $ac_dummy; do
1571   IFS=$ac_save_IFS
1572   test -z "$ac_dir" && ac_dir=.
1573   $as_executable_p "$ac_dir/$ac_word" || continue
1574 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1575   ac_prog_rejected=yes
1576   continue
1577 fi
1578 ac_cv_prog_CC="cc"
1579 echo "$as_me:1579: found $ac_dir/$ac_word" >&5
1580 break
1581 done
1582
1583 if test $ac_prog_rejected = yes; then
1584   # We found a bogon in the path, so make sure we never use it.
1585   set dummy $ac_cv_prog_CC
1586   shift
1587   if test $# != 0; then
1588     # We chose a different compiler from the bogus one.
1589     # However, it has the same basename, so the bogon will be chosen
1590     # first if we set CC to just the basename; use the full file name.
1591     shift
1592     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1593     shift
1594     ac_cv_prog_CC="$@"
1595   fi
1596 fi
1597 fi
1598 fi
1599 CC=$ac_cv_prog_CC
1600 if test -n "$CC"; then
1601   echo "$as_me:1601: result: $CC" >&5
1602 echo "${ECHO_T}$CC" >&6
1603 else
1604   echo "$as_me:1604: result: no" >&5
1605 echo "${ECHO_T}no" >&6
1606 fi
1607
1608 fi
1609 if test -z "$CC"; then
1610   if test -n "$ac_tool_prefix"; then
1611   for ac_prog in cl
1612   do
1613     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1615 echo "$as_me:1615: checking for $ac_word" >&5
1616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1617 if test "${ac_cv_prog_CC+set}" = set; then
1618   echo $ECHO_N "(cached) $ECHO_C" >&6
1619 else
1620   if test -n "$CC"; then
1621   ac_cv_prog_CC="$CC" # Let the user override the test.
1622 else
1623   ac_save_IFS=$IFS; IFS=$ac_path_separator
1624 ac_dummy="$PATH"
1625 for ac_dir in $ac_dummy; do
1626   IFS=$ac_save_IFS
1627   test -z "$ac_dir" && ac_dir=.
1628   $as_executable_p "$ac_dir/$ac_word" || continue
1629 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1630 echo "$as_me:1630: found $ac_dir/$ac_word" >&5
1631 break
1632 done
1633
1634 fi
1635 fi
1636 CC=$ac_cv_prog_CC
1637 if test -n "$CC"; then
1638   echo "$as_me:1638: result: $CC" >&5
1639 echo "${ECHO_T}$CC" >&6
1640 else
1641   echo "$as_me:1641: result: no" >&5
1642 echo "${ECHO_T}no" >&6
1643 fi
1644
1645     test -n "$CC" && break
1646   done
1647 fi
1648 if test -z "$CC"; then
1649   ac_ct_CC=$CC
1650   for ac_prog in cl
1651 do
1652   # Extract the first word of "$ac_prog", so it can be a program name with args.
1653 set dummy $ac_prog; ac_word=$2
1654 echo "$as_me:1654: checking for $ac_word" >&5
1655 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1656 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1657   echo $ECHO_N "(cached) $ECHO_C" >&6
1658 else
1659   if test -n "$ac_ct_CC"; then
1660   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1661 else
1662   ac_save_IFS=$IFS; IFS=$ac_path_separator
1663 ac_dummy="$PATH"
1664 for ac_dir in $ac_dummy; do
1665   IFS=$ac_save_IFS
1666   test -z "$ac_dir" && ac_dir=.
1667   $as_executable_p "$ac_dir/$ac_word" || continue
1668 ac_cv_prog_ac_ct_CC="$ac_prog"
1669 echo "$as_me:1669: found $ac_dir/$ac_word" >&5
1670 break
1671 done
1672
1673 fi
1674 fi
1675 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1676 if test -n "$ac_ct_CC"; then
1677   echo "$as_me:1677: result: $ac_ct_CC" >&5
1678 echo "${ECHO_T}$ac_ct_CC" >&6
1679 else
1680   echo "$as_me:1680: result: no" >&5
1681 echo "${ECHO_T}no" >&6
1682 fi
1683
1684   test -n "$ac_ct_CC" && break
1685 done
1686
1687   CC=$ac_ct_CC
1688 fi
1689
1690 fi
1691
1692 test -z "$CC" && { { echo "$as_me:1692: error: no acceptable cc found in \$PATH" >&5
1693 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1694    { (exit 1); exit 1; }; }
1695
1696 # Provide some information about the compiler.
1697 echo "$as_me:1697:" \
1698      "checking for C compiler version" >&5
1699 ac_compiler=`set X $ac_compile; echo $2`
1700 { (eval echo "$as_me:1700: \"$ac_compiler --version </dev/null >&5\"") >&5
1701   (eval $ac_compiler --version </dev/null >&5) 2>&5
1702   ac_status=$?
1703   echo "$as_me:1703: \$? = $ac_status" >&5
1704   (exit $ac_status); }
1705 { (eval echo "$as_me:1705: \"$ac_compiler -v </dev/null >&5\"") >&5
1706   (eval $ac_compiler -v </dev/null >&5) 2>&5
1707   ac_status=$?
1708   echo "$as_me:1708: \$? = $ac_status" >&5
1709   (exit $ac_status); }
1710 { (eval echo "$as_me:1710: \"$ac_compiler -V </dev/null >&5\"") >&5
1711   (eval $ac_compiler -V </dev/null >&5) 2>&5
1712   ac_status=$?
1713   echo "$as_me:1713: \$? = $ac_status" >&5
1714   (exit $ac_status); }
1715
1716 cat >conftest.$ac_ext <<_ACEOF
1717 #line 1717 "configure"
1718 #include "confdefs.h"
1719
1720 int
1721 main ()
1722 {
1723
1724   ;
1725   return 0;
1726 }
1727 _ACEOF
1728 ac_clean_files_save=$ac_clean_files
1729 ac_clean_files="$ac_clean_files a.out a.exe"
1730 # Try to create an executable without -o first, disregard a.out.
1731 # It will help us diagnose broken compilers, and finding out an intuition
1732 # of exeext.
1733 echo "$as_me:1733: checking for C compiler default output" >&5
1734 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1735 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1736 if { (eval echo "$as_me:1736: \"$ac_link_default\"") >&5
1737   (eval $ac_link_default) 2>&5
1738   ac_status=$?
1739   echo "$as_me:1739: \$? = $ac_status" >&5
1740   (exit $ac_status); }; then
1741   # Find the output, starting from the most likely.  This scheme is
1742 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1743 # resort.
1744 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1745                 ls a.out conftest 2>/dev/null;
1746                 ls a.* conftest.* 2>/dev/null`; do
1747   case $ac_file in
1748     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1749     a.out ) # We found the default executable, but exeext='' is most
1750             # certainly right.
1751             break;;
1752     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1753           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1754           export ac_cv_exeext
1755           break;;
1756     * ) break;;
1757   esac
1758 done
1759 else
1760   echo "$as_me: failed program was:" >&5
1761 cat conftest.$ac_ext >&5
1762 { { echo "$as_me:1762: error: C compiler cannot create executables" >&5
1763 echo "$as_me: error: C compiler cannot create executables" >&2;}
1764    { (exit 77); exit 77; }; }
1765 fi
1766
1767 ac_exeext=$ac_cv_exeext
1768 echo "$as_me:1768: result: $ac_file" >&5
1769 echo "${ECHO_T}$ac_file" >&6
1770
1771 # Check the compiler produces executables we can run.  If not, either
1772 # the compiler is broken, or we cross compile.
1773 echo "$as_me:1773: checking whether the C compiler works" >&5
1774 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1775 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1776 # If not cross compiling, check that we can run a simple program.
1777 if test "$cross_compiling" != yes; then
1778   if { ac_try='./$ac_file'
1779   { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780   (eval $ac_try) 2>&5
1781   ac_status=$?
1782   echo "$as_me:1782: \$? = $ac_status" >&5
1783   (exit $ac_status); }; }; then
1784     cross_compiling=no
1785   else
1786     if test "$cross_compiling" = maybe; then
1787         cross_compiling=yes
1788     else
1789         { { echo "$as_me:1789: error: cannot run C compiled programs.
1790 If you meant to cross compile, use \`--host'." >&5
1791 echo "$as_me: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&2;}
1793    { (exit 1); exit 1; }; }
1794     fi
1795   fi
1796 fi
1797 echo "$as_me:1797: result: yes" >&5
1798 echo "${ECHO_T}yes" >&6
1799
1800 rm -f a.out a.exe conftest$ac_cv_exeext
1801 ac_clean_files=$ac_clean_files_save
1802 # Check the compiler produces executables we can run.  If not, either
1803 # the compiler is broken, or we cross compile.
1804 echo "$as_me:1804: checking whether we are cross compiling" >&5
1805 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1806 echo "$as_me:1806: result: $cross_compiling" >&5
1807 echo "${ECHO_T}$cross_compiling" >&6
1808
1809 echo "$as_me:1809: checking for executable suffix" >&5
1810 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1811 if { (eval echo "$as_me:1811: \"$ac_link\"") >&5
1812   (eval $ac_link) 2>&5
1813   ac_status=$?
1814   echo "$as_me:1814: \$? = $ac_status" >&5
1815   (exit $ac_status); }; then
1816   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1817 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1818 # work properly (i.e., refer to `conftest.exe'), while it won't with
1819 # `rm'.
1820 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1821   case $ac_file in
1822     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1823     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1824           export ac_cv_exeext
1825           break;;
1826     * ) break;;
1827   esac
1828 done
1829 else
1830   { { echo "$as_me:1830: error: cannot compute EXEEXT: cannot compile and link" >&5
1831 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1832    { (exit 1); exit 1; }; }
1833 fi
1834
1835 rm -f conftest$ac_cv_exeext
1836 echo "$as_me:1836: result: $ac_cv_exeext" >&5
1837 echo "${ECHO_T}$ac_cv_exeext" >&6
1838
1839 rm -f conftest.$ac_ext
1840 EXEEXT=$ac_cv_exeext
1841 ac_exeext=$EXEEXT
1842 echo "$as_me:1842: checking for object suffix" >&5
1843 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1844 if test "${ac_cv_objext+set}" = set; then
1845   echo $ECHO_N "(cached) $ECHO_C" >&6
1846 else
1847   cat >conftest.$ac_ext <<_ACEOF
1848 #line 1848 "configure"
1849 #include "confdefs.h"
1850
1851 int
1852 main ()
1853 {
1854
1855   ;
1856   return 0;
1857 }
1858 _ACEOF
1859 rm -f conftest.o conftest.obj
1860 if { (eval echo "$as_me:1860: \"$ac_compile\"") >&5
1861   (eval $ac_compile) 2>&5
1862   ac_status=$?
1863   echo "$as_me:1863: \$? = $ac_status" >&5
1864   (exit $ac_status); }; then
1865   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1866   case $ac_file in
1867     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1868     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1869        break;;
1870   esac
1871 done
1872 else
1873   echo "$as_me: failed program was:" >&5
1874 cat conftest.$ac_ext >&5
1875 { { echo "$as_me:1875: error: cannot compute OBJEXT: cannot compile" >&5
1876 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1877    { (exit 1); exit 1; }; }
1878 fi
1879
1880 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1881 fi
1882 echo "$as_me:1882: result: $ac_cv_objext" >&5
1883 echo "${ECHO_T}$ac_cv_objext" >&6
1884 OBJEXT=$ac_cv_objext
1885 ac_objext=$OBJEXT
1886 echo "$as_me:1886: checking whether we are using the GNU C compiler" >&5
1887 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1888 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1889   echo $ECHO_N "(cached) $ECHO_C" >&6
1890 else
1891   cat >conftest.$ac_ext <<_ACEOF
1892 #line 1892 "configure"
1893 #include "confdefs.h"
1894
1895 int
1896 main ()
1897 {
1898 #ifndef __GNUC__
1899        choke me
1900 #endif
1901
1902   ;
1903   return 0;
1904 }
1905 _ACEOF
1906 rm -f conftest.$ac_objext
1907 if { (eval echo "$as_me:1907: \"$ac_compile\"") >&5
1908   (eval $ac_compile) 2>&5
1909   ac_status=$?
1910   echo "$as_me:1910: \$? = $ac_status" >&5
1911   (exit $ac_status); } &&
1912          { ac_try='test -s conftest.$ac_objext'
1913   { (eval echo "$as_me:1913: \"$ac_try\"") >&5
1914   (eval $ac_try) 2>&5
1915   ac_status=$?
1916   echo "$as_me:1916: \$? = $ac_status" >&5
1917   (exit $ac_status); }; }; then
1918   ac_compiler_gnu=yes
1919 else
1920   echo "$as_me: failed program was:" >&5
1921 cat conftest.$ac_ext >&5
1922 ac_compiler_gnu=no
1923 fi
1924 rm -f conftest.$ac_objext conftest.$ac_ext
1925 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1926
1927 fi
1928 echo "$as_me:1928: result: $ac_cv_c_compiler_gnu" >&5
1929 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1930 GCC=`test $ac_compiler_gnu = yes && echo yes`
1931 ac_test_CFLAGS=${CFLAGS+set}
1932 ac_save_CFLAGS=$CFLAGS
1933 CFLAGS="-g"
1934 echo "$as_me:1934: checking whether $CC accepts -g" >&5
1935 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1936 if test "${ac_cv_prog_cc_g+set}" = set; then
1937   echo $ECHO_N "(cached) $ECHO_C" >&6
1938 else
1939   cat >conftest.$ac_ext <<_ACEOF
1940 #line 1940 "configure"
1941 #include "confdefs.h"
1942
1943 int
1944 main ()
1945 {
1946
1947   ;
1948   return 0;
1949 }
1950 _ACEOF
1951 rm -f conftest.$ac_objext
1952 if { (eval echo "$as_me:1952: \"$ac_compile\"") >&5
1953   (eval $ac_compile) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit $ac_status); } &&
1957          { ac_try='test -s conftest.$ac_objext'
1958   { (eval echo "$as_me:1958: \"$ac_try\"") >&5
1959   (eval $ac_try) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit $ac_status); }; }; then
1963   ac_cv_prog_cc_g=yes
1964 else
1965   echo "$as_me: failed program was:" >&5
1966 cat conftest.$ac_ext >&5
1967 ac_cv_prog_cc_g=no
1968 fi
1969 rm -f conftest.$ac_objext conftest.$ac_ext
1970 fi
1971 echo "$as_me:1971: result: $ac_cv_prog_cc_g" >&5
1972 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1973 if test "$ac_test_CFLAGS" = set; then
1974   CFLAGS=$ac_save_CFLAGS
1975 elif test $ac_cv_prog_cc_g = yes; then
1976   if test "$GCC" = yes; then
1977     CFLAGS="-g -O2"
1978   else
1979     CFLAGS="-g"
1980   fi
1981 else
1982   if test "$GCC" = yes; then
1983     CFLAGS="-O2"
1984   else
1985     CFLAGS=
1986   fi
1987 fi
1988 # Some people use a C++ compiler to compile C.  Since we use `exit',
1989 # in C++ we need to declare it.  In case someone uses the same compiler
1990 # for both compiling C and C++ we need to have the C++ compiler decide
1991 # the declaration of exit, since it's the most demanding environment.
1992 cat >conftest.$ac_ext <<_ACEOF
1993 #ifndef __cplusplus
1994   choke me
1995 #endif
1996 _ACEOF
1997 rm -f conftest.$ac_objext
1998 if { (eval echo "$as_me:1998: \"$ac_compile\"") >&5
1999   (eval $ac_compile) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); } &&
2003          { ac_try='test -s conftest.$ac_objext'
2004   { (eval echo "$as_me:2004: \"$ac_try\"") >&5
2005   (eval $ac_try) 2>&5
2006   ac_status=$?
2007   echo "$as_me:2007: \$? = $ac_status" >&5
2008   (exit $ac_status); }; }; then
2009   for ac_declaration in \
2010    ''\
2011    '#include <stdlib.h>' \
2012    'extern "C" void std::exit (int) throw (); using std::exit;' \
2013    'extern "C" void std::exit (int); using std::exit;' \
2014    'extern "C" void exit (int) throw ();' \
2015    'extern "C" void exit (int);' \
2016    'void exit (int);'
2017 do
2018   cat >conftest.$ac_ext <<_ACEOF
2019 #line 2019 "configure"
2020 #include "confdefs.h"
2021 #include <stdlib.h>
2022 $ac_declaration
2023 int
2024 main ()
2025 {
2026 exit (42);
2027   ;
2028   return 0;
2029 }
2030 _ACEOF
2031 rm -f conftest.$ac_objext
2032 if { (eval echo "$as_me:2032: \"$ac_compile\"") >&5
2033   (eval $ac_compile) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit $ac_status); } &&
2037          { ac_try='test -s conftest.$ac_objext'
2038   { (eval echo "$as_me:2038: \"$ac_try\"") >&5
2039   (eval $ac_try) 2>&5
2040   ac_status=$?
2041   echo "$as_me:2041: \$? = $ac_status" >&5
2042   (exit $ac_status); }; }; then
2043   :
2044 else
2045   echo "$as_me: failed program was:" >&5
2046 cat conftest.$ac_ext >&5
2047 continue
2048 fi
2049 rm -f conftest.$ac_objext conftest.$ac_ext
2050   cat >conftest.$ac_ext <<_ACEOF
2051 #line 2051 "configure"
2052 #include "confdefs.h"
2053 $ac_declaration
2054 int
2055 main ()
2056 {
2057 exit (42);
2058   ;
2059   return 0;
2060 }
2061 _ACEOF
2062 rm -f conftest.$ac_objext
2063 if { (eval echo "$as_me:2063: \"$ac_compile\"") >&5
2064   (eval $ac_compile) 2>&5
2065   ac_status=$?
2066   echo "$as_me:2066: \$? = $ac_status" >&5
2067   (exit $ac_status); } &&
2068          { ac_try='test -s conftest.$ac_objext'
2069   { (eval echo "$as_me:2069: \"$ac_try\"") >&5
2070   (eval $ac_try) 2>&5
2071   ac_status=$?
2072   echo "$as_me:2072: \$? = $ac_status" >&5
2073   (exit $ac_status); }; }; then
2074   break
2075 else
2076   echo "$as_me: failed program was:" >&5
2077 cat conftest.$ac_ext >&5
2078 fi
2079 rm -f conftest.$ac_objext conftest.$ac_ext
2080 done
2081 rm -f conftest*
2082 if test -n "$ac_declaration"; then
2083   echo '#ifdef __cplusplus' >>confdefs.h
2084   echo $ac_declaration      >>confdefs.h
2085   echo '#endif'             >>confdefs.h
2086 fi
2087
2088 else
2089   echo "$as_me: failed program was:" >&5
2090 cat conftest.$ac_ext >&5
2091 fi
2092 rm -f conftest.$ac_objext conftest.$ac_ext
2093 ac_ext=c
2094 ac_cpp='$CPP $CPPFLAGS'
2095 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2096 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2097 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2098 ac_main_return=return
2099
2100 GCC_VERSION=none
2101 if test "$GCC" = yes ; then
2102         echo "$as_me:2102: checking version of $CC" >&5
2103 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2104         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2105         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2106         echo "$as_me:2106: result: $GCC_VERSION" >&5
2107 echo "${ECHO_T}$GCC_VERSION" >&6
2108 fi
2109
2110 ac_ext=c
2111 ac_cpp='$CPP $CPPFLAGS'
2112 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2113 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2114 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2115 ac_main_return=return
2116 echo "$as_me:2116: checking how to run the C preprocessor" >&5
2117 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2118 # On Suns, sometimes $CPP names a directory.
2119 if test -n "$CPP" && test -d "$CPP"; then
2120   CPP=
2121 fi
2122 if test -z "$CPP"; then
2123   if test "${ac_cv_prog_CPP+set}" = set; then
2124   echo $ECHO_N "(cached) $ECHO_C" >&6
2125 else
2126       # Double quotes because CPP needs to be expanded
2127     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2128     do
2129       ac_preproc_ok=false
2130 for ac_c_preproc_warn_flag in '' yes
2131 do
2132   # Use a header file that comes with gcc, so configuring glibc
2133   # with a fresh cross-compiler works.
2134   # On the NeXT, cc -E runs the code through the compiler's parser,
2135   # not just through cpp. "Syntax error" is here to catch this case.
2136   cat >conftest.$ac_ext <<_ACEOF
2137 #line 2137 "configure"
2138 #include "confdefs.h"
2139 #include <assert.h>
2140                      Syntax error
2141 _ACEOF
2142 if { (eval echo "$as_me:2142: \"$ac_cpp conftest.$ac_ext\"") >&5
2143   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2144   ac_status=$?
2145   egrep -v '^ *\+' conftest.er1 >conftest.err
2146   rm -f conftest.er1
2147   cat conftest.err >&5
2148   echo "$as_me:2148: \$? = $ac_status" >&5
2149   (exit $ac_status); } >/dev/null; then
2150   if test -s conftest.err; then
2151     ac_cpp_err=$ac_c_preproc_warn_flag
2152   else
2153     ac_cpp_err=
2154   fi
2155 else
2156   ac_cpp_err=yes
2157 fi
2158 if test -z "$ac_cpp_err"; then
2159   :
2160 else
2161   echo "$as_me: failed program was:" >&5
2162   cat conftest.$ac_ext >&5
2163   # Broken: fails on valid input.
2164 continue
2165 fi
2166 rm -f conftest.err conftest.$ac_ext
2167
2168   # OK, works on sane cases.  Now check whether non-existent headers
2169   # can be detected and how.
2170   cat >conftest.$ac_ext <<_ACEOF
2171 #line 2171 "configure"
2172 #include "confdefs.h"
2173 #include <ac_nonexistent.h>
2174 _ACEOF
2175 if { (eval echo "$as_me:2175: \"$ac_cpp conftest.$ac_ext\"") >&5
2176   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2177   ac_status=$?
2178   egrep -v '^ *\+' conftest.er1 >conftest.err
2179   rm -f conftest.er1
2180   cat conftest.err >&5
2181   echo "$as_me:2181: \$? = $ac_status" >&5
2182   (exit $ac_status); } >/dev/null; then
2183   if test -s conftest.err; then
2184     ac_cpp_err=$ac_c_preproc_warn_flag
2185   else
2186     ac_cpp_err=
2187   fi
2188 else
2189   ac_cpp_err=yes
2190 fi
2191 if test -z "$ac_cpp_err"; then
2192   # Broken: success on invalid input.
2193 continue
2194 else
2195   echo "$as_me: failed program was:" >&5
2196   cat conftest.$ac_ext >&5
2197   # Passes both tests.
2198 ac_preproc_ok=:
2199 break
2200 fi
2201 rm -f conftest.err conftest.$ac_ext
2202
2203 done
2204 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2205 rm -f conftest.err conftest.$ac_ext
2206 if $ac_preproc_ok; then
2207   break
2208 fi
2209
2210     done
2211     ac_cv_prog_CPP=$CPP
2212
2213 fi
2214   CPP=$ac_cv_prog_CPP
2215 else
2216   ac_cv_prog_CPP=$CPP
2217 fi
2218 echo "$as_me:2218: result: $CPP" >&5
2219 echo "${ECHO_T}$CPP" >&6
2220 ac_preproc_ok=false
2221 for ac_c_preproc_warn_flag in '' yes
2222 do
2223   # Use a header file that comes with gcc, so configuring glibc
2224   # with a fresh cross-compiler works.
2225   # On the NeXT, cc -E runs the code through the compiler's parser,
2226   # not just through cpp. "Syntax error" is here to catch this case.
2227   cat >conftest.$ac_ext <<_ACEOF
2228 #line 2228 "configure"
2229 #include "confdefs.h"
2230 #include <assert.h>
2231                      Syntax error
2232 _ACEOF
2233 if { (eval echo "$as_me:2233: \"$ac_cpp conftest.$ac_ext\"") >&5
2234   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2235   ac_status=$?
2236   egrep -v '^ *\+' conftest.er1 >conftest.err
2237   rm -f conftest.er1
2238   cat conftest.err >&5
2239   echo "$as_me:2239: \$? = $ac_status" >&5
2240   (exit $ac_status); } >/dev/null; then
2241   if test -s conftest.err; then
2242     ac_cpp_err=$ac_c_preproc_warn_flag
2243   else
2244     ac_cpp_err=
2245   fi
2246 else
2247   ac_cpp_err=yes
2248 fi
2249 if test -z "$ac_cpp_err"; then
2250   :
2251 else
2252   echo "$as_me: failed program was:" >&5
2253   cat conftest.$ac_ext >&5
2254   # Broken: fails on valid input.
2255 continue
2256 fi
2257 rm -f conftest.err conftest.$ac_ext
2258
2259   # OK, works on sane cases.  Now check whether non-existent headers
2260   # can be detected and how.
2261   cat >conftest.$ac_ext <<_ACEOF
2262 #line 2262 "configure"
2263 #include "confdefs.h"
2264 #include <ac_nonexistent.h>
2265 _ACEOF
2266 if { (eval echo "$as_me:2266: \"$ac_cpp conftest.$ac_ext\"") >&5
2267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2268   ac_status=$?
2269   egrep -v '^ *\+' conftest.er1 >conftest.err
2270   rm -f conftest.er1
2271   cat conftest.err >&5
2272   echo "$as_me:2272: \$? = $ac_status" >&5
2273   (exit $ac_status); } >/dev/null; then
2274   if test -s conftest.err; then
2275     ac_cpp_err=$ac_c_preproc_warn_flag
2276   else
2277     ac_cpp_err=
2278   fi
2279 else
2280   ac_cpp_err=yes
2281 fi
2282 if test -z "$ac_cpp_err"; then
2283   # Broken: success on invalid input.
2284 continue
2285 else
2286   echo "$as_me: failed program was:" >&5
2287   cat conftest.$ac_ext >&5
2288   # Passes both tests.
2289 ac_preproc_ok=:
2290 break
2291 fi
2292 rm -f conftest.err conftest.$ac_ext
2293
2294 done
2295 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2296 rm -f conftest.err conftest.$ac_ext
2297 if $ac_preproc_ok; then
2298   :
2299 else
2300   { { echo "$as_me:2300: error: C preprocessor \"$CPP\" fails sanity check" >&5
2301 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2302    { (exit 1); exit 1; }; }
2303 fi
2304
2305 ac_ext=c
2306 ac_cpp='$CPP $CPPFLAGS'
2307 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2308 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2309 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2310 ac_main_return=return
2311
2312 if test $ac_cv_c_compiler_gnu = yes; then
2313     echo "$as_me:2313: checking whether $CC needs -traditional" >&5
2314 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2315 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2316   echo $ECHO_N "(cached) $ECHO_C" >&6
2317 else
2318     ac_pattern="Autoconf.*'x'"
2319   cat >conftest.$ac_ext <<_ACEOF
2320 #line 2320 "configure"
2321 #include "confdefs.h"
2322 #include <sgtty.h>
2323 int Autoconf = TIOCGETP;
2324 _ACEOF
2325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2326   egrep "$ac_pattern" >/dev/null 2>&1; then
2327   ac_cv_prog_gcc_traditional=yes
2328 else
2329   ac_cv_prog_gcc_traditional=no
2330 fi
2331 rm -f conftest*
2332
2333   if test $ac_cv_prog_gcc_traditional = no; then
2334     cat >conftest.$ac_ext <<_ACEOF
2335 #line 2335 "configure"
2336 #include "confdefs.h"
2337 #include <termio.h>
2338 int Autoconf = TCGETA;
2339 _ACEOF
2340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2341   egrep "$ac_pattern" >/dev/null 2>&1; then
2342   ac_cv_prog_gcc_traditional=yes
2343 fi
2344 rm -f conftest*
2345
2346   fi
2347 fi
2348 echo "$as_me:2348: result: $ac_cv_prog_gcc_traditional" >&5
2349 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2350   if test $ac_cv_prog_gcc_traditional = yes; then
2351     CC="$CC -traditional"
2352   fi
2353 fi
2354
2355 echo "$as_me:2355: checking whether $CC understands -c and -o together" >&5
2356 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2357 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2358   echo $ECHO_N "(cached) $ECHO_C" >&6
2359 else
2360
2361 cat > conftest.$ac_ext <<CF_EOF
2362 #include <stdio.h>
2363 int main()
2364 {
2365         ${cf_cv_main_return:-return}(0);
2366 }
2367 CF_EOF
2368 # We do the test twice because some compilers refuse to overwrite an
2369 # existing .o file with -o, though they will create one.
2370 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2371 if { (eval echo "$as_me:2371: \"$ac_try\"") >&5
2372   (eval $ac_try) 2>&5
2373   ac_status=$?
2374   echo "$as_me:2374: \$? = $ac_status" >&5
2375   (exit $ac_status); } &&
2376   test -f conftest2.$ac_objext && { (eval echo "$as_me:2376: \"$ac_try\"") >&5
2377   (eval $ac_try) 2>&5
2378   ac_status=$?
2379   echo "$as_me:2379: \$? = $ac_status" >&5
2380   (exit $ac_status); };
2381 then
2382   eval cf_cv_prog_CC_c_o=yes
2383 else
2384   eval cf_cv_prog_CC_c_o=no
2385 fi
2386 rm -f conftest*
2387
2388 fi
2389 if test $cf_cv_prog_CC_c_o = yes; then
2390   echo "$as_me:2390: result: yes" >&5
2391 echo "${ECHO_T}yes" >&6
2392 else
2393   echo "$as_me:2393: result: no" >&5
2394 echo "${ECHO_T}no" >&6
2395 fi
2396
2397 echo "$as_me:2397: checking for POSIXized ISC" >&5
2398 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2399 if test -d /etc/conf/kconfig.d &&
2400    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2401 then
2402   echo "$as_me:2402: result: yes" >&5
2403 echo "${ECHO_T}yes" >&6
2404   ISC=yes # If later tests want to check for ISC.
2405
2406 cat >>confdefs.h <<\EOF
2407 #define _POSIX_SOURCE 1
2408 EOF
2409
2410   if test "$GCC" = yes; then
2411     CC="$CC -posix"
2412   else
2413     CC="$CC -Xp"
2414   fi
2415 else
2416   echo "$as_me:2416: result: no" >&5
2417 echo "${ECHO_T}no" >&6
2418   ISC=
2419 fi
2420
2421 echo "$as_me:2421: checking for ${CC-cc} option to accept ANSI C" >&5
2422 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2423 if test "${cf_cv_ansi_cc+set}" = set; then
2424   echo $ECHO_N "(cached) $ECHO_C" >&6
2425 else
2426
2427 cf_cv_ansi_cc=no
2428 cf_save_CFLAGS="$CFLAGS"
2429 cf_save_CPPFLAGS="$CPPFLAGS"
2430 # Don't try gcc -ansi; that turns off useful extensions and
2431 # breaks some systems' header files.
2432 # AIX                   -qlanglvl=ansi
2433 # Ultrix and OSF/1      -std1
2434 # HP-UX                 -Aa -D_HPUX_SOURCE
2435 # SVR4                  -Xc
2436 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2437 for cf_arg in "-DCC_HAS_PROTOS" \
2438         "" \
2439         -qlanglvl=ansi \
2440         -std1 \
2441         -Ae \
2442         "-Aa -D_HPUX_SOURCE" \
2443         -Xc
2444 do
2445
2446 cf_fix_cppflags=no
2447 cf_new_cflags=
2448 cf_new_cppflags=
2449 cf_new_extra_cppflags=
2450
2451 for cf_add_cflags in $cf_arg
2452 do
2453 case $cf_fix_cppflags in
2454 no)
2455         case $cf_add_cflags in #(vi
2456         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2457                 case $cf_add_cflags in
2458                 -D*)
2459                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2460
2461                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2462                                 && test -z "${cf_tst_cflags}" \
2463                                 && cf_fix_cppflags=yes
2464
2465                         if test $cf_fix_cppflags = yes ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         elif test "${cf_tst_cflags}" = "\"'" ; then
2469                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2470                                 continue
2471                         fi
2472                         ;;
2473                 esac
2474                 case "$CPPFLAGS" in
2475                 *$cf_add_cflags) #(vi
2476                         ;;
2477                 *) #(vi
2478                         case $cf_add_cflags in #(vi
2479                         -D*)
2480                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2481
2482 CPPFLAGS=`echo "$CPPFLAGS" | \
2483         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2484                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2485
2486                                 ;;
2487                         esac
2488                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2489                         ;;
2490                 esac
2491                 ;;
2492         *)
2493                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2494                 ;;
2495         esac
2496         ;;
2497 yes)
2498         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2499
2500         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2501
2502         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2503                 && test -z "${cf_tst_cflags}" \
2504                 && cf_fix_cppflags=no
2505         ;;
2506 esac
2507 done
2508
2509 if test -n "$cf_new_cflags" ; then
2510
2511         CFLAGS="$CFLAGS $cf_new_cflags"
2512 fi
2513
2514 if test -n "$cf_new_cppflags" ; then
2515
2516         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2517 fi
2518
2519 if test -n "$cf_new_extra_cppflags" ; then
2520
2521         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2522 fi
2523
2524         cat >conftest.$ac_ext <<_ACEOF
2525 #line 2525 "configure"
2526 #include "confdefs.h"
2527
2528 #ifndef CC_HAS_PROTOS
2529 #if !defined(__STDC__) || (__STDC__ != 1)
2530 choke me
2531 #endif
2532 #endif
2533
2534 int
2535 main ()
2536 {
2537
2538         int test (int i, double x);
2539         struct s1 {int (*f) (int a);};
2540         struct s2 {int (*f) (double a);};
2541   ;
2542   return 0;
2543 }
2544 _ACEOF
2545 rm -f conftest.$ac_objext
2546 if { (eval echo "$as_me:2546: \"$ac_compile\"") >&5
2547   (eval $ac_compile) 2>&5
2548   ac_status=$?
2549   echo "$as_me:2549: \$? = $ac_status" >&5
2550   (exit $ac_status); } &&
2551          { ac_try='test -s conftest.$ac_objext'
2552   { (eval echo "$as_me:2552: \"$ac_try\"") >&5
2553   (eval $ac_try) 2>&5
2554   ac_status=$?
2555   echo "$as_me:2555: \$? = $ac_status" >&5
2556   (exit $ac_status); }; }; then
2557   cf_cv_ansi_cc="$cf_arg"; break
2558 else
2559   echo "$as_me: failed program was:" >&5
2560 cat conftest.$ac_ext >&5
2561 fi
2562 rm -f conftest.$ac_objext conftest.$ac_ext
2563 done
2564 CFLAGS="$cf_save_CFLAGS"
2565 CPPFLAGS="$cf_save_CPPFLAGS"
2566
2567 fi
2568 echo "$as_me:2568: result: $cf_cv_ansi_cc" >&5
2569 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2570
2571 if test "$cf_cv_ansi_cc" != "no"; then
2572 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2573
2574 cf_fix_cppflags=no
2575 cf_new_cflags=
2576 cf_new_cppflags=
2577 cf_new_extra_cppflags=
2578
2579 for cf_add_cflags in $cf_cv_ansi_cc
2580 do
2581 case $cf_fix_cppflags in
2582 no)
2583         case $cf_add_cflags in #(vi
2584         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2585                 case $cf_add_cflags in
2586                 -D*)
2587                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2588
2589                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2590                                 && test -z "${cf_tst_cflags}" \
2591                                 && cf_fix_cppflags=yes
2592
2593                         if test $cf_fix_cppflags = yes ; then
2594                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2595                                 continue
2596                         elif test "${cf_tst_cflags}" = "\"'" ; then
2597                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2598                                 continue
2599                         fi
2600                         ;;
2601                 esac
2602                 case "$CPPFLAGS" in
2603                 *$cf_add_cflags) #(vi
2604                         ;;
2605                 *) #(vi
2606                         case $cf_add_cflags in #(vi
2607                         -D*)
2608                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2609
2610 CPPFLAGS=`echo "$CPPFLAGS" | \
2611         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2612                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2613
2614                                 ;;
2615                         esac
2616                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2617                         ;;
2618                 esac
2619                 ;;
2620         *)
2621                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2622                 ;;
2623         esac
2624         ;;
2625 yes)
2626         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2627
2628         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2629
2630         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2631                 && test -z "${cf_tst_cflags}" \
2632                 && cf_fix_cppflags=no
2633         ;;
2634 esac
2635 done
2636
2637 if test -n "$cf_new_cflags" ; then
2638
2639         CFLAGS="$CFLAGS $cf_new_cflags"
2640 fi
2641
2642 if test -n "$cf_new_cppflags" ; then
2643
2644         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2645 fi
2646
2647 if test -n "$cf_new_extra_cppflags" ; then
2648
2649         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2650 fi
2651
2652 else
2653         cat >>confdefs.h <<\EOF
2654 #define CC_HAS_PROTOS 1
2655 EOF
2656
2657 fi
2658 fi
2659
2660 if test "$cf_cv_ansi_cc" = "no"; then
2661         { { echo "$as_me:2661: error: Your compiler does not appear to recognize prototypes.
2662 You have the following choices:
2663         a. adjust your compiler options
2664         b. get an up-to-date compiler
2665         c. use a wrapper such as unproto" >&5
2666 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2667 You have the following choices:
2668         a. adjust your compiler options
2669         b. get an up-to-date compiler
2670         c. use a wrapper such as unproto" >&2;}
2671    { (exit 1); exit 1; }; }
2672 fi
2673
2674 case $cf_cv_system_name in
2675 os2*)
2676     CFLAGS="$CFLAGS -Zmt"
2677     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2678     CXXFLAGS="$CXXFLAGS -Zmt"
2679     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2680     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2681     ac_cv_exeext=.exe
2682     ;;
2683 esac
2684
2685 PROG_EXT="$EXEEXT"
2686
2687 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2688 #define PROG_EXT "$PROG_EXT"
2689 EOF
2690
2691 if test "$cross_compiling" = yes ; then
2692   LDCONFIG=:
2693 else
2694 case "$cf_cv_system_name" in #(vi
2695 dragonfly*|freebsd*) #(vi
2696   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2697   ;;
2698 *) LDPATH=$PATH:/sbin:/usr/sbin
2699   # Extract the first word of "ldconfig", so it can be a program name with args.
2700 set dummy ldconfig; ac_word=$2
2701 echo "$as_me:2701: checking for $ac_word" >&5
2702 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2703 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2704   echo $ECHO_N "(cached) $ECHO_C" >&6
2705 else
2706   case $LDCONFIG in
2707   [\\/]* | ?:[\\/]*)
2708   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2709   ;;
2710   *)
2711   ac_save_IFS=$IFS; IFS=$ac_path_separator
2712 ac_dummy="$LDPATH"
2713 for ac_dir in $ac_dummy; do
2714   IFS=$ac_save_IFS
2715   test -z "$ac_dir" && ac_dir=.
2716   if $as_executable_p "$ac_dir/$ac_word"; then
2717    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2718    echo "$as_me:2718: found $ac_dir/$ac_word" >&5
2719    break
2720 fi
2721 done
2722
2723   ;;
2724 esac
2725 fi
2726 LDCONFIG=$ac_cv_path_LDCONFIG
2727
2728 if test -n "$LDCONFIG"; then
2729   echo "$as_me:2729: result: $LDCONFIG" >&5
2730 echo "${ECHO_T}$LDCONFIG" >&6
2731 else
2732   echo "$as_me:2732: result: no" >&5
2733 echo "${ECHO_T}no" >&6
2734 fi
2735
2736   ;;
2737 esac
2738 fi
2739
2740 echo "$as_me:2740: checking if you want to ensure bool is consistent with C++" >&5
2741 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2742
2743 # Check whether --with-cxx or --without-cxx was given.
2744 if test "${with_cxx+set}" = set; then
2745   withval="$with_cxx"
2746   cf_with_cxx=$withval
2747 else
2748   cf_with_cxx=yes
2749 fi;
2750 echo "$as_me:2750: result: $cf_with_cxx" >&5
2751 echo "${ECHO_T}$cf_with_cxx" >&6
2752 if test "X$cf_with_cxx" = Xno ; then
2753         CXX=""
2754         GXX=""
2755 else
2756         # with autoconf 2.13, we can change the error to a warning:
2757                 ac_ext=cc
2758 ac_cpp='$CXXCPP $CPPFLAGS'
2759 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2760 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2761 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2762 ac_main_return=return
2763 if test -n "$ac_tool_prefix"; then
2764   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2765   do
2766     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2767 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2768 echo "$as_me:2768: checking for $ac_word" >&5
2769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2770 if test "${ac_cv_prog_CXX+set}" = set; then
2771   echo $ECHO_N "(cached) $ECHO_C" >&6
2772 else
2773   if test -n "$CXX"; then
2774   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2775 else
2776   ac_save_IFS=$IFS; IFS=$ac_path_separator
2777 ac_dummy="$PATH"
2778 for ac_dir in $ac_dummy; do
2779   IFS=$ac_save_IFS
2780   test -z "$ac_dir" && ac_dir=.
2781   $as_executable_p "$ac_dir/$ac_word" || continue
2782 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2783 echo "$as_me:2783: found $ac_dir/$ac_word" >&5
2784 break
2785 done
2786
2787 fi
2788 fi
2789 CXX=$ac_cv_prog_CXX
2790 if test -n "$CXX"; then
2791   echo "$as_me:2791: result: $CXX" >&5
2792 echo "${ECHO_T}$CXX" >&6
2793 else
2794   echo "$as_me:2794: result: no" >&5
2795 echo "${ECHO_T}no" >&6
2796 fi
2797
2798     test -n "$CXX" && break
2799   done
2800 fi
2801 if test -z "$CXX"; then
2802   ac_ct_CXX=$CXX
2803   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2804 do
2805   # Extract the first word of "$ac_prog", so it can be a program name with args.
2806 set dummy $ac_prog; ac_word=$2
2807 echo "$as_me:2807: checking for $ac_word" >&5
2808 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2809 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2810   echo $ECHO_N "(cached) $ECHO_C" >&6
2811 else
2812   if test -n "$ac_ct_CXX"; then
2813   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2814 else
2815   ac_save_IFS=$IFS; IFS=$ac_path_separator
2816 ac_dummy="$PATH"
2817 for ac_dir in $ac_dummy; do
2818   IFS=$ac_save_IFS
2819   test -z "$ac_dir" && ac_dir=.
2820   $as_executable_p "$ac_dir/$ac_word" || continue
2821 ac_cv_prog_ac_ct_CXX="$ac_prog"
2822 echo "$as_me:2822: found $ac_dir/$ac_word" >&5
2823 break
2824 done
2825
2826 fi
2827 fi
2828 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2829 if test -n "$ac_ct_CXX"; then
2830   echo "$as_me:2830: result: $ac_ct_CXX" >&5
2831 echo "${ECHO_T}$ac_ct_CXX" >&6
2832 else
2833   echo "$as_me:2833: result: no" >&5
2834 echo "${ECHO_T}no" >&6
2835 fi
2836
2837   test -n "$ac_ct_CXX" && break
2838 done
2839 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2840
2841   CXX=$ac_ct_CXX
2842 fi
2843
2844 # Provide some information about the compiler.
2845 echo "$as_me:2845:" \
2846      "checking for C++ compiler version" >&5
2847 ac_compiler=`set X $ac_compile; echo $2`
2848 { (eval echo "$as_me:2848: \"$ac_compiler --version </dev/null >&5\"") >&5
2849   (eval $ac_compiler --version </dev/null >&5) 2>&5
2850   ac_status=$?
2851   echo "$as_me:2851: \$? = $ac_status" >&5
2852   (exit $ac_status); }
2853 { (eval echo "$as_me:2853: \"$ac_compiler -v </dev/null >&5\"") >&5
2854   (eval $ac_compiler -v </dev/null >&5) 2>&5
2855   ac_status=$?
2856   echo "$as_me:2856: \$? = $ac_status" >&5
2857   (exit $ac_status); }
2858 { (eval echo "$as_me:2858: \"$ac_compiler -V </dev/null >&5\"") >&5
2859   (eval $ac_compiler -V </dev/null >&5) 2>&5
2860   ac_status=$?
2861   echo "$as_me:2861: \$? = $ac_status" >&5
2862   (exit $ac_status); }
2863
2864 echo "$as_me:2864: checking whether we are using the GNU C++ compiler" >&5
2865 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2866 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2867   echo $ECHO_N "(cached) $ECHO_C" >&6
2868 else
2869   cat >conftest.$ac_ext <<_ACEOF
2870 #line 2870 "configure"
2871 #include "confdefs.h"
2872
2873 int
2874 main ()
2875 {
2876 #ifndef __GNUC__
2877        choke me
2878 #endif
2879
2880   ;
2881   return 0;
2882 }
2883 _ACEOF
2884 rm -f conftest.$ac_objext
2885 if { (eval echo "$as_me:2885: \"$ac_compile\"") >&5
2886   (eval $ac_compile) 2>&5
2887   ac_status=$?
2888   echo "$as_me:2888: \$? = $ac_status" >&5
2889   (exit $ac_status); } &&
2890          { ac_try='test -s conftest.$ac_objext'
2891   { (eval echo "$as_me:2891: \"$ac_try\"") >&5
2892   (eval $ac_try) 2>&5
2893   ac_status=$?
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit $ac_status); }; }; then
2896   ac_compiler_gnu=yes
2897 else
2898   echo "$as_me: failed program was:" >&5
2899 cat conftest.$ac_ext >&5
2900 ac_compiler_gnu=no
2901 fi
2902 rm -f conftest.$ac_objext conftest.$ac_ext
2903 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2904
2905 fi
2906 echo "$as_me:2906: result: $ac_cv_cxx_compiler_gnu" >&5
2907 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2908 GXX=`test $ac_compiler_gnu = yes && echo yes`
2909 ac_test_CXXFLAGS=${CXXFLAGS+set}
2910 ac_save_CXXFLAGS=$CXXFLAGS
2911 CXXFLAGS="-g"
2912 echo "$as_me:2912: checking whether $CXX accepts -g" >&5
2913 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2914 if test "${ac_cv_prog_cxx_g+set}" = set; then
2915   echo $ECHO_N "(cached) $ECHO_C" >&6
2916 else
2917   cat >conftest.$ac_ext <<_ACEOF
2918 #line 2918 "configure"
2919 #include "confdefs.h"
2920
2921 int
2922 main ()
2923 {
2924
2925   ;
2926   return 0;
2927 }
2928 _ACEOF
2929 rm -f conftest.$ac_objext
2930 if { (eval echo "$as_me:2930: \"$ac_compile\"") >&5
2931   (eval $ac_compile) 2>&5
2932   ac_status=$?
2933   echo "$as_me:2933: \$? = $ac_status" >&5
2934   (exit $ac_status); } &&
2935          { ac_try='test -s conftest.$ac_objext'
2936   { (eval echo "$as_me:2936: \"$ac_try\"") >&5
2937   (eval $ac_try) 2>&5
2938   ac_status=$?
2939   echo "$as_me:2939: \$? = $ac_status" >&5
2940   (exit $ac_status); }; }; then
2941   ac_cv_prog_cxx_g=yes
2942 else
2943   echo "$as_me: failed program was:" >&5
2944 cat conftest.$ac_ext >&5
2945 ac_cv_prog_cxx_g=no
2946 fi
2947 rm -f conftest.$ac_objext conftest.$ac_ext
2948 fi
2949 echo "$as_me:2949: result: $ac_cv_prog_cxx_g" >&5
2950 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2951 if test "$ac_test_CXXFLAGS" = set; then
2952   CXXFLAGS=$ac_save_CXXFLAGS
2953 elif test $ac_cv_prog_cxx_g = yes; then
2954   if test "$GXX" = yes; then
2955     CXXFLAGS="-g -O2"
2956   else
2957     CXXFLAGS="-g"
2958   fi
2959 else
2960   if test "$GXX" = yes; then
2961     CXXFLAGS="-O2"
2962   else
2963     CXXFLAGS=
2964   fi
2965 fi
2966 for ac_declaration in \
2967    ''\
2968    '#include <stdlib.h>' \
2969    'extern "C" void std::exit (int) throw (); using std::exit;' \
2970    'extern "C" void std::exit (int); using std::exit;' \
2971    'extern "C" void exit (int) throw ();' \
2972    'extern "C" void exit (int);' \
2973    'void exit (int);'
2974 do
2975   cat >conftest.$ac_ext <<_ACEOF
2976 #line 2976 "configure"
2977 #include "confdefs.h"
2978 #include <stdlib.h>
2979 $ac_declaration
2980 int
2981 main ()
2982 {
2983 exit (42);
2984   ;
2985   return 0;
2986 }
2987 _ACEOF
2988 rm -f conftest.$ac_objext
2989 if { (eval echo "$as_me:2989: \"$ac_compile\"") >&5
2990   (eval $ac_compile) 2>&5
2991   ac_status=$?
2992   echo "$as_me:2992: \$? = $ac_status" >&5
2993   (exit $ac_status); } &&
2994          { ac_try='test -s conftest.$ac_objext'
2995   { (eval echo "$as_me:2995: \"$ac_try\"") >&5
2996   (eval $ac_try) 2>&5
2997   ac_status=$?
2998   echo "$as_me:2998: \$? = $ac_status" >&5
2999   (exit $ac_status); }; }; then
3000   :
3001 else
3002   echo "$as_me: failed program was:" >&5
3003 cat conftest.$ac_ext >&5
3004 continue
3005 fi
3006 rm -f conftest.$ac_objext conftest.$ac_ext
3007   cat >conftest.$ac_ext <<_ACEOF
3008 #line 3008 "configure"
3009 #include "confdefs.h"
3010 $ac_declaration
3011 int
3012 main ()
3013 {
3014 exit (42);
3015   ;
3016   return 0;
3017 }
3018 _ACEOF
3019 rm -f conftest.$ac_objext
3020 if { (eval echo "$as_me:3020: \"$ac_compile\"") >&5
3021   (eval $ac_compile) 2>&5
3022   ac_status=$?
3023   echo "$as_me:3023: \$? = $ac_status" >&5
3024   (exit $ac_status); } &&
3025          { ac_try='test -s conftest.$ac_objext'
3026   { (eval echo "$as_me:3026: \"$ac_try\"") >&5
3027   (eval $ac_try) 2>&5
3028   ac_status=$?
3029   echo "$as_me:3029: \$? = $ac_status" >&5
3030   (exit $ac_status); }; }; then
3031   break
3032 else
3033   echo "$as_me: failed program was:" >&5
3034 cat conftest.$ac_ext >&5
3035 fi
3036 rm -f conftest.$ac_objext conftest.$ac_ext
3037 done
3038 rm -f conftest*
3039 if test -n "$ac_declaration"; then
3040   echo '#ifdef __cplusplus' >>confdefs.h
3041   echo $ac_declaration      >>confdefs.h
3042   echo '#endif'             >>confdefs.h
3043 fi
3044
3045 ac_ext=c
3046 ac_cpp='$CPP $CPPFLAGS'
3047 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3048 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3049 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3050 ac_main_return=return
3051
3052                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3053         if test "$CXX" = "g++" ; then
3054                 # Extract the first word of "g++", so it can be a program name with args.
3055 set dummy g++; ac_word=$2
3056 echo "$as_me:3056: checking for $ac_word" >&5
3057 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3058 if test "${ac_cv_path_CXX+set}" = set; then
3059   echo $ECHO_N "(cached) $ECHO_C" >&6
3060 else
3061   case $CXX in
3062   [\\/]* | ?:[\\/]*)
3063   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3064   ;;
3065   *)
3066   ac_save_IFS=$IFS; IFS=$ac_path_separator
3067 ac_dummy="$PATH"
3068 for ac_dir in $ac_dummy; do
3069   IFS=$ac_save_IFS
3070   test -z "$ac_dir" && ac_dir=.
3071   if $as_executable_p "$ac_dir/$ac_word"; then
3072    ac_cv_path_CXX="$ac_dir/$ac_word"
3073    echo "$as_me:3073: found $ac_dir/$ac_word" >&5
3074    break
3075 fi
3076 done
3077
3078   ;;
3079 esac
3080 fi
3081 CXX=$ac_cv_path_CXX
3082
3083 if test -n "$CXX"; then
3084   echo "$as_me:3084: result: $CXX" >&5
3085 echo "${ECHO_T}$CXX" >&6
3086 else
3087   echo "$as_me:3087: result: no" >&5
3088 echo "${ECHO_T}no" >&6
3089 fi
3090
3091         fi
3092         if test "$CXX" = "g++" ; then
3093                 { echo "$as_me:3093: WARNING: ignoring hardcoded g++" >&5
3094 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3095                 cf_with_cxx=no; CXX=""; GXX="";
3096         fi
3097 fi
3098
3099 GXX_VERSION=none
3100 if test "$GXX" = yes; then
3101         echo "$as_me:3101: checking version of g++" >&5
3102 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3103         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3104         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3105         echo "$as_me:3105: result: $GXX_VERSION" >&5
3106 echo "${ECHO_T}$GXX_VERSION" >&6
3107 fi
3108
3109 case $GXX_VERSION in
3110 1*|2.[0-6]*)
3111         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3112         # cf_cxx_library=no
3113         { echo "$as_me:3113: WARNING: templates do not work" >&5
3114 echo "$as_me: WARNING: templates do not work" >&2;}
3115         ;;
3116 esac
3117
3118 echo "$as_me:3118: checking if you want to build C++ binding and demo" >&5
3119 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3120
3121 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3122 if test "${with_cxx_binding+set}" = set; then
3123   withval="$with_cxx_binding"
3124   cf_with_cxx_binding=$withval
3125 else
3126   cf_with_cxx_binding=$cf_with_cxx
3127 fi;
3128 echo "$as_me:3128: result: $cf_with_cxx_binding" >&5
3129 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3130
3131 echo "$as_me:3131: checking if you want to build with Ada95" >&5
3132 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3133
3134 # Check whether --with-ada or --without-ada was given.
3135 if test "${with_ada+set}" = set; then
3136   withval="$with_ada"
3137   cf_with_ada=$withval
3138 else
3139   cf_with_ada=yes
3140 fi;
3141 echo "$as_me:3141: result: $cf_with_ada" >&5
3142 echo "${ECHO_T}$cf_with_ada" >&6
3143
3144 echo "$as_me:3144: checking if you want to install manpages" >&5
3145 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3146
3147 # Check whether --with-manpages or --without-manpages was given.
3148 if test "${with_manpages+set}" = set; then
3149   withval="$with_manpages"
3150   cf_with_manpages=$withval
3151 else
3152   cf_with_manpages=yes
3153 fi;
3154 echo "$as_me:3154: result: $cf_with_manpages" >&5
3155 echo "${ECHO_T}$cf_with_manpages" >&6
3156
3157 echo "$as_me:3157: checking if you want to build programs such as tic" >&5
3158 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3159
3160 # Check whether --with-progs or --without-progs was given.
3161 if test "${with_progs+set}" = set; then
3162   withval="$with_progs"
3163   cf_with_progs=$withval
3164 else
3165   cf_with_progs=yes
3166 fi;
3167 echo "$as_me:3167: result: $cf_with_progs" >&5
3168 echo "${ECHO_T}$cf_with_progs" >&6
3169
3170 echo "$as_me:3170: checking if you wish to install curses.h" >&5
3171 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3172
3173 # Check whether --with-curses-h or --without-curses-h was given.
3174 if test "${with_curses_h+set}" = set; then
3175   withval="$with_curses_h"
3176   with_curses_h=$withval
3177 else
3178   with_curses_h=yes
3179 fi;
3180 echo "$as_me:3180: result: $with_curses_h" >&5
3181 echo "${ECHO_T}$with_curses_h" >&6
3182
3183 modules_to_build="ncurses"
3184 if test "X$cf_with_progs" != Xno ; then
3185 modules_to_build="$modules_to_build progs tack"
3186 fi
3187 modules_to_build="$modules_to_build panel menu form"
3188
3189 test "$program_prefix" != NONE &&
3190   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3191 # Use a double $ so make ignores it.
3192 test "$program_suffix" != NONE &&
3193   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3194 # Double any \ or $.  echo might interpret backslashes.
3195 # By default was `s,x,x', remove it if useless.
3196 cat <<\_ACEOF >conftest.sed
3197 s/[\\$]/&&/g;s/;s,x,x,$//
3198 _ACEOF
3199 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3200 rm conftest.sed
3201
3202 for ac_prog in mawk gawk nawk awk
3203 do
3204   # Extract the first word of "$ac_prog", so it can be a program name with args.
3205 set dummy $ac_prog; ac_word=$2
3206 echo "$as_me:3206: checking for $ac_word" >&5
3207 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3208 if test "${ac_cv_prog_AWK+set}" = set; then
3209   echo $ECHO_N "(cached) $ECHO_C" >&6
3210 else
3211   if test -n "$AWK"; then
3212   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3213 else
3214   ac_save_IFS=$IFS; IFS=$ac_path_separator
3215 ac_dummy="$PATH"
3216 for ac_dir in $ac_dummy; do
3217   IFS=$ac_save_IFS
3218   test -z "$ac_dir" && ac_dir=.
3219   $as_executable_p "$ac_dir/$ac_word" || continue
3220 ac_cv_prog_AWK="$ac_prog"
3221 echo "$as_me:3221: found $ac_dir/$ac_word" >&5
3222 break
3223 done
3224
3225 fi
3226 fi
3227 AWK=$ac_cv_prog_AWK
3228 if test -n "$AWK"; then
3229   echo "$as_me:3229: result: $AWK" >&5
3230 echo "${ECHO_T}$AWK" >&6
3231 else
3232   echo "$as_me:3232: result: no" >&5
3233 echo "${ECHO_T}no" >&6
3234 fi
3235
3236   test -n "$AWK" && break
3237 done
3238
3239 test -z "$AWK" && { { echo "$as_me:3239: error: No awk program found" >&5
3240 echo "$as_me: error: No awk program found" >&2;}
3241    { (exit 1); exit 1; }; }
3242
3243 echo "$as_me:3243: checking for egrep" >&5
3244 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3245 if test "${ac_cv_prog_egrep+set}" = set; then
3246   echo $ECHO_N "(cached) $ECHO_C" >&6
3247 else
3248   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3249     then ac_cv_prog_egrep='grep -E'
3250     else ac_cv_prog_egrep='egrep'
3251     fi
3252 fi
3253 echo "$as_me:3253: result: $ac_cv_prog_egrep" >&5
3254 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3255  EGREP=$ac_cv_prog_egrep
3256
3257 test -z "$EGREP" && { { echo "$as_me:3257: error: No egrep program found" >&5
3258 echo "$as_me: error: No egrep program found" >&2;}
3259    { (exit 1); exit 1; }; }
3260
3261 # Find a good install program.  We prefer a C program (faster),
3262 # so one script is as good as another.  But avoid the broken or
3263 # incompatible versions:
3264 # SysV /etc/install, /usr/sbin/install
3265 # SunOS /usr/etc/install
3266 # IRIX /sbin/install
3267 # AIX /bin/install
3268 # AmigaOS /C/install, which installs bootblocks on floppy discs
3269 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3270 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3271 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3272 # ./install, which can be erroneously created by make from ./install.sh.
3273 echo "$as_me:3273: checking for a BSD compatible install" >&5
3274 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3275 if test -z "$INSTALL"; then
3276 if test "${ac_cv_path_install+set}" = set; then
3277   echo $ECHO_N "(cached) $ECHO_C" >&6
3278 else
3279     ac_save_IFS=$IFS; IFS=$ac_path_separator
3280   for ac_dir in $PATH; do
3281     IFS=$ac_save_IFS
3282     # Account for people who put trailing slashes in PATH elements.
3283     case $ac_dir/ in
3284     / | ./ | .// | /cC/* \
3285     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3286     | /usr/ucb/* ) ;;
3287     *)
3288       # OSF1 and SCO ODT 3.0 have their own names for install.
3289       # Don't use installbsd from OSF since it installs stuff as root
3290       # by default.
3291       for ac_prog in ginstall scoinst install; do
3292         if $as_executable_p "$ac_dir/$ac_prog"; then
3293           if test $ac_prog = install &&
3294             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3295             # AIX install.  It has an incompatible calling convention.
3296             :
3297           elif test $ac_prog = install &&
3298             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3299             # program-specific install script used by HP pwplus--don't use.
3300             :
3301           else
3302             ac_cv_path_install="$ac_dir/$ac_prog -c"
3303             break 2
3304           fi
3305         fi
3306       done
3307       ;;
3308     esac
3309   done
3310
3311 fi
3312   if test "${ac_cv_path_install+set}" = set; then
3313     INSTALL=$ac_cv_path_install
3314   else
3315     # As a last resort, use the slow shell script.  We don't cache a
3316     # path for INSTALL within a source directory, because that will
3317     # break other packages using the cache if that directory is
3318     # removed, or if the path is relative.
3319     INSTALL=$ac_install_sh
3320   fi
3321 fi
3322 echo "$as_me:3322: result: $INSTALL" >&5
3323 echo "${ECHO_T}$INSTALL" >&6
3324
3325 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3326 # It thinks the first close brace ends the variable substitution.
3327 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3328
3329 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3330
3331 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3332
3333 case $INSTALL in
3334 /*)
3335   ;;
3336 *)
3337   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3338   test -z "$cf_dir" && cf_dir=.
3339   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3340   ;;
3341 esac
3342
3343 for ac_prog in tdlint lint alint splint lclint
3344 do
3345   # Extract the first word of "$ac_prog", so it can be a program name with args.
3346 set dummy $ac_prog; ac_word=$2
3347 echo "$as_me:3347: checking for $ac_word" >&5
3348 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3349 if test "${ac_cv_prog_LINT+set}" = set; then
3350   echo $ECHO_N "(cached) $ECHO_C" >&6
3351 else
3352   if test -n "$LINT"; then
3353   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3354 else
3355   ac_save_IFS=$IFS; IFS=$ac_path_separator
3356 ac_dummy="$PATH"
3357 for ac_dir in $ac_dummy; do
3358   IFS=$ac_save_IFS
3359   test -z "$ac_dir" && ac_dir=.
3360   $as_executable_p "$ac_dir/$ac_word" || continue
3361 ac_cv_prog_LINT="$ac_prog"
3362 echo "$as_me:3362: found $ac_dir/$ac_word" >&5
3363 break
3364 done
3365
3366 fi
3367 fi
3368 LINT=$ac_cv_prog_LINT
3369 if test -n "$LINT"; then
3370   echo "$as_me:3370: result: $LINT" >&5
3371 echo "${ECHO_T}$LINT" >&6
3372 else
3373   echo "$as_me:3373: result: no" >&5
3374 echo "${ECHO_T}no" >&6
3375 fi
3376
3377   test -n "$LINT" && break
3378 done
3379
3380 echo "$as_me:3380: checking whether ln -s works" >&5
3381 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3382 LN_S=$as_ln_s
3383 if test "$LN_S" = "ln -s"; then
3384   echo "$as_me:3384: result: yes" >&5
3385 echo "${ECHO_T}yes" >&6
3386 else
3387   echo "$as_me:3387: result: no, using $LN_S" >&5
3388 echo "${ECHO_T}no, using $LN_S" >&6
3389 fi
3390
3391 echo "$as_me:3391: checking for long file names" >&5
3392 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3393 if test "${ac_cv_sys_long_file_names+set}" = set; then
3394   echo $ECHO_N "(cached) $ECHO_C" >&6
3395 else
3396   ac_cv_sys_long_file_names=yes
3397 # Test for long file names in all the places we know might matter:
3398 #      .                the current directory, where building will happen
3399 #      $prefix/lib      where we will be installing things
3400 #      $exec_prefix/lib likewise
3401 # eval it to expand exec_prefix.
3402 #      $TMPDIR          if set, where it might want to write temporary files
3403 # if $TMPDIR is not set:
3404 #      /tmp             where it might want to write temporary files
3405 #      /var/tmp         likewise
3406 #      /usr/tmp         likewise
3407 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3408   ac_tmpdirs=$TMPDIR
3409 else
3410   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3411 fi
3412 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3413   test -d $ac_dir || continue
3414   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3415   ac_xdir=$ac_dir/cf$$
3416   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3417   ac_tf1=$ac_xdir/conftest9012345
3418   ac_tf2=$ac_xdir/conftest9012346
3419   (echo 1 >$ac_tf1) 2>/dev/null
3420   (echo 2 >$ac_tf2) 2>/dev/null
3421   ac_val=`cat $ac_tf1 2>/dev/null`
3422   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3423     ac_cv_sys_long_file_names=no
3424     rm -rf $ac_xdir 2>/dev/null
3425     break
3426   fi
3427   rm -rf $ac_xdir 2>/dev/null
3428 done
3429 fi
3430 echo "$as_me:3430: result: $ac_cv_sys_long_file_names" >&5
3431 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3432 if test $ac_cv_sys_long_file_names = yes; then
3433
3434 cat >>confdefs.h <<\EOF
3435 #define HAVE_LONG_FILE_NAMES 1
3436 EOF
3437
3438 fi
3439
3440 # if we find pkg-config, check if we should install the ".pc" files.
3441
3442 echo "$as_me:3442: checking if you want to use pkg-config" >&5
3443 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3444
3445 # Check whether --with-pkg-config or --without-pkg-config was given.
3446 if test "${with_pkg_config+set}" = set; then
3447   withval="$with_pkg_config"
3448   cf_pkg_config=$withval
3449 else
3450   cf_pkg_config=yes
3451 fi;
3452 echo "$as_me:3452: result: $cf_pkg_config" >&5
3453 echo "${ECHO_T}$cf_pkg_config" >&6
3454
3455 case $cf_pkg_config in #(vi
3456 no) #(vi
3457         PKG_CONFIG=none
3458         ;;
3459 yes) #(vi
3460         # Extract the first word of "pkg-config", so it can be a program name with args.
3461 set dummy pkg-config; ac_word=$2
3462 echo "$as_me:3462: checking for $ac_word" >&5
3463 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3464 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3465   echo $ECHO_N "(cached) $ECHO_C" >&6
3466 else
3467   case $PKG_CONFIG in
3468   [\\/]* | ?:[\\/]*)
3469   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3470   ;;
3471   *)
3472   ac_save_IFS=$IFS; IFS=$ac_path_separator
3473 ac_dummy="$PATH"
3474 for ac_dir in $ac_dummy; do
3475   IFS=$ac_save_IFS
3476   test -z "$ac_dir" && ac_dir=.
3477   if $as_executable_p "$ac_dir/$ac_word"; then
3478    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3479    echo "$as_me:3479: found $ac_dir/$ac_word" >&5
3480    break
3481 fi
3482 done
3483
3484   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3485   ;;
3486 esac
3487 fi
3488 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3489
3490 if test -n "$PKG_CONFIG"; then
3491   echo "$as_me:3491: result: $PKG_CONFIG" >&5
3492 echo "${ECHO_T}$PKG_CONFIG" >&6
3493 else
3494   echo "$as_me:3494: result: no" >&5
3495 echo "${ECHO_T}no" >&6
3496 fi
3497
3498         ;;
3499 *)
3500         PKG_CONFIG=$withval
3501         ;;
3502 esac
3503
3504 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3505 if test "$PKG_CONFIG" != none ; then
3506
3507 if test "x$prefix" != xNONE; then
3508   cf_path_syntax="$prefix"
3509 else
3510   cf_path_syntax="$ac_default_prefix"
3511 fi
3512
3513 case ".$PKG_CONFIG" in #(vi
3514 .\$\(*\)*|.\'*\'*) #(vi
3515   ;;
3516 ..|./*|.\\*) #(vi
3517   ;;
3518 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3519   ;;
3520 .\${*prefix}*) #(vi
3521   eval PKG_CONFIG="$PKG_CONFIG"
3522   case ".$PKG_CONFIG" in #(vi
3523   .NONE/*)
3524     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3525     ;;
3526   esac
3527   ;; #(vi
3528 .no|.NONE/*)
3529   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3530   ;;
3531 *)
3532   { { echo "$as_me:3532: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3533 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3534    { (exit 1); exit 1; }; }
3535   ;;
3536 esac
3537
3538 fi
3539
3540 if test "$PKG_CONFIG" != no ; then
3541         echo "$as_me:3541: checking if we should install .pc files for $PKG_CONFIG" >&5
3542 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3543
3544         # Leave this as something that can be overridden in the environment.
3545         if test -z "$PKG_CONFIG_LIBDIR" ; then
3546                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3547         fi
3548         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3549         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3550
3551 # Check whether --enable-pc-files or --disable-pc-files was given.
3552 if test "${enable_pc_files+set}" = set; then
3553   enableval="$enable_pc_files"
3554   enable_pc_files=$enableval
3555 else
3556   enable_pc_files=no
3557 fi;
3558                 echo "$as_me:3558: result: $enable_pc_files" >&5
3559 echo "${ECHO_T}$enable_pc_files" >&6
3560         else
3561                 echo "$as_me:3561: result: no" >&5
3562 echo "${ECHO_T}no" >&6
3563                 { echo "$as_me:3563: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3564 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3565                 enable_pc_files=no
3566         fi
3567 fi
3568
3569 echo "$as_me:3569: checking if we should assume mixed-case filenames" >&5
3570 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3571
3572 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3573 if test "${enable_mixed_case+set}" = set; then
3574   enableval="$enable_mixed_case"
3575   enable_mixedcase=$enableval
3576 else
3577   enable_mixedcase=auto
3578 fi;
3579 echo "$as_me:3579: result: $enable_mixedcase" >&5
3580 echo "${ECHO_T}$enable_mixedcase" >&6
3581 if test "$enable_mixedcase" = "auto" ; then
3582
3583 echo "$as_me:3583: checking if filesystem supports mixed-case filenames" >&5
3584 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3585 if test "${cf_cv_mixedcase+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588
3589 if test "$cross_compiling" = yes ; then
3590         case $target_alias in #(vi
3591         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3592                 cf_cv_mixedcase=no
3593                 ;;
3594         *)
3595                 cf_cv_mixedcase=yes
3596                 ;;
3597         esac
3598 else
3599         rm -f conftest CONFTEST
3600         echo test >conftest
3601         if test -f CONFTEST ; then
3602                 cf_cv_mixedcase=no
3603         else
3604                 cf_cv_mixedcase=yes
3605         fi
3606         rm -f conftest CONFTEST
3607 fi
3608
3609 fi
3610 echo "$as_me:3610: result: $cf_cv_mixedcase" >&5
3611 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3612 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3613 #define MIXEDCASE_FILENAMES 1
3614 EOF
3615
3616 else
3617     cf_cv_mixedcase=$enable_mixedcase
3618     if test "$enable_mixedcase" = "yes" ; then
3619         cat >>confdefs.h <<\EOF
3620 #define MIXEDCASE_FILENAMES 1
3621 EOF
3622
3623     fi
3624 fi
3625
3626 # do this after mixed-case option (tags/TAGS is not as important as tic).
3627 echo "$as_me:3627: checking whether ${MAKE-make} sets \${MAKE}" >&5
3628 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3629 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3630 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3631   echo $ECHO_N "(cached) $ECHO_C" >&6
3632 else
3633   cat >conftest.make <<\EOF
3634 all:
3635         @echo 'ac_maketemp="${MAKE}"'
3636 EOF
3637 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3638 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3639 if test -n "$ac_maketemp"; then
3640   eval ac_cv_prog_make_${ac_make}_set=yes
3641 else
3642   eval ac_cv_prog_make_${ac_make}_set=no
3643 fi
3644 rm -f conftest.make
3645 fi
3646 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3647   echo "$as_me:3647: result: yes" >&5
3648 echo "${ECHO_T}yes" >&6
3649   SET_MAKE=
3650 else
3651   echo "$as_me:3651: result: no" >&5
3652 echo "${ECHO_T}no" >&6
3653   SET_MAKE="MAKE=${MAKE-make}"
3654 fi
3655
3656 for ac_prog in exctags ctags
3657 do
3658   # Extract the first word of "$ac_prog", so it can be a program name with args.
3659 set dummy $ac_prog; ac_word=$2
3660 echo "$as_me:3660: checking for $ac_word" >&5
3661 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3662 if test "${ac_cv_prog_CTAGS+set}" = set; then
3663   echo $ECHO_N "(cached) $ECHO_C" >&6
3664 else
3665   if test -n "$CTAGS"; then
3666   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3667 else
3668   ac_save_IFS=$IFS; IFS=$ac_path_separator
3669 ac_dummy="$PATH"
3670 for ac_dir in $ac_dummy; do
3671   IFS=$ac_save_IFS
3672   test -z "$ac_dir" && ac_dir=.
3673   $as_executable_p "$ac_dir/$ac_word" || continue
3674 ac_cv_prog_CTAGS="$ac_prog"
3675 echo "$as_me:3675: found $ac_dir/$ac_word" >&5
3676 break
3677 done
3678
3679 fi
3680 fi
3681 CTAGS=$ac_cv_prog_CTAGS
3682 if test -n "$CTAGS"; then
3683   echo "$as_me:3683: result: $CTAGS" >&5
3684 echo "${ECHO_T}$CTAGS" >&6
3685 else
3686   echo "$as_me:3686: result: no" >&5
3687 echo "${ECHO_T}no" >&6
3688 fi
3689
3690   test -n "$CTAGS" && break
3691 done
3692
3693 for ac_prog in exetags etags
3694 do
3695   # Extract the first word of "$ac_prog", so it can be a program name with args.
3696 set dummy $ac_prog; ac_word=$2
3697 echo "$as_me:3697: checking for $ac_word" >&5
3698 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3699 if test "${ac_cv_prog_ETAGS+set}" = set; then
3700   echo $ECHO_N "(cached) $ECHO_C" >&6
3701 else
3702   if test -n "$ETAGS"; then
3703   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3704 else
3705   ac_save_IFS=$IFS; IFS=$ac_path_separator
3706 ac_dummy="$PATH"
3707 for ac_dir in $ac_dummy; do
3708   IFS=$ac_save_IFS
3709   test -z "$ac_dir" && ac_dir=.
3710   $as_executable_p "$ac_dir/$ac_word" || continue
3711 ac_cv_prog_ETAGS="$ac_prog"
3712 echo "$as_me:3712: found $ac_dir/$ac_word" >&5
3713 break
3714 done
3715
3716 fi
3717 fi
3718 ETAGS=$ac_cv_prog_ETAGS
3719 if test -n "$ETAGS"; then
3720   echo "$as_me:3720: result: $ETAGS" >&5
3721 echo "${ECHO_T}$ETAGS" >&6
3722 else
3723   echo "$as_me:3723: result: no" >&5
3724 echo "${ECHO_T}no" >&6
3725 fi
3726
3727   test -n "$ETAGS" && break
3728 done
3729
3730 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3731 set dummy ${CTAGS-ctags}; ac_word=$2
3732 echo "$as_me:3732: checking for $ac_word" >&5
3733 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3734 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3735   echo $ECHO_N "(cached) $ECHO_C" >&6
3736 else
3737   if test -n "$MAKE_LOWER_TAGS"; then
3738   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3739 else
3740   ac_save_IFS=$IFS; IFS=$ac_path_separator
3741 ac_dummy="$PATH"
3742 for ac_dir in $ac_dummy; do
3743   IFS=$ac_save_IFS
3744   test -z "$ac_dir" && ac_dir=.
3745   $as_executable_p "$ac_dir/$ac_word" || continue
3746 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3747 echo "$as_me:3747: found $ac_dir/$ac_word" >&5
3748 break
3749 done
3750
3751   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3752 fi
3753 fi
3754 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3755 if test -n "$MAKE_LOWER_TAGS"; then
3756   echo "$as_me:3756: result: $MAKE_LOWER_TAGS" >&5
3757 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3758 else
3759   echo "$as_me:3759: result: no" >&5
3760 echo "${ECHO_T}no" >&6
3761 fi
3762
3763 if test "$cf_cv_mixedcase" = yes ; then
3764         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3765 set dummy ${ETAGS-etags}; ac_word=$2
3766 echo "$as_me:3766: checking for $ac_word" >&5
3767 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3768 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3769   echo $ECHO_N "(cached) $ECHO_C" >&6
3770 else
3771   if test -n "$MAKE_UPPER_TAGS"; then
3772   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3773 else
3774   ac_save_IFS=$IFS; IFS=$ac_path_separator
3775 ac_dummy="$PATH"
3776 for ac_dir in $ac_dummy; do
3777   IFS=$ac_save_IFS
3778   test -z "$ac_dir" && ac_dir=.
3779   $as_executable_p "$ac_dir/$ac_word" || continue
3780 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3781 echo "$as_me:3781: found $ac_dir/$ac_word" >&5
3782 break
3783 done
3784
3785   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3786 fi
3787 fi
3788 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3789 if test -n "$MAKE_UPPER_TAGS"; then
3790   echo "$as_me:3790: result: $MAKE_UPPER_TAGS" >&5
3791 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3792 else
3793   echo "$as_me:3793: result: no" >&5
3794 echo "${ECHO_T}no" >&6
3795 fi
3796
3797 else
3798         MAKE_UPPER_TAGS=no
3799 fi
3800
3801 if test "$MAKE_UPPER_TAGS" = yes ; then
3802         MAKE_UPPER_TAGS=
3803 else
3804         MAKE_UPPER_TAGS="#"
3805 fi
3806
3807 if test "$MAKE_LOWER_TAGS" = yes ; then
3808         MAKE_LOWER_TAGS=
3809 else
3810         MAKE_LOWER_TAGS="#"
3811 fi
3812
3813 echo "$as_me:3813: checking for makeflags variable" >&5
3814 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3815 if test "${cf_cv_makeflags+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818
3819         cf_cv_makeflags=''
3820         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3821         do
3822                 cat >cf_makeflags.tmp <<CF_EOF
3823 SHELL = /bin/sh
3824 all :
3825         @ echo '.$cf_option'
3826 CF_EOF
3827                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3828                 case "$cf_result" in
3829                 .*k)
3830                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3831                         case "$cf_result" in
3832                         .*CC=*) cf_cv_makeflags=
3833                                 ;;
3834                         *)      cf_cv_makeflags=$cf_option
3835                                 ;;
3836                         esac
3837                         break
3838                         ;;
3839                 .-)     ;;
3840                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3841                         ;;
3842                 esac
3843         done
3844         rm -f cf_makeflags.tmp
3845
3846 fi
3847 echo "$as_me:3847: result: $cf_cv_makeflags" >&5
3848 echo "${ECHO_T}$cf_cv_makeflags" >&6
3849
3850 if test -n "$ac_tool_prefix"; then
3851   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3852 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3853 echo "$as_me:3853: checking for $ac_word" >&5
3854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3855 if test "${ac_cv_prog_RANLIB+set}" = set; then
3856   echo $ECHO_N "(cached) $ECHO_C" >&6
3857 else
3858   if test -n "$RANLIB"; then
3859   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3860 else
3861   ac_save_IFS=$IFS; IFS=$ac_path_separator
3862 ac_dummy="$PATH"
3863 for ac_dir in $ac_dummy; do
3864   IFS=$ac_save_IFS
3865   test -z "$ac_dir" && ac_dir=.
3866   $as_executable_p "$ac_dir/$ac_word" || continue
3867 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3868 echo "$as_me:3868: found $ac_dir/$ac_word" >&5
3869 break
3870 done
3871
3872 fi
3873 fi
3874 RANLIB=$ac_cv_prog_RANLIB
3875 if test -n "$RANLIB"; then
3876   echo "$as_me:3876: result: $RANLIB" >&5
3877 echo "${ECHO_T}$RANLIB" >&6
3878 else
3879   echo "$as_me:3879: result: no" >&5
3880 echo "${ECHO_T}no" >&6
3881 fi
3882
3883 fi
3884 if test -z "$ac_cv_prog_RANLIB"; then
3885   ac_ct_RANLIB=$RANLIB
3886   # Extract the first word of "ranlib", so it can be a program name with args.
3887 set dummy ranlib; ac_word=$2
3888 echo "$as_me:3888: checking for $ac_word" >&5
3889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3890 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3891   echo $ECHO_N "(cached) $ECHO_C" >&6
3892 else
3893   if test -n "$ac_ct_RANLIB"; then
3894   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3895 else
3896   ac_save_IFS=$IFS; IFS=$ac_path_separator
3897 ac_dummy="$PATH"
3898 for ac_dir in $ac_dummy; do
3899   IFS=$ac_save_IFS
3900   test -z "$ac_dir" && ac_dir=.
3901   $as_executable_p "$ac_dir/$ac_word" || continue
3902 ac_cv_prog_ac_ct_RANLIB="ranlib"
3903 echo "$as_me:3903: found $ac_dir/$ac_word" >&5
3904 break
3905 done
3906
3907   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3908 fi
3909 fi
3910 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3911 if test -n "$ac_ct_RANLIB"; then
3912   echo "$as_me:3912: result: $ac_ct_RANLIB" >&5
3913 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3914 else
3915   echo "$as_me:3915: result: no" >&5
3916 echo "${ECHO_T}no" >&6
3917 fi
3918
3919   RANLIB=$ac_ct_RANLIB
3920 else
3921   RANLIB="$ac_cv_prog_RANLIB"
3922 fi
3923
3924 if test -n "$ac_tool_prefix"; then
3925   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3926 set dummy ${ac_tool_prefix}ld; ac_word=$2
3927 echo "$as_me:3927: checking for $ac_word" >&5
3928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3929 if test "${ac_cv_prog_LD+set}" = set; then
3930   echo $ECHO_N "(cached) $ECHO_C" >&6
3931 else
3932   if test -n "$LD"; then
3933   ac_cv_prog_LD="$LD" # Let the user override the test.
3934 else
3935   ac_save_IFS=$IFS; IFS=$ac_path_separator
3936 ac_dummy="$PATH"
3937 for ac_dir in $ac_dummy; do
3938   IFS=$ac_save_IFS
3939   test -z "$ac_dir" && ac_dir=.
3940   $as_executable_p "$ac_dir/$ac_word" || continue
3941 ac_cv_prog_LD="${ac_tool_prefix}ld"
3942 echo "$as_me:3942: found $ac_dir/$ac_word" >&5
3943 break
3944 done
3945
3946 fi
3947 fi
3948 LD=$ac_cv_prog_LD
3949 if test -n "$LD"; then
3950   echo "$as_me:3950: result: $LD" >&5
3951 echo "${ECHO_T}$LD" >&6
3952 else
3953   echo "$as_me:3953: result: no" >&5
3954 echo "${ECHO_T}no" >&6
3955 fi
3956
3957 fi
3958 if test -z "$ac_cv_prog_LD"; then
3959   ac_ct_LD=$LD
3960   # Extract the first word of "ld", so it can be a program name with args.
3961 set dummy ld; ac_word=$2
3962 echo "$as_me:3962: checking for $ac_word" >&5
3963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3964 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3965   echo $ECHO_N "(cached) $ECHO_C" >&6
3966 else
3967   if test -n "$ac_ct_LD"; then
3968   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3969 else
3970   ac_save_IFS=$IFS; IFS=$ac_path_separator
3971 ac_dummy="$PATH"
3972 for ac_dir in $ac_dummy; do
3973   IFS=$ac_save_IFS
3974   test -z "$ac_dir" && ac_dir=.
3975   $as_executable_p "$ac_dir/$ac_word" || continue
3976 ac_cv_prog_ac_ct_LD="ld"
3977 echo "$as_me:3977: found $ac_dir/$ac_word" >&5
3978 break
3979 done
3980
3981   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3982 fi
3983 fi
3984 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3985 if test -n "$ac_ct_LD"; then
3986   echo "$as_me:3986: result: $ac_ct_LD" >&5
3987 echo "${ECHO_T}$ac_ct_LD" >&6
3988 else
3989   echo "$as_me:3989: result: no" >&5
3990 echo "${ECHO_T}no" >&6
3991 fi
3992
3993   LD=$ac_ct_LD
3994 else
3995   LD="$ac_cv_prog_LD"
3996 fi
3997
3998 if test -n "$ac_tool_prefix"; then
3999   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4000 set dummy ${ac_tool_prefix}ar; ac_word=$2
4001 echo "$as_me:4001: checking for $ac_word" >&5
4002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4003 if test "${ac_cv_prog_AR+set}" = set; then
4004   echo $ECHO_N "(cached) $ECHO_C" >&6
4005 else
4006   if test -n "$AR"; then
4007   ac_cv_prog_AR="$AR" # Let the user override the test.
4008 else
4009   ac_save_IFS=$IFS; IFS=$ac_path_separator
4010 ac_dummy="$PATH"
4011 for ac_dir in $ac_dummy; do
4012   IFS=$ac_save_IFS
4013   test -z "$ac_dir" && ac_dir=.
4014   $as_executable_p "$ac_dir/$ac_word" || continue
4015 ac_cv_prog_AR="${ac_tool_prefix}ar"
4016 echo "$as_me:4016: found $ac_dir/$ac_word" >&5
4017 break
4018 done
4019
4020 fi
4021 fi
4022 AR=$ac_cv_prog_AR
4023 if test -n "$AR"; then
4024   echo "$as_me:4024: result: $AR" >&5
4025 echo "${ECHO_T}$AR" >&6
4026 else
4027   echo "$as_me:4027: result: no" >&5
4028 echo "${ECHO_T}no" >&6
4029 fi
4030
4031 fi
4032 if test -z "$ac_cv_prog_AR"; then
4033   ac_ct_AR=$AR
4034   # Extract the first word of "ar", so it can be a program name with args.
4035 set dummy ar; ac_word=$2
4036 echo "$as_me:4036: checking for $ac_word" >&5
4037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4038 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4039   echo $ECHO_N "(cached) $ECHO_C" >&6
4040 else
4041   if test -n "$ac_ct_AR"; then
4042   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4043 else
4044   ac_save_IFS=$IFS; IFS=$ac_path_separator
4045 ac_dummy="$PATH"
4046 for ac_dir in $ac_dummy; do
4047   IFS=$ac_save_IFS
4048   test -z "$ac_dir" && ac_dir=.
4049   $as_executable_p "$ac_dir/$ac_word" || continue
4050 ac_cv_prog_ac_ct_AR="ar"
4051 echo "$as_me:4051: found $ac_dir/$ac_word" >&5
4052 break
4053 done
4054
4055   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4056 fi
4057 fi
4058 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4059 if test -n "$ac_ct_AR"; then
4060   echo "$as_me:4060: result: $ac_ct_AR" >&5
4061 echo "${ECHO_T}$ac_ct_AR" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067   AR=$ac_ct_AR
4068 else
4069   AR="$ac_cv_prog_AR"
4070 fi
4071
4072 if test -n "$ac_tool_prefix"; then
4073   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4074 set dummy ${ac_tool_prefix}ar; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_prog_AR+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   if test -n "$AR"; then
4081   ac_cv_prog_AR="$AR" # Let the user override the test.
4082 else
4083   ac_save_IFS=$IFS; IFS=$ac_path_separator
4084 ac_dummy="$PATH"
4085 for ac_dir in $ac_dummy; do
4086   IFS=$ac_save_IFS
4087   test -z "$ac_dir" && ac_dir=.
4088   $as_executable_p "$ac_dir/$ac_word" || continue
4089 ac_cv_prog_AR="${ac_tool_prefix}ar"
4090 echo "$as_me:4090: found $ac_dir/$ac_word" >&5
4091 break
4092 done
4093
4094 fi
4095 fi
4096 AR=$ac_cv_prog_AR
4097 if test -n "$AR"; then
4098   echo "$as_me:4098: result: $AR" >&5
4099 echo "${ECHO_T}$AR" >&6
4100 else
4101   echo "$as_me:4101: result: no" >&5
4102 echo "${ECHO_T}no" >&6
4103 fi
4104
4105 fi
4106 if test -z "$ac_cv_prog_AR"; then
4107   ac_ct_AR=$AR
4108   # Extract the first word of "ar", so it can be a program name with args.
4109 set dummy ar; ac_word=$2
4110 echo "$as_me:4110: checking for $ac_word" >&5
4111 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4112 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4113   echo $ECHO_N "(cached) $ECHO_C" >&6
4114 else
4115   if test -n "$ac_ct_AR"; then
4116   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4117 else
4118   ac_save_IFS=$IFS; IFS=$ac_path_separator
4119 ac_dummy="$PATH"
4120 for ac_dir in $ac_dummy; do
4121   IFS=$ac_save_IFS
4122   test -z "$ac_dir" && ac_dir=.
4123   $as_executable_p "$ac_dir/$ac_word" || continue
4124 ac_cv_prog_ac_ct_AR="ar"
4125 echo "$as_me:4125: found $ac_dir/$ac_word" >&5
4126 break
4127 done
4128
4129   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4130 fi
4131 fi
4132 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4133 if test -n "$ac_ct_AR"; then
4134   echo "$as_me:4134: result: $ac_ct_AR" >&5
4135 echo "${ECHO_T}$ac_ct_AR" >&6
4136 else
4137   echo "$as_me:4137: result: no" >&5
4138 echo "${ECHO_T}no" >&6
4139 fi
4140
4141   AR=$ac_ct_AR
4142 else
4143   AR="$ac_cv_prog_AR"
4144 fi
4145
4146 echo "$as_me:4146: checking for options to update archives" >&5
4147 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4148 if test "${cf_cv_ar_flags+set}" = set; then
4149   echo $ECHO_N "(cached) $ECHO_C" >&6
4150 else
4151
4152         cf_cv_ar_flags=unknown
4153         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4154         do
4155                 rm -f conftest.$ac_cv_objext
4156                 rm -f conftest.a
4157
4158                 cat >conftest.$ac_ext <<EOF
4159 #line 4159 "configure"
4160 int     testdata[3] = { 123, 456, 789 };
4161 EOF
4162                 if { (eval echo "$as_me:4162: \"$ac_compile\"") >&5
4163   (eval $ac_compile) 2>&5
4164   ac_status=$?
4165   echo "$as_me:4165: \$? = $ac_status" >&5
4166   (exit $ac_status); } ; then
4167                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4168                         if test -f conftest.a ; then
4169                                 cf_cv_ar_flags=$cf_ar_flags
4170                                 break
4171                         fi
4172                 else
4173                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4174
4175 echo "${as_me-configure}:4175: testing cannot compile test-program ..." 1>&5
4176
4177                         break
4178                 fi
4179         done
4180         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4181
4182 fi
4183 echo "$as_me:4183: result: $cf_cv_ar_flags" >&5
4184 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4185 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4186 ARFLAGS=$cf_cv_ar_flags
4187
4188 echo "$as_me:4188: checking if you have specified an install-prefix" >&5
4189 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4190
4191 # Check whether --with-install-prefix or --without-install-prefix was given.
4192 if test "${with_install_prefix+set}" = set; then
4193   withval="$with_install_prefix"
4194   case "$withval" in #(vi
4195         yes|no) #(vi
4196                 ;;
4197         *)      DESTDIR="$withval"
4198                 ;;
4199         esac
4200 fi;
4201 echo "$as_me:4201: result: $DESTDIR" >&5
4202 echo "${ECHO_T}$DESTDIR" >&6
4203
4204 ###############################################################################
4205
4206 # If we're cross-compiling, allow the user to override the tools and their
4207 # options.  The configure script is oriented toward identifying the host
4208 # compiler, etc., but we need a build compiler to generate parts of the source.
4209
4210 if test "$cross_compiling" = yes ; then
4211
4212         # defaults that we might want to override
4213         : ${BUILD_CFLAGS:=''}
4214         : ${BUILD_CPPFLAGS:=''}
4215         : ${BUILD_LDFLAGS:=''}
4216         : ${BUILD_LIBS:=''}
4217         : ${BUILD_EXEEXT:='$x'}
4218         : ${BUILD_OBJEXT:='o'}
4219
4220 # Check whether --with-build-cc or --without-build-cc was given.
4221 if test "${with_build_cc+set}" = set; then
4222   withval="$with_build_cc"
4223   BUILD_CC="$withval"
4224 else
4225   for ac_prog in gcc cc cl
4226 do
4227   # Extract the first word of "$ac_prog", so it can be a program name with args.
4228 set dummy $ac_prog; ac_word=$2
4229 echo "$as_me:4229: checking for $ac_word" >&5
4230 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4231 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4232   echo $ECHO_N "(cached) $ECHO_C" >&6
4233 else
4234   if test -n "$BUILD_CC"; then
4235   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4236 else
4237   ac_save_IFS=$IFS; IFS=$ac_path_separator
4238 ac_dummy="$PATH"
4239 for ac_dir in $ac_dummy; do
4240   IFS=$ac_save_IFS
4241   test -z "$ac_dir" && ac_dir=.
4242   $as_executable_p "$ac_dir/$ac_word" || continue
4243 ac_cv_prog_BUILD_CC="$ac_prog"
4244 echo "$as_me:4244: found $ac_dir/$ac_word" >&5
4245 break
4246 done
4247
4248 fi
4249 fi
4250 BUILD_CC=$ac_cv_prog_BUILD_CC
4251 if test -n "$BUILD_CC"; then
4252   echo "$as_me:4252: result: $BUILD_CC" >&5
4253 echo "${ECHO_T}$BUILD_CC" >&6
4254 else
4255   echo "$as_me:4255: result: no" >&5
4256 echo "${ECHO_T}no" >&6
4257 fi
4258
4259   test -n "$BUILD_CC" && break
4260 done
4261
4262 fi;
4263         echo "$as_me:4263: checking for native build C compiler" >&5
4264 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4265         echo "$as_me:4265: result: $BUILD_CC" >&5
4266 echo "${ECHO_T}$BUILD_CC" >&6
4267
4268         echo "$as_me:4268: checking for native build C preprocessor" >&5
4269 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4270
4271 # Check whether --with-build-cpp or --without-build-cpp was given.
4272 if test "${with_build_cpp+set}" = set; then
4273   withval="$with_build_cpp"
4274   BUILD_CPP="$withval"
4275 else
4276   BUILD_CPP='${BUILD_CC} -E'
4277 fi;
4278         echo "$as_me:4278: result: $BUILD_CPP" >&5
4279 echo "${ECHO_T}$BUILD_CPP" >&6
4280
4281         echo "$as_me:4281: checking for native build C flags" >&5
4282 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4283
4284 # Check whether --with-build-cflags or --without-build-cflags was given.
4285 if test "${with_build_cflags+set}" = set; then
4286   withval="$with_build_cflags"
4287   BUILD_CFLAGS="$withval"
4288 fi;
4289         echo "$as_me:4289: result: $BUILD_CFLAGS" >&5
4290 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4291
4292         echo "$as_me:4292: checking for native build C preprocessor-flags" >&5
4293 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4294
4295 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4296 if test "${with_build_cppflags+set}" = set; then
4297   withval="$with_build_cppflags"
4298   BUILD_CPPFLAGS="$withval"
4299 fi;
4300         echo "$as_me:4300: result: $BUILD_CPPFLAGS" >&5
4301 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4302
4303         echo "$as_me:4303: checking for native build linker-flags" >&5
4304 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4305
4306 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4307 if test "${with_build_ldflags+set}" = set; then
4308   withval="$with_build_ldflags"
4309   BUILD_LDFLAGS="$withval"
4310 fi;
4311         echo "$as_me:4311: result: $BUILD_LDFLAGS" >&5
4312 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4313
4314         echo "$as_me:4314: checking for native build linker-libraries" >&5
4315 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4316
4317 # Check whether --with-build-libs or --without-build-libs was given.
4318 if test "${with_build_libs+set}" = set; then
4319   withval="$with_build_libs"
4320   BUILD_LIBS="$withval"
4321 fi;
4322         echo "$as_me:4322: result: $BUILD_LIBS" >&5
4323 echo "${ECHO_T}$BUILD_LIBS" >&6
4324
4325         # this assumes we're on Unix.
4326         BUILD_EXEEXT=
4327         BUILD_OBJEXT=o
4328
4329         : ${BUILD_CC:='${CC}'}
4330
4331         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4332                 { { echo "$as_me:4332: error: Cross-build requires two compilers.
4333 Use --with-build-cc to specify the native compiler." >&5
4334 echo "$as_me: error: Cross-build requires two compilers.
4335 Use --with-build-cc to specify the native compiler." >&2;}
4336    { (exit 1); exit 1; }; }
4337         fi
4338
4339 else
4340         : ${BUILD_CC:='${CC}'}
4341         : ${BUILD_CPP:='${CPP}'}
4342         : ${BUILD_CFLAGS:='${CFLAGS}'}
4343         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4344         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4345         : ${BUILD_LIBS:='${LIBS}'}
4346         : ${BUILD_EXEEXT:='$x'}
4347         : ${BUILD_OBJEXT:='o'}
4348 fi
4349
4350 ###############################################################################
4351
4352 ### Options to allow the user to specify the set of libraries which are used.
4353 ### Use "--without-normal --with-shared" to allow the default model to be
4354 ### shared, for example.
4355 cf_list_models=""
4356
4357 LIBTOOL=
4358
4359 # common library maintenance symbols that are convenient for libtool scripts:
4360 LIB_CREATE='${AR} -cr'
4361 LIB_OBJECT='${OBJECTS}'
4362 LIB_SUFFIX=.a
4363 LIB_PREP="$RANLIB"
4364
4365 # symbols used to prop libtool up to enable it to determine what it should be
4366 # doing:
4367 LIB_CLEAN=
4368 LIB_COMPILE=
4369 LIB_LINK='${CC}'
4370 LIB_INSTALL=
4371 LIB_UNINSTALL=
4372
4373 echo "$as_me:4373: checking if you want to build libraries with libtool" >&5
4374 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4375
4376 # Check whether --with-libtool or --without-libtool was given.
4377 if test "${with_libtool+set}" = set; then
4378   withval="$with_libtool"
4379   with_libtool=$withval
4380 else
4381   with_libtool=no
4382 fi;
4383 echo "$as_me:4383: result: $with_libtool" >&5
4384 echo "${ECHO_T}$with_libtool" >&6
4385 if test "$with_libtool" != "no"; then
4386
4387         if test "$with_libtool" != "yes" ; then
4388
4389 if test "x$prefix" != xNONE; then
4390   cf_path_syntax="$prefix"
4391 else
4392   cf_path_syntax="$ac_default_prefix"
4393 fi
4394
4395 case ".$with_libtool" in #(vi
4396 .\$\(*\)*|.\'*\'*) #(vi
4397   ;;
4398 ..|./*|.\\*) #(vi
4399   ;;
4400 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4401   ;;
4402 .\${*prefix}*) #(vi
4403   eval with_libtool="$with_libtool"
4404   case ".$with_libtool" in #(vi
4405   .NONE/*)
4406     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4407     ;;
4408   esac
4409   ;; #(vi
4410 .no|.NONE/*)
4411   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4412   ;;
4413 *)
4414   { { echo "$as_me:4414: error: expected a pathname, not \"$with_libtool\"" >&5
4415 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4416    { (exit 1); exit 1; }; }
4417   ;;
4418 esac
4419
4420                 LIBTOOL=$with_libtool
4421         else
4422                 # Extract the first word of "libtool", so it can be a program name with args.
4423 set dummy libtool; ac_word=$2
4424 echo "$as_me:4424: checking for $ac_word" >&5
4425 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4426 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4427   echo $ECHO_N "(cached) $ECHO_C" >&6
4428 else
4429   case $LIBTOOL in
4430   [\\/]* | ?:[\\/]*)
4431   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4432   ;;
4433   *)
4434   ac_save_IFS=$IFS; IFS=$ac_path_separator
4435 ac_dummy="$PATH"
4436 for ac_dir in $ac_dummy; do
4437   IFS=$ac_save_IFS
4438   test -z "$ac_dir" && ac_dir=.
4439   if $as_executable_p "$ac_dir/$ac_word"; then
4440    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4441    echo "$as_me:4441: found $ac_dir/$ac_word" >&5
4442    break
4443 fi
4444 done
4445
4446   ;;
4447 esac
4448 fi
4449 LIBTOOL=$ac_cv_path_LIBTOOL
4450
4451 if test -n "$LIBTOOL"; then
4452   echo "$as_me:4452: result: $LIBTOOL" >&5
4453 echo "${ECHO_T}$LIBTOOL" >&6
4454 else
4455   echo "$as_me:4455: result: no" >&5
4456 echo "${ECHO_T}no" >&6
4457 fi
4458
4459         fi
4460         if test -z "$LIBTOOL" ; then
4461                 { { echo "$as_me:4461: error: Cannot find libtool" >&5
4462 echo "$as_me: error: Cannot find libtool" >&2;}
4463    { (exit 1); exit 1; }; }
4464         fi
4465         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4466         LIB_OBJECT='${OBJECTS:.o=.lo}'
4467         LIB_SUFFIX=.la
4468         LIB_CLEAN='${LIBTOOL} --mode=clean'
4469         LIB_COMPILE='${LIBTOOL} --mode=compile'
4470         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4471         LIB_INSTALL='${LIBTOOL} --mode=install'
4472         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4473         LIB_PREP=:
4474
4475         # Show the version of libtool
4476         echo "$as_me:4476: checking version of libtool" >&5
4477 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4478
4479         # Save the version in a cache variable - this is not entirely a good
4480         # thing, but the version string from libtool is very ugly, and for
4481         # bug reports it might be useful to have the original string. "("
4482         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.].*//'`
4483         echo "$as_me:4483: result: $cf_cv_libtool_version" >&5
4484 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4485         if test -z "$cf_cv_libtool_version" ; then
4486                 { { echo "$as_me:4486: error: This is not GNU libtool" >&5
4487 echo "$as_me: error: This is not GNU libtool" >&2;}
4488    { (exit 1); exit 1; }; }
4489         fi
4490
4491         # special hack to add -no-undefined (which libtool should do for itself)
4492         LT_UNDEF=
4493         case "$cf_cv_system_name" in #(vi
4494         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4495                 LT_UNDEF=-no-undefined
4496                 ;;
4497         esac
4498
4499         # special hack to add --tag option for C++ compiler
4500         case $cf_cv_libtool_version in #(vi
4501         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4502                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4503                 LIBTOOL="$LIBTOOL --tag=CC"
4504                 ;;
4505         *)
4506                 LIBTOOL_CXX="$LIBTOOL"
4507                 ;;
4508         esac
4509 else
4510         LIBTOOL=""
4511         LIBTOOL_CXX=""
4512 fi
4513
4514 test -z "$LIBTOOL" && ECHO_LT=
4515
4516 if test "$with_libtool" != "no" ; then
4517
4518 cf_list_models="$cf_list_models libtool"
4519
4520 else
4521
4522 echo "$as_me:4522: checking if you want to build shared libraries" >&5
4523 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4524
4525 # Check whether --with-shared or --without-shared was given.
4526 if test "${with_shared+set}" = set; then
4527   withval="$with_shared"
4528   with_shared=$withval
4529 else
4530   with_shared=no
4531 fi;
4532 echo "$as_me:4532: result: $with_shared" >&5
4533 echo "${ECHO_T}$with_shared" >&6
4534 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4535
4536 echo "$as_me:4536: checking if you want to build static libraries" >&5
4537 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4538
4539 # Check whether --with-normal or --without-normal was given.
4540 if test "${with_normal+set}" = set; then
4541   withval="$with_normal"
4542   with_normal=$withval
4543 else
4544   with_normal=yes
4545 fi;
4546 echo "$as_me:4546: result: $with_normal" >&5
4547 echo "${ECHO_T}$with_normal" >&6
4548 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4549
4550 echo "$as_me:4550: checking if you want to build debug libraries" >&5
4551 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4552
4553 # Check whether --with-debug or --without-debug was given.
4554 if test "${with_debug+set}" = set; then
4555   withval="$with_debug"
4556   with_debug=$withval
4557 else
4558   with_debug=yes
4559 fi;
4560 echo "$as_me:4560: result: $with_debug" >&5
4561 echo "${ECHO_T}$with_debug" >&6
4562 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4563
4564 echo "$as_me:4564: checking if you want to build profiling libraries" >&5
4565 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4566
4567 # Check whether --with-profile or --without-profile was given.
4568 if test "${with_profile+set}" = set; then
4569   withval="$with_profile"
4570   with_profile=$withval
4571 else
4572   with_profile=no
4573 fi;
4574 echo "$as_me:4574: result: $with_profile" >&5
4575 echo "${ECHO_T}$with_profile" >&6
4576 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4577
4578 fi
4579
4580 ###############################################################################
4581
4582 echo "$as_me:4582: checking for specified models" >&5
4583 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4584 test -z "$cf_list_models" && cf_list_models=normal
4585 test "$with_libtool" != "no" && cf_list_models=libtool
4586 echo "$as_me:4586: result: $cf_list_models" >&5
4587 echo "${ECHO_T}$cf_list_models" >&6
4588
4589 ### Use the first model as the default, and save its suffix for use in building
4590 ### up test-applications.
4591 echo "$as_me:4591: checking for default model" >&5
4592 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4593 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4594 echo "$as_me:4594: result: $DFT_LWR_MODEL" >&5
4595 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4596
4597 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4598
4599 TICS_NAME=tic
4600
4601 TINFO_NAME=tinfo
4602
4603 LIB_NAME=ncurses
4604
4605 LIB_DIR=../lib
4606 LIB_2ND=../../lib
4607
4608         case $cf_cv_system_name in #(vi
4609         OS/2*|os2*) #(vi
4610         LIB_PREFIX=''
4611         ;;
4612         *)      LIB_PREFIX='lib'
4613         ;;
4614         esac
4615 cf_prefix=$LIB_PREFIX
4616
4617 LIB_PREFIX=$cf_prefix
4618
4619 LIB_SUFFIX=
4620
4621 ###############################################################################
4622
4623 echo "$as_me:4623: checking if you want to build a separate terminfo library" >&5
4624 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4625
4626 # Check whether --with-termlib or --without-termlib was given.
4627 if test "${with_termlib+set}" = set; then
4628   withval="$with_termlib"
4629   with_termlib=$withval
4630 else
4631   with_termlib=no
4632 fi;
4633 echo "$as_me:4633: result: $with_termlib" >&5
4634 echo "${ECHO_T}$with_termlib" >&6
4635
4636 echo "$as_me:4636: checking if you want to build a separate tic library" >&5
4637 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4638
4639 # Check whether --with-ticlib or --without-ticlib was given.
4640 if test "${with_ticlib+set}" = set; then
4641   withval="$with_ticlib"
4642   with_ticlib=$withval
4643 else
4644   with_ticlib=no
4645 fi;
4646 echo "$as_me:4646: result: $with_ticlib" >&5
4647 echo "${ECHO_T}$with_ticlib" >&6
4648
4649 ### Checks for special libraries, must be done up-front.
4650 SHLIB_LIST=""
4651
4652 echo "$as_me:4652: checking if you want to link with the GPM mouse library" >&5
4653 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4654
4655 # Check whether --with-gpm or --without-gpm was given.
4656 if test "${with_gpm+set}" = set; then
4657   withval="$with_gpm"
4658   with_gpm=$withval
4659 else
4660   with_gpm=maybe
4661 fi;
4662 echo "$as_me:4662: result: $with_gpm" >&5
4663 echo "${ECHO_T}$with_gpm" >&6
4664
4665 if test "$with_gpm" != no ; then
4666         echo "$as_me:4666: checking for gpm.h" >&5
4667 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4668 if test "${ac_cv_header_gpm_h+set}" = set; then
4669   echo $ECHO_N "(cached) $ECHO_C" >&6
4670 else
4671   cat >conftest.$ac_ext <<_ACEOF
4672 #line 4672 "configure"
4673 #include "confdefs.h"
4674 #include <gpm.h>
4675 _ACEOF
4676 if { (eval echo "$as_me:4676: \"$ac_cpp conftest.$ac_ext\"") >&5
4677   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4678   ac_status=$?
4679   egrep -v '^ *\+' conftest.er1 >conftest.err
4680   rm -f conftest.er1
4681   cat conftest.err >&5
4682   echo "$as_me:4682: \$? = $ac_status" >&5
4683   (exit $ac_status); } >/dev/null; then
4684   if test -s conftest.err; then
4685     ac_cpp_err=$ac_c_preproc_warn_flag
4686   else
4687     ac_cpp_err=
4688   fi
4689 else
4690   ac_cpp_err=yes
4691 fi
4692 if test -z "$ac_cpp_err"; then
4693   ac_cv_header_gpm_h=yes
4694 else
4695   echo "$as_me: failed program was:" >&5
4696   cat conftest.$ac_ext >&5
4697   ac_cv_header_gpm_h=no
4698 fi
4699 rm -f conftest.err conftest.$ac_ext
4700 fi
4701 echo "$as_me:4701: result: $ac_cv_header_gpm_h" >&5
4702 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4703 if test $ac_cv_header_gpm_h = yes; then
4704
4705                 cat >>confdefs.h <<\EOF
4706 #define HAVE_GPM_H 1
4707 EOF
4708
4709                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4710                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4711
4712 echo "${as_me-configure}:4712: testing assuming we really have GPM library ..." 1>&5
4713
4714                         cat >>confdefs.h <<\EOF
4715 #define HAVE_LIBGPM 1
4716 EOF
4717
4718                 else
4719                         echo "$as_me:4719: checking for Gpm_Open in -lgpm" >&5
4720 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4721 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4722   echo $ECHO_N "(cached) $ECHO_C" >&6
4723 else
4724   ac_check_lib_save_LIBS=$LIBS
4725 LIBS="-lgpm  $LIBS"
4726 cat >conftest.$ac_ext <<_ACEOF
4727 #line 4727 "configure"
4728 #include "confdefs.h"
4729
4730 /* Override any gcc2 internal prototype to avoid an error.  */
4731 #ifdef __cplusplus
4732 extern "C"
4733 #endif
4734 /* We use char because int might match the return type of a gcc2
4735    builtin and then its argument prototype would still apply.  */
4736 char Gpm_Open ();
4737 int
4738 main ()
4739 {
4740 Gpm_Open ();
4741   ;
4742   return 0;
4743 }
4744 _ACEOF
4745 rm -f conftest.$ac_objext conftest$ac_exeext
4746 if { (eval echo "$as_me:4746: \"$ac_link\"") >&5
4747   (eval $ac_link) 2>&5
4748   ac_status=$?
4749   echo "$as_me:4749: \$? = $ac_status" >&5
4750   (exit $ac_status); } &&
4751          { ac_try='test -s conftest$ac_exeext'
4752   { (eval echo "$as_me:4752: \"$ac_try\"") >&5
4753   (eval $ac_try) 2>&5
4754   ac_status=$?
4755   echo "$as_me:4755: \$? = $ac_status" >&5
4756   (exit $ac_status); }; }; then
4757   ac_cv_lib_gpm_Gpm_Open=yes
4758 else
4759   echo "$as_me: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 ac_cv_lib_gpm_Gpm_Open=no
4762 fi
4763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4764 LIBS=$ac_check_lib_save_LIBS
4765 fi
4766 echo "$as_me:4766: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4767 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4768 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4769   :
4770 else
4771
4772                                 { { echo "$as_me:4772: error: Cannot link with GPM library" >&5
4773 echo "$as_me: error: Cannot link with GPM library" >&2;}
4774    { (exit 1); exit 1; }; }
4775                 fi
4776                 with_gpm=yes
4777
4778 fi
4779
4780 else
4781
4782                 test "$with_gpm" != maybe && { echo "$as_me:4782: WARNING: Cannot find GPM header" >&5
4783 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4784                 with_gpm=no
4785
4786 fi
4787
4788 fi
4789
4790 if test "$with_gpm" != no ; then
4791         echo "$as_me:4791: checking if you want to load GPM dynamically" >&5
4792 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4793
4794 # Check whether --with-dlsym or --without-dlsym was given.
4795 if test "${with_dlsym+set}" = set; then
4796   withval="$with_dlsym"
4797   with_dlsym=$withval
4798 else
4799   with_dlsym=yes
4800 fi;
4801         echo "$as_me:4801: result: $with_dlsym" >&5
4802 echo "${ECHO_T}$with_dlsym" >&6
4803         if test "$with_dlsym" = yes ; then
4804
4805 cf_have_dlsym=no
4806 echo "$as_me:4806: checking for dlsym" >&5
4807 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4808 if test "${ac_cv_func_dlsym+set}" = set; then
4809   echo $ECHO_N "(cached) $ECHO_C" >&6
4810 else
4811   cat >conftest.$ac_ext <<_ACEOF
4812 #line 4812 "configure"
4813 #include "confdefs.h"
4814 /* System header to define __stub macros and hopefully few prototypes,
4815     which can conflict with char dlsym (); below.  */
4816 #include <assert.h>
4817 /* Override any gcc2 internal prototype to avoid an error.  */
4818 #ifdef __cplusplus
4819 extern "C"
4820 #endif
4821 /* We use char because int might match the return type of a gcc2
4822    builtin and then its argument prototype would still apply.  */
4823 char dlsym ();
4824 char (*f) ();
4825
4826 int
4827 main ()
4828 {
4829 /* The GNU C library defines this for functions which it implements
4830     to always fail with ENOSYS.  Some functions are actually named
4831     something starting with __ and the normal name is an alias.  */
4832 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4833 choke me
4834 #else
4835 f = dlsym;
4836 #endif
4837
4838   ;
4839   return 0;
4840 }
4841 _ACEOF
4842 rm -f conftest.$ac_objext conftest$ac_exeext
4843 if { (eval echo "$as_me:4843: \"$ac_link\"") >&5
4844   (eval $ac_link) 2>&5
4845   ac_status=$?
4846   echo "$as_me:4846: \$? = $ac_status" >&5
4847   (exit $ac_status); } &&
4848          { ac_try='test -s conftest$ac_exeext'
4849   { (eval echo "$as_me:4849: \"$ac_try\"") >&5
4850   (eval $ac_try) 2>&5
4851   ac_status=$?
4852   echo "$as_me:4852: \$? = $ac_status" >&5
4853   (exit $ac_status); }; }; then
4854   ac_cv_func_dlsym=yes
4855 else
4856   echo "$as_me: failed program was:" >&5
4857 cat conftest.$ac_ext >&5
4858 ac_cv_func_dlsym=no
4859 fi
4860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4861 fi
4862 echo "$as_me:4862: result: $ac_cv_func_dlsym" >&5
4863 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4864 if test $ac_cv_func_dlsym = yes; then
4865   cf_have_dlsym=yes
4866 else
4867
4868 cf_have_libdl=no
4869 echo "$as_me:4869: checking for dlsym in -ldl" >&5
4870 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4871 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4872   echo $ECHO_N "(cached) $ECHO_C" >&6
4873 else
4874   ac_check_lib_save_LIBS=$LIBS
4875 LIBS="-ldl  $LIBS"
4876 cat >conftest.$ac_ext <<_ACEOF
4877 #line 4877 "configure"
4878 #include "confdefs.h"
4879
4880 /* Override any gcc2 internal prototype to avoid an error.  */
4881 #ifdef __cplusplus
4882 extern "C"
4883 #endif
4884 /* We use char because int might match the return type of a gcc2
4885    builtin and then its argument prototype would still apply.  */
4886 char dlsym ();
4887 int
4888 main ()
4889 {
4890 dlsym ();
4891   ;
4892   return 0;
4893 }
4894 _ACEOF
4895 rm -f conftest.$ac_objext conftest$ac_exeext
4896 if { (eval echo "$as_me:4896: \"$ac_link\"") >&5
4897   (eval $ac_link) 2>&5
4898   ac_status=$?
4899   echo "$as_me:4899: \$? = $ac_status" >&5
4900   (exit $ac_status); } &&
4901          { ac_try='test -s conftest$ac_exeext'
4902   { (eval echo "$as_me:4902: \"$ac_try\"") >&5
4903   (eval $ac_try) 2>&5
4904   ac_status=$?
4905   echo "$as_me:4905: \$? = $ac_status" >&5
4906   (exit $ac_status); }; }; then
4907   ac_cv_lib_dl_dlsym=yes
4908 else
4909   echo "$as_me: failed program was:" >&5
4910 cat conftest.$ac_ext >&5
4911 ac_cv_lib_dl_dlsym=no
4912 fi
4913 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4914 LIBS=$ac_check_lib_save_LIBS
4915 fi
4916 echo "$as_me:4916: result: $ac_cv_lib_dl_dlsym" >&5
4917 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4918 if test $ac_cv_lib_dl_dlsym = yes; then
4919
4920         cf_have_dlsym=yes
4921         cf_have_libdl=yes
4922 fi
4923
4924 fi
4925
4926 if test "$cf_have_dlsym" = yes ; then
4927         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4928
4929         echo "$as_me:4929: checking whether able to link to dl*() functions" >&5
4930 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4931         cat >conftest.$ac_ext <<_ACEOF
4932 #line 4932 "configure"
4933 #include "confdefs.h"
4934 #include <dlfcn.h>
4935 int
4936 main ()
4937 {
4938
4939                 void *obj;
4940                 if ((obj = dlopen("filename", 0)) != 0) {
4941                         if (dlsym(obj, "symbolname") == 0) {
4942                         dlclose(obj);
4943                         }
4944                 }
4945   ;
4946   return 0;
4947 }
4948 _ACEOF
4949 rm -f conftest.$ac_objext conftest$ac_exeext
4950 if { (eval echo "$as_me:4950: \"$ac_link\"") >&5
4951   (eval $ac_link) 2>&5
4952   ac_status=$?
4953   echo "$as_me:4953: \$? = $ac_status" >&5
4954   (exit $ac_status); } &&
4955          { ac_try='test -s conftest$ac_exeext'
4956   { (eval echo "$as_me:4956: \"$ac_try\"") >&5
4957   (eval $ac_try) 2>&5
4958   ac_status=$?
4959   echo "$as_me:4959: \$? = $ac_status" >&5
4960   (exit $ac_status); }; }; then
4961
4962                 cat >>confdefs.h <<\EOF
4963 #define HAVE_LIBDL 1
4964 EOF
4965
4966 else
4967   echo "$as_me: failed program was:" >&5
4968 cat conftest.$ac_ext >&5
4969
4970                 { { echo "$as_me:4970: error: Cannot link test program for libdl" >&5
4971 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4972    { (exit 1); exit 1; }; }
4973 fi
4974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4975         echo "$as_me:4975: result: ok" >&5
4976 echo "${ECHO_T}ok" >&6
4977 else
4978         { { echo "$as_me:4978: error: Cannot find dlsym function" >&5
4979 echo "$as_me: error: Cannot find dlsym function" >&2;}
4980    { (exit 1); exit 1; }; }
4981 fi
4982
4983                 if test "$with_gpm" != yes ; then
4984                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4985
4986 echo "${as_me-configure}:4986: testing assuming soname for gpm is $with_gpm ..." 1>&5
4987
4988                         cf_cv_gpm_soname="$with_gpm"
4989                 else
4990
4991 echo "$as_me:4991: checking for soname of gpm library" >&5
4992 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4993 if test "${cf_cv_gpm_soname+set}" = set; then
4994   echo $ECHO_N "(cached) $ECHO_C" >&6
4995 else
4996
4997 cf_cv_gpm_soname=unknown
4998 if test "$cross_compiling" != yes ; then
4999 cat >conftest.$ac_ext <<CF_EOF
5000 #include <gpm.h>
5001 int main()
5002 {
5003 if (Gpm_Open(0,0)) Gpm_Close();
5004         ${cf_cv_main_return:-return}(0);
5005 }
5006 CF_EOF
5007 cf_save_LIBS="$LIBS"
5008         LIBS="-lgpm $LIBS"
5009         if { (eval echo "$as_me:5009: \"$ac_compile\"") >&5
5010   (eval $ac_compile) 2>&5
5011   ac_status=$?
5012   echo "$as_me:5012: \$? = $ac_status" >&5
5013   (exit $ac_status); } ; then
5014                 if { (eval echo "$as_me:5014: \"$ac_link\"") >&5
5015   (eval $ac_link) 2>&5
5016   ac_status=$?
5017   echo "$as_me:5017: \$? = $ac_status" >&5
5018   (exit $ac_status); } ; then
5019                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5020                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5021                 fi
5022         fi
5023 rm -f conftest*
5024 LIBS="$cf_save_LIBS"
5025 fi
5026
5027 fi
5028 echo "$as_me:5028: result: $cf_cv_gpm_soname" >&5
5029 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5030
5031                 fi
5032                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5033 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5034 EOF
5035
5036                 SHLIB_LIST="-ldl $SHLIB_LIST"
5037         else
5038                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5039                 TEST_LIBS="-lgpm $TEST_LIBS"
5040         fi
5041         cat >>confdefs.h <<\EOF
5042 #define HAVE_LIBGPM 1
5043 EOF
5044
5045 echo "$as_me:5045: checking for Gpm_Wgetch in -lgpm" >&5
5046 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5047 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5048   echo $ECHO_N "(cached) $ECHO_C" >&6
5049 else
5050   ac_check_lib_save_LIBS=$LIBS
5051 LIBS="-lgpm  $LIBS"
5052 cat >conftest.$ac_ext <<_ACEOF
5053 #line 5053 "configure"
5054 #include "confdefs.h"
5055
5056 /* Override any gcc2 internal prototype to avoid an error.  */
5057 #ifdef __cplusplus
5058 extern "C"
5059 #endif
5060 /* We use char because int might match the return type of a gcc2
5061    builtin and then its argument prototype would still apply.  */
5062 char Gpm_Wgetch ();
5063 int
5064 main ()
5065 {
5066 Gpm_Wgetch ();
5067   ;
5068   return 0;
5069 }
5070 _ACEOF
5071 rm -f conftest.$ac_objext conftest$ac_exeext
5072 if { (eval echo "$as_me:5072: \"$ac_link\"") >&5
5073   (eval $ac_link) 2>&5
5074   ac_status=$?
5075   echo "$as_me:5075: \$? = $ac_status" >&5
5076   (exit $ac_status); } &&
5077          { ac_try='test -s conftest$ac_exeext'
5078   { (eval echo "$as_me:5078: \"$ac_try\"") >&5
5079   (eval $ac_try) 2>&5
5080   ac_status=$?
5081   echo "$as_me:5081: \$? = $ac_status" >&5
5082   (exit $ac_status); }; }; then
5083   ac_cv_lib_gpm_Gpm_Wgetch=yes
5084 else
5085   echo "$as_me: failed program was:" >&5
5086 cat conftest.$ac_ext >&5
5087 ac_cv_lib_gpm_Gpm_Wgetch=no
5088 fi
5089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5090 LIBS=$ac_check_lib_save_LIBS
5091 fi
5092 echo "$as_me:5092: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5093 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5094 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5095
5096 echo "$as_me:5096: checking if GPM is weakly bound to curses library" >&5
5097 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5098 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5099   echo $ECHO_N "(cached) $ECHO_C" >&6
5100 else
5101
5102 cf_cv_check_gpm_wgetch=unknown
5103 if test "$cross_compiling" != yes ; then
5104
5105 cat >conftest.$ac_ext <<CF_EOF
5106 #include <gpm.h>
5107 int main()
5108 {
5109         Gpm_Wgetch();
5110         ${cf_cv_main_return:-return}(0);
5111 }
5112 CF_EOF
5113
5114         cf_save_LIBS="$LIBS"
5115         # This only works if we can look at the symbol table.  If a shared
5116         # library is stripped for install, we cannot use that.  So we're forced
5117         # to rely on the static library, noting that some packagers may not
5118         # include it.
5119         LIBS="-static -lgpm -dynamic $LIBS"
5120         if { (eval echo "$as_me:5120: \"$ac_compile\"") >&5
5121   (eval $ac_compile) 2>&5
5122   ac_status=$?
5123   echo "$as_me:5123: \$? = $ac_status" >&5
5124   (exit $ac_status); } ; then
5125                 if { (eval echo "$as_me:5125: \"$ac_link\"") >&5
5126   (eval $ac_link) 2>&5
5127   ac_status=$?
5128   echo "$as_me:5128: \$? = $ac_status" >&5
5129   (exit $ac_status); } ; then
5130                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5131                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5132                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5133                 fi
5134         fi
5135         rm -f conftest*
5136         LIBS="$cf_save_LIBS"
5137 fi
5138
5139 fi
5140 echo "$as_me:5140: result: $cf_cv_check_gpm_wgetch" >&5
5141 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5142
5143 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5144         { echo "$as_me:5144: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5145 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5146 fi
5147
5148 fi
5149
5150 fi
5151
5152 # not everyone has "test -c"
5153 if test -c /dev/sysmouse 2>/dev/null ; then
5154 echo "$as_me:5154: checking if you want to use sysmouse" >&5
5155 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5156
5157 # Check whether --with-sysmouse or --without-sysmouse was given.
5158 if test "${with_sysmouse+set}" = set; then
5159   withval="$with_sysmouse"
5160   cf_with_sysmouse=$withval
5161 else
5162   cf_with_sysmouse=maybe
5163 fi;
5164         if test "$cf_with_sysmouse" != no ; then
5165         cat >conftest.$ac_ext <<_ACEOF
5166 #line 5166 "configure"
5167 #include "confdefs.h"
5168
5169 #include <osreldate.h>
5170 #if (__FreeBSD_version >= 400017)
5171 #include <sys/consio.h>
5172 #include <sys/fbio.h>
5173 #else
5174 #include <machine/console.h>
5175 #endif
5176
5177 int
5178 main ()
5179 {
5180
5181         struct mouse_info the_mouse;
5182         ioctl(0, CONS_MOUSECTL, &the_mouse);
5183
5184   ;
5185   return 0;
5186 }
5187 _ACEOF
5188 rm -f conftest.$ac_objext
5189 if { (eval echo "$as_me:5189: \"$ac_compile\"") >&5
5190   (eval $ac_compile) 2>&5
5191   ac_status=$?
5192   echo "$as_me:5192: \$? = $ac_status" >&5
5193   (exit $ac_status); } &&
5194          { ac_try='test -s conftest.$ac_objext'
5195   { (eval echo "$as_me:5195: \"$ac_try\"") >&5
5196   (eval $ac_try) 2>&5
5197   ac_status=$?
5198   echo "$as_me:5198: \$? = $ac_status" >&5
5199   (exit $ac_status); }; }; then
5200   cf_with_sysmouse=yes
5201 else
5202   echo "$as_me: failed program was:" >&5
5203 cat conftest.$ac_ext >&5
5204 cf_with_sysmouse=no
5205 fi
5206 rm -f conftest.$ac_objext conftest.$ac_ext
5207         fi
5208 echo "$as_me:5208: result: $cf_with_sysmouse" >&5
5209 echo "${ECHO_T}$cf_with_sysmouse" >&6
5210 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5211 #define USE_SYSMOUSE 1
5212 EOF
5213
5214 fi
5215
5216 if test X"$CC_G_OPT" = X"" ; then
5217         CC_G_OPT='-g'
5218         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5219 fi
5220
5221 if test X"$CXX_G_OPT" = X"" ; then
5222         CXX_G_OPT='-g'
5223         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5224 fi
5225
5226 echo "$as_me:5226: checking for default loader flags" >&5
5227 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5228 case $DFT_LWR_MODEL in
5229 libtool) LD_MODEL=''   ;;
5230 normal)  LD_MODEL=''   ;;
5231 debug)   LD_MODEL=$CC_G_OPT ;;
5232 profile) LD_MODEL='-pg';;
5233 shared)  LD_MODEL=''   ;;
5234 esac
5235 echo "$as_me:5235: result: $LD_MODEL" >&5
5236 echo "${ECHO_T}$LD_MODEL" >&6
5237
5238 case $DFT_LWR_MODEL in
5239 shared)
5240
5241 echo "$as_me:5241: checking if rpath option should be used" >&5
5242 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5243
5244 # Check whether --enable-rpath or --disable-rpath was given.
5245 if test "${enable_rpath+set}" = set; then
5246   enableval="$enable_rpath"
5247   cf_cv_enable_rpath=$enableval
5248 else
5249   cf_cv_enable_rpath=no
5250 fi;
5251 echo "$as_me:5251: result: $cf_cv_enable_rpath" >&5
5252 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5253
5254 echo "$as_me:5254: checking if shared libraries should be relinked during install" >&5
5255 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5256
5257 # Check whether --enable-relink or --disable-relink was given.
5258 if test "${enable_relink+set}" = set; then
5259   enableval="$enable_relink"
5260   cf_cv_do_relink=$enableval
5261 else
5262   cf_cv_do_relink=yes
5263 fi;
5264 echo "$as_me:5264: result: $cf_cv_do_relink" >&5
5265 echo "${ECHO_T}$cf_cv_do_relink" >&6
5266         ;;
5267 esac
5268
5269 LD_RPATH_OPT=
5270 echo "$as_me:5270: checking for an rpath option" >&5
5271 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5272 case $cf_cv_system_name in #(vi
5273 irix*) #(vi
5274         if test "$GCC" = yes; then
5275                 LD_RPATH_OPT="-Wl,-rpath,"
5276         else
5277                 LD_RPATH_OPT="-rpath "
5278         fi
5279         ;;
5280 linux*|gnu*|k*bsd*-gnu) #(vi
5281         LD_RPATH_OPT="-Wl,-rpath,"
5282         ;;
5283 openbsd[2-9].*) #(vi
5284         LD_RPATH_OPT="-Wl,-rpath,"
5285         ;;
5286 freebsd*) #(vi
5287         LD_RPATH_OPT="-rpath "
5288         ;;
5289 netbsd*) #(vi
5290         LD_RPATH_OPT="-Wl,-rpath,"
5291         ;;
5292 osf*|mls+*) #(vi
5293         LD_RPATH_OPT="-rpath "
5294         ;;
5295 solaris2*) #(vi
5296         LD_RPATH_OPT="-R"
5297         ;;
5298 *)
5299         ;;
5300 esac
5301 echo "$as_me:5301: result: $LD_RPATH_OPT" >&5
5302 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5303
5304 case "x$LD_RPATH_OPT" in #(vi
5305 x-R*)
5306         echo "$as_me:5306: checking if we need a space after rpath option" >&5
5307 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5308         cf_save_LIBS="$LIBS"
5309         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5310         cat >conftest.$ac_ext <<_ACEOF
5311 #line 5311 "configure"
5312 #include "confdefs.h"
5313
5314 int
5315 main ()
5316 {
5317
5318   ;
5319   return 0;
5320 }
5321 _ACEOF
5322 rm -f conftest.$ac_objext conftest$ac_exeext
5323 if { (eval echo "$as_me:5323: \"$ac_link\"") >&5
5324   (eval $ac_link) 2>&5
5325   ac_status=$?
5326   echo "$as_me:5326: \$? = $ac_status" >&5
5327   (exit $ac_status); } &&
5328          { ac_try='test -s conftest$ac_exeext'
5329   { (eval echo "$as_me:5329: \"$ac_try\"") >&5
5330   (eval $ac_try) 2>&5
5331   ac_status=$?
5332   echo "$as_me:5332: \$? = $ac_status" >&5
5333   (exit $ac_status); }; }; then
5334   cf_rpath_space=no
5335 else
5336   echo "$as_me: failed program was:" >&5
5337 cat conftest.$ac_ext >&5
5338 cf_rpath_space=yes
5339 fi
5340 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5341         LIBS="$cf_save_LIBS"
5342         echo "$as_me:5342: result: $cf_rpath_space" >&5
5343 echo "${ECHO_T}$cf_rpath_space" >&6
5344         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5345         ;;
5346 esac
5347
5348         LOCAL_LDFLAGS=
5349         LOCAL_LDFLAGS2=
5350         LD_SHARED_OPTS=
5351         INSTALL_LIB="-m 644"
5352
5353         cf_cv_do_symlinks=no
5354         cf_ld_rpath_opt=
5355         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5356
5357         echo "$as_me:5357: checking if release/abi version should be used for shared libs" >&5
5358 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5359
5360 # Check whether --with-shlib-version or --without-shlib-version was given.
5361 if test "${with_shlib_version+set}" = set; then
5362   withval="$with_shlib_version"
5363   test -z "$withval" && withval=auto
5364         case $withval in #(vi
5365         yes) #(vi
5366                 cf_cv_shlib_version=auto
5367                 ;;
5368         rel|abi|auto|no) #(vi
5369                 cf_cv_shlib_version=$withval
5370                 ;;
5371         *)
5372                 { { echo "$as_me:5372: error: option value must be one of: rel, abi, auto or no" >&5
5373 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5374    { (exit 1); exit 1; }; }
5375                 ;;
5376         esac
5377
5378 else
5379   cf_cv_shlib_version=auto
5380 fi;
5381         echo "$as_me:5381: result: $cf_cv_shlib_version" >&5
5382 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5383
5384         cf_cv_rm_so_locs=no
5385
5386         # Some less-capable ports of gcc support only -fpic
5387         CC_SHARED_OPTS=
5388         if test "$GCC" = yes
5389         then
5390                 echo "$as_me:5390: checking which $CC option to use" >&5
5391 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5392                 cf_save_CFLAGS="$CFLAGS"
5393                 for CC_SHARED_OPTS in -fPIC -fpic ''
5394                 do
5395                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5396                         cat >conftest.$ac_ext <<_ACEOF
5397 #line 5397 "configure"
5398 #include "confdefs.h"
5399 #include <stdio.h>
5400 int
5401 main ()
5402 {
5403 int x = 1
5404   ;
5405   return 0;
5406 }
5407 _ACEOF
5408 rm -f conftest.$ac_objext
5409 if { (eval echo "$as_me:5409: \"$ac_compile\"") >&5
5410   (eval $ac_compile) 2>&5
5411   ac_status=$?
5412   echo "$as_me:5412: \$? = $ac_status" >&5
5413   (exit $ac_status); } &&
5414          { ac_try='test -s conftest.$ac_objext'
5415   { (eval echo "$as_me:5415: \"$ac_try\"") >&5
5416   (eval $ac_try) 2>&5
5417   ac_status=$?
5418   echo "$as_me:5418: \$? = $ac_status" >&5
5419   (exit $ac_status); }; }; then
5420   break
5421 else
5422   echo "$as_me: failed program was:" >&5
5423 cat conftest.$ac_ext >&5
5424 fi
5425 rm -f conftest.$ac_objext conftest.$ac_ext
5426                 done
5427                 echo "$as_me:5427: result: $CC_SHARED_OPTS" >&5
5428 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5429                 CFLAGS="$cf_save_CFLAGS"
5430         fi
5431
5432         cf_cv_shlib_version_infix=no
5433
5434         case $cf_cv_system_name in #(vi
5435         aix[56]*) #(vi
5436                 if test "$GCC" = yes; then
5437                         CC_SHARED_OPTS=
5438                         MK_SHARED_LIB="$(CC) -shared"
5439                 fi
5440                 ;;
5441         beos*) #(vi
5442                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5443                 ;;
5444         cygwin*) #(vi
5445                 CC_SHARED_OPTS=
5446                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5447                 cf_cv_shlib_version=cygdll
5448                 cf_cv_shlib_version_infix=cygdll
5449                 cat >mk_shared_lib.sh <<-CF_EOF
5450                 #!/bin/sh
5451                 SHARED_LIB=\$1
5452                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5453                 shift
5454                 cat <<-EOF
5455                 Linking shared library
5456                 ** SHARED_LIB \$SHARED_LIB
5457                 ** IMPORT_LIB \$IMPORT_LIB
5458 EOF
5459                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5460 CF_EOF
5461                 chmod +x mk_shared_lib.sh
5462                 ;;
5463         darwin*) #(vi
5464                 EXTRA_CFLAGS="-no-cpp-precomp"
5465                 CC_SHARED_OPTS="-dynamic"
5466                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5467                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5468                 cf_cv_shlib_version_infix=yes
5469                 echo "$as_me:5469: checking if ld -search_paths_first works" >&5
5470 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5471 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5472   echo $ECHO_N "(cached) $ECHO_C" >&6
5473 else
5474
5475                         cf_save_LDFLAGS=$LDFLAGS
5476                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5477                         cat >conftest.$ac_ext <<_ACEOF
5478 #line 5478 "configure"
5479 #include "confdefs.h"
5480
5481 int
5482 main ()
5483 {
5484 int i;
5485   ;
5486   return 0;
5487 }
5488 _ACEOF
5489 rm -f conftest.$ac_objext conftest$ac_exeext
5490 if { (eval echo "$as_me:5490: \"$ac_link\"") >&5
5491   (eval $ac_link) 2>&5
5492   ac_status=$?
5493   echo "$as_me:5493: \$? = $ac_status" >&5
5494   (exit $ac_status); } &&
5495          { ac_try='test -s conftest$ac_exeext'
5496   { (eval echo "$as_me:5496: \"$ac_try\"") >&5
5497   (eval $ac_try) 2>&5
5498   ac_status=$?
5499   echo "$as_me:5499: \$? = $ac_status" >&5
5500   (exit $ac_status); }; }; then
5501   cf_cv_ldflags_search_paths_first=yes
5502 else
5503   echo "$as_me: failed program was:" >&5
5504 cat conftest.$ac_ext >&5
5505 cf_cv_ldflags_search_paths_first=no
5506 fi
5507 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5508                                 LDFLAGS=$cf_save_LDFLAGS
5509 fi
5510 echo "$as_me:5510: result: $cf_cv_ldflags_search_paths_first" >&5
5511 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5512                 if test $cf_cv_ldflags_search_paths_first = yes; then
5513                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5514                 fi
5515                 ;;
5516         hpux*) #(vi
5517                 # (tested with gcc 2.7.2 -- I don't have c89)
5518                 if test "$GCC" = yes; then
5519                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5520                 else
5521                         CC_SHARED_OPTS='+Z'
5522                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5523                 fi
5524                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5525                 # HP-UX shared libraries must be executable, and should be
5526                 # readonly to exploit a quirk in the memory manager.
5527                 INSTALL_LIB="-m 555"
5528                 ;;
5529         irix*) #(vi
5530                 if test "$cf_cv_enable_rpath" = yes ; then
5531                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5532                 fi
5533                 # tested with IRIX 5.2 and 'cc'.
5534                 if test "$GCC" != yes; then
5535                         CC_SHARED_OPTS='-KPIC'
5536                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5537                 else
5538                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5539                 fi
5540                 cf_cv_rm_so_locs=yes
5541                 ;;
5542         linux*|gnu*|k*bsd*-gnu) #(vi
5543                 if test "$DFT_LWR_MODEL" = "shared" ; then
5544                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5545                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5546                 fi
5547                 if test "$cf_cv_enable_rpath" = yes ; then
5548                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5549                 fi
5550
5551         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5552         if test "$cf_cv_shlib_version" = rel; then
5553                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5554         else
5555                 cf_cv_shared_soname='`basename $@`'
5556         fi
5557
5558                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5559                 ;;
5560         openbsd[2-9].*) #(vi
5561                 if test "$DFT_LWR_MODEL" = "shared" ; then
5562                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5563                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5564                 fi
5565                 if test "$cf_cv_enable_rpath" = yes ; then
5566                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5567                 fi
5568                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5569
5570         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5571         if test "$cf_cv_shlib_version" = rel; then
5572                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5573         else
5574                 cf_cv_shared_soname='`basename $@`'
5575         fi
5576
5577                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5578                 ;;
5579         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5580                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5581                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5583                 ;;
5584         freebsd*) #(vi
5585                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5586                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5587                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5588                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5589                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5590                 fi
5591
5592         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5593         if test "$cf_cv_shlib_version" = rel; then
5594                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5595         else
5596                 cf_cv_shared_soname='`basename $@`'
5597         fi
5598
5599                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5600                 ;;
5601         netbsd*) #(vi
5602                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5603                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5604                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5605                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5606                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5607                         if test "$cf_cv_shlib_version" = auto; then
5608                         if test -f /usr/libexec/ld.elf_so; then
5609                                 cf_cv_shlib_version=abi
5610                         else
5611                                 cf_cv_shlib_version=rel
5612                         fi
5613                         fi
5614
5615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5616         if test "$cf_cv_shlib_version" = rel; then
5617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5618         else
5619                 cf_cv_shared_soname='`basename $@`'
5620         fi
5621
5622                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5623                 else
5624                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5625                 fi
5626                 ;;
5627         osf*|mls+*) #(vi
5628                 # tested with OSF/1 V3.2 and 'cc'
5629                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5630                 # link with shared libs).
5631                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5632                 case $host_os in #(vi
5633                 osf4*)
5634                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5635                         ;;
5636                 esac
5637                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5638                 if test "$DFT_LWR_MODEL" = "shared" ; then
5639                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5640                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5641                 fi
5642                 cf_cv_rm_so_locs=yes
5643                 ;;
5644         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5645                 # tested with osr5.0.5
5646                 if test "$GCC" != yes; then
5647                         CC_SHARED_OPTS='-belf -KPIC'
5648                 fi
5649                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5650                 if test "$cf_cv_enable_rpath" = yes ; then
5651                         # only way is to set LD_RUN_PATH but no switch for it
5652                         RUN_PATH=$libdir
5653                 fi
5654                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5655                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5656                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5657                 ;;
5658         sunos4*) #(vi
5659                 # tested with SunOS 4.1.1 and gcc 2.7.0
5660                 if test "$GCC" != yes; then
5661                         CC_SHARED_OPTS='-KPIC'
5662                 fi
5663                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5664                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5665                 ;;
5666         solaris2*) #(vi
5667                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5668                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5669                 if test "$DFT_LWR_MODEL" = "shared" ; then
5670                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5671                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5672                 fi
5673                 if test "$cf_cv_enable_rpath" = yes ; then
5674                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5675                 fi
5676
5677         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5678         if test "$cf_cv_shlib_version" = rel; then
5679                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5680         else
5681                 cf_cv_shared_soname='`basename $@`'
5682         fi
5683
5684                 if test "$GCC" != yes; then
5685                         cf_save_CFLAGS="$CFLAGS"
5686                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5687                         do
5688                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5689                                 cat >conftest.$ac_ext <<_ACEOF
5690 #line 5690 "configure"
5691 #include "confdefs.h"
5692 #include <stdio.h>
5693 int
5694 main ()
5695 {
5696 printf("Hello\n");
5697   ;
5698   return 0;
5699 }
5700 _ACEOF
5701 rm -f conftest.$ac_objext
5702 if { (eval echo "$as_me:5702: \"$ac_compile\"") >&5
5703   (eval $ac_compile) 2>&5
5704   ac_status=$?
5705   echo "$as_me:5705: \$? = $ac_status" >&5
5706   (exit $ac_status); } &&
5707          { ac_try='test -s conftest.$ac_objext'
5708   { (eval echo "$as_me:5708: \"$ac_try\"") >&5
5709   (eval $ac_try) 2>&5
5710   ac_status=$?
5711   echo "$as_me:5711: \$? = $ac_status" >&5
5712   (exit $ac_status); }; }; then
5713   break
5714 else
5715   echo "$as_me: failed program was:" >&5
5716 cat conftest.$ac_ext >&5
5717 fi
5718 rm -f conftest.$ac_objext conftest.$ac_ext
5719                         done
5720                         CFLAGS="$cf_save_CFLAGS"
5721                         CC_SHARED_OPTS=$cf_shared_opts
5722                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5723                 else
5724                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5725                 fi
5726                 ;;
5727         sysv5uw7*|unix_sv*) #(vi
5728                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5729                 if test "$GCC" != yes; then
5730                         CC_SHARED_OPTS='-KPIC'
5731                 fi
5732                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5733                 ;;
5734         *)
5735                 CC_SHARED_OPTS='unknown'
5736                 MK_SHARED_LIB='echo unknown'
5737                 ;;
5738         esac
5739
5740         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5741         case "$cf_cv_shlib_version" in #(vi
5742         rel|abi)
5743                 case "$MK_SHARED_LIB" in #(vi
5744                 *'-o $@') #(vi
5745                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5746                         ;;
5747                 *)
5748                         { echo "$as_me:5748: WARNING: ignored --with-shlib-version" >&5
5749 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5750                         ;;
5751                 esac
5752                 ;;
5753         esac
5754
5755         if test -n "$cf_ld_rpath_opt" ; then
5756                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5757         fi
5758
5759 if test "$CC_SHARED_OPTS" = "unknown"; then
5760         for model in $cf_list_models; do
5761                 if test "$model" = "shared"; then
5762                         { { echo "$as_me:5762: error: Shared libraries are not supported in this version" >&5
5763 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5764    { (exit 1); exit 1; }; }
5765                 fi
5766         done
5767 fi
5768
5769 ###############################################################################
5770
5771 ###     use option --disable-overwrite to leave out the link to -lcurses
5772 echo "$as_me:5772: checking if you wish to install ncurses overwriting curses" >&5
5773 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5774
5775 # Check whether --enable-overwrite or --disable-overwrite was given.
5776 if test "${enable_overwrite+set}" = set; then
5777   enableval="$enable_overwrite"
5778   with_overwrite=$enableval
5779 else
5780   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5781 fi;
5782 echo "$as_me:5782: result: $with_overwrite" >&5
5783 echo "${ECHO_T}$with_overwrite" >&6
5784
5785 echo "$as_me:5785: checking if external terminfo-database is used" >&5
5786 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5787
5788 # Check whether --enable-database or --disable-database was given.
5789 if test "${enable_database+set}" = set; then
5790   enableval="$enable_database"
5791   use_database=$enableval
5792 else
5793   use_database=yes
5794 fi;
5795 echo "$as_me:5795: result: $use_database" >&5
5796 echo "${ECHO_T}$use_database" >&6
5797
5798 case $host_os in #(vi
5799 os2*) #(vi
5800         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5801         ;;
5802 *) #(vi
5803         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5804         ;;
5805 esac
5806
5807         case $cf_cv_system_name in
5808         os2*)   PATH_SEPARATOR=';'  ;;
5809         *)      PATH_SEPARATOR=':'  ;;
5810         esac
5811
5812 if test "$use_database" != no ; then
5813         cat >>confdefs.h <<\EOF
5814 #define USE_DATABASE 1
5815 EOF
5816
5817         echo "$as_me:5817: checking which terminfo source-file will be installed" >&5
5818 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5819
5820 # Check whether --with-database or --without-database was given.
5821 if test "${with_database+set}" = set; then
5822   withval="$with_database"
5823   TERMINFO_SRC=$withval
5824 fi;
5825         echo "$as_me:5825: result: $TERMINFO_SRC" >&5
5826 echo "${ECHO_T}$TERMINFO_SRC" >&6
5827
5828         echo "$as_me:5828: checking whether to use hashed database instead of directory/tree" >&5
5829 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5830
5831 # Check whether --with-hashed-db or --without-hashed-db was given.
5832 if test "${with_hashed_db+set}" = set; then
5833   withval="$with_hashed_db"
5834
5835 else
5836   with_hashed_db=no
5837 fi;
5838         echo "$as_me:5838: result: $with_hashed_db" >&5
5839 echo "${ECHO_T}$with_hashed_db" >&6
5840 else
5841         with_hashed_db=no
5842 fi
5843
5844 echo "$as_me:5844: checking for list of fallback descriptions" >&5
5845 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5846
5847 # Check whether --with-fallbacks or --without-fallbacks was given.
5848 if test "${with_fallbacks+set}" = set; then
5849   withval="$with_fallbacks"
5850   with_fallback=$withval
5851 else
5852   with_fallback=
5853 fi;
5854 echo "$as_me:5854: result: $with_fallback" >&5
5855 echo "${ECHO_T}$with_fallback" >&6
5856 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5857
5858 echo "$as_me:5858: checking if you want modern xterm or antique" >&5
5859 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5860
5861 # Check whether --with-xterm-new or --without-xterm-new was given.
5862 if test "${with_xterm_new+set}" = set; then
5863   withval="$with_xterm_new"
5864   with_xterm_new=$withval
5865 else
5866   with_xterm_new=yes
5867 fi;
5868 case $with_xterm_new in
5869 no)     with_xterm_new=xterm-old;;
5870 *)      with_xterm_new=xterm-new;;
5871 esac
5872 echo "$as_me:5872: result: $with_xterm_new" >&5
5873 echo "${ECHO_T}$with_xterm_new" >&6
5874 WHICH_XTERM=$with_xterm_new
5875
5876 MAKE_TERMINFO=
5877 if test "$use_database" = no ; then
5878         TERMINFO="${datadir}/terminfo"
5879         MAKE_TERMINFO="#"
5880 else
5881
5882 echo "$as_me:5882: checking for list of terminfo directories" >&5
5883 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5884
5885 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5886 if test "${with_terminfo_dirs+set}" = set; then
5887   withval="$with_terminfo_dirs"
5888
5889 else
5890   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5891 fi;
5892 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5893 cf_dst_path=
5894 for cf_src_path in $withval
5895 do
5896
5897 if test "x$prefix" != xNONE; then
5898   cf_path_syntax="$prefix"
5899 else
5900   cf_path_syntax="$ac_default_prefix"
5901 fi
5902
5903 case ".$cf_src_path" in #(vi
5904 .\$\(*\)*|.\'*\'*) #(vi
5905   ;;
5906 ..|./*|.\\*) #(vi
5907   ;;
5908 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5909   ;;
5910 .\${*prefix}*) #(vi
5911   eval cf_src_path="$cf_src_path"
5912   case ".$cf_src_path" in #(vi
5913   .NONE/*)
5914     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5915     ;;
5916   esac
5917   ;; #(vi
5918 .no|.NONE/*)
5919   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5920   ;;
5921 *)
5922   { { echo "$as_me:5922: error: expected a pathname, not \"$cf_src_path\"" >&5
5923 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5924    { (exit 1); exit 1; }; }
5925   ;;
5926 esac
5927
5928   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5929   cf_dst_path="${cf_dst_path}${cf_src_path}"
5930 done
5931 IFS="$ac_save_ifs"
5932
5933 eval 'TERMINFO_DIRS="$cf_dst_path"'
5934
5935 echo "$as_me:5935: result: $TERMINFO_DIRS" >&5
5936 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5937 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5938 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5939 EOF
5940
5941 echo "$as_me:5941: checking for default terminfo directory" >&5
5942 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5943
5944 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5945 if test "${with_default_terminfo_dir+set}" = set; then
5946   withval="$with_default_terminfo_dir"
5947
5948 else
5949   withval="${TERMINFO-${datadir}/terminfo}"
5950 fi; if test -n "${datadir}/terminfo" ; then
5951
5952 if test "x$prefix" != xNONE; then
5953   cf_path_syntax="$prefix"
5954 else
5955   cf_path_syntax="$ac_default_prefix"
5956 fi
5957
5958 case ".$withval" in #(vi
5959 .\$\(*\)*|.\'*\'*) #(vi
5960   ;;
5961 ..|./*|.\\*) #(vi
5962   ;;
5963 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5964   ;;
5965 .\${*prefix}*) #(vi
5966   eval withval="$withval"
5967   case ".$withval" in #(vi
5968   .NONE/*)
5969     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5970     ;;
5971   esac
5972   ;; #(vi
5973 .no|.NONE/*)
5974   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5975   ;;
5976 *)
5977   { { echo "$as_me:5977: error: expected a pathname, not \"$withval\"" >&5
5978 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5979    { (exit 1); exit 1; }; }
5980   ;;
5981 esac
5982
5983 fi
5984 TERMINFO="$withval"
5985
5986 echo "$as_me:5986: result: $TERMINFO" >&5
5987 echo "${ECHO_T}$TERMINFO" >&6
5988 cat >>confdefs.h <<EOF
5989 #define TERMINFO "$TERMINFO"
5990 EOF
5991
5992 fi
5993
5994 ###     use option --disable-big-core to make tic run on small machines
5995 ###     We need 4Mb, check if we can allocate 50% more than that.
5996 echo "$as_me:5996: checking if big-core option selected" >&5
5997 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5998
5999 # Check whether --enable-big-core or --disable-big-core was given.
6000 if test "${enable_big_core+set}" = set; then
6001   enableval="$enable_big_core"
6002   with_big_core=$enableval
6003 else
6004   if test "$cross_compiling" = yes; then
6005   with_big_core=no
6006 else
6007   cat >conftest.$ac_ext <<_ACEOF
6008 #line 6008 "configure"
6009 #include "confdefs.h"
6010
6011 #include <stdlib.h>
6012 #include <string.h>
6013 int main() {
6014         unsigned long n = 6000000L;
6015         char *s = malloc(n);
6016         if (s != 0)
6017                 s[0] = s[n-1] = 0;
6018         ${cf_cv_main_return:-return}(s == 0);
6019 }
6020 _ACEOF
6021 rm -f conftest$ac_exeext
6022 if { (eval echo "$as_me:6022: \"$ac_link\"") >&5
6023   (eval $ac_link) 2>&5
6024   ac_status=$?
6025   echo "$as_me:6025: \$? = $ac_status" >&5
6026   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6027   { (eval echo "$as_me:6027: \"$ac_try\"") >&5
6028   (eval $ac_try) 2>&5
6029   ac_status=$?
6030   echo "$as_me:6030: \$? = $ac_status" >&5
6031   (exit $ac_status); }; }; then
6032   with_big_core=yes
6033 else
6034   echo "$as_me: program exited with status $ac_status" >&5
6035 echo "$as_me: failed program was:" >&5
6036 cat conftest.$ac_ext >&5
6037 with_big_core=no
6038 fi
6039 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6040 fi
6041 fi;
6042 echo "$as_me:6042: result: $with_big_core" >&5
6043 echo "${ECHO_T}$with_big_core" >&6
6044 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6045 #define HAVE_BIG_CORE 1
6046 EOF
6047
6048 ### ISO C only guarantees 512-char strings, we have tables which load faster
6049 ### when constructed using "big" strings.  More than the C compiler, the awk
6050 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6051 echo "$as_me:6051: checking if big-strings option selected" >&5
6052 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6053
6054 # Check whether --enable-big-strings or --disable-big-strings was given.
6055 if test "${enable_big_strings+set}" = set; then
6056   enableval="$enable_big_strings"
6057   with_big_strings=$enableval
6058 else
6059
6060         case x$AWK in #(vi
6061         x)
6062                 eval with_big_strings=no
6063                 ;;
6064         *) #(vi
6065                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6066                         | $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
6067                         eval with_big_strings=yes
6068                 else
6069                         eval with_big_strings=no
6070                 fi
6071                 ;;
6072         esac
6073
6074 fi;
6075 echo "$as_me:6075: result: $with_big_strings" >&5
6076 echo "${ECHO_T}$with_big_strings" >&6
6077
6078 USE_BIG_STRINGS=0
6079 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6080
6081 ###     use option --enable-termcap to compile in the termcap fallback support
6082 echo "$as_me:6082: checking if you want termcap-fallback support" >&5
6083 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6084
6085 # Check whether --enable-termcap or --disable-termcap was given.
6086 if test "${enable_termcap+set}" = set; then
6087   enableval="$enable_termcap"
6088   with_termcap=$enableval
6089 else
6090   with_termcap=no
6091 fi;
6092 echo "$as_me:6092: result: $with_termcap" >&5
6093 echo "${ECHO_T}$with_termcap" >&6
6094
6095 if test "$with_termcap" != "yes" ; then
6096         if test "$use_database" = no ; then
6097                 if test -z "$with_fallback" ; then
6098                         { { echo "$as_me:6098: error: You have disabled the database w/o specifying fallbacks" >&5
6099 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6100    { (exit 1); exit 1; }; }
6101                 fi
6102         fi
6103         cat >>confdefs.h <<\EOF
6104 #define PURE_TERMINFO 1
6105 EOF
6106
6107 else
6108
6109 if test "$with_ticlib" != no ; then
6110         { { echo "$as_me:6110: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6111 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6112    { (exit 1); exit 1; }; }
6113 fi
6114
6115 cat >>confdefs.h <<\EOF
6116 #define USE_TERMCAP 1
6117 EOF
6118
6119 echo "$as_me:6119: checking for list of termcap files" >&5
6120 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6121
6122 # Check whether --with-termpath or --without-termpath was given.
6123 if test "${with_termpath+set}" = set; then
6124   withval="$with_termpath"
6125
6126 else
6127   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6128 fi;
6129 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6130 cf_dst_path=
6131 for cf_src_path in $withval
6132 do
6133
6134 if test "x$prefix" != xNONE; then
6135   cf_path_syntax="$prefix"
6136 else
6137   cf_path_syntax="$ac_default_prefix"
6138 fi
6139
6140 case ".$cf_src_path" in #(vi
6141 .\$\(*\)*|.\'*\'*) #(vi
6142   ;;
6143 ..|./*|.\\*) #(vi
6144   ;;
6145 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6146   ;;
6147 .\${*prefix}*) #(vi
6148   eval cf_src_path="$cf_src_path"
6149   case ".$cf_src_path" in #(vi
6150   .NONE/*)
6151     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6152     ;;
6153   esac
6154   ;; #(vi
6155 .no|.NONE/*)
6156   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6157   ;;
6158 *)
6159   { { echo "$as_me:6159: error: expected a pathname, not \"$cf_src_path\"" >&5
6160 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6161    { (exit 1); exit 1; }; }
6162   ;;
6163 esac
6164
6165   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6166   cf_dst_path="${cf_dst_path}${cf_src_path}"
6167 done
6168 IFS="$ac_save_ifs"
6169
6170 eval 'TERMPATH="$cf_dst_path"'
6171
6172 echo "$as_me:6172: result: $TERMPATH" >&5
6173 echo "${ECHO_T}$TERMPATH" >&6
6174 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6175 #define TERMPATH "$TERMPATH"
6176 EOF
6177
6178 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6179 echo "$as_me:6179: checking if fast termcap-loader is needed" >&5
6180 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6181
6182 # Check whether --enable-getcap or --disable-getcap was given.
6183 if test "${enable_getcap+set}" = set; then
6184   enableval="$enable_getcap"
6185   with_getcap=$enableval
6186 else
6187   with_getcap=no
6188 fi;
6189 echo "$as_me:6189: result: $with_getcap" >&5
6190 echo "${ECHO_T}$with_getcap" >&6
6191 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6192 #define USE_GETCAP 1
6193 EOF
6194
6195 echo "$as_me:6195: checking if translated termcaps will be cached in ~/.terminfo" >&5
6196 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6197
6198 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6199 if test "${enable_getcap_cache+set}" = set; then
6200   enableval="$enable_getcap_cache"
6201   with_getcap_cache=$enableval
6202 else
6203   with_getcap_cache=no
6204 fi;
6205 echo "$as_me:6205: result: $with_getcap_cache" >&5
6206 echo "${ECHO_T}$with_getcap_cache" >&6
6207 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6208 #define USE_GETCAP_CACHE 1
6209 EOF
6210
6211 fi
6212
6213 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6214 echo "$as_me:6214: checking if ~/.terminfo is wanted" >&5
6215 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6216
6217 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6218 if test "${enable_home_terminfo+set}" = set; then
6219   enableval="$enable_home_terminfo"
6220   with_home_terminfo=$enableval
6221 else
6222   with_home_terminfo=yes
6223 fi;
6224 echo "$as_me:6224: result: $with_home_terminfo" >&5
6225 echo "${ECHO_T}$with_home_terminfo" >&6
6226 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6227 #define USE_HOME_TERMINFO 1
6228 EOF
6229
6230 echo "$as_me:6230: checking if you want to use restricted environment when running as root" >&5
6231 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6232
6233 # Check whether --enable-root-environ or --disable-root-environ was given.
6234 if test "${enable_root_environ+set}" = set; then
6235   enableval="$enable_root_environ"
6236   with_root_environ=$enableval
6237 else
6238   with_root_environ=yes
6239 fi;
6240 echo "$as_me:6240: result: $with_root_environ" >&5
6241 echo "${ECHO_T}$with_root_environ" >&6
6242 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6243 #define USE_ROOT_ENVIRON 1
6244 EOF
6245
6246 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6247 ###   to reduce storage requirements for the terminfo database.
6248
6249 for ac_func in \
6250         remove \
6251         unlink
6252 do
6253 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6254 echo "$as_me:6254: checking for $ac_func" >&5
6255 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6256 if eval "test \"\${$as_ac_var+set}\" = set"; then
6257   echo $ECHO_N "(cached) $ECHO_C" >&6
6258 else
6259   cat >conftest.$ac_ext <<_ACEOF
6260 #line 6260 "configure"
6261 #include "confdefs.h"
6262 /* System header to define __stub macros and hopefully few prototypes,
6263     which can conflict with char $ac_func (); below.  */
6264 #include <assert.h>
6265 /* Override any gcc2 internal prototype to avoid an error.  */
6266 #ifdef __cplusplus
6267 extern "C"
6268 #endif
6269 /* We use char because int might match the return type of a gcc2
6270    builtin and then its argument prototype would still apply.  */
6271 char $ac_func ();
6272 char (*f) ();
6273
6274 int
6275 main ()
6276 {
6277 /* The GNU C library defines this for functions which it implements
6278     to always fail with ENOSYS.  Some functions are actually named
6279     something starting with __ and the normal name is an alias.  */
6280 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6281 choke me
6282 #else
6283 f = $ac_func;
6284 #endif
6285
6286   ;
6287   return 0;
6288 }
6289 _ACEOF
6290 rm -f conftest.$ac_objext conftest$ac_exeext
6291 if { (eval echo "$as_me:6291: \"$ac_link\"") >&5
6292   (eval $ac_link) 2>&5
6293   ac_status=$?
6294   echo "$as_me:6294: \$? = $ac_status" >&5
6295   (exit $ac_status); } &&
6296          { ac_try='test -s conftest$ac_exeext'
6297   { (eval echo "$as_me:6297: \"$ac_try\"") >&5
6298   (eval $ac_try) 2>&5
6299   ac_status=$?
6300   echo "$as_me:6300: \$? = $ac_status" >&5
6301   (exit $ac_status); }; }; then
6302   eval "$as_ac_var=yes"
6303 else
6304   echo "$as_me: failed program was:" >&5
6305 cat conftest.$ac_ext >&5
6306 eval "$as_ac_var=no"
6307 fi
6308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6309 fi
6310 echo "$as_me:6310: result: `eval echo '${'$as_ac_var'}'`" >&5
6311 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6312 if test `eval echo '${'$as_ac_var'}'` = yes; then
6313   cat >>confdefs.h <<EOF
6314 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6315 EOF
6316
6317 fi
6318 done
6319
6320 if test "$cross_compiling" = yes ; then
6321
6322 for ac_func in \
6323                 link \
6324                 symlink
6325 do
6326 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6327 echo "$as_me:6327: checking for $ac_func" >&5
6328 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6329 if eval "test \"\${$as_ac_var+set}\" = set"; then
6330   echo $ECHO_N "(cached) $ECHO_C" >&6
6331 else
6332   cat >conftest.$ac_ext <<_ACEOF
6333 #line 6333 "configure"
6334 #include "confdefs.h"
6335 /* System header to define __stub macros and hopefully few prototypes,
6336     which can conflict with char $ac_func (); below.  */
6337 #include <assert.h>
6338 /* Override any gcc2 internal prototype to avoid an error.  */
6339 #ifdef __cplusplus
6340 extern "C"
6341 #endif
6342 /* We use char because int might match the return type of a gcc2
6343    builtin and then its argument prototype would still apply.  */
6344 char $ac_func ();
6345 char (*f) ();
6346
6347 int
6348 main ()
6349 {
6350 /* The GNU C library defines this for functions which it implements
6351     to always fail with ENOSYS.  Some functions are actually named
6352     something starting with __ and the normal name is an alias.  */
6353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6354 choke me
6355 #else
6356 f = $ac_func;
6357 #endif
6358
6359   ;
6360   return 0;
6361 }
6362 _ACEOF
6363 rm -f conftest.$ac_objext conftest$ac_exeext
6364 if { (eval echo "$as_me:6364: \"$ac_link\"") >&5
6365   (eval $ac_link) 2>&5
6366   ac_status=$?
6367   echo "$as_me:6367: \$? = $ac_status" >&5
6368   (exit $ac_status); } &&
6369          { ac_try='test -s conftest$ac_exeext'
6370   { (eval echo "$as_me:6370: \"$ac_try\"") >&5
6371   (eval $ac_try) 2>&5
6372   ac_status=$?
6373   echo "$as_me:6373: \$? = $ac_status" >&5
6374   (exit $ac_status); }; }; then
6375   eval "$as_ac_var=yes"
6376 else
6377   echo "$as_me: failed program was:" >&5
6378 cat conftest.$ac_ext >&5
6379 eval "$as_ac_var=no"
6380 fi
6381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6382 fi
6383 echo "$as_me:6383: result: `eval echo '${'$as_ac_var'}'`" >&5
6384 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6385 if test `eval echo '${'$as_ac_var'}'` = yes; then
6386   cat >>confdefs.h <<EOF
6387 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6388 EOF
6389
6390 fi
6391 done
6392
6393 else
6394         echo "$as_me:6394: checking if link/symlink functions work" >&5
6395 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6396 if test "${cf_cv_link_funcs+set}" = set; then
6397   echo $ECHO_N "(cached) $ECHO_C" >&6
6398 else
6399
6400                 cf_cv_link_funcs=
6401                 for cf_func in link symlink ; do
6402                         if test "$cross_compiling" = yes; then
6403
6404                         eval 'ac_cv_func_'$cf_func'=error'
6405 else
6406   cat >conftest.$ac_ext <<_ACEOF
6407 #line 6407 "configure"
6408 #include "confdefs.h"
6409
6410 #include <sys/types.h>
6411 #include <sys/stat.h>
6412 #ifdef HAVE_UNISTD_H
6413 #include <unistd.h>
6414 #endif
6415 int main()
6416 {
6417         int fail = 0;
6418         char *src = "config.log";
6419         char *dst = "conftest.chk";
6420         struct stat src_sb;
6421         struct stat dst_sb;
6422
6423         stat(src, &src_sb);
6424         fail = ($cf_func("config.log", "conftest.chk") < 0)
6425             || (stat(dst, &dst_sb) < 0)
6426             || (dst_sb.st_mtime != src_sb.st_mtime);
6427 #ifdef HAVE_UNLINK
6428         unlink(dst);
6429 #else
6430         remove(dst);
6431 #endif
6432         ${cf_cv_main_return:-return} (fail);
6433 }
6434
6435 _ACEOF
6436 rm -f conftest$ac_exeext
6437 if { (eval echo "$as_me:6437: \"$ac_link\"") >&5
6438   (eval $ac_link) 2>&5
6439   ac_status=$?
6440   echo "$as_me:6440: \$? = $ac_status" >&5
6441   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6442   { (eval echo "$as_me:6442: \"$ac_try\"") >&5
6443   (eval $ac_try) 2>&5
6444   ac_status=$?
6445   echo "$as_me:6445: \$? = $ac_status" >&5
6446   (exit $ac_status); }; }; then
6447
6448                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6449                         eval 'ac_cv_func_'$cf_func'=yes'
6450 else
6451   echo "$as_me: program exited with status $ac_status" >&5
6452 echo "$as_me: failed program was:" >&5
6453 cat conftest.$ac_ext >&5
6454
6455                         eval 'ac_cv_func_'$cf_func'=no'
6456 fi
6457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6458 fi
6459                 done
6460                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6461
6462 fi
6463 echo "$as_me:6463: result: $cf_cv_link_funcs" >&5
6464 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6465         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6466 #define HAVE_LINK 1
6467 EOF
6468
6469         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6470 #define HAVE_SYMLINK 1
6471 EOF
6472
6473 fi
6474
6475 with_links=no
6476 with_symlinks=no
6477
6478 # soft links (symbolic links) are useful for some systems where hard links do
6479 # not work, or to make it simpler to copy terminfo trees around.
6480 if test "$ac_cv_func_symlink" = yes ; then
6481     echo "$as_me:6481: checking if tic should use symbolic links" >&5
6482 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6483
6484 # Check whether --enable-symlinks or --disable-symlinks was given.
6485 if test "${enable_symlinks+set}" = set; then
6486   enableval="$enable_symlinks"
6487   with_symlinks=$enableval
6488 else
6489   with_symlinks=no
6490 fi;
6491     echo "$as_me:6491: result: $with_symlinks" >&5
6492 echo "${ECHO_T}$with_symlinks" >&6
6493 fi
6494
6495 # If we have hard links and did not choose to use soft links instead, there is
6496 # no reason to make this choice optional - use the hard links.
6497 if test "$with_symlinks" = no ; then
6498     echo "$as_me:6498: checking if tic should use hard links" >&5
6499 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6500     if test "$ac_cv_func_link" = yes ; then
6501         with_links=yes
6502     else
6503         with_links=no
6504     fi
6505     echo "$as_me:6505: result: $with_links" >&5
6506 echo "${ECHO_T}$with_links" >&6
6507 fi
6508
6509 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6510 #define USE_LINKS 1
6511 EOF
6512
6513 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6514 #define USE_SYMLINKS 1
6515 EOF
6516
6517 ###   use option --enable-broken-linker to force on use of broken-linker support
6518 echo "$as_me:6518: checking if you want broken-linker support code" >&5
6519 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6520
6521 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6522 if test "${enable_broken_linker+set}" = set; then
6523   enableval="$enable_broken_linker"
6524   with_broken_linker=$enableval
6525 else
6526   with_broken_linker=${BROKEN_LINKER-no}
6527 fi;
6528 echo "$as_me:6528: result: $with_broken_linker" >&5
6529 echo "${ECHO_T}$with_broken_linker" >&6
6530
6531 BROKEN_LINKER=0
6532 if test "$with_broken_linker" = yes ; then
6533         cat >>confdefs.h <<\EOF
6534 #define BROKEN_LINKER 1
6535 EOF
6536
6537         BROKEN_LINKER=1
6538 elif test "$DFT_LWR_MODEL" = shared ; then
6539         case $cf_cv_system_name in #(vi
6540         cygwin*)
6541                 cat >>confdefs.h <<\EOF
6542 #define BROKEN_LINKER 1
6543 EOF
6544
6545                 BROKEN_LINKER=1
6546                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6547
6548 echo "${as_me-configure}:6548: testing cygwin linker is broken anyway ..." 1>&5
6549
6550                 ;;
6551         esac
6552 fi
6553
6554 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6555 echo "$as_me:6555: checking if tputs should process BSD-style prefix padding" >&5
6556 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6557
6558 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6559 if test "${enable_bsdpad+set}" = set; then
6560   enableval="$enable_bsdpad"
6561   with_bsdpad=$enableval
6562 else
6563   with_bsdpad=no
6564 fi;
6565 echo "$as_me:6565: result: $with_bsdpad" >&5
6566 echo "${ECHO_T}$with_bsdpad" >&6
6567 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6568 #define BSD_TPUTS 1
6569 EOF
6570
6571 ###   use option --enable-widec to turn on use of wide-character support
6572 NCURSES_CH_T=chtype
6573 NCURSES_LIBUTF8=0
6574
6575 NEED_WCHAR_H=0
6576 NCURSES_MBSTATE_T=0
6577 NCURSES_WCHAR_T=0
6578 NCURSES_WINT_T=0
6579
6580 # Check to define _XOPEN_SOURCE "automatically"
6581
6582 cf_XOPEN_SOURCE=500
6583 cf_POSIX_C_SOURCE=199506L
6584 cf_xopen_source=
6585
6586 case $host_os in #(vi
6587 aix[456]*) #(vi
6588         cf_xopen_source="-D_ALL_SOURCE"
6589         ;;
6590 darwin[0-8].*) #(vi
6591         cf_xopen_source="-D_APPLE_C_SOURCE"
6592         ;;
6593 darwin*) #(vi
6594         cf_xopen_source="-D_DARWIN_C_SOURCE"
6595         ;;
6596 freebsd*|dragonfly*) #(vi
6597         # 5.x headers associate
6598         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6599         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6600         cf_POSIX_C_SOURCE=200112L
6601         cf_XOPEN_SOURCE=600
6602         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6603         ;;
6604 hpux11*) #(vi
6605         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6606         ;;
6607 hpux*) #(vi
6608         cf_xopen_source="-D_HPUX_SOURCE"
6609         ;;
6610 irix[56].*) #(vi
6611         cf_xopen_source="-D_SGI_SOURCE"
6612         ;;
6613 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6614
6615 echo "$as_me:6615: checking if we must define _GNU_SOURCE" >&5
6616 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6617 if test "${cf_cv_gnu_source+set}" = set; then
6618   echo $ECHO_N "(cached) $ECHO_C" >&6
6619 else
6620
6621 cat >conftest.$ac_ext <<_ACEOF
6622 #line 6622 "configure"
6623 #include "confdefs.h"
6624 #include <sys/types.h>
6625 int
6626 main ()
6627 {
6628
6629 #ifndef _XOPEN_SOURCE
6630 make an error
6631 #endif
6632   ;
6633   return 0;
6634 }
6635 _ACEOF
6636 rm -f conftest.$ac_objext
6637 if { (eval echo "$as_me:6637: \"$ac_compile\"") >&5
6638   (eval $ac_compile) 2>&5
6639   ac_status=$?
6640   echo "$as_me:6640: \$? = $ac_status" >&5
6641   (exit $ac_status); } &&
6642          { ac_try='test -s conftest.$ac_objext'
6643   { (eval echo "$as_me:6643: \"$ac_try\"") >&5
6644   (eval $ac_try) 2>&5
6645   ac_status=$?
6646   echo "$as_me:6646: \$? = $ac_status" >&5
6647   (exit $ac_status); }; }; then
6648   cf_cv_gnu_source=no
6649 else
6650   echo "$as_me: failed program was:" >&5
6651 cat conftest.$ac_ext >&5
6652 cf_save="$CPPFLAGS"
6653          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6654          cat >conftest.$ac_ext <<_ACEOF
6655 #line 6655 "configure"
6656 #include "confdefs.h"
6657 #include <sys/types.h>
6658 int
6659 main ()
6660 {
6661
6662 #ifdef _XOPEN_SOURCE
6663 make an error
6664 #endif
6665   ;
6666   return 0;
6667 }
6668 _ACEOF
6669 rm -f conftest.$ac_objext
6670 if { (eval echo "$as_me:6670: \"$ac_compile\"") >&5
6671   (eval $ac_compile) 2>&5
6672   ac_status=$?
6673   echo "$as_me:6673: \$? = $ac_status" >&5
6674   (exit $ac_status); } &&
6675          { ac_try='test -s conftest.$ac_objext'
6676   { (eval echo "$as_me:6676: \"$ac_try\"") >&5
6677   (eval $ac_try) 2>&5
6678   ac_status=$?
6679   echo "$as_me:6679: \$? = $ac_status" >&5
6680   (exit $ac_status); }; }; then
6681   cf_cv_gnu_source=no
6682 else
6683   echo "$as_me: failed program was:" >&5
6684 cat conftest.$ac_ext >&5
6685 cf_cv_gnu_source=yes
6686 fi
6687 rm -f conftest.$ac_objext conftest.$ac_ext
6688         CPPFLAGS="$cf_save"
6689
6690 fi
6691 rm -f conftest.$ac_objext conftest.$ac_ext
6692
6693 fi
6694 echo "$as_me:6694: result: $cf_cv_gnu_source" >&5
6695 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6696 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6697
6698         ;;
6699 mirbsd*) #(vi
6700         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6701         ;;
6702 netbsd*) #(vi
6703         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6704         ;;
6705 openbsd*) #(vi
6706         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6707         ;;
6708 osf[45]*) #(vi
6709         cf_xopen_source="-D_OSF_SOURCE"
6710         ;;
6711 nto-qnx*) #(vi
6712         cf_xopen_source="-D_QNX_SOURCE"
6713         ;;
6714 sco*) #(vi
6715         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6716         ;;
6717 solaris2.1[0-9]) #(vi
6718         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6719         ;;
6720 solaris2.[1-9]) #(vi
6721         cf_xopen_source="-D__EXTENSIONS__"
6722         ;;
6723 *)
6724         echo "$as_me:6724: checking if we should define _XOPEN_SOURCE" >&5
6725 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6726 if test "${cf_cv_xopen_source+set}" = set; then
6727   echo $ECHO_N "(cached) $ECHO_C" >&6
6728 else
6729
6730         cat >conftest.$ac_ext <<_ACEOF
6731 #line 6731 "configure"
6732 #include "confdefs.h"
6733 #include <sys/types.h>
6734 int
6735 main ()
6736 {
6737
6738 #ifndef _XOPEN_SOURCE
6739 make an error
6740 #endif
6741   ;
6742   return 0;
6743 }
6744 _ACEOF
6745 rm -f conftest.$ac_objext
6746 if { (eval echo "$as_me:6746: \"$ac_compile\"") >&5
6747   (eval $ac_compile) 2>&5
6748   ac_status=$?
6749   echo "$as_me:6749: \$? = $ac_status" >&5
6750   (exit $ac_status); } &&
6751          { ac_try='test -s conftest.$ac_objext'
6752   { (eval echo "$as_me:6752: \"$ac_try\"") >&5
6753   (eval $ac_try) 2>&5
6754   ac_status=$?
6755   echo "$as_me:6755: \$? = $ac_status" >&5
6756   (exit $ac_status); }; }; then
6757   cf_cv_xopen_source=no
6758 else
6759   echo "$as_me: failed program was:" >&5
6760 cat conftest.$ac_ext >&5
6761 cf_save="$CPPFLAGS"
6762          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6763          cat >conftest.$ac_ext <<_ACEOF
6764 #line 6764 "configure"
6765 #include "confdefs.h"
6766 #include <sys/types.h>
6767 int
6768 main ()
6769 {
6770
6771 #ifdef _XOPEN_SOURCE
6772 make an error
6773 #endif
6774   ;
6775   return 0;
6776 }
6777 _ACEOF
6778 rm -f conftest.$ac_objext
6779 if { (eval echo "$as_me:6779: \"$ac_compile\"") >&5
6780   (eval $ac_compile) 2>&5
6781   ac_status=$?
6782   echo "$as_me:6782: \$? = $ac_status" >&5
6783   (exit $ac_status); } &&
6784          { ac_try='test -s conftest.$ac_objext'
6785   { (eval echo "$as_me:6785: \"$ac_try\"") >&5
6786   (eval $ac_try) 2>&5
6787   ac_status=$?
6788   echo "$as_me:6788: \$? = $ac_status" >&5
6789   (exit $ac_status); }; }; then
6790   cf_cv_xopen_source=no
6791 else
6792   echo "$as_me: failed program was:" >&5
6793 cat conftest.$ac_ext >&5
6794 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6795 fi
6796 rm -f conftest.$ac_objext conftest.$ac_ext
6797         CPPFLAGS="$cf_save"
6798
6799 fi
6800 rm -f conftest.$ac_objext conftest.$ac_ext
6801
6802 fi
6803 echo "$as_me:6803: result: $cf_cv_xopen_source" >&5
6804 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6805         if test "$cf_cv_xopen_source" != no ; then
6806
6807 CFLAGS=`echo "$CFLAGS" | \
6808         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6809                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6810
6811 CPPFLAGS=`echo "$CPPFLAGS" | \
6812         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6813                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6814
6815                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6816
6817 cf_fix_cppflags=no
6818 cf_new_cflags=
6819 cf_new_cppflags=
6820 cf_new_extra_cppflags=
6821
6822 for cf_add_cflags in $cf_temp_xopen_source
6823 do
6824 case $cf_fix_cppflags in
6825 no)
6826         case $cf_add_cflags in #(vi
6827         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6828                 case $cf_add_cflags in
6829                 -D*)
6830                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6831
6832                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6833                                 && test -z "${cf_tst_cflags}" \
6834                                 && cf_fix_cppflags=yes
6835
6836                         if test $cf_fix_cppflags = yes ; then
6837                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6838                                 continue
6839                         elif test "${cf_tst_cflags}" = "\"'" ; then
6840                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6841                                 continue
6842                         fi
6843                         ;;
6844                 esac
6845                 case "$CPPFLAGS" in
6846                 *$cf_add_cflags) #(vi
6847                         ;;
6848                 *) #(vi
6849                         case $cf_add_cflags in #(vi
6850                         -D*)
6851                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6852
6853 CPPFLAGS=`echo "$CPPFLAGS" | \
6854         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6855                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6856
6857                                 ;;
6858                         esac
6859                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6860                         ;;
6861                 esac
6862                 ;;
6863         *)
6864                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6865                 ;;
6866         esac
6867         ;;
6868 yes)
6869         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6870
6871         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6872
6873         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6874                 && test -z "${cf_tst_cflags}" \
6875                 && cf_fix_cppflags=no
6876         ;;
6877 esac
6878 done
6879
6880 if test -n "$cf_new_cflags" ; then
6881
6882         CFLAGS="$CFLAGS $cf_new_cflags"
6883 fi
6884
6885 if test -n "$cf_new_cppflags" ; then
6886
6887         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6888 fi
6889
6890 if test -n "$cf_new_extra_cppflags" ; then
6891
6892         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6893 fi
6894
6895         fi
6896
6897 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6898
6899 cf_save_CFLAGS="$CFLAGS"
6900 cf_save_CPPFLAGS="$CPPFLAGS"
6901
6902 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6903         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6904                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6905
6906 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6907         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6908                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6909
6910 echo "$as_me:6910: checking if we should define _POSIX_C_SOURCE" >&5
6911 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6912 if test "${cf_cv_posix_c_source+set}" = set; then
6913   echo $ECHO_N "(cached) $ECHO_C" >&6
6914 else
6915
6916 echo "${as_me-configure}:6916: testing if the symbol is already defined go no further ..." 1>&5
6917
6918         cat >conftest.$ac_ext <<_ACEOF
6919 #line 6919 "configure"
6920 #include "confdefs.h"
6921 #include <sys/types.h>
6922 int
6923 main ()
6924 {
6925
6926 #ifndef _POSIX_C_SOURCE
6927 make an error
6928 #endif
6929   ;
6930   return 0;
6931 }
6932 _ACEOF
6933 rm -f conftest.$ac_objext
6934 if { (eval echo "$as_me:6934: \"$ac_compile\"") >&5
6935   (eval $ac_compile) 2>&5
6936   ac_status=$?
6937   echo "$as_me:6937: \$? = $ac_status" >&5
6938   (exit $ac_status); } &&
6939          { ac_try='test -s conftest.$ac_objext'
6940   { (eval echo "$as_me:6940: \"$ac_try\"") >&5
6941   (eval $ac_try) 2>&5
6942   ac_status=$?
6943   echo "$as_me:6943: \$? = $ac_status" >&5
6944   (exit $ac_status); }; }; then
6945   cf_cv_posix_c_source=no
6946 else
6947   echo "$as_me: failed program was:" >&5
6948 cat conftest.$ac_ext >&5
6949 cf_want_posix_source=no
6950          case .$cf_POSIX_C_SOURCE in #(vi
6951          .[12]??*) #(vi
6952                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6953                 ;;
6954          .2) #(vi
6955                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6956                 cf_want_posix_source=yes
6957                 ;;
6958          .*)
6959                 cf_want_posix_source=yes
6960                 ;;
6961          esac
6962          if test "$cf_want_posix_source" = yes ; then
6963                 cat >conftest.$ac_ext <<_ACEOF
6964 #line 6964 "configure"
6965 #include "confdefs.h"
6966 #include <sys/types.h>
6967 int
6968 main ()
6969 {
6970
6971 #ifdef _POSIX_SOURCE
6972 make an error
6973 #endif
6974   ;
6975   return 0;
6976 }
6977 _ACEOF
6978 rm -f conftest.$ac_objext
6979 if { (eval echo "$as_me:6979: \"$ac_compile\"") >&5
6980   (eval $ac_compile) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); } &&
6984          { ac_try='test -s conftest.$ac_objext'
6985   { (eval echo "$as_me:6985: \"$ac_try\"") >&5
6986   (eval $ac_try) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); }; }; then
6990   :
6991 else
6992   echo "$as_me: failed program was:" >&5
6993 cat conftest.$ac_ext >&5
6994 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6995 fi
6996 rm -f conftest.$ac_objext conftest.$ac_ext
6997          fi
6998
6999 echo "${as_me-configure}:6999: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7000
7001          CFLAGS="$cf_trim_CFLAGS"
7002          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7003
7004 echo "${as_me-configure}:7004: testing if the second compile does not leave our definition intact error ..." 1>&5
7005
7006          cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009 #include <sys/types.h>
7010 int
7011 main ()
7012 {
7013
7014 #ifndef _POSIX_C_SOURCE
7015 make an error
7016 #endif
7017   ;
7018   return 0;
7019 }
7020 _ACEOF
7021 rm -f conftest.$ac_objext
7022 if { (eval echo "$as_me:7022: \"$ac_compile\"") >&5
7023   (eval $ac_compile) 2>&5
7024   ac_status=$?
7025   echo "$as_me:7025: \$? = $ac_status" >&5
7026   (exit $ac_status); } &&
7027          { ac_try='test -s conftest.$ac_objext'
7028   { (eval echo "$as_me:7028: \"$ac_try\"") >&5
7029   (eval $ac_try) 2>&5
7030   ac_status=$?
7031   echo "$as_me:7031: \$? = $ac_status" >&5
7032   (exit $ac_status); }; }; then
7033   :
7034 else
7035   echo "$as_me: failed program was:" >&5
7036 cat conftest.$ac_ext >&5
7037 cf_cv_posix_c_source=no
7038 fi
7039 rm -f conftest.$ac_objext conftest.$ac_ext
7040          CFLAGS="$cf_save_CFLAGS"
7041          CPPFLAGS="$cf_save_CPPFLAGS"
7042
7043 fi
7044 rm -f conftest.$ac_objext conftest.$ac_ext
7045
7046 fi
7047 echo "$as_me:7047: result: $cf_cv_posix_c_source" >&5
7048 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7049
7050 if test "$cf_cv_posix_c_source" != no ; then
7051         CFLAGS="$cf_trim_CFLAGS"
7052         CPPFLAGS="$cf_trim_CPPFLAGS"
7053
7054 cf_fix_cppflags=no
7055 cf_new_cflags=
7056 cf_new_cppflags=
7057 cf_new_extra_cppflags=
7058
7059 for cf_add_cflags in $cf_cv_posix_c_source
7060 do
7061 case $cf_fix_cppflags in
7062 no)
7063         case $cf_add_cflags in #(vi
7064         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7065                 case $cf_add_cflags in
7066                 -D*)
7067                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7068
7069                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7070                                 && test -z "${cf_tst_cflags}" \
7071                                 && cf_fix_cppflags=yes
7072
7073                         if test $cf_fix_cppflags = yes ; then
7074                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7075                                 continue
7076                         elif test "${cf_tst_cflags}" = "\"'" ; then
7077                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7078                                 continue
7079                         fi
7080                         ;;
7081                 esac
7082                 case "$CPPFLAGS" in
7083                 *$cf_add_cflags) #(vi
7084                         ;;
7085                 *) #(vi
7086                         case $cf_add_cflags in #(vi
7087                         -D*)
7088                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7089
7090 CPPFLAGS=`echo "$CPPFLAGS" | \
7091         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7092                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7093
7094                                 ;;
7095                         esac
7096                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7097                         ;;
7098                 esac
7099                 ;;
7100         *)
7101                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7102                 ;;
7103         esac
7104         ;;
7105 yes)
7106         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7107
7108         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7109
7110         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7111                 && test -z "${cf_tst_cflags}" \
7112                 && cf_fix_cppflags=no
7113         ;;
7114 esac
7115 done
7116
7117 if test -n "$cf_new_cflags" ; then
7118
7119         CFLAGS="$CFLAGS $cf_new_cflags"
7120 fi
7121
7122 if test -n "$cf_new_cppflags" ; then
7123
7124         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7125 fi
7126
7127 if test -n "$cf_new_extra_cppflags" ; then
7128
7129         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7130 fi
7131
7132 fi
7133
7134         ;;
7135 esac
7136
7137 if test -n "$cf_xopen_source" ; then
7138
7139 cf_fix_cppflags=no
7140 cf_new_cflags=
7141 cf_new_cppflags=
7142 cf_new_extra_cppflags=
7143
7144 for cf_add_cflags in $cf_xopen_source
7145 do
7146 case $cf_fix_cppflags in
7147 no)
7148         case $cf_add_cflags in #(vi
7149         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7150                 case $cf_add_cflags in
7151                 -D*)
7152                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7153
7154                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7155                                 && test -z "${cf_tst_cflags}" \
7156                                 && cf_fix_cppflags=yes
7157
7158                         if test $cf_fix_cppflags = yes ; then
7159                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7160                                 continue
7161                         elif test "${cf_tst_cflags}" = "\"'" ; then
7162                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7163                                 continue
7164                         fi
7165                         ;;
7166                 esac
7167                 case "$CPPFLAGS" in
7168                 *$cf_add_cflags) #(vi
7169                         ;;
7170                 *) #(vi
7171                         case $cf_add_cflags in #(vi
7172                         -D*)
7173                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7174
7175 CPPFLAGS=`echo "$CPPFLAGS" | \
7176         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7177                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7178
7179                                 ;;
7180                         esac
7181                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7182                         ;;
7183                 esac
7184                 ;;
7185         *)
7186                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7187                 ;;
7188         esac
7189         ;;
7190 yes)
7191         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7192
7193         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7194
7195         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7196                 && test -z "${cf_tst_cflags}" \
7197                 && cf_fix_cppflags=no
7198         ;;
7199 esac
7200 done
7201
7202 if test -n "$cf_new_cflags" ; then
7203
7204         CFLAGS="$CFLAGS $cf_new_cflags"
7205 fi
7206
7207 if test -n "$cf_new_cppflags" ; then
7208
7209         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7210 fi
7211
7212 if test -n "$cf_new_extra_cppflags" ; then
7213
7214         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7215 fi
7216
7217 fi
7218
7219 # Work around breakage on OS X
7220
7221 echo "$as_me:7221: checking if SIGWINCH is defined" >&5
7222 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7223 if test "${cf_cv_define_sigwinch+set}" = set; then
7224   echo $ECHO_N "(cached) $ECHO_C" >&6
7225 else
7226
7227         cat >conftest.$ac_ext <<_ACEOF
7228 #line 7228 "configure"
7229 #include "confdefs.h"
7230
7231 #include <sys/types.h>
7232 #include <sys/signal.h>
7233
7234 int
7235 main ()
7236 {
7237 int x = SIGWINCH
7238   ;
7239   return 0;
7240 }
7241 _ACEOF
7242 rm -f conftest.$ac_objext
7243 if { (eval echo "$as_me:7243: \"$ac_compile\"") >&5
7244   (eval $ac_compile) 2>&5
7245   ac_status=$?
7246   echo "$as_me:7246: \$? = $ac_status" >&5
7247   (exit $ac_status); } &&
7248          { ac_try='test -s conftest.$ac_objext'
7249   { (eval echo "$as_me:7249: \"$ac_try\"") >&5
7250   (eval $ac_try) 2>&5
7251   ac_status=$?
7252   echo "$as_me:7252: \$? = $ac_status" >&5
7253   (exit $ac_status); }; }; then
7254   cf_cv_define_sigwinch=yes
7255 else
7256   echo "$as_me: failed program was:" >&5
7257 cat conftest.$ac_ext >&5
7258 cat >conftest.$ac_ext <<_ACEOF
7259 #line 7259 "configure"
7260 #include "confdefs.h"
7261
7262 #undef _XOPEN_SOURCE
7263 #undef _POSIX_SOURCE
7264 #undef _POSIX_C_SOURCE
7265 #include <sys/types.h>
7266 #include <sys/signal.h>
7267
7268 int
7269 main ()
7270 {
7271 int x = SIGWINCH
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_define_sigwinch=maybe
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cf_cv_define_sigwinch=no
7293 fi
7294 rm -f conftest.$ac_objext conftest.$ac_ext
7295
7296 fi
7297 rm -f conftest.$ac_objext conftest.$ac_ext
7298
7299 fi
7300 echo "$as_me:7300: result: $cf_cv_define_sigwinch" >&5
7301 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7302
7303 if test "$cf_cv_define_sigwinch" = maybe ; then
7304 echo "$as_me:7304: checking for actual SIGWINCH definition" >&5
7305 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7306 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7307   echo $ECHO_N "(cached) $ECHO_C" >&6
7308 else
7309
7310 cf_cv_fixup_sigwinch=unknown
7311 cf_sigwinch=32
7312 while test $cf_sigwinch != 1
7313 do
7314         cat >conftest.$ac_ext <<_ACEOF
7315 #line 7315 "configure"
7316 #include "confdefs.h"
7317
7318 #undef _XOPEN_SOURCE
7319 #undef _POSIX_SOURCE
7320 #undef _POSIX_C_SOURCE
7321 #include <sys/types.h>
7322 #include <sys/signal.h>
7323
7324 int
7325 main ()
7326 {
7327
7328 #if SIGWINCH != $cf_sigwinch
7329 make an error
7330 #endif
7331 int x = SIGWINCH
7332   ;
7333   return 0;
7334 }
7335 _ACEOF
7336 rm -f conftest.$ac_objext
7337 if { (eval echo "$as_me:7337: \"$ac_compile\"") >&5
7338   (eval $ac_compile) 2>&5
7339   ac_status=$?
7340   echo "$as_me:7340: \$? = $ac_status" >&5
7341   (exit $ac_status); } &&
7342          { ac_try='test -s conftest.$ac_objext'
7343   { (eval echo "$as_me:7343: \"$ac_try\"") >&5
7344   (eval $ac_try) 2>&5
7345   ac_status=$?
7346   echo "$as_me:7346: \$? = $ac_status" >&5
7347   (exit $ac_status); }; }; then
7348   cf_cv_fixup_sigwinch=$cf_sigwinch
7349          break
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353 fi
7354 rm -f conftest.$ac_objext conftest.$ac_ext
7355
7356 cf_sigwinch=`expr $cf_sigwinch - 1`
7357 done
7358
7359 fi
7360 echo "$as_me:7360: result: $cf_cv_fixup_sigwinch" >&5
7361 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7362
7363         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7364                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7365         fi
7366 fi
7367
7368 # Checks for CODESET support.
7369
7370   echo "$as_me:7370: checking for nl_langinfo and CODESET" >&5
7371 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7372 if test "${am_cv_langinfo_codeset+set}" = set; then
7373   echo $ECHO_N "(cached) $ECHO_C" >&6
7374 else
7375   cat >conftest.$ac_ext <<_ACEOF
7376 #line 7376 "configure"
7377 #include "confdefs.h"
7378 #include <langinfo.h>
7379 int
7380 main ()
7381 {
7382 char* cs = nl_langinfo(CODESET);
7383   ;
7384   return 0;
7385 }
7386 _ACEOF
7387 rm -f conftest.$ac_objext conftest$ac_exeext
7388 if { (eval echo "$as_me:7388: \"$ac_link\"") >&5
7389   (eval $ac_link) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); } &&
7393          { ac_try='test -s conftest$ac_exeext'
7394   { (eval echo "$as_me:7394: \"$ac_try\"") >&5
7395   (eval $ac_try) 2>&5
7396   ac_status=$?
7397   echo "$as_me:7397: \$? = $ac_status" >&5
7398   (exit $ac_status); }; }; then
7399   am_cv_langinfo_codeset=yes
7400 else
7401   echo "$as_me: failed program was:" >&5
7402 cat conftest.$ac_ext >&5
7403 am_cv_langinfo_codeset=no
7404 fi
7405 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7406
7407 fi
7408 echo "$as_me:7408: result: $am_cv_langinfo_codeset" >&5
7409 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7410   if test $am_cv_langinfo_codeset = yes; then
7411
7412 cat >>confdefs.h <<\EOF
7413 #define HAVE_LANGINFO_CODESET 1
7414 EOF
7415
7416   fi
7417
7418 # use these variables to work around a defect in gcc's fixincludes.
7419 NCURSES_OK_WCHAR_T=
7420 NCURSES_OK_WINT_T=
7421
7422 echo "$as_me:7422: checking if you want wide-character code" >&5
7423 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7424
7425 # Check whether --enable-widec or --disable-widec was given.
7426 if test "${enable_widec+set}" = set; then
7427   enableval="$enable_widec"
7428   with_widec=$enableval
7429 else
7430   with_widec=no
7431 fi;
7432 echo "$as_me:7432: result: $with_widec" >&5
7433 echo "${ECHO_T}$with_widec" >&6
7434 if test "$with_widec" = yes ; then
7435         LIB_SUFFIX="w${LIB_SUFFIX}"
7436         cat >>confdefs.h <<\EOF
7437 #define USE_WIDEC_SUPPORT 1
7438 EOF
7439
7440         case "$CFLAGS $CPPFLAGS" in #(vi
7441         *-D_XOPEN_SOURCE=500) #(vi
7442                 ;;
7443         *)
7444
7445 echo "$as_me:7445: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7446 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7447 cat >conftest.$ac_ext <<_ACEOF
7448 #line 7448 "configure"
7449 #include "confdefs.h"
7450 #include <sys/types.h>
7451
7452 int
7453 main ()
7454 {
7455
7456 #ifndef _XOPEN_SOURCE_EXTENDED
7457 make an error
7458 #endif
7459   ;
7460   return 0;
7461 }
7462 _ACEOF
7463 rm -f conftest.$ac_objext
7464 if { (eval echo "$as_me:7464: \"$ac_compile\"") >&5
7465   (eval $ac_compile) 2>&5
7466   ac_status=$?
7467   echo "$as_me:7467: \$? = $ac_status" >&5
7468   (exit $ac_status); } &&
7469          { ac_try='test -s conftest.$ac_objext'
7470   { (eval echo "$as_me:7470: \"$ac_try\"") >&5
7471   (eval $ac_try) 2>&5
7472   ac_status=$?
7473   echo "$as_me:7473: \$? = $ac_status" >&5
7474   (exit $ac_status); }; }; then
7475   cf_result=no
7476 else
7477   echo "$as_me: failed program was:" >&5
7478 cat conftest.$ac_ext >&5
7479 cf_result=yes
7480 fi
7481 rm -f conftest.$ac_objext conftest.$ac_ext
7482 echo "$as_me:7482: result: $cf_result" >&5
7483 echo "${ECHO_T}$cf_result" >&6
7484
7485 if test "$cf_result" = yes ; then
7486         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7487 elif test "x" != "x" ; then
7488         echo "$as_me:7488: checking checking for compatible value versus " >&5
7489 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7490         cat >conftest.$ac_ext <<_ACEOF
7491 #line 7491 "configure"
7492 #include "confdefs.h"
7493 #include <sys/types.h>
7494
7495 int
7496 main ()
7497 {
7498
7499 #if _XOPEN_SOURCE_EXTENDED- < 0
7500 make an error
7501 #endif
7502   ;
7503   return 0;
7504 }
7505 _ACEOF
7506 rm -f conftest.$ac_objext
7507 if { (eval echo "$as_me:7507: \"$ac_compile\"") >&5
7508   (eval $ac_compile) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); } &&
7512          { ac_try='test -s conftest.$ac_objext'
7513   { (eval echo "$as_me:7513: \"$ac_try\"") >&5
7514   (eval $ac_try) 2>&5
7515   ac_status=$?
7516   echo "$as_me:7516: \$? = $ac_status" >&5
7517   (exit $ac_status); }; }; then
7518   cf_result=yes
7519 else
7520   echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7522 cf_result=no
7523 fi
7524 rm -f conftest.$ac_objext conftest.$ac_ext
7525         echo "$as_me:7525: result: $cf_result" >&5
7526 echo "${ECHO_T}$cf_result" >&6
7527         if test "$cf_result" = no ; then
7528                 # perhaps we can override it - try...
7529                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7530         fi
7531 fi
7532
7533                 ;;
7534         esac
7535
7536         # with_overwrite=no
7537         NCURSES_CH_T=cchar_t
7538
7539 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7540 do
7541 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7542 echo "$as_me:7542: checking for $ac_func" >&5
7543 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7544 if eval "test \"\${$as_ac_var+set}\" = set"; then
7545   echo $ECHO_N "(cached) $ECHO_C" >&6
7546 else
7547   cat >conftest.$ac_ext <<_ACEOF
7548 #line 7548 "configure"
7549 #include "confdefs.h"
7550 /* System header to define __stub macros and hopefully few prototypes,
7551     which can conflict with char $ac_func (); below.  */
7552 #include <assert.h>
7553 /* Override any gcc2 internal prototype to avoid an error.  */
7554 #ifdef __cplusplus
7555 extern "C"
7556 #endif
7557 /* We use char because int might match the return type of a gcc2
7558    builtin and then its argument prototype would still apply.  */
7559 char $ac_func ();
7560 char (*f) ();
7561
7562 int
7563 main ()
7564 {
7565 /* The GNU C library defines this for functions which it implements
7566     to always fail with ENOSYS.  Some functions are actually named
7567     something starting with __ and the normal name is an alias.  */
7568 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7569 choke me
7570 #else
7571 f = $ac_func;
7572 #endif
7573
7574   ;
7575   return 0;
7576 }
7577 _ACEOF
7578 rm -f conftest.$ac_objext conftest$ac_exeext
7579 if { (eval echo "$as_me:7579: \"$ac_link\"") >&5
7580   (eval $ac_link) 2>&5
7581   ac_status=$?
7582   echo "$as_me:7582: \$? = $ac_status" >&5
7583   (exit $ac_status); } &&
7584          { ac_try='test -s conftest$ac_exeext'
7585   { (eval echo "$as_me:7585: \"$ac_try\"") >&5
7586   (eval $ac_try) 2>&5
7587   ac_status=$?
7588   echo "$as_me:7588: \$? = $ac_status" >&5
7589   (exit $ac_status); }; }; then
7590   eval "$as_ac_var=yes"
7591 else
7592   echo "$as_me: failed program was:" >&5
7593 cat conftest.$ac_ext >&5
7594 eval "$as_ac_var=no"
7595 fi
7596 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7597 fi
7598 echo "$as_me:7598: result: `eval echo '${'$as_ac_var'}'`" >&5
7599 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7600 if test `eval echo '${'$as_ac_var'}'` = yes; then
7601   cat >>confdefs.h <<EOF
7602 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7603 EOF
7604
7605 fi
7606 done
7607
7608         if test "$ac_cv_func_putwc" != yes ; then
7609
7610 echo "$as_me:7610: checking for multibyte character support" >&5
7611 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7612 if test "${cf_cv_utf8_lib+set}" = set; then
7613   echo $ECHO_N "(cached) $ECHO_C" >&6
7614 else
7615
7616         cf_save_LIBS="$LIBS"
7617         cat >conftest.$ac_ext <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620
7621 #include <stdlib.h>
7622 int
7623 main ()
7624 {
7625 putwc(0,0);
7626   ;
7627   return 0;
7628 }
7629 _ACEOF
7630 rm -f conftest.$ac_objext conftest$ac_exeext
7631 if { (eval echo "$as_me:7631: \"$ac_link\"") >&5
7632   (eval $ac_link) 2>&5
7633   ac_status=$?
7634   echo "$as_me:7634: \$? = $ac_status" >&5
7635   (exit $ac_status); } &&
7636          { ac_try='test -s conftest$ac_exeext'
7637   { (eval echo "$as_me:7637: \"$ac_try\"") >&5
7638   (eval $ac_try) 2>&5
7639   ac_status=$?
7640   echo "$as_me:7640: \$? = $ac_status" >&5
7641   (exit $ac_status); }; }; then
7642   cf_cv_utf8_lib=yes
7643 else
7644   echo "$as_me: failed program was:" >&5
7645 cat conftest.$ac_ext >&5
7646
7647 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7648 # will be set on completion of the AC_TRY_LINK below.
7649 cf_cv_header_path_utf8=
7650 cf_cv_library_path_utf8=
7651
7652 echo "${as_me-configure}:7652: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7653
7654 cat >conftest.$ac_ext <<_ACEOF
7655 #line 7655 "configure"
7656 #include "confdefs.h"
7657
7658 #include <libutf8.h>
7659 int
7660 main ()
7661 {
7662 putwc(0,0);
7663   ;
7664   return 0;
7665 }
7666 _ACEOF
7667 rm -f conftest.$ac_objext conftest$ac_exeext
7668 if { (eval echo "$as_me:7668: \"$ac_link\"") >&5
7669   (eval $ac_link) 2>&5
7670   ac_status=$?
7671   echo "$as_me:7671: \$? = $ac_status" >&5
7672   (exit $ac_status); } &&
7673          { ac_try='test -s conftest$ac_exeext'
7674   { (eval echo "$as_me:7674: \"$ac_try\"") >&5
7675   (eval $ac_try) 2>&5
7676   ac_status=$?
7677   echo "$as_me:7677: \$? = $ac_status" >&5
7678   (exit $ac_status); }; }; then
7679
7680         cf_cv_find_linkage_utf8=yes
7681
7682 else
7683   echo "$as_me: failed program was:" >&5
7684 cat conftest.$ac_ext >&5
7685
7686 cf_save_LIBS="$LIBS"
7687 LIBS="-lutf8  $cf_save_LIBS"
7688
7689 cat >conftest.$ac_ext <<_ACEOF
7690 #line 7690 "configure"
7691 #include "confdefs.h"
7692
7693 #include <libutf8.h>
7694 int
7695 main ()
7696 {
7697 putwc(0,0);
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f conftest.$ac_objext conftest$ac_exeext
7703 if { (eval echo "$as_me:7703: \"$ac_link\"") >&5
7704   (eval $ac_link) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit $ac_status); } &&
7708          { ac_try='test -s conftest$ac_exeext'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit $ac_status); }; }; then
7714
7715         cf_cv_find_linkage_utf8=yes
7716         cf_cv_library_file_utf8="-lutf8"
7717
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat conftest.$ac_ext >&5
7721
7722     cf_cv_find_linkage_utf8=no
7723         LIBS="$cf_save_LIBS"
7724
7725     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7726
7727 echo "${as_me-configure}:7727: testing find linkage for utf8 library ..." 1>&5
7728
7729 echo "${as_me-configure}:7729: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7730
7731     cf_save_CPPFLAGS="$CPPFLAGS"
7732     cf_test_CPPFLAGS="$CPPFLAGS"
7733
7734 cf_search=
7735 cf_header_path_list=""
7736 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7737         for cf_header_path in $CPPFLAGS $CFLAGS
7738         do
7739                 case $cf_header_path in #(vi
7740                 -I*)
7741                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7742
7743 test "$cf_header_path" != "NONE" && \
7744 test -d "$cf_header_path" && \
7745  {
7746         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7747         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7748         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7749         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7750         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7751         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7752 }
7753
7754                         cf_header_path_list="$cf_header_path_list $cf_search"
7755                         ;;
7756                 esac
7757         done
7758 fi
7759
7760 cf_search=""
7761
7762 test "/usr" != "$prefix" && \
7763 test -d "/usr" && \
7764 (test $prefix = NONE || test -d $prefix) && {
7765         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7766         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7767         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7768         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7769         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7770         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7771 }
7772
7773 test "$prefix" != "NONE" && \
7774 test -d "$prefix" && \
7775  {
7776         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7777         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7778         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7779         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7780         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7781         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7782 }
7783
7784 test "/usr/local" != "$prefix" && \
7785 test -d "/usr/local" && \
7786 (test $prefix = NONE || test -d $prefix) && {
7787         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7788         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7789         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7790         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7791         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7792         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7793 }
7794
7795 test "/opt" != "$prefix" && \
7796 test -d "/opt" && \
7797 (test $prefix = NONE || test -d $prefix) && {
7798         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7799         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7800         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7801         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7802         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7803         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7804 }
7805
7806 test "$HOME" != "$prefix" && \
7807 test -d "$HOME" && \
7808 (test $prefix = NONE || test -d $prefix) && {
7809         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7810         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7811         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7812         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7813         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7814         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7815 }
7816
7817 test "$includedir" != NONE && \
7818 test "$includedir" != "/usr/include" && \
7819 test -d "$includedir" && {
7820         test -d $includedir &&    cf_search="$cf_search $includedir"
7821         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7822 }
7823
7824 test "$oldincludedir" != NONE && \
7825 test "$oldincludedir" != "/usr/include" && \
7826 test -d "$oldincludedir" && {
7827         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7828         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7829 }
7830
7831 cf_search="$cf_header_path_list $cf_search"
7832
7833     for cf_cv_header_path_utf8 in $cf_search
7834     do
7835       if test -d $cf_cv_header_path_utf8 ; then
7836         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7837
7838 echo "${as_me-configure}:7838: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7839
7840         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7841         cat >conftest.$ac_ext <<_ACEOF
7842 #line 7842 "configure"
7843 #include "confdefs.h"
7844
7845 #include <libutf8.h>
7846 int
7847 main ()
7848 {
7849 putwc(0,0);
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
7867             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7868
7869 echo "${as_me-configure}:7869: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7870
7871             cf_cv_find_linkage_utf8=maybe
7872             cf_test_CPPFLAGS="$CPPFLAGS"
7873             break
7874 else
7875   echo "$as_me: failed program was:" >&5
7876 cat conftest.$ac_ext >&5
7877
7878             CPPFLAGS="$cf_save_CPPFLAGS"
7879
7880 fi
7881 rm -f conftest.$ac_objext conftest.$ac_ext
7882       fi
7883     done
7884
7885     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7886
7887 echo "${as_me-configure}:7887: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7888
7889       cf_save_LIBS="$LIBS"
7890       cf_save_LDFLAGS="$LDFLAGS"
7891
7892       if test "$cf_cv_find_linkage_utf8" != yes ; then
7893
7894 cf_search=
7895 cf_library_path_list=""
7896 if test -n "${LDFLAGS}${LIBS}" ; then
7897         for cf_library_path in $LDFLAGS $LIBS
7898         do
7899                 case $cf_library_path in #(vi
7900                 -L*)
7901                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7902
7903 test "$cf_library_path" != "NONE" && \
7904 test -d "$cf_library_path" && \
7905  {
7906         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7907         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7908         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7909         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7910         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7911         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7912 }
7913
7914                         cf_library_path_list="$cf_library_path_list $cf_search"
7915                         ;;
7916                 esac
7917         done
7918 fi
7919
7920 cf_search=""
7921
7922 test "/usr" != "$prefix" && \
7923 test -d "/usr" && \
7924 (test $prefix = NONE || test -d $prefix) && {
7925         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7926         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7927         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7928         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7929         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7930         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7931 }
7932
7933 test "$prefix" != "NONE" && \
7934 test -d "$prefix" && \
7935  {
7936         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7937         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7938         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7939         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7940         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7941         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7942 }
7943
7944 test "/usr/local" != "$prefix" && \
7945 test -d "/usr/local" && \
7946 (test $prefix = NONE || test -d $prefix) && {
7947         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7948         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7949         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7950         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7951         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7952         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7953 }
7954
7955 test "/opt" != "$prefix" && \
7956 test -d "/opt" && \
7957 (test $prefix = NONE || test -d $prefix) && {
7958         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7959         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7960         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7961         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7962         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7963         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7964 }
7965
7966 test "$HOME" != "$prefix" && \
7967 test -d "$HOME" && \
7968 (test $prefix = NONE || test -d $prefix) && {
7969         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7970         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7971         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7972         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7973         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7974         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7975 }
7976
7977 cf_search="$cf_library_path_list $cf_search"
7978
7979         for cf_cv_library_path_utf8 in $cf_search
7980         do
7981           if test -d $cf_cv_library_path_utf8 ; then
7982             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7983
7984 echo "${as_me-configure}:7984: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7985
7986             CPPFLAGS="$cf_test_CPPFLAGS"
7987             LIBS="-lutf8  $cf_save_LIBS"
7988             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7989             cat >conftest.$ac_ext <<_ACEOF
7990 #line 7990 "configure"
7991 #include "confdefs.h"
7992
7993 #include <libutf8.h>
7994 int
7995 main ()
7996 {
7997 putwc(0,0);
7998   ;
7999   return 0;
8000 }
8001 _ACEOF
8002 rm -f conftest.$ac_objext conftest$ac_exeext
8003 if { (eval echo "$as_me:8003: \"$ac_link\"") >&5
8004   (eval $ac_link) 2>&5
8005   ac_status=$?
8006   echo "$as_me:8006: \$? = $ac_status" >&5
8007   (exit $ac_status); } &&
8008          { ac_try='test -s conftest$ac_exeext'
8009   { (eval echo "$as_me:8009: \"$ac_try\"") >&5
8010   (eval $ac_try) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit $ac_status); }; }; then
8014
8015                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8016
8017 echo "${as_me-configure}:8017: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8018
8019                 cf_cv_find_linkage_utf8=yes
8020                 cf_cv_library_file_utf8="-lutf8"
8021                 break
8022 else
8023   echo "$as_me: failed program was:" >&5
8024 cat conftest.$ac_ext >&5
8025
8026                 CPPFLAGS="$cf_save_CPPFLAGS"
8027                 LIBS="$cf_save_LIBS"
8028                 LDFLAGS="$cf_save_LDFLAGS"
8029
8030 fi
8031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8032           fi
8033         done
8034         LIBS="$cf_save_LIBS"
8035         CPPFLAGS="$cf_save_CPPFLAGS"
8036         LDFLAGS="$cf_save_LDFLAGS"
8037       fi
8038
8039     else
8040       cf_cv_find_linkage_utf8=no
8041     fi
8042
8043 fi
8044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8045
8046 fi
8047 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8048
8049 if test "$cf_cv_find_linkage_utf8" = yes ; then
8050 cf_cv_utf8_lib=add-on
8051 else
8052 cf_cv_utf8_lib=no
8053 fi
8054
8055 fi
8056 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8057 fi
8058 echo "$as_me:8058: result: $cf_cv_utf8_lib" >&5
8059 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8060
8061 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8062 # ncurses/ncursesw:
8063 if test "$cf_cv_utf8_lib" = "add-on" ; then
8064         cat >>confdefs.h <<\EOF
8065 #define HAVE_LIBUTF8_H 1
8066 EOF
8067
8068 if test -n "$cf_cv_header_path_utf8" ; then
8069   for cf_add_incdir in $cf_cv_header_path_utf8
8070   do
8071         while test $cf_add_incdir != /usr/include
8072         do
8073           if test -d $cf_add_incdir
8074           then
8075                 cf_have_incdir=no
8076                 if test -n "$CFLAGS$CPPFLAGS" ; then
8077                   # a loop is needed to ensure we can add subdirs of existing dirs
8078                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8079                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8080                           cf_have_incdir=yes; break
8081                         fi
8082                   done
8083                 fi
8084
8085                 if test "$cf_have_incdir" = no ; then
8086                   if test "$cf_add_incdir" = /usr/local/include ; then
8087                         if test "$GCC" = yes
8088                         then
8089                           cf_save_CPPFLAGS=$CPPFLAGS
8090                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8091                           cat >conftest.$ac_ext <<_ACEOF
8092 #line 8092 "configure"
8093 #include "confdefs.h"
8094 #include <stdio.h>
8095 int
8096 main ()
8097 {
8098 printf("Hello")
8099   ;
8100   return 0;
8101 }
8102 _ACEOF
8103 rm -f conftest.$ac_objext
8104 if { (eval echo "$as_me:8104: \"$ac_compile\"") >&5
8105   (eval $ac_compile) 2>&5
8106   ac_status=$?
8107   echo "$as_me:8107: \$? = $ac_status" >&5
8108   (exit $ac_status); } &&
8109          { ac_try='test -s conftest.$ac_objext'
8110   { (eval echo "$as_me:8110: \"$ac_try\"") >&5
8111   (eval $ac_try) 2>&5
8112   ac_status=$?
8113   echo "$as_me:8113: \$? = $ac_status" >&5
8114   (exit $ac_status); }; }; then
8115   :
8116 else
8117   echo "$as_me: failed program was:" >&5
8118 cat conftest.$ac_ext >&5
8119 cf_have_incdir=yes
8120 fi
8121 rm -f conftest.$ac_objext conftest.$ac_ext
8122                           CPPFLAGS=$cf_save_CPPFLAGS
8123                         fi
8124                   fi
8125                 fi
8126
8127                 if test "$cf_have_incdir" = no ; then
8128                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8129
8130 echo "${as_me-configure}:8130: testing adding $cf_add_incdir to include-path ..." 1>&5
8131
8132                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8133
8134                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8135                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8136                   cf_add_incdir="$cf_top_incdir"
8137                 else
8138                   break
8139                 fi
8140           fi
8141         done
8142   done
8143 fi
8144
8145 if test -n "$cf_cv_library_path_utf8" ; then
8146   for cf_add_libdir in $cf_cv_library_path_utf8
8147   do
8148     if test $cf_add_libdir = /usr/lib ; then
8149       :
8150     elif test -d $cf_add_libdir
8151     then
8152       cf_have_libdir=no
8153       if test -n "$LDFLAGS$LIBS" ; then
8154         # a loop is needed to ensure we can add subdirs of existing dirs
8155         for cf_test_libdir in $LDFLAGS $LIBS ; do
8156           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8157             cf_have_libdir=yes; break
8158           fi
8159         done
8160       fi
8161       if test "$cf_have_libdir" = no ; then
8162         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8163
8164 echo "${as_me-configure}:8164: testing adding $cf_add_libdir to library-path ..." 1>&5
8165
8166         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8167       fi
8168     fi
8169   done
8170 fi
8171
8172         LIBS="-lutf8 $LIBS"
8173 fi
8174
8175                 if test "$cf_cv_utf8_lib" != no ; then
8176                         NCURSES_LIBUTF8=1
8177                 fi
8178         fi
8179
8180 # This is needed on Tru64 5.0 to declare mbstate_t
8181 echo "$as_me:8181: checking if we must include wchar.h to declare mbstate_t" >&5
8182 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8183 if test "${cf_cv_mbstate_t+set}" = set; then
8184   echo $ECHO_N "(cached) $ECHO_C" >&6
8185 else
8186
8187 cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8190
8191 #include <stdlib.h>
8192 #include <stdarg.h>
8193 #include <stdio.h>
8194 #ifdef HAVE_LIBUTF8_H
8195 #include <libutf8.h>
8196 #endif
8197 int
8198 main ()
8199 {
8200 mbstate_t state
8201   ;
8202   return 0;
8203 }
8204 _ACEOF
8205 rm -f conftest.$ac_objext
8206 if { (eval echo "$as_me:8206: \"$ac_compile\"") >&5
8207   (eval $ac_compile) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); } &&
8211          { ac_try='test -s conftest.$ac_objext'
8212   { (eval echo "$as_me:8212: \"$ac_try\"") >&5
8213   (eval $ac_try) 2>&5
8214   ac_status=$?
8215   echo "$as_me:8215: \$? = $ac_status" >&5
8216   (exit $ac_status); }; }; then
8217   cf_cv_mbstate_t=no
8218 else
8219   echo "$as_me: failed program was:" >&5
8220 cat conftest.$ac_ext >&5
8221 cat >conftest.$ac_ext <<_ACEOF
8222 #line 8222 "configure"
8223 #include "confdefs.h"
8224
8225 #include <stdlib.h>
8226 #include <stdarg.h>
8227 #include <stdio.h>
8228 #include <wchar.h>
8229 #ifdef HAVE_LIBUTF8_H
8230 #include <libutf8.h>
8231 #endif
8232 int
8233 main ()
8234 {
8235 mbstate_t value
8236   ;
8237   return 0;
8238 }
8239 _ACEOF
8240 rm -f conftest.$ac_objext
8241 if { (eval echo "$as_me:8241: \"$ac_compile\"") >&5
8242   (eval $ac_compile) 2>&5
8243   ac_status=$?
8244   echo "$as_me:8244: \$? = $ac_status" >&5
8245   (exit $ac_status); } &&
8246          { ac_try='test -s conftest.$ac_objext'
8247   { (eval echo "$as_me:8247: \"$ac_try\"") >&5
8248   (eval $ac_try) 2>&5
8249   ac_status=$?
8250   echo "$as_me:8250: \$? = $ac_status" >&5
8251   (exit $ac_status); }; }; then
8252   cf_cv_mbstate_t=yes
8253 else
8254   echo "$as_me: failed program was:" >&5
8255 cat conftest.$ac_ext >&5
8256 cf_cv_mbstate_t=unknown
8257 fi
8258 rm -f conftest.$ac_objext conftest.$ac_ext
8259 fi
8260 rm -f conftest.$ac_objext conftest.$ac_ext
8261 fi
8262 echo "$as_me:8262: result: $cf_cv_mbstate_t" >&5
8263 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8264
8265 if test "$cf_cv_mbstate_t" = yes ; then
8266         cat >>confdefs.h <<\EOF
8267 #define NEED_WCHAR_H 1
8268 EOF
8269
8270         NEED_WCHAR_H=1
8271 fi
8272
8273 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8274 if test "$cf_cv_mbstate_t" = unknown ; then
8275         NCURSES_MBSTATE_T=1
8276 fi
8277
8278 # This is needed on Tru64 5.0 to declare wchar_t
8279 echo "$as_me:8279: checking if we must include wchar.h to declare wchar_t" >&5
8280 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8281 if test "${cf_cv_wchar_t+set}" = set; then
8282   echo $ECHO_N "(cached) $ECHO_C" >&6
8283 else
8284
8285 cat >conftest.$ac_ext <<_ACEOF
8286 #line 8286 "configure"
8287 #include "confdefs.h"
8288
8289 #include <stdlib.h>
8290 #include <stdarg.h>
8291 #include <stdio.h>
8292 #ifdef HAVE_LIBUTF8_H
8293 #include <libutf8.h>
8294 #endif
8295 int
8296 main ()
8297 {
8298 wchar_t state
8299   ;
8300   return 0;
8301 }
8302 _ACEOF
8303 rm -f conftest.$ac_objext
8304 if { (eval echo "$as_me:8304: \"$ac_compile\"") >&5
8305   (eval $ac_compile) 2>&5
8306   ac_status=$?
8307   echo "$as_me:8307: \$? = $ac_status" >&5
8308   (exit $ac_status); } &&
8309          { ac_try='test -s conftest.$ac_objext'
8310   { (eval echo "$as_me:8310: \"$ac_try\"") >&5
8311   (eval $ac_try) 2>&5
8312   ac_status=$?
8313   echo "$as_me:8313: \$? = $ac_status" >&5
8314   (exit $ac_status); }; }; then
8315   cf_cv_wchar_t=no
8316 else
8317   echo "$as_me: failed program was:" >&5
8318 cat conftest.$ac_ext >&5
8319 cat >conftest.$ac_ext <<_ACEOF
8320 #line 8320 "configure"
8321 #include "confdefs.h"
8322
8323 #include <stdlib.h>
8324 #include <stdarg.h>
8325 #include <stdio.h>
8326 #include <wchar.h>
8327 #ifdef HAVE_LIBUTF8_H
8328 #include <libutf8.h>
8329 #endif
8330 int
8331 main ()
8332 {
8333 wchar_t value
8334   ;
8335   return 0;
8336 }
8337 _ACEOF
8338 rm -f conftest.$ac_objext
8339 if { (eval echo "$as_me:8339: \"$ac_compile\"") >&5
8340   (eval $ac_compile) 2>&5
8341   ac_status=$?
8342   echo "$as_me:8342: \$? = $ac_status" >&5
8343   (exit $ac_status); } &&
8344          { ac_try='test -s conftest.$ac_objext'
8345   { (eval echo "$as_me:8345: \"$ac_try\"") >&5
8346   (eval $ac_try) 2>&5
8347   ac_status=$?
8348   echo "$as_me:8348: \$? = $ac_status" >&5
8349   (exit $ac_status); }; }; then
8350   cf_cv_wchar_t=yes
8351 else
8352   echo "$as_me: failed program was:" >&5
8353 cat conftest.$ac_ext >&5
8354 cf_cv_wchar_t=unknown
8355 fi
8356 rm -f conftest.$ac_objext conftest.$ac_ext
8357 fi
8358 rm -f conftest.$ac_objext conftest.$ac_ext
8359 fi
8360 echo "$as_me:8360: result: $cf_cv_wchar_t" >&5
8361 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8362
8363 if test "$cf_cv_wchar_t" = yes ; then
8364         cat >>confdefs.h <<\EOF
8365 #define NEED_WCHAR_H 1
8366 EOF
8367
8368         NEED_WCHAR_H=1
8369 fi
8370
8371 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8372 if test "$cf_cv_wchar_t" = unknown ; then
8373         NCURSES_WCHAR_T=1
8374 fi
8375
8376 # if we find wchar_t in either place, use substitution to provide a fallback.
8377 if test "$cf_cv_wchar_t" != unknown ; then
8378         NCURSES_OK_WCHAR_T=1
8379 fi
8380
8381 # This is needed on Tru64 5.0 to declare wint_t
8382 echo "$as_me:8382: checking if we must include wchar.h to declare wint_t" >&5
8383 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8384 if test "${cf_cv_wint_t+set}" = set; then
8385   echo $ECHO_N "(cached) $ECHO_C" >&6
8386 else
8387
8388 cat >conftest.$ac_ext <<_ACEOF
8389 #line 8389 "configure"
8390 #include "confdefs.h"
8391
8392 #include <stdlib.h>
8393 #include <stdarg.h>
8394 #include <stdio.h>
8395 #ifdef HAVE_LIBUTF8_H
8396 #include <libutf8.h>
8397 #endif
8398 int
8399 main ()
8400 {
8401 wint_t state
8402   ;
8403   return 0;
8404 }
8405 _ACEOF
8406 rm -f conftest.$ac_objext
8407 if { (eval echo "$as_me:8407: \"$ac_compile\"") >&5
8408   (eval $ac_compile) 2>&5
8409   ac_status=$?
8410   echo "$as_me:8410: \$? = $ac_status" >&5
8411   (exit $ac_status); } &&
8412          { ac_try='test -s conftest.$ac_objext'
8413   { (eval echo "$as_me:8413: \"$ac_try\"") >&5
8414   (eval $ac_try) 2>&5
8415   ac_status=$?
8416   echo "$as_me:8416: \$? = $ac_status" >&5
8417   (exit $ac_status); }; }; then
8418   cf_cv_wint_t=no
8419 else
8420   echo "$as_me: failed program was:" >&5
8421 cat conftest.$ac_ext >&5
8422 cat >conftest.$ac_ext <<_ACEOF
8423 #line 8423 "configure"
8424 #include "confdefs.h"
8425
8426 #include <stdlib.h>
8427 #include <stdarg.h>
8428 #include <stdio.h>
8429 #include <wchar.h>
8430 #ifdef HAVE_LIBUTF8_H
8431 #include <libutf8.h>
8432 #endif
8433 int
8434 main ()
8435 {
8436 wint_t value
8437   ;
8438   return 0;
8439 }
8440 _ACEOF
8441 rm -f conftest.$ac_objext
8442 if { (eval echo "$as_me:8442: \"$ac_compile\"") >&5
8443   (eval $ac_compile) 2>&5
8444   ac_status=$?
8445   echo "$as_me:8445: \$? = $ac_status" >&5
8446   (exit $ac_status); } &&
8447          { ac_try='test -s conftest.$ac_objext'
8448   { (eval echo "$as_me:8448: \"$ac_try\"") >&5
8449   (eval $ac_try) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit $ac_status); }; }; then
8453   cf_cv_wint_t=yes
8454 else
8455   echo "$as_me: failed program was:" >&5
8456 cat conftest.$ac_ext >&5
8457 cf_cv_wint_t=unknown
8458 fi
8459 rm -f conftest.$ac_objext conftest.$ac_ext
8460 fi
8461 rm -f conftest.$ac_objext conftest.$ac_ext
8462 fi
8463 echo "$as_me:8463: result: $cf_cv_wint_t" >&5
8464 echo "${ECHO_T}$cf_cv_wint_t" >&6
8465
8466 if test "$cf_cv_wint_t" = yes ; then
8467         cat >>confdefs.h <<\EOF
8468 #define NEED_WCHAR_H 1
8469 EOF
8470
8471         NEED_WCHAR_H=1
8472 fi
8473
8474 # if we do not find wint_t in either place, use substitution to provide a fallback.
8475 if test "$cf_cv_wint_t" = unknown ; then
8476         NCURSES_WINT_T=1
8477 fi
8478
8479 # if we find wint_t in either place, use substitution to provide a fallback.
8480 if test "$cf_cv_wint_t" != unknown ; then
8481         NCURSES_OK_WINT_T=1
8482 fi
8483
8484         if test "$NCURSES_MBSTATE_T" != 0; then
8485                 cat >>confdefs.h <<\EOF
8486 #define NEED_MBSTATE_T_DEF 1
8487 EOF
8488
8489         fi
8490 fi
8491
8492 ###   use option --disable-lp64 to allow long chtype
8493 case $cf_cv_abi_version in
8494 [345]*)
8495         default_with_lp64=no
8496         ;;
8497 *)
8498         default_with_lp64=yes
8499         ;;
8500 esac
8501
8502 echo "$as_me:8502: checking whether to enable _LP64 definition in curses.h" >&5
8503 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8504
8505 # Check whether --enable-lp64 or --disable-lp64 was given.
8506 if test "${enable_lp64+set}" = set; then
8507   enableval="$enable_lp64"
8508   with_lp64=$enableval
8509 else
8510   with_lp64=$default_with_lp64
8511 fi;
8512 echo "$as_me:8512: result: $with_lp64" >&5
8513 echo "${ECHO_T}$with_lp64" >&6
8514
8515 if test "$with_lp64" = yes ; then
8516         cf_cv_enable_lp64=1
8517 else
8518         cf_cv_enable_lp64=0
8519 fi
8520
8521 # Check whether --enable-largefile or --disable-largefile was given.
8522 if test "${enable_largefile+set}" = set; then
8523   enableval="$enable_largefile"
8524
8525 fi;
8526 if test "$enable_largefile" != no; then
8527
8528   echo "$as_me:8528: checking for special C compiler options needed for large files" >&5
8529 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8530 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8531   echo $ECHO_N "(cached) $ECHO_C" >&6
8532 else
8533   ac_cv_sys_largefile_CC=no
8534      if test "$GCC" != yes; then
8535        ac_save_CC=$CC
8536        while :; do
8537          # IRIX 6.2 and later do not support large files by default,
8538          # so use the C compiler's -n32 option if that helps.
8539          cat >conftest.$ac_ext <<_ACEOF
8540 #line 8540 "configure"
8541 #include "confdefs.h"
8542 #include <sys/types.h>
8543  /* Check that off_t can represent 2**63 - 1 correctly.
8544     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8545     since some C++ compilers masquerading as C compilers
8546     incorrectly reject 9223372036854775807.  */
8547 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8548   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8549                        && LARGE_OFF_T % 2147483647 == 1)
8550                       ? 1 : -1];
8551 int
8552 main ()
8553 {
8554
8555   ;
8556   return 0;
8557 }
8558 _ACEOF
8559          rm -f conftest.$ac_objext
8560 if { (eval echo "$as_me:8560: \"$ac_compile\"") >&5
8561   (eval $ac_compile) 2>&5
8562   ac_status=$?
8563   echo "$as_me:8563: \$? = $ac_status" >&5
8564   (exit $ac_status); } &&
8565          { ac_try='test -s conftest.$ac_objext'
8566   { (eval echo "$as_me:8566: \"$ac_try\"") >&5
8567   (eval $ac_try) 2>&5
8568   ac_status=$?
8569   echo "$as_me:8569: \$? = $ac_status" >&5
8570   (exit $ac_status); }; }; then
8571   break
8572 else
8573   echo "$as_me: failed program was:" >&5
8574 cat conftest.$ac_ext >&5
8575 fi
8576 rm -f conftest.$ac_objext
8577          CC="$CC -n32"
8578          rm -f conftest.$ac_objext
8579 if { (eval echo "$as_me:8579: \"$ac_compile\"") >&5
8580   (eval $ac_compile) 2>&5
8581   ac_status=$?
8582   echo "$as_me:8582: \$? = $ac_status" >&5
8583   (exit $ac_status); } &&
8584          { ac_try='test -s conftest.$ac_objext'
8585   { (eval echo "$as_me:8585: \"$ac_try\"") >&5
8586   (eval $ac_try) 2>&5
8587   ac_status=$?
8588   echo "$as_me:8588: \$? = $ac_status" >&5
8589   (exit $ac_status); }; }; then
8590   ac_cv_sys_largefile_CC=' -n32'; break
8591 else
8592   echo "$as_me: failed program was:" >&5
8593 cat conftest.$ac_ext >&5
8594 fi
8595 rm -f conftest.$ac_objext
8596          break
8597        done
8598        CC=$ac_save_CC
8599        rm -f conftest.$ac_ext
8600     fi
8601 fi
8602 echo "$as_me:8602: result: $ac_cv_sys_largefile_CC" >&5
8603 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8604   if test "$ac_cv_sys_largefile_CC" != no; then
8605     CC=$CC$ac_cv_sys_largefile_CC
8606   fi
8607
8608   echo "$as_me:8608: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8609 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8610 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8611   echo $ECHO_N "(cached) $ECHO_C" >&6
8612 else
8613   while :; do
8614   ac_cv_sys_file_offset_bits=no
8615   cat >conftest.$ac_ext <<_ACEOF
8616 #line 8616 "configure"
8617 #include "confdefs.h"
8618 #include <sys/types.h>
8619  /* Check that off_t can represent 2**63 - 1 correctly.
8620     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8621     since some C++ compilers masquerading as C compilers
8622     incorrectly reject 9223372036854775807.  */
8623 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8624   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8625                        && LARGE_OFF_T % 2147483647 == 1)
8626                       ? 1 : -1];
8627 int
8628 main ()
8629 {
8630
8631   ;
8632   return 0;
8633 }
8634 _ACEOF
8635 rm -f conftest.$ac_objext
8636 if { (eval echo "$as_me:8636: \"$ac_compile\"") >&5
8637   (eval $ac_compile) 2>&5
8638   ac_status=$?
8639   echo "$as_me:8639: \$? = $ac_status" >&5
8640   (exit $ac_status); } &&
8641          { ac_try='test -s conftest.$ac_objext'
8642   { (eval echo "$as_me:8642: \"$ac_try\"") >&5
8643   (eval $ac_try) 2>&5
8644   ac_status=$?
8645   echo "$as_me:8645: \$? = $ac_status" >&5
8646   (exit $ac_status); }; }; then
8647   break
8648 else
8649   echo "$as_me: failed program was:" >&5
8650 cat conftest.$ac_ext >&5
8651 fi
8652 rm -f conftest.$ac_objext conftest.$ac_ext
8653   cat >conftest.$ac_ext <<_ACEOF
8654 #line 8654 "configure"
8655 #include "confdefs.h"
8656 #define _FILE_OFFSET_BITS 64
8657 #include <sys/types.h>
8658  /* Check that off_t can represent 2**63 - 1 correctly.
8659     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8660     since some C++ compilers masquerading as C compilers
8661     incorrectly reject 9223372036854775807.  */
8662 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8663   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8664                        && LARGE_OFF_T % 2147483647 == 1)
8665                       ? 1 : -1];
8666 int
8667 main ()
8668 {
8669
8670   ;
8671   return 0;
8672 }
8673 _ACEOF
8674 rm -f conftest.$ac_objext
8675 if { (eval echo "$as_me:8675: \"$ac_compile\"") >&5
8676   (eval $ac_compile) 2>&5
8677   ac_status=$?
8678   echo "$as_me:8678: \$? = $ac_status" >&5
8679   (exit $ac_status); } &&
8680          { ac_try='test -s conftest.$ac_objext'
8681   { (eval echo "$as_me:8681: \"$ac_try\"") >&5
8682   (eval $ac_try) 2>&5
8683   ac_status=$?
8684   echo "$as_me:8684: \$? = $ac_status" >&5
8685   (exit $ac_status); }; }; then
8686   ac_cv_sys_file_offset_bits=64; break
8687 else
8688   echo "$as_me: failed program was:" >&5
8689 cat conftest.$ac_ext >&5
8690 fi
8691 rm -f conftest.$ac_objext conftest.$ac_ext
8692   break
8693 done
8694 fi
8695 echo "$as_me:8695: result: $ac_cv_sys_file_offset_bits" >&5
8696 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8697 if test "$ac_cv_sys_file_offset_bits" != no; then
8698
8699 cat >>confdefs.h <<EOF
8700 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8701 EOF
8702
8703 fi
8704 rm -f conftest*
8705   echo "$as_me:8705: checking for _LARGE_FILES value needed for large files" >&5
8706 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8707 if test "${ac_cv_sys_large_files+set}" = set; then
8708   echo $ECHO_N "(cached) $ECHO_C" >&6
8709 else
8710   while :; do
8711   ac_cv_sys_large_files=no
8712   cat >conftest.$ac_ext <<_ACEOF
8713 #line 8713 "configure"
8714 #include "confdefs.h"
8715 #include <sys/types.h>
8716  /* Check that off_t can represent 2**63 - 1 correctly.
8717     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8718     since some C++ compilers masquerading as C compilers
8719     incorrectly reject 9223372036854775807.  */
8720 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8721   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8722                        && LARGE_OFF_T % 2147483647 == 1)
8723                       ? 1 : -1];
8724 int
8725 main ()
8726 {
8727
8728   ;
8729   return 0;
8730 }
8731 _ACEOF
8732 rm -f conftest.$ac_objext
8733 if { (eval echo "$as_me:8733: \"$ac_compile\"") >&5
8734   (eval $ac_compile) 2>&5
8735   ac_status=$?
8736   echo "$as_me:8736: \$? = $ac_status" >&5
8737   (exit $ac_status); } &&
8738          { ac_try='test -s conftest.$ac_objext'
8739   { (eval echo "$as_me:8739: \"$ac_try\"") >&5
8740   (eval $ac_try) 2>&5
8741   ac_status=$?
8742   echo "$as_me:8742: \$? = $ac_status" >&5
8743   (exit $ac_status); }; }; then
8744   break
8745 else
8746   echo "$as_me: failed program was:" >&5
8747 cat conftest.$ac_ext >&5
8748 fi
8749 rm -f conftest.$ac_objext conftest.$ac_ext
8750   cat >conftest.$ac_ext <<_ACEOF
8751 #line 8751 "configure"
8752 #include "confdefs.h"
8753 #define _LARGE_FILES 1
8754 #include <sys/types.h>
8755  /* Check that off_t can represent 2**63 - 1 correctly.
8756     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8757     since some C++ compilers masquerading as C compilers
8758     incorrectly reject 9223372036854775807.  */
8759 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8760   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8761                        && LARGE_OFF_T % 2147483647 == 1)
8762                       ? 1 : -1];
8763 int
8764 main ()
8765 {
8766
8767   ;
8768   return 0;
8769 }
8770 _ACEOF
8771 rm -f conftest.$ac_objext
8772 if { (eval echo "$as_me:8772: \"$ac_compile\"") >&5
8773   (eval $ac_compile) 2>&5
8774   ac_status=$?
8775   echo "$as_me:8775: \$? = $ac_status" >&5
8776   (exit $ac_status); } &&
8777          { ac_try='test -s conftest.$ac_objext'
8778   { (eval echo "$as_me:8778: \"$ac_try\"") >&5
8779   (eval $ac_try) 2>&5
8780   ac_status=$?
8781   echo "$as_me:8781: \$? = $ac_status" >&5
8782   (exit $ac_status); }; }; then
8783   ac_cv_sys_large_files=1; break
8784 else
8785   echo "$as_me: failed program was:" >&5
8786 cat conftest.$ac_ext >&5
8787 fi
8788 rm -f conftest.$ac_objext conftest.$ac_ext
8789   break
8790 done
8791 fi
8792 echo "$as_me:8792: result: $ac_cv_sys_large_files" >&5
8793 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8794 if test "$ac_cv_sys_large_files" != no; then
8795
8796 cat >>confdefs.h <<EOF
8797 #define _LARGE_FILES $ac_cv_sys_large_files
8798 EOF
8799
8800 fi
8801 rm -f conftest*
8802 fi
8803
8804     if test "$enable_largefile" != no ; then
8805         echo "$as_me:8805: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8806 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8807 if test "${ac_cv_sys_largefile_source+set}" = set; then
8808   echo $ECHO_N "(cached) $ECHO_C" >&6
8809 else
8810   while :; do
8811   ac_cv_sys_largefile_source=no
8812   cat >conftest.$ac_ext <<_ACEOF
8813 #line 8813 "configure"
8814 #include "confdefs.h"
8815 #include <stdio.h>
8816 int
8817 main ()
8818 {
8819 return !fseeko;
8820   ;
8821   return 0;
8822 }
8823 _ACEOF
8824 rm -f conftest.$ac_objext
8825 if { (eval echo "$as_me:8825: \"$ac_compile\"") >&5
8826   (eval $ac_compile) 2>&5
8827   ac_status=$?
8828   echo "$as_me:8828: \$? = $ac_status" >&5
8829   (exit $ac_status); } &&
8830          { ac_try='test -s conftest.$ac_objext'
8831   { (eval echo "$as_me:8831: \"$ac_try\"") >&5
8832   (eval $ac_try) 2>&5
8833   ac_status=$?
8834   echo "$as_me:8834: \$? = $ac_status" >&5
8835   (exit $ac_status); }; }; then
8836   break
8837 else
8838   echo "$as_me: failed program was:" >&5
8839 cat conftest.$ac_ext >&5
8840 fi
8841 rm -f conftest.$ac_objext conftest.$ac_ext
8842   cat >conftest.$ac_ext <<_ACEOF
8843 #line 8843 "configure"
8844 #include "confdefs.h"
8845 #define _LARGEFILE_SOURCE 1
8846 #include <stdio.h>
8847 int
8848 main ()
8849 {
8850 return !fseeko;
8851   ;
8852   return 0;
8853 }
8854 _ACEOF
8855 rm -f conftest.$ac_objext
8856 if { (eval echo "$as_me:8856: \"$ac_compile\"") >&5
8857   (eval $ac_compile) 2>&5
8858   ac_status=$?
8859   echo "$as_me:8859: \$? = $ac_status" >&5
8860   (exit $ac_status); } &&
8861          { ac_try='test -s conftest.$ac_objext'
8862   { (eval echo "$as_me:8862: \"$ac_try\"") >&5
8863   (eval $ac_try) 2>&5
8864   ac_status=$?
8865   echo "$as_me:8865: \$? = $ac_status" >&5
8866   (exit $ac_status); }; }; then
8867   ac_cv_sys_largefile_source=1; break
8868 else
8869   echo "$as_me: failed program was:" >&5
8870 cat conftest.$ac_ext >&5
8871 fi
8872 rm -f conftest.$ac_objext conftest.$ac_ext
8873   break
8874 done
8875 fi
8876 echo "$as_me:8876: result: $ac_cv_sys_largefile_source" >&5
8877 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8878 if test "$ac_cv_sys_largefile_source" != no; then
8879
8880 cat >>confdefs.h <<EOF
8881 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8882 EOF
8883
8884 fi
8885 rm -f conftest*
8886
8887 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8888 # in glibc 2.1.3, but that breaks too many other things.
8889 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8890 echo "$as_me:8890: checking for fseeko" >&5
8891 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8892 if test "${ac_cv_func_fseeko+set}" = set; then
8893   echo $ECHO_N "(cached) $ECHO_C" >&6
8894 else
8895   cat >conftest.$ac_ext <<_ACEOF
8896 #line 8896 "configure"
8897 #include "confdefs.h"
8898 #include <stdio.h>
8899 int
8900 main ()
8901 {
8902 return fseeko && fseeko (stdin, 0, 0);
8903   ;
8904   return 0;
8905 }
8906 _ACEOF
8907 rm -f conftest.$ac_objext conftest$ac_exeext
8908 if { (eval echo "$as_me:8908: \"$ac_link\"") >&5
8909   (eval $ac_link) 2>&5
8910   ac_status=$?
8911   echo "$as_me:8911: \$? = $ac_status" >&5
8912   (exit $ac_status); } &&
8913          { ac_try='test -s conftest$ac_exeext'
8914   { (eval echo "$as_me:8914: \"$ac_try\"") >&5
8915   (eval $ac_try) 2>&5
8916   ac_status=$?
8917   echo "$as_me:8917: \$? = $ac_status" >&5
8918   (exit $ac_status); }; }; then
8919   ac_cv_func_fseeko=yes
8920 else
8921   echo "$as_me: failed program was:" >&5
8922 cat conftest.$ac_ext >&5
8923 ac_cv_func_fseeko=no
8924 fi
8925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8926 fi
8927 echo "$as_me:8927: result: $ac_cv_func_fseeko" >&5
8928 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8929 if test $ac_cv_func_fseeko = yes; then
8930
8931 cat >>confdefs.h <<\EOF
8932 #define HAVE_FSEEKO 1
8933 EOF
8934
8935 fi
8936
8937         # Normally we would collect these definitions in the config.h,
8938         # but (like _XOPEN_SOURCE), some environments rely on having these
8939         # defined before any of the system headers are included.  Another
8940         # case comes up with C++, e.g., on AIX the compiler compiles the
8941         # header files by themselves before looking at the body files it is
8942         # told to compile.  For ncurses, those header files do not include
8943         # the config.h
8944         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8945         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8946         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8947
8948         echo "$as_me:8948: checking whether to use struct dirent64" >&5
8949 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8950 if test "${cf_cv_struct_dirent64+set}" = set; then
8951   echo $ECHO_N "(cached) $ECHO_C" >&6
8952 else
8953
8954                 cat >conftest.$ac_ext <<_ACEOF
8955 #line 8955 "configure"
8956 #include "confdefs.h"
8957
8958 #include <sys/types.h>
8959 #include <dirent.h>
8960
8961 int
8962 main ()
8963 {
8964
8965                 /* if transitional largefile support is setup, this is true */
8966                 extern struct dirent64 * readdir(DIR *);
8967                 struct dirent64 *x = readdir((DIR *)0);
8968                 struct dirent *y = readdir((DIR *)0);
8969                 int z = x - y;
8970
8971   ;
8972   return 0;
8973 }
8974 _ACEOF
8975 rm -f conftest.$ac_objext
8976 if { (eval echo "$as_me:8976: \"$ac_compile\"") >&5
8977   (eval $ac_compile) 2>&5
8978   ac_status=$?
8979   echo "$as_me:8979: \$? = $ac_status" >&5
8980   (exit $ac_status); } &&
8981          { ac_try='test -s conftest.$ac_objext'
8982   { (eval echo "$as_me:8982: \"$ac_try\"") >&5
8983   (eval $ac_try) 2>&5
8984   ac_status=$?
8985   echo "$as_me:8985: \$? = $ac_status" >&5
8986   (exit $ac_status); }; }; then
8987   cf_cv_struct_dirent64=yes
8988 else
8989   echo "$as_me: failed program was:" >&5
8990 cat conftest.$ac_ext >&5
8991 cf_cv_struct_dirent64=no
8992 fi
8993 rm -f conftest.$ac_objext conftest.$ac_ext
8994
8995 fi
8996 echo "$as_me:8996: result: $cf_cv_struct_dirent64" >&5
8997 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8998         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8999 #define HAVE_STRUCT_DIRENT64 1
9000 EOF
9001
9002     fi
9003
9004 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9005 echo "$as_me:9005: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9006 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9007
9008 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9009 if test "${enable_tparm_varargs+set}" = set; then
9010   enableval="$enable_tparm_varargs"
9011   with_tparm_varargs=$enableval
9012 else
9013   with_tparm_varargs=yes
9014 fi;
9015 echo "$as_me:9015: result: $with_tparm_varargs" >&5
9016 echo "${ECHO_T}$with_tparm_varargs" >&6
9017 NCURSES_TPARM_VARARGS=0
9018 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9019
9020 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9021 if test "$with_ticlib" != no ; then
9022 echo "$as_me:9022: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9023 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9024
9025 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9026 if test "${enable_tic_depends+set}" = set; then
9027   enableval="$enable_tic_depends"
9028   with_tic_depends=$enableval
9029 else
9030   with_tic_depends=yes
9031 fi;
9032 echo "$as_me:9032: result: $with_tic_depends" >&5
9033 echo "${ECHO_T}$with_tic_depends" >&6
9034 else
9035         with_tic_depends=no
9036 fi
9037
9038 ###   use option --with-bool to override bool's type
9039 echo "$as_me:9039: checking for type of bool" >&5
9040 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9041
9042 # Check whether --with-bool or --without-bool was given.
9043 if test "${with_bool+set}" = set; then
9044   withval="$with_bool"
9045   NCURSES_BOOL="$withval"
9046 else
9047   NCURSES_BOOL=auto
9048 fi;
9049 echo "$as_me:9049: result: $NCURSES_BOOL" >&5
9050 echo "${ECHO_T}$NCURSES_BOOL" >&6
9051
9052 echo "$as_me:9052: checking for alternate terminal capabilities file" >&5
9053 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9054
9055 # Check whether --with-caps or --without-caps was given.
9056 if test "${with_caps+set}" = set; then
9057   withval="$with_caps"
9058   TERMINFO_CAPS=Caps.$withval
9059 else
9060   TERMINFO_CAPS=Caps
9061 fi;
9062 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9063 echo "$as_me:9063: result: $TERMINFO_CAPS" >&5
9064 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9065
9066 ###   use option --with-chtype to override chtype's type
9067 echo "$as_me:9067: checking for type of chtype" >&5
9068 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9069
9070 # Check whether --with-chtype or --without-chtype was given.
9071 if test "${with_chtype+set}" = set; then
9072   withval="$with_chtype"
9073   NCURSES_CHTYPE="$withval"
9074 else
9075   NCURSES_CHTYPE=auto
9076 fi;
9077 echo "$as_me:9077: result: $NCURSES_CHTYPE" >&5
9078 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9079
9080 ###   use option --with-ospeed to override ospeed's type
9081 echo "$as_me:9081: checking for type of ospeed" >&5
9082 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9083
9084 # Check whether --with-ospeed or --without-ospeed was given.
9085 if test "${with_ospeed+set}" = set; then
9086   withval="$with_ospeed"
9087   NCURSES_OSPEED="$withval"
9088 else
9089   NCURSES_OSPEED=short
9090 fi;
9091 echo "$as_me:9091: result: $NCURSES_OSPEED" >&5
9092 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9093
9094 ###   use option --with-mmask-t to override mmask_t's type
9095 echo "$as_me:9095: checking for type of mmask_t" >&5
9096 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9097
9098 # Check whether --with-mmask-t or --without-mmask-t was given.
9099 if test "${with_mmask_t+set}" = set; then
9100   withval="$with_mmask_t"
9101   NCURSES_MMASK_T="$withval"
9102 else
9103   NCURSES_MMASK_T=auto
9104 fi;
9105 echo "$as_me:9105: result: $NCURSES_MMASK_T" >&5
9106 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9107
9108 ###   use option --with-ccharw-max to override CCHARW_MAX size
9109 echo "$as_me:9109: checking for size CCHARW_MAX" >&5
9110 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9111
9112 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9113 if test "${with_ccharw_max+set}" = set; then
9114   withval="$with_ccharw_max"
9115   NCURSES_CCHARW_MAX="$withval"
9116 else
9117   NCURSES_CCHARW_MAX=5
9118 fi;
9119 echo "$as_me:9119: result: $NCURSES_CCHARW_MAX" >&5
9120 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9121
9122 ### Enable compiling-in rcs id's
9123 echo "$as_me:9123: checking if RCS identifiers should be compiled-in" >&5
9124 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9125
9126 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9127 if test "${with_rcs_ids+set}" = set; then
9128   withval="$with_rcs_ids"
9129   with_rcs_ids=$withval
9130 else
9131   with_rcs_ids=no
9132 fi;
9133 echo "$as_me:9133: result: $with_rcs_ids" >&5
9134 echo "${ECHO_T}$with_rcs_ids" >&6
9135 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9136 #define USE_RCS_IDS 1
9137 EOF
9138
9139 ###############################################################################
9140
9141 echo "$as_me:9141: checking format of man-pages" >&5
9142 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9143
9144 # Check whether --with-manpage-format or --without-manpage-format was given.
9145 if test "${with_manpage_format+set}" = set; then
9146   withval="$with_manpage_format"
9147   MANPAGE_FORMAT=$withval
9148 else
9149   MANPAGE_FORMAT=unknown
9150 fi;
9151
9152 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9153 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9154
9155 cf_unknown=
9156
9157 case $MANPAGE_FORMAT in
9158 unknown)
9159   if test -z "$MANPATH" ; then
9160     MANPATH="/usr/man:/usr/share/man"
9161   fi
9162
9163   # look for the 'date' man-page (it's most likely to be installed!)
9164   MANPAGE_FORMAT=
9165   cf_preform=no
9166   cf_catonly=yes
9167   cf_example=date
9168
9169   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9170   for cf_dir in $MANPATH; do
9171     test -z "$cf_dir" && cf_dir=/usr/man
9172     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
9173     do
9174       cf_test=`echo $cf_name | sed -e 's/*//'`
9175       if test "x$cf_test" = "x$cf_name" ; then
9176
9177         case "$cf_name" in
9178         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9179         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9180         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9181         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9182         esac
9183
9184         case "$cf_name" in
9185         $cf_dir/man*)
9186           cf_catonly=no
9187           ;;
9188         $cf_dir/cat*)
9189           cf_preform=yes
9190           ;;
9191         esac
9192         break
9193       fi
9194
9195       # if we found a match in either man* or cat*, stop looking
9196       if test -n "$MANPAGE_FORMAT" ; then
9197         cf_found=no
9198         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9199         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9200         case "$cf_name" in
9201         $cf_dir/cat*)
9202           cf_found=yes
9203           ;;
9204         esac
9205         test $cf_found=yes && break
9206       fi
9207     done
9208     # only check the first directory in $MANPATH where we find manpages
9209     if test -n "$MANPAGE_FORMAT" ; then
9210        break
9211     fi
9212   done
9213   # if we did not find the example, just assume it is normal
9214   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9215   IFS="$ac_save_ifs"
9216   ;;
9217 *)
9218   for cf_option in $MANPAGE_FORMAT; do
9219      case $cf_option in #(vi
9220      gzip|compress|BSDI|normal|formatted|catonly)
9221        ;;
9222      *)
9223        cf_unknown="$cf_unknown $cf_option"
9224        ;;
9225      esac
9226   done
9227   ;;
9228 esac
9229
9230 echo "$as_me:9230: result: $MANPAGE_FORMAT" >&5
9231 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9232 if test -n "$cf_unknown" ; then
9233   { echo "$as_me:9233: WARNING: Unexpected manpage-format $cf_unknown" >&5
9234 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9235 fi
9236
9237 echo "$as_me:9237: checking for manpage renaming" >&5
9238 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9239
9240 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9241 if test "${with_manpage_renames+set}" = set; then
9242   withval="$with_manpage_renames"
9243   MANPAGE_RENAMES=$withval
9244 else
9245   MANPAGE_RENAMES=yes
9246 fi;
9247
9248 case ".$MANPAGE_RENAMES" in #(vi
9249 .no) #(vi
9250   ;;
9251 .|.yes)
9252   # Debian 'man' program?
9253   if test -f /etc/debian_version ; then
9254     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9255   else
9256     MANPAGE_RENAMES=no
9257   fi
9258   ;;
9259 esac
9260
9261 if test "$MANPAGE_RENAMES" != no ; then
9262   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9263     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9264   elif test ! -f $MANPAGE_RENAMES ; then
9265     { { echo "$as_me:9265: error: not a filename: $MANPAGE_RENAMES" >&5
9266 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9267    { (exit 1); exit 1; }; }
9268   fi
9269
9270   test ! -d man && mkdir man
9271
9272   # Construct a sed-script to perform renaming within man-pages
9273   if test -n "$MANPAGE_RENAMES" ; then
9274     test ! -d man && mkdir man
9275     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9276   fi
9277 fi
9278
9279 echo "$as_me:9279: result: $MANPAGE_RENAMES" >&5
9280 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9281
9282 echo "$as_me:9282: checking if manpage aliases will be installed" >&5
9283 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9284
9285 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9286 if test "${with_manpage_aliases+set}" = set; then
9287   withval="$with_manpage_aliases"
9288   MANPAGE_ALIASES=$withval
9289 else
9290   MANPAGE_ALIASES=yes
9291 fi;
9292
9293 echo "$as_me:9293: result: $MANPAGE_ALIASES" >&5
9294 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9295
9296 if test "$LN_S" = "ln -s"; then
9297         cf_use_symlinks=yes
9298 else
9299         cf_use_symlinks=no
9300 fi
9301
9302 MANPAGE_SYMLINKS=no
9303 if test "$MANPAGE_ALIASES" = yes ; then
9304 echo "$as_me:9304: checking if manpage symlinks should be used" >&5
9305 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9306
9307 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9308 if test "${with_manpage_symlinks+set}" = set; then
9309   withval="$with_manpage_symlinks"
9310   MANPAGE_SYMLINKS=$withval
9311 else
9312   MANPAGE_SYMLINKS=$cf_use_symlinks
9313 fi;
9314
9315 if test "$$cf_use_symlinks" = no; then
9316 if test "$MANPAGE_SYMLINKS" = yes ; then
9317         { echo "$as_me:9317: WARNING: cannot make symlinks" >&5
9318 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9319         MANPAGE_SYMLINKS=no
9320 fi
9321 fi
9322
9323 echo "$as_me:9323: result: $MANPAGE_SYMLINKS" >&5
9324 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9325 fi
9326
9327 echo "$as_me:9327: checking for manpage tbl" >&5
9328 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9329
9330 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9331 if test "${with_manpage_tbl+set}" = set; then
9332   withval="$with_manpage_tbl"
9333   MANPAGE_TBL=$withval
9334 else
9335   MANPAGE_TBL=no
9336 fi;
9337
9338 echo "$as_me:9338: result: $MANPAGE_TBL" >&5
9339 echo "${ECHO_T}$MANPAGE_TBL" >&6
9340
9341   if test "$prefix" = "NONE" ; then
9342      cf_prefix="$ac_default_prefix"
9343   else
9344      cf_prefix="$prefix"
9345   fi
9346
9347   case "$MANPAGE_FORMAT" in # (vi
9348   *catonly*) # (vi
9349     cf_format=yes
9350     cf_inboth=no
9351     ;;
9352   *formatted*) # (vi
9353     cf_format=yes
9354     cf_inboth=yes
9355     ;;
9356   *)
9357     cf_format=no
9358     cf_inboth=no
9359     ;;
9360   esac
9361
9362 test ! -d man && mkdir man
9363
9364 cf_so_strip=
9365 cf_compress=
9366 case "$MANPAGE_FORMAT" in #(vi
9367 *compress*) #(vi
9368         cf_so_strip="Z"
9369         cf_compress=compress
9370   ;;
9371 *gzip*) #(vi
9372         cf_so_strip="gz"
9373         cf_compress=gzip
9374   ;;
9375 esac
9376
9377 cf_edit_man=./edit_man.sh
9378 cf_man_alias=`pwd`/man_alias.sed
9379
9380 cat >$cf_edit_man <<CF_EOF
9381 #! /bin/sh
9382 # this script is generated by the configure-script CF_MAN_PAGES macro.
9383
9384 prefix="$cf_prefix"
9385 datadir="$datadir"
9386
9387 NCURSES_MAJOR="$NCURSES_MAJOR"
9388 NCURSES_MINOR="$NCURSES_MINOR"
9389 NCURSES_PATCH="$NCURSES_PATCH"
9390
9391 NCURSES_OSPEED="$NCURSES_OSPEED"
9392 TERMINFO="$TERMINFO"
9393
9394 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9395
9396 INSTALL="$INSTALL"
9397 INSTALL_DATA="$INSTALL_DATA"
9398
9399 transform="$program_transform_name"
9400
9401 TMP=\${TMPDIR-/tmp}/man\$\$
9402 trap "rm -f \$TMP" 0 1 2 5 15
9403
9404 form=\$1
9405 shift || exit 1
9406
9407 verb=\$1
9408 shift || exit 1
9409
9410 mandir=\$1
9411 shift || exit 1
9412
9413 srcdir=\$1
9414 top_srcdir=\$srcdir/..
9415 shift || exit 1
9416
9417 if test "\$form" = normal ; then
9418         if test "$cf_format" = yes ; then
9419         if test "$cf_inboth" = no ; then
9420                 sh \$0 format \$verb \$mandir \$srcdir \$*
9421                 exit $?
9422         fi
9423         fi
9424         cf_subdir=\$mandir/man
9425         cf_tables=$MANPAGE_TBL
9426 else
9427         cf_subdir=\$mandir/cat
9428         cf_tables=yes
9429 fi
9430
9431 # process the list of source-files
9432 for i in \$* ; do
9433 case \$i in #(vi
9434 *.orig|*.rej) ;; #(vi
9435 *.[0-9]*)
9436         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9437         if test \$verb = installing ; then
9438         if test ! -d \$cf_subdir\${section} ; then
9439                 \$MKDIRS \$cf_subdir\$section
9440         fi
9441         fi
9442
9443         # replace variables in man page
9444         if test ! -f $cf_man_alias ; then
9445 cat >>$cf_man_alias <<-CF_EOF2
9446                 s,@DATADIR@,\$datadir,g
9447                 s,@TERMINFO@,\$TERMINFO,g
9448                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9449                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9450                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9451                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9452 CF_EOF
9453
9454         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9455         do
9456                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9457                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9458 cat >>$cf_edit_man <<-CF_EOF
9459                 s,@$cf_NAME@,$cf_name,g
9460 CF_EOF
9461         done
9462
9463 cat >>$cf_edit_man <<CF_EOF
9464 CF_EOF2
9465                 echo "...made $cf_man_alias"
9466         fi
9467
9468         aliases=
9469         cf_source=\`basename \$i\`
9470         inalias=\$cf_source
9471         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9472         if test ! -f \$inalias ; then
9473                 echo .. skipped \$cf_source
9474                 continue
9475         fi
9476 CF_EOF
9477
9478 if test "$MANPAGE_ALIASES" != no ; then
9479 cat >>$cf_edit_man <<CF_EOF
9480         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9481 CF_EOF
9482 fi
9483
9484 if test "$MANPAGE_RENAMES" = no ; then
9485 cat >>$cf_edit_man <<CF_EOF
9486         # perform program transformations for section 1 man pages
9487         if test \$section = 1 ; then
9488                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9489         else
9490                 cf_target=\$cf_subdir\${section}/\$cf_source
9491         fi
9492 CF_EOF
9493 else
9494 cat >>$cf_edit_man <<CF_EOF
9495         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9496         if test -z "\$cf_target" ; then
9497                 echo '? missing rename for '\$cf_source
9498                 cf_target="\$cf_source"
9499         fi
9500         cf_target="\$cf_subdir\${section}/\${cf_target}"
9501
9502 CF_EOF
9503 fi
9504
9505 cat >>$cf_edit_man <<CF_EOF
9506         sed     -f $cf_man_alias \\
9507 CF_EOF
9508
9509 if test -f $MANPAGE_RENAMES ; then
9510 cat >>$cf_edit_man <<CF_EOF
9511                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9512 CF_EOF
9513 else
9514 cat >>$cf_edit_man <<CF_EOF
9515                 < \$i >\$TMP
9516 CF_EOF
9517 fi
9518
9519 cat >>$cf_edit_man <<CF_EOF
9520 if test \$cf_tables = yes ; then
9521         tbl \$TMP >\$TMP.out
9522         mv \$TMP.out \$TMP
9523 fi
9524 CF_EOF
9525
9526 if test $with_curses_h != yes ; then
9527 cat >>$cf_edit_man <<CF_EOF
9528         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9529         mv \$TMP.out \$TMP
9530 CF_EOF
9531 fi
9532
9533 cat >>$cf_edit_man <<CF_EOF
9534         if test \$form = format ; then
9535                 nroff -man \$TMP >\$TMP.out
9536                 mv \$TMP.out \$TMP
9537         fi
9538 CF_EOF
9539
9540 if test -n "$cf_compress" ; then
9541 cat >>$cf_edit_man <<CF_EOF
9542         if test \$verb = installing ; then
9543         if ( $cf_compress -f \$TMP )
9544         then
9545                 mv \$TMP.$cf_so_strip \$TMP
9546         fi
9547         fi
9548         cf_target="\$cf_target.$cf_so_strip"
9549 CF_EOF
9550 fi
9551
9552 case "$MANPAGE_FORMAT" in #(vi
9553 *BSDI*)
9554 cat >>$cf_edit_man <<CF_EOF
9555         if test \$form = format ; then
9556                 # BSDI installs only .0 suffixes in the cat directories
9557                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9558         fi
9559 CF_EOF
9560   ;;
9561 esac
9562
9563 cat >>$cf_edit_man <<CF_EOF
9564         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9565         if test \$verb = installing ; then
9566                 echo \$verb \$cf_target
9567                 \$INSTALL_DATA \$TMP \$cf_target
9568                 test -d \$cf_subdir\${section} &&
9569                 test -n "\$aliases" && (
9570                         cd \$cf_subdir\${section} && (
9571                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9572                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9573                                 cf_target=\`basename \$cf_target\`
9574                                 for cf_alias in \$aliases
9575                                 do
9576                                         if test \$section = 1 ; then
9577                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9578                                         fi
9579
9580                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9581                                                 if test -f \$cf_alias\${suffix} ; then
9582                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9583                                                         then
9584                                                                 continue
9585                                                         fi
9586                                                 fi
9587                                                 echo .. \$verb alias \$cf_alias\${suffix}
9588                                                 rm -f \$cf_alias\${suffix}
9589                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9590                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9591                                                 echo ".so \$cf_source" >\$TMP
9592 CF_EOF
9593 if test -n "$cf_compress" ; then
9594 cat >>$cf_edit_man <<CF_EOF
9595                                                 if test -n "$cf_so_strip" ; then
9596                                                         $cf_compress -f \$TMP
9597                                                         mv \$TMP.$cf_so_strip \$TMP
9598                                                 fi
9599 CF_EOF
9600 fi
9601 cat >>$cf_edit_man <<CF_EOF
9602                                                 echo .. \$verb alias \$cf_alias\${suffix}
9603                                                 rm -f \$cf_alias\${suffix}
9604                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9605                                         fi
9606                                 done
9607                         )
9608                 )
9609         elif test \$verb = removing ; then
9610                 test -f \$cf_target && (
9611                         echo \$verb \$cf_target
9612                         rm -f \$cf_target
9613                 )
9614                 test -d \$cf_subdir\${section} &&
9615                 test -n "\$aliases" && (
9616                         cd \$cf_subdir\${section} && (
9617                                 for cf_alias in \$aliases
9618                                 do
9619                                         if test \$section = 1 ; then
9620                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9621                                         fi
9622
9623                                         echo .. \$verb alias \$cf_alias\${suffix}
9624                                         rm -f \$cf_alias\${suffix}
9625                                 done
9626                         )
9627                 )
9628         else
9629 #               echo ".hy 0"
9630                 cat \$TMP
9631         fi
9632         ;;
9633 esac
9634 done
9635
9636 if test $cf_inboth = yes ; then
9637 if test \$form != format ; then
9638         sh \$0 format \$verb \$mandir \$srcdir \$*
9639 fi
9640 fi
9641
9642 exit 0
9643 CF_EOF
9644 chmod 755 $cf_edit_man
9645
9646 ###############################################################################
9647
9648 ### Note that some functions (such as const) are normally disabled anyway.
9649 echo "$as_me:9649: checking if you want to build with function extensions" >&5
9650 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9651
9652 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9653 if test "${enable_ext_funcs+set}" = set; then
9654   enableval="$enable_ext_funcs"
9655   with_ext_funcs=$enableval
9656 else
9657   with_ext_funcs=yes
9658 fi;
9659 echo "$as_me:9659: result: $with_ext_funcs" >&5
9660 echo "${ECHO_T}$with_ext_funcs" >&6
9661 if test "$with_ext_funcs" = yes ; then
9662         NCURSES_EXT_FUNCS=1
9663         cat >>confdefs.h <<\EOF
9664 #define HAVE_CURSES_VERSION 1
9665 EOF
9666
9667         cat >>confdefs.h <<\EOF
9668 #define HAVE_HAS_KEY 1
9669 EOF
9670
9671         cat >>confdefs.h <<\EOF
9672 #define HAVE_RESIZETERM 1
9673 EOF
9674
9675         cat >>confdefs.h <<\EOF
9676 #define HAVE_RESIZE_TERM 1
9677 EOF
9678
9679         cat >>confdefs.h <<\EOF
9680 #define HAVE_USE_DEFAULT_COLORS 1
9681 EOF
9682
9683         cat >>confdefs.h <<\EOF
9684 #define HAVE_WRESIZE 1
9685 EOF
9686
9687         cat >>confdefs.h <<\EOF
9688 #define NCURSES_EXT_FUNCS 1
9689 EOF
9690
9691         GENERATED_EXT_FUNCS=generated
9692 else
9693         NCURSES_EXT_FUNCS=0
9694         GENERATED_EXT_FUNCS=
9695 fi
9696
9697 echo "$as_me:9697: checking if you want to build with experimental SCREEN extensions" >&5
9698 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9699
9700 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9701 if test "${enable_sp_funcs+set}" = set; then
9702   enableval="$enable_sp_funcs"
9703   with_sp_funcs=$enableval
9704 else
9705   with_sp_funcs=no
9706 fi;
9707 echo "$as_me:9707: result: $with_sp_funcs" >&5
9708 echo "${ECHO_T}$with_sp_funcs" >&6
9709 if test "$with_sp_funcs" = yes ; then
9710         NCURSES_SP_FUNCS=1
9711         cat >>confdefs.h <<\EOF
9712 #define NCURSES_SP_FUNCS 1
9713 EOF
9714
9715         GENERATED_SP_FUNCS=generated
9716 else
9717         NCURSES_SP_FUNCS=0
9718         GENERATED_SP_FUNCS=
9719 fi
9720
9721 echo "$as_me:9721: checking if you want to build with experimental terminal-driver" >&5
9722 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9723
9724 # Check whether --enable-term-driver or --disable-term-driver was given.
9725 if test "${enable_term_driver+set}" = set; then
9726   enableval="$enable_term_driver"
9727   with_term_driver=$enableval
9728 else
9729   with_term_driver=no
9730 fi;
9731 echo "$as_me:9731: result: $with_term_driver" >&5
9732 echo "${ECHO_T}$with_term_driver" >&6
9733 if test "$with_term_driver" = yes ; then
9734         cat >>confdefs.h <<\EOF
9735 #define USE_TERM_DRIVER 1
9736 EOF
9737
9738         if test "$with_sp_funcs" != yes ; then
9739                 { { echo "$as_me:9739: error: The term-driver option relies upon sp-funcs" >&5
9740 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9741    { (exit 1); exit 1; }; }
9742         fi
9743 fi
9744
9745 ###   use option --enable-const to turn on use of const beyond that in XSI.
9746 echo "$as_me:9746: checking for extended use of const keyword" >&5
9747 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9748
9749 # Check whether --enable-const or --disable-const was given.
9750 if test "${enable_const+set}" = set; then
9751   enableval="$enable_const"
9752   with_ext_const=$enableval
9753 else
9754   with_ext_const=no
9755 fi;
9756 echo "$as_me:9756: result: $with_ext_const" >&5
9757 echo "${ECHO_T}$with_ext_const" >&6
9758 NCURSES_CONST='/*nothing*/'
9759 if test "$with_ext_const" = yes ; then
9760         NCURSES_CONST=const
9761 fi
9762
9763 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9764 echo "$as_me:9764: checking if you want to use extended colors" >&5
9765 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9766
9767 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9768 if test "${enable_ext_colors+set}" = set; then
9769   enableval="$enable_ext_colors"
9770   with_ext_colors=$enableval
9771 else
9772   with_ext_colors=no
9773 fi;
9774 echo "$as_me:9774: result: $with_ext_colors" >&5
9775 echo "${ECHO_T}$with_ext_colors" >&6
9776 NCURSES_EXT_COLORS=0
9777 if test "$with_ext_colors" = yes ; then
9778         if test "$with_widec" != yes ; then
9779                 { { echo "$as_me:9779: error: This option applies only to wide-character library" >&5
9780 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9781    { (exit 1); exit 1; }; }
9782         else
9783                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9784
9785 if test "${with_abi_version+set}" != set; then
9786         case $cf_cv_rel_version in
9787         5.*)
9788                 cf_cv_rel_version=6.0
9789                 cf_cv_abi_version=6
9790                 { echo "$as_me:9790: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9791 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9792                 ;;
9793         esac
9794 fi
9795
9796         fi
9797         NCURSES_EXT_COLORS=1
9798         cat >>confdefs.h <<\EOF
9799 #define NCURSES_EXT_COLORS 1
9800 EOF
9801
9802 fi
9803
9804 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9805 echo "$as_me:9805: checking if you want to use extended mouse encoding" >&5
9806 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9807
9808 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9809 if test "${enable_ext_mouse+set}" = set; then
9810   enableval="$enable_ext_mouse"
9811   with_ext_mouse=$enableval
9812 else
9813   with_ext_mouse=no
9814 fi;
9815 echo "$as_me:9815: result: $with_ext_mouse" >&5
9816 echo "${ECHO_T}$with_ext_mouse" >&6
9817 NCURSES_MOUSE_VERSION=1
9818 if test "$with_ext_mouse" = yes ; then
9819         NCURSES_MOUSE_VERSION=2
9820
9821 if test "${with_abi_version+set}" != set; then
9822         case $cf_cv_rel_version in
9823         5.*)
9824                 cf_cv_rel_version=6.0
9825                 cf_cv_abi_version=6
9826                 { echo "$as_me:9826: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9827 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9828                 ;;
9829         esac
9830 fi
9831
9832 fi
9833
9834 echo "$as_me:9834: checking if you want \$NCURSES_NO_PADDING code" >&5
9835 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9836
9837 # Check whether --enable-no-padding or --disable-no-padding was given.
9838 if test "${enable_no_padding+set}" = set; then
9839   enableval="$enable_no_padding"
9840   with_no_padding=$enableval
9841 else
9842   with_no_padding=$with_ext_funcs
9843 fi;
9844 echo "$as_me:9844: result: $with_no_padding" >&5
9845 echo "${ECHO_T}$with_no_padding" >&6
9846 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9847 #define NCURSES_NO_PADDING 1
9848 EOF
9849
9850 echo "$as_me:9850: checking for ANSI C header files" >&5
9851 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9852 if test "${ac_cv_header_stdc+set}" = set; then
9853   echo $ECHO_N "(cached) $ECHO_C" >&6
9854 else
9855   cat >conftest.$ac_ext <<_ACEOF
9856 #line 9856 "configure"
9857 #include "confdefs.h"
9858 #include <stdlib.h>
9859 #include <stdarg.h>
9860 #include <string.h>
9861 #include <float.h>
9862
9863 _ACEOF
9864 if { (eval echo "$as_me:9864: \"$ac_cpp conftest.$ac_ext\"") >&5
9865   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9866   ac_status=$?
9867   egrep -v '^ *\+' conftest.er1 >conftest.err
9868   rm -f conftest.er1
9869   cat conftest.err >&5
9870   echo "$as_me:9870: \$? = $ac_status" >&5
9871   (exit $ac_status); } >/dev/null; then
9872   if test -s conftest.err; then
9873     ac_cpp_err=$ac_c_preproc_warn_flag
9874   else
9875     ac_cpp_err=
9876   fi
9877 else
9878   ac_cpp_err=yes
9879 fi
9880 if test -z "$ac_cpp_err"; then
9881   ac_cv_header_stdc=yes
9882 else
9883   echo "$as_me: failed program was:" >&5
9884   cat conftest.$ac_ext >&5
9885   ac_cv_header_stdc=no
9886 fi
9887 rm -f conftest.err conftest.$ac_ext
9888
9889 if test $ac_cv_header_stdc = yes; then
9890   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9891   cat >conftest.$ac_ext <<_ACEOF
9892 #line 9892 "configure"
9893 #include "confdefs.h"
9894 #include <string.h>
9895
9896 _ACEOF
9897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9898   egrep "memchr" >/dev/null 2>&1; then
9899   :
9900 else
9901   ac_cv_header_stdc=no
9902 fi
9903 rm -f conftest*
9904
9905 fi
9906
9907 if test $ac_cv_header_stdc = yes; then
9908   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9909   cat >conftest.$ac_ext <<_ACEOF
9910 #line 9910 "configure"
9911 #include "confdefs.h"
9912 #include <stdlib.h>
9913
9914 _ACEOF
9915 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9916   egrep "free" >/dev/null 2>&1; then
9917   :
9918 else
9919   ac_cv_header_stdc=no
9920 fi
9921 rm -f conftest*
9922
9923 fi
9924
9925 if test $ac_cv_header_stdc = yes; then
9926   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9927   if test "$cross_compiling" = yes; then
9928   :
9929 else
9930   cat >conftest.$ac_ext <<_ACEOF
9931 #line 9931 "configure"
9932 #include "confdefs.h"
9933 #include <ctype.h>
9934 #if ((' ' & 0x0FF) == 0x020)
9935 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9936 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9937 #else
9938 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9939                      || ('j' <= (c) && (c) <= 'r') \
9940                      || ('s' <= (c) && (c) <= 'z'))
9941 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9942 #endif
9943
9944 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9945 int
9946 main ()
9947 {
9948   int i;
9949   for (i = 0; i < 256; i++)
9950     if (XOR (islower (i), ISLOWER (i))
9951         || toupper (i) != TOUPPER (i))
9952       $ac_main_return(2);
9953   $ac_main_return (0);
9954 }
9955 _ACEOF
9956 rm -f conftest$ac_exeext
9957 if { (eval echo "$as_me:9957: \"$ac_link\"") >&5
9958   (eval $ac_link) 2>&5
9959   ac_status=$?
9960   echo "$as_me:9960: \$? = $ac_status" >&5
9961   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9962   { (eval echo "$as_me:9962: \"$ac_try\"") >&5
9963   (eval $ac_try) 2>&5
9964   ac_status=$?
9965   echo "$as_me:9965: \$? = $ac_status" >&5
9966   (exit $ac_status); }; }; then
9967   :
9968 else
9969   echo "$as_me: program exited with status $ac_status" >&5
9970 echo "$as_me: failed program was:" >&5
9971 cat conftest.$ac_ext >&5
9972 ac_cv_header_stdc=no
9973 fi
9974 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9975 fi
9976 fi
9977 fi
9978 echo "$as_me:9978: result: $ac_cv_header_stdc" >&5
9979 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9980 if test $ac_cv_header_stdc = yes; then
9981
9982 cat >>confdefs.h <<\EOF
9983 #define STDC_HEADERS 1
9984 EOF
9985
9986 fi
9987
9988 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9989
9990 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9991                   inttypes.h stdint.h unistd.h
9992 do
9993 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9994 echo "$as_me:9994: checking for $ac_header" >&5
9995 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9996 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9997   echo $ECHO_N "(cached) $ECHO_C" >&6
9998 else
9999   cat >conftest.$ac_ext <<_ACEOF
10000 #line 10000 "configure"
10001 #include "confdefs.h"
10002 $ac_includes_default
10003 #include <$ac_header>
10004 _ACEOF
10005 rm -f conftest.$ac_objext
10006 if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007   (eval $ac_compile) 2>&5
10008   ac_status=$?
10009   echo "$as_me:10009: \$? = $ac_status" >&5
10010   (exit $ac_status); } &&
10011          { ac_try='test -s conftest.$ac_objext'
10012   { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013   (eval $ac_try) 2>&5
10014   ac_status=$?
10015   echo "$as_me:10015: \$? = $ac_status" >&5
10016   (exit $ac_status); }; }; then
10017   eval "$as_ac_Header=yes"
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 cat conftest.$ac_ext >&5
10021 eval "$as_ac_Header=no"
10022 fi
10023 rm -f conftest.$ac_objext conftest.$ac_ext
10024 fi
10025 echo "$as_me:10025: result: `eval echo '${'$as_ac_Header'}'`" >&5
10026 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10027 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10028   cat >>confdefs.h <<EOF
10029 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10030 EOF
10031
10032 fi
10033 done
10034
10035 echo "$as_me:10035: checking for signed char" >&5
10036 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10037 if test "${ac_cv_type_signed_char+set}" = set; then
10038   echo $ECHO_N "(cached) $ECHO_C" >&6
10039 else
10040   cat >conftest.$ac_ext <<_ACEOF
10041 #line 10041 "configure"
10042 #include "confdefs.h"
10043 $ac_includes_default
10044 int
10045 main ()
10046 {
10047 if ((signed char *) 0)
10048   return 0;
10049 if (sizeof (signed char))
10050   return 0;
10051   ;
10052   return 0;
10053 }
10054 _ACEOF
10055 rm -f conftest.$ac_objext
10056 if { (eval echo "$as_me:10056: \"$ac_compile\"") >&5
10057   (eval $ac_compile) 2>&5
10058   ac_status=$?
10059   echo "$as_me:10059: \$? = $ac_status" >&5
10060   (exit $ac_status); } &&
10061          { ac_try='test -s conftest.$ac_objext'
10062   { (eval echo "$as_me:10062: \"$ac_try\"") >&5
10063   (eval $ac_try) 2>&5
10064   ac_status=$?
10065   echo "$as_me:10065: \$? = $ac_status" >&5
10066   (exit $ac_status); }; }; then
10067   ac_cv_type_signed_char=yes
10068 else
10069   echo "$as_me: failed program was:" >&5
10070 cat conftest.$ac_ext >&5
10071 ac_cv_type_signed_char=no
10072 fi
10073 rm -f conftest.$ac_objext conftest.$ac_ext
10074 fi
10075 echo "$as_me:10075: result: $ac_cv_type_signed_char" >&5
10076 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10077
10078 echo "$as_me:10078: checking size of signed char" >&5
10079 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10080 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10081   echo $ECHO_N "(cached) $ECHO_C" >&6
10082 else
10083   if test "$ac_cv_type_signed_char" = yes; then
10084   if test "$cross_compiling" = yes; then
10085   # Depending upon the size, compute the lo and hi bounds.
10086 cat >conftest.$ac_ext <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10089 $ac_includes_default
10090 int
10091 main ()
10092 {
10093 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10094   ;
10095   return 0;
10096 }
10097 _ACEOF
10098 rm -f conftest.$ac_objext
10099 if { (eval echo "$as_me:10099: \"$ac_compile\"") >&5
10100   (eval $ac_compile) 2>&5
10101   ac_status=$?
10102   echo "$as_me:10102: \$? = $ac_status" >&5
10103   (exit $ac_status); } &&
10104          { ac_try='test -s conftest.$ac_objext'
10105   { (eval echo "$as_me:10105: \"$ac_try\"") >&5
10106   (eval $ac_try) 2>&5
10107   ac_status=$?
10108   echo "$as_me:10108: \$? = $ac_status" >&5
10109   (exit $ac_status); }; }; then
10110   ac_lo=0 ac_mid=0
10111   while :; do
10112     cat >conftest.$ac_ext <<_ACEOF
10113 #line 10113 "configure"
10114 #include "confdefs.h"
10115 $ac_includes_default
10116 int
10117 main ()
10118 {
10119 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10120   ;
10121   return 0;
10122 }
10123 _ACEOF
10124 rm -f conftest.$ac_objext
10125 if { (eval echo "$as_me:10125: \"$ac_compile\"") >&5
10126   (eval $ac_compile) 2>&5
10127   ac_status=$?
10128   echo "$as_me:10128: \$? = $ac_status" >&5
10129   (exit $ac_status); } &&
10130          { ac_try='test -s conftest.$ac_objext'
10131   { (eval echo "$as_me:10131: \"$ac_try\"") >&5
10132   (eval $ac_try) 2>&5
10133   ac_status=$?
10134   echo "$as_me:10134: \$? = $ac_status" >&5
10135   (exit $ac_status); }; }; then
10136   ac_hi=$ac_mid; break
10137 else
10138   echo "$as_me: failed program was:" >&5
10139 cat conftest.$ac_ext >&5
10140 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10141 fi
10142 rm -f conftest.$ac_objext conftest.$ac_ext
10143   done
10144 else
10145   echo "$as_me: failed program was:" >&5
10146 cat conftest.$ac_ext >&5
10147 ac_hi=-1 ac_mid=-1
10148   while :; do
10149     cat >conftest.$ac_ext <<_ACEOF
10150 #line 10150 "configure"
10151 #include "confdefs.h"
10152 $ac_includes_default
10153 int
10154 main ()
10155 {
10156 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10157   ;
10158   return 0;
10159 }
10160 _ACEOF
10161 rm -f conftest.$ac_objext
10162 if { (eval echo "$as_me:10162: \"$ac_compile\"") >&5
10163   (eval $ac_compile) 2>&5
10164   ac_status=$?
10165   echo "$as_me:10165: \$? = $ac_status" >&5
10166   (exit $ac_status); } &&
10167          { ac_try='test -s conftest.$ac_objext'
10168   { (eval echo "$as_me:10168: \"$ac_try\"") >&5
10169   (eval $ac_try) 2>&5
10170   ac_status=$?
10171   echo "$as_me:10171: \$? = $ac_status" >&5
10172   (exit $ac_status); }; }; then
10173   ac_lo=$ac_mid; break
10174 else
10175   echo "$as_me: failed program was:" >&5
10176 cat conftest.$ac_ext >&5
10177 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10178 fi
10179 rm -f conftest.$ac_objext conftest.$ac_ext
10180   done
10181 fi
10182 rm -f conftest.$ac_objext conftest.$ac_ext
10183 # Binary search between lo and hi bounds.
10184 while test "x$ac_lo" != "x$ac_hi"; do
10185   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10186   cat >conftest.$ac_ext <<_ACEOF
10187 #line 10187 "configure"
10188 #include "confdefs.h"
10189 $ac_includes_default
10190 int
10191 main ()
10192 {
10193 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 rm -f conftest.$ac_objext
10199 if { (eval echo "$as_me:10199: \"$ac_compile\"") >&5
10200   (eval $ac_compile) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit $ac_status); } &&
10204          { ac_try='test -s conftest.$ac_objext'
10205   { (eval echo "$as_me:10205: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:10208: \$? = $ac_status" >&5
10209   (exit $ac_status); }; }; then
10210   ac_hi=$ac_mid
10211 else
10212   echo "$as_me: failed program was:" >&5
10213 cat conftest.$ac_ext >&5
10214 ac_lo=`expr $ac_mid + 1`
10215 fi
10216 rm -f conftest.$ac_objext conftest.$ac_ext
10217 done
10218 ac_cv_sizeof_signed_char=$ac_lo
10219 else
10220   if test "$cross_compiling" = yes; then
10221   { { echo "$as_me:10221: error: cannot run test program while cross compiling" >&5
10222 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10223    { (exit 1); exit 1; }; }
10224 else
10225   cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228 $ac_includes_default
10229 int
10230 main ()
10231 {
10232 FILE *f = fopen ("conftest.val", "w");
10233 if (!f)
10234   $ac_main_return (1);
10235 fprintf (f, "%d", (sizeof (signed char)));
10236 fclose (f);
10237   ;
10238   return 0;
10239 }
10240 _ACEOF
10241 rm -f conftest$ac_exeext
10242 if { (eval echo "$as_me:10242: \"$ac_link\"") >&5
10243   (eval $ac_link) 2>&5
10244   ac_status=$?
10245   echo "$as_me:10245: \$? = $ac_status" >&5
10246   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10247   { (eval echo "$as_me:10247: \"$ac_try\"") >&5
10248   (eval $ac_try) 2>&5
10249   ac_status=$?
10250   echo "$as_me:10250: \$? = $ac_status" >&5
10251   (exit $ac_status); }; }; then
10252   ac_cv_sizeof_signed_char=`cat conftest.val`
10253 else
10254   echo "$as_me: program exited with status $ac_status" >&5
10255 echo "$as_me: failed program was:" >&5
10256 cat conftest.$ac_ext >&5
10257 fi
10258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10259 fi
10260 fi
10261 rm -f conftest.val
10262 else
10263   ac_cv_sizeof_signed_char=0
10264 fi
10265 fi
10266 echo "$as_me:10266: result: $ac_cv_sizeof_signed_char" >&5
10267 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10268 cat >>confdefs.h <<EOF
10269 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10270 EOF
10271
10272 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10273         NCURSES_SBOOL="signed char"
10274 else
10275         NCURSES_SBOOL="char"
10276 fi
10277 echo "$as_me:10277: checking if you want to use signed Boolean array in term.h" >&5
10278 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10279
10280 # Check whether --enable-signed-char or --disable-signed-char was given.
10281 if test "${enable_signed_char+set}" = set; then
10282   enableval="$enable_signed_char"
10283   with_signed_char=$enableval
10284 else
10285   with_signed_char=no
10286 fi;
10287 echo "$as_me:10287: result: $with_signed_char" >&5
10288 echo "${ECHO_T}$with_signed_char" >&6
10289 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10290
10291 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10292 echo "$as_me:10292: checking if you want SIGWINCH handler" >&5
10293 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10294
10295 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10296 if test "${enable_sigwinch+set}" = set; then
10297   enableval="$enable_sigwinch"
10298   with_sigwinch=$enableval
10299 else
10300   with_sigwinch=$with_ext_funcs
10301 fi;
10302 echo "$as_me:10302: result: $with_sigwinch" >&5
10303 echo "${ECHO_T}$with_sigwinch" >&6
10304 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10305 #define USE_SIGWINCH 1
10306 EOF
10307
10308 ###   use option --enable-tcap-names to allow user to define new capabilities
10309 echo "$as_me:10309: checking if you want user-definable terminal capabilities like termcap" >&5
10310 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10311
10312 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10313 if test "${enable_tcap_names+set}" = set; then
10314   enableval="$enable_tcap_names"
10315   with_tcap_names=$enableval
10316 else
10317   with_tcap_names=$with_ext_funcs
10318 fi;
10319 echo "$as_me:10319: result: $with_tcap_names" >&5
10320 echo "${ECHO_T}$with_tcap_names" >&6
10321 NCURSES_XNAMES=0
10322 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10323
10324 ###############################################################################
10325 # These options are relatively safe to experiment with.
10326
10327 echo "$as_me:10327: checking if you want all development code" >&5
10328 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10329
10330 # Check whether --with-develop or --without-develop was given.
10331 if test "${with_develop+set}" = set; then
10332   withval="$with_develop"
10333   with_develop=$withval
10334 else
10335   with_develop=no
10336 fi;
10337 echo "$as_me:10337: result: $with_develop" >&5
10338 echo "${ECHO_T}$with_develop" >&6
10339
10340 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10341 echo "$as_me:10341: checking if you want hard-tabs code" >&5
10342 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10343
10344 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10345 if test "${enable_hard_tabs+set}" = set; then
10346   enableval="$enable_hard_tabs"
10347
10348 else
10349   enable_hard_tabs=$with_develop
10350 fi;
10351 echo "$as_me:10351: result: $enable_hard_tabs" >&5
10352 echo "${ECHO_T}$enable_hard_tabs" >&6
10353 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10354 #define USE_HARD_TABS 1
10355 EOF
10356
10357 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10358 echo "$as_me:10358: checking if you want limited support for xmc" >&5
10359 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10360
10361 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10362 if test "${enable_xmc_glitch+set}" = set; then
10363   enableval="$enable_xmc_glitch"
10364
10365 else
10366   enable_xmc_glitch=$with_develop
10367 fi;
10368 echo "$as_me:10368: result: $enable_xmc_glitch" >&5
10369 echo "${ECHO_T}$enable_xmc_glitch" >&6
10370 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10371 #define USE_XMC_SUPPORT 1
10372 EOF
10373
10374 ###############################################################################
10375 # These are just experimental, probably should not be in a package:
10376
10377 echo "$as_me:10377: checking if you do not want to assume colors are white-on-black" >&5
10378 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10379
10380 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10381 if test "${enable_assumed_color+set}" = set; then
10382   enableval="$enable_assumed_color"
10383   with_assumed_color=$enableval
10384 else
10385   with_assumed_color=yes
10386 fi;
10387 echo "$as_me:10387: result: $with_assumed_color" >&5
10388 echo "${ECHO_T}$with_assumed_color" >&6
10389 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10390 #define USE_ASSUMED_COLOR 1
10391 EOF
10392
10393 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10394 echo "$as_me:10394: checking if you want hashmap scrolling-optimization code" >&5
10395 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10396
10397 # Check whether --enable-hashmap or --disable-hashmap was given.
10398 if test "${enable_hashmap+set}" = set; then
10399   enableval="$enable_hashmap"
10400   with_hashmap=$enableval
10401 else
10402   with_hashmap=yes
10403 fi;
10404 echo "$as_me:10404: result: $with_hashmap" >&5
10405 echo "${ECHO_T}$with_hashmap" >&6
10406 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10407 #define USE_HASHMAP 1
10408 EOF
10409
10410 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10411 echo "$as_me:10411: checking if you want colorfgbg code" >&5
10412 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10413
10414 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10415 if test "${enable_colorfgbg+set}" = set; then
10416   enableval="$enable_colorfgbg"
10417   with_colorfgbg=$enableval
10418 else
10419   with_colorfgbg=no
10420 fi;
10421 echo "$as_me:10421: result: $with_colorfgbg" >&5
10422 echo "${ECHO_T}$with_colorfgbg" >&6
10423 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10424 #define USE_COLORFGBG 1
10425 EOF
10426
10427 ###   use option --enable-interop to turn on use of bindings used for interop
10428 echo "$as_me:10428: checking if you want interop bindings" >&5
10429 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10430
10431 # Check whether --enable-interop or --disable-interop was given.
10432 if test "${enable_interop+set}" = set; then
10433   enableval="$enable_interop"
10434   with_exp_interop=$enableval
10435 else
10436   with_exp_interop=no
10437 fi;
10438 echo "$as_me:10438: result: $with_exp_interop" >&5
10439 echo "${ECHO_T}$with_exp_interop" >&6
10440
10441 NCURSES_INTEROP_FUNCS=0
10442 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10443
10444 # This is still experimental (20080329), but should ultimately be moved to
10445 # the script-block --with-normal, etc.
10446
10447 echo "$as_me:10447: checking if you want to link with the pthread library" >&5
10448 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10449
10450 # Check whether --with-pthread or --without-pthread was given.
10451 if test "${with_pthread+set}" = set; then
10452   withval="$with_pthread"
10453   with_pthread=$withval
10454 else
10455   with_pthread=no
10456 fi;
10457 echo "$as_me:10457: result: $with_pthread" >&5
10458 echo "${ECHO_T}$with_pthread" >&6
10459
10460 if test "$with_pthread" != no ; then
10461     echo "$as_me:10461: checking for pthread.h" >&5
10462 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10463 if test "${ac_cv_header_pthread_h+set}" = set; then
10464   echo $ECHO_N "(cached) $ECHO_C" >&6
10465 else
10466   cat >conftest.$ac_ext <<_ACEOF
10467 #line 10467 "configure"
10468 #include "confdefs.h"
10469 #include <pthread.h>
10470 _ACEOF
10471 if { (eval echo "$as_me:10471: \"$ac_cpp conftest.$ac_ext\"") >&5
10472   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10473   ac_status=$?
10474   egrep -v '^ *\+' conftest.er1 >conftest.err
10475   rm -f conftest.er1
10476   cat conftest.err >&5
10477   echo "$as_me:10477: \$? = $ac_status" >&5
10478   (exit $ac_status); } >/dev/null; then
10479   if test -s conftest.err; then
10480     ac_cpp_err=$ac_c_preproc_warn_flag
10481   else
10482     ac_cpp_err=
10483   fi
10484 else
10485   ac_cpp_err=yes
10486 fi
10487 if test -z "$ac_cpp_err"; then
10488   ac_cv_header_pthread_h=yes
10489 else
10490   echo "$as_me: failed program was:" >&5
10491   cat conftest.$ac_ext >&5
10492   ac_cv_header_pthread_h=no
10493 fi
10494 rm -f conftest.err conftest.$ac_ext
10495 fi
10496 echo "$as_me:10496: result: $ac_cv_header_pthread_h" >&5
10497 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10498 if test $ac_cv_header_pthread_h = yes; then
10499
10500         cat >>confdefs.h <<\EOF
10501 #define HAVE_PTHREADS_H 1
10502 EOF
10503
10504         echo "$as_me:10504: checking if we can link with the pthread library" >&5
10505 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10506         cf_save_LIBS="$LIBS"
10507         LIBS="-lpthread $LIBS"
10508         cat >conftest.$ac_ext <<_ACEOF
10509 #line 10509 "configure"
10510 #include "confdefs.h"
10511
10512 #include <pthread.h>
10513
10514 int
10515 main ()
10516 {
10517
10518         int rc = pthread_create(0,0,0,0);
10519
10520   ;
10521   return 0;
10522 }
10523 _ACEOF
10524 rm -f conftest.$ac_objext conftest$ac_exeext
10525 if { (eval echo "$as_me:10525: \"$ac_link\"") >&5
10526   (eval $ac_link) 2>&5
10527   ac_status=$?
10528   echo "$as_me:10528: \$? = $ac_status" >&5
10529   (exit $ac_status); } &&
10530          { ac_try='test -s conftest$ac_exeext'
10531   { (eval echo "$as_me:10531: \"$ac_try\"") >&5
10532   (eval $ac_try) 2>&5
10533   ac_status=$?
10534   echo "$as_me:10534: \$? = $ac_status" >&5
10535   (exit $ac_status); }; }; then
10536   with_pthread=yes
10537 else
10538   echo "$as_me: failed program was:" >&5
10539 cat conftest.$ac_ext >&5
10540 with_pthread=no
10541 fi
10542 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10543         LIBS="$cf_save_LIBS"
10544         echo "$as_me:10544: result: $with_pthread" >&5
10545 echo "${ECHO_T}$with_pthread" >&6
10546
10547         if test "$with_pthread" = yes ; then
10548             LIBS="-lpthread $LIBS"
10549             cat >>confdefs.h <<\EOF
10550 #define HAVE_LIBPTHREADS 1
10551 EOF
10552
10553         else
10554             { { echo "$as_me:10554: error: Cannot link with pthread library" >&5
10555 echo "$as_me: error: Cannot link with pthread library" >&2;}
10556    { (exit 1); exit 1; }; }
10557         fi
10558
10559 fi
10560
10561 fi
10562
10563 echo "$as_me:10563: checking if you want to use weak-symbols for pthreads" >&5
10564 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10565
10566 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10567 if test "${enable_weak_symbols+set}" = set; then
10568   enableval="$enable_weak_symbols"
10569   use_weak_symbols=$withval
10570 else
10571   use_weak_symbols=no
10572 fi;
10573 echo "$as_me:10573: result: $use_weak_symbols" >&5
10574 echo "${ECHO_T}$use_weak_symbols" >&6
10575 if test "$use_weak_symbols" = yes ; then
10576
10577 echo "$as_me:10577: checking if $CC supports weak symbols" >&5
10578 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10579 if test "${cf_cv_weak_symbols+set}" = set; then
10580   echo $ECHO_N "(cached) $ECHO_C" >&6
10581 else
10582
10583 cat >conftest.$ac_ext <<_ACEOF
10584 #line 10584 "configure"
10585 #include "confdefs.h"
10586
10587 #include <stdio.h>
10588 int
10589 main ()
10590 {
10591
10592 #if defined(__GNUC__)
10593 #  if defined __USE_ISOC99
10594 #    define _cat_pragma(exp)    _Pragma(#exp)
10595 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10596 #  else
10597 #    define _weak_pragma(exp)
10598 #  endif
10599 #  define _declare(name)        __extension__ extern __typeof__(name) name
10600 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10601 #endif
10602
10603 weak_symbol(fopen);
10604
10605   ;
10606   return 0;
10607 }
10608 _ACEOF
10609 rm -f conftest.$ac_objext
10610 if { (eval echo "$as_me:10610: \"$ac_compile\"") >&5
10611   (eval $ac_compile) 2>&5
10612   ac_status=$?
10613   echo "$as_me:10613: \$? = $ac_status" >&5
10614   (exit $ac_status); } &&
10615          { ac_try='test -s conftest.$ac_objext'
10616   { (eval echo "$as_me:10616: \"$ac_try\"") >&5
10617   (eval $ac_try) 2>&5
10618   ac_status=$?
10619   echo "$as_me:10619: \$? = $ac_status" >&5
10620   (exit $ac_status); }; }; then
10621   cf_cv_weak_symbols=yes
10622 else
10623   echo "$as_me: failed program was:" >&5
10624 cat conftest.$ac_ext >&5
10625 cf_cv_weak_symbols=no
10626 fi
10627 rm -f conftest.$ac_objext conftest.$ac_ext
10628
10629 fi
10630 echo "$as_me:10630: result: $cf_cv_weak_symbols" >&5
10631 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10632
10633 else
10634     cf_cv_weak_symbols=no
10635 fi
10636
10637 if test $cf_cv_weak_symbols = yes ; then
10638     cat >>confdefs.h <<\EOF
10639 #define USE_WEAK_SYMBOLS 1
10640 EOF
10641
10642 fi
10643
10644 PTHREAD=
10645 if test "$with_pthread" = "yes" ; then
10646     cat >>confdefs.h <<\EOF
10647 #define USE_PTHREADS 1
10648 EOF
10649
10650     enable_reentrant=yes
10651     if test $cf_cv_weak_symbols = yes ; then
10652         PTHREAD=-lpthread
10653     fi
10654 fi
10655
10656 # Reentrant code has to be opaque; there's little advantage to making ncurses
10657 # opaque outside of that, so there is no --enable-opaque option.  We can use
10658 # this option without --with-pthreads, but this will be always set for
10659 # pthreads.
10660 echo "$as_me:10660: checking if you want experimental reentrant code" >&5
10661 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10662
10663 # Check whether --enable-reentrant or --disable-reentrant was given.
10664 if test "${enable_reentrant+set}" = set; then
10665   enableval="$enable_reentrant"
10666   with_reentrant=$enableval
10667 else
10668   with_reentrant=no
10669 fi;
10670 echo "$as_me:10670: result: $with_reentrant" >&5
10671 echo "${ECHO_T}$with_reentrant" >&6
10672 if test "$with_reentrant" = yes ; then
10673         cf_cv_enable_reentrant=1
10674         cf_cv_enable_opaque="NCURSES_INTERNALS"
10675         NCURSES_OPAQUE=1
10676         NCURSES_SIZE_T=int
10677         if test $cf_cv_weak_symbols = yes ; then
10678
10679 # remove pthread library from $LIBS
10680 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10681
10682         else
10683                 LIB_SUFFIX="t${LIB_SUFFIX}"
10684         fi
10685         cat >>confdefs.h <<\EOF
10686 #define USE_REENTRANT 1
10687 EOF
10688
10689 if test "${with_abi_version+set}" != set; then
10690         case $cf_cv_rel_version in
10691         5.*)
10692                 cf_cv_rel_version=6.0
10693                 cf_cv_abi_version=6
10694                 { echo "$as_me:10694: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10695 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10696                 ;;
10697         esac
10698 fi
10699
10700 else
10701         cf_cv_enable_reentrant=0
10702         cf_cv_enable_opaque="NCURSES_OPAQUE"
10703         NCURSES_OPAQUE=0
10704         NCURSES_SIZE_T=short
10705 fi
10706
10707 ### Allow using a different wrap-prefix
10708 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10709         echo "$as_me:10709: checking for prefix used to wrap public variables" >&5
10710 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10711
10712 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10713 if test "${with_wrap_prefix+set}" = set; then
10714   withval="$with_wrap_prefix"
10715   NCURSES_WRAP_PREFIX=$withval
10716 else
10717   NCURSES_WRAP_PREFIX=_nc_
10718 fi;
10719         echo "$as_me:10719: result: $NCURSES_WRAP_PREFIX" >&5
10720 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10721 else
10722         NCURSES_WRAP_PREFIX=_nc_
10723 fi
10724
10725 cat >>confdefs.h <<EOF
10726 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10727 EOF
10728
10729 echo "$as_me:10729: checking if you want experimental safe-sprintf code" >&5
10730 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10731
10732 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10733 if test "${enable_safe_sprintf+set}" = set; then
10734   enableval="$enable_safe_sprintf"
10735   with_safe_sprintf=$enableval
10736 else
10737   with_safe_sprintf=no
10738 fi;
10739 echo "$as_me:10739: result: $with_safe_sprintf" >&5
10740 echo "${ECHO_T}$with_safe_sprintf" >&6
10741 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10742 #define USE_SAFE_SPRINTF 1
10743 EOF
10744
10745 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10746 # when hashmap is used scroll hints are useless
10747 if test "$with_hashmap" = no ; then
10748 echo "$as_me:10748: checking if you want to experiment without scrolling-hints code" >&5
10749 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10750
10751 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10752 if test "${enable_scroll_hints+set}" = set; then
10753   enableval="$enable_scroll_hints"
10754   with_scroll_hints=$enableval
10755 else
10756   with_scroll_hints=yes
10757 fi;
10758 echo "$as_me:10758: result: $with_scroll_hints" >&5
10759 echo "${ECHO_T}$with_scroll_hints" >&6
10760 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10761 #define USE_SCROLL_HINTS 1
10762 EOF
10763
10764 fi
10765
10766 echo "$as_me:10766: checking if you want experimental wgetch-events code" >&5
10767 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10768
10769 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10770 if test "${enable_wgetch_events+set}" = set; then
10771   enableval="$enable_wgetch_events"
10772   with_wgetch_events=$enableval
10773 else
10774   with_wgetch_events=no
10775 fi;
10776 echo "$as_me:10776: result: $with_wgetch_events" >&5
10777 echo "${ECHO_T}$with_wgetch_events" >&6
10778 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10779 #define NCURSES_WGETCH_EVENTS 1
10780 EOF
10781
10782 ###############################################################################
10783
10784 ###     use option --disable-echo to suppress full display compiling commands
10785 echo "$as_me:10785: checking if you want to display full commands during build" >&5
10786 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10787
10788 # Check whether --enable-echo or --disable-echo was given.
10789 if test "${enable_echo+set}" = set; then
10790   enableval="$enable_echo"
10791   with_echo=$enableval
10792 else
10793   with_echo=yes
10794 fi;
10795 if test "$with_echo" = yes; then
10796         ECHO_LINK=
10797 else
10798         ECHO_LINK='@ echo linking $@ ... ;'
10799         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10800         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10801 fi
10802 echo "$as_me:10802: result: $with_echo" >&5
10803 echo "${ECHO_T}$with_echo" >&6
10804
10805 ###     use option --enable-warnings to turn on all gcc warnings
10806 echo "$as_me:10806: checking if you want to see compiler warnings" >&5
10807 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10808
10809 # Check whether --enable-warnings or --disable-warnings was given.
10810 if test "${enable_warnings+set}" = set; then
10811   enableval="$enable_warnings"
10812   with_warnings=$enableval
10813 fi;
10814 echo "$as_me:10814: result: $with_warnings" >&5
10815 echo "${ECHO_T}$with_warnings" >&6
10816
10817 if test "x$with_warnings" = "xyes"; then
10818         ADAFLAGS="$ADAFLAGS -gnatg"
10819
10820 INTEL_COMPILER=no
10821
10822 if test "$GCC" = yes ; then
10823         case $host_os in
10824         linux*|gnu*)
10825                 echo "$as_me:10825: checking if this is really Intel C compiler" >&5
10826 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10827                 cf_save_CFLAGS="$CFLAGS"
10828                 CFLAGS="$CFLAGS -no-gcc"
10829                 cat >conftest.$ac_ext <<_ACEOF
10830 #line 10830 "configure"
10831 #include "confdefs.h"
10832
10833 int
10834 main ()
10835 {
10836
10837 #ifdef __INTEL_COMPILER
10838 #else
10839 make an error
10840 #endif
10841
10842   ;
10843   return 0;
10844 }
10845 _ACEOF
10846 rm -f conftest.$ac_objext
10847 if { (eval echo "$as_me:10847: \"$ac_compile\"") >&5
10848   (eval $ac_compile) 2>&5
10849   ac_status=$?
10850   echo "$as_me:10850: \$? = $ac_status" >&5
10851   (exit $ac_status); } &&
10852          { ac_try='test -s conftest.$ac_objext'
10853   { (eval echo "$as_me:10853: \"$ac_try\"") >&5
10854   (eval $ac_try) 2>&5
10855   ac_status=$?
10856   echo "$as_me:10856: \$? = $ac_status" >&5
10857   (exit $ac_status); }; }; then
10858   INTEL_COMPILER=yes
10859 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10860
10861 else
10862   echo "$as_me: failed program was:" >&5
10863 cat conftest.$ac_ext >&5
10864 fi
10865 rm -f conftest.$ac_objext conftest.$ac_ext
10866                 CFLAGS="$cf_save_CFLAGS"
10867                 echo "$as_me:10867: result: $INTEL_COMPILER" >&5
10868 echo "${ECHO_T}$INTEL_COMPILER" >&6
10869                 ;;
10870         esac
10871 fi
10872
10873 cat > conftest.$ac_ext <<EOF
10874 #line 10874 "${as_me-configure}"
10875 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10876 EOF
10877
10878 if test "$INTEL_COMPILER" = yes
10879 then
10880 # The "-wdXXX" options suppress warnings:
10881 # remark #1419: external declaration in primary source file
10882 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10883 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10884 # remark #193: zero used for undefined preprocessing identifier
10885 # remark #593: variable "curs_sb_left_arrow" was set but never used
10886 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10887 # remark #869: parameter "tw" was never referenced
10888 # remark #981: operands are evaluated in unspecified order
10889 # warning #279: controlling expression is constant
10890
10891         { echo "$as_me:10891: checking for $CC warning options..." >&5
10892 echo "$as_me: checking for $CC warning options..." >&6;}
10893         cf_save_CFLAGS="$CFLAGS"
10894         EXTRA_CFLAGS="-Wall"
10895         for cf_opt in \
10896                 wd1419 \
10897                 wd1683 \
10898                 wd1684 \
10899                 wd193 \
10900                 wd593 \
10901                 wd279 \
10902                 wd810 \
10903                 wd869 \
10904                 wd981
10905         do
10906                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10907                 if { (eval echo "$as_me:10907: \"$ac_compile\"") >&5
10908   (eval $ac_compile) 2>&5
10909   ac_status=$?
10910   echo "$as_me:10910: \$? = $ac_status" >&5
10911   (exit $ac_status); }; then
10912                         test -n "$verbose" && echo "$as_me:10912: result: ... -$cf_opt" >&5
10913 echo "${ECHO_T}... -$cf_opt" >&6
10914                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10915                 fi
10916         done
10917         CFLAGS="$cf_save_CFLAGS"
10918
10919 elif test "$GCC" = yes
10920 then
10921         { echo "$as_me:10921: checking for $CC warning options..." >&5
10922 echo "$as_me: checking for $CC warning options..." >&6;}
10923         cf_save_CFLAGS="$CFLAGS"
10924         EXTRA_CFLAGS="-W -Wall"
10925         cf_warn_CONST=""
10926         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10927         for cf_opt in \
10928                 Wbad-function-cast \
10929                 Wcast-align \
10930                 Wcast-qual \
10931                 Winline \
10932                 Wmissing-declarations \
10933                 Wmissing-prototypes \
10934                 Wnested-externs \
10935                 Wpointer-arith \
10936                 Wshadow \
10937                 Wstrict-prototypes \
10938                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10939         do
10940                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10941                 if { (eval echo "$as_me:10941: \"$ac_compile\"") >&5
10942   (eval $ac_compile) 2>&5
10943   ac_status=$?
10944   echo "$as_me:10944: \$? = $ac_status" >&5
10945   (exit $ac_status); }; then
10946                         test -n "$verbose" && echo "$as_me:10946: result: ... -$cf_opt" >&5
10947 echo "${ECHO_T}... -$cf_opt" >&6
10948                         case $cf_opt in #(vi
10949                         Wcast-qual) #(vi
10950                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10951                                 ;;
10952                         Winline) #(vi
10953                                 case $GCC_VERSION in
10954                                 [34].*)
10955                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10956
10957 echo "${as_me-configure}:10957: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10958
10959                                         continue;;
10960                                 esac
10961                                 ;;
10962                         esac
10963                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10964                 fi
10965         done
10966         CFLAGS="$cf_save_CFLAGS"
10967 fi
10968 rm -f conftest*
10969
10970         if test "$cf_with_cxx" = yes ; then
10971
10972 INTEL_CPLUSPLUS=no
10973
10974 if test "$GCC" = yes ; then
10975         case $host_os in
10976         linux*|gnu*)
10977                 echo "$as_me:10977: checking if this is really Intel C++ compiler" >&5
10978 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10979                 cf_save_CFLAGS="$CXXFLAGS"
10980                 CXXFLAGS="$CXXFLAGS -no-gcc"
10981                 cat >conftest.$ac_ext <<_ACEOF
10982 #line 10982 "configure"
10983 #include "confdefs.h"
10984
10985 int
10986 main ()
10987 {
10988
10989 #ifdef __INTEL_COMPILER
10990 #else
10991 make an error
10992 #endif
10993
10994   ;
10995   return 0;
10996 }
10997 _ACEOF
10998 rm -f conftest.$ac_objext
10999 if { (eval echo "$as_me:10999: \"$ac_compile\"") >&5
11000   (eval $ac_compile) 2>&5
11001   ac_status=$?
11002   echo "$as_me:11002: \$? = $ac_status" >&5
11003   (exit $ac_status); } &&
11004          { ac_try='test -s conftest.$ac_objext'
11005   { (eval echo "$as_me:11005: \"$ac_try\"") >&5
11006   (eval $ac_try) 2>&5
11007   ac_status=$?
11008   echo "$as_me:11008: \$? = $ac_status" >&5
11009   (exit $ac_status); }; }; then
11010   INTEL_CPLUSPLUS=yes
11011 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11012
11013 else
11014   echo "$as_me: failed program was:" >&5
11015 cat conftest.$ac_ext >&5
11016 fi
11017 rm -f conftest.$ac_objext conftest.$ac_ext
11018                 CXXFLAGS="$cf_save_CFLAGS"
11019                 echo "$as_me:11019: result: $INTEL_CPLUSPLUS" >&5
11020 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11021                 ;;
11022         esac
11023 fi
11024
11025 ac_ext=cc
11026 ac_cpp='$CXXCPP $CPPFLAGS'
11027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11030 ac_main_return=return
11031
11032 cat > conftest.$ac_ext <<EOF
11033 #line 11033 "configure"
11034 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11035 EOF
11036
11037 if test "$INTEL_CPLUSPLUS" = yes
11038 then
11039 # The "-wdXXX" options suppress warnings:
11040 # remark #1419: external declaration in primary source file
11041 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11042 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11043 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11044 # remark #193: zero used for undefined preprocessing identifier
11045 # remark #593: variable "curs_sb_left_arrow" was set but never used
11046 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11047 # remark #869: parameter "tw" was never referenced
11048 # remark #981: operands are evaluated in unspecified order
11049 # warning #269: invalid format string conversion
11050
11051         { echo "$as_me:11051: checking for $CC warning options..." >&5
11052 echo "$as_me: checking for $CC warning options..." >&6;}
11053         cf_save_CXXFLAGS="$CXXFLAGS"
11054         EXTRA_CXXFLAGS="-Wall"
11055         for cf_opt in \
11056                 wd1419 \
11057                 wd1682 \
11058                 wd1683 \
11059                 wd1684 \
11060                 wd193 \
11061                 wd279 \
11062                 wd593 \
11063                 wd810 \
11064                 wd869 \
11065                 wd981
11066         do
11067                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11068                 if { (eval echo "$as_me:11068: \"$ac_compile\"") >&5
11069   (eval $ac_compile) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit $ac_status); }; then
11073                         test -n "$verbose" && echo "$as_me:11073: result: ... -$cf_opt" >&5
11074 echo "${ECHO_T}... -$cf_opt" >&6
11075                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11076                 fi
11077         done
11078         CXXFLAGS="$cf_save_CXXFLAGS"
11079
11080 elif test "$GXX" = yes
11081 then
11082         { echo "$as_me:11082: checking for $CXX warning options..." >&5
11083 echo "$as_me: checking for $CXX warning options..." >&6;}
11084         cf_save_CXXFLAGS="$CXXFLAGS"
11085         EXTRA_CXXFLAGS="-W -Wall"
11086         cf_gxx_extra_warnings=""
11087         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11088         case "$GCC_VERSION" in
11089         [1-2].*)
11090                 ;;
11091         *)
11092                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11093                 ;;
11094         esac
11095         for cf_opt in \
11096                 Wabi \
11097                 fabi-version=0 \
11098                 Woverloaded-virtual \
11099                 Wsign-promo \
11100                 Wsynth \
11101                 Wold-style-cast \
11102                 Wcast-align \
11103                 Wcast-qual \
11104                 Wmissing-prototypes \
11105                 Wpointer-arith \
11106                 Wshadow \
11107                 Wstrict-prototypes \
11108                 Wundef $cf_gxx_extra_warnings Wno-unused
11109         do
11110                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11111                 if { (eval echo "$as_me:11111: \"$ac_compile\"") >&5
11112   (eval $ac_compile) 2>&5
11113   ac_status=$?
11114   echo "$as_me:11114: \$? = $ac_status" >&5
11115   (exit $ac_status); }; then
11116                         test -n "$verbose" && echo "$as_me:11116: result: ... -$cf_opt" >&5
11117 echo "${ECHO_T}... -$cf_opt" >&6
11118                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11119                 else
11120                         test -n "$verbose" && echo "$as_me:11120: result: ... no -$cf_opt" >&5
11121 echo "${ECHO_T}... no -$cf_opt" >&6
11122                 fi
11123         done
11124         CXXFLAGS="$cf_save_CXXFLAGS"
11125 fi
11126
11127 rm -f conftest*
11128 ac_ext=c
11129 ac_cpp='$CPP $CPPFLAGS'
11130 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11131 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11132 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11133 ac_main_return=return
11134
11135         fi
11136 fi
11137
11138 if test "$GCC" = yes
11139 then
11140 cat > conftest.i <<EOF
11141 #ifndef GCC_PRINTF
11142 #define GCC_PRINTF 0
11143 #endif
11144 #ifndef GCC_SCANF
11145 #define GCC_SCANF 0
11146 #endif
11147 #ifndef GCC_NORETURN
11148 #define GCC_NORETURN /* nothing */
11149 #endif
11150 #ifndef GCC_UNUSED
11151 #define GCC_UNUSED /* nothing */
11152 #endif
11153 EOF
11154 if test "$GCC" = yes
11155 then
11156         { echo "$as_me:11156: checking for $CC __attribute__ directives..." >&5
11157 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11158 cat > conftest.$ac_ext <<EOF
11159 #line 11159 "${as_me-configure}"
11160 #include "confdefs.h"
11161 #include "conftest.h"
11162 #include "conftest.i"
11163 #if     GCC_PRINTF
11164 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11165 #else
11166 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11167 #endif
11168 #if     GCC_SCANF
11169 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11170 #else
11171 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11172 #endif
11173 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11174 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11175 extern void foo(void) GCC_NORETURN;
11176 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11177 EOF
11178         cf_printf_attribute=no
11179         cf_scanf_attribute=no
11180         for cf_attribute in scanf printf unused noreturn
11181         do
11182
11183 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11184
11185                 cf_directive="__attribute__(($cf_attribute))"
11186                 echo "checking for $CC $cf_directive" 1>&5
11187
11188                 case $cf_attribute in #(vi
11189                 printf) #(vi
11190                         cf_printf_attribute=yes
11191                         cat >conftest.h <<EOF
11192 #define GCC_$cf_ATTRIBUTE 1
11193 EOF
11194                         ;;
11195                 scanf) #(vi
11196                         cf_scanf_attribute=yes
11197                         cat >conftest.h <<EOF
11198 #define GCC_$cf_ATTRIBUTE 1
11199 EOF
11200                         ;;
11201                 *) #(vi
11202                         cat >conftest.h <<EOF
11203 #define GCC_$cf_ATTRIBUTE $cf_directive
11204 EOF
11205                         ;;
11206                 esac
11207
11208                 if { (eval echo "$as_me:11208: \"$ac_compile\"") >&5
11209   (eval $ac_compile) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); }; then
11213                         test -n "$verbose" && echo "$as_me:11213: result: ... $cf_attribute" >&5
11214 echo "${ECHO_T}... $cf_attribute" >&6
11215                         cat conftest.h >>confdefs.h
11216                         case $cf_attribute in #(vi
11217                         printf) #(vi
11218                                 if test "$cf_printf_attribute" = no ; then
11219                                         cat >>confdefs.h <<EOF
11220 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11221 EOF
11222                                 else
11223                                         cat >>confdefs.h <<EOF
11224 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11225 EOF
11226                                 fi
11227                                 ;;
11228                         scanf) #(vi
11229                                 if test "$cf_scanf_attribute" = no ; then
11230                                         cat >>confdefs.h <<EOF
11231 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11232 EOF
11233                                 else
11234                                         cat >>confdefs.h <<EOF
11235 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11236 EOF
11237                                 fi
11238                                 ;;
11239                         esac
11240                 fi
11241         done
11242 else
11243         fgrep define conftest.i >>confdefs.h
11244 fi
11245 rm -rf conftest*
11246 fi
11247
11248 ###     use option --enable-assertions to turn on generation of assertion code
11249 echo "$as_me:11249: checking if you want to enable runtime assertions" >&5
11250 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11251
11252 # Check whether --enable-assertions or --disable-assertions was given.
11253 if test "${enable_assertions+set}" = set; then
11254   enableval="$enable_assertions"
11255   with_assertions=$enableval
11256 else
11257   with_assertions=no
11258 fi;
11259 echo "$as_me:11259: result: $with_assertions" >&5
11260 echo "${ECHO_T}$with_assertions" >&6
11261 if test -n "$GCC"
11262 then
11263         if test "$with_assertions" = no
11264         then
11265                 cat >>confdefs.h <<\EOF
11266 #define NDEBUG 1
11267 EOF
11268
11269                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11270         else
11271                 ADAFLAGS="$ADAFLAGS -gnata"
11272         fi
11273 fi
11274
11275 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11276
11277 echo "$as_me:11277: checking if you want to use dmalloc for testing" >&5
11278 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11279
11280 # Check whether --with-dmalloc or --without-dmalloc was given.
11281 if test "${with_dmalloc+set}" = set; then
11282   withval="$with_dmalloc"
11283   cat >>confdefs.h <<\EOF
11284 #define USE_DMALLOC 1
11285 EOF
11286
11287         : ${with_cflags:=-g}
11288         : ${with_no_leaks:=yes}
11289          with_dmalloc=yes
11290 else
11291   with_dmalloc=
11292 fi;
11293 echo "$as_me:11293: result: ${with_dmalloc:-no}" >&5
11294 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11295
11296 case .$with_cflags in #(vi
11297 .*-g*)
11298         case .$CFLAGS in #(vi
11299         .*-g*) #(vi
11300                 ;;
11301         *)
11302
11303 cf_fix_cppflags=no
11304 cf_new_cflags=
11305 cf_new_cppflags=
11306 cf_new_extra_cppflags=
11307
11308 for cf_add_cflags in -g
11309 do
11310 case $cf_fix_cppflags in
11311 no)
11312         case $cf_add_cflags in #(vi
11313         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11314                 case $cf_add_cflags in
11315                 -D*)
11316                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11317
11318                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11319                                 && test -z "${cf_tst_cflags}" \
11320                                 && cf_fix_cppflags=yes
11321
11322                         if test $cf_fix_cppflags = yes ; then
11323                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11324                                 continue
11325                         elif test "${cf_tst_cflags}" = "\"'" ; then
11326                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11327                                 continue
11328                         fi
11329                         ;;
11330                 esac
11331                 case "$CPPFLAGS" in
11332                 *$cf_add_cflags) #(vi
11333                         ;;
11334                 *) #(vi
11335                         case $cf_add_cflags in #(vi
11336                         -D*)
11337                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11338
11339 CPPFLAGS=`echo "$CPPFLAGS" | \
11340         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11341                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11342
11343                                 ;;
11344                         esac
11345                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11346                         ;;
11347                 esac
11348                 ;;
11349         *)
11350                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11351                 ;;
11352         esac
11353         ;;
11354 yes)
11355         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11356
11357         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11358
11359         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11360                 && test -z "${cf_tst_cflags}" \
11361                 && cf_fix_cppflags=no
11362         ;;
11363 esac
11364 done
11365
11366 if test -n "$cf_new_cflags" ; then
11367
11368         CFLAGS="$CFLAGS $cf_new_cflags"
11369 fi
11370
11371 if test -n "$cf_new_cppflags" ; then
11372
11373         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11374 fi
11375
11376 if test -n "$cf_new_extra_cppflags" ; then
11377
11378         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11379 fi
11380
11381                 ;;
11382         esac
11383         ;;
11384 esac
11385
11386 if test "$with_dmalloc" = yes ; then
11387         echo "$as_me:11387: checking for dmalloc.h" >&5
11388 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11389 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11390   echo $ECHO_N "(cached) $ECHO_C" >&6
11391 else
11392   cat >conftest.$ac_ext <<_ACEOF
11393 #line 11393 "configure"
11394 #include "confdefs.h"
11395 #include <dmalloc.h>
11396 _ACEOF
11397 if { (eval echo "$as_me:11397: \"$ac_cpp conftest.$ac_ext\"") >&5
11398   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11399   ac_status=$?
11400   egrep -v '^ *\+' conftest.er1 >conftest.err
11401   rm -f conftest.er1
11402   cat conftest.err >&5
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit $ac_status); } >/dev/null; then
11405   if test -s conftest.err; then
11406     ac_cpp_err=$ac_c_preproc_warn_flag
11407   else
11408     ac_cpp_err=
11409   fi
11410 else
11411   ac_cpp_err=yes
11412 fi
11413 if test -z "$ac_cpp_err"; then
11414   ac_cv_header_dmalloc_h=yes
11415 else
11416   echo "$as_me: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   ac_cv_header_dmalloc_h=no
11419 fi
11420 rm -f conftest.err conftest.$ac_ext
11421 fi
11422 echo "$as_me:11422: result: $ac_cv_header_dmalloc_h" >&5
11423 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11424 if test $ac_cv_header_dmalloc_h = yes; then
11425
11426 echo "$as_me:11426: checking for dmalloc_debug in -ldmalloc" >&5
11427 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11428 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11429   echo $ECHO_N "(cached) $ECHO_C" >&6
11430 else
11431   ac_check_lib_save_LIBS=$LIBS
11432 LIBS="-ldmalloc  $LIBS"
11433 cat >conftest.$ac_ext <<_ACEOF
11434 #line 11434 "configure"
11435 #include "confdefs.h"
11436
11437 /* Override any gcc2 internal prototype to avoid an error.  */
11438 #ifdef __cplusplus
11439 extern "C"
11440 #endif
11441 /* We use char because int might match the return type of a gcc2
11442    builtin and then its argument prototype would still apply.  */
11443 char dmalloc_debug ();
11444 int
11445 main ()
11446 {
11447 dmalloc_debug ();
11448   ;
11449   return 0;
11450 }
11451 _ACEOF
11452 rm -f conftest.$ac_objext conftest$ac_exeext
11453 if { (eval echo "$as_me:11453: \"$ac_link\"") >&5
11454   (eval $ac_link) 2>&5
11455   ac_status=$?
11456   echo "$as_me:11456: \$? = $ac_status" >&5
11457   (exit $ac_status); } &&
11458          { ac_try='test -s conftest$ac_exeext'
11459   { (eval echo "$as_me:11459: \"$ac_try\"") >&5
11460   (eval $ac_try) 2>&5
11461   ac_status=$?
11462   echo "$as_me:11462: \$? = $ac_status" >&5
11463   (exit $ac_status); }; }; then
11464   ac_cv_lib_dmalloc_dmalloc_debug=yes
11465 else
11466   echo "$as_me: failed program was:" >&5
11467 cat conftest.$ac_ext >&5
11468 ac_cv_lib_dmalloc_dmalloc_debug=no
11469 fi
11470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11471 LIBS=$ac_check_lib_save_LIBS
11472 fi
11473 echo "$as_me:11473: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11474 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11475 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11476   cat >>confdefs.h <<EOF
11477 #define HAVE_LIBDMALLOC 1
11478 EOF
11479
11480   LIBS="-ldmalloc $LIBS"
11481
11482 fi
11483
11484 fi
11485
11486 fi
11487
11488 echo "$as_me:11488: checking if you want to use dbmalloc for testing" >&5
11489 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11490
11491 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11492 if test "${with_dbmalloc+set}" = set; then
11493   withval="$with_dbmalloc"
11494   cat >>confdefs.h <<\EOF
11495 #define USE_DBMALLOC 1
11496 EOF
11497
11498         : ${with_cflags:=-g}
11499         : ${with_no_leaks:=yes}
11500          with_dbmalloc=yes
11501 else
11502   with_dbmalloc=
11503 fi;
11504 echo "$as_me:11504: result: ${with_dbmalloc:-no}" >&5
11505 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11506
11507 case .$with_cflags in #(vi
11508 .*-g*)
11509         case .$CFLAGS in #(vi
11510         .*-g*) #(vi
11511                 ;;
11512         *)
11513
11514 cf_fix_cppflags=no
11515 cf_new_cflags=
11516 cf_new_cppflags=
11517 cf_new_extra_cppflags=
11518
11519 for cf_add_cflags in -g
11520 do
11521 case $cf_fix_cppflags in
11522 no)
11523         case $cf_add_cflags in #(vi
11524         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11525                 case $cf_add_cflags in
11526                 -D*)
11527                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11528
11529                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11530                                 && test -z "${cf_tst_cflags}" \
11531                                 && cf_fix_cppflags=yes
11532
11533                         if test $cf_fix_cppflags = yes ; then
11534                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11535                                 continue
11536                         elif test "${cf_tst_cflags}" = "\"'" ; then
11537                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11538                                 continue
11539                         fi
11540                         ;;
11541                 esac
11542                 case "$CPPFLAGS" in
11543                 *$cf_add_cflags) #(vi
11544                         ;;
11545                 *) #(vi
11546                         case $cf_add_cflags in #(vi
11547                         -D*)
11548                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11549
11550 CPPFLAGS=`echo "$CPPFLAGS" | \
11551         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11552                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11553
11554                                 ;;
11555                         esac
11556                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11557                         ;;
11558                 esac
11559                 ;;
11560         *)
11561                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11562                 ;;
11563         esac
11564         ;;
11565 yes)
11566         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11567
11568         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11569
11570         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11571                 && test -z "${cf_tst_cflags}" \
11572                 && cf_fix_cppflags=no
11573         ;;
11574 esac
11575 done
11576
11577 if test -n "$cf_new_cflags" ; then
11578
11579         CFLAGS="$CFLAGS $cf_new_cflags"
11580 fi
11581
11582 if test -n "$cf_new_cppflags" ; then
11583
11584         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11585 fi
11586
11587 if test -n "$cf_new_extra_cppflags" ; then
11588
11589         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11590 fi
11591
11592                 ;;
11593         esac
11594         ;;
11595 esac
11596
11597 if test "$with_dbmalloc" = yes ; then
11598         echo "$as_me:11598: checking for dbmalloc.h" >&5
11599 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11600 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11601   echo $ECHO_N "(cached) $ECHO_C" >&6
11602 else
11603   cat >conftest.$ac_ext <<_ACEOF
11604 #line 11604 "configure"
11605 #include "confdefs.h"
11606 #include <dbmalloc.h>
11607 _ACEOF
11608 if { (eval echo "$as_me:11608: \"$ac_cpp conftest.$ac_ext\"") >&5
11609   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11610   ac_status=$?
11611   egrep -v '^ *\+' conftest.er1 >conftest.err
11612   rm -f conftest.er1
11613   cat conftest.err >&5
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit $ac_status); } >/dev/null; then
11616   if test -s conftest.err; then
11617     ac_cpp_err=$ac_c_preproc_warn_flag
11618   else
11619     ac_cpp_err=
11620   fi
11621 else
11622   ac_cpp_err=yes
11623 fi
11624 if test -z "$ac_cpp_err"; then
11625   ac_cv_header_dbmalloc_h=yes
11626 else
11627   echo "$as_me: failed program was:" >&5
11628   cat conftest.$ac_ext >&5
11629   ac_cv_header_dbmalloc_h=no
11630 fi
11631 rm -f conftest.err conftest.$ac_ext
11632 fi
11633 echo "$as_me:11633: result: $ac_cv_header_dbmalloc_h" >&5
11634 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11635 if test $ac_cv_header_dbmalloc_h = yes; then
11636
11637 echo "$as_me:11637: checking for debug_malloc in -ldbmalloc" >&5
11638 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11639 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11640   echo $ECHO_N "(cached) $ECHO_C" >&6
11641 else
11642   ac_check_lib_save_LIBS=$LIBS
11643 LIBS="-ldbmalloc  $LIBS"
11644 cat >conftest.$ac_ext <<_ACEOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647
11648 /* Override any gcc2 internal prototype to avoid an error.  */
11649 #ifdef __cplusplus
11650 extern "C"
11651 #endif
11652 /* We use char because int might match the return type of a gcc2
11653    builtin and then its argument prototype would still apply.  */
11654 char debug_malloc ();
11655 int
11656 main ()
11657 {
11658 debug_malloc ();
11659   ;
11660   return 0;
11661 }
11662 _ACEOF
11663 rm -f conftest.$ac_objext conftest$ac_exeext
11664 if { (eval echo "$as_me:11664: \"$ac_link\"") >&5
11665   (eval $ac_link) 2>&5
11666   ac_status=$?
11667   echo "$as_me:11667: \$? = $ac_status" >&5
11668   (exit $ac_status); } &&
11669          { ac_try='test -s conftest$ac_exeext'
11670   { (eval echo "$as_me:11670: \"$ac_try\"") >&5
11671   (eval $ac_try) 2>&5
11672   ac_status=$?
11673   echo "$as_me:11673: \$? = $ac_status" >&5
11674   (exit $ac_status); }; }; then
11675   ac_cv_lib_dbmalloc_debug_malloc=yes
11676 else
11677   echo "$as_me: failed program was:" >&5
11678 cat conftest.$ac_ext >&5
11679 ac_cv_lib_dbmalloc_debug_malloc=no
11680 fi
11681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11682 LIBS=$ac_check_lib_save_LIBS
11683 fi
11684 echo "$as_me:11684: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11685 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11686 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11687   cat >>confdefs.h <<EOF
11688 #define HAVE_LIBDBMALLOC 1
11689 EOF
11690
11691   LIBS="-ldbmalloc $LIBS"
11692
11693 fi
11694
11695 fi
11696
11697 fi
11698
11699 echo "$as_me:11699: checking if you want to use valgrind for testing" >&5
11700 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11701
11702 # Check whether --with-valgrind or --without-valgrind was given.
11703 if test "${with_valgrind+set}" = set; then
11704   withval="$with_valgrind"
11705   cat >>confdefs.h <<\EOF
11706 #define USE_VALGRIND 1
11707 EOF
11708
11709         : ${with_cflags:=-g}
11710         : ${with_no_leaks:=yes}
11711          with_valgrind=yes
11712 else
11713   with_valgrind=
11714 fi;
11715 echo "$as_me:11715: result: ${with_valgrind:-no}" >&5
11716 echo "${ECHO_T}${with_valgrind:-no}" >&6
11717
11718 case .$with_cflags in #(vi
11719 .*-g*)
11720         case .$CFLAGS in #(vi
11721         .*-g*) #(vi
11722                 ;;
11723         *)
11724
11725 cf_fix_cppflags=no
11726 cf_new_cflags=
11727 cf_new_cppflags=
11728 cf_new_extra_cppflags=
11729
11730 for cf_add_cflags in -g
11731 do
11732 case $cf_fix_cppflags in
11733 no)
11734         case $cf_add_cflags in #(vi
11735         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11736                 case $cf_add_cflags in
11737                 -D*)
11738                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11739
11740                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11741                                 && test -z "${cf_tst_cflags}" \
11742                                 && cf_fix_cppflags=yes
11743
11744                         if test $cf_fix_cppflags = yes ; then
11745                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11746                                 continue
11747                         elif test "${cf_tst_cflags}" = "\"'" ; then
11748                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11749                                 continue
11750                         fi
11751                         ;;
11752                 esac
11753                 case "$CPPFLAGS" in
11754                 *$cf_add_cflags) #(vi
11755                         ;;
11756                 *) #(vi
11757                         case $cf_add_cflags in #(vi
11758                         -D*)
11759                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11760
11761 CPPFLAGS=`echo "$CPPFLAGS" | \
11762         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11763                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11764
11765                                 ;;
11766                         esac
11767                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11768                         ;;
11769                 esac
11770                 ;;
11771         *)
11772                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11773                 ;;
11774         esac
11775         ;;
11776 yes)
11777         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11778
11779         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11780
11781         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11782                 && test -z "${cf_tst_cflags}" \
11783                 && cf_fix_cppflags=no
11784         ;;
11785 esac
11786 done
11787
11788 if test -n "$cf_new_cflags" ; then
11789
11790         CFLAGS="$CFLAGS $cf_new_cflags"
11791 fi
11792
11793 if test -n "$cf_new_cppflags" ; then
11794
11795         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11796 fi
11797
11798 if test -n "$cf_new_extra_cppflags" ; then
11799
11800         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11801 fi
11802
11803                 ;;
11804         esac
11805         ;;
11806 esac
11807
11808 echo "$as_me:11808: checking if you want to perform memory-leak testing" >&5
11809 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11810
11811 # Check whether --enable-leaks or --disable-leaks was given.
11812 if test "${enable_leaks+set}" = set; then
11813   enableval="$enable_leaks"
11814   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11815 else
11816   : ${with_no_leaks:=no}
11817 fi;
11818 echo "$as_me:11818: result: $with_no_leaks" >&5
11819 echo "${ECHO_T}$with_no_leaks" >&6
11820
11821 if test "$with_no_leaks" = yes ; then
11822         cat >>confdefs.h <<\EOF
11823 #define NO_LEAKS 1
11824 EOF
11825
11826 fi
11827
11828 cat >>confdefs.h <<\EOF
11829 #define HAVE_NC_ALLOC_H 1
11830 EOF
11831
11832 ###     use option --enable-expanded to generate certain macros as functions
11833
11834 # Check whether --enable-expanded or --disable-expanded was given.
11835 if test "${enable_expanded+set}" = set; then
11836   enableval="$enable_expanded"
11837   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11838 #define NCURSES_EXPANDED 1
11839 EOF
11840
11841 fi;
11842
11843 ###     use option --disable-macros to suppress macros in favor of functions
11844
11845 # Check whether --enable-macros or --disable-macros was given.
11846 if test "${enable_macros+set}" = set; then
11847   enableval="$enable_macros"
11848   test "$enableval" = no && cat >>confdefs.h <<\EOF
11849 #define NCURSES_NOMACROS 1
11850 EOF
11851
11852 fi;
11853
11854 # Normally we only add trace() to the debug-library.  Allow this to be
11855 # extended to all models of the ncurses library:
11856 cf_all_traces=no
11857 case "$CFLAGS $CPPFLAGS" in
11858 *-DTRACE*)
11859         cf_all_traces=yes
11860         ;;
11861 esac
11862
11863 echo "$as_me:11863: checking whether to add trace feature to all models" >&5
11864 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11865
11866 # Check whether --with-trace or --without-trace was given.
11867 if test "${with_trace+set}" = set; then
11868   withval="$with_trace"
11869   cf_with_trace=$withval
11870 else
11871   cf_with_trace=$cf_all_traces
11872 fi;
11873 echo "$as_me:11873: result: $cf_with_trace" >&5
11874 echo "${ECHO_T}$cf_with_trace" >&6
11875
11876 if test "$cf_with_trace" = yes ; then
11877         LIB_TRACING=all
11878         ADA_TRACE=TRUE
11879
11880 cf_fix_cppflags=no
11881 cf_new_cflags=
11882 cf_new_cppflags=
11883 cf_new_extra_cppflags=
11884
11885 for cf_add_cflags in -DTRACE
11886 do
11887 case $cf_fix_cppflags in
11888 no)
11889         case $cf_add_cflags in #(vi
11890         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11891                 case $cf_add_cflags in
11892                 -D*)
11893                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11894
11895                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11896                                 && test -z "${cf_tst_cflags}" \
11897                                 && cf_fix_cppflags=yes
11898
11899                         if test $cf_fix_cppflags = yes ; then
11900                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11901                                 continue
11902                         elif test "${cf_tst_cflags}" = "\"'" ; then
11903                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11904                                 continue
11905                         fi
11906                         ;;
11907                 esac
11908                 case "$CPPFLAGS" in
11909                 *$cf_add_cflags) #(vi
11910                         ;;
11911                 *) #(vi
11912                         case $cf_add_cflags in #(vi
11913                         -D*)
11914                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11915
11916 CPPFLAGS=`echo "$CPPFLAGS" | \
11917         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11918                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11919
11920                                 ;;
11921                         esac
11922                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11923                         ;;
11924                 esac
11925                 ;;
11926         *)
11927                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11928                 ;;
11929         esac
11930         ;;
11931 yes)
11932         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11933
11934         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11935
11936         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11937                 && test -z "${cf_tst_cflags}" \
11938                 && cf_fix_cppflags=no
11939         ;;
11940 esac
11941 done
11942
11943 if test -n "$cf_new_cflags" ; then
11944
11945         CFLAGS="$CFLAGS $cf_new_cflags"
11946 fi
11947
11948 if test -n "$cf_new_cppflags" ; then
11949
11950         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11951 fi
11952
11953 if test -n "$cf_new_extra_cppflags" ; then
11954
11955         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11956 fi
11957
11958 else
11959         LIB_TRACING=DEBUG
11960         ADA_TRACE=FALSE
11961 fi
11962
11963 ###     Checks for libraries.
11964 case $cf_cv_system_name in #(vi
11965 *mingw32*) #(vi
11966         ;;
11967 *)
11968 echo "$as_me:11968: checking for gettimeofday" >&5
11969 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11970 if test "${ac_cv_func_gettimeofday+set}" = set; then
11971   echo $ECHO_N "(cached) $ECHO_C" >&6
11972 else
11973   cat >conftest.$ac_ext <<_ACEOF
11974 #line 11974 "configure"
11975 #include "confdefs.h"
11976 /* System header to define __stub macros and hopefully few prototypes,
11977     which can conflict with char gettimeofday (); below.  */
11978 #include <assert.h>
11979 /* Override any gcc2 internal prototype to avoid an error.  */
11980 #ifdef __cplusplus
11981 extern "C"
11982 #endif
11983 /* We use char because int might match the return type of a gcc2
11984    builtin and then its argument prototype would still apply.  */
11985 char gettimeofday ();
11986 char (*f) ();
11987
11988 int
11989 main ()
11990 {
11991 /* The GNU C library defines this for functions which it implements
11992     to always fail with ENOSYS.  Some functions are actually named
11993     something starting with __ and the normal name is an alias.  */
11994 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11995 choke me
11996 #else
11997 f = gettimeofday;
11998 #endif
11999
12000   ;
12001   return 0;
12002 }
12003 _ACEOF
12004 rm -f conftest.$ac_objext conftest$ac_exeext
12005 if { (eval echo "$as_me:12005: \"$ac_link\"") >&5
12006   (eval $ac_link) 2>&5
12007   ac_status=$?
12008   echo "$as_me:12008: \$? = $ac_status" >&5
12009   (exit $ac_status); } &&
12010          { ac_try='test -s conftest$ac_exeext'
12011   { (eval echo "$as_me:12011: \"$ac_try\"") >&5
12012   (eval $ac_try) 2>&5
12013   ac_status=$?
12014   echo "$as_me:12014: \$? = $ac_status" >&5
12015   (exit $ac_status); }; }; then
12016   ac_cv_func_gettimeofday=yes
12017 else
12018   echo "$as_me: failed program was:" >&5
12019 cat conftest.$ac_ext >&5
12020 ac_cv_func_gettimeofday=no
12021 fi
12022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12023 fi
12024 echo "$as_me:12024: result: $ac_cv_func_gettimeofday" >&5
12025 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12026 if test $ac_cv_func_gettimeofday = yes; then
12027   cat >>confdefs.h <<\EOF
12028 #define HAVE_GETTIMEOFDAY 1
12029 EOF
12030
12031 else
12032
12033 echo "$as_me:12033: checking for gettimeofday in -lbsd" >&5
12034 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12035 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12036   echo $ECHO_N "(cached) $ECHO_C" >&6
12037 else
12038   ac_check_lib_save_LIBS=$LIBS
12039 LIBS="-lbsd  $LIBS"
12040 cat >conftest.$ac_ext <<_ACEOF
12041 #line 12041 "configure"
12042 #include "confdefs.h"
12043
12044 /* Override any gcc2 internal prototype to avoid an error.  */
12045 #ifdef __cplusplus
12046 extern "C"
12047 #endif
12048 /* We use char because int might match the return type of a gcc2
12049    builtin and then its argument prototype would still apply.  */
12050 char gettimeofday ();
12051 int
12052 main ()
12053 {
12054 gettimeofday ();
12055   ;
12056   return 0;
12057 }
12058 _ACEOF
12059 rm -f conftest.$ac_objext conftest$ac_exeext
12060 if { (eval echo "$as_me:12060: \"$ac_link\"") >&5
12061   (eval $ac_link) 2>&5
12062   ac_status=$?
12063   echo "$as_me:12063: \$? = $ac_status" >&5
12064   (exit $ac_status); } &&
12065          { ac_try='test -s conftest$ac_exeext'
12066   { (eval echo "$as_me:12066: \"$ac_try\"") >&5
12067   (eval $ac_try) 2>&5
12068   ac_status=$?
12069   echo "$as_me:12069: \$? = $ac_status" >&5
12070   (exit $ac_status); }; }; then
12071   ac_cv_lib_bsd_gettimeofday=yes
12072 else
12073   echo "$as_me: failed program was:" >&5
12074 cat conftest.$ac_ext >&5
12075 ac_cv_lib_bsd_gettimeofday=no
12076 fi
12077 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12078 LIBS=$ac_check_lib_save_LIBS
12079 fi
12080 echo "$as_me:12080: result: $ac_cv_lib_bsd_gettimeofday" >&5
12081 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12082 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12083   cat >>confdefs.h <<\EOF
12084 #define HAVE_GETTIMEOFDAY 1
12085 EOF
12086
12087         LIBS="$LIBS -lbsd"
12088 fi
12089
12090 fi
12091         ;;
12092 esac
12093
12094 echo "$as_me:12094: checking if -lm needed for math functions" >&5
12095 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12096 if test "${cf_cv_need_libm+set}" = set; then
12097   echo $ECHO_N "(cached) $ECHO_C" >&6
12098 else
12099
12100         cat >conftest.$ac_ext <<_ACEOF
12101 #line 12101 "configure"
12102 #include "confdefs.h"
12103
12104         #include <stdio.h>
12105         #include <math.h>
12106
12107 int
12108 main ()
12109 {
12110 double x = rand(); printf("result = %g\n", sin(x))
12111   ;
12112   return 0;
12113 }
12114 _ACEOF
12115 rm -f conftest.$ac_objext conftest$ac_exeext
12116 if { (eval echo "$as_me:12116: \"$ac_link\"") >&5
12117   (eval $ac_link) 2>&5
12118   ac_status=$?
12119   echo "$as_me:12119: \$? = $ac_status" >&5
12120   (exit $ac_status); } &&
12121          { ac_try='test -s conftest$ac_exeext'
12122   { (eval echo "$as_me:12122: \"$ac_try\"") >&5
12123   (eval $ac_try) 2>&5
12124   ac_status=$?
12125   echo "$as_me:12125: \$? = $ac_status" >&5
12126   (exit $ac_status); }; }; then
12127   cf_cv_need_libm=no
12128 else
12129   echo "$as_me: failed program was:" >&5
12130 cat conftest.$ac_ext >&5
12131 cf_cv_need_libm=yes
12132 fi
12133 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12134 fi
12135 echo "$as_me:12135: result: $cf_cv_need_libm" >&5
12136 echo "${ECHO_T}$cf_cv_need_libm" >&6
12137 if test "$cf_cv_need_libm" = yes
12138 then
12139 MATH_LIB=-lm
12140 fi
12141
12142 ###     Checks for header files.
12143 echo "$as_me:12143: checking for ANSI C header files" >&5
12144 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12145 if test "${ac_cv_header_stdc+set}" = set; then
12146   echo $ECHO_N "(cached) $ECHO_C" >&6
12147 else
12148   cat >conftest.$ac_ext <<_ACEOF
12149 #line 12149 "configure"
12150 #include "confdefs.h"
12151 #include <stdlib.h>
12152 #include <stdarg.h>
12153 #include <string.h>
12154 #include <float.h>
12155
12156 _ACEOF
12157 if { (eval echo "$as_me:12157: \"$ac_cpp conftest.$ac_ext\"") >&5
12158   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12159   ac_status=$?
12160   egrep -v '^ *\+' conftest.er1 >conftest.err
12161   rm -f conftest.er1
12162   cat conftest.err >&5
12163   echo "$as_me:12163: \$? = $ac_status" >&5
12164   (exit $ac_status); } >/dev/null; then
12165   if test -s conftest.err; then
12166     ac_cpp_err=$ac_c_preproc_warn_flag
12167   else
12168     ac_cpp_err=
12169   fi
12170 else
12171   ac_cpp_err=yes
12172 fi
12173 if test -z "$ac_cpp_err"; then
12174   ac_cv_header_stdc=yes
12175 else
12176   echo "$as_me: failed program was:" >&5
12177   cat conftest.$ac_ext >&5
12178   ac_cv_header_stdc=no
12179 fi
12180 rm -f conftest.err conftest.$ac_ext
12181
12182 if test $ac_cv_header_stdc = yes; then
12183   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12184   cat >conftest.$ac_ext <<_ACEOF
12185 #line 12185 "configure"
12186 #include "confdefs.h"
12187 #include <string.h>
12188
12189 _ACEOF
12190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12191   egrep "memchr" >/dev/null 2>&1; then
12192   :
12193 else
12194   ac_cv_header_stdc=no
12195 fi
12196 rm -f conftest*
12197
12198 fi
12199
12200 if test $ac_cv_header_stdc = yes; then
12201   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12202   cat >conftest.$ac_ext <<_ACEOF
12203 #line 12203 "configure"
12204 #include "confdefs.h"
12205 #include <stdlib.h>
12206
12207 _ACEOF
12208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12209   egrep "free" >/dev/null 2>&1; then
12210   :
12211 else
12212   ac_cv_header_stdc=no
12213 fi
12214 rm -f conftest*
12215
12216 fi
12217
12218 if test $ac_cv_header_stdc = yes; then
12219   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12220   if test "$cross_compiling" = yes; then
12221   :
12222 else
12223   cat >conftest.$ac_ext <<_ACEOF
12224 #line 12224 "configure"
12225 #include "confdefs.h"
12226 #include <ctype.h>
12227 #if ((' ' & 0x0FF) == 0x020)
12228 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12229 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12230 #else
12231 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12232                      || ('j' <= (c) && (c) <= 'r') \
12233                      || ('s' <= (c) && (c) <= 'z'))
12234 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12235 #endif
12236
12237 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12238 int
12239 main ()
12240 {
12241   int i;
12242   for (i = 0; i < 256; i++)
12243     if (XOR (islower (i), ISLOWER (i))
12244         || toupper (i) != TOUPPER (i))
12245       $ac_main_return(2);
12246   $ac_main_return (0);
12247 }
12248 _ACEOF
12249 rm -f conftest$ac_exeext
12250 if { (eval echo "$as_me:12250: \"$ac_link\"") >&5
12251   (eval $ac_link) 2>&5
12252   ac_status=$?
12253   echo "$as_me:12253: \$? = $ac_status" >&5
12254   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12255   { (eval echo "$as_me:12255: \"$ac_try\"") >&5
12256   (eval $ac_try) 2>&5
12257   ac_status=$?
12258   echo "$as_me:12258: \$? = $ac_status" >&5
12259   (exit $ac_status); }; }; then
12260   :
12261 else
12262   echo "$as_me: program exited with status $ac_status" >&5
12263 echo "$as_me: failed program was:" >&5
12264 cat conftest.$ac_ext >&5
12265 ac_cv_header_stdc=no
12266 fi
12267 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12268 fi
12269 fi
12270 fi
12271 echo "$as_me:12271: result: $ac_cv_header_stdc" >&5
12272 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12273 if test $ac_cv_header_stdc = yes; then
12274
12275 cat >>confdefs.h <<\EOF
12276 #define STDC_HEADERS 1
12277 EOF
12278
12279 fi
12280
12281 ac_header_dirent=no
12282 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12283   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12284 echo "$as_me:12284: checking for $ac_hdr that defines DIR" >&5
12285 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12286 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12287   echo $ECHO_N "(cached) $ECHO_C" >&6
12288 else
12289   cat >conftest.$ac_ext <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292 #include <sys/types.h>
12293 #include <$ac_hdr>
12294
12295 int
12296 main ()
12297 {
12298 if ((DIR *) 0)
12299 return 0;
12300   ;
12301   return 0;
12302 }
12303 _ACEOF
12304 rm -f conftest.$ac_objext
12305 if { (eval echo "$as_me:12305: \"$ac_compile\"") >&5
12306   (eval $ac_compile) 2>&5
12307   ac_status=$?
12308   echo "$as_me:12308: \$? = $ac_status" >&5
12309   (exit $ac_status); } &&
12310          { ac_try='test -s conftest.$ac_objext'
12311   { (eval echo "$as_me:12311: \"$ac_try\"") >&5
12312   (eval $ac_try) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit $ac_status); }; }; then
12316   eval "$as_ac_Header=yes"
12317 else
12318   echo "$as_me: failed program was:" >&5
12319 cat conftest.$ac_ext >&5
12320 eval "$as_ac_Header=no"
12321 fi
12322 rm -f conftest.$ac_objext conftest.$ac_ext
12323 fi
12324 echo "$as_me:12324: result: `eval echo '${'$as_ac_Header'}'`" >&5
12325 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12326 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12327   cat >>confdefs.h <<EOF
12328 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12329 EOF
12330
12331 ac_header_dirent=$ac_hdr; break
12332 fi
12333
12334 done
12335 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12336 if test $ac_header_dirent = dirent.h; then
12337   echo "$as_me:12337: checking for opendir in -ldir" >&5
12338 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12339 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12340   echo $ECHO_N "(cached) $ECHO_C" >&6
12341 else
12342   ac_check_lib_save_LIBS=$LIBS
12343 LIBS="-ldir  $LIBS"
12344 cat >conftest.$ac_ext <<_ACEOF
12345 #line 12345 "configure"
12346 #include "confdefs.h"
12347
12348 /* Override any gcc2 internal prototype to avoid an error.  */
12349 #ifdef __cplusplus
12350 extern "C"
12351 #endif
12352 /* We use char because int might match the return type of a gcc2
12353    builtin and then its argument prototype would still apply.  */
12354 char opendir ();
12355 int
12356 main ()
12357 {
12358 opendir ();
12359   ;
12360   return 0;
12361 }
12362 _ACEOF
12363 rm -f conftest.$ac_objext conftest$ac_exeext
12364 if { (eval echo "$as_me:12364: \"$ac_link\"") >&5
12365   (eval $ac_link) 2>&5
12366   ac_status=$?
12367   echo "$as_me:12367: \$? = $ac_status" >&5
12368   (exit $ac_status); } &&
12369          { ac_try='test -s conftest$ac_exeext'
12370   { (eval echo "$as_me:12370: \"$ac_try\"") >&5
12371   (eval $ac_try) 2>&5
12372   ac_status=$?
12373   echo "$as_me:12373: \$? = $ac_status" >&5
12374   (exit $ac_status); }; }; then
12375   ac_cv_lib_dir_opendir=yes
12376 else
12377   echo "$as_me: failed program was:" >&5
12378 cat conftest.$ac_ext >&5
12379 ac_cv_lib_dir_opendir=no
12380 fi
12381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12382 LIBS=$ac_check_lib_save_LIBS
12383 fi
12384 echo "$as_me:12384: result: $ac_cv_lib_dir_opendir" >&5
12385 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12386 if test $ac_cv_lib_dir_opendir = yes; then
12387   LIBS="$LIBS -ldir"
12388 fi
12389
12390 else
12391   echo "$as_me:12391: checking for opendir in -lx" >&5
12392 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12393 if test "${ac_cv_lib_x_opendir+set}" = set; then
12394   echo $ECHO_N "(cached) $ECHO_C" >&6
12395 else
12396   ac_check_lib_save_LIBS=$LIBS
12397 LIBS="-lx  $LIBS"
12398 cat >conftest.$ac_ext <<_ACEOF
12399 #line 12399 "configure"
12400 #include "confdefs.h"
12401
12402 /* Override any gcc2 internal prototype to avoid an error.  */
12403 #ifdef __cplusplus
12404 extern "C"
12405 #endif
12406 /* We use char because int might match the return type of a gcc2
12407    builtin and then its argument prototype would still apply.  */
12408 char opendir ();
12409 int
12410 main ()
12411 {
12412 opendir ();
12413   ;
12414   return 0;
12415 }
12416 _ACEOF
12417 rm -f conftest.$ac_objext conftest$ac_exeext
12418 if { (eval echo "$as_me:12418: \"$ac_link\"") >&5
12419   (eval $ac_link) 2>&5
12420   ac_status=$?
12421   echo "$as_me:12421: \$? = $ac_status" >&5
12422   (exit $ac_status); } &&
12423          { ac_try='test -s conftest$ac_exeext'
12424   { (eval echo "$as_me:12424: \"$ac_try\"") >&5
12425   (eval $ac_try) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit $ac_status); }; }; then
12429   ac_cv_lib_x_opendir=yes
12430 else
12431   echo "$as_me: failed program was:" >&5
12432 cat conftest.$ac_ext >&5
12433 ac_cv_lib_x_opendir=no
12434 fi
12435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12436 LIBS=$ac_check_lib_save_LIBS
12437 fi
12438 echo "$as_me:12438: result: $ac_cv_lib_x_opendir" >&5
12439 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12440 if test $ac_cv_lib_x_opendir = yes; then
12441   LIBS="$LIBS -lx"
12442 fi
12443
12444 fi
12445
12446 echo "$as_me:12446: checking whether time.h and sys/time.h may both be included" >&5
12447 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12448 if test "${ac_cv_header_time+set}" = set; then
12449   echo $ECHO_N "(cached) $ECHO_C" >&6
12450 else
12451   cat >conftest.$ac_ext <<_ACEOF
12452 #line 12452 "configure"
12453 #include "confdefs.h"
12454 #include <sys/types.h>
12455 #include <sys/time.h>
12456 #include <time.h>
12457
12458 int
12459 main ()
12460 {
12461 if ((struct tm *) 0)
12462 return 0;
12463   ;
12464   return 0;
12465 }
12466 _ACEOF
12467 rm -f conftest.$ac_objext
12468 if { (eval echo "$as_me:12468: \"$ac_compile\"") >&5
12469   (eval $ac_compile) 2>&5
12470   ac_status=$?
12471   echo "$as_me:12471: \$? = $ac_status" >&5
12472   (exit $ac_status); } &&
12473          { ac_try='test -s conftest.$ac_objext'
12474   { (eval echo "$as_me:12474: \"$ac_try\"") >&5
12475   (eval $ac_try) 2>&5
12476   ac_status=$?
12477   echo "$as_me:12477: \$? = $ac_status" >&5
12478   (exit $ac_status); }; }; then
12479   ac_cv_header_time=yes
12480 else
12481   echo "$as_me: failed program was:" >&5
12482 cat conftest.$ac_ext >&5
12483 ac_cv_header_time=no
12484 fi
12485 rm -f conftest.$ac_objext conftest.$ac_ext
12486 fi
12487 echo "$as_me:12487: result: $ac_cv_header_time" >&5
12488 echo "${ECHO_T}$ac_cv_header_time" >&6
12489 if test $ac_cv_header_time = yes; then
12490
12491 cat >>confdefs.h <<\EOF
12492 #define TIME_WITH_SYS_TIME 1
12493 EOF
12494
12495 fi
12496
12497 cf_regex_func=no
12498
12499 echo "$as_me:12499: checking for regcomp" >&5
12500 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12501 if test "${ac_cv_func_regcomp+set}" = set; then
12502   echo $ECHO_N "(cached) $ECHO_C" >&6
12503 else
12504   cat >conftest.$ac_ext <<_ACEOF
12505 #line 12505 "configure"
12506 #include "confdefs.h"
12507 /* System header to define __stub macros and hopefully few prototypes,
12508     which can conflict with char regcomp (); below.  */
12509 #include <assert.h>
12510 /* Override any gcc2 internal prototype to avoid an error.  */
12511 #ifdef __cplusplus
12512 extern "C"
12513 #endif
12514 /* We use char because int might match the return type of a gcc2
12515    builtin and then its argument prototype would still apply.  */
12516 char regcomp ();
12517 char (*f) ();
12518
12519 int
12520 main ()
12521 {
12522 /* The GNU C library defines this for functions which it implements
12523     to always fail with ENOSYS.  Some functions are actually named
12524     something starting with __ and the normal name is an alias.  */
12525 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12526 choke me
12527 #else
12528 f = regcomp;
12529 #endif
12530
12531   ;
12532   return 0;
12533 }
12534 _ACEOF
12535 rm -f conftest.$ac_objext conftest$ac_exeext
12536 if { (eval echo "$as_me:12536: \"$ac_link\"") >&5
12537   (eval $ac_link) 2>&5
12538   ac_status=$?
12539   echo "$as_me:12539: \$? = $ac_status" >&5
12540   (exit $ac_status); } &&
12541          { ac_try='test -s conftest$ac_exeext'
12542   { (eval echo "$as_me:12542: \"$ac_try\"") >&5
12543   (eval $ac_try) 2>&5
12544   ac_status=$?
12545   echo "$as_me:12545: \$? = $ac_status" >&5
12546   (exit $ac_status); }; }; then
12547   ac_cv_func_regcomp=yes
12548 else
12549   echo "$as_me: failed program was:" >&5
12550 cat conftest.$ac_ext >&5
12551 ac_cv_func_regcomp=no
12552 fi
12553 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12554 fi
12555 echo "$as_me:12555: result: $ac_cv_func_regcomp" >&5
12556 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12557 if test $ac_cv_func_regcomp = yes; then
12558   cf_regex_func=regcomp
12559 else
12560
12561         for cf_regex_lib in regex re
12562         do
12563                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12564 echo "$as_me:12564: checking for regcomp in -l$cf_regex_lib" >&5
12565 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12566 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12567   echo $ECHO_N "(cached) $ECHO_C" >&6
12568 else
12569   ac_check_lib_save_LIBS=$LIBS
12570 LIBS="-l$cf_regex_lib  $LIBS"
12571 cat >conftest.$ac_ext <<_ACEOF
12572 #line 12572 "configure"
12573 #include "confdefs.h"
12574
12575 /* Override any gcc2 internal prototype to avoid an error.  */
12576 #ifdef __cplusplus
12577 extern "C"
12578 #endif
12579 /* We use char because int might match the return type of a gcc2
12580    builtin and then its argument prototype would still apply.  */
12581 char regcomp ();
12582 int
12583 main ()
12584 {
12585 regcomp ();
12586   ;
12587   return 0;
12588 }
12589 _ACEOF
12590 rm -f conftest.$ac_objext conftest$ac_exeext
12591 if { (eval echo "$as_me:12591: \"$ac_link\"") >&5
12592   (eval $ac_link) 2>&5
12593   ac_status=$?
12594   echo "$as_me:12594: \$? = $ac_status" >&5
12595   (exit $ac_status); } &&
12596          { ac_try='test -s conftest$ac_exeext'
12597   { (eval echo "$as_me:12597: \"$ac_try\"") >&5
12598   (eval $ac_try) 2>&5
12599   ac_status=$?
12600   echo "$as_me:12600: \$? = $ac_status" >&5
12601   (exit $ac_status); }; }; then
12602   eval "$as_ac_Lib=yes"
12603 else
12604   echo "$as_me: failed program was:" >&5
12605 cat conftest.$ac_ext >&5
12606 eval "$as_ac_Lib=no"
12607 fi
12608 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12609 LIBS=$ac_check_lib_save_LIBS
12610 fi
12611 echo "$as_me:12611: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12612 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12613 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12614
12615                                 LIBS="-l$cf_regex_lib $LIBS"
12616                                 cf_regex_func=regcomp
12617                                 break
12618 fi
12619
12620         done
12621
12622 fi
12623
12624 if test "$cf_regex_func" = no ; then
12625         echo "$as_me:12625: checking for compile" >&5
12626 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12627 if test "${ac_cv_func_compile+set}" = set; then
12628   echo $ECHO_N "(cached) $ECHO_C" >&6
12629 else
12630   cat >conftest.$ac_ext <<_ACEOF
12631 #line 12631 "configure"
12632 #include "confdefs.h"
12633 /* System header to define __stub macros and hopefully few prototypes,
12634     which can conflict with char compile (); below.  */
12635 #include <assert.h>
12636 /* Override any gcc2 internal prototype to avoid an error.  */
12637 #ifdef __cplusplus
12638 extern "C"
12639 #endif
12640 /* We use char because int might match the return type of a gcc2
12641    builtin and then its argument prototype would still apply.  */
12642 char compile ();
12643 char (*f) ();
12644
12645 int
12646 main ()
12647 {
12648 /* The GNU C library defines this for functions which it implements
12649     to always fail with ENOSYS.  Some functions are actually named
12650     something starting with __ and the normal name is an alias.  */
12651 #if defined (__stub_compile) || defined (__stub___compile)
12652 choke me
12653 #else
12654 f = compile;
12655 #endif
12656
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 rm -f conftest.$ac_objext conftest$ac_exeext
12662 if { (eval echo "$as_me:12662: \"$ac_link\"") >&5
12663   (eval $ac_link) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit $ac_status); } &&
12667          { ac_try='test -s conftest$ac_exeext'
12668   { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); }; }; then
12673   ac_cv_func_compile=yes
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 cat conftest.$ac_ext >&5
12677 ac_cv_func_compile=no
12678 fi
12679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12680 fi
12681 echo "$as_me:12681: result: $ac_cv_func_compile" >&5
12682 echo "${ECHO_T}$ac_cv_func_compile" >&6
12683 if test $ac_cv_func_compile = yes; then
12684   cf_regex_func=compile
12685 else
12686
12687                 echo "$as_me:12687: checking for compile in -lgen" >&5
12688 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12689 if test "${ac_cv_lib_gen_compile+set}" = set; then
12690   echo $ECHO_N "(cached) $ECHO_C" >&6
12691 else
12692   ac_check_lib_save_LIBS=$LIBS
12693 LIBS="-lgen  $LIBS"
12694 cat >conftest.$ac_ext <<_ACEOF
12695 #line 12695 "configure"
12696 #include "confdefs.h"
12697
12698 /* Override any gcc2 internal prototype to avoid an error.  */
12699 #ifdef __cplusplus
12700 extern "C"
12701 #endif
12702 /* We use char because int might match the return type of a gcc2
12703    builtin and then its argument prototype would still apply.  */
12704 char compile ();
12705 int
12706 main ()
12707 {
12708 compile ();
12709   ;
12710   return 0;
12711 }
12712 _ACEOF
12713 rm -f conftest.$ac_objext conftest$ac_exeext
12714 if { (eval echo "$as_me:12714: \"$ac_link\"") >&5
12715   (eval $ac_link) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); } &&
12719          { ac_try='test -s conftest$ac_exeext'
12720   { (eval echo "$as_me:12720: \"$ac_try\"") >&5
12721   (eval $ac_try) 2>&5
12722   ac_status=$?
12723   echo "$as_me:12723: \$? = $ac_status" >&5
12724   (exit $ac_status); }; }; then
12725   ac_cv_lib_gen_compile=yes
12726 else
12727   echo "$as_me: failed program was:" >&5
12728 cat conftest.$ac_ext >&5
12729 ac_cv_lib_gen_compile=no
12730 fi
12731 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12732 LIBS=$ac_check_lib_save_LIBS
12733 fi
12734 echo "$as_me:12734: result: $ac_cv_lib_gen_compile" >&5
12735 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12736 if test $ac_cv_lib_gen_compile = yes; then
12737
12738                                 LIBS="-lgen $LIBS"
12739                                 cf_regex_func=compile
12740 fi
12741
12742 fi
12743
12744 fi
12745
12746 if test "$cf_regex_func" = no ; then
12747         { echo "$as_me:12747: WARNING: cannot find regular expression library" >&5
12748 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12749 fi
12750
12751 echo "$as_me:12751: checking for regular-expression headers" >&5
12752 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12753 if test "${cf_cv_regex_hdrs+set}" = set; then
12754   echo $ECHO_N "(cached) $ECHO_C" >&6
12755 else
12756
12757 cf_cv_regex_hdrs=no
12758 case $cf_regex_func in #(vi
12759 compile) #(vi
12760         for cf_regex_hdr in regexp.h regexpr.h
12761         do
12762                 cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765 #include <$cf_regex_hdr>
12766 int
12767 main ()
12768 {
12769
12770                         char *p = compile("", "", "", 0);
12771                         int x = step("", "");
12772
12773   ;
12774   return 0;
12775 }
12776 _ACEOF
12777 rm -f conftest.$ac_objext conftest$ac_exeext
12778 if { (eval echo "$as_me:12778: \"$ac_link\"") >&5
12779   (eval $ac_link) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); } &&
12783          { ac_try='test -s conftest$ac_exeext'
12784   { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); }; }; then
12789
12790                         cf_cv_regex_hdrs=$cf_regex_hdr
12791                         break
12792
12793 else
12794   echo "$as_me: failed program was:" >&5
12795 cat conftest.$ac_ext >&5
12796 fi
12797 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12798         done
12799         ;;
12800 *)
12801         for cf_regex_hdr in regex.h
12802         do
12803                 cat >conftest.$ac_ext <<_ACEOF
12804 #line 12804 "configure"
12805 #include "confdefs.h"
12806 #include <sys/types.h>
12807 #include <$cf_regex_hdr>
12808 int
12809 main ()
12810 {
12811
12812                         regex_t *p;
12813                         int x = regcomp(p, "", 0);
12814                         int y = regexec(p, "", 0, 0, 0);
12815                         regfree(p);
12816
12817   ;
12818   return 0;
12819 }
12820 _ACEOF
12821 rm -f conftest.$ac_objext conftest$ac_exeext
12822 if { (eval echo "$as_me:12822: \"$ac_link\"") >&5
12823   (eval $ac_link) 2>&5
12824   ac_status=$?
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); } &&
12827          { ac_try='test -s conftest$ac_exeext'
12828   { (eval echo "$as_me:12828: \"$ac_try\"") >&5
12829   (eval $ac_try) 2>&5
12830   ac_status=$?
12831   echo "$as_me:12831: \$? = $ac_status" >&5
12832   (exit $ac_status); }; }; then
12833
12834                         cf_cv_regex_hdrs=$cf_regex_hdr
12835                         break
12836
12837 else
12838   echo "$as_me: failed program was:" >&5
12839 cat conftest.$ac_ext >&5
12840 fi
12841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12842         done
12843         ;;
12844 esac
12845
12846 fi
12847 echo "$as_me:12847: result: $cf_cv_regex_hdrs" >&5
12848 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12849
12850 case $cf_cv_regex_hdrs in #(vi
12851     no)        { echo "$as_me:12851: WARNING: no regular expression header found" >&5
12852 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12853     regex.h)   cat >>confdefs.h <<\EOF
12854 #define HAVE_REGEX_H_FUNCS 1
12855 EOF
12856  ;; #(vi
12857     regexp.h)  cat >>confdefs.h <<\EOF
12858 #define HAVE_REGEXP_H_FUNCS 1
12859 EOF
12860  ;; #(vi
12861     regexpr.h) cat >>confdefs.h <<\EOF
12862 #define HAVE_REGEXPR_H_FUNCS 1
12863 EOF
12864  ;;
12865 esac
12866
12867 for ac_header in \
12868 fcntl.h \
12869 getopt.h \
12870 limits.h \
12871 locale.h \
12872 poll.h \
12873 sys/bsdtypes.h \
12874 sys/ioctl.h \
12875 sys/param.h \
12876 sys/poll.h \
12877 sys/select.h \
12878 sys/time.h \
12879 sys/times.h \
12880 ttyent.h \
12881 unistd.h \
12882 wctype.h \
12883
12884 do
12885 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12886 echo "$as_me:12886: checking for $ac_header" >&5
12887 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12889   echo $ECHO_N "(cached) $ECHO_C" >&6
12890 else
12891   cat >conftest.$ac_ext <<_ACEOF
12892 #line 12892 "configure"
12893 #include "confdefs.h"
12894 #include <$ac_header>
12895 _ACEOF
12896 if { (eval echo "$as_me:12896: \"$ac_cpp conftest.$ac_ext\"") >&5
12897   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12898   ac_status=$?
12899   egrep -v '^ *\+' conftest.er1 >conftest.err
12900   rm -f conftest.er1
12901   cat conftest.err >&5
12902   echo "$as_me:12902: \$? = $ac_status" >&5
12903   (exit $ac_status); } >/dev/null; then
12904   if test -s conftest.err; then
12905     ac_cpp_err=$ac_c_preproc_warn_flag
12906   else
12907     ac_cpp_err=
12908   fi
12909 else
12910   ac_cpp_err=yes
12911 fi
12912 if test -z "$ac_cpp_err"; then
12913   eval "$as_ac_Header=yes"
12914 else
12915   echo "$as_me: failed program was:" >&5
12916   cat conftest.$ac_ext >&5
12917   eval "$as_ac_Header=no"
12918 fi
12919 rm -f conftest.err conftest.$ac_ext
12920 fi
12921 echo "$as_me:12921: result: `eval echo '${'$as_ac_Header'}'`" >&5
12922 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12923 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12924   cat >>confdefs.h <<EOF
12925 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12926 EOF
12927
12928 fi
12929 done
12930
12931 # check for ISC (this may also define _POSIX_SOURCE)
12932 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12933 if test "$ISC" = yes ; then
12934
12935 echo "$as_me:12935: checking for main in -lcposix" >&5
12936 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12937 if test "${ac_cv_lib_cposix_main+set}" = set; then
12938   echo $ECHO_N "(cached) $ECHO_C" >&6
12939 else
12940   ac_check_lib_save_LIBS=$LIBS
12941 LIBS="-lcposix  $LIBS"
12942 cat >conftest.$ac_ext <<_ACEOF
12943 #line 12943 "configure"
12944 #include "confdefs.h"
12945
12946 int
12947 main ()
12948 {
12949 main ();
12950   ;
12951   return 0;
12952 }
12953 _ACEOF
12954 rm -f conftest.$ac_objext conftest$ac_exeext
12955 if { (eval echo "$as_me:12955: \"$ac_link\"") >&5
12956   (eval $ac_link) 2>&5
12957   ac_status=$?
12958   echo "$as_me:12958: \$? = $ac_status" >&5
12959   (exit $ac_status); } &&
12960          { ac_try='test -s conftest$ac_exeext'
12961   { (eval echo "$as_me:12961: \"$ac_try\"") >&5
12962   (eval $ac_try) 2>&5
12963   ac_status=$?
12964   echo "$as_me:12964: \$? = $ac_status" >&5
12965   (exit $ac_status); }; }; then
12966   ac_cv_lib_cposix_main=yes
12967 else
12968   echo "$as_me: failed program was:" >&5
12969 cat conftest.$ac_ext >&5
12970 ac_cv_lib_cposix_main=no
12971 fi
12972 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12973 LIBS=$ac_check_lib_save_LIBS
12974 fi
12975 echo "$as_me:12975: result: $ac_cv_lib_cposix_main" >&5
12976 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12977 if test $ac_cv_lib_cposix_main = yes; then
12978   cat >>confdefs.h <<EOF
12979 #define HAVE_LIBCPOSIX 1
12980 EOF
12981
12982   LIBS="-lcposix $LIBS"
12983
12984 fi
12985
12986         echo "$as_me:12986: checking for bzero in -linet" >&5
12987 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12988 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12989   echo $ECHO_N "(cached) $ECHO_C" >&6
12990 else
12991   ac_check_lib_save_LIBS=$LIBS
12992 LIBS="-linet  $LIBS"
12993 cat >conftest.$ac_ext <<_ACEOF
12994 #line 12994 "configure"
12995 #include "confdefs.h"
12996
12997 /* Override any gcc2 internal prototype to avoid an error.  */
12998 #ifdef __cplusplus
12999 extern "C"
13000 #endif
13001 /* We use char because int might match the return type of a gcc2
13002    builtin and then its argument prototype would still apply.  */
13003 char bzero ();
13004 int
13005 main ()
13006 {
13007 bzero ();
13008   ;
13009   return 0;
13010 }
13011 _ACEOF
13012 rm -f conftest.$ac_objext conftest$ac_exeext
13013 if { (eval echo "$as_me:13013: \"$ac_link\"") >&5
13014   (eval $ac_link) 2>&5
13015   ac_status=$?
13016   echo "$as_me:13016: \$? = $ac_status" >&5
13017   (exit $ac_status); } &&
13018          { ac_try='test -s conftest$ac_exeext'
13019   { (eval echo "$as_me:13019: \"$ac_try\"") >&5
13020   (eval $ac_try) 2>&5
13021   ac_status=$?
13022   echo "$as_me:13022: \$? = $ac_status" >&5
13023   (exit $ac_status); }; }; then
13024   ac_cv_lib_inet_bzero=yes
13025 else
13026   echo "$as_me: failed program was:" >&5
13027 cat conftest.$ac_ext >&5
13028 ac_cv_lib_inet_bzero=no
13029 fi
13030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13031 LIBS=$ac_check_lib_save_LIBS
13032 fi
13033 echo "$as_me:13033: result: $ac_cv_lib_inet_bzero" >&5
13034 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13035 if test $ac_cv_lib_inet_bzero = yes; then
13036   LIBS="$LIBS -linet"
13037 fi
13038 fi
13039
13040 echo "$as_me:13040: checking if sys/time.h works with sys/select.h" >&5
13041 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13042 if test "${cf_cv_sys_time_select+set}" = set; then
13043   echo $ECHO_N "(cached) $ECHO_C" >&6
13044 else
13045
13046 cat >conftest.$ac_ext <<_ACEOF
13047 #line 13047 "configure"
13048 #include "confdefs.h"
13049
13050 #include <sys/types.h>
13051 #ifdef HAVE_SYS_TIME_H
13052 #include <sys/time.h>
13053 #endif
13054 #ifdef HAVE_SYS_SELECT_H
13055 #include <sys/select.h>
13056 #endif
13057
13058 int
13059 main ()
13060 {
13061
13062   ;
13063   return 0;
13064 }
13065 _ACEOF
13066 rm -f conftest.$ac_objext
13067 if { (eval echo "$as_me:13067: \"$ac_compile\"") >&5
13068   (eval $ac_compile) 2>&5
13069   ac_status=$?
13070   echo "$as_me:13070: \$? = $ac_status" >&5
13071   (exit $ac_status); } &&
13072          { ac_try='test -s conftest.$ac_objext'
13073   { (eval echo "$as_me:13073: \"$ac_try\"") >&5
13074   (eval $ac_try) 2>&5
13075   ac_status=$?
13076   echo "$as_me:13076: \$? = $ac_status" >&5
13077   (exit $ac_status); }; }; then
13078   cf_cv_sys_time_select=yes
13079 else
13080   echo "$as_me: failed program was:" >&5
13081 cat conftest.$ac_ext >&5
13082 cf_cv_sys_time_select=no
13083 fi
13084 rm -f conftest.$ac_objext conftest.$ac_ext
13085
13086 fi
13087
13088 echo "$as_me:13088: result: $cf_cv_sys_time_select" >&5
13089 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13090 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13091 #define HAVE_SYS_TIME_SELECT 1
13092 EOF
13093
13094 ###     checks for compiler characteristics
13095 ac_ext=c
13096 ac_cpp='$CPP $CPPFLAGS'
13097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13100 ac_main_return=return
13101
13102 echo "$as_me:13102: checking for $CC option to accept ANSI C" >&5
13103 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13104 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13105   echo $ECHO_N "(cached) $ECHO_C" >&6
13106 else
13107   ac_cv_prog_cc_stdc=no
13108 ac_save_CC=$CC
13109 cat >conftest.$ac_ext <<_ACEOF
13110 #line 13110 "configure"
13111 #include "confdefs.h"
13112 #include <stdarg.h>
13113 #include <stdio.h>
13114 #include <sys/types.h>
13115 #include <sys/stat.h>
13116 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13117 struct buf { int x; };
13118 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13119 static char *e (p, i)
13120      char **p;
13121      int i;
13122 {
13123   return p[i];
13124 }
13125 static char *f (char * (*g) (char **, int), char **p, ...)
13126 {
13127   char *s;
13128   va_list v;
13129   va_start (v,p);
13130   s = g (p, va_arg (v,int));
13131   va_end (v);
13132   return s;
13133 }
13134 int test (int i, double x);
13135 struct s1 {int (*f) (int a);};
13136 struct s2 {int (*f) (double a);};
13137 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13138 int argc;
13139 char **argv;
13140 int
13141 main ()
13142 {
13143 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13144   ;
13145   return 0;
13146 }
13147 _ACEOF
13148 # Don't try gcc -ansi; that turns off useful extensions and
13149 # breaks some systems' header files.
13150 # AIX                   -qlanglvl=ansi
13151 # Ultrix and OSF/1      -std1
13152 # HP-UX 10.20 and later -Ae
13153 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13154 # SVR4                  -Xc -D__EXTENSIONS__
13155 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13156 do
13157   CC="$ac_save_CC $ac_arg"
13158   rm -f conftest.$ac_objext
13159 if { (eval echo "$as_me:13159: \"$ac_compile\"") >&5
13160   (eval $ac_compile) 2>&5
13161   ac_status=$?
13162   echo "$as_me:13162: \$? = $ac_status" >&5
13163   (exit $ac_status); } &&
13164          { ac_try='test -s conftest.$ac_objext'
13165   { (eval echo "$as_me:13165: \"$ac_try\"") >&5
13166   (eval $ac_try) 2>&5
13167   ac_status=$?
13168   echo "$as_me:13168: \$? = $ac_status" >&5
13169   (exit $ac_status); }; }; then
13170   ac_cv_prog_cc_stdc=$ac_arg
13171 break
13172 else
13173   echo "$as_me: failed program was:" >&5
13174 cat conftest.$ac_ext >&5
13175 fi
13176 rm -f conftest.$ac_objext
13177 done
13178 rm -f conftest.$ac_ext conftest.$ac_objext
13179 CC=$ac_save_CC
13180
13181 fi
13182
13183 case "x$ac_cv_prog_cc_stdc" in
13184   x|xno)
13185     echo "$as_me:13185: result: none needed" >&5
13186 echo "${ECHO_T}none needed" >&6 ;;
13187   *)
13188     echo "$as_me:13188: result: $ac_cv_prog_cc_stdc" >&5
13189 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13190     CC="$CC $ac_cv_prog_cc_stdc" ;;
13191 esac
13192
13193 echo "$as_me:13193: checking for an ANSI C-conforming const" >&5
13194 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13195 if test "${ac_cv_c_const+set}" = set; then
13196   echo $ECHO_N "(cached) $ECHO_C" >&6
13197 else
13198   cat >conftest.$ac_ext <<_ACEOF
13199 #line 13199 "configure"
13200 #include "confdefs.h"
13201
13202 int
13203 main ()
13204 {
13205 /* FIXME: Include the comments suggested by Paul. */
13206 #ifndef __cplusplus
13207   /* Ultrix mips cc rejects this.  */
13208   typedef int charset[2];
13209   const charset x;
13210   /* SunOS 4.1.1 cc rejects this.  */
13211   char const *const *ccp;
13212   char **p;
13213   /* NEC SVR4.0.2 mips cc rejects this.  */
13214   struct point {int x, y;};
13215   static struct point const zero = {0,0};
13216   /* AIX XL C 1.02.0.0 rejects this.
13217      It does not let you subtract one const X* pointer from another in
13218      an arm of an if-expression whose if-part is not a constant
13219      expression */
13220   const char *g = "string";
13221   ccp = &g + (g ? g-g : 0);
13222   /* HPUX 7.0 cc rejects these. */
13223   ++ccp;
13224   p = (char**) ccp;
13225   ccp = (char const *const *) p;
13226   { /* SCO 3.2v4 cc rejects this.  */
13227     char *t;
13228     char const *s = 0 ? (char *) 0 : (char const *) 0;
13229
13230     *t++ = 0;
13231   }
13232   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13233     int x[] = {25, 17};
13234     const int *foo = &x[0];
13235     ++foo;
13236   }
13237   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13238     typedef const int *iptr;
13239     iptr p = 0;
13240     ++p;
13241   }
13242   { /* AIX XL C 1.02.0.0 rejects this saying
13243        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13244     struct s { int j; const int *ap[3]; };
13245     struct s *b; b->j = 5;
13246   }
13247   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13248     const int foo = 10;
13249   }
13250 #endif
13251
13252   ;
13253   return 0;
13254 }
13255 _ACEOF
13256 rm -f conftest.$ac_objext
13257 if { (eval echo "$as_me:13257: \"$ac_compile\"") >&5
13258   (eval $ac_compile) 2>&5
13259   ac_status=$?
13260   echo "$as_me:13260: \$? = $ac_status" >&5
13261   (exit $ac_status); } &&
13262          { ac_try='test -s conftest.$ac_objext'
13263   { (eval echo "$as_me:13263: \"$ac_try\"") >&5
13264   (eval $ac_try) 2>&5
13265   ac_status=$?
13266   echo "$as_me:13266: \$? = $ac_status" >&5
13267   (exit $ac_status); }; }; then
13268   ac_cv_c_const=yes
13269 else
13270   echo "$as_me: failed program was:" >&5
13271 cat conftest.$ac_ext >&5
13272 ac_cv_c_const=no
13273 fi
13274 rm -f conftest.$ac_objext conftest.$ac_ext
13275 fi
13276 echo "$as_me:13276: result: $ac_cv_c_const" >&5
13277 echo "${ECHO_T}$ac_cv_c_const" >&6
13278 if test $ac_cv_c_const = no; then
13279
13280 cat >>confdefs.h <<\EOF
13281 #define const
13282 EOF
13283
13284 fi
13285
13286 echo "$as_me:13286: checking for inline" >&5
13287 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13288 if test "${ac_cv_c_inline+set}" = set; then
13289   echo $ECHO_N "(cached) $ECHO_C" >&6
13290 else
13291   ac_cv_c_inline=no
13292 for ac_kw in inline __inline__ __inline; do
13293   cat >conftest.$ac_ext <<_ACEOF
13294 #line 13294 "configure"
13295 #include "confdefs.h"
13296 #ifndef __cplusplus
13297 static $ac_kw int static_foo () {return 0; }
13298 $ac_kw int foo () {return 0; }
13299 #endif
13300
13301 _ACEOF
13302 rm -f conftest.$ac_objext
13303 if { (eval echo "$as_me:13303: \"$ac_compile\"") >&5
13304   (eval $ac_compile) 2>&5
13305   ac_status=$?
13306   echo "$as_me:13306: \$? = $ac_status" >&5
13307   (exit $ac_status); } &&
13308          { ac_try='test -s conftest.$ac_objext'
13309   { (eval echo "$as_me:13309: \"$ac_try\"") >&5
13310   (eval $ac_try) 2>&5
13311   ac_status=$?
13312   echo "$as_me:13312: \$? = $ac_status" >&5
13313   (exit $ac_status); }; }; then
13314   ac_cv_c_inline=$ac_kw; break
13315 else
13316   echo "$as_me: failed program was:" >&5
13317 cat conftest.$ac_ext >&5
13318 fi
13319 rm -f conftest.$ac_objext conftest.$ac_ext
13320 done
13321
13322 fi
13323 echo "$as_me:13323: result: $ac_cv_c_inline" >&5
13324 echo "${ECHO_T}$ac_cv_c_inline" >&6
13325 case $ac_cv_c_inline in
13326   inline | yes) ;;
13327   no)
13328 cat >>confdefs.h <<\EOF
13329 #define inline
13330 EOF
13331  ;;
13332   *)  cat >>confdefs.h <<EOF
13333 #define inline $ac_cv_c_inline
13334 EOF
13335  ;;
13336 esac
13337
13338 NCURSES_INLINE=
13339 if test "$ac_cv_c_inline" != no ; then
13340   NCURSES_INLINE=inline
13341   if test "$INTEL_COMPILER" = yes
13342   then
13343     :
13344   elif test "$GCC" = yes
13345   then
13346     echo "$as_me:13346: checking if gcc supports options to tune inlining" >&5
13347 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
13348 if test "${cf_cv_gcc_inline+set}" = set; then
13349   echo $ECHO_N "(cached) $ECHO_C" >&6
13350 else
13351
13352       cf_save_CFLAGS=$CFLAGS
13353       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13354       cat >conftest.$ac_ext <<_ACEOF
13355 #line 13355 "configure"
13356 #include "confdefs.h"
13357 inline int foo(void) { return 1; }
13358 int
13359 main ()
13360 {
13361 ${cf_cv_main_return:-return} foo()
13362   ;
13363   return 0;
13364 }
13365 _ACEOF
13366 rm -f conftest.$ac_objext
13367 if { (eval echo "$as_me:13367: \"$ac_compile\"") >&5
13368   (eval $ac_compile) 2>&5
13369   ac_status=$?
13370   echo "$as_me:13370: \$? = $ac_status" >&5
13371   (exit $ac_status); } &&
13372          { ac_try='test -s conftest.$ac_objext'
13373   { (eval echo "$as_me:13373: \"$ac_try\"") >&5
13374   (eval $ac_try) 2>&5
13375   ac_status=$?
13376   echo "$as_me:13376: \$? = $ac_status" >&5
13377   (exit $ac_status); }; }; then
13378   cf_cv_gcc_inline=yes
13379 else
13380   echo "$as_me: failed program was:" >&5
13381 cat conftest.$ac_ext >&5
13382 cf_cv_gcc_inline=no
13383 fi
13384 rm -f conftest.$ac_objext conftest.$ac_ext
13385       CFLAGS=$cf_save_CFLAGS
13386
13387 fi
13388 echo "$as_me:13388: result: $cf_cv_gcc_inline" >&5
13389 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13390     if test "$cf_cv_gcc_inline" = yes ; then
13391
13392 cf_fix_cppflags=no
13393 cf_new_cflags=
13394 cf_new_cppflags=
13395 cf_new_extra_cppflags=
13396
13397 for cf_add_cflags in --param max-inline-insns-single=1200
13398 do
13399 case $cf_fix_cppflags in
13400 no)
13401         case $cf_add_cflags in #(vi
13402         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13403                 case $cf_add_cflags in
13404                 -D*)
13405                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13406
13407                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13408                                 && test -z "${cf_tst_cflags}" \
13409                                 && cf_fix_cppflags=yes
13410
13411                         if test $cf_fix_cppflags = yes ; then
13412                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13413                                 continue
13414                         elif test "${cf_tst_cflags}" = "\"'" ; then
13415                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13416                                 continue
13417                         fi
13418                         ;;
13419                 esac
13420                 case "$CPPFLAGS" in
13421                 *$cf_add_cflags) #(vi
13422                         ;;
13423                 *) #(vi
13424                         case $cf_add_cflags in #(vi
13425                         -D*)
13426                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13427
13428 CPPFLAGS=`echo "$CPPFLAGS" | \
13429         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13430                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13431
13432                                 ;;
13433                         esac
13434                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13435                         ;;
13436                 esac
13437                 ;;
13438         *)
13439                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13440                 ;;
13441         esac
13442         ;;
13443 yes)
13444         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13445
13446         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13447
13448         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13449                 && test -z "${cf_tst_cflags}" \
13450                 && cf_fix_cppflags=no
13451         ;;
13452 esac
13453 done
13454
13455 if test -n "$cf_new_cflags" ; then
13456
13457         CFLAGS="$CFLAGS $cf_new_cflags"
13458 fi
13459
13460 if test -n "$cf_new_cppflags" ; then
13461
13462         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13463 fi
13464
13465 if test -n "$cf_new_extra_cppflags" ; then
13466
13467         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13468 fi
13469
13470     fi
13471   fi
13472 fi
13473
13474 echo "$as_me:13474: checking for signal global datatype" >&5
13475 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13476 if test "${cf_cv_sig_atomic_t+set}" = set; then
13477   echo $ECHO_N "(cached) $ECHO_C" >&6
13478 else
13479
13480         for cf_type in \
13481                 "volatile sig_atomic_t" \
13482                 "sig_atomic_t" \
13483                 "int"
13484         do
13485         cat >conftest.$ac_ext <<_ACEOF
13486 #line 13486 "configure"
13487 #include "confdefs.h"
13488
13489 #include <sys/types.h>
13490 #include <signal.h>
13491 #include <stdio.h>
13492
13493 extern $cf_type x;
13494 $cf_type x;
13495 static void handler(int sig)
13496 {
13497         x = 5;
13498 }
13499 int
13500 main ()
13501 {
13502 signal(SIGINT, handler);
13503                  x = 1
13504   ;
13505   return 0;
13506 }
13507 _ACEOF
13508 rm -f conftest.$ac_objext
13509 if { (eval echo "$as_me:13509: \"$ac_compile\"") >&5
13510   (eval $ac_compile) 2>&5
13511   ac_status=$?
13512   echo "$as_me:13512: \$? = $ac_status" >&5
13513   (exit $ac_status); } &&
13514          { ac_try='test -s conftest.$ac_objext'
13515   { (eval echo "$as_me:13515: \"$ac_try\"") >&5
13516   (eval $ac_try) 2>&5
13517   ac_status=$?
13518   echo "$as_me:13518: \$? = $ac_status" >&5
13519   (exit $ac_status); }; }; then
13520   cf_cv_sig_atomic_t=$cf_type
13521 else
13522   echo "$as_me: failed program was:" >&5
13523 cat conftest.$ac_ext >&5
13524 cf_cv_sig_atomic_t=no
13525 fi
13526 rm -f conftest.$ac_objext conftest.$ac_ext
13527                 test "$cf_cv_sig_atomic_t" != no && break
13528         done
13529
13530 fi
13531
13532 echo "$as_me:13532: result: $cf_cv_sig_atomic_t" >&5
13533 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13534 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13535 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13536 EOF
13537
13538 if test $NCURSES_CHTYPE = auto ; then
13539
13540 echo "$as_me:13540: checking for type of chtype" >&5
13541 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13542 if test "${cf_cv_typeof_chtype+set}" = set; then
13543   echo $ECHO_N "(cached) $ECHO_C" >&6
13544 else
13545
13546                 if test "$cross_compiling" = yes; then
13547   cf_cv_typeof_chtype=long
13548 else
13549   cat >conftest.$ac_ext <<_ACEOF
13550 #line 13550 "configure"
13551 #include "confdefs.h"
13552
13553 #define WANT_BITS 31
13554 #include <stdio.h>
13555 int main()
13556 {
13557         FILE *fp = fopen("cf_test.out", "w");
13558         if (fp != 0) {
13559                 char *result = "long";
13560                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13561                         int n;
13562                         unsigned int x, y;
13563                         for (n = 0; n < WANT_BITS; n++) {
13564                                 x = (1 << n);
13565                                 y = (x >> n);
13566                                 if (y != 1 || x == 0) {
13567                                         x = 0;
13568                                         break;
13569                                 }
13570                         }
13571                         /*
13572                          * If x is nonzero, an int is big enough for the bits
13573                          * that we want.
13574                          */
13575                         result = (x != 0) ? "int" : "long";
13576                 }
13577                 fputs(result, fp);
13578                 fclose(fp);
13579         }
13580         ${cf_cv_main_return:-return}(0);
13581 }
13582
13583 _ACEOF
13584 rm -f conftest$ac_exeext
13585 if { (eval echo "$as_me:13585: \"$ac_link\"") >&5
13586   (eval $ac_link) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13590   { (eval echo "$as_me:13590: \"$ac_try\"") >&5
13591   (eval $ac_try) 2>&5
13592   ac_status=$?
13593   echo "$as_me:13593: \$? = $ac_status" >&5
13594   (exit $ac_status); }; }; then
13595   cf_cv_typeof_chtype=`cat cf_test.out`
13596 else
13597   echo "$as_me: program exited with status $ac_status" >&5
13598 echo "$as_me: failed program was:" >&5
13599 cat conftest.$ac_ext >&5
13600 cf_cv_typeof_chtype=long
13601 fi
13602 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13603 fi
13604                 rm -f cf_test.out
13605
13606 fi
13607
13608 echo "$as_me:13608: result: $cf_cv_typeof_chtype" >&5
13609 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13610
13611 cat >>confdefs.h <<EOF
13612 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13613 EOF
13614
13615 else
13616         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13617 fi
13618 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13619
13620 echo "$as_me:13620: checking if unsigned literals are legal" >&5
13621 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13622 if test "${cf_cv_unsigned_literals+set}" = set; then
13623   echo $ECHO_N "(cached) $ECHO_C" >&6
13624 else
13625
13626         cat >conftest.$ac_ext <<_ACEOF
13627 #line 13627 "configure"
13628 #include "confdefs.h"
13629
13630 int
13631 main ()
13632 {
13633 long x = 1L + 1UL + 1U + 1
13634   ;
13635   return 0;
13636 }
13637 _ACEOF
13638 rm -f conftest.$ac_objext
13639 if { (eval echo "$as_me:13639: \"$ac_compile\"") >&5
13640   (eval $ac_compile) 2>&5
13641   ac_status=$?
13642   echo "$as_me:13642: \$? = $ac_status" >&5
13643   (exit $ac_status); } &&
13644          { ac_try='test -s conftest.$ac_objext'
13645   { (eval echo "$as_me:13645: \"$ac_try\"") >&5
13646   (eval $ac_try) 2>&5
13647   ac_status=$?
13648   echo "$as_me:13648: \$? = $ac_status" >&5
13649   (exit $ac_status); }; }; then
13650   cf_cv_unsigned_literals=yes
13651 else
13652   echo "$as_me: failed program was:" >&5
13653 cat conftest.$ac_ext >&5
13654 cf_cv_unsigned_literals=no
13655 fi
13656 rm -f conftest.$ac_objext conftest.$ac_ext
13657
13658 fi
13659
13660 echo "$as_me:13660: result: $cf_cv_unsigned_literals" >&5
13661 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13662
13663 cf_cv_1UL="1"
13664 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13665 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13666
13667 if test $NCURSES_MMASK_T = auto ; then
13668         cf_cv_typeof_mmask_t=long
13669 else
13670         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13671 fi
13672 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13673
13674 ###     Checks for external-data
13675
13676 echo "$as_me:13676: checking if external errno is declared" >&5
13677 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13678 if test "${cf_cv_dcl_errno+set}" = set; then
13679   echo $ECHO_N "(cached) $ECHO_C" >&6
13680 else
13681
13682     cat >conftest.$ac_ext <<_ACEOF
13683 #line 13683 "configure"
13684 #include "confdefs.h"
13685
13686 #ifdef HAVE_STDLIB_H
13687 #include <stdlib.h>
13688 #endif
13689 #include <stdio.h>
13690 #include <sys/types.h>
13691 #include <errno.h>
13692 int
13693 main ()
13694 {
13695 int x = (int) errno
13696   ;
13697   return 0;
13698 }
13699 _ACEOF
13700 rm -f conftest.$ac_objext
13701 if { (eval echo "$as_me:13701: \"$ac_compile\"") >&5
13702   (eval $ac_compile) 2>&5
13703   ac_status=$?
13704   echo "$as_me:13704: \$? = $ac_status" >&5
13705   (exit $ac_status); } &&
13706          { ac_try='test -s conftest.$ac_objext'
13707   { (eval echo "$as_me:13707: \"$ac_try\"") >&5
13708   (eval $ac_try) 2>&5
13709   ac_status=$?
13710   echo "$as_me:13710: \$? = $ac_status" >&5
13711   (exit $ac_status); }; }; then
13712   cf_cv_dcl_errno=yes
13713 else
13714   echo "$as_me: failed program was:" >&5
13715 cat conftest.$ac_ext >&5
13716 cf_cv_dcl_errno=no
13717 fi
13718 rm -f conftest.$ac_objext conftest.$ac_ext
13719
13720 fi
13721 echo "$as_me:13721: result: $cf_cv_dcl_errno" >&5
13722 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13723
13724 if test "$cf_cv_dcl_errno" = no ; then
13725
13726 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13727
13728     cat >>confdefs.h <<EOF
13729 #define $cf_result 1
13730 EOF
13731
13732 fi
13733
13734 # It's possible (for near-UNIX clones) that the data doesn't exist
13735
13736 echo "$as_me:13736: checking if external errno exists" >&5
13737 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13738 if test "${cf_cv_have_errno+set}" = set; then
13739   echo $ECHO_N "(cached) $ECHO_C" >&6
13740 else
13741
13742     cat >conftest.$ac_ext <<_ACEOF
13743 #line 13743 "configure"
13744 #include "confdefs.h"
13745
13746 #undef errno
13747 extern int errno;
13748
13749 int
13750 main ()
13751 {
13752 errno = 2
13753   ;
13754   return 0;
13755 }
13756 _ACEOF
13757 rm -f conftest.$ac_objext conftest$ac_exeext
13758 if { (eval echo "$as_me:13758: \"$ac_link\"") >&5
13759   (eval $ac_link) 2>&5
13760   ac_status=$?
13761   echo "$as_me:13761: \$? = $ac_status" >&5
13762   (exit $ac_status); } &&
13763          { ac_try='test -s conftest$ac_exeext'
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_have_errno=yes
13770 else
13771   echo "$as_me: failed program was:" >&5
13772 cat conftest.$ac_ext >&5
13773 cf_cv_have_errno=no
13774 fi
13775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13776
13777 fi
13778 echo "$as_me:13778: result: $cf_cv_have_errno" >&5
13779 echo "${ECHO_T}$cf_cv_have_errno" >&6
13780
13781 if test "$cf_cv_have_errno" = yes ; then
13782
13783 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13784
13785     cat >>confdefs.h <<EOF
13786 #define $cf_result 1
13787 EOF
13788
13789 fi
13790
13791 echo "$as_me:13791: checking if data-only library module links" >&5
13792 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13793 if test "${cf_cv_link_dataonly+set}" = set; then
13794   echo $ECHO_N "(cached) $ECHO_C" >&6
13795 else
13796
13797         rm -f conftest.a
13798         cat >conftest.$ac_ext <<EOF
13799 #line 13799 "configure"
13800 int     testdata[3] = { 123, 456, 789 };
13801 EOF
13802         if { (eval echo "$as_me:13802: \"$ac_compile\"") >&5
13803   (eval $ac_compile) 2>&5
13804   ac_status=$?
13805   echo "$as_me:13805: \$? = $ac_status" >&5
13806   (exit $ac_status); } ; then
13807                 mv conftest.o data.o && \
13808                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13809         fi
13810         rm -f conftest.$ac_ext data.o
13811         cat >conftest.$ac_ext <<EOF
13812 #line 13812 "configure"
13813 int     testfunc()
13814 {
13815 #if defined(NeXT)
13816         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13817 #else
13818         extern int testdata[3];
13819         return testdata[0] == 123
13820            &&  testdata[1] == 456
13821            &&  testdata[2] == 789;
13822 #endif
13823 }
13824 EOF
13825         if { (eval echo "$as_me:13825: \"$ac_compile\"") >&5
13826   (eval $ac_compile) 2>&5
13827   ac_status=$?
13828   echo "$as_me:13828: \$? = $ac_status" >&5
13829   (exit $ac_status); }; then
13830                 mv conftest.o func.o && \
13831                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13832         fi
13833         rm -f conftest.$ac_ext func.o
13834         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13835         cf_saveLIBS="$LIBS"
13836         LIBS="conftest.a $LIBS"
13837         if test "$cross_compiling" = yes; then
13838   cf_cv_link_dataonly=unknown
13839 else
13840   cat >conftest.$ac_ext <<_ACEOF
13841 #line 13841 "configure"
13842 #include "confdefs.h"
13843
13844         int main()
13845         {
13846                 extern int testfunc();
13847                 ${cf_cv_main_return:-return} (!testfunc());
13848         }
13849
13850 _ACEOF
13851 rm -f conftest$ac_exeext
13852 if { (eval echo "$as_me:13852: \"$ac_link\"") >&5
13853   (eval $ac_link) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   cf_cv_link_dataonly=yes
13863 else
13864   echo "$as_me: program exited with status $ac_status" >&5
13865 echo "$as_me: failed program was:" >&5
13866 cat conftest.$ac_ext >&5
13867 cf_cv_link_dataonly=no
13868 fi
13869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13870 fi
13871         LIBS="$cf_saveLIBS"
13872
13873 fi
13874
13875 echo "$as_me:13875: result: $cf_cv_link_dataonly" >&5
13876 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13877
13878 if test "$cf_cv_link_dataonly" = no ; then
13879         cat >>confdefs.h <<\EOF
13880 #define BROKEN_LINKER 1
13881 EOF
13882
13883         BROKEN_LINKER=1
13884 fi
13885
13886 ###     Checks for library functions.
13887
13888 for ac_func in \
13889 getcwd \
13890 getegid \
13891 geteuid \
13892 getttynam \
13893 issetugid \
13894 poll \
13895 remove \
13896 select \
13897 setbuf \
13898 setbuffer \
13899 setvbuf \
13900 sigaction \
13901 sigvec \
13902 strdup \
13903 strstr \
13904 tcgetpgrp \
13905 times \
13906 vsnprintf \
13907
13908 do
13909 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13910 echo "$as_me:13910: checking for $ac_func" >&5
13911 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13912 if eval "test \"\${$as_ac_var+set}\" = set"; then
13913   echo $ECHO_N "(cached) $ECHO_C" >&6
13914 else
13915   cat >conftest.$ac_ext <<_ACEOF
13916 #line 13916 "configure"
13917 #include "confdefs.h"
13918 /* System header to define __stub macros and hopefully few prototypes,
13919     which can conflict with char $ac_func (); below.  */
13920 #include <assert.h>
13921 /* Override any gcc2 internal prototype to avoid an error.  */
13922 #ifdef __cplusplus
13923 extern "C"
13924 #endif
13925 /* We use char because int might match the return type of a gcc2
13926    builtin and then its argument prototype would still apply.  */
13927 char $ac_func ();
13928 char (*f) ();
13929
13930 int
13931 main ()
13932 {
13933 /* The GNU C library defines this for functions which it implements
13934     to always fail with ENOSYS.  Some functions are actually named
13935     something starting with __ and the normal name is an alias.  */
13936 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13937 choke me
13938 #else
13939 f = $ac_func;
13940 #endif
13941
13942   ;
13943   return 0;
13944 }
13945 _ACEOF
13946 rm -f conftest.$ac_objext conftest$ac_exeext
13947 if { (eval echo "$as_me:13947: \"$ac_link\"") >&5
13948   (eval $ac_link) 2>&5
13949   ac_status=$?
13950   echo "$as_me:13950: \$? = $ac_status" >&5
13951   (exit $ac_status); } &&
13952          { ac_try='test -s conftest$ac_exeext'
13953   { (eval echo "$as_me:13953: \"$ac_try\"") >&5
13954   (eval $ac_try) 2>&5
13955   ac_status=$?
13956   echo "$as_me:13956: \$? = $ac_status" >&5
13957   (exit $ac_status); }; }; then
13958   eval "$as_ac_var=yes"
13959 else
13960   echo "$as_me: failed program was:" >&5
13961 cat conftest.$ac_ext >&5
13962 eval "$as_ac_var=no"
13963 fi
13964 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13965 fi
13966 echo "$as_me:13966: result: `eval echo '${'$as_ac_var'}'`" >&5
13967 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13968 if test `eval echo '${'$as_ac_var'}'` = yes; then
13969   cat >>confdefs.h <<EOF
13970 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13971 EOF
13972
13973 fi
13974 done
13975
13976 if test "$with_getcap" = "yes" ; then
13977
13978 echo "$as_me:13978: checking for terminal-capability database functions" >&5
13979 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13980 if test "${cf_cv_cgetent+set}" = set; then
13981   echo $ECHO_N "(cached) $ECHO_C" >&6
13982 else
13983
13984 cat >conftest.$ac_ext <<_ACEOF
13985 #line 13985 "configure"
13986 #include "confdefs.h"
13987
13988 #include <stdlib.h>
13989 int
13990 main ()
13991 {
13992
13993         char temp[128];
13994         char *buf = temp;
13995         char *db_array = temp;
13996         cgetent(&buf, /* int *, */ &db_array, "vt100");
13997         cgetcap(buf, "tc", '=');
13998         cgetmatch(buf, "tc");
13999
14000   ;
14001   return 0;
14002 }
14003 _ACEOF
14004 rm -f conftest.$ac_objext conftest$ac_exeext
14005 if { (eval echo "$as_me:14005: \"$ac_link\"") >&5
14006   (eval $ac_link) 2>&5
14007   ac_status=$?
14008   echo "$as_me:14008: \$? = $ac_status" >&5
14009   (exit $ac_status); } &&
14010          { ac_try='test -s conftest$ac_exeext'
14011   { (eval echo "$as_me:14011: \"$ac_try\"") >&5
14012   (eval $ac_try) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit $ac_status); }; }; then
14016   cf_cv_cgetent=yes
14017 else
14018   echo "$as_me: failed program was:" >&5
14019 cat conftest.$ac_ext >&5
14020 cf_cv_cgetent=no
14021 fi
14022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14023
14024 fi
14025
14026 echo "$as_me:14026: result: $cf_cv_cgetent" >&5
14027 echo "${ECHO_T}$cf_cv_cgetent" >&6
14028 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14029 #define HAVE_BSD_CGETENT 1
14030 EOF
14031
14032 fi
14033
14034 echo "$as_me:14034: checking for isascii" >&5
14035 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14036 if test "${cf_cv_have_isascii+set}" = set; then
14037   echo $ECHO_N "(cached) $ECHO_C" >&6
14038 else
14039
14040         cat >conftest.$ac_ext <<_ACEOF
14041 #line 14041 "configure"
14042 #include "confdefs.h"
14043 #include <ctype.h>
14044 int
14045 main ()
14046 {
14047 int x = isascii(' ')
14048   ;
14049   return 0;
14050 }
14051 _ACEOF
14052 rm -f conftest.$ac_objext conftest$ac_exeext
14053 if { (eval echo "$as_me:14053: \"$ac_link\"") >&5
14054   (eval $ac_link) 2>&5
14055   ac_status=$?
14056   echo "$as_me:14056: \$? = $ac_status" >&5
14057   (exit $ac_status); } &&
14058          { ac_try='test -s conftest$ac_exeext'
14059   { (eval echo "$as_me:14059: \"$ac_try\"") >&5
14060   (eval $ac_try) 2>&5
14061   ac_status=$?
14062   echo "$as_me:14062: \$? = $ac_status" >&5
14063   (exit $ac_status); }; }; then
14064   cf_cv_have_isascii=yes
14065 else
14066   echo "$as_me: failed program was:" >&5
14067 cat conftest.$ac_ext >&5
14068 cf_cv_have_isascii=no
14069 fi
14070 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14071
14072 fi
14073 echo "$as_me:14073: result: $cf_cv_have_isascii" >&5
14074 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14075 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14076 #define HAVE_ISASCII 1
14077 EOF
14078
14079 if test "$ac_cv_func_sigaction" = yes; then
14080 echo "$as_me:14080: checking whether sigaction needs _POSIX_SOURCE" >&5
14081 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14082 cat >conftest.$ac_ext <<_ACEOF
14083 #line 14083 "configure"
14084 #include "confdefs.h"
14085
14086 #include <sys/types.h>
14087 #include <signal.h>
14088 int
14089 main ()
14090 {
14091 struct sigaction act
14092   ;
14093   return 0;
14094 }
14095 _ACEOF
14096 rm -f conftest.$ac_objext
14097 if { (eval echo "$as_me:14097: \"$ac_compile\"") >&5
14098   (eval $ac_compile) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); } &&
14102          { ac_try='test -s conftest.$ac_objext'
14103   { (eval echo "$as_me:14103: \"$ac_try\"") >&5
14104   (eval $ac_try) 2>&5
14105   ac_status=$?
14106   echo "$as_me:14106: \$? = $ac_status" >&5
14107   (exit $ac_status); }; }; then
14108   sigact_bad=no
14109 else
14110   echo "$as_me: failed program was:" >&5
14111 cat conftest.$ac_ext >&5
14112
14113 cat >conftest.$ac_ext <<_ACEOF
14114 #line 14114 "configure"
14115 #include "confdefs.h"
14116
14117 #define _POSIX_SOURCE
14118 #include <sys/types.h>
14119 #include <signal.h>
14120 int
14121 main ()
14122 {
14123 struct sigaction act
14124   ;
14125   return 0;
14126 }
14127 _ACEOF
14128 rm -f conftest.$ac_objext
14129 if { (eval echo "$as_me:14129: \"$ac_compile\"") >&5
14130   (eval $ac_compile) 2>&5
14131   ac_status=$?
14132   echo "$as_me:14132: \$? = $ac_status" >&5
14133   (exit $ac_status); } &&
14134          { ac_try='test -s conftest.$ac_objext'
14135   { (eval echo "$as_me:14135: \"$ac_try\"") >&5
14136   (eval $ac_try) 2>&5
14137   ac_status=$?
14138   echo "$as_me:14138: \$? = $ac_status" >&5
14139   (exit $ac_status); }; }; then
14140   sigact_bad=yes
14141          cat >>confdefs.h <<\EOF
14142 #define SVR4_ACTION 1
14143 EOF
14144
14145 else
14146   echo "$as_me: failed program was:" >&5
14147 cat conftest.$ac_ext >&5
14148 sigact_bad=unknown
14149 fi
14150 rm -f conftest.$ac_objext conftest.$ac_ext
14151 fi
14152 rm -f conftest.$ac_objext conftest.$ac_ext
14153 echo "$as_me:14153: result: $sigact_bad" >&5
14154 echo "${ECHO_T}$sigact_bad" >&6
14155 fi
14156
14157 echo "$as_me:14157: checking if nanosleep really works" >&5
14158 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14159 if test "${cf_cv_func_nanosleep+set}" = set; then
14160   echo $ECHO_N "(cached) $ECHO_C" >&6
14161 else
14162
14163 if test "$cross_compiling" = yes; then
14164   cf_cv_func_nanosleep=unknown
14165 else
14166   cat >conftest.$ac_ext <<_ACEOF
14167 #line 14167 "configure"
14168 #include "confdefs.h"
14169
14170 #include <stdio.h>
14171 #include <errno.h>
14172 #include <time.h>
14173
14174 #ifdef HAVE_SYS_TIME_H
14175 #include <sys/time.h>
14176 #endif
14177
14178 int main() {
14179         struct timespec ts1, ts2;
14180         int code;
14181         ts1.tv_sec  = 0;
14182         ts1.tv_nsec = 750000000;
14183         ts2.tv_sec  = 0;
14184         ts2.tv_nsec = 0;
14185         errno = 0;
14186         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14187         ${cf_cv_main_return:-return}(code != 0);
14188 }
14189
14190 _ACEOF
14191 rm -f conftest$ac_exeext
14192 if { (eval echo "$as_me:14192: \"$ac_link\"") >&5
14193   (eval $ac_link) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14197   { (eval echo "$as_me:14197: \"$ac_try\"") >&5
14198   (eval $ac_try) 2>&5
14199   ac_status=$?
14200   echo "$as_me:14200: \$? = $ac_status" >&5
14201   (exit $ac_status); }; }; then
14202   cf_cv_func_nanosleep=yes
14203 else
14204   echo "$as_me: program exited with status $ac_status" >&5
14205 echo "$as_me: failed program was:" >&5
14206 cat conftest.$ac_ext >&5
14207 cf_cv_func_nanosleep=no
14208 fi
14209 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14210 fi
14211 fi
14212 echo "$as_me:14212: result: $cf_cv_func_nanosleep" >&5
14213 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14214
14215 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14216 #define HAVE_NANOSLEEP 1
14217 EOF
14218
14219 for ac_header in \
14220 termio.h \
14221 termios.h \
14222 unistd.h \
14223
14224 do
14225 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14226 echo "$as_me:14226: checking for $ac_header" >&5
14227 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14228 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14229   echo $ECHO_N "(cached) $ECHO_C" >&6
14230 else
14231   cat >conftest.$ac_ext <<_ACEOF
14232 #line 14232 "configure"
14233 #include "confdefs.h"
14234 #include <$ac_header>
14235 _ACEOF
14236 if { (eval echo "$as_me:14236: \"$ac_cpp conftest.$ac_ext\"") >&5
14237   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14238   ac_status=$?
14239   egrep -v '^ *\+' conftest.er1 >conftest.err
14240   rm -f conftest.er1
14241   cat conftest.err >&5
14242   echo "$as_me:14242: \$? = $ac_status" >&5
14243   (exit $ac_status); } >/dev/null; then
14244   if test -s conftest.err; then
14245     ac_cpp_err=$ac_c_preproc_warn_flag
14246   else
14247     ac_cpp_err=
14248   fi
14249 else
14250   ac_cpp_err=yes
14251 fi
14252 if test -z "$ac_cpp_err"; then
14253   eval "$as_ac_Header=yes"
14254 else
14255   echo "$as_me: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   eval "$as_ac_Header=no"
14258 fi
14259 rm -f conftest.err conftest.$ac_ext
14260 fi
14261 echo "$as_me:14261: result: `eval echo '${'$as_ac_Header'}'`" >&5
14262 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14263 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14264   cat >>confdefs.h <<EOF
14265 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14266 EOF
14267
14268 fi
14269 done
14270
14271 if test "$ISC" = yes ; then
14272
14273 for ac_header in sys/termio.h
14274 do
14275 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14276 echo "$as_me:14276: checking for $ac_header" >&5
14277 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14278 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14279   echo $ECHO_N "(cached) $ECHO_C" >&6
14280 else
14281   cat >conftest.$ac_ext <<_ACEOF
14282 #line 14282 "configure"
14283 #include "confdefs.h"
14284 #include <$ac_header>
14285 _ACEOF
14286 if { (eval echo "$as_me:14286: \"$ac_cpp conftest.$ac_ext\"") >&5
14287   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14288   ac_status=$?
14289   egrep -v '^ *\+' conftest.er1 >conftest.err
14290   rm -f conftest.er1
14291   cat conftest.err >&5
14292   echo "$as_me:14292: \$? = $ac_status" >&5
14293   (exit $ac_status); } >/dev/null; then
14294   if test -s conftest.err; then
14295     ac_cpp_err=$ac_c_preproc_warn_flag
14296   else
14297     ac_cpp_err=
14298   fi
14299 else
14300   ac_cpp_err=yes
14301 fi
14302 if test -z "$ac_cpp_err"; then
14303   eval "$as_ac_Header=yes"
14304 else
14305   echo "$as_me: failed program was:" >&5
14306   cat conftest.$ac_ext >&5
14307   eval "$as_ac_Header=no"
14308 fi
14309 rm -f conftest.err conftest.$ac_ext
14310 fi
14311 echo "$as_me:14311: result: `eval echo '${'$as_ac_Header'}'`" >&5
14312 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14313 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14314   cat >>confdefs.h <<EOF
14315 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14316 EOF
14317
14318 fi
14319 done
14320
14321 fi
14322 if test "$ac_cv_header_termios_h" = yes ; then
14323         case "$CFLAGS $CPPFLAGS" in
14324         *-D_POSIX_SOURCE*)
14325                 termios_bad=dunno ;;
14326         *)      termios_bad=maybe ;;
14327         esac
14328         if test "$termios_bad" = maybe ; then
14329         echo "$as_me:14329: checking whether termios.h needs _POSIX_SOURCE" >&5
14330 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14331         cat >conftest.$ac_ext <<_ACEOF
14332 #line 14332 "configure"
14333 #include "confdefs.h"
14334 #include <termios.h>
14335 int
14336 main ()
14337 {
14338 struct termios foo; int x = foo.c_iflag
14339   ;
14340   return 0;
14341 }
14342 _ACEOF
14343 rm -f conftest.$ac_objext
14344 if { (eval echo "$as_me:14344: \"$ac_compile\"") >&5
14345   (eval $ac_compile) 2>&5
14346   ac_status=$?
14347   echo "$as_me:14347: \$? = $ac_status" >&5
14348   (exit $ac_status); } &&
14349          { ac_try='test -s conftest.$ac_objext'
14350   { (eval echo "$as_me:14350: \"$ac_try\"") >&5
14351   (eval $ac_try) 2>&5
14352   ac_status=$?
14353   echo "$as_me:14353: \$? = $ac_status" >&5
14354   (exit $ac_status); }; }; then
14355   termios_bad=no
14356 else
14357   echo "$as_me: failed program was:" >&5
14358 cat conftest.$ac_ext >&5
14359
14360                 cat >conftest.$ac_ext <<_ACEOF
14361 #line 14361 "configure"
14362 #include "confdefs.h"
14363
14364 #define _POSIX_SOURCE
14365 #include <termios.h>
14366 int
14367 main ()
14368 {
14369 struct termios foo; int x = foo.c_iflag
14370   ;
14371   return 0;
14372 }
14373 _ACEOF
14374 rm -f conftest.$ac_objext
14375 if { (eval echo "$as_me:14375: \"$ac_compile\"") >&5
14376   (eval $ac_compile) 2>&5
14377   ac_status=$?
14378   echo "$as_me:14378: \$? = $ac_status" >&5
14379   (exit $ac_status); } &&
14380          { ac_try='test -s conftest.$ac_objext'
14381   { (eval echo "$as_me:14381: \"$ac_try\"") >&5
14382   (eval $ac_try) 2>&5
14383   ac_status=$?
14384   echo "$as_me:14384: \$? = $ac_status" >&5
14385   (exit $ac_status); }; }; then
14386   termios_bad=unknown
14387 else
14388   echo "$as_me: failed program was:" >&5
14389 cat conftest.$ac_ext >&5
14390 termios_bad=yes cat >>confdefs.h <<\EOF
14391 #define SVR4_TERMIO 1
14392 EOF
14393
14394 fi
14395 rm -f conftest.$ac_objext conftest.$ac_ext
14396
14397 fi
14398 rm -f conftest.$ac_objext conftest.$ac_ext
14399         echo "$as_me:14399: result: $termios_bad" >&5
14400 echo "${ECHO_T}$termios_bad" >&6
14401         fi
14402 fi
14403
14404 echo "$as_me:14404: checking for tcgetattr" >&5
14405 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14406 if test "${cf_cv_have_tcgetattr+set}" = set; then
14407   echo $ECHO_N "(cached) $ECHO_C" >&6
14408 else
14409
14410 cat >conftest.$ac_ext <<_ACEOF
14411 #line 14411 "configure"
14412 #include "confdefs.h"
14413
14414 #include <sys/types.h>
14415 #ifdef HAVE_UNISTD_H
14416 #include <unistd.h>
14417 #endif
14418 #ifdef HAVE_TERMIOS_H
14419 #include <termios.h>
14420 #define TTY struct termios
14421 #else
14422 #ifdef HAVE_TERMIO_H
14423 #include <termio.h>
14424 #define TTY struct termio
14425 #endif
14426 #endif
14427
14428 int
14429 main ()
14430 {
14431
14432 TTY foo;
14433 tcgetattr(1, &foo);
14434   ;
14435   return 0;
14436 }
14437 _ACEOF
14438 rm -f conftest.$ac_objext conftest$ac_exeext
14439 if { (eval echo "$as_me:14439: \"$ac_link\"") >&5
14440   (eval $ac_link) 2>&5
14441   ac_status=$?
14442   echo "$as_me:14442: \$? = $ac_status" >&5
14443   (exit $ac_status); } &&
14444          { ac_try='test -s conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   cf_cv_have_tcgetattr=yes
14451 else
14452   echo "$as_me: failed program was:" >&5
14453 cat conftest.$ac_ext >&5
14454 cf_cv_have_tcgetattr=no
14455 fi
14456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14457 fi
14458 echo "$as_me:14458: result: $cf_cv_have_tcgetattr" >&5
14459 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14460 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14461 #define HAVE_TCGETATTR 1
14462 EOF
14463
14464 echo "$as_me:14464: checking for vsscanf function or workaround" >&5
14465 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14466 if test "${cf_cv_func_vsscanf+set}" = set; then
14467   echo $ECHO_N "(cached) $ECHO_C" >&6
14468 else
14469
14470 cat >conftest.$ac_ext <<_ACEOF
14471 #line 14471 "configure"
14472 #include "confdefs.h"
14473
14474 #include <stdarg.h>
14475 #include <stdio.h>
14476 int
14477 main ()
14478 {
14479
14480         va_list ap;
14481         vsscanf("from", "%d", ap)
14482   ;
14483   return 0;
14484 }
14485 _ACEOF
14486 rm -f conftest.$ac_objext conftest$ac_exeext
14487 if { (eval echo "$as_me:14487: \"$ac_link\"") >&5
14488   (eval $ac_link) 2>&5
14489   ac_status=$?
14490   echo "$as_me:14490: \$? = $ac_status" >&5
14491   (exit $ac_status); } &&
14492          { ac_try='test -s conftest$ac_exeext'
14493   { (eval echo "$as_me:14493: \"$ac_try\"") >&5
14494   (eval $ac_try) 2>&5
14495   ac_status=$?
14496   echo "$as_me:14496: \$? = $ac_status" >&5
14497   (exit $ac_status); }; }; then
14498   cf_cv_func_vsscanf=vsscanf
14499 else
14500   echo "$as_me: failed program was:" >&5
14501 cat conftest.$ac_ext >&5
14502
14503 cat >conftest.$ac_ext <<_ACEOF
14504 #line 14504 "configure"
14505 #include "confdefs.h"
14506
14507 #include <stdarg.h>
14508 #include <stdio.h>
14509 int
14510 main ()
14511 {
14512
14513     FILE strbuf;
14514     char *str = "from";
14515
14516     strbuf._flag = _IOREAD;
14517     strbuf._ptr = strbuf._base = (unsigned char *) str;
14518     strbuf._cnt = strlen(str);
14519     strbuf._file = _NFILE;
14520     return (vfscanf(&strbuf, "%d", ap))
14521   ;
14522   return 0;
14523 }
14524 _ACEOF
14525 rm -f conftest.$ac_objext conftest$ac_exeext
14526 if { (eval echo "$as_me:14526: \"$ac_link\"") >&5
14527   (eval $ac_link) 2>&5
14528   ac_status=$?
14529   echo "$as_me:14529: \$? = $ac_status" >&5
14530   (exit $ac_status); } &&
14531          { ac_try='test -s conftest$ac_exeext'
14532   { (eval echo "$as_me:14532: \"$ac_try\"") >&5
14533   (eval $ac_try) 2>&5
14534   ac_status=$?
14535   echo "$as_me:14535: \$? = $ac_status" >&5
14536   (exit $ac_status); }; }; then
14537   cf_cv_func_vsscanf=vfscanf
14538 else
14539   echo "$as_me: failed program was:" >&5
14540 cat conftest.$ac_ext >&5
14541
14542 cat >conftest.$ac_ext <<_ACEOF
14543 #line 14543 "configure"
14544 #include "confdefs.h"
14545
14546 #include <stdarg.h>
14547 #include <stdio.h>
14548 int
14549 main ()
14550 {
14551
14552     FILE strbuf;
14553     char *str = "from";
14554
14555     strbuf._flag = _IOREAD;
14556     strbuf._ptr = strbuf._base = (unsigned char *) str;
14557     strbuf._cnt = strlen(str);
14558     strbuf._file = _NFILE;
14559     return (_doscan(&strbuf, "%d", ap))
14560   ;
14561   return 0;
14562 }
14563 _ACEOF
14564 rm -f conftest.$ac_objext conftest$ac_exeext
14565 if { (eval echo "$as_me:14565: \"$ac_link\"") >&5
14566   (eval $ac_link) 2>&5
14567   ac_status=$?
14568   echo "$as_me:14568: \$? = $ac_status" >&5
14569   (exit $ac_status); } &&
14570          { ac_try='test -s conftest$ac_exeext'
14571   { (eval echo "$as_me:14571: \"$ac_try\"") >&5
14572   (eval $ac_try) 2>&5
14573   ac_status=$?
14574   echo "$as_me:14574: \$? = $ac_status" >&5
14575   (exit $ac_status); }; }; then
14576   cf_cv_func_vsscanf=_doscan
14577 else
14578   echo "$as_me: failed program was:" >&5
14579 cat conftest.$ac_ext >&5
14580
14581 cf_cv_func_vsscanf=no
14582 fi
14583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14584 fi
14585 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14586 fi
14587 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14588 fi
14589 echo "$as_me:14589: result: $cf_cv_func_vsscanf" >&5
14590 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14591
14592 case $cf_cv_func_vsscanf in #(vi
14593 vsscanf) cat >>confdefs.h <<\EOF
14594 #define HAVE_VSSCANF 1
14595 EOF
14596 ;; #(vi
14597 vfscanf) cat >>confdefs.h <<\EOF
14598 #define HAVE_VFSCANF 1
14599 EOF
14600 ;; #(vi
14601 _doscan) cat >>confdefs.h <<\EOF
14602 #define HAVE__DOSCAN 1
14603 EOF
14604 ;;
14605 esac
14606
14607 echo "$as_me:14607: checking for working mkstemp" >&5
14608 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14609 if test "${cf_cv_func_mkstemp+set}" = set; then
14610   echo $ECHO_N "(cached) $ECHO_C" >&6
14611 else
14612
14613 rm -f conftest*
14614 if test "$cross_compiling" = yes; then
14615   echo "$as_me:14615: checking for mkstemp" >&5
14616 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14617 if test "${ac_cv_func_mkstemp+set}" = set; then
14618   echo $ECHO_N "(cached) $ECHO_C" >&6
14619 else
14620   cat >conftest.$ac_ext <<_ACEOF
14621 #line 14621 "configure"
14622 #include "confdefs.h"
14623 /* System header to define __stub macros and hopefully few prototypes,
14624     which can conflict with char mkstemp (); below.  */
14625 #include <assert.h>
14626 /* Override any gcc2 internal prototype to avoid an error.  */
14627 #ifdef __cplusplus
14628 extern "C"
14629 #endif
14630 /* We use char because int might match the return type of a gcc2
14631    builtin and then its argument prototype would still apply.  */
14632 char mkstemp ();
14633 char (*f) ();
14634
14635 int
14636 main ()
14637 {
14638 /* The GNU C library defines this for functions which it implements
14639     to always fail with ENOSYS.  Some functions are actually named
14640     something starting with __ and the normal name is an alias.  */
14641 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14642 choke me
14643 #else
14644 f = mkstemp;
14645 #endif
14646
14647   ;
14648   return 0;
14649 }
14650 _ACEOF
14651 rm -f conftest.$ac_objext conftest$ac_exeext
14652 if { (eval echo "$as_me:14652: \"$ac_link\"") >&5
14653   (eval $ac_link) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit $ac_status); } &&
14657          { ac_try='test -s conftest$ac_exeext'
14658   { (eval echo "$as_me:14658: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit $ac_status); }; }; then
14663   ac_cv_func_mkstemp=yes
14664 else
14665   echo "$as_me: failed program was:" >&5
14666 cat conftest.$ac_ext >&5
14667 ac_cv_func_mkstemp=no
14668 fi
14669 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14670 fi
14671 echo "$as_me:14671: result: $ac_cv_func_mkstemp" >&5
14672 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14673
14674 else
14675   cat >conftest.$ac_ext <<_ACEOF
14676 #line 14676 "configure"
14677 #include "confdefs.h"
14678
14679 #include <sys/types.h>
14680 #include <stdlib.h>
14681 #include <stdio.h>
14682 #include <string.h>
14683 #include <sys/stat.h>
14684 int main()
14685 {
14686         char *tmpl = "conftestXXXXXX";
14687         char name[2][80];
14688         int n;
14689         int result = 0;
14690         int fd;
14691         struct stat sb;
14692
14693         umask(077);
14694         for (n = 0; n < 2; ++n) {
14695                 strcpy(name[n], tmpl);
14696                 if ((fd = mkstemp(name[n])) >= 0) {
14697                         if (!strcmp(name[n], tmpl)
14698                          || stat(name[n], &sb) != 0
14699                          || (sb.st_mode & S_IFMT) != S_IFREG
14700                          || (sb.st_mode & 077) != 0) {
14701                                 result = 1;
14702                         }
14703                         close(fd);
14704                 }
14705         }
14706         if (result == 0
14707          && !strcmp(name[0], name[1]))
14708                 result = 1;
14709         ${cf_cv_main_return:-return}(result);
14710 }
14711
14712 _ACEOF
14713 rm -f conftest$ac_exeext
14714 if { (eval echo "$as_me:14714: \"$ac_link\"") >&5
14715   (eval $ac_link) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14719   { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit $ac_status); }; }; then
14724   cf_cv_func_mkstemp=yes
14725
14726 else
14727   echo "$as_me: program exited with status $ac_status" >&5
14728 echo "$as_me: failed program was:" >&5
14729 cat conftest.$ac_ext >&5
14730 cf_cv_func_mkstemp=no
14731
14732 fi
14733 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14734 fi
14735
14736 fi
14737 echo "$as_me:14737: result: $cf_cv_func_mkstemp" >&5
14738 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14739 if test "$cf_cv_func_mkstemp" = yes ; then
14740         cat >>confdefs.h <<\EOF
14741 #define HAVE_MKSTEMP 1
14742 EOF
14743
14744 fi
14745
14746 # setup for prototype of fallback for vsscanf()
14747
14748 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14749         HAVE_VSSCANF=1
14750 else
14751         HAVE_VSSCANF=0
14752 fi
14753
14754 if test "$cross_compiling" = yes ; then
14755         { echo "$as_me:14755: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14756 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14757 else
14758         echo "$as_me:14758: checking whether setvbuf arguments are reversed" >&5
14759 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14760 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14761   echo $ECHO_N "(cached) $ECHO_C" >&6
14762 else
14763   if test "$cross_compiling" = yes; then
14764   { { echo "$as_me:14764: error: cannot run test program while cross compiling" >&5
14765 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14766    { (exit 1); exit 1; }; }
14767 else
14768   cat >conftest.$ac_ext <<_ACEOF
14769 #line 14769 "configure"
14770 #include "confdefs.h"
14771 #include <stdio.h>
14772 /* If setvbuf has the reversed format, exit 0. */
14773 int
14774 main ()
14775 {
14776   /* This call has the arguments reversed.
14777      A reversed system may check and see that the address of main
14778      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14779   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14780     $ac_main_return(1);
14781   putc('\r', stdout);
14782   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14783 }
14784 _ACEOF
14785 rm -f conftest$ac_exeext
14786 if { (eval echo "$as_me:14786: \"$ac_link\"") >&5
14787   (eval $ac_link) 2>&5
14788   ac_status=$?
14789   echo "$as_me:14789: \$? = $ac_status" >&5
14790   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14791   { (eval echo "$as_me:14791: \"$ac_try\"") >&5
14792   (eval $ac_try) 2>&5
14793   ac_status=$?
14794   echo "$as_me:14794: \$? = $ac_status" >&5
14795   (exit $ac_status); }; }; then
14796   ac_cv_func_setvbuf_reversed=yes
14797 else
14798   echo "$as_me: program exited with status $ac_status" >&5
14799 echo "$as_me: failed program was:" >&5
14800 cat conftest.$ac_ext >&5
14801 ac_cv_func_setvbuf_reversed=no
14802 fi
14803 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14804 fi
14805 rm -f core core.* *.core
14806 fi
14807 echo "$as_me:14807: result: $ac_cv_func_setvbuf_reversed" >&5
14808 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14809 if test $ac_cv_func_setvbuf_reversed = yes; then
14810
14811 cat >>confdefs.h <<\EOF
14812 #define SETVBUF_REVERSED 1
14813 EOF
14814
14815 fi
14816
14817 fi
14818 echo "$as_me:14818: checking return type of signal handlers" >&5
14819 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14820 if test "${ac_cv_type_signal+set}" = set; then
14821   echo $ECHO_N "(cached) $ECHO_C" >&6
14822 else
14823   cat >conftest.$ac_ext <<_ACEOF
14824 #line 14824 "configure"
14825 #include "confdefs.h"
14826 #include <sys/types.h>
14827 #include <signal.h>
14828 #ifdef signal
14829 # undef signal
14830 #endif
14831 #ifdef __cplusplus
14832 extern "C" void (*signal (int, void (*)(int)))(int);
14833 #else
14834 void (*signal ()) ();
14835 #endif
14836
14837 int
14838 main ()
14839 {
14840 int i;
14841   ;
14842   return 0;
14843 }
14844 _ACEOF
14845 rm -f conftest.$ac_objext
14846 if { (eval echo "$as_me:14846: \"$ac_compile\"") >&5
14847   (eval $ac_compile) 2>&5
14848   ac_status=$?
14849   echo "$as_me:14849: \$? = $ac_status" >&5
14850   (exit $ac_status); } &&
14851          { ac_try='test -s conftest.$ac_objext'
14852   { (eval echo "$as_me:14852: \"$ac_try\"") >&5
14853   (eval $ac_try) 2>&5
14854   ac_status=$?
14855   echo "$as_me:14855: \$? = $ac_status" >&5
14856   (exit $ac_status); }; }; then
14857   ac_cv_type_signal=void
14858 else
14859   echo "$as_me: failed program was:" >&5
14860 cat conftest.$ac_ext >&5
14861 ac_cv_type_signal=int
14862 fi
14863 rm -f conftest.$ac_objext conftest.$ac_ext
14864 fi
14865 echo "$as_me:14865: result: $ac_cv_type_signal" >&5
14866 echo "${ECHO_T}$ac_cv_type_signal" >&6
14867
14868 cat >>confdefs.h <<EOF
14869 #define RETSIGTYPE $ac_cv_type_signal
14870 EOF
14871
14872 echo "$as_me:14872: checking for type sigaction_t" >&5
14873 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14874 if test "${cf_cv_type_sigaction+set}" = set; then
14875   echo $ECHO_N "(cached) $ECHO_C" >&6
14876 else
14877
14878         cat >conftest.$ac_ext <<_ACEOF
14879 #line 14879 "configure"
14880 #include "confdefs.h"
14881
14882 #include <signal.h>
14883 int
14884 main ()
14885 {
14886 sigaction_t x
14887   ;
14888   return 0;
14889 }
14890 _ACEOF
14891 rm -f conftest.$ac_objext
14892 if { (eval echo "$as_me:14892: \"$ac_compile\"") >&5
14893   (eval $ac_compile) 2>&5
14894   ac_status=$?
14895   echo "$as_me:14895: \$? = $ac_status" >&5
14896   (exit $ac_status); } &&
14897          { ac_try='test -s conftest.$ac_objext'
14898   { (eval echo "$as_me:14898: \"$ac_try\"") >&5
14899   (eval $ac_try) 2>&5
14900   ac_status=$?
14901   echo "$as_me:14901: \$? = $ac_status" >&5
14902   (exit $ac_status); }; }; then
14903   cf_cv_type_sigaction=yes
14904 else
14905   echo "$as_me: failed program was:" >&5
14906 cat conftest.$ac_ext >&5
14907 cf_cv_type_sigaction=no
14908 fi
14909 rm -f conftest.$ac_objext conftest.$ac_ext
14910 fi
14911
14912 echo "$as_me:14912: result: $cf_cv_type_sigaction" >&5
14913 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14914 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14915 #define HAVE_TYPE_SIGACTION 1
14916 EOF
14917
14918 echo "$as_me:14918: checking declaration of size-change" >&5
14919 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14920 if test "${cf_cv_sizechange+set}" = set; then
14921   echo $ECHO_N "(cached) $ECHO_C" >&6
14922 else
14923
14924     cf_cv_sizechange=unknown
14925     cf_save_CPPFLAGS="$CPPFLAGS"
14926
14927 for cf_opts in "" "NEED_PTEM_H"
14928 do
14929
14930     CPPFLAGS="$cf_save_CPPFLAGS"
14931     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14932     cat >conftest.$ac_ext <<_ACEOF
14933 #line 14933 "configure"
14934 #include "confdefs.h"
14935 #include <sys/types.h>
14936 #ifdef HAVE_TERMIOS_H
14937 #include <termios.h>
14938 #else
14939 #ifdef HAVE_TERMIO_H
14940 #include <termio.h>
14941 #endif
14942 #endif
14943 #ifdef NEED_PTEM_H
14944 /* This is a workaround for SCO:  they neglected to define struct winsize in
14945  * termios.h -- it's only in termio.h and ptem.h
14946  */
14947 #include        <sys/stream.h>
14948 #include        <sys/ptem.h>
14949 #endif
14950 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14951 #include <sys/ioctl.h>
14952 #endif
14953
14954 int
14955 main ()
14956 {
14957
14958 #ifdef TIOCGSIZE
14959         struct ttysize win;     /* FIXME: what system is this? */
14960         int y = win.ts_lines;
14961         int x = win.ts_cols;
14962 #else
14963 #ifdef TIOCGWINSZ
14964         struct winsize win;
14965         int y = win.ws_row;
14966         int x = win.ws_col;
14967 #else
14968         no TIOCGSIZE or TIOCGWINSZ
14969 #endif /* TIOCGWINSZ */
14970 #endif /* TIOCGSIZE */
14971
14972   ;
14973   return 0;
14974 }
14975 _ACEOF
14976 rm -f conftest.$ac_objext
14977 if { (eval echo "$as_me:14977: \"$ac_compile\"") >&5
14978   (eval $ac_compile) 2>&5
14979   ac_status=$?
14980   echo "$as_me:14980: \$? = $ac_status" >&5
14981   (exit $ac_status); } &&
14982          { ac_try='test -s conftest.$ac_objext'
14983   { (eval echo "$as_me:14983: \"$ac_try\"") >&5
14984   (eval $ac_try) 2>&5
14985   ac_status=$?
14986   echo "$as_me:14986: \$? = $ac_status" >&5
14987   (exit $ac_status); }; }; then
14988   cf_cv_sizechange=yes
14989 else
14990   echo "$as_me: failed program was:" >&5
14991 cat conftest.$ac_ext >&5
14992 cf_cv_sizechange=no
14993 fi
14994 rm -f conftest.$ac_objext conftest.$ac_ext
14995
14996         CPPFLAGS="$cf_save_CPPFLAGS"
14997         if test "$cf_cv_sizechange" = yes ; then
14998                 echo "size-change succeeded ($cf_opts)" >&5
14999                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15000                 break
15001         fi
15002 done
15003
15004 fi
15005 echo "$as_me:15005: result: $cf_cv_sizechange" >&5
15006 echo "${ECHO_T}$cf_cv_sizechange" >&6
15007 if test "$cf_cv_sizechange" != no ; then
15008         cat >>confdefs.h <<\EOF
15009 #define HAVE_SIZECHANGE 1
15010 EOF
15011
15012         case $cf_cv_sizechange in #(vi
15013         NEED*)
15014                 cat >>confdefs.h <<EOF
15015 #define $cf_cv_sizechange  1
15016 EOF
15017
15018                 ;;
15019         esac
15020 fi
15021
15022 echo "$as_me:15022: checking for memmove" >&5
15023 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15024 if test "${ac_cv_func_memmove+set}" = set; then
15025   echo $ECHO_N "(cached) $ECHO_C" >&6
15026 else
15027   cat >conftest.$ac_ext <<_ACEOF
15028 #line 15028 "configure"
15029 #include "confdefs.h"
15030 /* System header to define __stub macros and hopefully few prototypes,
15031     which can conflict with char memmove (); below.  */
15032 #include <assert.h>
15033 /* Override any gcc2 internal prototype to avoid an error.  */
15034 #ifdef __cplusplus
15035 extern "C"
15036 #endif
15037 /* We use char because int might match the return type of a gcc2
15038    builtin and then its argument prototype would still apply.  */
15039 char memmove ();
15040 char (*f) ();
15041
15042 int
15043 main ()
15044 {
15045 /* The GNU C library defines this for functions which it implements
15046     to always fail with ENOSYS.  Some functions are actually named
15047     something starting with __ and the normal name is an alias.  */
15048 #if defined (__stub_memmove) || defined (__stub___memmove)
15049 choke me
15050 #else
15051 f = memmove;
15052 #endif
15053
15054   ;
15055   return 0;
15056 }
15057 _ACEOF
15058 rm -f conftest.$ac_objext conftest$ac_exeext
15059 if { (eval echo "$as_me:15059: \"$ac_link\"") >&5
15060   (eval $ac_link) 2>&5
15061   ac_status=$?
15062   echo "$as_me:15062: \$? = $ac_status" >&5
15063   (exit $ac_status); } &&
15064          { ac_try='test -s conftest$ac_exeext'
15065   { (eval echo "$as_me:15065: \"$ac_try\"") >&5
15066   (eval $ac_try) 2>&5
15067   ac_status=$?
15068   echo "$as_me:15068: \$? = $ac_status" >&5
15069   (exit $ac_status); }; }; then
15070   ac_cv_func_memmove=yes
15071 else
15072   echo "$as_me: failed program was:" >&5
15073 cat conftest.$ac_ext >&5
15074 ac_cv_func_memmove=no
15075 fi
15076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15077 fi
15078 echo "$as_me:15078: result: $ac_cv_func_memmove" >&5
15079 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15080 if test $ac_cv_func_memmove = yes; then
15081   :
15082 else
15083
15084 echo "$as_me:15084: checking for bcopy" >&5
15085 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15086 if test "${ac_cv_func_bcopy+set}" = set; then
15087   echo $ECHO_N "(cached) $ECHO_C" >&6
15088 else
15089   cat >conftest.$ac_ext <<_ACEOF
15090 #line 15090 "configure"
15091 #include "confdefs.h"
15092 /* System header to define __stub macros and hopefully few prototypes,
15093     which can conflict with char bcopy (); below.  */
15094 #include <assert.h>
15095 /* Override any gcc2 internal prototype to avoid an error.  */
15096 #ifdef __cplusplus
15097 extern "C"
15098 #endif
15099 /* We use char because int might match the return type of a gcc2
15100    builtin and then its argument prototype would still apply.  */
15101 char bcopy ();
15102 char (*f) ();
15103
15104 int
15105 main ()
15106 {
15107 /* The GNU C library defines this for functions which it implements
15108     to always fail with ENOSYS.  Some functions are actually named
15109     something starting with __ and the normal name is an alias.  */
15110 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15111 choke me
15112 #else
15113 f = bcopy;
15114 #endif
15115
15116   ;
15117   return 0;
15118 }
15119 _ACEOF
15120 rm -f conftest.$ac_objext conftest$ac_exeext
15121 if { (eval echo "$as_me:15121: \"$ac_link\"") >&5
15122   (eval $ac_link) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); } &&
15126          { ac_try='test -s conftest$ac_exeext'
15127   { (eval echo "$as_me:15127: \"$ac_try\"") >&5
15128   (eval $ac_try) 2>&5
15129   ac_status=$?
15130   echo "$as_me:15130: \$? = $ac_status" >&5
15131   (exit $ac_status); }; }; then
15132   ac_cv_func_bcopy=yes
15133 else
15134   echo "$as_me: failed program was:" >&5
15135 cat conftest.$ac_ext >&5
15136 ac_cv_func_bcopy=no
15137 fi
15138 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15139 fi
15140 echo "$as_me:15140: result: $ac_cv_func_bcopy" >&5
15141 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15142 if test $ac_cv_func_bcopy = yes; then
15143
15144         echo "$as_me:15144: checking if bcopy does overlapping moves" >&5
15145 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15146 if test "${cf_cv_good_bcopy+set}" = set; then
15147   echo $ECHO_N "(cached) $ECHO_C" >&6
15148 else
15149
15150                 if test "$cross_compiling" = yes; then
15151   cf_cv_good_bcopy=unknown
15152 else
15153   cat >conftest.$ac_ext <<_ACEOF
15154 #line 15154 "configure"
15155 #include "confdefs.h"
15156
15157 int main() {
15158         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15159         char temp[40];
15160         bcopy(data, temp, sizeof(data));
15161         bcopy(temp+10, temp, 15);
15162         bcopy(temp+5, temp+15, 10);
15163         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15164 }
15165
15166 _ACEOF
15167 rm -f conftest$ac_exeext
15168 if { (eval echo "$as_me:15168: \"$ac_link\"") >&5
15169   (eval $ac_link) 2>&5
15170   ac_status=$?
15171   echo "$as_me:15171: \$? = $ac_status" >&5
15172   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15173   { (eval echo "$as_me:15173: \"$ac_try\"") >&5
15174   (eval $ac_try) 2>&5
15175   ac_status=$?
15176   echo "$as_me:15176: \$? = $ac_status" >&5
15177   (exit $ac_status); }; }; then
15178   cf_cv_good_bcopy=yes
15179 else
15180   echo "$as_me: program exited with status $ac_status" >&5
15181 echo "$as_me: failed program was:" >&5
15182 cat conftest.$ac_ext >&5
15183 cf_cv_good_bcopy=no
15184 fi
15185 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15186 fi
15187
15188 fi
15189 echo "$as_me:15189: result: $cf_cv_good_bcopy" >&5
15190 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15191
15192 else
15193   cf_cv_good_bcopy=no
15194 fi
15195
15196         if test "$cf_cv_good_bcopy" = yes ; then
15197                 cat >>confdefs.h <<\EOF
15198 #define USE_OK_BCOPY 1
15199 EOF
15200
15201         else
15202                 cat >>confdefs.h <<\EOF
15203 #define USE_MY_MEMMOVE 1
15204 EOF
15205
15206         fi
15207
15208 fi
15209
15210 echo "$as_me:15210: checking if poll really works" >&5
15211 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15212 if test "${cf_cv_working_poll+set}" = set; then
15213   echo $ECHO_N "(cached) $ECHO_C" >&6
15214 else
15215
15216 if test "$cross_compiling" = yes; then
15217   cf_cv_working_poll=unknown
15218 else
15219   cat >conftest.$ac_ext <<_ACEOF
15220 #line 15220 "configure"
15221 #include "confdefs.h"
15222
15223 #include <stdio.h>
15224 #ifdef HAVE_POLL_H
15225 #include <poll.h>
15226 #else
15227 #include <sys/poll.h>
15228 #endif
15229 int main() {
15230         struct pollfd myfds;
15231         int ret;
15232
15233         myfds.fd = 0;
15234         myfds.events = POLLIN;
15235
15236         ret = poll(&myfds, 1, 100);
15237         ${cf_cv_main_return:-return}(ret != 0);
15238 }
15239 _ACEOF
15240 rm -f conftest$ac_exeext
15241 if { (eval echo "$as_me:15241: \"$ac_link\"") >&5
15242   (eval $ac_link) 2>&5
15243   ac_status=$?
15244   echo "$as_me:15244: \$? = $ac_status" >&5
15245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15246   { (eval echo "$as_me:15246: \"$ac_try\"") >&5
15247   (eval $ac_try) 2>&5
15248   ac_status=$?
15249   echo "$as_me:15249: \$? = $ac_status" >&5
15250   (exit $ac_status); }; }; then
15251   cf_cv_working_poll=yes
15252 else
15253   echo "$as_me: program exited with status $ac_status" >&5
15254 echo "$as_me: failed program was:" >&5
15255 cat conftest.$ac_ext >&5
15256 cf_cv_working_poll=no
15257 fi
15258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15259 fi
15260 fi
15261 echo "$as_me:15261: result: $cf_cv_working_poll" >&5
15262 echo "${ECHO_T}$cf_cv_working_poll" >&6
15263 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15264 #define HAVE_WORKING_POLL 1
15265 EOF
15266
15267 echo "$as_me:15267: checking for va_copy" >&5
15268 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15269 if test "${cf_cv_have_va_copy+set}" = set; then
15270   echo $ECHO_N "(cached) $ECHO_C" >&6
15271 else
15272
15273 cat >conftest.$ac_ext <<_ACEOF
15274 #line 15274 "configure"
15275 #include "confdefs.h"
15276
15277 #include <stdarg.h>
15278
15279 int
15280 main ()
15281 {
15282
15283         static va_list dst;
15284         static va_list src;
15285         va_copy(dst, src)
15286   ;
15287   return 0;
15288 }
15289 _ACEOF
15290 rm -f conftest.$ac_objext conftest$ac_exeext
15291 if { (eval echo "$as_me:15291: \"$ac_link\"") >&5
15292   (eval $ac_link) 2>&5
15293   ac_status=$?
15294   echo "$as_me:15294: \$? = $ac_status" >&5
15295   (exit $ac_status); } &&
15296          { ac_try='test -s conftest$ac_exeext'
15297   { (eval echo "$as_me:15297: \"$ac_try\"") >&5
15298   (eval $ac_try) 2>&5
15299   ac_status=$?
15300   echo "$as_me:15300: \$? = $ac_status" >&5
15301   (exit $ac_status); }; }; then
15302   cf_cv_have_va_copy=yes
15303 else
15304   echo "$as_me: failed program was:" >&5
15305 cat conftest.$ac_ext >&5
15306 cf_cv_have_va_copy=no
15307 fi
15308 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15309 fi
15310 echo "$as_me:15310: result: $cf_cv_have_va_copy" >&5
15311 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15312
15313 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15314 #define HAVE_VA_COPY 1
15315 EOF
15316
15317 echo "$as_me:15317: checking for __va_copy" >&5
15318 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15319 if test "${cf_cv_have___va_copy+set}" = set; then
15320   echo $ECHO_N "(cached) $ECHO_C" >&6
15321 else
15322
15323 cat >conftest.$ac_ext <<_ACEOF
15324 #line 15324 "configure"
15325 #include "confdefs.h"
15326
15327 #include <stdarg.h>
15328
15329 int
15330 main ()
15331 {
15332
15333         static va_list dst;
15334         static va_list src;
15335         __va_copy(dst, src)
15336   ;
15337   return 0;
15338 }
15339 _ACEOF
15340 rm -f conftest.$ac_objext conftest$ac_exeext
15341 if { (eval echo "$as_me:15341: \"$ac_link\"") >&5
15342   (eval $ac_link) 2>&5
15343   ac_status=$?
15344   echo "$as_me:15344: \$? = $ac_status" >&5
15345   (exit $ac_status); } &&
15346          { ac_try='test -s conftest$ac_exeext'
15347   { (eval echo "$as_me:15347: \"$ac_try\"") >&5
15348   (eval $ac_try) 2>&5
15349   ac_status=$?
15350   echo "$as_me:15350: \$? = $ac_status" >&5
15351   (exit $ac_status); }; }; then
15352   cf_cv_have___va_copy=yes
15353 else
15354   echo "$as_me: failed program was:" >&5
15355 cat conftest.$ac_ext >&5
15356 cf_cv_have___va_copy=no
15357 fi
15358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15359 fi
15360 echo "$as_me:15360: result: $cf_cv_have___va_copy" >&5
15361 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15362
15363 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15364 #define HAVE___VA_COPY 1
15365 EOF
15366
15367 echo "$as_me:15367: checking for pid_t" >&5
15368 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15369 if test "${ac_cv_type_pid_t+set}" = set; then
15370   echo $ECHO_N "(cached) $ECHO_C" >&6
15371 else
15372   cat >conftest.$ac_ext <<_ACEOF
15373 #line 15373 "configure"
15374 #include "confdefs.h"
15375 $ac_includes_default
15376 int
15377 main ()
15378 {
15379 if ((pid_t *) 0)
15380   return 0;
15381 if (sizeof (pid_t))
15382   return 0;
15383   ;
15384   return 0;
15385 }
15386 _ACEOF
15387 rm -f conftest.$ac_objext
15388 if { (eval echo "$as_me:15388: \"$ac_compile\"") >&5
15389   (eval $ac_compile) 2>&5
15390   ac_status=$?
15391   echo "$as_me:15391: \$? = $ac_status" >&5
15392   (exit $ac_status); } &&
15393          { ac_try='test -s conftest.$ac_objext'
15394   { (eval echo "$as_me:15394: \"$ac_try\"") >&5
15395   (eval $ac_try) 2>&5
15396   ac_status=$?
15397   echo "$as_me:15397: \$? = $ac_status" >&5
15398   (exit $ac_status); }; }; then
15399   ac_cv_type_pid_t=yes
15400 else
15401   echo "$as_me: failed program was:" >&5
15402 cat conftest.$ac_ext >&5
15403 ac_cv_type_pid_t=no
15404 fi
15405 rm -f conftest.$ac_objext conftest.$ac_ext
15406 fi
15407 echo "$as_me:15407: result: $ac_cv_type_pid_t" >&5
15408 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15409 if test $ac_cv_type_pid_t = yes; then
15410   :
15411 else
15412
15413 cat >>confdefs.h <<EOF
15414 #define pid_t int
15415 EOF
15416
15417 fi
15418
15419 for ac_header in unistd.h vfork.h
15420 do
15421 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15422 echo "$as_me:15422: checking for $ac_header" >&5
15423 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15424 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15425   echo $ECHO_N "(cached) $ECHO_C" >&6
15426 else
15427   cat >conftest.$ac_ext <<_ACEOF
15428 #line 15428 "configure"
15429 #include "confdefs.h"
15430 #include <$ac_header>
15431 _ACEOF
15432 if { (eval echo "$as_me:15432: \"$ac_cpp conftest.$ac_ext\"") >&5
15433   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15434   ac_status=$?
15435   egrep -v '^ *\+' conftest.er1 >conftest.err
15436   rm -f conftest.er1
15437   cat conftest.err >&5
15438   echo "$as_me:15438: \$? = $ac_status" >&5
15439   (exit $ac_status); } >/dev/null; then
15440   if test -s conftest.err; then
15441     ac_cpp_err=$ac_c_preproc_warn_flag
15442   else
15443     ac_cpp_err=
15444   fi
15445 else
15446   ac_cpp_err=yes
15447 fi
15448 if test -z "$ac_cpp_err"; then
15449   eval "$as_ac_Header=yes"
15450 else
15451   echo "$as_me: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453   eval "$as_ac_Header=no"
15454 fi
15455 rm -f conftest.err conftest.$ac_ext
15456 fi
15457 echo "$as_me:15457: result: `eval echo '${'$as_ac_Header'}'`" >&5
15458 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15459 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15460   cat >>confdefs.h <<EOF
15461 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15462 EOF
15463
15464 fi
15465 done
15466
15467 for ac_func in fork vfork
15468 do
15469 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15470 echo "$as_me:15470: checking for $ac_func" >&5
15471 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15472 if eval "test \"\${$as_ac_var+set}\" = set"; then
15473   echo $ECHO_N "(cached) $ECHO_C" >&6
15474 else
15475   cat >conftest.$ac_ext <<_ACEOF
15476 #line 15476 "configure"
15477 #include "confdefs.h"
15478 /* System header to define __stub macros and hopefully few prototypes,
15479     which can conflict with char $ac_func (); below.  */
15480 #include <assert.h>
15481 /* Override any gcc2 internal prototype to avoid an error.  */
15482 #ifdef __cplusplus
15483 extern "C"
15484 #endif
15485 /* We use char because int might match the return type of a gcc2
15486    builtin and then its argument prototype would still apply.  */
15487 char $ac_func ();
15488 char (*f) ();
15489
15490 int
15491 main ()
15492 {
15493 /* The GNU C library defines this for functions which it implements
15494     to always fail with ENOSYS.  Some functions are actually named
15495     something starting with __ and the normal name is an alias.  */
15496 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15497 choke me
15498 #else
15499 f = $ac_func;
15500 #endif
15501
15502   ;
15503   return 0;
15504 }
15505 _ACEOF
15506 rm -f conftest.$ac_objext conftest$ac_exeext
15507 if { (eval echo "$as_me:15507: \"$ac_link\"") >&5
15508   (eval $ac_link) 2>&5
15509   ac_status=$?
15510   echo "$as_me:15510: \$? = $ac_status" >&5
15511   (exit $ac_status); } &&
15512          { ac_try='test -s conftest$ac_exeext'
15513   { (eval echo "$as_me:15513: \"$ac_try\"") >&5
15514   (eval $ac_try) 2>&5
15515   ac_status=$?
15516   echo "$as_me:15516: \$? = $ac_status" >&5
15517   (exit $ac_status); }; }; then
15518   eval "$as_ac_var=yes"
15519 else
15520   echo "$as_me: failed program was:" >&5
15521 cat conftest.$ac_ext >&5
15522 eval "$as_ac_var=no"
15523 fi
15524 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15525 fi
15526 echo "$as_me:15526: result: `eval echo '${'$as_ac_var'}'`" >&5
15527 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15528 if test `eval echo '${'$as_ac_var'}'` = yes; then
15529   cat >>confdefs.h <<EOF
15530 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15531 EOF
15532
15533 fi
15534 done
15535
15536 ac_cv_func_fork_works=$ac_cv_func_fork
15537 if test "x$ac_cv_func_fork" = xyes; then
15538   echo "$as_me:15538: checking for working fork" >&5
15539 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15540 if test "${ac_cv_func_fork_works+set}" = set; then
15541   echo $ECHO_N "(cached) $ECHO_C" >&6
15542 else
15543   if test "$cross_compiling" = yes; then
15544   ac_cv_func_fork_works=cross
15545 else
15546   cat >conftest.$ac_ext <<_ACEOF
15547 /* By Rüdiger Kuhlmann. */
15548       #include <sys/types.h>
15549       #if HAVE_UNISTD_H
15550       # include <unistd.h>
15551       #endif
15552       /* Some systems only have a dummy stub for fork() */
15553       int main ()
15554       {
15555         if (fork() < 0)
15556           $ac_main_return (1);
15557         $ac_main_return (0);
15558       }
15559 _ACEOF
15560 rm -f conftest$ac_exeext
15561 if { (eval echo "$as_me:15561: \"$ac_link\"") >&5
15562   (eval $ac_link) 2>&5
15563   ac_status=$?
15564   echo "$as_me:15564: \$? = $ac_status" >&5
15565   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15566   { (eval echo "$as_me:15566: \"$ac_try\"") >&5
15567   (eval $ac_try) 2>&5
15568   ac_status=$?
15569   echo "$as_me:15569: \$? = $ac_status" >&5
15570   (exit $ac_status); }; }; then
15571   ac_cv_func_fork_works=yes
15572 else
15573   echo "$as_me: program exited with status $ac_status" >&5
15574 echo "$as_me: failed program was:" >&5
15575 cat conftest.$ac_ext >&5
15576 ac_cv_func_fork_works=no
15577 fi
15578 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15579 fi
15580 fi
15581 echo "$as_me:15581: result: $ac_cv_func_fork_works" >&5
15582 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15583
15584 fi
15585 if test "x$ac_cv_func_fork_works" = xcross; then
15586   case $host in
15587     *-*-amigaos* | *-*-msdosdjgpp*)
15588       # Override, as these systems have only a dummy fork() stub
15589       ac_cv_func_fork_works=no
15590       ;;
15591     *)
15592       ac_cv_func_fork_works=yes
15593       ;;
15594   esac
15595   { echo "$as_me:15595: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15596 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15597 fi
15598 ac_cv_func_vfork_works=$ac_cv_func_vfork
15599 if test "x$ac_cv_func_vfork" = xyes; then
15600   echo "$as_me:15600: checking for working vfork" >&5
15601 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15602 if test "${ac_cv_func_vfork_works+set}" = set; then
15603   echo $ECHO_N "(cached) $ECHO_C" >&6
15604 else
15605   if test "$cross_compiling" = yes; then
15606   ac_cv_func_vfork_works=cross
15607 else
15608   cat >conftest.$ac_ext <<_ACEOF
15609 #line 15609 "configure"
15610 #include "confdefs.h"
15611 /* Thanks to Paul Eggert for this test.  */
15612 #include <stdio.h>
15613 #include <sys/types.h>
15614 #include <sys/stat.h>
15615 #if HAVE_UNISTD_H
15616 # include <unistd.h>
15617 #endif
15618 #if HAVE_VFORK_H
15619 # include <vfork.h>
15620 #endif
15621 /* On some sparc systems, changes by the child to local and incoming
15622    argument registers are propagated back to the parent.  The compiler
15623    is told about this with #include <vfork.h>, but some compilers
15624    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15625    static variable whose address is put into a register that is
15626    clobbered by the vfork.  */
15627 static
15628 #ifdef __cplusplus
15629 sparc_address_test (int arg)
15630 # else
15631 sparc_address_test (arg) int arg;
15632 #endif
15633 {
15634   static pid_t child;
15635   if (!child) {
15636     child = vfork ();
15637     if (child < 0) {
15638       perror ("vfork");
15639       _exit(2);
15640     }
15641     if (!child) {
15642       arg = getpid();
15643       write(-1, "", 0);
15644       _exit (arg);
15645     }
15646   }
15647 }
15648
15649 int
15650 main ()
15651 {
15652   pid_t parent = getpid ();
15653   pid_t child;
15654
15655   sparc_address_test ();
15656
15657   child = vfork ();
15658
15659   if (child == 0) {
15660     /* Here is another test for sparc vfork register problems.  This
15661        test uses lots of local variables, at least as many local
15662        variables as main has allocated so far including compiler
15663        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15664        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15665        reuse the register of parent for one of the local variables,
15666        since it will think that parent can't possibly be used any more
15667        in this routine.  Assigning to the local variable will thus
15668        munge parent in the parent process.  */
15669     pid_t
15670       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15671       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15672     /* Convince the compiler that p..p7 are live; otherwise, it might
15673        use the same hardware register for all 8 local variables.  */
15674     if (p != p1 || p != p2 || p != p3 || p != p4
15675         || p != p5 || p != p6 || p != p7)
15676       _exit(1);
15677
15678     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15679        from child file descriptors.  If the child closes a descriptor
15680        before it execs or exits, this munges the parent's descriptor
15681        as well.  Test for this by closing stdout in the child.  */
15682     _exit(close(fileno(stdout)) != 0);
15683   } else {
15684     int status;
15685     struct stat st;
15686
15687     while (wait(&status) != child)
15688       ;
15689     $ac_main_return(
15690          /* Was there some problem with vforking?  */
15691          child < 0
15692
15693          /* Did the child fail?  (This shouldn't happen.)  */
15694          || status
15695
15696          /* Did the vfork/compiler bug occur?  */
15697          || parent != getpid()
15698
15699          /* Did the file descriptor bug occur?  */
15700          || fstat(fileno(stdout), &st) != 0
15701          );
15702   }
15703 }
15704 _ACEOF
15705 rm -f conftest$ac_exeext
15706 if { (eval echo "$as_me:15706: \"$ac_link\"") >&5
15707   (eval $ac_link) 2>&5
15708   ac_status=$?
15709   echo "$as_me:15709: \$? = $ac_status" >&5
15710   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15711   { (eval echo "$as_me:15711: \"$ac_try\"") >&5
15712   (eval $ac_try) 2>&5
15713   ac_status=$?
15714   echo "$as_me:15714: \$? = $ac_status" >&5
15715   (exit $ac_status); }; }; then
15716   ac_cv_func_vfork_works=yes
15717 else
15718   echo "$as_me: program exited with status $ac_status" >&5
15719 echo "$as_me: failed program was:" >&5
15720 cat conftest.$ac_ext >&5
15721 ac_cv_func_vfork_works=no
15722 fi
15723 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15724 fi
15725 fi
15726 echo "$as_me:15726: result: $ac_cv_func_vfork_works" >&5
15727 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15728
15729 fi;
15730 if test "x$ac_cv_func_fork_works" = xcross; then
15731   ac_cv_func_vfork_works=ac_cv_func_vfork
15732   { echo "$as_me:15732: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15733 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15734 fi
15735
15736 if test "x$ac_cv_func_vfork_works" = xyes; then
15737
15738 cat >>confdefs.h <<\EOF
15739 #define HAVE_WORKING_VFORK 1
15740 EOF
15741
15742 else
15743
15744 cat >>confdefs.h <<\EOF
15745 #define vfork fork
15746 EOF
15747
15748 fi
15749 if test "x$ac_cv_func_fork_works" = xyes; then
15750
15751 cat >>confdefs.h <<\EOF
15752 #define HAVE_WORKING_FORK 1
15753 EOF
15754
15755 fi
15756
15757 # special check for test/ditto.c
15758
15759 echo "$as_me:15759: checking for openpty in -lutil" >&5
15760 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15761 if test "${ac_cv_lib_util_openpty+set}" = set; then
15762   echo $ECHO_N "(cached) $ECHO_C" >&6
15763 else
15764   ac_check_lib_save_LIBS=$LIBS
15765 LIBS="-lutil  $LIBS"
15766 cat >conftest.$ac_ext <<_ACEOF
15767 #line 15767 "configure"
15768 #include "confdefs.h"
15769
15770 /* Override any gcc2 internal prototype to avoid an error.  */
15771 #ifdef __cplusplus
15772 extern "C"
15773 #endif
15774 /* We use char because int might match the return type of a gcc2
15775    builtin and then its argument prototype would still apply.  */
15776 char openpty ();
15777 int
15778 main ()
15779 {
15780 openpty ();
15781   ;
15782   return 0;
15783 }
15784 _ACEOF
15785 rm -f conftest.$ac_objext conftest$ac_exeext
15786 if { (eval echo "$as_me:15786: \"$ac_link\"") >&5
15787   (eval $ac_link) 2>&5
15788   ac_status=$?
15789   echo "$as_me:15789: \$? = $ac_status" >&5
15790   (exit $ac_status); } &&
15791          { ac_try='test -s conftest$ac_exeext'
15792   { (eval echo "$as_me:15792: \"$ac_try\"") >&5
15793   (eval $ac_try) 2>&5
15794   ac_status=$?
15795   echo "$as_me:15795: \$? = $ac_status" >&5
15796   (exit $ac_status); }; }; then
15797   ac_cv_lib_util_openpty=yes
15798 else
15799   echo "$as_me: failed program was:" >&5
15800 cat conftest.$ac_ext >&5
15801 ac_cv_lib_util_openpty=no
15802 fi
15803 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15804 LIBS=$ac_check_lib_save_LIBS
15805 fi
15806 echo "$as_me:15806: result: $ac_cv_lib_util_openpty" >&5
15807 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15808 if test $ac_cv_lib_util_openpty = yes; then
15809   cf_cv_lib_util=yes
15810 else
15811   cf_cv_lib_util=no
15812 fi
15813
15814 echo "$as_me:15814: checking for openpty header" >&5
15815 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15816 if test "${cf_cv_func_openpty+set}" = set; then
15817   echo $ECHO_N "(cached) $ECHO_C" >&6
15818 else
15819
15820     cf_save_LIBS="$LIBS"
15821     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15822     for cf_header in pty.h libutil.h util.h
15823     do
15824     cat >conftest.$ac_ext <<_ACEOF
15825 #line 15825 "configure"
15826 #include "confdefs.h"
15827
15828 #include <$cf_header>
15829
15830 int
15831 main ()
15832 {
15833
15834     int x = openpty((int *)0, (int *)0, (char *)0,
15835                    (struct termios *)0, (struct winsize *)0);
15836
15837   ;
15838   return 0;
15839 }
15840 _ACEOF
15841 rm -f conftest.$ac_objext conftest$ac_exeext
15842 if { (eval echo "$as_me:15842: \"$ac_link\"") >&5
15843   (eval $ac_link) 2>&5
15844   ac_status=$?
15845   echo "$as_me:15845: \$? = $ac_status" >&5
15846   (exit $ac_status); } &&
15847          { ac_try='test -s conftest$ac_exeext'
15848   { (eval echo "$as_me:15848: \"$ac_try\"") >&5
15849   (eval $ac_try) 2>&5
15850   ac_status=$?
15851   echo "$as_me:15851: \$? = $ac_status" >&5
15852   (exit $ac_status); }; }; then
15853
15854         cf_cv_func_openpty=$cf_header
15855         break
15856
15857 else
15858   echo "$as_me: failed program was:" >&5
15859 cat conftest.$ac_ext >&5
15860
15861         cf_cv_func_openpty=no
15862
15863 fi
15864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15865     done
15866     LIBS="$cf_save_LIBS"
15867
15868 fi
15869 echo "$as_me:15869: result: $cf_cv_func_openpty" >&5
15870 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15871
15872 if test "$cf_cv_func_openpty" != no ; then
15873     cat >>confdefs.h <<EOF
15874 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15875 EOF
15876
15877     cat >>confdefs.h <<\EOF
15878 #define USE_XTERM_PTY 1
15879 EOF
15880
15881     if test "$cf_cv_lib_util" = yes ; then
15882         TEST_LIBS="-lutil $TEST_LIBS"
15883     fi
15884 fi
15885
15886 if test "$with_hashed_db" != no ; then
15887         cat >>confdefs.h <<\EOF
15888 #define USE_HASHED_DB 1
15889 EOF
15890
15891 case $with_hashed_db in #(vi
15892 yes|*able*) #(vi
15893     ;;
15894 *)
15895     if test -d "$with_hashed_db" ; then
15896
15897 if test -n "$with_hashed_db/include" ; then
15898   for cf_add_incdir in $with_hashed_db/include
15899   do
15900         while test $cf_add_incdir != /usr/include
15901         do
15902           if test -d $cf_add_incdir
15903           then
15904                 cf_have_incdir=no
15905                 if test -n "$CFLAGS$CPPFLAGS" ; then
15906                   # a loop is needed to ensure we can add subdirs of existing dirs
15907                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15908                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15909                           cf_have_incdir=yes; break
15910                         fi
15911                   done
15912                 fi
15913
15914                 if test "$cf_have_incdir" = no ; then
15915                   if test "$cf_add_incdir" = /usr/local/include ; then
15916                         if test "$GCC" = yes
15917                         then
15918                           cf_save_CPPFLAGS=$CPPFLAGS
15919                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15920                           cat >conftest.$ac_ext <<_ACEOF
15921 #line 15921 "configure"
15922 #include "confdefs.h"
15923 #include <stdio.h>
15924 int
15925 main ()
15926 {
15927 printf("Hello")
15928   ;
15929   return 0;
15930 }
15931 _ACEOF
15932 rm -f conftest.$ac_objext
15933 if { (eval echo "$as_me:15933: \"$ac_compile\"") >&5
15934   (eval $ac_compile) 2>&5
15935   ac_status=$?
15936   echo "$as_me:15936: \$? = $ac_status" >&5
15937   (exit $ac_status); } &&
15938          { ac_try='test -s conftest.$ac_objext'
15939   { (eval echo "$as_me:15939: \"$ac_try\"") >&5
15940   (eval $ac_try) 2>&5
15941   ac_status=$?
15942   echo "$as_me:15942: \$? = $ac_status" >&5
15943   (exit $ac_status); }; }; then
15944   :
15945 else
15946   echo "$as_me: failed program was:" >&5
15947 cat conftest.$ac_ext >&5
15948 cf_have_incdir=yes
15949 fi
15950 rm -f conftest.$ac_objext conftest.$ac_ext
15951                           CPPFLAGS=$cf_save_CPPFLAGS
15952                         fi
15953                   fi
15954                 fi
15955
15956                 if test "$cf_have_incdir" = no ; then
15957                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15958
15959 echo "${as_me-configure}:15959: testing adding $cf_add_incdir to include-path ..." 1>&5
15960
15961                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15962
15963                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15964                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15965                   cf_add_incdir="$cf_top_incdir"
15966                 else
15967                   break
15968                 fi
15969           fi
15970         done
15971   done
15972 fi
15973
15974 if test -n "$with_hashed_db/lib" ; then
15975   for cf_add_libdir in $with_hashed_db/lib
15976   do
15977     if test $cf_add_libdir = /usr/lib ; then
15978       :
15979     elif test -d $cf_add_libdir
15980     then
15981       cf_have_libdir=no
15982       if test -n "$LDFLAGS$LIBS" ; then
15983         # a loop is needed to ensure we can add subdirs of existing dirs
15984         for cf_test_libdir in $LDFLAGS $LIBS ; do
15985           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15986             cf_have_libdir=yes; break
15987           fi
15988         done
15989       fi
15990       if test "$cf_have_libdir" = no ; then
15991         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15992
15993 echo "${as_me-configure}:15993: testing adding $cf_add_libdir to library-path ..." 1>&5
15994
15995         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15996       fi
15997     fi
15998   done
15999 fi
16000
16001     fi
16002 esac
16003
16004 echo "$as_me:16004: checking for db.h" >&5
16005 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16006 if test "${ac_cv_header_db_h+set}" = set; then
16007   echo $ECHO_N "(cached) $ECHO_C" >&6
16008 else
16009   cat >conftest.$ac_ext <<_ACEOF
16010 #line 16010 "configure"
16011 #include "confdefs.h"
16012 #include <db.h>
16013 _ACEOF
16014 if { (eval echo "$as_me:16014: \"$ac_cpp conftest.$ac_ext\"") >&5
16015   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16016   ac_status=$?
16017   egrep -v '^ *\+' conftest.er1 >conftest.err
16018   rm -f conftest.er1
16019   cat conftest.err >&5
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit $ac_status); } >/dev/null; then
16022   if test -s conftest.err; then
16023     ac_cpp_err=$ac_c_preproc_warn_flag
16024   else
16025     ac_cpp_err=
16026   fi
16027 else
16028   ac_cpp_err=yes
16029 fi
16030 if test -z "$ac_cpp_err"; then
16031   ac_cv_header_db_h=yes
16032 else
16033   echo "$as_me: failed program was:" >&5
16034   cat conftest.$ac_ext >&5
16035   ac_cv_header_db_h=no
16036 fi
16037 rm -f conftest.err conftest.$ac_ext
16038 fi
16039 echo "$as_me:16039: result: $ac_cv_header_db_h" >&5
16040 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16041 if test $ac_cv_header_db_h = yes; then
16042
16043 echo "$as_me:16043: checking for version of db" >&5
16044 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16045 if test "${cf_cv_hashed_db_version+set}" = set; then
16046   echo $ECHO_N "(cached) $ECHO_C" >&6
16047 else
16048
16049 cf_cv_hashed_db_version=unknown
16050
16051 for cf_db_version in 1 2 3 4 5
16052 do
16053
16054 echo "${as_me-configure}:16054: testing checking for db version $cf_db_version ..." 1>&5
16055
16056         cat >conftest.$ac_ext <<_ACEOF
16057 #line 16057 "configure"
16058 #include "confdefs.h"
16059
16060 $ac_includes_default
16061 #include <db.h>
16062
16063 #ifdef DB_VERSION_MAJOR
16064         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16065 #if $cf_db_version == DB_VERSION_MAJOR
16066         /* ok */
16067 #else
16068         make an error
16069 #endif
16070 #else
16071 #if $cf_db_version == 1
16072         /* ok: assuming this is DB 1.8.5 */
16073 #else
16074         make an error
16075 #endif
16076 #endif
16077
16078 int
16079 main ()
16080 {
16081 DBT *foo = 0
16082   ;
16083   return 0;
16084 }
16085 _ACEOF
16086 rm -f conftest.$ac_objext
16087 if { (eval echo "$as_me:16087: \"$ac_compile\"") >&5
16088   (eval $ac_compile) 2>&5
16089   ac_status=$?
16090   echo "$as_me:16090: \$? = $ac_status" >&5
16091   (exit $ac_status); } &&
16092          { ac_try='test -s conftest.$ac_objext'
16093   { (eval echo "$as_me:16093: \"$ac_try\"") >&5
16094   (eval $ac_try) 2>&5
16095   ac_status=$?
16096   echo "$as_me:16096: \$? = $ac_status" >&5
16097   (exit $ac_status); }; }; then
16098
16099         cf_cv_hashed_db_version=$cf_db_version
16100         break
16101
16102 else
16103   echo "$as_me: failed program was:" >&5
16104 cat conftest.$ac_ext >&5
16105 fi
16106 rm -f conftest.$ac_objext conftest.$ac_ext
16107 done
16108
16109 fi
16110 echo "$as_me:16110: result: $cf_cv_hashed_db_version" >&5
16111 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16112
16113 if test "$cf_cv_hashed_db_version" = unknown ; then
16114         { { echo "$as_me:16114: error: Cannot determine version of db" >&5
16115 echo "$as_me: error: Cannot determine version of db" >&2;}
16116    { (exit 1); exit 1; }; }
16117 else
16118
16119 echo "$as_me:16119: checking for db libraries" >&5
16120 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16121 if test "${cf_cv_hashed_db_libs+set}" = set; then
16122   echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124
16125 cf_cv_hashed_db_libs=unknown
16126 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16127 do
16128         cf_save_libs="$LIBS"
16129         if test -n "$cf_db_libs"; then
16130                 LIBS="-l$cf_db_libs $LIBS"
16131         fi
16132
16133 echo "${as_me-configure}:16133: testing checking for library "$cf_db_libs" ..." 1>&5
16134
16135         cat >conftest.$ac_ext <<_ACEOF
16136 #line 16136 "configure"
16137 #include "confdefs.h"
16138
16139 $ac_includes_default
16140 #include <db.h>
16141
16142 int
16143 main ()
16144 {
16145
16146         char *path = "/tmp/foo";
16147 #ifdef DB_VERSION_MAJOR
16148 #if DB_VERSION_MAJOR >= 4
16149         DB *result = 0;
16150         db_create(&result, NULL, 0);
16151         result->open(result,
16152                 NULL,
16153                 path,
16154                 path,
16155                 DB_HASH,
16156                 DB_CREATE,
16157                 0644);
16158 #elif DB_VERSION_MAJOR >= 3
16159         DB *result = 0;
16160         db_create(&result, NULL, 0);
16161         result->open(result,
16162                 path,
16163                 path,
16164                 DB_HASH,
16165                 DB_CREATE,
16166                 0644);
16167 #elif DB_VERSION_MAJOR >= 2
16168         DB *result = 0;
16169         db_open(path,
16170                 DB_HASH,
16171                 DB_CREATE,
16172                 0644,
16173                 (DB_ENV *) 0,
16174                 (DB_INFO *) 0,
16175                 &result);
16176 #endif /* DB_VERSION_MAJOR */
16177 #else
16178         DB *result = dbopen(path,
16179                      2,
16180                      0644,
16181                      DB_HASH,
16182                      0);
16183 #endif
16184         ${cf_cv_main_return:-return}(result != 0)
16185
16186   ;
16187   return 0;
16188 }
16189 _ACEOF
16190 rm -f conftest.$ac_objext conftest$ac_exeext
16191 if { (eval echo "$as_me:16191: \"$ac_link\"") >&5
16192   (eval $ac_link) 2>&5
16193   ac_status=$?
16194   echo "$as_me:16194: \$? = $ac_status" >&5
16195   (exit $ac_status); } &&
16196          { ac_try='test -s conftest$ac_exeext'
16197   { (eval echo "$as_me:16197: \"$ac_try\"") >&5
16198   (eval $ac_try) 2>&5
16199   ac_status=$?
16200   echo "$as_me:16200: \$? = $ac_status" >&5
16201   (exit $ac_status); }; }; then
16202
16203         if test -n "$cf_db_libs" ; then
16204                 cf_cv_hashed_db_libs=$cf_db_libs
16205         else
16206                 cf_cv_hashed_db_libs=default
16207         fi
16208         LIBS="$cf_save_libs"
16209         break
16210
16211 else
16212   echo "$as_me: failed program was:" >&5
16213 cat conftest.$ac_ext >&5
16214 fi
16215 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16216         LIBS="$cf_save_libs"
16217 done
16218
16219 fi
16220 echo "$as_me:16220: result: $cf_cv_hashed_db_libs" >&5
16221 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16222
16223         if test "$cf_cv_hashed_db_libs" = unknown ; then
16224                 { { echo "$as_me:16224: error: Cannot determine library for db" >&5
16225 echo "$as_me: error: Cannot determine library for db" >&2;}
16226    { (exit 1); exit 1; }; }
16227         elif test "$cf_cv_hashed_db_libs" != default ; then
16228                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16229         fi
16230 fi
16231
16232 else
16233
16234         { { echo "$as_me:16234: error: Cannot find db.h" >&5
16235 echo "$as_me: error: Cannot find db.h" >&2;}
16236    { (exit 1); exit 1; }; }
16237
16238 fi
16239
16240 fi
16241
16242 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16243         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16244         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16245 fi
16246
16247 # Just in case, check if the C compiler has a bool type.
16248
16249 echo "$as_me:16249: checking if we should include stdbool.h" >&5
16250 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16251
16252 if test "${cf_cv_header_stdbool_h+set}" = set; then
16253   echo $ECHO_N "(cached) $ECHO_C" >&6
16254 else
16255
16256         cat >conftest.$ac_ext <<_ACEOF
16257 #line 16257 "configure"
16258 #include "confdefs.h"
16259
16260 int
16261 main ()
16262 {
16263 bool foo = false
16264   ;
16265   return 0;
16266 }
16267 _ACEOF
16268 rm -f conftest.$ac_objext
16269 if { (eval echo "$as_me:16269: \"$ac_compile\"") >&5
16270   (eval $ac_compile) 2>&5
16271   ac_status=$?
16272   echo "$as_me:16272: \$? = $ac_status" >&5
16273   (exit $ac_status); } &&
16274          { ac_try='test -s conftest.$ac_objext'
16275   { (eval echo "$as_me:16275: \"$ac_try\"") >&5
16276   (eval $ac_try) 2>&5
16277   ac_status=$?
16278   echo "$as_me:16278: \$? = $ac_status" >&5
16279   (exit $ac_status); }; }; then
16280   cf_cv_header_stdbool_h=0
16281 else
16282   echo "$as_me: failed program was:" >&5
16283 cat conftest.$ac_ext >&5
16284 cat >conftest.$ac_ext <<_ACEOF
16285 #line 16285 "configure"
16286 #include "confdefs.h"
16287
16288 #ifndef __BEOS__
16289 #include <stdbool.h>
16290 #endif
16291
16292 int
16293 main ()
16294 {
16295 bool foo = false
16296   ;
16297   return 0;
16298 }
16299 _ACEOF
16300 rm -f conftest.$ac_objext
16301 if { (eval echo "$as_me:16301: \"$ac_compile\"") >&5
16302   (eval $ac_compile) 2>&5
16303   ac_status=$?
16304   echo "$as_me:16304: \$? = $ac_status" >&5
16305   (exit $ac_status); } &&
16306          { ac_try='test -s conftest.$ac_objext'
16307   { (eval echo "$as_me:16307: \"$ac_try\"") >&5
16308   (eval $ac_try) 2>&5
16309   ac_status=$?
16310   echo "$as_me:16310: \$? = $ac_status" >&5
16311   (exit $ac_status); }; }; then
16312   cf_cv_header_stdbool_h=1
16313 else
16314   echo "$as_me: failed program was:" >&5
16315 cat conftest.$ac_ext >&5
16316 cf_cv_header_stdbool_h=0
16317 fi
16318 rm -f conftest.$ac_objext conftest.$ac_ext
16319 fi
16320 rm -f conftest.$ac_objext conftest.$ac_ext
16321 fi
16322
16323 if test "$cf_cv_header_stdbool_h" = 1
16324 then    echo "$as_me:16324: result: yes" >&5
16325 echo "${ECHO_T}yes" >&6
16326 else    echo "$as_me:16326: result: no" >&5
16327 echo "${ECHO_T}no" >&6
16328 fi
16329
16330 echo "$as_me:16330: checking for builtin bool type" >&5
16331 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16332
16333 if test "${cf_cv_cc_bool_type+set}" = set; then
16334   echo $ECHO_N "(cached) $ECHO_C" >&6
16335 else
16336
16337         cat >conftest.$ac_ext <<_ACEOF
16338 #line 16338 "configure"
16339 #include "confdefs.h"
16340
16341 #include <stdio.h>
16342 #include <sys/types.h>
16343
16344 int
16345 main ()
16346 {
16347 bool x = false
16348   ;
16349   return 0;
16350 }
16351 _ACEOF
16352 rm -f conftest.$ac_objext
16353 if { (eval echo "$as_me:16353: \"$ac_compile\"") >&5
16354   (eval $ac_compile) 2>&5
16355   ac_status=$?
16356   echo "$as_me:16356: \$? = $ac_status" >&5
16357   (exit $ac_status); } &&
16358          { ac_try='test -s conftest.$ac_objext'
16359   { (eval echo "$as_me:16359: \"$ac_try\"") >&5
16360   (eval $ac_try) 2>&5
16361   ac_status=$?
16362   echo "$as_me:16362: \$? = $ac_status" >&5
16363   (exit $ac_status); }; }; then
16364   cf_cv_cc_bool_type=1
16365 else
16366   echo "$as_me: failed program was:" >&5
16367 cat conftest.$ac_ext >&5
16368 cf_cv_cc_bool_type=0
16369 fi
16370 rm -f conftest.$ac_objext conftest.$ac_ext
16371
16372 fi
16373
16374 if test "$cf_cv_cc_bool_type" = 1
16375 then    echo "$as_me:16375: result: yes" >&5
16376 echo "${ECHO_T}yes" >&6
16377 else    echo "$as_me:16377: result: no" >&5
16378 echo "${ECHO_T}no" >&6
16379 fi
16380
16381 # Check for C++ compiler characteristics (and ensure that it's there!)
16382 if test -n "$CXX" ; then
16383         ac_ext=cc
16384 ac_cpp='$CXXCPP $CPPFLAGS'
16385 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16386 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16387 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16388 ac_main_return=return
16389
16390 if test -n "$GXX" ; then
16391 case $cf_cv_system_name in #(vi
16392 os2*) #(vi
16393         cf_stdcpp_libname=stdcpp
16394         ;;
16395 *)
16396         cf_stdcpp_libname=stdc++
16397         ;;
16398 esac
16399 echo "$as_me:16399: checking for library $cf_stdcpp_libname" >&5
16400 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16401 if test "${cf_cv_libstdcpp+set}" = set; then
16402   echo $ECHO_N "(cached) $ECHO_C" >&6
16403 else
16404
16405         cf_save="$LIBS"
16406         LIBS="-l$cf_stdcpp_libname $LIBS"
16407 cat >conftest.$ac_ext <<_ACEOF
16408 #line 16408 "configure"
16409 #include "confdefs.h"
16410
16411 #include <strstream.h>
16412 int
16413 main ()
16414 {
16415
16416 char buf[80];
16417 strstreambuf foo(buf, sizeof(buf))
16418
16419   ;
16420   return 0;
16421 }
16422 _ACEOF
16423 rm -f conftest.$ac_objext conftest$ac_exeext
16424 if { (eval echo "$as_me:16424: \"$ac_link\"") >&5
16425   (eval $ac_link) 2>&5
16426   ac_status=$?
16427   echo "$as_me:16427: \$? = $ac_status" >&5
16428   (exit $ac_status); } &&
16429          { ac_try='test -s conftest$ac_exeext'
16430   { (eval echo "$as_me:16430: \"$ac_try\"") >&5
16431   (eval $ac_try) 2>&5
16432   ac_status=$?
16433   echo "$as_me:16433: \$? = $ac_status" >&5
16434   (exit $ac_status); }; }; then
16435   cf_cv_libstdcpp=yes
16436 else
16437   echo "$as_me: failed program was:" >&5
16438 cat conftest.$ac_ext >&5
16439 cf_cv_libstdcpp=no
16440 fi
16441 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16442         LIBS="$cf_save"
16443
16444 fi
16445 echo "$as_me:16445: result: $cf_cv_libstdcpp" >&5
16446 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16447 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
16448 fi
16449
16450         echo "$as_me:16450: checking whether $CXX understands -c and -o together" >&5
16451 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16452 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16453   echo $ECHO_N "(cached) $ECHO_C" >&6
16454 else
16455
16456 cat > conftest.$ac_ext <<CF_EOF
16457 #include <stdio.h>
16458 int main()
16459 {
16460         ${cf_cv_main_return:-return}(0);
16461 }
16462 CF_EOF
16463 # We do the test twice because some compilers refuse to overwrite an
16464 # existing .o file with -o, though they will create one.
16465 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16466 if { (eval echo "$as_me:16466: \"$ac_try\"") >&5
16467   (eval $ac_try) 2>&5
16468   ac_status=$?
16469   echo "$as_me:16469: \$? = $ac_status" >&5
16470   (exit $ac_status); } &&
16471   test -f conftest2.$ac_objext && { (eval echo "$as_me:16471: \"$ac_try\"") >&5
16472   (eval $ac_try) 2>&5
16473   ac_status=$?
16474   echo "$as_me:16474: \$? = $ac_status" >&5
16475   (exit $ac_status); };
16476 then
16477   eval cf_cv_prog_CXX_c_o=yes
16478 else
16479   eval cf_cv_prog_CXX_c_o=no
16480 fi
16481 rm -f conftest*
16482
16483 fi
16484 if test $cf_cv_prog_CXX_c_o = yes; then
16485   echo "$as_me:16485: result: yes" >&5
16486 echo "${ECHO_T}yes" >&6
16487 else
16488   echo "$as_me:16488: result: no" >&5
16489 echo "${ECHO_T}no" >&6
16490 fi
16491
16492         case $GXX_VERSION in
16493         1*|2.0-6*)
16494                 cf_cxx_library=yes
16495                 ;;
16496         *-2.7*|2.7*)
16497
16498 cf_cxx_library=unknown
16499 case $cf_cv_system_name in #(vi
16500 os2*) #(vi
16501         cf_gpp_libname=gpp
16502         ;;
16503 *)
16504         cf_gpp_libname=g++
16505         ;;
16506 esac
16507 if test "$GXX" = yes; then
16508         echo "$as_me:16508: checking for lib$cf_gpp_libname" >&5
16509 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16510         cf_save="$LIBS"
16511         LIBS="-l$cf_gpp_libname $LIBS"
16512         cat >conftest.$ac_ext <<_ACEOF
16513 #line 16513 "configure"
16514 #include "confdefs.h"
16515
16516 #include <$cf_gpp_libname/builtin.h>
16517
16518 int
16519 main ()
16520 {
16521 two_arg_error_handler_t foo2 = lib_error_handler
16522   ;
16523   return 0;
16524 }
16525 _ACEOF
16526 rm -f conftest.$ac_objext conftest$ac_exeext
16527 if { (eval echo "$as_me:16527: \"$ac_link\"") >&5
16528   (eval $ac_link) 2>&5
16529   ac_status=$?
16530   echo "$as_me:16530: \$? = $ac_status" >&5
16531   (exit $ac_status); } &&
16532          { ac_try='test -s conftest$ac_exeext'
16533   { (eval echo "$as_me:16533: \"$ac_try\"") >&5
16534   (eval $ac_try) 2>&5
16535   ac_status=$?
16536   echo "$as_me:16536: \$? = $ac_status" >&5
16537   (exit $ac_status); }; }; then
16538   cf_cxx_library=yes
16539          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16540          if test "$cf_gpp_libname" = cpp ; then
16541             cat >>confdefs.h <<\EOF
16542 #define HAVE_GPP_BUILTIN_H 1
16543 EOF
16544
16545          else
16546             cat >>confdefs.h <<\EOF
16547 #define HAVE_GXX_BUILTIN_H 1
16548 EOF
16549
16550          fi
16551 else
16552   echo "$as_me: failed program was:" >&5
16553 cat conftest.$ac_ext >&5
16554 cat >conftest.$ac_ext <<_ACEOF
16555 #line 16555 "configure"
16556 #include "confdefs.h"
16557
16558 #include <builtin.h>
16559
16560 int
16561 main ()
16562 {
16563 two_arg_error_handler_t foo2 = lib_error_handler
16564   ;
16565   return 0;
16566 }
16567 _ACEOF
16568 rm -f conftest.$ac_objext conftest$ac_exeext
16569 if { (eval echo "$as_me:16569: \"$ac_link\"") >&5
16570   (eval $ac_link) 2>&5
16571   ac_status=$?
16572   echo "$as_me:16572: \$? = $ac_status" >&5
16573   (exit $ac_status); } &&
16574          { ac_try='test -s conftest$ac_exeext'
16575   { (eval echo "$as_me:16575: \"$ac_try\"") >&5
16576   (eval $ac_try) 2>&5
16577   ac_status=$?
16578   echo "$as_me:16578: \$? = $ac_status" >&5
16579   (exit $ac_status); }; }; then
16580   cf_cxx_library=yes
16581          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16582          cat >>confdefs.h <<\EOF
16583 #define HAVE_BUILTIN_H 1
16584 EOF
16585
16586 else
16587   echo "$as_me: failed program was:" >&5
16588 cat conftest.$ac_ext >&5
16589 cf_cxx_library=no
16590 fi
16591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16592 fi
16593 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16594         LIBS="$cf_save"
16595         echo "$as_me:16595: result: $cf_cxx_library" >&5
16596 echo "${ECHO_T}$cf_cxx_library" >&6
16597 fi
16598
16599                 ;;
16600         *)
16601                 cf_cxx_library=no
16602                 ;;
16603         esac
16604
16605         ac_ext=cc
16606 ac_cpp='$CXXCPP $CPPFLAGS'
16607 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16608 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16609 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16610 ac_main_return=return
16611 echo "$as_me:16611: checking how to run the C++ preprocessor" >&5
16612 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16613 if test -z "$CXXCPP"; then
16614   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16615   echo $ECHO_N "(cached) $ECHO_C" >&6
16616 else
16617       # Double quotes because CXXCPP needs to be expanded
16618     for CXXCPP in "$CXX -E" "/lib/cpp"
16619     do
16620       ac_preproc_ok=false
16621 for ac_cxx_preproc_warn_flag in '' yes
16622 do
16623   # Use a header file that comes with gcc, so configuring glibc
16624   # with a fresh cross-compiler works.
16625   # On the NeXT, cc -E runs the code through the compiler's parser,
16626   # not just through cpp. "Syntax error" is here to catch this case.
16627   cat >conftest.$ac_ext <<_ACEOF
16628 #line 16628 "configure"
16629 #include "confdefs.h"
16630 #include <assert.h>
16631                      Syntax error
16632 _ACEOF
16633 if { (eval echo "$as_me:16633: \"$ac_cpp conftest.$ac_ext\"") >&5
16634   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16635   ac_status=$?
16636   egrep -v '^ *\+' conftest.er1 >conftest.err
16637   rm -f conftest.er1
16638   cat conftest.err >&5
16639   echo "$as_me:16639: \$? = $ac_status" >&5
16640   (exit $ac_status); } >/dev/null; then
16641   if test -s conftest.err; then
16642     ac_cpp_err=$ac_cxx_preproc_warn_flag
16643   else
16644     ac_cpp_err=
16645   fi
16646 else
16647   ac_cpp_err=yes
16648 fi
16649 if test -z "$ac_cpp_err"; then
16650   :
16651 else
16652   echo "$as_me: failed program was:" >&5
16653   cat conftest.$ac_ext >&5
16654   # Broken: fails on valid input.
16655 continue
16656 fi
16657 rm -f conftest.err conftest.$ac_ext
16658
16659   # OK, works on sane cases.  Now check whether non-existent headers
16660   # can be detected and how.
16661   cat >conftest.$ac_ext <<_ACEOF
16662 #line 16662 "configure"
16663 #include "confdefs.h"
16664 #include <ac_nonexistent.h>
16665 _ACEOF
16666 if { (eval echo "$as_me:16666: \"$ac_cpp conftest.$ac_ext\"") >&5
16667   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16668   ac_status=$?
16669   egrep -v '^ *\+' conftest.er1 >conftest.err
16670   rm -f conftest.er1
16671   cat conftest.err >&5
16672   echo "$as_me:16672: \$? = $ac_status" >&5
16673   (exit $ac_status); } >/dev/null; then
16674   if test -s conftest.err; then
16675     ac_cpp_err=$ac_cxx_preproc_warn_flag
16676   else
16677     ac_cpp_err=
16678   fi
16679 else
16680   ac_cpp_err=yes
16681 fi
16682 if test -z "$ac_cpp_err"; then
16683   # Broken: success on invalid input.
16684 continue
16685 else
16686   echo "$as_me: failed program was:" >&5
16687   cat conftest.$ac_ext >&5
16688   # Passes both tests.
16689 ac_preproc_ok=:
16690 break
16691 fi
16692 rm -f conftest.err conftest.$ac_ext
16693
16694 done
16695 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16696 rm -f conftest.err conftest.$ac_ext
16697 if $ac_preproc_ok; then
16698   break
16699 fi
16700
16701     done
16702     ac_cv_prog_CXXCPP=$CXXCPP
16703
16704 fi
16705   CXXCPP=$ac_cv_prog_CXXCPP
16706 else
16707   ac_cv_prog_CXXCPP=$CXXCPP
16708 fi
16709 echo "$as_me:16709: result: $CXXCPP" >&5
16710 echo "${ECHO_T}$CXXCPP" >&6
16711 ac_preproc_ok=false
16712 for ac_cxx_preproc_warn_flag in '' yes
16713 do
16714   # Use a header file that comes with gcc, so configuring glibc
16715   # with a fresh cross-compiler works.
16716   # On the NeXT, cc -E runs the code through the compiler's parser,
16717   # not just through cpp. "Syntax error" is here to catch this case.
16718   cat >conftest.$ac_ext <<_ACEOF
16719 #line 16719 "configure"
16720 #include "confdefs.h"
16721 #include <assert.h>
16722                      Syntax error
16723 _ACEOF
16724 if { (eval echo "$as_me:16724: \"$ac_cpp conftest.$ac_ext\"") >&5
16725   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16726   ac_status=$?
16727   egrep -v '^ *\+' conftest.er1 >conftest.err
16728   rm -f conftest.er1
16729   cat conftest.err >&5
16730   echo "$as_me:16730: \$? = $ac_status" >&5
16731   (exit $ac_status); } >/dev/null; then
16732   if test -s conftest.err; then
16733     ac_cpp_err=$ac_cxx_preproc_warn_flag
16734   else
16735     ac_cpp_err=
16736   fi
16737 else
16738   ac_cpp_err=yes
16739 fi
16740 if test -z "$ac_cpp_err"; then
16741   :
16742 else
16743   echo "$as_me: failed program was:" >&5
16744   cat conftest.$ac_ext >&5
16745   # Broken: fails on valid input.
16746 continue
16747 fi
16748 rm -f conftest.err conftest.$ac_ext
16749
16750   # OK, works on sane cases.  Now check whether non-existent headers
16751   # can be detected and how.
16752   cat >conftest.$ac_ext <<_ACEOF
16753 #line 16753 "configure"
16754 #include "confdefs.h"
16755 #include <ac_nonexistent.h>
16756 _ACEOF
16757 if { (eval echo "$as_me:16757: \"$ac_cpp conftest.$ac_ext\"") >&5
16758   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16759   ac_status=$?
16760   egrep -v '^ *\+' conftest.er1 >conftest.err
16761   rm -f conftest.er1
16762   cat conftest.err >&5
16763   echo "$as_me:16763: \$? = $ac_status" >&5
16764   (exit $ac_status); } >/dev/null; then
16765   if test -s conftest.err; then
16766     ac_cpp_err=$ac_cxx_preproc_warn_flag
16767   else
16768     ac_cpp_err=
16769   fi
16770 else
16771   ac_cpp_err=yes
16772 fi
16773 if test -z "$ac_cpp_err"; then
16774   # Broken: success on invalid input.
16775 continue
16776 else
16777   echo "$as_me: failed program was:" >&5
16778   cat conftest.$ac_ext >&5
16779   # Passes both tests.
16780 ac_preproc_ok=:
16781 break
16782 fi
16783 rm -f conftest.err conftest.$ac_ext
16784
16785 done
16786 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16787 rm -f conftest.err conftest.$ac_ext
16788 if $ac_preproc_ok; then
16789   :
16790 else
16791   { { echo "$as_me:16791: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16792 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16793    { (exit 1); exit 1; }; }
16794 fi
16795
16796 ac_ext=cc
16797 ac_cpp='$CXXCPP $CPPFLAGS'
16798 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16799 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16800 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16801 ac_main_return=return
16802
16803 for ac_header in iostream typeinfo
16804 do
16805 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16806 echo "$as_me:16806: checking for $ac_header" >&5
16807 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16808 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16809   echo $ECHO_N "(cached) $ECHO_C" >&6
16810 else
16811   cat >conftest.$ac_ext <<_ACEOF
16812 #line 16812 "configure"
16813 #include "confdefs.h"
16814 #include <$ac_header>
16815 _ACEOF
16816 if { (eval echo "$as_me:16816: \"$ac_cpp conftest.$ac_ext\"") >&5
16817   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16818   ac_status=$?
16819   egrep -v '^ *\+' conftest.er1 >conftest.err
16820   rm -f conftest.er1
16821   cat conftest.err >&5
16822   echo "$as_me:16822: \$? = $ac_status" >&5
16823   (exit $ac_status); } >/dev/null; then
16824   if test -s conftest.err; then
16825     ac_cpp_err=$ac_cxx_preproc_warn_flag
16826   else
16827     ac_cpp_err=
16828   fi
16829 else
16830   ac_cpp_err=yes
16831 fi
16832 if test -z "$ac_cpp_err"; then
16833   eval "$as_ac_Header=yes"
16834 else
16835   echo "$as_me: failed program was:" >&5
16836   cat conftest.$ac_ext >&5
16837   eval "$as_ac_Header=no"
16838 fi
16839 rm -f conftest.err conftest.$ac_ext
16840 fi
16841 echo "$as_me:16841: result: `eval echo '${'$as_ac_Header'}'`" >&5
16842 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16843 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16844   cat >>confdefs.h <<EOF
16845 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16846 EOF
16847
16848 fi
16849 done
16850
16851     if test x"$ac_cv_header_iostream" = xyes ; then
16852         echo "$as_me:16852: checking if iostream uses std-namespace" >&5
16853 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16854         cat >conftest.$ac_ext <<_ACEOF
16855 #line 16855 "configure"
16856 #include "confdefs.h"
16857
16858 #include <iostream>
16859 using std::endl;
16860 using std::cerr;
16861 int
16862 main ()
16863 {
16864
16865 cerr << "testing" << endl;
16866
16867   ;
16868   return 0;
16869 }
16870 _ACEOF
16871 rm -f conftest.$ac_objext
16872 if { (eval echo "$as_me:16872: \"$ac_compile\"") >&5
16873   (eval $ac_compile) 2>&5
16874   ac_status=$?
16875   echo "$as_me:16875: \$? = $ac_status" >&5
16876   (exit $ac_status); } &&
16877          { ac_try='test -s conftest.$ac_objext'
16878   { (eval echo "$as_me:16878: \"$ac_try\"") >&5
16879   (eval $ac_try) 2>&5
16880   ac_status=$?
16881   echo "$as_me:16881: \$? = $ac_status" >&5
16882   (exit $ac_status); }; }; then
16883   cf_iostream_namespace=yes
16884 else
16885   echo "$as_me: failed program was:" >&5
16886 cat conftest.$ac_ext >&5
16887 cf_iostream_namespace=no
16888 fi
16889 rm -f conftest.$ac_objext conftest.$ac_ext
16890         echo "$as_me:16890: result: $cf_iostream_namespace" >&5
16891 echo "${ECHO_T}$cf_iostream_namespace" >&6
16892         if test "$cf_iostream_namespace" = yes ; then
16893             cat >>confdefs.h <<\EOF
16894 #define IOSTREAM_NAMESPACE 1
16895 EOF
16896
16897         fi
16898     fi
16899
16900 echo "$as_me:16900: checking if we should include stdbool.h" >&5
16901 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16902
16903 if test "${cf_cv_header_stdbool_h+set}" = set; then
16904   echo $ECHO_N "(cached) $ECHO_C" >&6
16905 else
16906
16907         cat >conftest.$ac_ext <<_ACEOF
16908 #line 16908 "configure"
16909 #include "confdefs.h"
16910
16911 int
16912 main ()
16913 {
16914 bool foo = false
16915   ;
16916   return 0;
16917 }
16918 _ACEOF
16919 rm -f conftest.$ac_objext
16920 if { (eval echo "$as_me:16920: \"$ac_compile\"") >&5
16921   (eval $ac_compile) 2>&5
16922   ac_status=$?
16923   echo "$as_me:16923: \$? = $ac_status" >&5
16924   (exit $ac_status); } &&
16925          { ac_try='test -s conftest.$ac_objext'
16926   { (eval echo "$as_me:16926: \"$ac_try\"") >&5
16927   (eval $ac_try) 2>&5
16928   ac_status=$?
16929   echo "$as_me:16929: \$? = $ac_status" >&5
16930   (exit $ac_status); }; }; then
16931   cf_cv_header_stdbool_h=0
16932 else
16933   echo "$as_me: failed program was:" >&5
16934 cat conftest.$ac_ext >&5
16935 cat >conftest.$ac_ext <<_ACEOF
16936 #line 16936 "configure"
16937 #include "confdefs.h"
16938
16939 #ifndef __BEOS__
16940 #include <stdbool.h>
16941 #endif
16942
16943 int
16944 main ()
16945 {
16946 bool foo = false
16947   ;
16948   return 0;
16949 }
16950 _ACEOF
16951 rm -f conftest.$ac_objext
16952 if { (eval echo "$as_me:16952: \"$ac_compile\"") >&5
16953   (eval $ac_compile) 2>&5
16954   ac_status=$?
16955   echo "$as_me:16955: \$? = $ac_status" >&5
16956   (exit $ac_status); } &&
16957          { ac_try='test -s conftest.$ac_objext'
16958   { (eval echo "$as_me:16958: \"$ac_try\"") >&5
16959   (eval $ac_try) 2>&5
16960   ac_status=$?
16961   echo "$as_me:16961: \$? = $ac_status" >&5
16962   (exit $ac_status); }; }; then
16963   cf_cv_header_stdbool_h=1
16964 else
16965   echo "$as_me: failed program was:" >&5
16966 cat conftest.$ac_ext >&5
16967 cf_cv_header_stdbool_h=0
16968 fi
16969 rm -f conftest.$ac_objext conftest.$ac_ext
16970 fi
16971 rm -f conftest.$ac_objext conftest.$ac_ext
16972 fi
16973
16974 if test "$cf_cv_header_stdbool_h" = 1
16975 then    echo "$as_me:16975: result: yes" >&5
16976 echo "${ECHO_T}yes" >&6
16977 else    echo "$as_me:16977: result: no" >&5
16978 echo "${ECHO_T}no" >&6
16979 fi
16980
16981 echo "$as_me:16981: checking for builtin bool type" >&5
16982 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16983
16984 if test "${cf_cv_builtin_bool+set}" = set; then
16985   echo $ECHO_N "(cached) $ECHO_C" >&6
16986 else
16987
16988         cat >conftest.$ac_ext <<_ACEOF
16989 #line 16989 "configure"
16990 #include "confdefs.h"
16991
16992 #include <stdio.h>
16993 #include <sys/types.h>
16994
16995 int
16996 main ()
16997 {
16998 bool x = false
16999   ;
17000   return 0;
17001 }
17002 _ACEOF
17003 rm -f conftest.$ac_objext
17004 if { (eval echo "$as_me:17004: \"$ac_compile\"") >&5
17005   (eval $ac_compile) 2>&5
17006   ac_status=$?
17007   echo "$as_me:17007: \$? = $ac_status" >&5
17008   (exit $ac_status); } &&
17009          { ac_try='test -s conftest.$ac_objext'
17010   { (eval echo "$as_me:17010: \"$ac_try\"") >&5
17011   (eval $ac_try) 2>&5
17012   ac_status=$?
17013   echo "$as_me:17013: \$? = $ac_status" >&5
17014   (exit $ac_status); }; }; then
17015   cf_cv_builtin_bool=1
17016 else
17017   echo "$as_me: failed program was:" >&5
17018 cat conftest.$ac_ext >&5
17019 cf_cv_builtin_bool=0
17020 fi
17021 rm -f conftest.$ac_objext conftest.$ac_ext
17022
17023 fi
17024
17025 if test "$cf_cv_builtin_bool" = 1
17026 then    echo "$as_me:17026: result: yes" >&5
17027 echo "${ECHO_T}yes" >&6
17028 else    echo "$as_me:17028: result: no" >&5
17029 echo "${ECHO_T}no" >&6
17030 fi
17031
17032 echo "$as_me:17032: checking for size of bool" >&5
17033 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17034 if test "${cf_cv_type_of_bool+set}" = set; then
17035   echo $ECHO_N "(cached) $ECHO_C" >&6
17036 else
17037
17038         rm -f cf_test.out
17039         if test "$cross_compiling" = yes; then
17040   cf_cv_type_of_bool=unknown
17041 else
17042   cat >conftest.$ac_ext <<_ACEOF
17043 #line 17043 "configure"
17044 #include "confdefs.h"
17045
17046 #include <stdlib.h>
17047 #include <stdio.h>
17048
17049 #if defined(__cplusplus)
17050
17051 #ifdef HAVE_GXX_BUILTIN_H
17052 #include <g++/builtin.h>
17053 #elif HAVE_GPP_BUILTIN_H
17054 #include <gpp/builtin.h>
17055 #elif HAVE_BUILTIN_H
17056 #include <builtin.h>
17057 #endif
17058
17059 #else
17060
17061 #if $cf_cv_header_stdbool_h
17062 #include <stdbool.h>
17063 #endif
17064
17065 #endif
17066
17067 main()
17068 {
17069         FILE *fp = fopen("cf_test.out", "w");
17070         if (fp != 0) {
17071                 bool x = true;
17072                 if ((bool)(-x) >= 0)
17073                         fputs("unsigned ", fp);
17074                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17075                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17076                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17077                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17078                 fclose(fp);
17079         }
17080         ${cf_cv_main_return:-return}(0);
17081 }
17082
17083 _ACEOF
17084 rm -f conftest$ac_exeext
17085 if { (eval echo "$as_me:17085: \"$ac_link\"") >&5
17086   (eval $ac_link) 2>&5
17087   ac_status=$?
17088   echo "$as_me:17088: \$? = $ac_status" >&5
17089   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17090   { (eval echo "$as_me:17090: \"$ac_try\"") >&5
17091   (eval $ac_try) 2>&5
17092   ac_status=$?
17093   echo "$as_me:17093: \$? = $ac_status" >&5
17094   (exit $ac_status); }; }; then
17095   cf_cv_type_of_bool=`cat cf_test.out`
17096                  if test -z "$cf_cv_type_of_bool"; then
17097                    cf_cv_type_of_bool=unknown
17098                  fi
17099 else
17100   echo "$as_me: program exited with status $ac_status" >&5
17101 echo "$as_me: failed program was:" >&5
17102 cat conftest.$ac_ext >&5
17103 cf_cv_type_of_bool=unknown
17104 fi
17105 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17106 fi
17107
17108 fi
17109
17110         rm -f cf_test.out
17111 echo "$as_me:17111: result: $cf_cv_type_of_bool" >&5
17112 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17113 if test "$cf_cv_type_of_bool" = unknown ; then
17114         case .$NCURSES_BOOL in #(vi
17115         .auto|.) NCURSES_BOOL=unsigned;;
17116         esac
17117         { echo "$as_me:17117: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17118 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17119         cf_cv_type_of_bool=$NCURSES_BOOL
17120 fi
17121
17122 echo "$as_me:17122: checking for special defines needed for etip.h" >&5
17123 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17124 cf_save_CXXFLAGS="$CXXFLAGS"
17125 cf_result="none"
17126 for cf_math in "" MATH_H
17127 do
17128 for cf_excp in "" MATH_EXCEPTION
17129 do
17130         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17131         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17132         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17133 cat >conftest.$ac_ext <<_ACEOF
17134 #line 17134 "configure"
17135 #include "confdefs.h"
17136
17137 #include <etip.h.in>
17138
17139 int
17140 main ()
17141 {
17142
17143   ;
17144   return 0;
17145 }
17146 _ACEOF
17147 rm -f conftest.$ac_objext
17148 if { (eval echo "$as_me:17148: \"$ac_compile\"") >&5
17149   (eval $ac_compile) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit $ac_status); } &&
17153          { ac_try='test -s conftest.$ac_objext'
17154   { (eval echo "$as_me:17154: \"$ac_try\"") >&5
17155   (eval $ac_try) 2>&5
17156   ac_status=$?
17157   echo "$as_me:17157: \$? = $ac_status" >&5
17158   (exit $ac_status); }; }; then
17159
17160         test -n "$cf_math" && cat >>confdefs.h <<EOF
17161 #define ETIP_NEEDS_${cf_math} 1
17162 EOF
17163
17164         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17165 #define ETIP_NEEDS_${cf_excp} 1
17166 EOF
17167
17168         cf_result="$cf_math $cf_excp"
17169         break
17170
17171 else
17172   echo "$as_me: failed program was:" >&5
17173 cat conftest.$ac_ext >&5
17174 fi
17175 rm -f conftest.$ac_objext conftest.$ac_ext
17176 done
17177 done
17178 echo "$as_me:17178: result: $cf_result" >&5
17179 echo "${ECHO_T}$cf_result" >&6
17180 CXXFLAGS="$cf_save_CXXFLAGS"
17181
17182 if test -n "$CXX"; then
17183 echo "$as_me:17183: checking if $CXX accepts parameter initialization" >&5
17184 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17185 if test "${cf_cv_cpp_param_init+set}" = set; then
17186   echo $ECHO_N "(cached) $ECHO_C" >&6
17187 else
17188
17189         ac_ext=cc
17190 ac_cpp='$CXXCPP $CPPFLAGS'
17191 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17192 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17193 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17194 ac_main_return=return
17195
17196         if test "$cross_compiling" = yes; then
17197   cf_cv_cpp_param_init=unknown
17198 else
17199   cat >conftest.$ac_ext <<_ACEOF
17200 #line 17200 "configure"
17201 #include "confdefs.h"
17202
17203 class TEST {
17204 private:
17205         int value;
17206 public:
17207         TEST(int x = 1);
17208         ~TEST();
17209 };
17210
17211 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17212 {
17213         value = x;
17214 }
17215 void main() { }
17216
17217 _ACEOF
17218 rm -f conftest$ac_exeext
17219 if { (eval echo "$as_me:17219: \"$ac_link\"") >&5
17220   (eval $ac_link) 2>&5
17221   ac_status=$?
17222   echo "$as_me:17222: \$? = $ac_status" >&5
17223   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17224   { (eval echo "$as_me:17224: \"$ac_try\"") >&5
17225   (eval $ac_try) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit $ac_status); }; }; then
17229   cf_cv_cpp_param_init=yes
17230 else
17231   echo "$as_me: program exited with status $ac_status" >&5
17232 echo "$as_me: failed program was:" >&5
17233 cat conftest.$ac_ext >&5
17234 cf_cv_cpp_param_init=no
17235 fi
17236 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17237 fi
17238         ac_ext=cc
17239 ac_cpp='$CXXCPP $CPPFLAGS'
17240 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17241 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17242 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17243 ac_main_return=return
17244
17245 fi
17246 echo "$as_me:17246: result: $cf_cv_cpp_param_init" >&5
17247 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17248 fi
17249 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17250 #define CPP_HAS_PARAM_INIT 1
17251 EOF
17252
17253 if test -n "$CXX"; then
17254
17255 echo "$as_me:17255: checking if $CXX accepts static_cast" >&5
17256 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17257 if test "${cf_cv_cpp_static_cast+set}" = set; then
17258   echo $ECHO_N "(cached) $ECHO_C" >&6
17259 else
17260
17261         ac_ext=cc
17262 ac_cpp='$CXXCPP $CPPFLAGS'
17263 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17264 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17265 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17266 ac_main_return=return
17267
17268         cat >conftest.$ac_ext <<_ACEOF
17269 #line 17269 "configure"
17270 #include "confdefs.h"
17271
17272 class NCursesPanel
17273 {
17274 public:
17275   NCursesPanel(int nlines,
17276                int ncols,
17277                int begin_y = 0,
17278                int begin_x = 0)
17279   {
17280   }
17281
17282   ~NCursesPanel();
17283 };
17284
17285 template<class T> class NCursesUserPanel : public NCursesPanel
17286 {
17287 public:
17288   NCursesUserPanel (int nlines,
17289                     int ncols,
17290                     int begin_y = 0,
17291                     int begin_x = 0,
17292                     const T* p_UserData = static_cast<T*>(0))
17293     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17294   {
17295   };
17296   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17297   {
17298   };
17299
17300   virtual ~NCursesUserPanel() {};
17301 };
17302
17303 int
17304 main ()
17305 {
17306
17307         const char* p_UserData = static_cast<char*>(0)
17308   ;
17309   return 0;
17310 }
17311 _ACEOF
17312 rm -f conftest.$ac_objext
17313 if { (eval echo "$as_me:17313: \"$ac_compile\"") >&5
17314   (eval $ac_compile) 2>&5
17315   ac_status=$?
17316   echo "$as_me:17316: \$? = $ac_status" >&5
17317   (exit $ac_status); } &&
17318          { ac_try='test -s conftest.$ac_objext'
17319   { (eval echo "$as_me:17319: \"$ac_try\"") >&5
17320   (eval $ac_try) 2>&5
17321   ac_status=$?
17322   echo "$as_me:17322: \$? = $ac_status" >&5
17323   (exit $ac_status); }; }; then
17324   cf_cv_cpp_static_cast=yes
17325 else
17326   echo "$as_me: failed program was:" >&5
17327 cat conftest.$ac_ext >&5
17328 cf_cv_cpp_static_cast=no
17329 fi
17330 rm -f conftest.$ac_objext conftest.$ac_ext
17331
17332         ac_ext=cc
17333 ac_cpp='$CXXCPP $CPPFLAGS'
17334 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17335 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17336 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17337 ac_main_return=return
17338
17339 fi
17340 echo "$as_me:17340: result: $cf_cv_cpp_static_cast" >&5
17341 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17342
17343 fi
17344
17345 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17346 #define CPP_HAS_STATIC_CAST 1
17347 EOF
17348
17349         CXX_AR='$(AR)'
17350         CXX_ARFLAGS='$(ARFLAGS)'
17351         case $cf_cv_system_name in #(vi
17352         irix*) #(vi
17353             if test "$GXX" != yes ; then
17354                 CXX_AR='$(CXX)'
17355                 CXX_ARFLAGS='-ar -o'
17356             fi
17357             ;;
17358         sco3.2v5*) #(vi
17359             CXXLDFLAGS="-u main"
17360             ;;
17361         solaris2*)
17362             if test "$GXX" != yes ; then
17363                 CXX_AR='$(CXX)'
17364                 CXX_ARFLAGS='-xar -o'
17365             fi
17366             ;;
17367         esac
17368
17369 else
17370         cf_cxx_library=no
17371         cf_cv_builtin_bool=1
17372
17373         # Just because we are not configuring against C++ right now does not
17374         # mean that a user will not want to use C++.  Some distributors disable
17375         # the C++ portion of this configuration as a shortcut (or just to avoid
17376         # compiling the demo in the c++ directory).  So we need a reasonable
17377         # default for the 'bool' type.
17378         #
17379         # Caveat: since the storage of the bool type is not standardized, it
17380         # may change.
17381
17382         if test "$NCURSES_BOOL" != auto ; then
17383                 cf_cv_type_of_bool=$NCURSES_BOOL
17384                 cf_cv_header_stdbool_h=0
17385         else
17386                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17387
17388 echo "$as_me:17388: checking for size of bool" >&5
17389 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17390 if test "${cf_cv_type_of_bool+set}" = set; then
17391   echo $ECHO_N "(cached) $ECHO_C" >&6
17392 else
17393
17394         rm -f cf_test.out
17395         if test "$cross_compiling" = yes; then
17396   cf_cv_type_of_bool=unknown
17397 else
17398   cat >conftest.$ac_ext <<_ACEOF
17399 #line 17399 "configure"
17400 #include "confdefs.h"
17401
17402 #include <stdlib.h>
17403 #include <stdio.h>
17404
17405 #if defined(__cplusplus)
17406
17407 #ifdef HAVE_GXX_BUILTIN_H
17408 #include <g++/builtin.h>
17409 #elif HAVE_GPP_BUILTIN_H
17410 #include <gpp/builtin.h>
17411 #elif HAVE_BUILTIN_H
17412 #include <builtin.h>
17413 #endif
17414
17415 #else
17416
17417 #if $cf_cv_header_stdbool_h
17418 #include <stdbool.h>
17419 #endif
17420
17421 #endif
17422
17423 main()
17424 {
17425         FILE *fp = fopen("cf_test.out", "w");
17426         if (fp != 0) {
17427                 bool x = true;
17428                 if ((bool)(-x) >= 0)
17429                         fputs("unsigned ", fp);
17430                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17431                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17432                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17433                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17434                 fclose(fp);
17435         }
17436         ${cf_cv_main_return:-return}(0);
17437 }
17438
17439 _ACEOF
17440 rm -f conftest$ac_exeext
17441 if { (eval echo "$as_me:17441: \"$ac_link\"") >&5
17442   (eval $ac_link) 2>&5
17443   ac_status=$?
17444   echo "$as_me:17444: \$? = $ac_status" >&5
17445   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17446   { (eval echo "$as_me:17446: \"$ac_try\"") >&5
17447   (eval $ac_try) 2>&5
17448   ac_status=$?
17449   echo "$as_me:17449: \$? = $ac_status" >&5
17450   (exit $ac_status); }; }; then
17451   cf_cv_type_of_bool=`cat cf_test.out`
17452                  if test -z "$cf_cv_type_of_bool"; then
17453                    cf_cv_type_of_bool=unknown
17454                  fi
17455 else
17456   echo "$as_me: program exited with status $ac_status" >&5
17457 echo "$as_me: failed program was:" >&5
17458 cat conftest.$ac_ext >&5
17459 cf_cv_type_of_bool=unknown
17460 fi
17461 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17462 fi
17463
17464 fi
17465
17466         rm -f cf_test.out
17467 echo "$as_me:17467: result: $cf_cv_type_of_bool" >&5
17468 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17469 if test "$cf_cv_type_of_bool" = unknown ; then
17470         case .$NCURSES_BOOL in #(vi
17471         .auto|.) NCURSES_BOOL=unsigned;;
17472         esac
17473         { echo "$as_me:17473: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17474 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17475         cf_cv_type_of_bool=$NCURSES_BOOL
17476 fi
17477
17478                 else
17479                         echo "$as_me:17479: checking for fallback type of bool" >&5
17480 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17481                         case "$host_cpu" in #(vi
17482                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17483                         *)      cf_cv_type_of_bool=int  ;;
17484                         esac
17485                         echo "$as_me:17485: result: $cf_cv_type_of_bool" >&5
17486 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17487                 fi
17488         fi
17489 fi
17490
17491 # If the C compiler did not declare bool, and we did not determine that the C++
17492 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17493 # ncurses library use the same type as C++ bool.  Note that this allows one to
17494 # specify the type of bool in a configure-script option and postpone
17495 # integration with the C++ compiler provided that the types are compatible.
17496 USE_CXX_BOOL=1
17497 if test $cf_cv_cc_bool_type = 1
17498 then
17499         # oops: C has a bool.  Unlikely, but C++ could differ.
17500         USE_CXX_BOOL=0
17501 elif test $cf_cv_builtin_bool = 0
17502 then
17503         # C++ has no bool
17504         USE_CXX_BOOL=0
17505 else
17506         # this is the normal case
17507         USE_CXX_BOOL='defined(__cplusplus)'
17508 fi
17509
17510 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17511
17512 if test "$cf_with_ada" != "no" ; then
17513     if test "$with_libtool" != "no"; then
17514         { echo "$as_me:17514: WARNING: libtool does not support Ada - disabling feature" >&5
17515 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17516         cf_with_ada=no
17517     fi
17518 fi
17519
17520 if test "$cf_with_ada" != "no" ; then
17521 cf_ada_make=gnatmake
17522 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17523 set dummy $cf_ada_make; ac_word=$2
17524 echo "$as_me:17524: checking for $ac_word" >&5
17525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17526 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17527   echo $ECHO_N "(cached) $ECHO_C" >&6
17528 else
17529   if test -n "$gnat_exists"; then
17530   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17531 else
17532   ac_save_IFS=$IFS; IFS=$ac_path_separator
17533 ac_dummy="$PATH"
17534 for ac_dir in $ac_dummy; do
17535   IFS=$ac_save_IFS
17536   test -z "$ac_dir" && ac_dir=.
17537   $as_executable_p "$ac_dir/$ac_word" || continue
17538 ac_cv_prog_gnat_exists="yes"
17539 echo "$as_me:17539: found $ac_dir/$ac_word" >&5
17540 break
17541 done
17542
17543   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17544 fi
17545 fi
17546 gnat_exists=$ac_cv_prog_gnat_exists
17547 if test -n "$gnat_exists"; then
17548   echo "$as_me:17548: result: $gnat_exists" >&5
17549 echo "${ECHO_T}$gnat_exists" >&6
17550 else
17551   echo "$as_me:17551: result: no" >&5
17552 echo "${ECHO_T}no" >&6
17553 fi
17554
17555 if test "$ac_cv_prog_gnat_exists" = no; then
17556    cf_ada_make=
17557 else
17558
17559 echo "$as_me:17559: checking for gnat version" >&5
17560 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17561 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17562   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17563 echo "$as_me:17563: result: $cf_gnat_version" >&5
17564 echo "${ECHO_T}$cf_gnat_version" >&6
17565
17566 case $cf_gnat_version in
17567   3.1[1-9]*|3.[2-9]*|[4-9].*)
17568     cf_cv_prog_gnat_correct=yes
17569     ;;
17570   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17571      cf_cv_prog_gnat_correct=no
17572      ;;
17573 esac
17574 case $cf_gnat_version in
17575   3.[1-9]*|[4-9].*)
17576       cf_compile_generics=generics
17577       cf_generic_objects="\${GENOBJS}"
17578       ;;
17579   *)  cf_compile_generics=
17580       cf_generic_objects=
17581       ;;
17582 esac
17583
17584    # Extract the first word of "m4", so it can be a program name with args.
17585 set dummy m4; ac_word=$2
17586 echo "$as_me:17586: checking for $ac_word" >&5
17587 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17588 if test "${ac_cv_prog_M4_exists+set}" = set; then
17589   echo $ECHO_N "(cached) $ECHO_C" >&6
17590 else
17591   if test -n "$M4_exists"; then
17592   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17593 else
17594   ac_save_IFS=$IFS; IFS=$ac_path_separator
17595 ac_dummy="$PATH"
17596 for ac_dir in $ac_dummy; do
17597   IFS=$ac_save_IFS
17598   test -z "$ac_dir" && ac_dir=.
17599   $as_executable_p "$ac_dir/$ac_word" || continue
17600 ac_cv_prog_M4_exists="yes"
17601 echo "$as_me:17601: found $ac_dir/$ac_word" >&5
17602 break
17603 done
17604
17605   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17606 fi
17607 fi
17608 M4_exists=$ac_cv_prog_M4_exists
17609 if test -n "$M4_exists"; then
17610   echo "$as_me:17610: result: $M4_exists" >&5
17611 echo "${ECHO_T}$M4_exists" >&6
17612 else
17613   echo "$as_me:17613: result: no" >&5
17614 echo "${ECHO_T}no" >&6
17615 fi
17616
17617    if test "$ac_cv_prog_M4_exists" = no; then
17618       cf_cv_prog_gnat_correct=no
17619       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17620    fi
17621    if test "$cf_cv_prog_gnat_correct" = yes; then
17622       echo "$as_me:17622: checking if GNAT works" >&5
17623 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17624
17625 rm -f conftest*
17626 cat >>conftest.ads <<CF_EOF
17627 procedure conftest;
17628 CF_EOF
17629 cat >>conftest.adb <<CF_EOF
17630 with Text_IO;
17631 with GNAT.OS_Lib;
17632 procedure conftest is
17633 begin
17634    Text_IO.Put ("Hello World");
17635    Text_IO.New_Line;
17636    GNAT.OS_Lib.OS_Exit (0);
17637 end conftest;
17638 CF_EOF
17639 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17640    if ( ./conftest 1>&5 2>&1 ) ; then
17641       cf_cv_prog_gnat_correct=yes
17642    else
17643       cf_cv_prog_gnat_correct=no
17644    fi
17645 else
17646    cf_cv_prog_gnat_correct=no
17647 fi
17648 rm -f conftest*
17649
17650       echo "$as_me:17650: result: $cf_cv_prog_gnat_correct" >&5
17651 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17652    fi
17653 fi
17654 if test "$cf_cv_prog_gnat_correct" = yes; then
17655    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17656
17657    echo "$as_me:17657: checking if GNAT pragma Unreferenced works" >&5
17658 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17659
17660 rm -f conftest*
17661 cat >>conftest.ads <<CF_EOF
17662 procedure conftest;
17663 CF_EOF
17664 cat >>conftest.adb <<CF_EOF
17665 with Text_IO;
17666 with GNAT.OS_Lib;
17667 procedure conftest is
17668    test : Integer;
17669    pragma Unreferenced (test);
17670 begin
17671    test := 1;
17672    Text_IO.Put ("Hello World");
17673    Text_IO.New_Line;
17674    GNAT.OS_Lib.OS_Exit (0);
17675 end conftest;
17676 CF_EOF
17677 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17678       cf_cv_pragma_unreferenced=yes
17679 else
17680    cf_cv_pragma_unreferenced=no
17681 fi
17682 rm -f conftest*
17683
17684    echo "$as_me:17684: result: $cf_cv_pragma_unreferenced" >&5
17685 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17686
17687    # if the pragma is supported, use it (needed in the Trace code).
17688    if test $cf_cv_pragma_unreferenced = yes ; then
17689       PRAGMA_UNREF=TRUE
17690    else
17691       PRAGMA_UNREF=FALSE
17692    fi
17693
17694 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17695 if test "${with_ada_compiler+set}" = set; then
17696   withval="$with_ada_compiler"
17697   cf_ada_compiler=$withval
17698 else
17699   cf_ada_compiler=gnatmake
17700 fi;
17701
17702    cf_ada_package=terminal_interface
17703
17704 # Check whether --with-ada-include or --without-ada-include was given.
17705 if test "${with_ada_include+set}" = set; then
17706   withval="$with_ada_include"
17707
17708 else
17709   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17710 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17711
17712 if test "x$prefix" != xNONE; then
17713   cf_path_syntax="$prefix"
17714 else
17715   cf_path_syntax="$ac_default_prefix"
17716 fi
17717
17718 case ".$withval" in #(vi
17719 .\$\(*\)*|.\'*\'*) #(vi
17720   ;;
17721 ..|./*|.\\*) #(vi
17722   ;;
17723 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17724   ;;
17725 .\${*prefix}*) #(vi
17726   eval withval="$withval"
17727   case ".$withval" in #(vi
17728   .NONE/*)
17729     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17730     ;;
17731   esac
17732   ;; #(vi
17733 .no|.NONE/*)
17734   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17735   ;;
17736 *)
17737   { { echo "$as_me:17737: error: expected a pathname, not \"$withval\"" >&5
17738 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17739    { (exit 1); exit 1; }; }
17740   ;;
17741 esac
17742
17743 fi
17744 ADA_INCLUDE="$withval"
17745
17746 # Check whether --with-ada-objects or --without-ada-objects was given.
17747 if test "${with_ada_objects+set}" = set; then
17748   withval="$with_ada_objects"
17749
17750 else
17751   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17752 fi; if test -n "$prefix/lib/ada/adalib" ; then
17753
17754 if test "x$prefix" != xNONE; then
17755   cf_path_syntax="$prefix"
17756 else
17757   cf_path_syntax="$ac_default_prefix"
17758 fi
17759
17760 case ".$withval" in #(vi
17761 .\$\(*\)*|.\'*\'*) #(vi
17762   ;;
17763 ..|./*|.\\*) #(vi
17764   ;;
17765 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17766   ;;
17767 .\${*prefix}*) #(vi
17768   eval withval="$withval"
17769   case ".$withval" in #(vi
17770   .NONE/*)
17771     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17772     ;;
17773   esac
17774   ;; #(vi
17775 .no|.NONE/*)
17776   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17777   ;;
17778 *)
17779   { { echo "$as_me:17779: error: expected a pathname, not \"$withval\"" >&5
17780 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17781    { (exit 1); exit 1; }; }
17782   ;;
17783 esac
17784
17785 fi
17786 ADA_OBJECTS="$withval"
17787
17788 fi
17789 fi
17790 else
17791    cf_with_ada=no
17792 fi
17793
17794 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17795 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17796 ###
17797 ### ticlib modules may be a separate library, otherwise contained in termlib.
17798 ### termlib modules may be a separate library, otherwise contained in ncurses.
17799 ###
17800 ### The of "+" or " " between the tokens controls the way the script
17801 ### chooses to split module lists into libraries.
17802 ###
17803 ### (see CF_LIB_RULES).
17804 echo "$as_me:17804: checking for library subsets" >&5
17805 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17806 LIB_SUBSETS=
17807
17808 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17809         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17810         if test "$with_ticlib" != no ; then
17811                 LIB_SUBSETS="${LIB_SUBSETS} "
17812         else
17813                 LIB_SUBSETS="${LIB_SUBSETS}+"
17814         fi
17815 fi
17816
17817 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17818 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17819
17820 if test "$with_termlib" != no ; then
17821         LIB_SUBSETS="${LIB_SUBSETS} "
17822 else
17823         LIB_SUBSETS="${LIB_SUBSETS}+"
17824 fi
17825
17826 LIB_SUBSETS="${LIB_SUBSETS}base"
17827
17828 # Most term-driver calls are to tinfo, but some like init_pair are to the
17829 # base library (so it resides in base).
17830 if test "$with_term_driver" != no ; then
17831         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17832         case $cf_cv_system_name in #(vi
17833         *mingw32*) #(vi
17834                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17835                 ;;
17836         *) #(vi
17837                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17838                 ;;
17839         esac
17840 fi
17841
17842 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17843 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17844
17845 echo "$as_me:17845: result: $LIB_SUBSETS" >&5
17846 echo "${ECHO_T}$LIB_SUBSETS" >&6
17847
17848 ### Construct the list of include-directories to be generated
17849
17850 CPPFLAGS="$CPPFLAGS -I. -I../include"
17851 if test "$srcdir" != "."; then
17852         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17853 fi
17854 if test "$GCC" != yes; then
17855         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17856 elif test "$includedir" != "/usr/include"; then
17857         if test "$includedir" = '${prefix}/include' ; then
17858                 if test $prefix != /usr ; then
17859                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17860                 fi
17861         else
17862                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17863         fi
17864 fi
17865
17866 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17867 if test "$srcdir" != "."; then
17868         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17869 fi
17870 if test "$GCC" != yes; then
17871         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17872 elif test "$includedir" != "/usr/include"; then
17873         if test "$includedir" = '${prefix}/include' ; then
17874                 if test $prefix != /usr ; then
17875                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17876                 fi
17877         else
17878                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17879         fi
17880 fi
17881
17882 ### Build up pieces for makefile rules
17883 echo "$as_me:17883: checking default library suffix" >&5
17884 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17885
17886         case $DFT_LWR_MODEL in
17887         libtool) DFT_ARG_SUFFIX=''   ;;
17888         normal)  DFT_ARG_SUFFIX=''   ;;
17889         debug)   DFT_ARG_SUFFIX='_g' ;;
17890         profile) DFT_ARG_SUFFIX='_p' ;;
17891         shared)  DFT_ARG_SUFFIX=''   ;;
17892         esac
17893         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17894 echo "$as_me:17894: result: $DFT_ARG_SUFFIX" >&5
17895 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17896
17897 echo "$as_me:17897: checking default library-dependency suffix" >&5
17898 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17899
17900         case $DFT_LWR_MODEL in #(vi
17901         libtool) #(vi
17902                 DFT_LIB_SUFFIX='.la'
17903                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17904                 ;;
17905         normal) #(vi
17906                 DFT_LIB_SUFFIX='.a'
17907                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17908                 ;;
17909         debug) #(vi
17910                 DFT_LIB_SUFFIX='_g.a'
17911                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17912                 ;;
17913         profile) #(vi
17914                 DFT_LIB_SUFFIX='_p.a'
17915                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17916                 ;;
17917         shared) #(vi
17918                 case $cf_cv_system_name in
17919                 aix[56]*) #(vi
17920                         DFT_LIB_SUFFIX='.a'
17921                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17922                         ;;
17923                 cygwin*) #(vi
17924                         DFT_LIB_SUFFIX='.dll'
17925                         DFT_DEP_SUFFIX='.dll.a'
17926                         ;;
17927                 darwin*) #(vi
17928                         DFT_LIB_SUFFIX='.dylib'
17929                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17930                         ;;
17931                 hpux*) #(vi
17932                         case $target in
17933                         ia64*) #(vi
17934                                 DFT_LIB_SUFFIX='.so'
17935                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17936                                 ;;
17937                         *) #(vi
17938                                 DFT_LIB_SUFFIX='.sl'
17939                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17940                                 ;;
17941                         esac
17942                         ;;
17943                 *)      DFT_LIB_SUFFIX='.so'
17944                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17945                         ;;
17946                 esac
17947         esac
17948         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17949         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17950 echo "$as_me:17950: result: $DFT_DEP_SUFFIX" >&5
17951 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17952
17953 echo "$as_me:17953: checking default object directory" >&5
17954 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17955
17956         case $DFT_LWR_MODEL in
17957         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17958         normal)  DFT_OBJ_SUBDIR='objects' ;;
17959         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17960         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17961         shared)
17962                 case $cf_cv_system_name in #(vi
17963                 cygwin) #(vi
17964                         DFT_OBJ_SUBDIR='objects' ;;
17965                 *)
17966                         DFT_OBJ_SUBDIR='obj_s' ;;
17967                 esac
17968         esac
17969 echo "$as_me:17969: result: $DFT_OBJ_SUBDIR" >&5
17970 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17971
17972 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17973 if test "$cf_with_cxx" = yes ; then
17974 echo "$as_me:17974: checking c++ library-dependency suffix" >&5
17975 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17976 if test "$with_libtool" != "no"; then
17977         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17978 else
17979
17980         case normal in #(vi
17981         libtool) #(vi
17982                 CXX_LIB_SUFFIX='.la'
17983                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17984                 ;;
17985         normal) #(vi
17986                 CXX_LIB_SUFFIX='.a'
17987                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17988                 ;;
17989         debug) #(vi
17990                 CXX_LIB_SUFFIX='_g.a'
17991                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17992                 ;;
17993         profile) #(vi
17994                 CXX_LIB_SUFFIX='_p.a'
17995                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17996                 ;;
17997         shared) #(vi
17998                 case $cf_cv_system_name in
17999                 aix[56]*) #(vi
18000                         CXX_LIB_SUFFIX='.a'
18001                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18002                         ;;
18003                 cygwin*) #(vi
18004                         CXX_LIB_SUFFIX='.dll'
18005                         CXX_DEP_SUFFIX='.dll.a'
18006                         ;;
18007                 darwin*) #(vi
18008                         CXX_LIB_SUFFIX='.dylib'
18009                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18010                         ;;
18011                 hpux*) #(vi
18012                         case $target in
18013                         ia64*) #(vi
18014                                 CXX_LIB_SUFFIX='.so'
18015                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18016                                 ;;
18017                         *) #(vi
18018                                 CXX_LIB_SUFFIX='.sl'
18019                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18020                                 ;;
18021                         esac
18022                         ;;
18023                 *)      CXX_LIB_SUFFIX='.so'
18024                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18025                         ;;
18026                 esac
18027         esac
18028         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18029         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18030 fi
18031 echo "$as_me:18031: result: $CXX_LIB_SUFFIX" >&5
18032 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18033
18034 fi
18035
18036 # do not want -ldl in build except as needed for -lncurses dependency
18037 if test "$with_dlsym" = yes ; then
18038 if test $DFT_LWR_MODEL = shared || \
18039    test $DFT_LWR_MODEL = libtool ; then
18040
18041 # remove dl library from $LIBS
18042 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18043
18044 fi
18045 fi
18046 ### Set up low-level terminfo dependencies for makefiles.
18047
18048 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18049 # do not need libdl
18050 TICS_LIST=
18051 if test "$with_dlsym" = yes ; then
18052
18053 # remove dl library from $SHLIB_LIST
18054 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18055
18056 fi
18057
18058 if test "$with_ticlib" != no ; then
18059
18060         if test "$with_ticlib" != yes ; then
18061                 TICS_NAME=$with_ticlib
18062                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18063                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18064                 TICS_LIB_SUFFIX="${with_ticlib}"
18065         else
18066                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18067                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18068                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18069         fi
18070         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18071 else
18072         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18073 fi
18074
18075 if test "$with_termlib" != no ; then
18076
18077         if test "$with_termlib" != yes ; then
18078                 TINFO_NAME=$with_termlib
18079                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18080                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18081                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18082                 TINFO_LIB_SUFFIX="${with_termlib}"
18083         else
18084                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18085                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18086                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18087                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18088         fi
18089
18090         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18091         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18092         if test "$DFT_LWR_MODEL" = "libtool"; then
18093                 TEST_ARGS="${TEST_DEPS}"
18094                 TEST_ARG2="${TEST_DEP2}"
18095                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18096                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18097                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18098         else
18099                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18100                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18101                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18102                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18103                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18104         fi
18105 else
18106         # the next lines are needed for linking libtic over libncurses
18107         TINFO_NAME=${LIB_NAME}
18108         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18109         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18110         if test "$with_tic_depends" = yes ; then
18111                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18112         else
18113                 TICS_LIST="$SHLIB_LIST"
18114         fi
18115
18116         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18117 fi
18118
18119 if test "$DFT_LWR_MODEL" = shared ; then
18120         case $cf_cv_system_name in #(vi
18121         cygwin*)
18122                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18123                 TINFO_SUFFIX=.dll
18124                 ;;
18125         esac
18126 fi
18127
18128 if test "$with_dlsym" = yes ; then
18129
18130 # remove dl library from $TICS_LIST
18131 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18132
18133 fi
18134
18135 if test "$DFT_LWR_MODEL" = "libtool"; then
18136     OBJEXT=lo
18137 fi
18138
18139 # needed for Ada95
18140 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18141
18142 case $DFT_LWR_MODEL in
18143 normal|debug|profile)
18144
18145 if test "$GCC" = yes ; then
18146         case $cf_cv_system_name in #(
18147         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18148                 LDFLAGS_STATIC=
18149                 LDFLAGS_SHARED=
18150                 ;;
18151     *)  #( normally, except when broken
18152         LDFLAGS_STATIC=-static
18153         LDFLAGS_SHARED=-dynamic
18154         ;;
18155     esac
18156 else
18157         case $cf_cv_system_name in #(
18158         aix[456]*)      #( from ld manpage
18159                 LDFLAGS_STATIC=-bstatic
18160                 LDFLAGS_SHARED=-bdynamic
18161                 ;;
18162         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18163                 # We could also use just "archive" and "shared".
18164                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18165                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18166                 ;;
18167         irix*)          #( from ld manpage IRIX64
18168                 LDFLAGS_STATIC=-Bstatic
18169                 LDFLAGS_SHARED=-Bdynamic
18170                 ;;
18171         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18172                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18173                 LDFLAGS_STATIC=-noso
18174                 LDFLAGS_SHARED=-so_archive
18175                 ;;
18176         solaris2*)
18177                 LDFLAGS_STATIC=-Bstatic
18178                 LDFLAGS_SHARED=-Bdynamic
18179                 ;;
18180         esac
18181 fi
18182
18183         ;;
18184 esac
18185
18186 echo "$as_me:18186: checking where we will install curses.h" >&5
18187 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18188 test "$with_overwrite" = no && \
18189 test "x$includedir" = 'x${prefix}/include' && \
18190         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18191 echo "$as_me:18191: result: $includedir" >&5
18192 echo "${ECHO_T}$includedir" >&6
18193
18194 ### Resolve a conflict between normal and wide-curses by forcing applications
18195 ### that will need libutf8 to add it to their configure script.
18196 if test "$with_overwrite" != no ; then
18197 if test "$NCURSES_LIBUTF8" = 1 ; then
18198         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18199         { echo "$as_me:18199: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18200 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18201 fi
18202 fi
18203 WITH_OVERWRITE=$with_overwrite
18204
18205 # used to separate tack out of the tree
18206 NCURSES_TREE=
18207
18208 ### predefined stuff for the test programs
18209 cat >>confdefs.h <<\EOF
18210 #define HAVE_SLK_COLOR 1
18211 EOF
18212
18213 ### Construct the list of subdirectories for which we'll customize makefiles
18214 ### with the appropriate compile-rules.
18215
18216 echo "$as_me:18216: checking for src modules" >&5
18217 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18218
18219 # dependencies and linker-arguments for test-programs
18220 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18221 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18222 if test "$DFT_LWR_MODEL" = "libtool"; then
18223         TEST_ARGS="${TEST_DEPS}"
18224         TEST_ARG2="${TEST_DEP2}"
18225 else
18226         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18227         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18228 fi
18229
18230 cf_cv_src_modules=
18231 for cf_dir in $modules_to_build
18232 do
18233         if test -f $srcdir/$cf_dir/modules; then
18234
18235                 # We may/may not have tack in the distribution, though the
18236                 # makefile is.
18237                 if test $cf_dir = tack ; then
18238                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18239                                 continue
18240                         fi
18241                 fi
18242
18243                 if test -z "$cf_cv_src_modules"; then
18244                         cf_cv_src_modules=$cf_dir
18245                 else
18246                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18247                 fi
18248
18249                 # Make the ncurses_cfg.h file record the library interface files as
18250                 # well.  These are header files that are the same name as their
18251                 # directory.  Ncurses is the only library that does not follow
18252                 # that pattern.
18253                 if test $cf_dir = tack ; then
18254                         continue
18255                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18256
18257 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18258
18259                         cat >>confdefs.h <<EOF
18260 #define HAVE_${cf_have_include}_H 1
18261 EOF
18262
18263                         cat >>confdefs.h <<EOF
18264 #define HAVE_LIB${cf_have_include} 1
18265 EOF
18266
18267                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18268                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18269                         if test "$DFT_LWR_MODEL" = "libtool"; then
18270                                 TEST_ARGS="${TEST_DEPS}"
18271                                 TEST_ARG2="${TEST_DEP2}"
18272                         else
18273                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18274                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18275                         fi
18276                 fi
18277         fi
18278 done
18279 echo "$as_me:18279: result: $cf_cv_src_modules" >&5
18280 echo "${ECHO_T}$cf_cv_src_modules" >&6
18281
18282 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18283 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18284
18285 SRC_SUBDIRS=
18286 if test "x$cf_with_manpages" != xno ; then
18287         SRC_SUBDIRS="$SRC_SUBDIRS man"
18288 fi
18289 SRC_SUBDIRS="$SRC_SUBDIRS include"
18290 for cf_dir in $cf_cv_src_modules
18291 do
18292         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18293 done
18294 SRC_SUBDIRS="$SRC_SUBDIRS test"
18295 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18296 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18297
18298 ADA_SUBDIRS=
18299 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18300         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18301         ADA_SUBDIRS="gen src samples"
18302 fi
18303
18304 SUB_MAKEFILES=
18305 for cf_dir in $SRC_SUBDIRS
18306 do
18307         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18308 done
18309
18310 if test -n "$ADA_SUBDIRS"; then
18311         for cf_dir in $ADA_SUBDIRS
18312         do
18313                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18314         done
18315
18316 fi
18317
18318 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18319    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18320    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18321 fi
18322
18323 DIRS_TO_MAKE="lib"
18324 for cf_item in $cf_list_models
18325 do
18326
18327         case $cf_item in
18328         libtool) cf_subdir='obj_lo'  ;;
18329         normal)  cf_subdir='objects' ;;
18330         debug)   cf_subdir='obj_g' ;;
18331         profile) cf_subdir='obj_p' ;;
18332         shared)
18333                 case $cf_cv_system_name in #(vi
18334                 cygwin) #(vi
18335                         cf_subdir='objects' ;;
18336                 *)
18337                         cf_subdir='obj_s' ;;
18338                 esac
18339         esac
18340
18341         for cf_item2 in $DIRS_TO_MAKE
18342         do
18343                 test $cf_item2 = $cf_subdir && break
18344         done
18345         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18346 done
18347 for cf_dir in $DIRS_TO_MAKE
18348 do
18349         test ! -d $cf_dir && mkdir $cf_dir
18350 done
18351
18352 # symbols that differ when compiling Ada95 by itself.
18353 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18354
18355 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18356
18357 # values to use as strings
18358 cat >>confdefs.h <<EOF
18359 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18360 EOF
18361
18362 cat >>confdefs.h <<EOF
18363 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18364 EOF
18365
18366 ### Now that we're done running tests, add the compiler-warnings, if any
18367
18368 cf_fix_cppflags=no
18369 cf_new_cflags=
18370 cf_new_cppflags=
18371 cf_new_extra_cppflags=
18372
18373 for cf_add_cflags in $EXTRA_CFLAGS
18374 do
18375 case $cf_fix_cppflags in
18376 no)
18377         case $cf_add_cflags in #(vi
18378         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18379                 case $cf_add_cflags in
18380                 -D*)
18381                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18382
18383                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18384                                 && test -z "${cf_tst_cflags}" \
18385                                 && cf_fix_cppflags=yes
18386
18387                         if test $cf_fix_cppflags = yes ; then
18388                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18389                                 continue
18390                         elif test "${cf_tst_cflags}" = "\"'" ; then
18391                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18392                                 continue
18393                         fi
18394                         ;;
18395                 esac
18396                 case "$CPPFLAGS" in
18397                 *$cf_add_cflags) #(vi
18398                         ;;
18399                 *) #(vi
18400                         case $cf_add_cflags in #(vi
18401                         -D*)
18402                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18403
18404 CPPFLAGS=`echo "$CPPFLAGS" | \
18405         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18406                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18407
18408                                 ;;
18409                         esac
18410                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18411                         ;;
18412                 esac
18413                 ;;
18414         *)
18415                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18416                 ;;
18417         esac
18418         ;;
18419 yes)
18420         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18421
18422         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18423
18424         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18425                 && test -z "${cf_tst_cflags}" \
18426                 && cf_fix_cppflags=no
18427         ;;
18428 esac
18429 done
18430
18431 if test -n "$cf_new_cflags" ; then
18432
18433         CFLAGS="$CFLAGS $cf_new_cflags"
18434 fi
18435
18436 if test -n "$cf_new_cppflags" ; then
18437
18438         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18439 fi
18440
18441 if test -n "$cf_new_extra_cppflags" ; then
18442
18443         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18444 fi
18445
18446 ### If we're building with rpath, try to link non-standard libs that way too.
18447 if test "$DFT_LWR_MODEL" = "shared"; then
18448
18449 echo "$as_me:18449: checking if rpath should be not be set" >&5
18450 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
18451
18452 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18453 if test "${enable_rpath_hack+set}" = set; then
18454   enableval="$enable_rpath_hack"
18455   test "$enableval" != no && enableval=yes
18456   if test "$enableval" != "yes" ; then
18457     cf_disable_rpath_hack=yes
18458   else
18459     cf_disable_rpath_hack=no
18460   fi
18461 else
18462   enableval=yes
18463   cf_disable_rpath_hack=no
18464
18465 fi;
18466 echo "$as_me:18466: result: $cf_disable_rpath_hack" >&5
18467 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18468 if test "$cf_disable_rpath_hack" = no ; then
18469
18470 echo "$as_me:18470: checking for updated LDFLAGS" >&5
18471 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18472 if test -n "$LD_RPATH_OPT" ; then
18473         echo "$as_me:18473: result: maybe" >&5
18474 echo "${ECHO_T}maybe" >&6
18475
18476         for ac_prog in ldd
18477 do
18478   # Extract the first word of "$ac_prog", so it can be a program name with args.
18479 set dummy $ac_prog; ac_word=$2
18480 echo "$as_me:18480: checking for $ac_word" >&5
18481 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18482 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18483   echo $ECHO_N "(cached) $ECHO_C" >&6
18484 else
18485   if test -n "$cf_ldd_prog"; then
18486   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18487 else
18488   ac_save_IFS=$IFS; IFS=$ac_path_separator
18489 ac_dummy="$PATH"
18490 for ac_dir in $ac_dummy; do
18491   IFS=$ac_save_IFS
18492   test -z "$ac_dir" && ac_dir=.
18493   $as_executable_p "$ac_dir/$ac_word" || continue
18494 ac_cv_prog_cf_ldd_prog="$ac_prog"
18495 echo "$as_me:18495: found $ac_dir/$ac_word" >&5
18496 break
18497 done
18498
18499 fi
18500 fi
18501 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18502 if test -n "$cf_ldd_prog"; then
18503   echo "$as_me:18503: result: $cf_ldd_prog" >&5
18504 echo "${ECHO_T}$cf_ldd_prog" >&6
18505 else
18506   echo "$as_me:18506: result: no" >&5
18507 echo "${ECHO_T}no" >&6
18508 fi
18509
18510   test -n "$cf_ldd_prog" && break
18511 done
18512 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18513
18514         cf_rpath_list="/usr/lib /lib"
18515         if test "$cf_ldd_prog" != no
18516         then
18517 cat >conftest.$ac_ext <<_ACEOF
18518 #line 18518 "configure"
18519 #include "confdefs.h"
18520 #include <stdio.h>
18521 int
18522 main ()
18523 {
18524 printf("Hello");
18525   ;
18526   return 0;
18527 }
18528 _ACEOF
18529 rm -f conftest.$ac_objext conftest$ac_exeext
18530 if { (eval echo "$as_me:18530: \"$ac_link\"") >&5
18531   (eval $ac_link) 2>&5
18532   ac_status=$?
18533   echo "$as_me:18533: \$? = $ac_status" >&5
18534   (exit $ac_status); } &&
18535          { ac_try='test -s conftest$ac_exeext'
18536   { (eval echo "$as_me:18536: \"$ac_try\"") >&5
18537   (eval $ac_try) 2>&5
18538   ac_status=$?
18539   echo "$as_me:18539: \$? = $ac_status" >&5
18540   (exit $ac_status); }; }; then
18541   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
18542 else
18543   echo "$as_me: failed program was:" >&5
18544 cat conftest.$ac_ext >&5
18545 fi
18546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18547         fi
18548
18549         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18550
18551 echo "${as_me-configure}:18551: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18552
18553 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18554
18555 echo "${as_me-configure}:18555: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18556
18557 cf_rpath_dst=
18558 for cf_rpath_src in $LDFLAGS
18559 do
18560         case $cf_rpath_src in #(vi
18561         -L*) #(vi
18562
18563                 # check if this refers to a directory which we will ignore
18564                 cf_rpath_skip=no
18565                 if test -n "$cf_rpath_list"
18566                 then
18567                         for cf_rpath_item in $cf_rpath_list
18568                         do
18569                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18570                                 then
18571                                         cf_rpath_skip=yes
18572                                         break
18573                                 fi
18574                         done
18575                 fi
18576
18577                 if test "$cf_rpath_skip" = no
18578                 then
18579                         # transform the option
18580                         if test "$LD_RPATH_OPT" = "-R " ; then
18581                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18582                         else
18583                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18584                         fi
18585
18586                         # if we have not already added this, add it now
18587                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18588                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18589                         then
18590                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18591
18592 echo "${as_me-configure}:18592: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18593
18594                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18595                         fi
18596                 fi
18597                 ;;
18598         esac
18599         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18600 done
18601 LDFLAGS=$cf_rpath_dst
18602
18603 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18604
18605 echo "${as_me-configure}:18605: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18606
18607 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18608
18609 echo "${as_me-configure}:18609: testing ...checking LIBS $LIBS ..." 1>&5
18610
18611 cf_rpath_dst=
18612 for cf_rpath_src in $LIBS
18613 do
18614         case $cf_rpath_src in #(vi
18615         -L*) #(vi
18616
18617                 # check if this refers to a directory which we will ignore
18618                 cf_rpath_skip=no
18619                 if test -n "$cf_rpath_list"
18620                 then
18621                         for cf_rpath_item in $cf_rpath_list
18622                         do
18623                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18624                                 then
18625                                         cf_rpath_skip=yes
18626                                         break
18627                                 fi
18628                         done
18629                 fi
18630
18631                 if test "$cf_rpath_skip" = no
18632                 then
18633                         # transform the option
18634                         if test "$LD_RPATH_OPT" = "-R " ; then
18635                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18636                         else
18637                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18638                         fi
18639
18640                         # if we have not already added this, add it now
18641                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18642                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18643                         then
18644                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18645
18646 echo "${as_me-configure}:18646: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18647
18648                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18649                         fi
18650                 fi
18651                 ;;
18652         esac
18653         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18654 done
18655 LIBS=$cf_rpath_dst
18656
18657 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18658
18659 echo "${as_me-configure}:18659: testing ...checked LIBS $LIBS ..." 1>&5
18660
18661         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18662
18663 echo "${as_me-configure}:18663: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18664
18665 fi
18666
18667 fi
18668
18669 fi
18670
18671 ### Define substitutions for header files to avoid name-pollution
18672
18673 if test "$cf_cv_have_tcgetattr" = yes ; then
18674         HAVE_TCGETATTR=1
18675 else
18676         HAVE_TCGETATTR=0
18677 fi
18678
18679 if test "$ac_cv_header_termio_h" = yes ; then
18680         HAVE_TERMIO_H=1
18681 else
18682         HAVE_TERMIO_H=0
18683 fi
18684
18685 if test "$ac_cv_header_termios_h" = yes ; then
18686         HAVE_TERMIOS_H=1
18687 else
18688         HAVE_TERMIOS_H=0
18689 fi
18690
18691 ################################################################################
18692 test "$use_database" = yes && \
18693 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18694
18695 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18696 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18697
18698 if test x"$enable_pc_files" = xyes ; then \
18699 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18700 MAKE_PC_FILES=
18701 else
18702 MAKE_PC_FILES="#"
18703 fi
18704
18705 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
18706 ac_config_commands="$ac_config_commands default"
18707 cat >confcache <<\_ACEOF
18708 # This file is a shell script that caches the results of configure
18709 # tests run on this system so they can be shared between configure
18710 # scripts and configure runs, see configure's option --config-cache.
18711 # It is not useful on other systems.  If it contains results you don't
18712 # want to keep, you may remove or edit it.
18713 #
18714 # config.status only pays attention to the cache file if you give it
18715 # the --recheck option to rerun configure.
18716 #
18717 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18718 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18719 # following values.
18720
18721 _ACEOF
18722
18723 # The following way of writing the cache mishandles newlines in values,
18724 # but we know of no workaround that is simple, portable, and efficient.
18725 # So, don't put newlines in cache variables' values.
18726 # Ultrix sh set writes to stderr and can't be redirected directly,
18727 # and sets the high bit in the cache file unless we assign to the vars.
18728 {
18729   (set) 2>&1 |
18730     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18731     *ac_space=\ *)
18732       # `set' does not quote correctly, so add quotes (double-quote
18733       # substitution turns \\\\ into \\, and sed turns \\ into \).
18734       sed -n \
18735         "s/'/'\\\\''/g;
18736           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18737       ;;
18738     *)
18739       # `set' quotes correctly as required by POSIX, so do not add quotes.
18740       sed -n \
18741         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18742       ;;
18743     esac;
18744 } |
18745   sed '
18746      t clear
18747      : clear
18748      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18749      t end
18750      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18751      : end' >>confcache
18752 if cmp -s $cache_file confcache; then :; else
18753   if test -w $cache_file; then
18754     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18755     cat confcache >$cache_file
18756   else
18757     echo "not updating unwritable cache $cache_file"
18758   fi
18759 fi
18760 rm -f confcache
18761
18762 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18763 # Let make expand exec_prefix.
18764 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18765
18766 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18767 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18768 # trailing colons and then remove the whole line if VPATH becomes empty
18769 # (actually we leave an empty line to preserve line numbers).
18770 if test "x$srcdir" = x.; then
18771   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18772 s/:*\$(srcdir):*/:/;
18773 s/:*\${srcdir}:*/:/;
18774 s/:*@srcdir@:*/:/;
18775 s/^\([^=]*=[    ]*\):*/\1/;
18776 s/:*$//;
18777 s/^[^=]*=[      ]*$//;
18778 }'
18779 fi
18780
18781 DEFS=-DHAVE_CONFIG_H
18782
18783 : ${CONFIG_STATUS=./config.status}
18784 ac_clean_files_save=$ac_clean_files
18785 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18786 { echo "$as_me:18786: creating $CONFIG_STATUS" >&5
18787 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18788 cat >$CONFIG_STATUS <<_ACEOF
18789 #! $SHELL
18790 # Generated automatically by configure.
18791 # Run this file to recreate the current configuration.
18792 # Compiler output produced by configure, useful for debugging
18793 # configure, is in config.log if it exists.
18794
18795 debug=false
18796 SHELL=\${CONFIG_SHELL-$SHELL}
18797 ac_cs_invocation="\$0 \$@"
18798
18799 _ACEOF
18800
18801 cat >>$CONFIG_STATUS <<\_ACEOF
18802 # Be Bourne compatible
18803 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18804   emulate sh
18805   NULLCMD=:
18806 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18807   set -o posix
18808 fi
18809
18810 # Name of the executable.
18811 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18812
18813 if expr a : '\(a\)' >/dev/null 2>&1; then
18814   as_expr=expr
18815 else
18816   as_expr=false
18817 fi
18818
18819 rm -f conf$$ conf$$.exe conf$$.file
18820 echo >conf$$.file
18821 if ln -s conf$$.file conf$$ 2>/dev/null; then
18822   # We could just check for DJGPP; but this test a) works b) is more generic
18823   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18824   if test -f conf$$.exe; then
18825     # Don't use ln at all; we don't have any links
18826     as_ln_s='cp -p'
18827   else
18828     as_ln_s='ln -s'
18829   fi
18830 elif ln conf$$.file conf$$ 2>/dev/null; then
18831   as_ln_s=ln
18832 else
18833   as_ln_s='cp -p'
18834 fi
18835 rm -f conf$$ conf$$.exe conf$$.file
18836
18837 as_executable_p="test -f"
18838
18839 # Support unset when possible.
18840 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18841   as_unset=unset
18842 else
18843   as_unset=false
18844 fi
18845
18846 # NLS nuisances.
18847 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18848 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18849 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18850 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18851 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18852 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18853 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18854 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18855
18856 # IFS
18857 # We need space, tab and new line, in precisely that order.
18858 as_nl='
18859 '
18860 IFS="   $as_nl"
18861
18862 # CDPATH.
18863 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18864
18865 exec 6>&1
18866
18867 _ACEOF
18868
18869 # Files that config.status was made for.
18870 if test -n "$ac_config_files"; then
18871   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18872 fi
18873
18874 if test -n "$ac_config_headers"; then
18875   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18876 fi
18877
18878 if test -n "$ac_config_links"; then
18879   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18880 fi
18881
18882 if test -n "$ac_config_commands"; then
18883   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18884 fi
18885
18886 cat >>$CONFIG_STATUS <<\EOF
18887
18888 ac_cs_usage="\
18889 \`$as_me' instantiates files from templates according to the
18890 current configuration.
18891
18892 Usage: $0 [OPTIONS] [FILE]...
18893
18894   -h, --help       print this help, then exit
18895   -V, --version    print version number, then exit
18896   -d, --debug      don't remove temporary files
18897       --recheck    update $as_me by reconfiguring in the same conditions
18898   --file=FILE[:TEMPLATE]
18899                    instantiate the configuration file FILE
18900   --header=FILE[:TEMPLATE]
18901                    instantiate the configuration header FILE
18902
18903 Configuration files:
18904 $config_files
18905
18906 Configuration headers:
18907 $config_headers
18908
18909 Configuration commands:
18910 $config_commands
18911
18912 Report bugs to <bug-autoconf@gnu.org>."
18913 EOF
18914
18915 cat >>$CONFIG_STATUS <<EOF
18916 ac_cs_version="\\
18917 config.status
18918 configured by $0, generated by GNU Autoconf 2.52.20100320,
18919   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18920
18921 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18922 Free Software Foundation, Inc.
18923 This config.status script is free software; the Free Software Foundation
18924 gives unlimited permission to copy, distribute and modify it."
18925 srcdir=$srcdir
18926 INSTALL="$INSTALL"
18927 EOF
18928
18929 cat >>$CONFIG_STATUS <<\EOF
18930 # If no file are specified by the user, then we need to provide default
18931 # value.  By we need to know if files were specified by the user.
18932 ac_need_defaults=:
18933 while test $# != 0
18934 do
18935   case $1 in
18936   --*=*)
18937     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18938     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18939     shift
18940     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18941     shift
18942     ;;
18943   -*);;
18944   *) # This is not an option, so the user has probably given explicit
18945      # arguments.
18946      ac_need_defaults=false;;
18947   esac
18948
18949   case $1 in
18950   # Handling of the options.
18951 EOF
18952 cat >>$CONFIG_STATUS <<EOF
18953   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18954     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18955     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18956 EOF
18957 cat >>$CONFIG_STATUS <<\EOF
18958   --version | --vers* | -V )
18959     echo "$ac_cs_version"; exit 0 ;;
18960   --he | --h)
18961     # Conflict between --help and --header
18962     { { echo "$as_me:18962: error: ambiguous option: $1
18963 Try \`$0 --help' for more information." >&5
18964 echo "$as_me: error: ambiguous option: $1
18965 Try \`$0 --help' for more information." >&2;}
18966    { (exit 1); exit 1; }; };;
18967   --help | --hel | -h )
18968     echo "$ac_cs_usage"; exit 0 ;;
18969   --debug | --d* | -d )
18970     debug=: ;;
18971   --file | --fil | --fi | --f )
18972     shift
18973     CONFIG_FILES="$CONFIG_FILES $1"
18974     ac_need_defaults=false;;
18975   --header | --heade | --head | --hea )
18976     shift
18977     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18978     ac_need_defaults=false;;
18979
18980   # This is an error.
18981   -*) { { echo "$as_me:18981: error: unrecognized option: $1
18982 Try \`$0 --help' for more information." >&5
18983 echo "$as_me: error: unrecognized option: $1
18984 Try \`$0 --help' for more information." >&2;}
18985    { (exit 1); exit 1; }; } ;;
18986
18987   *) ac_config_targets="$ac_config_targets $1" ;;
18988
18989   esac
18990   shift
18991 done
18992
18993 exec 5>>config.log
18994 cat >&5 << _ACEOF
18995
18996 ## ----------------------- ##
18997 ## Running config.status.  ##
18998 ## ----------------------- ##
18999
19000 This file was extended by $as_me 2.52.20100320, executed with
19001   CONFIG_FILES    = $CONFIG_FILES
19002   CONFIG_HEADERS  = $CONFIG_HEADERS
19003   CONFIG_LINKS    = $CONFIG_LINKS
19004   CONFIG_COMMANDS = $CONFIG_COMMANDS
19005   > $ac_cs_invocation
19006 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19007
19008 _ACEOF
19009 EOF
19010
19011 cat >>$CONFIG_STATUS <<EOF
19012 #
19013 # INIT-COMMANDS section.
19014 #
19015
19016 ### Special initialization commands, used to pass information from the
19017 ### configuration-run into config.status
19018
19019 AWK="$AWK"
19020 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19021 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19022 ECHO_LINK="$ECHO_LINK"
19023 LDCONFIG="$LDCONFIG"
19024 LIB_NAME="$LIB_NAME"
19025 LIB_SUBSETS="$LIB_SUBSETS"
19026 LIB_SUFFIX="$LIB_SUFFIX"
19027 LIB_TRACING="$LIB_TRACING"
19028 MAKE_TERMINFO="$MAKE_TERMINFO"
19029 NCURSES_MAJOR="$NCURSES_MAJOR"
19030 NCURSES_MINOR="$NCURSES_MINOR"
19031 NCURSES_OSPEED="$NCURSES_OSPEED"
19032 NCURSES_PATCH="$NCURSES_PATCH"
19033 SRC_SUBDIRS="$SRC_SUBDIRS"
19034 TERMINFO="$TERMINFO"
19035 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19036 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19037 TICS_NAME="$TICS_NAME"
19038 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19039 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19040 TINFO_NAME="$TINFO_NAME"
19041 TINFO_SUFFIX="$TINFO_SUFFIX"
19042 WITH_CURSES_H="$with_curses_h"
19043 WITH_ECHO="$with_echo"
19044 WITH_OVERWRITE="$with_overwrite"
19045 cf_LIST_MODELS="$cf_list_models"
19046 cf_cv_abi_version="$cf_cv_abi_version"
19047 cf_cv_do_relink="$cf_cv_do_relink"
19048 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19049 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19050 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19051 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19052 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19053 cf_cv_rel_version="$cf_cv_rel_version"
19054 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19055 cf_cv_shared_soname='$cf_cv_shared_soname'
19056 cf_cv_shlib_version="$cf_cv_shlib_version"
19057 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19058 cf_cv_system_name="$cf_cv_system_name"
19059 cf_with_cxx_binding="$cf_with_cxx_binding"
19060 cf_with_manpages="$cf_with_manpages"
19061 host="$host"
19062 target="$target"
19063
19064 EOF
19065
19066 cat >>$CONFIG_STATUS <<\EOF
19067 for ac_config_target in $ac_config_targets
19068 do
19069   case "$ac_config_target" in
19070   # Handling of arguments.
19071   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19072   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19073   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19074   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19075   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19076   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19077   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19078   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19079   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19080   *) { { echo "$as_me:19080: error: invalid argument: $ac_config_target" >&5
19081 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19082    { (exit 1); exit 1; }; };;
19083   esac
19084 done
19085
19086 # If the user did not use the arguments to specify the items to instantiate,
19087 # then the envvar interface is used.  Set only those that are not.
19088 # We use the long form for the default assignment because of an extremely
19089 # bizarre bug on SunOS 4.1.3.
19090 if $ac_need_defaults; then
19091   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19092   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19093   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19094 fi
19095
19096 # Create a temporary directory, and hook for its removal unless debugging.
19097 $debug ||
19098 {
19099   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19100   trap '{ (exit 1); exit 1; }' 1 2 13 15
19101 }
19102
19103 # Create a (secure) tmp directory for tmp files.
19104 : ${TMPDIR=/tmp}
19105 {
19106   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19107   test -n "$tmp" && test -d "$tmp"
19108 }  ||
19109 {
19110   tmp=$TMPDIR/cs$$-$RANDOM
19111   (umask 077 && mkdir $tmp)
19112 } ||
19113 {
19114    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19115    { (exit 1); exit 1; }
19116 }
19117
19118 EOF
19119
19120 cat >>$CONFIG_STATUS <<EOF
19121
19122 #
19123 # CONFIG_FILES section.
19124 #
19125
19126 # No need to generate the scripts if there are no CONFIG_FILES.
19127 # This happens for instance when ./config.status config.h
19128 if test -n "\$CONFIG_FILES"; then
19129   # Protect against being on the right side of a sed subst in config.status.
19130   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19131    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19132 s,@SHELL@,$SHELL,;t t
19133 s,@exec_prefix@,$exec_prefix,;t t
19134 s,@prefix@,$prefix,;t t
19135 s,@program_transform_name@,$program_transform_name,;t t
19136 s,@bindir@,$bindir,;t t
19137 s,@sbindir@,$sbindir,;t t
19138 s,@libexecdir@,$libexecdir,;t t
19139 s,@datadir@,$datadir,;t t
19140 s,@sysconfdir@,$sysconfdir,;t t
19141 s,@sharedstatedir@,$sharedstatedir,;t t
19142 s,@localstatedir@,$localstatedir,;t t
19143 s,@libdir@,$libdir,;t t
19144 s,@includedir@,$includedir,;t t
19145 s,@oldincludedir@,$oldincludedir,;t t
19146 s,@infodir@,$infodir,;t t
19147 s,@mandir@,$mandir,;t t
19148 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19149 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19150 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19151 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19152 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19153 s,@build_alias@,$build_alias,;t t
19154 s,@host_alias@,$host_alias,;t t
19155 s,@target_alias@,$target_alias,;t t
19156 s,@ECHO_C@,$ECHO_C,;t t
19157 s,@ECHO_N@,$ECHO_N,;t t
19158 s,@ECHO_T@,$ECHO_T,;t t
19159 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19160 s,@DEFS@,$DEFS,;t t
19161 s,@LIBS@,$LIBS,;t t
19162 s,@top_builddir@,$top_builddir,;t t
19163 s,@EGREP@,$EGREP,;t t
19164 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19165 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19166 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19167 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19168 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19169 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19170 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19171 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19172 s,@build@,$build,;t t
19173 s,@build_cpu@,$build_cpu,;t t
19174 s,@build_vendor@,$build_vendor,;t t
19175 s,@build_os@,$build_os,;t t
19176 s,@host@,$host,;t t
19177 s,@host_cpu@,$host_cpu,;t t
19178 s,@host_vendor@,$host_vendor,;t t
19179 s,@host_os@,$host_os,;t t
19180 s,@target@,$target,;t t
19181 s,@target_cpu@,$target_cpu,;t t
19182 s,@target_vendor@,$target_vendor,;t t
19183 s,@target_os@,$target_os,;t t
19184 s,@CC@,$CC,;t t
19185 s,@CFLAGS@,$CFLAGS,;t t
19186 s,@LDFLAGS@,$LDFLAGS,;t t
19187 s,@CPPFLAGS@,$CPPFLAGS,;t t
19188 s,@ac_ct_CC@,$ac_ct_CC,;t t
19189 s,@EXEEXT@,$EXEEXT,;t t
19190 s,@OBJEXT@,$OBJEXT,;t t
19191 s,@CPP@,$CPP,;t t
19192 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19193 s,@PROG_EXT@,$PROG_EXT,;t t
19194 s,@LDCONFIG@,$LDCONFIG,;t t
19195 s,@CXX@,$CXX,;t t
19196 s,@CXXFLAGS@,$CXXFLAGS,;t t
19197 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19198 s,@AWK@,$AWK,;t t
19199 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19200 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19201 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19202 s,@LINT@,$LINT,;t t
19203 s,@LINT_OPTS@,$LINT_OPTS,;t t
19204 s,@LN_S@,$LN_S,;t t
19205 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19206 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19207 s,@SET_MAKE@,$SET_MAKE,;t t
19208 s,@CTAGS@,$CTAGS,;t t
19209 s,@ETAGS@,$ETAGS,;t t
19210 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19211 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19212 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19213 s,@RANLIB@,$RANLIB,;t t
19214 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19215 s,@LD@,$LD,;t t
19216 s,@ac_ct_LD@,$ac_ct_LD,;t t
19217 s,@AR@,$AR,;t t
19218 s,@ac_ct_AR@,$ac_ct_AR,;t t
19219 s,@ARFLAGS@,$ARFLAGS,;t t
19220 s,@DESTDIR@,$DESTDIR,;t t
19221 s,@BUILD_CC@,$BUILD_CC,;t t
19222 s,@BUILD_CPP@,$BUILD_CPP,;t t
19223 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19224 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19225 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19226 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19227 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19228 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19229 s,@cf_list_models@,$cf_list_models,;t t
19230 s,@LIBTOOL@,$LIBTOOL,;t t
19231 s,@LT_UNDEF@,$LT_UNDEF,;t t
19232 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19233 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19234 s,@LIB_CREATE@,$LIB_CREATE,;t t
19235 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19236 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19237 s,@LIB_PREP@,$LIB_PREP,;t t
19238 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19239 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19240 s,@LIB_LINK@,$LIB_LINK,;t t
19241 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19242 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19243 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19244 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19245 s,@TICS_NAME@,$TICS_NAME,;t t
19246 s,@TINFO_NAME@,$TINFO_NAME,;t t
19247 s,@LIB_NAME@,$LIB_NAME,;t t
19248 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19249 s,@CC_G_OPT@,$CC_G_OPT,;t t
19250 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19251 s,@LD_MODEL@,$LD_MODEL,;t t
19252 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19253 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19254 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19255 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19256 s,@LINK_PROGS@,$LINK_PROGS,;t t
19257 s,@LINK_TESTS@,$LINK_TESTS,;t t
19258 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19259 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19260 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19261 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19262 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19263 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19264 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19265 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19266 s,@TERMINFO@,$TERMINFO,;t t
19267 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19268 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19269 s,@TERMPATH@,$TERMPATH,;t t
19270 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19271 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19272 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19273 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19274 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19275 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19276 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19277 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19278 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19279 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19280 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19281 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19282 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19283 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19284 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19285 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19286 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19287 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19288 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19289 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19290 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19291 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19292 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19293 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19294 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19295 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19296 s,@PTHREAD@,$PTHREAD,;t t
19297 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19298 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19299 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19300 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19301 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19302 s,@ECHO_LINK@,$ECHO_LINK,;t t
19303 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19304 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19305 s,@ADA_TRACE@,$ADA_TRACE,;t t
19306 s,@MATH_LIB@,$MATH_LIB,;t t
19307 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19308 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19309 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19310 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19311 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19312 s,@TEST_LIBS@,$TEST_LIBS,;t t
19313 s,@CXXCPP@,$CXXCPP,;t t
19314 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19315 s,@CXX_AR@,$CXX_AR,;t t
19316 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19317 s,@CXXLIBS@,$CXXLIBS,;t t
19318 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19319 s,@gnat_exists@,$gnat_exists,;t t
19320 s,@M4_exists@,$M4_exists,;t t
19321 s,@cf_ada_make@,$cf_ada_make,;t t
19322 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19323 s,@cf_ada_package@,$cf_ada_package,;t t
19324 s,@ADAFLAGS@,$ADAFLAGS,;t t
19325 s,@cf_compile_generics@,$cf_compile_generics,;t t
19326 s,@cf_generic_objects@,$cf_generic_objects,;t t
19327 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19328 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19329 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19330 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19331 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19332 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19333 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19334 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19335 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19336 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19337 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19338 s,@TICS_ARGS@,$TICS_ARGS,;t t
19339 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19340 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19341 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19342 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19343 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19344 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19345 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19346 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19347 s,@TICS_LIST@,$TICS_LIST,;t t
19348 s,@TINFO_LIST@,$TINFO_LIST,;t t
19349 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19350 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19351 s,@TEST_ARGS@,$TEST_ARGS,;t t
19352 s,@TEST_DEPS@,$TEST_DEPS,;t t
19353 s,@TEST_ARG2@,$TEST_ARG2,;t t
19354 s,@TEST_DEP2@,$TEST_DEP2,;t t
19355 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19356 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19357 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19358 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19359 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19360 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19361 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19362 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19363 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19364 s,@cross_compiling@,$cross_compiling,;t t
19365 CEOF
19366
19367 EOF
19368
19369   cat >>$CONFIG_STATUS <<\EOF
19370   # Split the substitutions into bite-sized pieces for seds with
19371   # small command number limits, like on Digital OSF/1 and HP-UX.
19372   ac_max_sed_lines=48
19373   ac_sed_frag=1 # Number of current file.
19374   ac_beg=1 # First line for current file.
19375   ac_end=$ac_max_sed_lines # Line after last line for current file.
19376   ac_more_lines=:
19377   ac_sed_cmds=
19378   while $ac_more_lines; do
19379     if test $ac_beg -gt 1; then
19380       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19381     else
19382       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19383     fi
19384     if test ! -s $tmp/subs.frag; then
19385       ac_more_lines=false
19386     else
19387       # The purpose of the label and of the branching condition is to
19388       # speed up the sed processing (if there are no `@' at all, there
19389       # is no need to browse any of the substitutions).
19390       # These are the two extra sed commands mentioned above.
19391       (echo ':t
19392   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19393       if test -z "$ac_sed_cmds"; then
19394         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19395       else
19396         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19397       fi
19398       ac_sed_frag=`expr $ac_sed_frag + 1`
19399       ac_beg=$ac_end
19400       ac_end=`expr $ac_end + $ac_max_sed_lines`
19401     fi
19402   done
19403   if test -z "$ac_sed_cmds"; then
19404     ac_sed_cmds=cat
19405   fi
19406 fi # test -n "$CONFIG_FILES"
19407
19408 EOF
19409 cat >>$CONFIG_STATUS <<\EOF
19410 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19411   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19412   case $ac_file in
19413   - | *:- | *:-:* ) # input from stdin
19414         cat >$tmp/stdin
19415         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19416         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19417   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19418         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19419   * )   ac_file_in=$ac_file.in ;;
19420   esac
19421
19422   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19423   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19424          X"$ac_file" : 'X\(//\)[^/]' \| \
19425          X"$ac_file" : 'X\(//\)$' \| \
19426          X"$ac_file" : 'X\(/\)' \| \
19427          .     : '\(.\)' 2>/dev/null ||
19428 echo X"$ac_file" |
19429     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19430           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19431           /^X\(\/\/\)$/{ s//\1/; q; }
19432           /^X\(\/\).*/{ s//\1/; q; }
19433           s/.*/./; q'`
19434   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19435     { case "$ac_dir" in
19436   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19437   *)                      as_incr_dir=.;;
19438 esac
19439 as_dummy="$ac_dir"
19440 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19441   case $as_mkdir_dir in
19442     # Skip DOS drivespec
19443     ?:) as_incr_dir=$as_mkdir_dir ;;
19444     *)
19445       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19446       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19447     ;;
19448   esac
19449 done; }
19450
19451     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19452     # A "../" for each directory in $ac_dir_suffix.
19453     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19454   else
19455     ac_dir_suffix= ac_dots=
19456   fi
19457
19458   case $srcdir in
19459   .)  ac_srcdir=.
19460       if test -z "$ac_dots"; then
19461          ac_top_srcdir=.
19462       else
19463          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19464       fi ;;
19465   [\\/]* | ?:[\\/]* )
19466       ac_srcdir=$srcdir$ac_dir_suffix;
19467       ac_top_srcdir=$srcdir ;;
19468   *) # Relative path.
19469     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19470     ac_top_srcdir=$ac_dots$srcdir ;;
19471   esac
19472
19473   case $INSTALL in
19474   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19475   *) ac_INSTALL=$ac_dots$INSTALL ;;
19476   esac
19477
19478   if test x"$ac_file" != x-; then
19479     { echo "$as_me:19479: creating $ac_file" >&5
19480 echo "$as_me: creating $ac_file" >&6;}
19481     rm -f "$ac_file"
19482   fi
19483   # Let's still pretend it is `configure' which instantiates (i.e., don't
19484   # use $as_me), people would be surprised to read:
19485   #    /* config.h.  Generated automatically by config.status.  */
19486   configure_input="Generated automatically from `echo $ac_file_in |
19487                                                  sed 's,.*/,,'` by configure."
19488
19489   # First look for the input files in the build tree, otherwise in the
19490   # src tree.
19491   ac_file_inputs=`IFS=:
19492     for f in $ac_file_in; do
19493       case $f in
19494       -) echo $tmp/stdin ;;
19495       [\\/$]*)
19496          # Absolute (can't be DOS-style, as IFS=:)
19497          test -f "$f" || { { echo "$as_me:19497: error: cannot find input file: $f" >&5
19498 echo "$as_me: error: cannot find input file: $f" >&2;}
19499    { (exit 1); exit 1; }; }
19500          echo $f;;
19501       *) # Relative
19502          if test -f "$f"; then
19503            # Build tree
19504            echo $f
19505          elif test -f "$srcdir/$f"; then
19506            # Source tree
19507            echo $srcdir/$f
19508          else
19509            # /dev/null tree
19510            { { echo "$as_me:19510: error: cannot find input file: $f" >&5
19511 echo "$as_me: error: cannot find input file: $f" >&2;}
19512    { (exit 1); exit 1; }; }
19513          fi;;
19514       esac
19515     done` || { (exit 1); exit 1; }
19516 EOF
19517 cat >>$CONFIG_STATUS <<EOF
19518   sed "$ac_vpsub
19519 $extrasub
19520 EOF
19521 cat >>$CONFIG_STATUS <<\EOF
19522 :t
19523 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19524 s,@configure_input@,$configure_input,;t t
19525 s,@srcdir@,$ac_srcdir,;t t
19526 s,@top_srcdir@,$ac_top_srcdir,;t t
19527 s,@INSTALL@,$ac_INSTALL,;t t
19528 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19529   rm -f $tmp/stdin
19530   if test x"$ac_file" != x-; then
19531     mv $tmp/out $ac_file
19532   else
19533     cat $tmp/out
19534     rm -f $tmp/out
19535   fi
19536
19537 done
19538 EOF
19539 cat >>$CONFIG_STATUS <<\EOF
19540
19541 #
19542 # CONFIG_HEADER section.
19543 #
19544
19545 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19546 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19547 #
19548 # ac_d sets the value in "#define NAME VALUE" lines.
19549 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19550 ac_dB='[        ].*$,\1#\2'
19551 ac_dC=' '
19552 ac_dD=',;t'
19553 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19554 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19555 ac_iB='\([      ]\),\1#\2define\3'
19556 ac_iC=' '
19557 ac_iD='\4,;t'
19558 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19559 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19560 ac_uB='$,\1#\2define\3'
19561 ac_uC=' '
19562 ac_uD=',;t'
19563
19564 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19565   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19566   case $ac_file in
19567   - | *:- | *:-:* ) # input from stdin
19568         cat >$tmp/stdin
19569         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19570         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19571   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19572         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19573   * )   ac_file_in=$ac_file.in ;;
19574   esac
19575
19576   test x"$ac_file" != x- && { echo "$as_me:19576: creating $ac_file" >&5
19577 echo "$as_me: creating $ac_file" >&6;}
19578
19579   # First look for the input files in the build tree, otherwise in the
19580   # src tree.
19581   ac_file_inputs=`IFS=:
19582     for f in $ac_file_in; do
19583       case $f in
19584       -) echo $tmp/stdin ;;
19585       [\\/$]*)
19586          # Absolute (can't be DOS-style, as IFS=:)
19587          test -f "$f" || { { echo "$as_me:19587: error: cannot find input file: $f" >&5
19588 echo "$as_me: error: cannot find input file: $f" >&2;}
19589    { (exit 1); exit 1; }; }
19590          echo $f;;
19591       *) # Relative
19592          if test -f "$f"; then
19593            # Build tree
19594            echo $f
19595          elif test -f "$srcdir/$f"; then
19596            # Source tree
19597            echo $srcdir/$f
19598          else
19599            # /dev/null tree
19600            { { echo "$as_me:19600: error: cannot find input file: $f" >&5
19601 echo "$as_me: error: cannot find input file: $f" >&2;}
19602    { (exit 1); exit 1; }; }
19603          fi;;
19604       esac
19605     done` || { (exit 1); exit 1; }
19606   # Remove the trailing spaces.
19607   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19608
19609 EOF
19610
19611 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19612 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19613 # be either 'cat' or 'sort'.
19614 cat confdefs.h | uniq >conftest.vals
19615
19616 # Break up conftest.vals because some shells have a limit on
19617 # the size of here documents, and old seds have small limits too.
19618
19619 rm -f conftest.tail
19620 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19621 while grep . conftest.vals >/dev/null
19622 do
19623   # Write chunks of a limited-size here document to conftest.frag.
19624   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19625   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19626   echo 'CEOF' >> $CONFIG_STATUS
19627   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19628   rm -f conftest.vals
19629   mv conftest.tail conftest.vals
19630 done
19631 rm -f conftest.vals
19632
19633 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19634 # marker @DEFS@.
19635 echo '  cat >> conftest.edit <<CEOF
19636 /@DEFS@/r conftest.frag
19637 /@DEFS@/d
19638 CEOF
19639 sed -f conftest.edit $tmp/in > $tmp/out
19640 rm -f $tmp/in
19641 mv $tmp/out $tmp/in
19642 rm -f conftest.edit conftest.frag
19643 ' >> $CONFIG_STATUS
19644
19645 cat >>$CONFIG_STATUS <<\EOF
19646   # Let's still pretend it is `configure' which instantiates (i.e., don't
19647   # use $as_me), people would be surprised to read:
19648   #    /* config.h.  Generated automatically by config.status.  */
19649   if test x"$ac_file" = x-; then
19650     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19651   else
19652     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19653   fi
19654   cat $tmp/in >>$tmp/config.h
19655   rm -f $tmp/in
19656   if test x"$ac_file" != x-; then
19657     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19658       { echo "$as_me:19658: $ac_file is unchanged" >&5
19659 echo "$as_me: $ac_file is unchanged" >&6;}
19660     else
19661       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19662          X"$ac_file" : 'X\(//\)[^/]' \| \
19663          X"$ac_file" : 'X\(//\)$' \| \
19664          X"$ac_file" : 'X\(/\)' \| \
19665          .     : '\(.\)' 2>/dev/null ||
19666 echo X"$ac_file" |
19667     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19668           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19669           /^X\(\/\/\)$/{ s//\1/; q; }
19670           /^X\(\/\).*/{ s//\1/; q; }
19671           s/.*/./; q'`
19672       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19673         { case "$ac_dir" in
19674   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19675   *)                      as_incr_dir=.;;
19676 esac
19677 as_dummy="$ac_dir"
19678 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19679   case $as_mkdir_dir in
19680     # Skip DOS drivespec
19681     ?:) as_incr_dir=$as_mkdir_dir ;;
19682     *)
19683       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19684       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19685     ;;
19686   esac
19687 done; }
19688
19689       fi
19690       rm -f $ac_file
19691       mv $tmp/config.h $ac_file
19692     fi
19693   else
19694     cat $tmp/config.h
19695     rm -f $tmp/config.h
19696   fi
19697 done
19698 EOF
19699 cat >>$CONFIG_STATUS <<\EOF
19700
19701 #
19702 # CONFIG_COMMANDS section.
19703 #
19704 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19705   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19706   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19707
19708   case $ac_dest in
19709     default )
19710
19711 for cf_dir in test
19712 do
19713         if test ! -d $srcdir/$cf_dir; then
19714                 continue
19715         elif test -f $srcdir/$cf_dir/programs; then
19716                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19717         fi
19718 done
19719
19720         case $cf_cv_system_name in #(vi
19721         OS/2*|os2*) #(vi
19722         LIB_PREFIX=''
19723         ;;
19724         *)      LIB_PREFIX='lib'
19725         ;;
19726         esac
19727 cf_prefix=$LIB_PREFIX
19728
19729 if test $cf_cv_shlib_version = cygdll ; then
19730         TINFO_NAME=$TINFO_ARG_SUFFIX
19731         TINFO_SUFFIX=.dll
19732 fi
19733
19734 for cf_dir in $SRC_SUBDIRS
19735 do
19736         if test ! -d $srcdir/$cf_dir ; then
19737                 continue
19738         elif test -f $srcdir/$cf_dir/modules; then
19739
19740                 SHARED_LIB=
19741                 LIBS_TO_MAKE=
19742                 for cf_item in $cf_LIST_MODELS
19743                 do
19744
19745         case $cf_item in #(vi
19746         libtool) #(vi
19747                 cf_suffix='.la'
19748                 cf_depsuf=$cf_suffix
19749                 ;;
19750         normal) #(vi
19751                 cf_suffix='.a'
19752                 cf_depsuf=$cf_suffix
19753                 ;;
19754         debug) #(vi
19755                 cf_suffix='_g.a'
19756                 cf_depsuf=$cf_suffix
19757                 ;;
19758         profile) #(vi
19759                 cf_suffix='_p.a'
19760                 cf_depsuf=$cf_suffix
19761                 ;;
19762         shared) #(vi
19763                 case $cf_cv_system_name in
19764                 aix[56]*) #(vi
19765                         cf_suffix='.a'
19766                         cf_depsuf=$cf_suffix
19767                         ;;
19768                 cygwin*) #(vi
19769                         cf_suffix='.dll'
19770                         cf_depsuf='.dll.a'
19771                         ;;
19772                 darwin*) #(vi
19773                         cf_suffix='.dylib'
19774                         cf_depsuf=$cf_suffix
19775                         ;;
19776                 hpux*) #(vi
19777                         case $target in
19778                         ia64*) #(vi
19779                                 cf_suffix='.so'
19780                                 cf_depsuf=$cf_suffix
19781                                 ;;
19782                         *) #(vi
19783                                 cf_suffix='.sl'
19784                                 cf_depsuf=$cf_suffix
19785                                 ;;
19786                         esac
19787                         ;;
19788                 *)      cf_suffix='.so'
19789                         cf_depsuf=$cf_suffix
19790                         ;;
19791                 esac
19792         esac
19793         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19794         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19795
19796                         if test $cf_item = shared ; then
19797                         if test "$cf_cv_do_symlinks" = yes ; then
19798                                 case "$cf_cv_shlib_version" in #(vi
19799                                 rel) #(vi
19800                                         case "$cf_cv_system_name" in #(vi
19801                                         darwin*)
19802                                         case .${LIB_SUFFIX} in
19803                                         .w*)
19804                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19805                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19806                                                 ;;
19807                                         *)
19808                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19809                                                 ;;
19810                                         esac
19811                                         ;; #(vi
19812                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19813                                         esac
19814                                         ;;
19815                                 abi)
19816                                         case "$cf_cv_system_name" in #(vi
19817                                         darwin*)
19818                                         case .${LIB_SUFFIX} in
19819                                         .w*)
19820                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19821                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19822                                                 ;;
19823                                         *)
19824                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19825                                                 ;;
19826                                         esac
19827                                         ;; #(vi
19828                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19829                                         esac
19830                                         ;;
19831                                 esac
19832                         fi
19833                         # cygwin needs import library, and has unique naming convention
19834                         # use autodetected ${cf_prefix} for import lib and static lib, but
19835                         # use 'cyg' prefix for shared lib.
19836                         if test $cf_cv_shlib_version = cygdll ; then
19837                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19838                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19839                                 continue
19840                         fi
19841                         fi
19842                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19843                 done
19844
19845                 if test $cf_dir = ncurses ; then
19846                         cf_subsets="$LIB_SUBSETS"
19847                         cf_r_parts="$cf_subsets"
19848                         cf_liblist="$LIBS_TO_MAKE"
19849
19850                         while test -n "$cf_r_parts"
19851                         do
19852                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19853                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19854                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19855                                         cf_item=
19856                                         case $cf_l_parts in #(vi
19857                                         *termlib*) #(vi
19858                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19859                                                 ;;
19860                                         *ticlib*)
19861                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19862                                                 ;;
19863                                         *)
19864                                                 break
19865                                                 ;;
19866                                         esac
19867                                         if test -n "$cf_item"; then
19868                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19869                                         fi
19870                                 else
19871                                         break
19872                                 fi
19873                         done
19874                 else
19875                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19876                 fi
19877
19878                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19879                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19880                         $cf_dir/Makefile >$cf_dir/Makefile.out
19881                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19882
19883                 $AWK -f $srcdir/mk-0th.awk \
19884                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19885                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19886
19887                 for cf_subset in $cf_subsets
19888                 do
19889                         cf_subdirs=
19890                         for cf_item in $cf_LIST_MODELS
19891                         do
19892                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19893
19894 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19895
19896         case $cf_item in #(vi
19897         libtool) #(vi
19898                 cf_suffix='.la'
19899                 cf_depsuf=$cf_suffix
19900                 ;;
19901         normal) #(vi
19902                 cf_suffix='.a'
19903                 cf_depsuf=$cf_suffix
19904                 ;;
19905         debug) #(vi
19906                 cf_suffix='_g.a'
19907                 cf_depsuf=$cf_suffix
19908                 ;;
19909         profile) #(vi
19910                 cf_suffix='_p.a'
19911                 cf_depsuf=$cf_suffix
19912                 ;;
19913         shared) #(vi
19914                 case $cf_cv_system_name in
19915                 aix[56]*) #(vi
19916                         cf_suffix='.a'
19917                         cf_depsuf=$cf_suffix
19918                         ;;
19919                 cygwin*) #(vi
19920                         cf_suffix='.dll'
19921                         cf_depsuf='.dll.a'
19922                         ;;
19923                 darwin*) #(vi
19924                         cf_suffix='.dylib'
19925                         cf_depsuf=$cf_suffix
19926                         ;;
19927                 hpux*) #(vi
19928                         case $target in
19929                         ia64*) #(vi
19930                                 cf_suffix='.so'
19931                                 cf_depsuf=$cf_suffix
19932                                 ;;
19933                         *) #(vi
19934                                 cf_suffix='.sl'
19935                                 cf_depsuf=$cf_suffix
19936                                 ;;
19937                         esac
19938                         ;;
19939                 *)      cf_suffix='.so'
19940                         cf_depsuf=$cf_suffix
19941                         ;;
19942                 esac
19943         esac
19944         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19945         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19946
19947         case $cf_item in
19948         libtool) cf_subdir='obj_lo'  ;;
19949         normal)  cf_subdir='objects' ;;
19950         debug)   cf_subdir='obj_g' ;;
19951         profile) cf_subdir='obj_p' ;;
19952         shared)
19953                 case $cf_cv_system_name in #(vi
19954                 cygwin) #(vi
19955                         cf_subdir='objects' ;;
19956                 *)
19957                         cf_subdir='obj_s' ;;
19958                 esac
19959         esac
19960
19961                         # Test for case where we build libtinfo with a different name.
19962                         cf_libname=$cf_dir
19963                         if test $cf_dir = ncurses ; then
19964                                 case $cf_subset in
19965                                 *base*)
19966                                         cf_libname=${cf_libname}$LIB_SUFFIX
19967                                         ;;
19968                                 *termlib*)
19969                                         cf_libname=$TINFO_LIB_SUFFIX
19970                                         ;;
19971                                 ticlib*)
19972                                         cf_libname=$TICS_LIB_SUFFIX
19973                                         ;;
19974                                 esac
19975                         else
19976                                 cf_libname=${cf_libname}$LIB_SUFFIX
19977                         fi
19978                         if test -n "${DFT_ARG_SUFFIX}" ; then
19979                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19980                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19981                         fi
19982
19983                         # These dependencies really are for development, not
19984                         # builds, but they are useful in porting, too.
19985                         cf_depend="../include/ncurses_cfg.h"
19986                         if test "$srcdir" = "."; then
19987                                 cf_reldir="."
19988                         else
19989                                 cf_reldir="\${srcdir}"
19990                         fi
19991
19992                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19993                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19994                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19995                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19996                         fi
19997
19998                         cf_dir_suffix=
19999                         old_cf_suffix="$cf_suffix"
20000                         if test "$cf_cv_shlib_version_infix" = yes ; then
20001                         if test -n "$LIB_SUFFIX" ; then
20002                                 case $LIB_SUFFIX in
20003                                 w*)
20004                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20005                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20006                                         cf_dir_suffix=w
20007                                         ;;
20008                                 esac
20009                         fi
20010                         fi
20011
20012                         $AWK -f $srcdir/mk-1st.awk \
20013                                 name=${cf_libname}${cf_dir_suffix} \
20014                                 traces=$LIB_TRACING \
20015                                 MODEL=$cf_ITEM \
20016                                 model=$cf_subdir \
20017                                 prefix=$cf_prefix \
20018                                 suffix=$cf_suffix \
20019                                 subset=$cf_subset \
20020                                 TermlibRoot=$TINFO_NAME \
20021                                 TermlibSuffix=$TINFO_SUFFIX \
20022                                 ShlibVer=$cf_cv_shlib_version \
20023                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20024                                 ReLink=${cf_cv_do_relink-no} \
20025                                 DoLinks=$cf_cv_do_symlinks \
20026                                 rmSoLocs=$cf_cv_rm_so_locs \
20027                                 ldconfig="$LDCONFIG" \
20028                                 overwrite=$WITH_OVERWRITE \
20029                                 depend="$cf_depend" \
20030                                 host="$host" \
20031                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20032
20033                         cf_suffix="$old_cf_suffix"
20034
20035                         for cf_subdir2 in $cf_subdirs lib
20036                         do
20037                                 test $cf_subdir = $cf_subdir2 && break
20038                         done
20039                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20040                         $AWK -f $srcdir/mk-2nd.awk \
20041                                 name=$cf_dir \
20042                                 traces=$LIB_TRACING \
20043                                 MODEL=$cf_ITEM \
20044                                 model=$cf_subdir \
20045                                 subset=$cf_subset \
20046                                 srcdir=$srcdir \
20047                                 echo=$WITH_ECHO \
20048                                 crenames=$cf_cv_prog_CC_c_o \
20049                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20050                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20051                         cf_subdirs="$cf_subdirs $cf_subdir"
20052                         done
20053                 done
20054         fi
20055
20056         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20057 done
20058
20059 for cf_dir in $SRC_SUBDIRS
20060 do
20061         if test ! -d $srcdir/$cf_dir ; then
20062                 continue
20063         fi
20064
20065         if test -f $cf_dir/Makefile ; then
20066                 case "$cf_dir" in
20067                 Ada95) #(vi
20068                         echo 'libs \' >> Makefile
20069                         echo 'install.libs \' >> Makefile
20070                         echo 'uninstall.libs ::' >> Makefile
20071                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20072                         ;;
20073                 esac
20074         fi
20075
20076         if test -f $srcdir/$cf_dir/modules; then
20077                 echo >> Makefile
20078                 if test -f $srcdir/$cf_dir/headers; then
20079 cat >> Makefile <<CF_EOF
20080 install.includes \\
20081 uninstall.includes \\
20082 CF_EOF
20083                 fi
20084 if test "$cf_dir" != "c++" ; then
20085 echo 'lint \' >> Makefile
20086 fi
20087 cat >> Makefile <<CF_EOF
20088 libs \\
20089 lintlib \\
20090 install.libs \\
20091 uninstall.libs \\
20092 install.$cf_dir \\
20093 uninstall.$cf_dir ::
20094         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20095 CF_EOF
20096         elif test -f $srcdir/$cf_dir/headers; then
20097 cat >> Makefile <<CF_EOF
20098
20099 libs \\
20100 install.libs \\
20101 uninstall.libs \\
20102 install.includes \\
20103 uninstall.includes ::
20104         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20105 CF_EOF
20106 fi
20107 done
20108
20109 cat >> Makefile <<CF_EOF
20110
20111 install.libs uninstall.libs \\
20112 install.data uninstall.data ::
20113 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20114 CF_EOF
20115
20116 if test "x$cf_with_manpages" = xyes; then
20117 cat >> Makefile <<CF_EOF
20118
20119 install.man \\
20120 uninstall.man ::
20121         cd man && \${MAKE} \${CF_MFLAGS} \$@
20122 CF_EOF
20123 fi
20124
20125 cat >> Makefile <<CF_EOF
20126
20127 distclean ::
20128         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20129         rm -f headers.sh headers.sed mk_shared_lib.sh
20130         rm -f edit_man.* man_alias.*
20131         rm -rf \${DIRS_TO_MAKE}
20132 CF_EOF
20133
20134 # Special case: tack's manpage lives in its own directory.
20135 if test "x$cf_with_manpages" = xyes; then
20136 if test -d tack ; then
20137 if test -f $srcdir/$tack.h; then
20138 cat >> Makefile <<CF_EOF
20139
20140 install.man \\
20141 uninstall.man ::
20142         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20143 CF_EOF
20144 fi
20145 fi
20146 fi
20147
20148 rm -f headers.sed headers.sh
20149
20150 echo creating headers.sh
20151 cat >headers.sh <<CF_EOF
20152 #! /bin/sh
20153 # This shell script is generated by the 'configure' script.  It is invoked in a
20154 # subdirectory of the build tree.  It generates a sed-script in the parent
20155 # directory that is used to adjust includes for header files that reside in a
20156 # subdirectory of /usr/include, etc.
20157 PRG=""
20158 while test \$# != 3
20159 do
20160 PRG="\$PRG \$1"; shift
20161 done
20162 DST=\$1
20163 REF=\$2
20164 SRC=\$3
20165 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20166 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20167 echo installing \$SRC in \$DST
20168 CF_EOF
20169
20170 if test $WITH_CURSES_H = yes; then
20171         cat >>headers.sh <<CF_EOF
20172 case \$DST in
20173 /*/include/*)
20174         END=\`basename \$DST\`
20175         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20176         do
20177                 NAME=\`basename \$i\`
20178                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20179         done
20180         ;;
20181 *)
20182         echo "" >> \$TMPSED
20183         ;;
20184 esac
20185 CF_EOF
20186
20187 else
20188         cat >>headers.sh <<CF_EOF
20189 case \$DST in
20190 /*/include/*)
20191         END=\`basename \$DST\`
20192         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20193         do
20194                 NAME=\`basename \$i\`
20195                 if test "\$NAME" = "curses.h"
20196                 then
20197                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20198                         NAME=ncurses.h
20199                 fi
20200                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20201         done
20202         ;;
20203 *)
20204         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20205         ;;
20206 esac
20207 CF_EOF
20208 fi
20209 cat >>headers.sh <<CF_EOF
20210 rm -f \$TMPSRC
20211 sed -f \$TMPSED \$SRC > \$TMPSRC
20212 NAME=\`basename \$SRC\`
20213 CF_EOF
20214 if test $WITH_CURSES_H != yes; then
20215         cat >>headers.sh <<CF_EOF
20216 test "\$NAME" = "curses.h" && NAME=ncurses.h
20217 CF_EOF
20218 fi
20219 cat >>headers.sh <<CF_EOF
20220 # Just in case someone gzip'd manpages, remove the conflicting copy.
20221 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20222
20223 eval \$PRG \$TMPSRC \$DST/\$NAME
20224 rm -f \$TMPSRC \$TMPSED
20225 CF_EOF
20226
20227 chmod 0755 headers.sh
20228
20229 for cf_dir in $SRC_SUBDIRS
20230 do
20231         if test ! -d $srcdir/$cf_dir ; then
20232                 continue
20233         fi
20234
20235         if test -f $srcdir/$cf_dir/headers; then
20236                 $AWK -f $srcdir/mk-hdr.awk \
20237                         subset="$LIB_SUBSETS" \
20238                         compat="$WITH_CURSES_H" \
20239                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20240         fi
20241
20242         if test -f $srcdir/$cf_dir/modules; then
20243                 if test "$cf_dir" != "c++" ; then
20244                         cat >>$cf_dir/Makefile <<"CF_EOF"
20245 depend : ${AUTO_SRC}
20246         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20247
20248 # DO NOT DELETE THIS LINE -- make depend depends on it.
20249 CF_EOF
20250                 fi
20251         fi
20252 done
20253
20254  ;;
20255   esac
20256 done
20257 EOF
20258
20259 cat >>$CONFIG_STATUS <<\EOF
20260
20261 { (exit 0); exit 0; }
20262 EOF
20263 chmod +x $CONFIG_STATUS
20264 ac_clean_files=$ac_clean_files_save
20265
20266 # configure is writing to config.log, and then calls config.status.
20267 # config.status does its own redirection, appending to config.log.
20268 # Unfortunately, on DOS this fails, as config.log is still kept open
20269 # by configure, so config.status won't be able to write to it; its
20270 # output is simply discarded.  So we exec the FD to /dev/null,
20271 # effectively closing config.log, so it can be properly (re)opened and
20272 # appended to by config.status.  When coming back to configure, we
20273 # need to make the FD available again.
20274 if test "$no_create" != yes; then
20275   ac_cs_success=:
20276   exec 5>/dev/null
20277   $SHELL $CONFIG_STATUS || ac_cs_success=false
20278   exec 5>>config.log
20279   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20280   # would make configure fail if this is the last instruction.
20281   $ac_cs_success || { (exit 1); exit 1; }
20282 fi
20283 ${MAKE-make} preinstall