]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090927
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.474 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile with $COLORFGBG code
786   --with-pthread          use POSIX thread library
787   --enable-weak-symbols   enable weak-symbols for pthreads
788   --enable-reentrant      compile with experimental reentrant code
789   --with-wrap-prefix=XXX  override prefix used for public variables
790   --enable-safe-sprintf   compile with experimental safe-sprintf code
791   --disable-scroll-hints  compile without scroll-hints code
792   --enable-wgetch-events  compile with experimental wgetch-events code
793 Testing/development Options:
794   --enable-echo           build: display "compiling" commands (default)
795   --enable-warnings       build: turn on GCC compiler warnings
796   --enable-assertions     test: turn on generation of assertion code
797   --with-dmalloc          test: use Gray Watson's dmalloc library
798   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
799   --with-valgrind         test: use valgrind
800   --disable-leaks         test: free permanent memory, analyze leaks
801   --enable-expanded       test: generate functions for certain macros
802   --disable-macros        test: use functions rather than macros
803   --with-trace            test: add trace() function to all models of ncurses
804 Ada95 Binding Options:
805   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
806   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
807   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
808
809 Some influential environment variables:
810   CC          C compiler command
811   CFLAGS      C compiler flags
812   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
813               nonstandard directory <lib dir>
814   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
815               headers in a nonstandard directory <include dir>
816   CPP         C preprocessor
817   CXX         C++ compiler command
818   CXXFLAGS    C++ compiler flags
819   CXXCPP      C++ preprocessor
820
821 Use these variables to override the choices made by `configure' or to help
822 it to find libraries and programs with nonstandard names/locations.
823
824 EOF
825 fi
826
827 if test "$ac_init_help" = "recursive"; then
828   # If there are subdirs, report their specific --help.
829   ac_popdir=`pwd`
830   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
831     cd $ac_subdir
832     # A "../" for each directory in /$ac_subdir.
833     ac_dots=`echo $ac_subdir |
834              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
835
836     case $srcdir in
837     .) # No --srcdir option.  We are building in place.
838       ac_sub_srcdir=$srcdir ;;
839     [\\/]* | ?:[\\/]* ) # Absolute path.
840       ac_sub_srcdir=$srcdir/$ac_subdir ;;
841     *) # Relative path.
842       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
843     esac
844
845     # Check for guested configure; otherwise get Cygnus style configure.
846     if test -f $ac_sub_srcdir/configure.gnu; then
847       echo
848       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
849     elif test -f $ac_sub_srcdir/configure; then
850       echo
851       $SHELL $ac_sub_srcdir/configure  --help=recursive
852     elif test -f $ac_sub_srcdir/configure.ac ||
853            test -f $ac_sub_srcdir/configure.in; then
854       echo
855       $ac_configure --help
856     else
857       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
858     fi
859     cd $ac_popdir
860   done
861 fi
862
863 test -n "$ac_init_help" && exit 0
864 if $ac_init_version; then
865   cat <<\EOF
866
867 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
868 Free Software Foundation, Inc.
869 This configure script is free software; the Free Software Foundation
870 gives unlimited permission to copy, distribute and modify it.
871 EOF
872   exit 0
873 fi
874 exec 5>config.log
875 cat >&5 <<EOF
876 This file contains any messages produced by compilers while
877 running configure, to aid debugging if configure makes a mistake.
878
879 It was created by $as_me, which was
880 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
881
882   $ $0 $@
883
884 EOF
885 {
886 cat <<_ASUNAME
887 ## ---------- ##
888 ## Platform.  ##
889 ## ---------- ##
890
891 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
892 uname -m = `(uname -m) 2>/dev/null || echo unknown`
893 uname -r = `(uname -r) 2>/dev/null || echo unknown`
894 uname -s = `(uname -s) 2>/dev/null || echo unknown`
895 uname -v = `(uname -v) 2>/dev/null || echo unknown`
896
897 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
898 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
899
900 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
901 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
902 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
903 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
904 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
905 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
906 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
907
908 PATH = $PATH
909
910 _ASUNAME
911 } >&5
912
913 cat >&5 <<EOF
914 ## ------------ ##
915 ## Core tests.  ##
916 ## ------------ ##
917
918 EOF
919
920 # Keep a trace of the command line.
921 # Strip out --no-create and --no-recursion so they do not pile up.
922 # Also quote any args containing shell meta-characters.
923 ac_configure_args=
924 ac_sep=
925 for ac_arg
926 do
927   case $ac_arg in
928   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
929   | --no-cr | --no-c) ;;
930   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
931   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
932   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
933     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
934     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
935     ac_sep=" " ;;
936   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
937      ac_sep=" " ;;
938   esac
939   # Get rid of the leading space.
940 done
941
942 # When interrupted or exit'd, cleanup temporary files, and complete
943 # config.log.  We remove comments because anyway the quotes in there
944 # would cause problems or look ugly.
945 trap 'exit_status=$?
946   # Save into config.log some information that might help in debugging.
947   echo >&5
948   echo "## ----------------- ##" >&5
949   echo "## Cache variables.  ##" >&5
950   echo "## ----------------- ##" >&5
951   echo >&5
952   # The following way of writing the cache mishandles newlines in values,
953 {
954   (set) 2>&1 |
955     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
956     *ac_space=\ *)
957       sed -n \
958         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
959           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
960       ;;
961     *)
962       sed -n \
963         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
964       ;;
965     esac;
966 } >&5
967   sed "/^$/d" confdefs.h >conftest.log
968   if test -s conftest.log; then
969     echo >&5
970     echo "## ------------ ##" >&5
971     echo "## confdefs.h.  ##" >&5
972     echo "## ------------ ##" >&5
973     echo >&5
974     cat conftest.log >&5
975   fi
976   (echo; echo) >&5
977   test "$ac_signal" != 0 &&
978     echo "$as_me: caught signal $ac_signal" >&5
979   echo "$as_me: exit $exit_status" >&5
980   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
981     exit $exit_status
982      ' 0
983 for ac_signal in 1 2 13 15; do
984   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
985 done
986 ac_signal=0
987
988 # confdefs.h avoids OS command line length limits that DEFS can exceed.
989 rm -rf conftest* confdefs.h
990 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
991 echo >confdefs.h
992
993 # Let the site file select an alternate cache file if it wants to.
994 # Prefer explicitly selected file to automatically selected ones.
995 if test -z "$CONFIG_SITE"; then
996   if test "x$prefix" != xNONE; then
997     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
998   else
999     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1000   fi
1001 fi
1002 for ac_site_file in $CONFIG_SITE; do
1003   if test -r "$ac_site_file"; then
1004     { echo "$as_me:1004: loading site script $ac_site_file" >&5
1005 echo "$as_me: loading site script $ac_site_file" >&6;}
1006     cat "$ac_site_file" >&5
1007     . "$ac_site_file"
1008   fi
1009 done
1010
1011 if test -r "$cache_file"; then
1012   # Some versions of bash will fail to source /dev/null (special
1013   # files actually), so we avoid doing that.
1014   if test -f "$cache_file"; then
1015     { echo "$as_me:1015: loading cache $cache_file" >&5
1016 echo "$as_me: loading cache $cache_file" >&6;}
1017     case $cache_file in
1018       [\\/]* | ?:[\\/]* ) . $cache_file;;
1019       *)                      . ./$cache_file;;
1020     esac
1021   fi
1022 else
1023   { echo "$as_me:1023: creating cache $cache_file" >&5
1024 echo "$as_me: creating cache $cache_file" >&6;}
1025   >$cache_file
1026 fi
1027
1028 # Check that the precious variables saved in the cache have kept the same
1029 # value.
1030 ac_cache_corrupted=false
1031 for ac_var in `(set) 2>&1 |
1032                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1033   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1034   eval ac_new_set=\$ac_env_${ac_var}_set
1035   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1036   eval ac_new_val="\$ac_env_${ac_var}_value"
1037   case $ac_old_set,$ac_new_set in
1038     set,)
1039       { echo "$as_me:1039: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1040 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1041       ac_cache_corrupted=: ;;
1042     ,set)
1043       { echo "$as_me:1043: error: \`$ac_var' was not set in the previous run" >&5
1044 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1045       ac_cache_corrupted=: ;;
1046     ,);;
1047     *)
1048       if test "x$ac_old_val" != "x$ac_new_val"; then
1049         { echo "$as_me:1049: error: \`$ac_var' has changed since the previous run:" >&5
1050 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1051         { echo "$as_me:1051:   former value:  $ac_old_val" >&5
1052 echo "$as_me:   former value:  $ac_old_val" >&2;}
1053         { echo "$as_me:1053:   current value: $ac_new_val" >&5
1054 echo "$as_me:   current value: $ac_new_val" >&2;}
1055         ac_cache_corrupted=:
1056       fi;;
1057   esac
1058   # Pass precious variables to config.status.  It doesn't matter if
1059   # we pass some twice (in addition to the command line arguments).
1060   if test "$ac_new_set" = set; then
1061     case $ac_new_val in
1062     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1063       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1064       ac_configure_args="$ac_configure_args '$ac_arg'"
1065       ;;
1066     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1067        ;;
1068     esac
1069   fi
1070 done
1071 if $ac_cache_corrupted; then
1072   { echo "$as_me:1072: error: changes in the environment can compromise the build" >&5
1073 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1074   { { echo "$as_me:1074: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1075 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1076    { (exit 1); exit 1; }; }
1077 fi
1078
1079 ac_ext=c
1080 ac_cpp='$CPP $CPPFLAGS'
1081 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1082 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1083 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1084 ac_main_return=return
1085
1086 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1087   *c*,-n*) ECHO_N= ECHO_C='
1088 ' ECHO_T='      ' ;;
1089   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1090   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1091 esac
1092 echo "#! $SHELL" >conftest.sh
1093 echo  "exit 0"   >>conftest.sh
1094 chmod +x conftest.sh
1095 if { (echo "$as_me:1095: PATH=\".;.\"; conftest.sh") >&5
1096   (PATH=".;."; conftest.sh) 2>&5
1097   ac_status=$?
1098   echo "$as_me:1098: \$? = $ac_status" >&5
1099   (exit $ac_status); }; then
1100   ac_path_separator=';'
1101 else
1102   ac_path_separator=:
1103 fi
1104 PATH_SEPARATOR="$ac_path_separator"
1105 rm -f conftest.sh
1106
1107 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1108
1109 top_builddir=`pwd`
1110
1111 echo "$as_me:1111: checking for egrep" >&5
1112 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1113 if test "${ac_cv_prog_egrep+set}" = set; then
1114   echo $ECHO_N "(cached) $ECHO_C" >&6
1115 else
1116   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1117     then ac_cv_prog_egrep='grep -E'
1118     else ac_cv_prog_egrep='egrep'
1119     fi
1120 fi
1121 echo "$as_me:1121: result: $ac_cv_prog_egrep" >&5
1122 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1123  EGREP=$ac_cv_prog_egrep
1124
1125 test -z "$EGREP" && { { echo "$as_me:1125: error: No egrep program found" >&5
1126 echo "$as_me: error: No egrep program found" >&2;}
1127    { (exit 1); exit 1; }; }
1128
1129 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1130 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 cf_cv_abi_version=${NCURSES_MAJOR}
1133 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1134 cf_cv_timestamp=`date`
1135 echo "$as_me:1135: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1136 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1137
1138 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1139
1140 # Check whether --with-rel-version or --without-rel-version was given.
1141 if test "${with_rel_version+set}" = set; then
1142   withval="$with_rel_version"
1143   { echo "$as_me:1143: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1144 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1145  cf_cv_rel_version=$withval
1146 fi;
1147
1148  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1149  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1150
1151 if test -n "$NCURSES_MAJOR" ; then
1152   case $NCURSES_MAJOR in #(vi
1153   [0-9]*) #(vi
1154         ;;
1155   *)
1156         { { echo "$as_me:1156: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1157 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1158    { (exit 1); exit 1; }; }
1159         ;;
1160   esac
1161 else
1162   { { echo "$as_me:1162: error: Release major-version value is empty" >&5
1163 echo "$as_me: error: Release major-version value is empty" >&2;}
1164    { (exit 1); exit 1; }; }
1165 fi
1166
1167 if test -n "$NCURSES_MINOR" ; then
1168   case $NCURSES_MINOR in #(vi
1169   [0-9]*) #(vi
1170         ;;
1171   *)
1172         { { echo "$as_me:1172: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1173 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1174    { (exit 1); exit 1; }; }
1175         ;;
1176   esac
1177 else
1178   { { echo "$as_me:1178: error: Release minor-version value is empty" >&5
1179 echo "$as_me: error: Release minor-version value is empty" >&2;}
1180    { (exit 1); exit 1; }; }
1181 fi
1182
1183 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1184
1185 # Check whether --with-abi-version or --without-abi-version was given.
1186 if test "${with_abi_version+set}" = set; then
1187   withval="$with_abi_version"
1188   { echo "$as_me:1188: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1189 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1190  cf_cv_abi_version=$withval
1191 fi;
1192
1193 if test -n "$cf_cv_abi_version" ; then
1194   case $cf_cv_abi_version in #(vi
1195   [0-9]*) #(vi
1196         ;;
1197   *)
1198         { { echo "$as_me:1198: error: ABI version is not a number: $cf_cv_abi_version" >&5
1199 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1200    { (exit 1); exit 1; }; }
1201         ;;
1202   esac
1203 else
1204   { { echo "$as_me:1204: error: ABI version value is empty" >&5
1205 echo "$as_me: error: ABI version value is empty" >&2;}
1206    { (exit 1); exit 1; }; }
1207 fi
1208
1209 ac_aux_dir=
1210 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1211   if test -f $ac_dir/install-sh; then
1212     ac_aux_dir=$ac_dir
1213     ac_install_sh="$ac_aux_dir/install-sh -c"
1214     break
1215   elif test -f $ac_dir/install.sh; then
1216     ac_aux_dir=$ac_dir
1217     ac_install_sh="$ac_aux_dir/install.sh -c"
1218     break
1219   elif test -f $ac_dir/shtool; then
1220     ac_aux_dir=$ac_dir
1221     ac_install_sh="$ac_aux_dir/shtool install -c"
1222     break
1223   fi
1224 done
1225 if test -z "$ac_aux_dir"; then
1226   { { echo "$as_me:1226: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1227 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1228    { (exit 1); exit 1; }; }
1229 fi
1230 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1231 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1232 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1233
1234 # Make sure we can run config.sub.
1235 $ac_config_sub sun4 >/dev/null 2>&1 ||
1236   { { echo "$as_me:1236: error: cannot run $ac_config_sub" >&5
1237 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1238    { (exit 1); exit 1; }; }
1239
1240 echo "$as_me:1240: checking build system type" >&5
1241 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1242 if test "${ac_cv_build+set}" = set; then
1243   echo $ECHO_N "(cached) $ECHO_C" >&6
1244 else
1245   ac_cv_build_alias=$build_alias
1246 test -z "$ac_cv_build_alias" &&
1247   ac_cv_build_alias=`$ac_config_guess`
1248 test -z "$ac_cv_build_alias" &&
1249   { { echo "$as_me:1249: error: cannot guess build type; you must specify one" >&5
1250 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1251    { (exit 1); exit 1; }; }
1252 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1253   { { echo "$as_me:1253: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1254 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1255    { (exit 1); exit 1; }; }
1256
1257 fi
1258 echo "$as_me:1258: result: $ac_cv_build" >&5
1259 echo "${ECHO_T}$ac_cv_build" >&6
1260 build=$ac_cv_build
1261 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1262 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1263 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1264
1265 echo "$as_me:1265: checking host system type" >&5
1266 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1267 if test "${ac_cv_host+set}" = set; then
1268   echo $ECHO_N "(cached) $ECHO_C" >&6
1269 else
1270   ac_cv_host_alias=$host_alias
1271 test -z "$ac_cv_host_alias" &&
1272   ac_cv_host_alias=$ac_cv_build_alias
1273 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1274   { { echo "$as_me:1274: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1275 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1276    { (exit 1); exit 1; }; }
1277
1278 fi
1279 echo "$as_me:1279: result: $ac_cv_host" >&5
1280 echo "${ECHO_T}$ac_cv_host" >&6
1281 host=$ac_cv_host
1282 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1283 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1284 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1285
1286 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1287         echo "$as_me:1287: checking target system type" >&5
1288 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1289 if test "${ac_cv_target+set}" = set; then
1290   echo $ECHO_N "(cached) $ECHO_C" >&6
1291 else
1292   ac_cv_target_alias=$target_alias
1293 test "x$ac_cv_target_alias" = "x" &&
1294   ac_cv_target_alias=$ac_cv_host_alias
1295 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1296   { { echo "$as_me:1296: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1297 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1298    { (exit 1); exit 1; }; }
1299
1300 fi
1301 echo "$as_me:1301: result: $ac_cv_target" >&5
1302 echo "${ECHO_T}$ac_cv_target" >&6
1303 target=$ac_cv_target
1304 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1305 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1306 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1307
1308 # The aliases save the names the user supplied, while $host etc.
1309 # will get canonicalized.
1310 test -n "$target_alias" &&
1311   test "$program_prefix$program_suffix$program_transform_name" = \
1312     NONENONEs,x,x, &&
1313   program_prefix=${target_alias}-
1314         system_name="$host_os"
1315 else
1316         system_name="`(uname -s -r) 2>/dev/null`"
1317         if test -z "$system_name" ; then
1318                 system_name="`(hostname) 2>/dev/null`"
1319         fi
1320 fi
1321 test -n "$system_name" && cat >>confdefs.h <<EOF
1322 #define SYSTEM_NAME "$system_name"
1323 EOF
1324
1325 if test "${cf_cv_system_name+set}" = set; then
1326   echo $ECHO_N "(cached) $ECHO_C" >&6
1327 else
1328   cf_cv_system_name="$system_name"
1329 fi
1330
1331 test -z "$system_name" && system_name="$cf_cv_system_name"
1332 test -n "$cf_cv_system_name" && echo "$as_me:1332: result: Configuring for $cf_cv_system_name" >&5
1333 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1334
1335 if test ".$system_name" != ".$cf_cv_system_name" ; then
1336         echo "$as_me:1336: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1337 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1338         { { echo "$as_me:1338: error: \"Please remove config.cache and try again.\"" >&5
1339 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # Check whether --with-system-type or --without-system-type was given.
1344 if test "${with_system_type+set}" = set; then
1345   withval="$with_system_type"
1346   { echo "$as_me:1346: WARNING: overriding system type to $withval" >&5
1347 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1348  cf_cv_system_name=$withval
1349 fi;
1350
1351 ###     Save the given $CFLAGS to allow user-override.
1352 cf_user_CFLAGS="$CFLAGS"
1353
1354 ###     Default install-location
1355
1356 echo "$as_me:1356: checking for prefix" >&5
1357 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1358 if test "x$prefix" = "xNONE" ; then
1359         case "$cf_cv_system_name" in
1360                 # non-vendor systems don't have a conflict
1361         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1362                 prefix=/usr
1363                 ;;
1364         *)      prefix=$ac_default_prefix
1365                 ;;
1366         esac
1367 fi
1368 echo "$as_me:1368: result: $prefix" >&5
1369 echo "${ECHO_T}$prefix" >&6
1370
1371 if test "x$prefix" = "xNONE" ; then
1372 echo "$as_me:1372: checking for default include-directory" >&5
1373 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1374 test -n "$verbose" && echo 1>&6
1375 for cf_symbol in \
1376         $includedir \
1377         $includedir/ncurses \
1378         $prefix/include \
1379         $prefix/include/ncurses \
1380         /usr/local/include \
1381         /usr/local/include/ncurses \
1382         /usr/include \
1383         /usr/include/ncurses
1384 do
1385         cf_dir=`eval echo $cf_symbol`
1386         if test -f $cf_dir/curses.h ; then
1387         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1388                 includedir="$cf_symbol"
1389                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1390                 break
1391         fi
1392         fi
1393         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1394 done
1395 echo "$as_me:1395: result: $includedir" >&5
1396 echo "${ECHO_T}$includedir" >&6
1397 fi
1398
1399 ###     Checks for programs.
1400 ac_ext=c
1401 ac_cpp='$CPP $CPPFLAGS'
1402 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1403 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1404 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1405 ac_main_return=return
1406 if test -n "$ac_tool_prefix"; then
1407   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1408 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1409 echo "$as_me:1409: checking for $ac_word" >&5
1410 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1411 if test "${ac_cv_prog_CC+set}" = set; then
1412   echo $ECHO_N "(cached) $ECHO_C" >&6
1413 else
1414   if test -n "$CC"; then
1415   ac_cv_prog_CC="$CC" # Let the user override the test.
1416 else
1417   ac_save_IFS=$IFS; IFS=$ac_path_separator
1418 ac_dummy="$PATH"
1419 for ac_dir in $ac_dummy; do
1420   IFS=$ac_save_IFS
1421   test -z "$ac_dir" && ac_dir=.
1422   $as_executable_p "$ac_dir/$ac_word" || continue
1423 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1424 echo "$as_me:1424: found $ac_dir/$ac_word" >&5
1425 break
1426 done
1427
1428 fi
1429 fi
1430 CC=$ac_cv_prog_CC
1431 if test -n "$CC"; then
1432   echo "$as_me:1432: result: $CC" >&5
1433 echo "${ECHO_T}$CC" >&6
1434 else
1435   echo "$as_me:1435: result: no" >&5
1436 echo "${ECHO_T}no" >&6
1437 fi
1438
1439 fi
1440 if test -z "$ac_cv_prog_CC"; then
1441   ac_ct_CC=$CC
1442   # Extract the first word of "gcc", so it can be a program name with args.
1443 set dummy gcc; ac_word=$2
1444 echo "$as_me:1444: checking for $ac_word" >&5
1445 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1446 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1447   echo $ECHO_N "(cached) $ECHO_C" >&6
1448 else
1449   if test -n "$ac_ct_CC"; then
1450   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1451 else
1452   ac_save_IFS=$IFS; IFS=$ac_path_separator
1453 ac_dummy="$PATH"
1454 for ac_dir in $ac_dummy; do
1455   IFS=$ac_save_IFS
1456   test -z "$ac_dir" && ac_dir=.
1457   $as_executable_p "$ac_dir/$ac_word" || continue
1458 ac_cv_prog_ac_ct_CC="gcc"
1459 echo "$as_me:1459: found $ac_dir/$ac_word" >&5
1460 break
1461 done
1462
1463 fi
1464 fi
1465 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1466 if test -n "$ac_ct_CC"; then
1467   echo "$as_me:1467: result: $ac_ct_CC" >&5
1468 echo "${ECHO_T}$ac_ct_CC" >&6
1469 else
1470   echo "$as_me:1470: result: no" >&5
1471 echo "${ECHO_T}no" >&6
1472 fi
1473
1474   CC=$ac_ct_CC
1475 else
1476   CC="$ac_cv_prog_CC"
1477 fi
1478
1479 if test -z "$CC"; then
1480   if test -n "$ac_tool_prefix"; then
1481   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1482 set dummy ${ac_tool_prefix}cc; ac_word=$2
1483 echo "$as_me:1483: checking for $ac_word" >&5
1484 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1485 if test "${ac_cv_prog_CC+set}" = set; then
1486   echo $ECHO_N "(cached) $ECHO_C" >&6
1487 else
1488   if test -n "$CC"; then
1489   ac_cv_prog_CC="$CC" # Let the user override the test.
1490 else
1491   ac_save_IFS=$IFS; IFS=$ac_path_separator
1492 ac_dummy="$PATH"
1493 for ac_dir in $ac_dummy; do
1494   IFS=$ac_save_IFS
1495   test -z "$ac_dir" && ac_dir=.
1496   $as_executable_p "$ac_dir/$ac_word" || continue
1497 ac_cv_prog_CC="${ac_tool_prefix}cc"
1498 echo "$as_me:1498: found $ac_dir/$ac_word" >&5
1499 break
1500 done
1501
1502 fi
1503 fi
1504 CC=$ac_cv_prog_CC
1505 if test -n "$CC"; then
1506   echo "$as_me:1506: result: $CC" >&5
1507 echo "${ECHO_T}$CC" >&6
1508 else
1509   echo "$as_me:1509: result: no" >&5
1510 echo "${ECHO_T}no" >&6
1511 fi
1512
1513 fi
1514 if test -z "$ac_cv_prog_CC"; then
1515   ac_ct_CC=$CC
1516   # Extract the first word of "cc", so it can be a program name with args.
1517 set dummy cc; ac_word=$2
1518 echo "$as_me:1518: checking for $ac_word" >&5
1519 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1520 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1521   echo $ECHO_N "(cached) $ECHO_C" >&6
1522 else
1523   if test -n "$ac_ct_CC"; then
1524   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1525 else
1526   ac_save_IFS=$IFS; IFS=$ac_path_separator
1527 ac_dummy="$PATH"
1528 for ac_dir in $ac_dummy; do
1529   IFS=$ac_save_IFS
1530   test -z "$ac_dir" && ac_dir=.
1531   $as_executable_p "$ac_dir/$ac_word" || continue
1532 ac_cv_prog_ac_ct_CC="cc"
1533 echo "$as_me:1533: found $ac_dir/$ac_word" >&5
1534 break
1535 done
1536
1537 fi
1538 fi
1539 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1540 if test -n "$ac_ct_CC"; then
1541   echo "$as_me:1541: result: $ac_ct_CC" >&5
1542 echo "${ECHO_T}$ac_ct_CC" >&6
1543 else
1544   echo "$as_me:1544: result: no" >&5
1545 echo "${ECHO_T}no" >&6
1546 fi
1547
1548   CC=$ac_ct_CC
1549 else
1550   CC="$ac_cv_prog_CC"
1551 fi
1552
1553 fi
1554 if test -z "$CC"; then
1555   # Extract the first word of "cc", so it can be a program name with args.
1556 set dummy cc; ac_word=$2
1557 echo "$as_me:1557: checking for $ac_word" >&5
1558 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1559 if test "${ac_cv_prog_CC+set}" = set; then
1560   echo $ECHO_N "(cached) $ECHO_C" >&6
1561 else
1562   if test -n "$CC"; then
1563   ac_cv_prog_CC="$CC" # Let the user override the test.
1564 else
1565   ac_prog_rejected=no
1566   ac_save_IFS=$IFS; IFS=$ac_path_separator
1567 ac_dummy="$PATH"
1568 for ac_dir in $ac_dummy; do
1569   IFS=$ac_save_IFS
1570   test -z "$ac_dir" && ac_dir=.
1571   $as_executable_p "$ac_dir/$ac_word" || continue
1572 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1573   ac_prog_rejected=yes
1574   continue
1575 fi
1576 ac_cv_prog_CC="cc"
1577 echo "$as_me:1577: found $ac_dir/$ac_word" >&5
1578 break
1579 done
1580
1581 if test $ac_prog_rejected = yes; then
1582   # We found a bogon in the path, so make sure we never use it.
1583   set dummy $ac_cv_prog_CC
1584   shift
1585   if test $# != 0; then
1586     # We chose a different compiler from the bogus one.
1587     # However, it has the same basename, so the bogon will be chosen
1588     # first if we set CC to just the basename; use the full file name.
1589     shift
1590     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1591     shift
1592     ac_cv_prog_CC="$@"
1593   fi
1594 fi
1595 fi
1596 fi
1597 CC=$ac_cv_prog_CC
1598 if test -n "$CC"; then
1599   echo "$as_me:1599: result: $CC" >&5
1600 echo "${ECHO_T}$CC" >&6
1601 else
1602   echo "$as_me:1602: result: no" >&5
1603 echo "${ECHO_T}no" >&6
1604 fi
1605
1606 fi
1607 if test -z "$CC"; then
1608   if test -n "$ac_tool_prefix"; then
1609   for ac_prog in cl
1610   do
1611     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1612 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1613 echo "$as_me:1613: checking for $ac_word" >&5
1614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1615 if test "${ac_cv_prog_CC+set}" = set; then
1616   echo $ECHO_N "(cached) $ECHO_C" >&6
1617 else
1618   if test -n "$CC"; then
1619   ac_cv_prog_CC="$CC" # Let the user override the test.
1620 else
1621   ac_save_IFS=$IFS; IFS=$ac_path_separator
1622 ac_dummy="$PATH"
1623 for ac_dir in $ac_dummy; do
1624   IFS=$ac_save_IFS
1625   test -z "$ac_dir" && ac_dir=.
1626   $as_executable_p "$ac_dir/$ac_word" || continue
1627 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1628 echo "$as_me:1628: found $ac_dir/$ac_word" >&5
1629 break
1630 done
1631
1632 fi
1633 fi
1634 CC=$ac_cv_prog_CC
1635 if test -n "$CC"; then
1636   echo "$as_me:1636: result: $CC" >&5
1637 echo "${ECHO_T}$CC" >&6
1638 else
1639   echo "$as_me:1639: result: no" >&5
1640 echo "${ECHO_T}no" >&6
1641 fi
1642
1643     test -n "$CC" && break
1644   done
1645 fi
1646 if test -z "$CC"; then
1647   ac_ct_CC=$CC
1648   for ac_prog in cl
1649 do
1650   # Extract the first word of "$ac_prog", so it can be a program name with args.
1651 set dummy $ac_prog; ac_word=$2
1652 echo "$as_me:1652: checking for $ac_word" >&5
1653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1654 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1655   echo $ECHO_N "(cached) $ECHO_C" >&6
1656 else
1657   if test -n "$ac_ct_CC"; then
1658   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1659 else
1660   ac_save_IFS=$IFS; IFS=$ac_path_separator
1661 ac_dummy="$PATH"
1662 for ac_dir in $ac_dummy; do
1663   IFS=$ac_save_IFS
1664   test -z "$ac_dir" && ac_dir=.
1665   $as_executable_p "$ac_dir/$ac_word" || continue
1666 ac_cv_prog_ac_ct_CC="$ac_prog"
1667 echo "$as_me:1667: found $ac_dir/$ac_word" >&5
1668 break
1669 done
1670
1671 fi
1672 fi
1673 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1674 if test -n "$ac_ct_CC"; then
1675   echo "$as_me:1675: result: $ac_ct_CC" >&5
1676 echo "${ECHO_T}$ac_ct_CC" >&6
1677 else
1678   echo "$as_me:1678: result: no" >&5
1679 echo "${ECHO_T}no" >&6
1680 fi
1681
1682   test -n "$ac_ct_CC" && break
1683 done
1684
1685   CC=$ac_ct_CC
1686 fi
1687
1688 fi
1689
1690 test -z "$CC" && { { echo "$as_me:1690: error: no acceptable cc found in \$PATH" >&5
1691 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1692    { (exit 1); exit 1; }; }
1693
1694 # Provide some information about the compiler.
1695 echo "$as_me:1695:" \
1696      "checking for C compiler version" >&5
1697 ac_compiler=`set X $ac_compile; echo $2`
1698 { (eval echo "$as_me:1698: \"$ac_compiler --version </dev/null >&5\"") >&5
1699   (eval $ac_compiler --version </dev/null >&5) 2>&5
1700   ac_status=$?
1701   echo "$as_me:1701: \$? = $ac_status" >&5
1702   (exit $ac_status); }
1703 { (eval echo "$as_me:1703: \"$ac_compiler -v </dev/null >&5\"") >&5
1704   (eval $ac_compiler -v </dev/null >&5) 2>&5
1705   ac_status=$?
1706   echo "$as_me:1706: \$? = $ac_status" >&5
1707   (exit $ac_status); }
1708 { (eval echo "$as_me:1708: \"$ac_compiler -V </dev/null >&5\"") >&5
1709   (eval $ac_compiler -V </dev/null >&5) 2>&5
1710   ac_status=$?
1711   echo "$as_me:1711: \$? = $ac_status" >&5
1712   (exit $ac_status); }
1713
1714 cat >conftest.$ac_ext <<_ACEOF
1715 #line 1715 "configure"
1716 #include "confdefs.h"
1717
1718 int
1719 main ()
1720 {
1721
1722   ;
1723   return 0;
1724 }
1725 _ACEOF
1726 ac_clean_files_save=$ac_clean_files
1727 ac_clean_files="$ac_clean_files a.out a.exe"
1728 # Try to create an executable without -o first, disregard a.out.
1729 # It will help us diagnose broken compilers, and finding out an intuition
1730 # of exeext.
1731 echo "$as_me:1731: checking for C compiler default output" >&5
1732 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1733 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1734 if { (eval echo "$as_me:1734: \"$ac_link_default\"") >&5
1735   (eval $ac_link_default) 2>&5
1736   ac_status=$?
1737   echo "$as_me:1737: \$? = $ac_status" >&5
1738   (exit $ac_status); }; then
1739   # Find the output, starting from the most likely.  This scheme is
1740 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1741 # resort.
1742 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1743                 ls a.out conftest 2>/dev/null;
1744                 ls a.* conftest.* 2>/dev/null`; do
1745   case $ac_file in
1746     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1747     a.out ) # We found the default executable, but exeext='' is most
1748             # certainly right.
1749             break;;
1750     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1751           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1752           export ac_cv_exeext
1753           break;;
1754     * ) break;;
1755   esac
1756 done
1757 else
1758   echo "$as_me: failed program was:" >&5
1759 cat conftest.$ac_ext >&5
1760 { { echo "$as_me:1760: error: C compiler cannot create executables" >&5
1761 echo "$as_me: error: C compiler cannot create executables" >&2;}
1762    { (exit 77); exit 77; }; }
1763 fi
1764
1765 ac_exeext=$ac_cv_exeext
1766 echo "$as_me:1766: result: $ac_file" >&5
1767 echo "${ECHO_T}$ac_file" >&6
1768
1769 # Check the compiler produces executables we can run.  If not, either
1770 # the compiler is broken, or we cross compile.
1771 echo "$as_me:1771: checking whether the C compiler works" >&5
1772 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1773 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1774 # If not cross compiling, check that we can run a simple program.
1775 if test "$cross_compiling" != yes; then
1776   if { ac_try='./$ac_file'
1777   { (eval echo "$as_me:1777: \"$ac_try\"") >&5
1778   (eval $ac_try) 2>&5
1779   ac_status=$?
1780   echo "$as_me:1780: \$? = $ac_status" >&5
1781   (exit $ac_status); }; }; then
1782     cross_compiling=no
1783   else
1784     if test "$cross_compiling" = maybe; then
1785         cross_compiling=yes
1786     else
1787         { { echo "$as_me:1787: error: cannot run C compiled programs.
1788 If you meant to cross compile, use \`--host'." >&5
1789 echo "$as_me: error: cannot run C compiled programs.
1790 If you meant to cross compile, use \`--host'." >&2;}
1791    { (exit 1); exit 1; }; }
1792     fi
1793   fi
1794 fi
1795 echo "$as_me:1795: result: yes" >&5
1796 echo "${ECHO_T}yes" >&6
1797
1798 rm -f a.out a.exe conftest$ac_cv_exeext
1799 ac_clean_files=$ac_clean_files_save
1800 # Check the compiler produces executables we can run.  If not, either
1801 # the compiler is broken, or we cross compile.
1802 echo "$as_me:1802: checking whether we are cross compiling" >&5
1803 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1804 echo "$as_me:1804: result: $cross_compiling" >&5
1805 echo "${ECHO_T}$cross_compiling" >&6
1806
1807 echo "$as_me:1807: checking for executable suffix" >&5
1808 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1809 if { (eval echo "$as_me:1809: \"$ac_link\"") >&5
1810   (eval $ac_link) 2>&5
1811   ac_status=$?
1812   echo "$as_me:1812: \$? = $ac_status" >&5
1813   (exit $ac_status); }; then
1814   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1815 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1816 # work properly (i.e., refer to `conftest.exe'), while it won't with
1817 # `rm'.
1818 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1819   case $ac_file in
1820     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1821     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1822           export ac_cv_exeext
1823           break;;
1824     * ) break;;
1825   esac
1826 done
1827 else
1828   { { echo "$as_me:1828: error: cannot compute EXEEXT: cannot compile and link" >&5
1829 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1830    { (exit 1); exit 1; }; }
1831 fi
1832
1833 rm -f conftest$ac_cv_exeext
1834 echo "$as_me:1834: result: $ac_cv_exeext" >&5
1835 echo "${ECHO_T}$ac_cv_exeext" >&6
1836
1837 rm -f conftest.$ac_ext
1838 EXEEXT=$ac_cv_exeext
1839 ac_exeext=$EXEEXT
1840 echo "$as_me:1840: checking for object suffix" >&5
1841 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1842 if test "${ac_cv_objext+set}" = set; then
1843   echo $ECHO_N "(cached) $ECHO_C" >&6
1844 else
1845   cat >conftest.$ac_ext <<_ACEOF
1846 #line 1846 "configure"
1847 #include "confdefs.h"
1848
1849 int
1850 main ()
1851 {
1852
1853   ;
1854   return 0;
1855 }
1856 _ACEOF
1857 rm -f conftest.o conftest.obj
1858 if { (eval echo "$as_me:1858: \"$ac_compile\"") >&5
1859   (eval $ac_compile) 2>&5
1860   ac_status=$?
1861   echo "$as_me:1861: \$? = $ac_status" >&5
1862   (exit $ac_status); }; then
1863   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1864   case $ac_file in
1865     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1866     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1867        break;;
1868   esac
1869 done
1870 else
1871   echo "$as_me: failed program was:" >&5
1872 cat conftest.$ac_ext >&5
1873 { { echo "$as_me:1873: error: cannot compute OBJEXT: cannot compile" >&5
1874 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1875    { (exit 1); exit 1; }; }
1876 fi
1877
1878 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1879 fi
1880 echo "$as_me:1880: result: $ac_cv_objext" >&5
1881 echo "${ECHO_T}$ac_cv_objext" >&6
1882 OBJEXT=$ac_cv_objext
1883 ac_objext=$OBJEXT
1884 echo "$as_me:1884: checking whether we are using the GNU C compiler" >&5
1885 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1886 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1887   echo $ECHO_N "(cached) $ECHO_C" >&6
1888 else
1889   cat >conftest.$ac_ext <<_ACEOF
1890 #line 1890 "configure"
1891 #include "confdefs.h"
1892
1893 int
1894 main ()
1895 {
1896 #ifndef __GNUC__
1897        choke me
1898 #endif
1899
1900   ;
1901   return 0;
1902 }
1903 _ACEOF
1904 rm -f conftest.$ac_objext
1905 if { (eval echo "$as_me:1905: \"$ac_compile\"") >&5
1906   (eval $ac_compile) 2>&5
1907   ac_status=$?
1908   echo "$as_me:1908: \$? = $ac_status" >&5
1909   (exit $ac_status); } &&
1910          { ac_try='test -s conftest.$ac_objext'
1911   { (eval echo "$as_me:1911: \"$ac_try\"") >&5
1912   (eval $ac_try) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); }; }; then
1916   ac_compiler_gnu=yes
1917 else
1918   echo "$as_me: failed program was:" >&5
1919 cat conftest.$ac_ext >&5
1920 ac_compiler_gnu=no
1921 fi
1922 rm -f conftest.$ac_objext conftest.$ac_ext
1923 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1924
1925 fi
1926 echo "$as_me:1926: result: $ac_cv_c_compiler_gnu" >&5
1927 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1928 GCC=`test $ac_compiler_gnu = yes && echo yes`
1929 ac_test_CFLAGS=${CFLAGS+set}
1930 ac_save_CFLAGS=$CFLAGS
1931 CFLAGS="-g"
1932 echo "$as_me:1932: checking whether $CC accepts -g" >&5
1933 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1934 if test "${ac_cv_prog_cc_g+set}" = set; then
1935   echo $ECHO_N "(cached) $ECHO_C" >&6
1936 else
1937   cat >conftest.$ac_ext <<_ACEOF
1938 #line 1938 "configure"
1939 #include "confdefs.h"
1940
1941 int
1942 main ()
1943 {
1944
1945   ;
1946   return 0;
1947 }
1948 _ACEOF
1949 rm -f conftest.$ac_objext
1950 if { (eval echo "$as_me:1950: \"$ac_compile\"") >&5
1951   (eval $ac_compile) 2>&5
1952   ac_status=$?
1953   echo "$as_me:1953: \$? = $ac_status" >&5
1954   (exit $ac_status); } &&
1955          { ac_try='test -s conftest.$ac_objext'
1956   { (eval echo "$as_me:1956: \"$ac_try\"") >&5
1957   (eval $ac_try) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); }; }; then
1961   ac_cv_prog_cc_g=yes
1962 else
1963   echo "$as_me: failed program was:" >&5
1964 cat conftest.$ac_ext >&5
1965 ac_cv_prog_cc_g=no
1966 fi
1967 rm -f conftest.$ac_objext conftest.$ac_ext
1968 fi
1969 echo "$as_me:1969: result: $ac_cv_prog_cc_g" >&5
1970 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1971 if test "$ac_test_CFLAGS" = set; then
1972   CFLAGS=$ac_save_CFLAGS
1973 elif test $ac_cv_prog_cc_g = yes; then
1974   if test "$GCC" = yes; then
1975     CFLAGS="-g -O2"
1976   else
1977     CFLAGS="-g"
1978   fi
1979 else
1980   if test "$GCC" = yes; then
1981     CFLAGS="-O2"
1982   else
1983     CFLAGS=
1984   fi
1985 fi
1986 # Some people use a C++ compiler to compile C.  Since we use `exit',
1987 # in C++ we need to declare it.  In case someone uses the same compiler
1988 # for both compiling C and C++ we need to have the C++ compiler decide
1989 # the declaration of exit, since it's the most demanding environment.
1990 cat >conftest.$ac_ext <<_ACEOF
1991 #ifndef __cplusplus
1992   choke me
1993 #endif
1994 _ACEOF
1995 rm -f conftest.$ac_objext
1996 if { (eval echo "$as_me:1996: \"$ac_compile\"") >&5
1997   (eval $ac_compile) 2>&5
1998   ac_status=$?
1999   echo "$as_me:1999: \$? = $ac_status" >&5
2000   (exit $ac_status); } &&
2001          { ac_try='test -s conftest.$ac_objext'
2002   { (eval echo "$as_me:2002: \"$ac_try\"") >&5
2003   (eval $ac_try) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); }; }; then
2007   for ac_declaration in \
2008    ''\
2009    '#include <stdlib.h>' \
2010    'extern "C" void std::exit (int) throw (); using std::exit;' \
2011    'extern "C" void std::exit (int); using std::exit;' \
2012    'extern "C" void exit (int) throw ();' \
2013    'extern "C" void exit (int);' \
2014    'void exit (int);'
2015 do
2016   cat >conftest.$ac_ext <<_ACEOF
2017 #line 2017 "configure"
2018 #include "confdefs.h"
2019 #include <stdlib.h>
2020 $ac_declaration
2021 int
2022 main ()
2023 {
2024 exit (42);
2025   ;
2026   return 0;
2027 }
2028 _ACEOF
2029 rm -f conftest.$ac_objext
2030 if { (eval echo "$as_me:2030: \"$ac_compile\"") >&5
2031   (eval $ac_compile) 2>&5
2032   ac_status=$?
2033   echo "$as_me:2033: \$? = $ac_status" >&5
2034   (exit $ac_status); } &&
2035          { ac_try='test -s conftest.$ac_objext'
2036   { (eval echo "$as_me:2036: \"$ac_try\"") >&5
2037   (eval $ac_try) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); }; }; then
2041   :
2042 else
2043   echo "$as_me: failed program was:" >&5
2044 cat conftest.$ac_ext >&5
2045 continue
2046 fi
2047 rm -f conftest.$ac_objext conftest.$ac_ext
2048   cat >conftest.$ac_ext <<_ACEOF
2049 #line 2049 "configure"
2050 #include "confdefs.h"
2051 $ac_declaration
2052 int
2053 main ()
2054 {
2055 exit (42);
2056   ;
2057   return 0;
2058 }
2059 _ACEOF
2060 rm -f conftest.$ac_objext
2061 if { (eval echo "$as_me:2061: \"$ac_compile\"") >&5
2062   (eval $ac_compile) 2>&5
2063   ac_status=$?
2064   echo "$as_me:2064: \$? = $ac_status" >&5
2065   (exit $ac_status); } &&
2066          { ac_try='test -s conftest.$ac_objext'
2067   { (eval echo "$as_me:2067: \"$ac_try\"") >&5
2068   (eval $ac_try) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); }; }; then
2072   break
2073 else
2074   echo "$as_me: failed program was:" >&5
2075 cat conftest.$ac_ext >&5
2076 fi
2077 rm -f conftest.$ac_objext conftest.$ac_ext
2078 done
2079 rm -f conftest*
2080 if test -n "$ac_declaration"; then
2081   echo '#ifdef __cplusplus' >>confdefs.h
2082   echo $ac_declaration      >>confdefs.h
2083   echo '#endif'             >>confdefs.h
2084 fi
2085
2086 else
2087   echo "$as_me: failed program was:" >&5
2088 cat conftest.$ac_ext >&5
2089 fi
2090 rm -f conftest.$ac_objext conftest.$ac_ext
2091 ac_ext=c
2092 ac_cpp='$CPP $CPPFLAGS'
2093 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2094 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2095 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2096 ac_main_return=return
2097
2098 GCC_VERSION=none
2099 if test "$GCC" = yes ; then
2100         echo "$as_me:2100: checking version of $CC" >&5
2101 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2102         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2103         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2104         echo "$as_me:2104: result: $GCC_VERSION" >&5
2105 echo "${ECHO_T}$GCC_VERSION" >&6
2106 fi
2107
2108 ac_ext=c
2109 ac_cpp='$CPP $CPPFLAGS'
2110 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2111 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2112 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2113 ac_main_return=return
2114 echo "$as_me:2114: checking how to run the C preprocessor" >&5
2115 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2116 # On Suns, sometimes $CPP names a directory.
2117 if test -n "$CPP" && test -d "$CPP"; then
2118   CPP=
2119 fi
2120 if test -z "$CPP"; then
2121   if test "${ac_cv_prog_CPP+set}" = set; then
2122   echo $ECHO_N "(cached) $ECHO_C" >&6
2123 else
2124       # Double quotes because CPP needs to be expanded
2125     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2126     do
2127       ac_preproc_ok=false
2128 for ac_c_preproc_warn_flag in '' yes
2129 do
2130   # Use a header file that comes with gcc, so configuring glibc
2131   # with a fresh cross-compiler works.
2132   # On the NeXT, cc -E runs the code through the compiler's parser,
2133   # not just through cpp. "Syntax error" is here to catch this case.
2134   cat >conftest.$ac_ext <<_ACEOF
2135 #line 2135 "configure"
2136 #include "confdefs.h"
2137 #include <assert.h>
2138                      Syntax error
2139 _ACEOF
2140 if { (eval echo "$as_me:2140: \"$ac_cpp conftest.$ac_ext\"") >&5
2141   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2142   ac_status=$?
2143   egrep -v '^ *\+' conftest.er1 >conftest.err
2144   rm -f conftest.er1
2145   cat conftest.err >&5
2146   echo "$as_me:2146: \$? = $ac_status" >&5
2147   (exit $ac_status); } >/dev/null; then
2148   if test -s conftest.err; then
2149     ac_cpp_err=$ac_c_preproc_warn_flag
2150   else
2151     ac_cpp_err=
2152   fi
2153 else
2154   ac_cpp_err=yes
2155 fi
2156 if test -z "$ac_cpp_err"; then
2157   :
2158 else
2159   echo "$as_me: failed program was:" >&5
2160   cat conftest.$ac_ext >&5
2161   # Broken: fails on valid input.
2162 continue
2163 fi
2164 rm -f conftest.err conftest.$ac_ext
2165
2166   # OK, works on sane cases.  Now check whether non-existent headers
2167   # can be detected and how.
2168   cat >conftest.$ac_ext <<_ACEOF
2169 #line 2169 "configure"
2170 #include "confdefs.h"
2171 #include <ac_nonexistent.h>
2172 _ACEOF
2173 if { (eval echo "$as_me:2173: \"$ac_cpp conftest.$ac_ext\"") >&5
2174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2175   ac_status=$?
2176   egrep -v '^ *\+' conftest.er1 >conftest.err
2177   rm -f conftest.er1
2178   cat conftest.err >&5
2179   echo "$as_me:2179: \$? = $ac_status" >&5
2180   (exit $ac_status); } >/dev/null; then
2181   if test -s conftest.err; then
2182     ac_cpp_err=$ac_c_preproc_warn_flag
2183   else
2184     ac_cpp_err=
2185   fi
2186 else
2187   ac_cpp_err=yes
2188 fi
2189 if test -z "$ac_cpp_err"; then
2190   # Broken: success on invalid input.
2191 continue
2192 else
2193   echo "$as_me: failed program was:" >&5
2194   cat conftest.$ac_ext >&5
2195   # Passes both tests.
2196 ac_preproc_ok=:
2197 break
2198 fi
2199 rm -f conftest.err conftest.$ac_ext
2200
2201 done
2202 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2203 rm -f conftest.err conftest.$ac_ext
2204 if $ac_preproc_ok; then
2205   break
2206 fi
2207
2208     done
2209     ac_cv_prog_CPP=$CPP
2210
2211 fi
2212   CPP=$ac_cv_prog_CPP
2213 else
2214   ac_cv_prog_CPP=$CPP
2215 fi
2216 echo "$as_me:2216: result: $CPP" >&5
2217 echo "${ECHO_T}$CPP" >&6
2218 ac_preproc_ok=false
2219 for ac_c_preproc_warn_flag in '' yes
2220 do
2221   # Use a header file that comes with gcc, so configuring glibc
2222   # with a fresh cross-compiler works.
2223   # On the NeXT, cc -E runs the code through the compiler's parser,
2224   # not just through cpp. "Syntax error" is here to catch this case.
2225   cat >conftest.$ac_ext <<_ACEOF
2226 #line 2226 "configure"
2227 #include "confdefs.h"
2228 #include <assert.h>
2229                      Syntax error
2230 _ACEOF
2231 if { (eval echo "$as_me:2231: \"$ac_cpp conftest.$ac_ext\"") >&5
2232   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2233   ac_status=$?
2234   egrep -v '^ *\+' conftest.er1 >conftest.err
2235   rm -f conftest.er1
2236   cat conftest.err >&5
2237   echo "$as_me:2237: \$? = $ac_status" >&5
2238   (exit $ac_status); } >/dev/null; then
2239   if test -s conftest.err; then
2240     ac_cpp_err=$ac_c_preproc_warn_flag
2241   else
2242     ac_cpp_err=
2243   fi
2244 else
2245   ac_cpp_err=yes
2246 fi
2247 if test -z "$ac_cpp_err"; then
2248   :
2249 else
2250   echo "$as_me: failed program was:" >&5
2251   cat conftest.$ac_ext >&5
2252   # Broken: fails on valid input.
2253 continue
2254 fi
2255 rm -f conftest.err conftest.$ac_ext
2256
2257   # OK, works on sane cases.  Now check whether non-existent headers
2258   # can be detected and how.
2259   cat >conftest.$ac_ext <<_ACEOF
2260 #line 2260 "configure"
2261 #include "confdefs.h"
2262 #include <ac_nonexistent.h>
2263 _ACEOF
2264 if { (eval echo "$as_me:2264: \"$ac_cpp conftest.$ac_ext\"") >&5
2265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2266   ac_status=$?
2267   egrep -v '^ *\+' conftest.er1 >conftest.err
2268   rm -f conftest.er1
2269   cat conftest.err >&5
2270   echo "$as_me:2270: \$? = $ac_status" >&5
2271   (exit $ac_status); } >/dev/null; then
2272   if test -s conftest.err; then
2273     ac_cpp_err=$ac_c_preproc_warn_flag
2274   else
2275     ac_cpp_err=
2276   fi
2277 else
2278   ac_cpp_err=yes
2279 fi
2280 if test -z "$ac_cpp_err"; then
2281   # Broken: success on invalid input.
2282 continue
2283 else
2284   echo "$as_me: failed program was:" >&5
2285   cat conftest.$ac_ext >&5
2286   # Passes both tests.
2287 ac_preproc_ok=:
2288 break
2289 fi
2290 rm -f conftest.err conftest.$ac_ext
2291
2292 done
2293 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2294 rm -f conftest.err conftest.$ac_ext
2295 if $ac_preproc_ok; then
2296   :
2297 else
2298   { { echo "$as_me:2298: error: C preprocessor \"$CPP\" fails sanity check" >&5
2299 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2300    { (exit 1); exit 1; }; }
2301 fi
2302
2303 ac_ext=c
2304 ac_cpp='$CPP $CPPFLAGS'
2305 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2306 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2307 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2308 ac_main_return=return
2309
2310 if test $ac_cv_c_compiler_gnu = yes; then
2311     echo "$as_me:2311: checking whether $CC needs -traditional" >&5
2312 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2313 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2314   echo $ECHO_N "(cached) $ECHO_C" >&6
2315 else
2316     ac_pattern="Autoconf.*'x'"
2317   cat >conftest.$ac_ext <<_ACEOF
2318 #line 2318 "configure"
2319 #include "confdefs.h"
2320 #include <sgtty.h>
2321 int Autoconf = TIOCGETP;
2322 _ACEOF
2323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2324   egrep "$ac_pattern" >/dev/null 2>&1; then
2325   ac_cv_prog_gcc_traditional=yes
2326 else
2327   ac_cv_prog_gcc_traditional=no
2328 fi
2329 rm -f conftest*
2330
2331   if test $ac_cv_prog_gcc_traditional = no; then
2332     cat >conftest.$ac_ext <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335 #include <termio.h>
2336 int Autoconf = TCGETA;
2337 _ACEOF
2338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2339   egrep "$ac_pattern" >/dev/null 2>&1; then
2340   ac_cv_prog_gcc_traditional=yes
2341 fi
2342 rm -f conftest*
2343
2344   fi
2345 fi
2346 echo "$as_me:2346: result: $ac_cv_prog_gcc_traditional" >&5
2347 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2348   if test $ac_cv_prog_gcc_traditional = yes; then
2349     CC="$CC -traditional"
2350   fi
2351 fi
2352
2353 echo "$as_me:2353: checking whether $CC understands -c and -o together" >&5
2354 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2355 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2356   echo $ECHO_N "(cached) $ECHO_C" >&6
2357 else
2358
2359 cat > conftest.$ac_ext <<CF_EOF
2360 #include <stdio.h>
2361 int main()
2362 {
2363         ${cf_cv_main_return:-return}(0);
2364 }
2365 CF_EOF
2366 # We do the test twice because some compilers refuse to overwrite an
2367 # existing .o file with -o, though they will create one.
2368 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2369 if { (eval echo "$as_me:2369: \"$ac_try\"") >&5
2370   (eval $ac_try) 2>&5
2371   ac_status=$?
2372   echo "$as_me:2372: \$? = $ac_status" >&5
2373   (exit $ac_status); } &&
2374   test -f conftest2.$ac_objext && { (eval echo "$as_me:2374: \"$ac_try\"") >&5
2375   (eval $ac_try) 2>&5
2376   ac_status=$?
2377   echo "$as_me:2377: \$? = $ac_status" >&5
2378   (exit $ac_status); };
2379 then
2380   eval cf_cv_prog_CC_c_o=yes
2381 else
2382   eval cf_cv_prog_CC_c_o=no
2383 fi
2384 rm -f conftest*
2385
2386 fi
2387 if test $cf_cv_prog_CC_c_o = yes; then
2388   echo "$as_me:2388: result: yes" >&5
2389 echo "${ECHO_T}yes" >&6
2390 else
2391   echo "$as_me:2391: result: no" >&5
2392 echo "${ECHO_T}no" >&6
2393 fi
2394
2395 echo "$as_me:2395: checking for POSIXized ISC" >&5
2396 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2397 if test -d /etc/conf/kconfig.d &&
2398    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2399 then
2400   echo "$as_me:2400: result: yes" >&5
2401 echo "${ECHO_T}yes" >&6
2402   ISC=yes # If later tests want to check for ISC.
2403
2404 cat >>confdefs.h <<\EOF
2405 #define _POSIX_SOURCE 1
2406 EOF
2407
2408   if test "$GCC" = yes; then
2409     CC="$CC -posix"
2410   else
2411     CC="$CC -Xp"
2412   fi
2413 else
2414   echo "$as_me:2414: result: no" >&5
2415 echo "${ECHO_T}no" >&6
2416   ISC=
2417 fi
2418
2419 echo "$as_me:2419: checking for ${CC-cc} option to accept ANSI C" >&5
2420 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2421 if test "${cf_cv_ansi_cc+set}" = set; then
2422   echo $ECHO_N "(cached) $ECHO_C" >&6
2423 else
2424
2425 cf_cv_ansi_cc=no
2426 cf_save_CFLAGS="$CFLAGS"
2427 cf_save_CPPFLAGS="$CPPFLAGS"
2428 # Don't try gcc -ansi; that turns off useful extensions and
2429 # breaks some systems' header files.
2430 # AIX                   -qlanglvl=ansi
2431 # Ultrix and OSF/1      -std1
2432 # HP-UX                 -Aa -D_HPUX_SOURCE
2433 # SVR4                  -Xc
2434 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2435 for cf_arg in "-DCC_HAS_PROTOS" \
2436         "" \
2437         -qlanglvl=ansi \
2438         -std1 \
2439         -Ae \
2440         "-Aa -D_HPUX_SOURCE" \
2441         -Xc
2442 do
2443
2444 cf_fix_cppflags=no
2445 cf_new_cflags=
2446 cf_new_cppflags=
2447 cf_new_extra_cppflags=
2448
2449 for cf_add_cflags in $cf_arg
2450 do
2451 case $cf_fix_cppflags in
2452 no)
2453         case $cf_add_cflags in #(vi
2454         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2455                 case $cf_add_cflags in
2456                 -D*)
2457                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2458
2459                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2460                         && test -z "${cf_tst_cflags}" \
2461                         && cf_fix_cppflags=yes
2462
2463                         if test $cf_fix_cppflags = yes ; then
2464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2465                                 continue
2466                         elif test "${cf_tst_cflags}" = "\"'" ; then
2467                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2468                                 continue
2469                         fi
2470                         ;;
2471                 esac
2472                 case "$CPPFLAGS" in
2473                 *$cf_add_cflags) #(vi
2474                         ;;
2475                 *) #(vi
2476                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2477                         ;;
2478                 esac
2479                 ;;
2480         *)
2481                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2482                 ;;
2483         esac
2484         ;;
2485 yes)
2486         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2487
2488         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2489
2490         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2491         && test -z "${cf_tst_cflags}" \
2492         && cf_fix_cppflags=no
2493         ;;
2494 esac
2495 done
2496
2497 if test -n "$cf_new_cflags" ; then
2498
2499         CFLAGS="$CFLAGS $cf_new_cflags"
2500 fi
2501
2502 if test -n "$cf_new_cppflags" ; then
2503
2504         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2505 fi
2506
2507 if test -n "$cf_new_extra_cppflags" ; then
2508
2509         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2510 fi
2511
2512         cat >conftest.$ac_ext <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515
2516 #ifndef CC_HAS_PROTOS
2517 #if !defined(__STDC__) || (__STDC__ != 1)
2518 choke me
2519 #endif
2520 #endif
2521
2522 int
2523 main ()
2524 {
2525
2526         int test (int i, double x);
2527         struct s1 {int (*f) (int a);};
2528         struct s2 {int (*f) (double a);};
2529   ;
2530   return 0;
2531 }
2532 _ACEOF
2533 rm -f conftest.$ac_objext
2534 if { (eval echo "$as_me:2534: \"$ac_compile\"") >&5
2535   (eval $ac_compile) 2>&5
2536   ac_status=$?
2537   echo "$as_me:2537: \$? = $ac_status" >&5
2538   (exit $ac_status); } &&
2539          { ac_try='test -s conftest.$ac_objext'
2540   { (eval echo "$as_me:2540: \"$ac_try\"") >&5
2541   (eval $ac_try) 2>&5
2542   ac_status=$?
2543   echo "$as_me:2543: \$? = $ac_status" >&5
2544   (exit $ac_status); }; }; then
2545   cf_cv_ansi_cc="$cf_arg"; break
2546 else
2547   echo "$as_me: failed program was:" >&5
2548 cat conftest.$ac_ext >&5
2549 fi
2550 rm -f conftest.$ac_objext conftest.$ac_ext
2551 done
2552 CFLAGS="$cf_save_CFLAGS"
2553 CPPFLAGS="$cf_save_CPPFLAGS"
2554
2555 fi
2556 echo "$as_me:2556: result: $cf_cv_ansi_cc" >&5
2557 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2558
2559 if test "$cf_cv_ansi_cc" != "no"; then
2560 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2561
2562 cf_fix_cppflags=no
2563 cf_new_cflags=
2564 cf_new_cppflags=
2565 cf_new_extra_cppflags=
2566
2567 for cf_add_cflags in $cf_cv_ansi_cc
2568 do
2569 case $cf_fix_cppflags in
2570 no)
2571         case $cf_add_cflags in #(vi
2572         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2573                 case $cf_add_cflags in
2574                 -D*)
2575                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2576
2577                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2578                         && test -z "${cf_tst_cflags}" \
2579                         && cf_fix_cppflags=yes
2580
2581                         if test $cf_fix_cppflags = yes ; then
2582                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2583                                 continue
2584                         elif test "${cf_tst_cflags}" = "\"'" ; then
2585                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2586                                 continue
2587                         fi
2588                         ;;
2589                 esac
2590                 case "$CPPFLAGS" in
2591                 *$cf_add_cflags) #(vi
2592                         ;;
2593                 *) #(vi
2594                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2595                         ;;
2596                 esac
2597                 ;;
2598         *)
2599                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2600                 ;;
2601         esac
2602         ;;
2603 yes)
2604         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2605
2606         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2607
2608         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2609         && test -z "${cf_tst_cflags}" \
2610         && cf_fix_cppflags=no
2611         ;;
2612 esac
2613 done
2614
2615 if test -n "$cf_new_cflags" ; then
2616
2617         CFLAGS="$CFLAGS $cf_new_cflags"
2618 fi
2619
2620 if test -n "$cf_new_cppflags" ; then
2621
2622         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2623 fi
2624
2625 if test -n "$cf_new_extra_cppflags" ; then
2626
2627         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2628 fi
2629
2630 else
2631         cat >>confdefs.h <<\EOF
2632 #define CC_HAS_PROTOS 1
2633 EOF
2634
2635 fi
2636 fi
2637
2638 if test "$cf_cv_ansi_cc" = "no"; then
2639         { { echo "$as_me:2639: error: Your compiler does not appear to recognize prototypes.
2640 You have the following choices:
2641         a. adjust your compiler options
2642         b. get an up-to-date compiler
2643         c. use a wrapper such as unproto" >&5
2644 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2645 You have the following choices:
2646         a. adjust your compiler options
2647         b. get an up-to-date compiler
2648         c. use a wrapper such as unproto" >&2;}
2649    { (exit 1); exit 1; }; }
2650 fi
2651
2652 case $cf_cv_system_name in
2653 os2*)
2654     CFLAGS="$CFLAGS -Zmt"
2655     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2656     CXXFLAGS="$CXXFLAGS -Zmt"
2657     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2658     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2659     ac_cv_exeext=.exe
2660     ;;
2661 esac
2662
2663 PROG_EXT="$EXEEXT"
2664
2665 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2666 #define PROG_EXT "$PROG_EXT"
2667 EOF
2668
2669 if test "$cross_compiling" = yes ; then
2670   LDCONFIG=:
2671 else
2672 case "$cf_cv_system_name" in #(vi
2673 dragonfly*|freebsd*) #(vi
2674   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2675   ;;
2676 *) LDPATH=$PATH:/sbin:/usr/sbin
2677   # Extract the first word of "ldconfig", so it can be a program name with args.
2678 set dummy ldconfig; ac_word=$2
2679 echo "$as_me:2679: checking for $ac_word" >&5
2680 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2681 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2682   echo $ECHO_N "(cached) $ECHO_C" >&6
2683 else
2684   case $LDCONFIG in
2685   [\\/]* | ?:[\\/]*)
2686   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2687   ;;
2688   *)
2689   ac_save_IFS=$IFS; IFS=$ac_path_separator
2690 ac_dummy="$LDPATH"
2691 for ac_dir in $ac_dummy; do
2692   IFS=$ac_save_IFS
2693   test -z "$ac_dir" && ac_dir=.
2694   if $as_executable_p "$ac_dir/$ac_word"; then
2695    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2696    echo "$as_me:2696: found $ac_dir/$ac_word" >&5
2697    break
2698 fi
2699 done
2700
2701   ;;
2702 esac
2703 fi
2704 LDCONFIG=$ac_cv_path_LDCONFIG
2705
2706 if test -n "$LDCONFIG"; then
2707   echo "$as_me:2707: result: $LDCONFIG" >&5
2708 echo "${ECHO_T}$LDCONFIG" >&6
2709 else
2710   echo "$as_me:2710: result: no" >&5
2711 echo "${ECHO_T}no" >&6
2712 fi
2713
2714   ;;
2715 esac
2716 fi
2717
2718 echo "$as_me:2718: checking if you want to ensure bool is consistent with C++" >&5
2719 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2720
2721 # Check whether --with-cxx or --without-cxx was given.
2722 if test "${with_cxx+set}" = set; then
2723   withval="$with_cxx"
2724   cf_with_cxx=$withval
2725 else
2726   cf_with_cxx=yes
2727 fi;
2728 echo "$as_me:2728: result: $cf_with_cxx" >&5
2729 echo "${ECHO_T}$cf_with_cxx" >&6
2730 if test "X$cf_with_cxx" = Xno ; then
2731         CXX=""
2732         GXX=""
2733 else
2734         # with autoconf 2.13, we can change the error to a warning:
2735                 ac_ext=cc
2736 ac_cpp='$CXXCPP $CPPFLAGS'
2737 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2738 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2739 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2740 ac_main_return=return
2741 if test -n "$ac_tool_prefix"; then
2742   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2743   do
2744     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2745 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2746 echo "$as_me:2746: checking for $ac_word" >&5
2747 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2748 if test "${ac_cv_prog_CXX+set}" = set; then
2749   echo $ECHO_N "(cached) $ECHO_C" >&6
2750 else
2751   if test -n "$CXX"; then
2752   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2753 else
2754   ac_save_IFS=$IFS; IFS=$ac_path_separator
2755 ac_dummy="$PATH"
2756 for ac_dir in $ac_dummy; do
2757   IFS=$ac_save_IFS
2758   test -z "$ac_dir" && ac_dir=.
2759   $as_executable_p "$ac_dir/$ac_word" || continue
2760 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2761 echo "$as_me:2761: found $ac_dir/$ac_word" >&5
2762 break
2763 done
2764
2765 fi
2766 fi
2767 CXX=$ac_cv_prog_CXX
2768 if test -n "$CXX"; then
2769   echo "$as_me:2769: result: $CXX" >&5
2770 echo "${ECHO_T}$CXX" >&6
2771 else
2772   echo "$as_me:2772: result: no" >&5
2773 echo "${ECHO_T}no" >&6
2774 fi
2775
2776     test -n "$CXX" && break
2777   done
2778 fi
2779 if test -z "$CXX"; then
2780   ac_ct_CXX=$CXX
2781   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2782 do
2783   # Extract the first word of "$ac_prog", so it can be a program name with args.
2784 set dummy $ac_prog; ac_word=$2
2785 echo "$as_me:2785: checking for $ac_word" >&5
2786 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2787 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2788   echo $ECHO_N "(cached) $ECHO_C" >&6
2789 else
2790   if test -n "$ac_ct_CXX"; then
2791   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2792 else
2793   ac_save_IFS=$IFS; IFS=$ac_path_separator
2794 ac_dummy="$PATH"
2795 for ac_dir in $ac_dummy; do
2796   IFS=$ac_save_IFS
2797   test -z "$ac_dir" && ac_dir=.
2798   $as_executable_p "$ac_dir/$ac_word" || continue
2799 ac_cv_prog_ac_ct_CXX="$ac_prog"
2800 echo "$as_me:2800: found $ac_dir/$ac_word" >&5
2801 break
2802 done
2803
2804 fi
2805 fi
2806 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2807 if test -n "$ac_ct_CXX"; then
2808   echo "$as_me:2808: result: $ac_ct_CXX" >&5
2809 echo "${ECHO_T}$ac_ct_CXX" >&6
2810 else
2811   echo "$as_me:2811: result: no" >&5
2812 echo "${ECHO_T}no" >&6
2813 fi
2814
2815   test -n "$ac_ct_CXX" && break
2816 done
2817 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2818
2819   CXX=$ac_ct_CXX
2820 fi
2821
2822 # Provide some information about the compiler.
2823 echo "$as_me:2823:" \
2824      "checking for C++ compiler version" >&5
2825 ac_compiler=`set X $ac_compile; echo $2`
2826 { (eval echo "$as_me:2826: \"$ac_compiler --version </dev/null >&5\"") >&5
2827   (eval $ac_compiler --version </dev/null >&5) 2>&5
2828   ac_status=$?
2829   echo "$as_me:2829: \$? = $ac_status" >&5
2830   (exit $ac_status); }
2831 { (eval echo "$as_me:2831: \"$ac_compiler -v </dev/null >&5\"") >&5
2832   (eval $ac_compiler -v </dev/null >&5) 2>&5
2833   ac_status=$?
2834   echo "$as_me:2834: \$? = $ac_status" >&5
2835   (exit $ac_status); }
2836 { (eval echo "$as_me:2836: \"$ac_compiler -V </dev/null >&5\"") >&5
2837   (eval $ac_compiler -V </dev/null >&5) 2>&5
2838   ac_status=$?
2839   echo "$as_me:2839: \$? = $ac_status" >&5
2840   (exit $ac_status); }
2841
2842 echo "$as_me:2842: checking whether we are using the GNU C++ compiler" >&5
2843 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2844 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2845   echo $ECHO_N "(cached) $ECHO_C" >&6
2846 else
2847   cat >conftest.$ac_ext <<_ACEOF
2848 #line 2848 "configure"
2849 #include "confdefs.h"
2850
2851 int
2852 main ()
2853 {
2854 #ifndef __GNUC__
2855        choke me
2856 #endif
2857
2858   ;
2859   return 0;
2860 }
2861 _ACEOF
2862 rm -f conftest.$ac_objext
2863 if { (eval echo "$as_me:2863: \"$ac_compile\"") >&5
2864   (eval $ac_compile) 2>&5
2865   ac_status=$?
2866   echo "$as_me:2866: \$? = $ac_status" >&5
2867   (exit $ac_status); } &&
2868          { ac_try='test -s conftest.$ac_objext'
2869   { (eval echo "$as_me:2869: \"$ac_try\"") >&5
2870   (eval $ac_try) 2>&5
2871   ac_status=$?
2872   echo "$as_me:2872: \$? = $ac_status" >&5
2873   (exit $ac_status); }; }; then
2874   ac_compiler_gnu=yes
2875 else
2876   echo "$as_me: failed program was:" >&5
2877 cat conftest.$ac_ext >&5
2878 ac_compiler_gnu=no
2879 fi
2880 rm -f conftest.$ac_objext conftest.$ac_ext
2881 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2882
2883 fi
2884 echo "$as_me:2884: result: $ac_cv_cxx_compiler_gnu" >&5
2885 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2886 GXX=`test $ac_compiler_gnu = yes && echo yes`
2887 ac_test_CXXFLAGS=${CXXFLAGS+set}
2888 ac_save_CXXFLAGS=$CXXFLAGS
2889 CXXFLAGS="-g"
2890 echo "$as_me:2890: checking whether $CXX accepts -g" >&5
2891 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2892 if test "${ac_cv_prog_cxx_g+set}" = set; then
2893   echo $ECHO_N "(cached) $ECHO_C" >&6
2894 else
2895   cat >conftest.$ac_ext <<_ACEOF
2896 #line 2896 "configure"
2897 #include "confdefs.h"
2898
2899 int
2900 main ()
2901 {
2902
2903   ;
2904   return 0;
2905 }
2906 _ACEOF
2907 rm -f conftest.$ac_objext
2908 if { (eval echo "$as_me:2908: \"$ac_compile\"") >&5
2909   (eval $ac_compile) 2>&5
2910   ac_status=$?
2911   echo "$as_me:2911: \$? = $ac_status" >&5
2912   (exit $ac_status); } &&
2913          { ac_try='test -s conftest.$ac_objext'
2914   { (eval echo "$as_me:2914: \"$ac_try\"") >&5
2915   (eval $ac_try) 2>&5
2916   ac_status=$?
2917   echo "$as_me:2917: \$? = $ac_status" >&5
2918   (exit $ac_status); }; }; then
2919   ac_cv_prog_cxx_g=yes
2920 else
2921   echo "$as_me: failed program was:" >&5
2922 cat conftest.$ac_ext >&5
2923 ac_cv_prog_cxx_g=no
2924 fi
2925 rm -f conftest.$ac_objext conftest.$ac_ext
2926 fi
2927 echo "$as_me:2927: result: $ac_cv_prog_cxx_g" >&5
2928 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2929 if test "$ac_test_CXXFLAGS" = set; then
2930   CXXFLAGS=$ac_save_CXXFLAGS
2931 elif test $ac_cv_prog_cxx_g = yes; then
2932   if test "$GXX" = yes; then
2933     CXXFLAGS="-g -O2"
2934   else
2935     CXXFLAGS="-g"
2936   fi
2937 else
2938   if test "$GXX" = yes; then
2939     CXXFLAGS="-O2"
2940   else
2941     CXXFLAGS=
2942   fi
2943 fi
2944 for ac_declaration in \
2945    ''\
2946    '#include <stdlib.h>' \
2947    'extern "C" void std::exit (int) throw (); using std::exit;' \
2948    'extern "C" void std::exit (int); using std::exit;' \
2949    'extern "C" void exit (int) throw ();' \
2950    'extern "C" void exit (int);' \
2951    'void exit (int);'
2952 do
2953   cat >conftest.$ac_ext <<_ACEOF
2954 #line 2954 "configure"
2955 #include "confdefs.h"
2956 #include <stdlib.h>
2957 $ac_declaration
2958 int
2959 main ()
2960 {
2961 exit (42);
2962   ;
2963   return 0;
2964 }
2965 _ACEOF
2966 rm -f conftest.$ac_objext
2967 if { (eval echo "$as_me:2967: \"$ac_compile\"") >&5
2968   (eval $ac_compile) 2>&5
2969   ac_status=$?
2970   echo "$as_me:2970: \$? = $ac_status" >&5
2971   (exit $ac_status); } &&
2972          { ac_try='test -s conftest.$ac_objext'
2973   { (eval echo "$as_me:2973: \"$ac_try\"") >&5
2974   (eval $ac_try) 2>&5
2975   ac_status=$?
2976   echo "$as_me:2976: \$? = $ac_status" >&5
2977   (exit $ac_status); }; }; then
2978   :
2979 else
2980   echo "$as_me: failed program was:" >&5
2981 cat conftest.$ac_ext >&5
2982 continue
2983 fi
2984 rm -f conftest.$ac_objext conftest.$ac_ext
2985   cat >conftest.$ac_ext <<_ACEOF
2986 #line 2986 "configure"
2987 #include "confdefs.h"
2988 $ac_declaration
2989 int
2990 main ()
2991 {
2992 exit (42);
2993   ;
2994   return 0;
2995 }
2996 _ACEOF
2997 rm -f conftest.$ac_objext
2998 if { (eval echo "$as_me:2998: \"$ac_compile\"") >&5
2999   (eval $ac_compile) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); } &&
3003          { ac_try='test -s conftest.$ac_objext'
3004   { (eval echo "$as_me:3004: \"$ac_try\"") >&5
3005   (eval $ac_try) 2>&5
3006   ac_status=$?
3007   echo "$as_me:3007: \$? = $ac_status" >&5
3008   (exit $ac_status); }; }; then
3009   break
3010 else
3011   echo "$as_me: failed program was:" >&5
3012 cat conftest.$ac_ext >&5
3013 fi
3014 rm -f conftest.$ac_objext conftest.$ac_ext
3015 done
3016 rm -f conftest*
3017 if test -n "$ac_declaration"; then
3018   echo '#ifdef __cplusplus' >>confdefs.h
3019   echo $ac_declaration      >>confdefs.h
3020   echo '#endif'             >>confdefs.h
3021 fi
3022
3023 ac_ext=c
3024 ac_cpp='$CPP $CPPFLAGS'
3025 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3026 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3027 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3028 ac_main_return=return
3029
3030                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3031         if test "$CXX" = "g++" ; then
3032                 # Extract the first word of "g++", so it can be a program name with args.
3033 set dummy g++; ac_word=$2
3034 echo "$as_me:3034: checking for $ac_word" >&5
3035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3036 if test "${ac_cv_path_CXX+set}" = set; then
3037   echo $ECHO_N "(cached) $ECHO_C" >&6
3038 else
3039   case $CXX in
3040   [\\/]* | ?:[\\/]*)
3041   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3042   ;;
3043   *)
3044   ac_save_IFS=$IFS; IFS=$ac_path_separator
3045 ac_dummy="$PATH"
3046 for ac_dir in $ac_dummy; do
3047   IFS=$ac_save_IFS
3048   test -z "$ac_dir" && ac_dir=.
3049   if $as_executable_p "$ac_dir/$ac_word"; then
3050    ac_cv_path_CXX="$ac_dir/$ac_word"
3051    echo "$as_me:3051: found $ac_dir/$ac_word" >&5
3052    break
3053 fi
3054 done
3055
3056   ;;
3057 esac
3058 fi
3059 CXX=$ac_cv_path_CXX
3060
3061 if test -n "$CXX"; then
3062   echo "$as_me:3062: result: $CXX" >&5
3063 echo "${ECHO_T}$CXX" >&6
3064 else
3065   echo "$as_me:3065: result: no" >&5
3066 echo "${ECHO_T}no" >&6
3067 fi
3068
3069         fi
3070         if test "$CXX" = "g++" ; then
3071                 { echo "$as_me:3071: WARNING: ignoring hardcoded g++" >&5
3072 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3073                 cf_with_cxx=no; CXX=""; GXX="";
3074         fi
3075 fi
3076
3077 GXX_VERSION=none
3078 if test "$GXX" = yes; then
3079         echo "$as_me:3079: checking version of g++" >&5
3080 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3081         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3082         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3083         echo "$as_me:3083: result: $GXX_VERSION" >&5
3084 echo "${ECHO_T}$GXX_VERSION" >&6
3085 fi
3086
3087 case $GXX_VERSION in
3088 1*|2.[0-6]*)
3089         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3090         # cf_cxx_library=no
3091         { echo "$as_me:3091: WARNING: templates do not work" >&5
3092 echo "$as_me: WARNING: templates do not work" >&2;}
3093         ;;
3094 esac
3095
3096 echo "$as_me:3096: checking if you want to build C++ binding and demo" >&5
3097 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3098
3099 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3100 if test "${with_cxx_binding+set}" = set; then
3101   withval="$with_cxx_binding"
3102   cf_with_cxx_binding=$withval
3103 else
3104   cf_with_cxx_binding=$cf_with_cxx
3105 fi;
3106 echo "$as_me:3106: result: $cf_with_cxx_binding" >&5
3107 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3108
3109 echo "$as_me:3109: checking if you want to build with Ada95" >&5
3110 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3111
3112 # Check whether --with-ada or --without-ada was given.
3113 if test "${with_ada+set}" = set; then
3114   withval="$with_ada"
3115   cf_with_ada=$withval
3116 else
3117   cf_with_ada=yes
3118 fi;
3119 echo "$as_me:3119: result: $cf_with_ada" >&5
3120 echo "${ECHO_T}$cf_with_ada" >&6
3121
3122 echo "$as_me:3122: checking if you want to install manpages" >&5
3123 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3124
3125 # Check whether --with-manpages or --without-manpages was given.
3126 if test "${with_manpages+set}" = set; then
3127   withval="$with_manpages"
3128   cf_with_manpages=$withval
3129 else
3130   cf_with_manpages=yes
3131 fi;
3132 echo "$as_me:3132: result: $cf_with_manpages" >&5
3133 echo "${ECHO_T}$cf_with_manpages" >&6
3134
3135 echo "$as_me:3135: checking if you want to build programs such as tic" >&5
3136 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3137
3138 # Check whether --with-progs or --without-progs was given.
3139 if test "${with_progs+set}" = set; then
3140   withval="$with_progs"
3141   cf_with_progs=$withval
3142 else
3143   cf_with_progs=yes
3144 fi;
3145 echo "$as_me:3145: result: $cf_with_progs" >&5
3146 echo "${ECHO_T}$cf_with_progs" >&6
3147
3148 echo "$as_me:3148: checking if you wish to install curses.h" >&5
3149 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3150
3151 # Check whether --with-curses-h or --without-curses-h was given.
3152 if test "${with_curses_h+set}" = set; then
3153   withval="$with_curses_h"
3154   with_curses_h=$withval
3155 else
3156   with_curses_h=yes
3157 fi;
3158 echo "$as_me:3158: result: $with_curses_h" >&5
3159 echo "${ECHO_T}$with_curses_h" >&6
3160
3161 modules_to_build="ncurses"
3162 if test "X$cf_with_progs" != Xno ; then
3163 modules_to_build="$modules_to_build progs tack"
3164 fi
3165 modules_to_build="$modules_to_build panel menu form"
3166
3167 test "$program_prefix" != NONE &&
3168   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3169 # Use a double $ so make ignores it.
3170 test "$program_suffix" != NONE &&
3171   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3172 # Double any \ or $.  echo might interpret backslashes.
3173 # By default was `s,x,x', remove it if useless.
3174 cat <<\_ACEOF >conftest.sed
3175 s/[\\$]/&&/g;s/;s,x,x,$//
3176 _ACEOF
3177 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3178 rm conftest.sed
3179
3180 for ac_prog in mawk gawk nawk awk
3181 do
3182   # Extract the first word of "$ac_prog", so it can be a program name with args.
3183 set dummy $ac_prog; ac_word=$2
3184 echo "$as_me:3184: checking for $ac_word" >&5
3185 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3186 if test "${ac_cv_prog_AWK+set}" = set; then
3187   echo $ECHO_N "(cached) $ECHO_C" >&6
3188 else
3189   if test -n "$AWK"; then
3190   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3191 else
3192   ac_save_IFS=$IFS; IFS=$ac_path_separator
3193 ac_dummy="$PATH"
3194 for ac_dir in $ac_dummy; do
3195   IFS=$ac_save_IFS
3196   test -z "$ac_dir" && ac_dir=.
3197   $as_executable_p "$ac_dir/$ac_word" || continue
3198 ac_cv_prog_AWK="$ac_prog"
3199 echo "$as_me:3199: found $ac_dir/$ac_word" >&5
3200 break
3201 done
3202
3203 fi
3204 fi
3205 AWK=$ac_cv_prog_AWK
3206 if test -n "$AWK"; then
3207   echo "$as_me:3207: result: $AWK" >&5
3208 echo "${ECHO_T}$AWK" >&6
3209 else
3210   echo "$as_me:3210: result: no" >&5
3211 echo "${ECHO_T}no" >&6
3212 fi
3213
3214   test -n "$AWK" && break
3215 done
3216
3217 test -z "$AWK" && { { echo "$as_me:3217: error: No awk program found" >&5
3218 echo "$as_me: error: No awk program found" >&2;}
3219    { (exit 1); exit 1; }; }
3220
3221 echo "$as_me:3221: checking for egrep" >&5
3222 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3223 if test "${ac_cv_prog_egrep+set}" = set; then
3224   echo $ECHO_N "(cached) $ECHO_C" >&6
3225 else
3226   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3227     then ac_cv_prog_egrep='grep -E'
3228     else ac_cv_prog_egrep='egrep'
3229     fi
3230 fi
3231 echo "$as_me:3231: result: $ac_cv_prog_egrep" >&5
3232 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3233  EGREP=$ac_cv_prog_egrep
3234
3235 test -z "$EGREP" && { { echo "$as_me:3235: error: No egrep program found" >&5
3236 echo "$as_me: error: No egrep program found" >&2;}
3237    { (exit 1); exit 1; }; }
3238
3239 # Find a good install program.  We prefer a C program (faster),
3240 # so one script is as good as another.  But avoid the broken or
3241 # incompatible versions:
3242 # SysV /etc/install, /usr/sbin/install
3243 # SunOS /usr/etc/install
3244 # IRIX /sbin/install
3245 # AIX /bin/install
3246 # AmigaOS /C/install, which installs bootblocks on floppy discs
3247 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3248 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3249 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3250 # ./install, which can be erroneously created by make from ./install.sh.
3251 echo "$as_me:3251: checking for a BSD compatible install" >&5
3252 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3253 if test -z "$INSTALL"; then
3254 if test "${ac_cv_path_install+set}" = set; then
3255   echo $ECHO_N "(cached) $ECHO_C" >&6
3256 else
3257     ac_save_IFS=$IFS; IFS=$ac_path_separator
3258   for ac_dir in $PATH; do
3259     IFS=$ac_save_IFS
3260     # Account for people who put trailing slashes in PATH elements.
3261     case $ac_dir/ in
3262     / | ./ | .// | /cC/* \
3263     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3264     | /usr/ucb/* ) ;;
3265     *)
3266       # OSF1 and SCO ODT 3.0 have their own names for install.
3267       # Don't use installbsd from OSF since it installs stuff as root
3268       # by default.
3269       for ac_prog in ginstall scoinst install; do
3270         if $as_executable_p "$ac_dir/$ac_prog"; then
3271           if test $ac_prog = install &&
3272             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3273             # AIX install.  It has an incompatible calling convention.
3274             :
3275           elif test $ac_prog = install &&
3276             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3277             # program-specific install script used by HP pwplus--don't use.
3278             :
3279           else
3280             ac_cv_path_install="$ac_dir/$ac_prog -c"
3281             break 2
3282           fi
3283         fi
3284       done
3285       ;;
3286     esac
3287   done
3288
3289 fi
3290   if test "${ac_cv_path_install+set}" = set; then
3291     INSTALL=$ac_cv_path_install
3292   else
3293     # As a last resort, use the slow shell script.  We don't cache a
3294     # path for INSTALL within a source directory, because that will
3295     # break other packages using the cache if that directory is
3296     # removed, or if the path is relative.
3297     INSTALL=$ac_install_sh
3298   fi
3299 fi
3300 echo "$as_me:3300: result: $INSTALL" >&5
3301 echo "${ECHO_T}$INSTALL" >&6
3302
3303 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3304 # It thinks the first close brace ends the variable substitution.
3305 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3306
3307 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3308
3309 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3310
3311 case $INSTALL in
3312 /*)
3313   ;;
3314 *)
3315   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3316   test -z "$cf_dir" && cf_dir=.
3317   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3318   ;;
3319 esac
3320
3321 for ac_prog in tdlint lint alint
3322 do
3323   # Extract the first word of "$ac_prog", so it can be a program name with args.
3324 set dummy $ac_prog; ac_word=$2
3325 echo "$as_me:3325: checking for $ac_word" >&5
3326 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3327 if test "${ac_cv_prog_LINT+set}" = set; then
3328   echo $ECHO_N "(cached) $ECHO_C" >&6
3329 else
3330   if test -n "$LINT"; then
3331   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3332 else
3333   ac_save_IFS=$IFS; IFS=$ac_path_separator
3334 ac_dummy="$PATH"
3335 for ac_dir in $ac_dummy; do
3336   IFS=$ac_save_IFS
3337   test -z "$ac_dir" && ac_dir=.
3338   $as_executable_p "$ac_dir/$ac_word" || continue
3339 ac_cv_prog_LINT="$ac_prog"
3340 echo "$as_me:3340: found $ac_dir/$ac_word" >&5
3341 break
3342 done
3343
3344 fi
3345 fi
3346 LINT=$ac_cv_prog_LINT
3347 if test -n "$LINT"; then
3348   echo "$as_me:3348: result: $LINT" >&5
3349 echo "${ECHO_T}$LINT" >&6
3350 else
3351   echo "$as_me:3351: result: no" >&5
3352 echo "${ECHO_T}no" >&6
3353 fi
3354
3355   test -n "$LINT" && break
3356 done
3357
3358 echo "$as_me:3358: checking whether ln -s works" >&5
3359 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3360 LN_S=$as_ln_s
3361 if test "$LN_S" = "ln -s"; then
3362   echo "$as_me:3362: result: yes" >&5
3363 echo "${ECHO_T}yes" >&6
3364 else
3365   echo "$as_me:3365: result: no, using $LN_S" >&5
3366 echo "${ECHO_T}no, using $LN_S" >&6
3367 fi
3368
3369 echo "$as_me:3369: checking for long file names" >&5
3370 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3371 if test "${ac_cv_sys_long_file_names+set}" = set; then
3372   echo $ECHO_N "(cached) $ECHO_C" >&6
3373 else
3374   ac_cv_sys_long_file_names=yes
3375 # Test for long file names in all the places we know might matter:
3376 #      .                the current directory, where building will happen
3377 #      $prefix/lib      where we will be installing things
3378 #      $exec_prefix/lib likewise
3379 # eval it to expand exec_prefix.
3380 #      $TMPDIR          if set, where it might want to write temporary files
3381 # if $TMPDIR is not set:
3382 #      /tmp             where it might want to write temporary files
3383 #      /var/tmp         likewise
3384 #      /usr/tmp         likewise
3385 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3386   ac_tmpdirs=$TMPDIR
3387 else
3388   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3389 fi
3390 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3391   test -d $ac_dir || continue
3392   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3393   ac_xdir=$ac_dir/cf$$
3394   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3395   ac_tf1=$ac_xdir/conftest9012345
3396   ac_tf2=$ac_xdir/conftest9012346
3397   (echo 1 >$ac_tf1) 2>/dev/null
3398   (echo 2 >$ac_tf2) 2>/dev/null
3399   ac_val=`cat $ac_tf1 2>/dev/null`
3400   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3401     ac_cv_sys_long_file_names=no
3402     rm -rf $ac_xdir 2>/dev/null
3403     break
3404   fi
3405   rm -rf $ac_xdir 2>/dev/null
3406 done
3407 fi
3408 echo "$as_me:3408: result: $ac_cv_sys_long_file_names" >&5
3409 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3410 if test $ac_cv_sys_long_file_names = yes; then
3411
3412 cat >>confdefs.h <<\EOF
3413 #define HAVE_LONG_FILE_NAMES 1
3414 EOF
3415
3416 fi
3417
3418 # if we find pkg-config, check if we should install the ".pc" files.
3419
3420 echo "$as_me:3420: checking if you want to use pkg-config" >&5
3421 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3422
3423 # Check whether --with-pkg-config or --without-pkg-config was given.
3424 if test "${with_pkg_config+set}" = set; then
3425   withval="$with_pkg_config"
3426   cf_pkg_config=$withval
3427 else
3428   cf_pkg_config=yes
3429 fi;
3430 echo "$as_me:3430: result: $cf_pkg_config" >&5
3431 echo "${ECHO_T}$cf_pkg_config" >&6
3432
3433 case $cf_pkg_config in #(vi
3434 no) #(vi
3435         PKG_CONFIG=none
3436         ;;
3437 yes) #(vi
3438         # Extract the first word of "pkg-config", so it can be a program name with args.
3439 set dummy pkg-config; ac_word=$2
3440 echo "$as_me:3440: checking for $ac_word" >&5
3441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3442 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3443   echo $ECHO_N "(cached) $ECHO_C" >&6
3444 else
3445   case $PKG_CONFIG in
3446   [\\/]* | ?:[\\/]*)
3447   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3448   ;;
3449   *)
3450   ac_save_IFS=$IFS; IFS=$ac_path_separator
3451 ac_dummy="$PATH"
3452 for ac_dir in $ac_dummy; do
3453   IFS=$ac_save_IFS
3454   test -z "$ac_dir" && ac_dir=.
3455   if $as_executable_p "$ac_dir/$ac_word"; then
3456    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3457    echo "$as_me:3457: found $ac_dir/$ac_word" >&5
3458    break
3459 fi
3460 done
3461
3462   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3463   ;;
3464 esac
3465 fi
3466 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3467
3468 if test -n "$PKG_CONFIG"; then
3469   echo "$as_me:3469: result: $PKG_CONFIG" >&5
3470 echo "${ECHO_T}$PKG_CONFIG" >&6
3471 else
3472   echo "$as_me:3472: result: no" >&5
3473 echo "${ECHO_T}no" >&6
3474 fi
3475
3476         ;;
3477 *)
3478         PKG_CONFIG=$withval
3479         ;;
3480 esac
3481
3482 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3483 if test "$PKG_CONFIG" != none ; then
3484
3485 if test "x$prefix" != xNONE; then
3486   cf_path_syntax="$prefix"
3487 else
3488   cf_path_syntax="$ac_default_prefix"
3489 fi
3490
3491 case ".$PKG_CONFIG" in #(vi
3492 .\$\(*\)*|.\'*\'*) #(vi
3493   ;;
3494 ..|./*|.\\*) #(vi
3495   ;;
3496 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3497   ;;
3498 .\${*prefix}*) #(vi
3499   eval PKG_CONFIG="$PKG_CONFIG"
3500   case ".$PKG_CONFIG" in #(vi
3501   .NONE/*)
3502     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3503     ;;
3504   esac
3505   ;; #(vi
3506 .no|.NONE/*)
3507   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3508   ;;
3509 *)
3510   { { echo "$as_me:3510: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3511 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3512    { (exit 1); exit 1; }; }
3513   ;;
3514 esac
3515
3516 fi
3517
3518 if test "$PKG_CONFIG" != no ; then
3519         echo "$as_me:3519: checking if we should install .pc files for $PKG_CONFIG" >&5
3520 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3521
3522         # Leave this as something that can be overridden in the environment.
3523         if test -z "$PKG_CONFIG_LIBDIR" ; then
3524                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3525         fi
3526
3527         if test -d "$PKG_CONFIG_LIBDIR" ; then
3528
3529 # Check whether --enable-pc-files or --disable-pc-files was given.
3530 if test "${enable_pc_files+set}" = set; then
3531   enableval="$enable_pc_files"
3532   enable_pc_files=$enableval
3533 else
3534   enable_pc_files=no
3535 fi;
3536                 echo "$as_me:3536: result: $enable_pc_files" >&5
3537 echo "${ECHO_T}$enable_pc_files" >&6
3538         else
3539                 echo "$as_me:3539: result: no" >&5
3540 echo "${ECHO_T}no" >&6
3541                 { echo "$as_me:3541: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3542 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3543                 enable_pc_files=no
3544         fi
3545 fi
3546
3547 echo "$as_me:3547: checking if we should assume mixed-case filenames" >&5
3548 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3549
3550 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3551 if test "${enable_mixed_case+set}" = set; then
3552   enableval="$enable_mixed_case"
3553   enable_mixedcase=$enableval
3554 else
3555   enable_mixedcase=auto
3556 fi;
3557 echo "$as_me:3557: result: $enable_mixedcase" >&5
3558 echo "${ECHO_T}$enable_mixedcase" >&6
3559 if test "$enable_mixedcase" = "auto" ; then
3560
3561 echo "$as_me:3561: checking if filesystem supports mixed-case filenames" >&5
3562 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3563 if test "${cf_cv_mixedcase+set}" = set; then
3564   echo $ECHO_N "(cached) $ECHO_C" >&6
3565 else
3566
3567 if test "$cross_compiling" = yes ; then
3568         case $target_alias in #(vi
3569         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3570                 cf_cv_mixedcase=no
3571                 ;;
3572         *)
3573                 cf_cv_mixedcase=yes
3574                 ;;
3575         esac
3576 else
3577         rm -f conftest CONFTEST
3578         echo test >conftest
3579         if test -f CONFTEST ; then
3580                 cf_cv_mixedcase=no
3581         else
3582                 cf_cv_mixedcase=yes
3583         fi
3584         rm -f conftest CONFTEST
3585 fi
3586
3587 fi
3588 echo "$as_me:3588: result: $cf_cv_mixedcase" >&5
3589 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3590 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3591 #define MIXEDCASE_FILENAMES 1
3592 EOF
3593
3594 else
3595     cf_cv_mixedcase=$enable_mixedcase
3596     if test "$enable_mixedcase" = "yes" ; then
3597         cat >>confdefs.h <<\EOF
3598 #define MIXEDCASE_FILENAMES 1
3599 EOF
3600
3601     fi
3602 fi
3603
3604 # do this after mixed-case option (tags/TAGS is not as important as tic).
3605 echo "$as_me:3605: checking whether ${MAKE-make} sets \${MAKE}" >&5
3606 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3607 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3608 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3609   echo $ECHO_N "(cached) $ECHO_C" >&6
3610 else
3611   cat >conftest.make <<\EOF
3612 all:
3613         @echo 'ac_maketemp="${MAKE}"'
3614 EOF
3615 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3616 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3617 if test -n "$ac_maketemp"; then
3618   eval ac_cv_prog_make_${ac_make}_set=yes
3619 else
3620   eval ac_cv_prog_make_${ac_make}_set=no
3621 fi
3622 rm -f conftest.make
3623 fi
3624 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3625   echo "$as_me:3625: result: yes" >&5
3626 echo "${ECHO_T}yes" >&6
3627   SET_MAKE=
3628 else
3629   echo "$as_me:3629: result: no" >&5
3630 echo "${ECHO_T}no" >&6
3631   SET_MAKE="MAKE=${MAKE-make}"
3632 fi
3633
3634 # Extract the first word of "ctags", so it can be a program name with args.
3635 set dummy ctags; ac_word=$2
3636 echo "$as_me:3636: checking for $ac_word" >&5
3637 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3638 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3639   echo $ECHO_N "(cached) $ECHO_C" >&6
3640 else
3641   if test -n "$MAKE_LOWER_TAGS"; then
3642   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3643 else
3644   ac_save_IFS=$IFS; IFS=$ac_path_separator
3645 ac_dummy="$PATH"
3646 for ac_dir in $ac_dummy; do
3647   IFS=$ac_save_IFS
3648   test -z "$ac_dir" && ac_dir=.
3649   $as_executable_p "$ac_dir/$ac_word" || continue
3650 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3651 echo "$as_me:3651: found $ac_dir/$ac_word" >&5
3652 break
3653 done
3654
3655   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3656 fi
3657 fi
3658 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3659 if test -n "$MAKE_LOWER_TAGS"; then
3660   echo "$as_me:3660: result: $MAKE_LOWER_TAGS" >&5
3661 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3662 else
3663   echo "$as_me:3663: result: no" >&5
3664 echo "${ECHO_T}no" >&6
3665 fi
3666
3667 if test "$cf_cv_mixedcase" = yes ; then
3668         # Extract the first word of "etags", so it can be a program name with args.
3669 set dummy etags; ac_word=$2
3670 echo "$as_me:3670: checking for $ac_word" >&5
3671 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3672 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3673   echo $ECHO_N "(cached) $ECHO_C" >&6
3674 else
3675   if test -n "$MAKE_UPPER_TAGS"; then
3676   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3677 else
3678   ac_save_IFS=$IFS; IFS=$ac_path_separator
3679 ac_dummy="$PATH"
3680 for ac_dir in $ac_dummy; do
3681   IFS=$ac_save_IFS
3682   test -z "$ac_dir" && ac_dir=.
3683   $as_executable_p "$ac_dir/$ac_word" || continue
3684 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3685 echo "$as_me:3685: found $ac_dir/$ac_word" >&5
3686 break
3687 done
3688
3689   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3690 fi
3691 fi
3692 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3693 if test -n "$MAKE_UPPER_TAGS"; then
3694   echo "$as_me:3694: result: $MAKE_UPPER_TAGS" >&5
3695 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3696 else
3697   echo "$as_me:3697: result: no" >&5
3698 echo "${ECHO_T}no" >&6
3699 fi
3700
3701 else
3702         MAKE_UPPER_TAGS=no
3703 fi
3704
3705 if test "$MAKE_UPPER_TAGS" = yes ; then
3706         MAKE_UPPER_TAGS=
3707 else
3708         MAKE_UPPER_TAGS="#"
3709 fi
3710
3711 if test "$MAKE_LOWER_TAGS" = yes ; then
3712         MAKE_LOWER_TAGS=
3713 else
3714         MAKE_LOWER_TAGS="#"
3715 fi
3716
3717 echo "$as_me:3717: checking for makeflags variable" >&5
3718 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3719 if test "${cf_cv_makeflags+set}" = set; then
3720   echo $ECHO_N "(cached) $ECHO_C" >&6
3721 else
3722
3723         cf_cv_makeflags=''
3724         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3725         do
3726                 cat >cf_makeflags.tmp <<CF_EOF
3727 SHELL = /bin/sh
3728 all :
3729         @ echo '.$cf_option'
3730 CF_EOF
3731                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3732                 case "$cf_result" in
3733                 .*k)
3734                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3735                         case "$cf_result" in
3736                         .*CC=*) cf_cv_makeflags=
3737                                 ;;
3738                         *)      cf_cv_makeflags=$cf_option
3739                                 ;;
3740                         esac
3741                         break
3742                         ;;
3743                 .-)     ;;
3744                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3745                         ;;
3746                 esac
3747         done
3748         rm -f cf_makeflags.tmp
3749
3750 fi
3751 echo "$as_me:3751: result: $cf_cv_makeflags" >&5
3752 echo "${ECHO_T}$cf_cv_makeflags" >&6
3753
3754 if test -n "$ac_tool_prefix"; then
3755   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3756 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3757 echo "$as_me:3757: checking for $ac_word" >&5
3758 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3759 if test "${ac_cv_prog_RANLIB+set}" = set; then
3760   echo $ECHO_N "(cached) $ECHO_C" >&6
3761 else
3762   if test -n "$RANLIB"; then
3763   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3764 else
3765   ac_save_IFS=$IFS; IFS=$ac_path_separator
3766 ac_dummy="$PATH"
3767 for ac_dir in $ac_dummy; do
3768   IFS=$ac_save_IFS
3769   test -z "$ac_dir" && ac_dir=.
3770   $as_executable_p "$ac_dir/$ac_word" || continue
3771 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3772 echo "$as_me:3772: found $ac_dir/$ac_word" >&5
3773 break
3774 done
3775
3776 fi
3777 fi
3778 RANLIB=$ac_cv_prog_RANLIB
3779 if test -n "$RANLIB"; then
3780   echo "$as_me:3780: result: $RANLIB" >&5
3781 echo "${ECHO_T}$RANLIB" >&6
3782 else
3783   echo "$as_me:3783: result: no" >&5
3784 echo "${ECHO_T}no" >&6
3785 fi
3786
3787 fi
3788 if test -z "$ac_cv_prog_RANLIB"; then
3789   ac_ct_RANLIB=$RANLIB
3790   # Extract the first word of "ranlib", so it can be a program name with args.
3791 set dummy ranlib; ac_word=$2
3792 echo "$as_me:3792: checking for $ac_word" >&5
3793 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3794 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3795   echo $ECHO_N "(cached) $ECHO_C" >&6
3796 else
3797   if test -n "$ac_ct_RANLIB"; then
3798   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3799 else
3800   ac_save_IFS=$IFS; IFS=$ac_path_separator
3801 ac_dummy="$PATH"
3802 for ac_dir in $ac_dummy; do
3803   IFS=$ac_save_IFS
3804   test -z "$ac_dir" && ac_dir=.
3805   $as_executable_p "$ac_dir/$ac_word" || continue
3806 ac_cv_prog_ac_ct_RANLIB="ranlib"
3807 echo "$as_me:3807: found $ac_dir/$ac_word" >&5
3808 break
3809 done
3810
3811   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3812 fi
3813 fi
3814 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3815 if test -n "$ac_ct_RANLIB"; then
3816   echo "$as_me:3816: result: $ac_ct_RANLIB" >&5
3817 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3818 else
3819   echo "$as_me:3819: result: no" >&5
3820 echo "${ECHO_T}no" >&6
3821 fi
3822
3823   RANLIB=$ac_ct_RANLIB
3824 else
3825   RANLIB="$ac_cv_prog_RANLIB"
3826 fi
3827
3828 if test -n "$ac_tool_prefix"; then
3829   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3830 set dummy ${ac_tool_prefix}ld; ac_word=$2
3831 echo "$as_me:3831: checking for $ac_word" >&5
3832 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3833 if test "${ac_cv_prog_LD+set}" = set; then
3834   echo $ECHO_N "(cached) $ECHO_C" >&6
3835 else
3836   if test -n "$LD"; then
3837   ac_cv_prog_LD="$LD" # Let the user override the test.
3838 else
3839   ac_save_IFS=$IFS; IFS=$ac_path_separator
3840 ac_dummy="$PATH"
3841 for ac_dir in $ac_dummy; do
3842   IFS=$ac_save_IFS
3843   test -z "$ac_dir" && ac_dir=.
3844   $as_executable_p "$ac_dir/$ac_word" || continue
3845 ac_cv_prog_LD="${ac_tool_prefix}ld"
3846 echo "$as_me:3846: found $ac_dir/$ac_word" >&5
3847 break
3848 done
3849
3850 fi
3851 fi
3852 LD=$ac_cv_prog_LD
3853 if test -n "$LD"; then
3854   echo "$as_me:3854: result: $LD" >&5
3855 echo "${ECHO_T}$LD" >&6
3856 else
3857   echo "$as_me:3857: result: no" >&5
3858 echo "${ECHO_T}no" >&6
3859 fi
3860
3861 fi
3862 if test -z "$ac_cv_prog_LD"; then
3863   ac_ct_LD=$LD
3864   # Extract the first word of "ld", so it can be a program name with args.
3865 set dummy ld; ac_word=$2
3866 echo "$as_me:3866: checking for $ac_word" >&5
3867 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3868 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3869   echo $ECHO_N "(cached) $ECHO_C" >&6
3870 else
3871   if test -n "$ac_ct_LD"; then
3872   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3873 else
3874   ac_save_IFS=$IFS; IFS=$ac_path_separator
3875 ac_dummy="$PATH"
3876 for ac_dir in $ac_dummy; do
3877   IFS=$ac_save_IFS
3878   test -z "$ac_dir" && ac_dir=.
3879   $as_executable_p "$ac_dir/$ac_word" || continue
3880 ac_cv_prog_ac_ct_LD="ld"
3881 echo "$as_me:3881: found $ac_dir/$ac_word" >&5
3882 break
3883 done
3884
3885   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3886 fi
3887 fi
3888 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3889 if test -n "$ac_ct_LD"; then
3890   echo "$as_me:3890: result: $ac_ct_LD" >&5
3891 echo "${ECHO_T}$ac_ct_LD" >&6
3892 else
3893   echo "$as_me:3893: result: no" >&5
3894 echo "${ECHO_T}no" >&6
3895 fi
3896
3897   LD=$ac_ct_LD
3898 else
3899   LD="$ac_cv_prog_LD"
3900 fi
3901
3902 if test -n "$ac_tool_prefix"; then
3903   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3904 set dummy ${ac_tool_prefix}ar; ac_word=$2
3905 echo "$as_me:3905: checking for $ac_word" >&5
3906 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3907 if test "${ac_cv_prog_AR+set}" = set; then
3908   echo $ECHO_N "(cached) $ECHO_C" >&6
3909 else
3910   if test -n "$AR"; then
3911   ac_cv_prog_AR="$AR" # Let the user override the test.
3912 else
3913   ac_save_IFS=$IFS; IFS=$ac_path_separator
3914 ac_dummy="$PATH"
3915 for ac_dir in $ac_dummy; do
3916   IFS=$ac_save_IFS
3917   test -z "$ac_dir" && ac_dir=.
3918   $as_executable_p "$ac_dir/$ac_word" || continue
3919 ac_cv_prog_AR="${ac_tool_prefix}ar"
3920 echo "$as_me:3920: found $ac_dir/$ac_word" >&5
3921 break
3922 done
3923
3924 fi
3925 fi
3926 AR=$ac_cv_prog_AR
3927 if test -n "$AR"; then
3928   echo "$as_me:3928: result: $AR" >&5
3929 echo "${ECHO_T}$AR" >&6
3930 else
3931   echo "$as_me:3931: result: no" >&5
3932 echo "${ECHO_T}no" >&6
3933 fi
3934
3935 fi
3936 if test -z "$ac_cv_prog_AR"; then
3937   ac_ct_AR=$AR
3938   # Extract the first word of "ar", so it can be a program name with args.
3939 set dummy ar; ac_word=$2
3940 echo "$as_me:3940: checking for $ac_word" >&5
3941 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3942 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3943   echo $ECHO_N "(cached) $ECHO_C" >&6
3944 else
3945   if test -n "$ac_ct_AR"; then
3946   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3947 else
3948   ac_save_IFS=$IFS; IFS=$ac_path_separator
3949 ac_dummy="$PATH"
3950 for ac_dir in $ac_dummy; do
3951   IFS=$ac_save_IFS
3952   test -z "$ac_dir" && ac_dir=.
3953   $as_executable_p "$ac_dir/$ac_word" || continue
3954 ac_cv_prog_ac_ct_AR="ar"
3955 echo "$as_me:3955: found $ac_dir/$ac_word" >&5
3956 break
3957 done
3958
3959   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3960 fi
3961 fi
3962 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3963 if test -n "$ac_ct_AR"; then
3964   echo "$as_me:3964: result: $ac_ct_AR" >&5
3965 echo "${ECHO_T}$ac_ct_AR" >&6
3966 else
3967   echo "$as_me:3967: result: no" >&5
3968 echo "${ECHO_T}no" >&6
3969 fi
3970
3971   AR=$ac_ct_AR
3972 else
3973   AR="$ac_cv_prog_AR"
3974 fi
3975
3976 if test -n "$ac_tool_prefix"; then
3977   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3978 set dummy ${ac_tool_prefix}ar; ac_word=$2
3979 echo "$as_me:3979: checking for $ac_word" >&5
3980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3981 if test "${ac_cv_prog_AR+set}" = set; then
3982   echo $ECHO_N "(cached) $ECHO_C" >&6
3983 else
3984   if test -n "$AR"; then
3985   ac_cv_prog_AR="$AR" # Let the user override the test.
3986 else
3987   ac_save_IFS=$IFS; IFS=$ac_path_separator
3988 ac_dummy="$PATH"
3989 for ac_dir in $ac_dummy; do
3990   IFS=$ac_save_IFS
3991   test -z "$ac_dir" && ac_dir=.
3992   $as_executable_p "$ac_dir/$ac_word" || continue
3993 ac_cv_prog_AR="${ac_tool_prefix}ar"
3994 echo "$as_me:3994: found $ac_dir/$ac_word" >&5
3995 break
3996 done
3997
3998 fi
3999 fi
4000 AR=$ac_cv_prog_AR
4001 if test -n "$AR"; then
4002   echo "$as_me:4002: result: $AR" >&5
4003 echo "${ECHO_T}$AR" >&6
4004 else
4005   echo "$as_me:4005: result: no" >&5
4006 echo "${ECHO_T}no" >&6
4007 fi
4008
4009 fi
4010 if test -z "$ac_cv_prog_AR"; then
4011   ac_ct_AR=$AR
4012   # Extract the first word of "ar", so it can be a program name with args.
4013 set dummy ar; ac_word=$2
4014 echo "$as_me:4014: checking for $ac_word" >&5
4015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4016 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4017   echo $ECHO_N "(cached) $ECHO_C" >&6
4018 else
4019   if test -n "$ac_ct_AR"; then
4020   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4021 else
4022   ac_save_IFS=$IFS; IFS=$ac_path_separator
4023 ac_dummy="$PATH"
4024 for ac_dir in $ac_dummy; do
4025   IFS=$ac_save_IFS
4026   test -z "$ac_dir" && ac_dir=.
4027   $as_executable_p "$ac_dir/$ac_word" || continue
4028 ac_cv_prog_ac_ct_AR="ar"
4029 echo "$as_me:4029: found $ac_dir/$ac_word" >&5
4030 break
4031 done
4032
4033   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4034 fi
4035 fi
4036 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4037 if test -n "$ac_ct_AR"; then
4038   echo "$as_me:4038: result: $ac_ct_AR" >&5
4039 echo "${ECHO_T}$ac_ct_AR" >&6
4040 else
4041   echo "$as_me:4041: result: no" >&5
4042 echo "${ECHO_T}no" >&6
4043 fi
4044
4045   AR=$ac_ct_AR
4046 else
4047   AR="$ac_cv_prog_AR"
4048 fi
4049
4050 echo "$as_me:4050: checking for options to update archives" >&5
4051 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4052 if test "${cf_cv_ar_flags+set}" = set; then
4053   echo $ECHO_N "(cached) $ECHO_C" >&6
4054 else
4055
4056         cf_cv_ar_flags=unknown
4057         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4058         do
4059                 rm -f conftest.$ac_cv_objext
4060                 rm -f conftest.a
4061
4062                 cat >conftest.$ac_ext <<EOF
4063 #line 4063 "configure"
4064 int     testdata[3] = { 123, 456, 789 };
4065 EOF
4066                 if { (eval echo "$as_me:4066: \"$ac_compile\"") >&5
4067   (eval $ac_compile) 2>&5
4068   ac_status=$?
4069   echo "$as_me:4069: \$? = $ac_status" >&5
4070   (exit $ac_status); } ; then
4071                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4072                         if test -f conftest.a ; then
4073                                 cf_cv_ar_flags=$cf_ar_flags
4074                                 break
4075                         fi
4076                 else
4077                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4078
4079 echo "${as_me-configure}:4079: testing cannot compile test-program ..." 1>&5
4080
4081                         break
4082                 fi
4083         done
4084         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4085
4086 fi
4087 echo "$as_me:4087: result: $cf_cv_ar_flags" >&5
4088 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4089 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4090 ARFLAGS=$cf_cv_ar_flags
4091
4092 echo "$as_me:4092: checking if you have specified an install-prefix" >&5
4093 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4094
4095 # Check whether --with-install-prefix or --without-install-prefix was given.
4096 if test "${with_install_prefix+set}" = set; then
4097   withval="$with_install_prefix"
4098   case "$withval" in #(vi
4099         yes|no) #(vi
4100                 ;;
4101         *)      DESTDIR="$withval"
4102                 ;;
4103         esac
4104 fi;
4105 echo "$as_me:4105: result: $DESTDIR" >&5
4106 echo "${ECHO_T}$DESTDIR" >&6
4107
4108 ###############################################################################
4109
4110 # If we're cross-compiling, allow the user to override the tools and their
4111 # options.  The configure script is oriented toward identifying the host
4112 # compiler, etc., but we need a build compiler to generate parts of the source.
4113
4114 if test "$cross_compiling" = yes ; then
4115
4116         # defaults that we might want to override
4117         : ${BUILD_CFLAGS:=''}
4118         : ${BUILD_CPPFLAGS:=''}
4119         : ${BUILD_LDFLAGS:=''}
4120         : ${BUILD_LIBS:=''}
4121         : ${BUILD_EXEEXT:='$x'}
4122         : ${BUILD_OBJEXT:='o'}
4123
4124 # Check whether --with-build-cc or --without-build-cc was given.
4125 if test "${with_build_cc+set}" = set; then
4126   withval="$with_build_cc"
4127   BUILD_CC="$withval"
4128 else
4129   for ac_prog in gcc cc cl
4130 do
4131   # Extract the first word of "$ac_prog", so it can be a program name with args.
4132 set dummy $ac_prog; ac_word=$2
4133 echo "$as_me:4133: checking for $ac_word" >&5
4134 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4135 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4136   echo $ECHO_N "(cached) $ECHO_C" >&6
4137 else
4138   if test -n "$BUILD_CC"; then
4139   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4140 else
4141   ac_save_IFS=$IFS; IFS=$ac_path_separator
4142 ac_dummy="$PATH"
4143 for ac_dir in $ac_dummy; do
4144   IFS=$ac_save_IFS
4145   test -z "$ac_dir" && ac_dir=.
4146   $as_executable_p "$ac_dir/$ac_word" || continue
4147 ac_cv_prog_BUILD_CC="$ac_prog"
4148 echo "$as_me:4148: found $ac_dir/$ac_word" >&5
4149 break
4150 done
4151
4152 fi
4153 fi
4154 BUILD_CC=$ac_cv_prog_BUILD_CC
4155 if test -n "$BUILD_CC"; then
4156   echo "$as_me:4156: result: $BUILD_CC" >&5
4157 echo "${ECHO_T}$BUILD_CC" >&6
4158 else
4159   echo "$as_me:4159: result: no" >&5
4160 echo "${ECHO_T}no" >&6
4161 fi
4162
4163   test -n "$BUILD_CC" && break
4164 done
4165
4166 fi;
4167         echo "$as_me:4167: checking for native build C compiler" >&5
4168 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4169         echo "$as_me:4169: result: $BUILD_CC" >&5
4170 echo "${ECHO_T}$BUILD_CC" >&6
4171
4172         echo "$as_me:4172: checking for native build C preprocessor" >&5
4173 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4174
4175 # Check whether --with-build-cpp or --without-build-cpp was given.
4176 if test "${with_build_cpp+set}" = set; then
4177   withval="$with_build_cpp"
4178   BUILD_CPP="$withval"
4179 else
4180   BUILD_CPP='${BUILD_CC} -E'
4181 fi;
4182         echo "$as_me:4182: result: $BUILD_CPP" >&5
4183 echo "${ECHO_T}$BUILD_CPP" >&6
4184
4185         echo "$as_me:4185: checking for native build C flags" >&5
4186 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4187
4188 # Check whether --with-build-cflags or --without-build-cflags was given.
4189 if test "${with_build_cflags+set}" = set; then
4190   withval="$with_build_cflags"
4191   BUILD_CFLAGS="$withval"
4192 fi;
4193         echo "$as_me:4193: result: $BUILD_CFLAGS" >&5
4194 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4195
4196         echo "$as_me:4196: checking for native build C preprocessor-flags" >&5
4197 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4198
4199 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4200 if test "${with_build_cppflags+set}" = set; then
4201   withval="$with_build_cppflags"
4202   BUILD_CPPFLAGS="$withval"
4203 fi;
4204         echo "$as_me:4204: result: $BUILD_CPPFLAGS" >&5
4205 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4206
4207         echo "$as_me:4207: checking for native build linker-flags" >&5
4208 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4209
4210 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4211 if test "${with_build_ldflags+set}" = set; then
4212   withval="$with_build_ldflags"
4213   BUILD_LDFLAGS="$withval"
4214 fi;
4215         echo "$as_me:4215: result: $BUILD_LDFLAGS" >&5
4216 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4217
4218         echo "$as_me:4218: checking for native build linker-libraries" >&5
4219 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4220
4221 # Check whether --with-build-libs or --without-build-libs was given.
4222 if test "${with_build_libs+set}" = set; then
4223   withval="$with_build_libs"
4224   BUILD_LIBS="$withval"
4225 fi;
4226         echo "$as_me:4226: result: $BUILD_LIBS" >&5
4227 echo "${ECHO_T}$BUILD_LIBS" >&6
4228
4229         # this assumes we're on Unix.
4230         BUILD_EXEEXT=
4231         BUILD_OBJEXT=o
4232
4233         : ${BUILD_CC:='${CC}'}
4234
4235         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4236                 { { echo "$as_me:4236: error: Cross-build requires two compilers.
4237 Use --with-build-cc to specify the native compiler." >&5
4238 echo "$as_me: error: Cross-build requires two compilers.
4239 Use --with-build-cc to specify the native compiler." >&2;}
4240    { (exit 1); exit 1; }; }
4241         fi
4242
4243 else
4244         : ${BUILD_CC:='${CC}'}
4245         : ${BUILD_CPP:='${CPP}'}
4246         : ${BUILD_CFLAGS:='${CFLAGS}'}
4247         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4248         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4249         : ${BUILD_LIBS:='${LIBS}'}
4250         : ${BUILD_EXEEXT:='$x'}
4251         : ${BUILD_OBJEXT:='o'}
4252 fi
4253
4254 ###############################################################################
4255
4256 ### Options to allow the user to specify the set of libraries which are used.
4257 ### Use "--without-normal --with-shared" to allow the default model to be
4258 ### shared, for example.
4259 cf_list_models=""
4260
4261 LIBTOOL=
4262
4263 # common library maintenance symbols that are convenient for libtool scripts:
4264 LIB_CREATE='${AR} -cr'
4265 LIB_OBJECT='${OBJECTS}'
4266 LIB_SUFFIX=.a
4267 LIB_PREP="$RANLIB"
4268
4269 # symbols used to prop libtool up to enable it to determine what it should be
4270 # doing:
4271 LIB_CLEAN=
4272 LIB_COMPILE=
4273 LIB_LINK='${CC}'
4274 LIB_INSTALL=
4275 LIB_UNINSTALL=
4276
4277 echo "$as_me:4277: checking if you want to build libraries with libtool" >&5
4278 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4279
4280 # Check whether --with-libtool or --without-libtool was given.
4281 if test "${with_libtool+set}" = set; then
4282   withval="$with_libtool"
4283   with_libtool=$withval
4284 else
4285   with_libtool=no
4286 fi;
4287 echo "$as_me:4287: result: $with_libtool" >&5
4288 echo "${ECHO_T}$with_libtool" >&6
4289 if test "$with_libtool" != "no"; then
4290
4291         if test "$with_libtool" != "yes" ; then
4292
4293 if test "x$prefix" != xNONE; then
4294   cf_path_syntax="$prefix"
4295 else
4296   cf_path_syntax="$ac_default_prefix"
4297 fi
4298
4299 case ".$with_libtool" in #(vi
4300 .\$\(*\)*|.\'*\'*) #(vi
4301   ;;
4302 ..|./*|.\\*) #(vi
4303   ;;
4304 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4305   ;;
4306 .\${*prefix}*) #(vi
4307   eval with_libtool="$with_libtool"
4308   case ".$with_libtool" in #(vi
4309   .NONE/*)
4310     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4311     ;;
4312   esac
4313   ;; #(vi
4314 .no|.NONE/*)
4315   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4316   ;;
4317 *)
4318   { { echo "$as_me:4318: error: expected a pathname, not \"$with_libtool\"" >&5
4319 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4320    { (exit 1); exit 1; }; }
4321   ;;
4322 esac
4323
4324                 LIBTOOL=$with_libtool
4325         else
4326                 # Extract the first word of "libtool", so it can be a program name with args.
4327 set dummy libtool; ac_word=$2
4328 echo "$as_me:4328: checking for $ac_word" >&5
4329 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4330 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4331   echo $ECHO_N "(cached) $ECHO_C" >&6
4332 else
4333   case $LIBTOOL in
4334   [\\/]* | ?:[\\/]*)
4335   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4336   ;;
4337   *)
4338   ac_save_IFS=$IFS; IFS=$ac_path_separator
4339 ac_dummy="$PATH"
4340 for ac_dir in $ac_dummy; do
4341   IFS=$ac_save_IFS
4342   test -z "$ac_dir" && ac_dir=.
4343   if $as_executable_p "$ac_dir/$ac_word"; then
4344    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4345    echo "$as_me:4345: found $ac_dir/$ac_word" >&5
4346    break
4347 fi
4348 done
4349
4350   ;;
4351 esac
4352 fi
4353 LIBTOOL=$ac_cv_path_LIBTOOL
4354
4355 if test -n "$LIBTOOL"; then
4356   echo "$as_me:4356: result: $LIBTOOL" >&5
4357 echo "${ECHO_T}$LIBTOOL" >&6
4358 else
4359   echo "$as_me:4359: result: no" >&5
4360 echo "${ECHO_T}no" >&6
4361 fi
4362
4363         fi
4364         if test -z "$LIBTOOL" ; then
4365                 { { echo "$as_me:4365: error: Cannot find libtool" >&5
4366 echo "$as_me: error: Cannot find libtool" >&2;}
4367    { (exit 1); exit 1; }; }
4368         fi
4369         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4370         LIB_OBJECT='${OBJECTS:.o=.lo}'
4371         LIB_SUFFIX=.la
4372         LIB_CLEAN='${LIBTOOL} --mode=clean'
4373         LIB_COMPILE='${LIBTOOL} --mode=compile'
4374         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4375         LIB_INSTALL='${LIBTOOL} --mode=install'
4376         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4377         LIB_PREP=:
4378
4379         # Show the version of libtool
4380         echo "$as_me:4380: checking version of libtool" >&5
4381 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4382
4383         # Save the version in a cache variable - this is not entirely a good
4384         # thing, but the version string from libtool is very ugly, and for
4385         # bug reports it might be useful to have the original string. "("
4386         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.].*//'`
4387         echo "$as_me:4387: result: $cf_cv_libtool_version" >&5
4388 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4389         if test -z "$cf_cv_libtool_version" ; then
4390                 { { echo "$as_me:4390: error: This is not GNU libtool" >&5
4391 echo "$as_me: error: This is not GNU libtool" >&2;}
4392    { (exit 1); exit 1; }; }
4393         fi
4394
4395         # special hack to add -no-undefined (which libtool should do for itself)
4396         LT_UNDEF=
4397         case "$cf_cv_system_name" in #(vi
4398         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4399                 LT_UNDEF=-no-undefined
4400                 ;;
4401         esac
4402
4403         # special hack to add --tag option for C++ compiler
4404         case $cf_cv_libtool_version in #(vi
4405         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4406                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4407                 LIBTOOL="$LIBTOOL --tag=CC"
4408                 ;;
4409         *)
4410                 LIBTOOL_CXX="$LIBTOOL"
4411                 ;;
4412         esac
4413 else
4414         LIBTOOL=""
4415         LIBTOOL_CXX=""
4416 fi
4417
4418 test -z "$LIBTOOL" && ECHO_LT=
4419
4420 if test "$with_libtool" != "no" ; then
4421
4422 cf_list_models="$cf_list_models libtool"
4423
4424 else
4425
4426 echo "$as_me:4426: checking if you want to build shared libraries" >&5
4427 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4428
4429 # Check whether --with-shared or --without-shared was given.
4430 if test "${with_shared+set}" = set; then
4431   withval="$with_shared"
4432   with_shared=$withval
4433 else
4434   with_shared=no
4435 fi;
4436 echo "$as_me:4436: result: $with_shared" >&5
4437 echo "${ECHO_T}$with_shared" >&6
4438 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4439
4440 echo "$as_me:4440: checking if you want to build static libraries" >&5
4441 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4442
4443 # Check whether --with-normal or --without-normal was given.
4444 if test "${with_normal+set}" = set; then
4445   withval="$with_normal"
4446   with_normal=$withval
4447 else
4448   with_normal=yes
4449 fi;
4450 echo "$as_me:4450: result: $with_normal" >&5
4451 echo "${ECHO_T}$with_normal" >&6
4452 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4453
4454 echo "$as_me:4454: checking if you want to build debug libraries" >&5
4455 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4456
4457 # Check whether --with-debug or --without-debug was given.
4458 if test "${with_debug+set}" = set; then
4459   withval="$with_debug"
4460   with_debug=$withval
4461 else
4462   with_debug=yes
4463 fi;
4464 echo "$as_me:4464: result: $with_debug" >&5
4465 echo "${ECHO_T}$with_debug" >&6
4466 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4467
4468 echo "$as_me:4468: checking if you want to build profiling libraries" >&5
4469 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4470
4471 # Check whether --with-profile or --without-profile was given.
4472 if test "${with_profile+set}" = set; then
4473   withval="$with_profile"
4474   with_profile=$withval
4475 else
4476   with_profile=no
4477 fi;
4478 echo "$as_me:4478: result: $with_profile" >&5
4479 echo "${ECHO_T}$with_profile" >&6
4480 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4481
4482 fi
4483
4484 ###############################################################################
4485
4486 echo "$as_me:4486: checking for specified models" >&5
4487 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4488 test -z "$cf_list_models" && cf_list_models=normal
4489 test "$with_libtool" != "no" && cf_list_models=libtool
4490 echo "$as_me:4490: result: $cf_list_models" >&5
4491 echo "${ECHO_T}$cf_list_models" >&6
4492
4493 ### Use the first model as the default, and save its suffix for use in building
4494 ### up test-applications.
4495 echo "$as_me:4495: checking for default model" >&5
4496 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4497 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4498 echo "$as_me:4498: result: $DFT_LWR_MODEL" >&5
4499 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4500
4501 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4502
4503 TICS_NAME=tic
4504
4505 TINFO_NAME=tinfo
4506
4507 LIB_NAME=ncurses
4508
4509 LIB_DIR=../lib
4510 LIB_2ND=../../lib
4511
4512         case $cf_cv_system_name in #(vi
4513         OS/2*|os2*) #(vi
4514         LIB_PREFIX=''
4515         ;;
4516         *)      LIB_PREFIX='lib'
4517         ;;
4518         esac
4519 cf_prefix=$LIB_PREFIX
4520
4521 LIB_PREFIX=$cf_prefix
4522
4523 LIB_SUFFIX=
4524
4525 ###############################################################################
4526
4527 echo "$as_me:4527: checking if you want to build a separate terminfo library" >&5
4528 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4529
4530 # Check whether --with-termlib or --without-termlib was given.
4531 if test "${with_termlib+set}" = set; then
4532   withval="$with_termlib"
4533   with_termlib=$withval
4534 else
4535   with_termlib=no
4536 fi;
4537 echo "$as_me:4537: result: $with_termlib" >&5
4538 echo "${ECHO_T}$with_termlib" >&6
4539
4540 echo "$as_me:4540: checking if you want to build a separate tic library" >&5
4541 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4542
4543 # Check whether --with-ticlib or --without-ticlib was given.
4544 if test "${with_ticlib+set}" = set; then
4545   withval="$with_ticlib"
4546   with_ticlib=$withval
4547 else
4548   with_ticlib=no
4549 fi;
4550 echo "$as_me:4550: result: $with_ticlib" >&5
4551 echo "${ECHO_T}$with_ticlib" >&6
4552
4553 ### Checks for special libraries, must be done up-front.
4554 SHLIB_LIST=""
4555
4556 echo "$as_me:4556: checking if you want to link with the GPM mouse library" >&5
4557 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4558
4559 # Check whether --with-gpm or --without-gpm was given.
4560 if test "${with_gpm+set}" = set; then
4561   withval="$with_gpm"
4562   with_gpm=$withval
4563 else
4564   with_gpm=maybe
4565 fi;
4566 echo "$as_me:4566: result: $with_gpm" >&5
4567 echo "${ECHO_T}$with_gpm" >&6
4568
4569 if test "$with_gpm" != no ; then
4570         echo "$as_me:4570: checking for gpm.h" >&5
4571 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4572 if test "${ac_cv_header_gpm_h+set}" = set; then
4573   echo $ECHO_N "(cached) $ECHO_C" >&6
4574 else
4575   cat >conftest.$ac_ext <<_ACEOF
4576 #line 4576 "configure"
4577 #include "confdefs.h"
4578 #include <gpm.h>
4579 _ACEOF
4580 if { (eval echo "$as_me:4580: \"$ac_cpp conftest.$ac_ext\"") >&5
4581   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4582   ac_status=$?
4583   egrep -v '^ *\+' conftest.er1 >conftest.err
4584   rm -f conftest.er1
4585   cat conftest.err >&5
4586   echo "$as_me:4586: \$? = $ac_status" >&5
4587   (exit $ac_status); } >/dev/null; then
4588   if test -s conftest.err; then
4589     ac_cpp_err=$ac_c_preproc_warn_flag
4590   else
4591     ac_cpp_err=
4592   fi
4593 else
4594   ac_cpp_err=yes
4595 fi
4596 if test -z "$ac_cpp_err"; then
4597   ac_cv_header_gpm_h=yes
4598 else
4599   echo "$as_me: failed program was:" >&5
4600   cat conftest.$ac_ext >&5
4601   ac_cv_header_gpm_h=no
4602 fi
4603 rm -f conftest.err conftest.$ac_ext
4604 fi
4605 echo "$as_me:4605: result: $ac_cv_header_gpm_h" >&5
4606 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4607 if test $ac_cv_header_gpm_h = yes; then
4608
4609                 cat >>confdefs.h <<\EOF
4610 #define HAVE_GPM_H 1
4611 EOF
4612
4613                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4614                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4615
4616 echo "${as_me-configure}:4616: testing assuming we really have GPM library ..." 1>&5
4617
4618                         cat >>confdefs.h <<\EOF
4619 #define HAVE_LIBGPM 1
4620 EOF
4621
4622                 else
4623                         echo "$as_me:4623: checking for Gpm_Open in -lgpm" >&5
4624 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4625 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4626   echo $ECHO_N "(cached) $ECHO_C" >&6
4627 else
4628   ac_check_lib_save_LIBS=$LIBS
4629 LIBS="-lgpm  $LIBS"
4630 cat >conftest.$ac_ext <<_ACEOF
4631 #line 4631 "configure"
4632 #include "confdefs.h"
4633
4634 /* Override any gcc2 internal prototype to avoid an error.  */
4635 #ifdef __cplusplus
4636 extern "C"
4637 #endif
4638 /* We use char because int might match the return type of a gcc2
4639    builtin and then its argument prototype would still apply.  */
4640 char Gpm_Open ();
4641 int
4642 main ()
4643 {
4644 Gpm_Open ();
4645   ;
4646   return 0;
4647 }
4648 _ACEOF
4649 rm -f conftest.$ac_objext conftest$ac_exeext
4650 if { (eval echo "$as_me:4650: \"$ac_link\"") >&5
4651   (eval $ac_link) 2>&5
4652   ac_status=$?
4653   echo "$as_me:4653: \$? = $ac_status" >&5
4654   (exit $ac_status); } &&
4655          { ac_try='test -s conftest$ac_exeext'
4656   { (eval echo "$as_me:4656: \"$ac_try\"") >&5
4657   (eval $ac_try) 2>&5
4658   ac_status=$?
4659   echo "$as_me:4659: \$? = $ac_status" >&5
4660   (exit $ac_status); }; }; then
4661   ac_cv_lib_gpm_Gpm_Open=yes
4662 else
4663   echo "$as_me: failed program was:" >&5
4664 cat conftest.$ac_ext >&5
4665 ac_cv_lib_gpm_Gpm_Open=no
4666 fi
4667 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4668 LIBS=$ac_check_lib_save_LIBS
4669 fi
4670 echo "$as_me:4670: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4671 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4672 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4673   :
4674 else
4675
4676                                 { { echo "$as_me:4676: error: Cannot link with GPM library" >&5
4677 echo "$as_me: error: Cannot link with GPM library" >&2;}
4678    { (exit 1); exit 1; }; }
4679                 fi
4680                 with_gpm=yes
4681
4682 fi
4683
4684 else
4685
4686                 test "$with_gpm" != maybe && { echo "$as_me:4686: WARNING: Cannot find GPM header" >&5
4687 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4688                 with_gpm=no
4689
4690 fi
4691
4692 fi
4693
4694 if test "$with_gpm" != no ; then
4695         echo "$as_me:4695: checking if you want to load GPM dynamically" >&5
4696 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4697
4698 # Check whether --with-dlsym or --without-dlsym was given.
4699 if test "${with_dlsym+set}" = set; then
4700   withval="$with_dlsym"
4701   with_dlsym=$withval
4702 else
4703   with_dlsym=yes
4704 fi;
4705         echo "$as_me:4705: result: $with_dlsym" >&5
4706 echo "${ECHO_T}$with_dlsym" >&6
4707         if test "$with_dlsym" = yes ; then
4708
4709 cf_have_dlsym=no
4710 echo "$as_me:4710: checking for dlsym" >&5
4711 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4712 if test "${ac_cv_func_dlsym+set}" = set; then
4713   echo $ECHO_N "(cached) $ECHO_C" >&6
4714 else
4715   cat >conftest.$ac_ext <<_ACEOF
4716 #line 4716 "configure"
4717 #include "confdefs.h"
4718 /* System header to define __stub macros and hopefully few prototypes,
4719     which can conflict with char dlsym (); below.  */
4720 #include <assert.h>
4721 /* Override any gcc2 internal prototype to avoid an error.  */
4722 #ifdef __cplusplus
4723 extern "C"
4724 #endif
4725 /* We use char because int might match the return type of a gcc2
4726    builtin and then its argument prototype would still apply.  */
4727 char dlsym ();
4728 char (*f) ();
4729
4730 int
4731 main ()
4732 {
4733 /* The GNU C library defines this for functions which it implements
4734     to always fail with ENOSYS.  Some functions are actually named
4735     something starting with __ and the normal name is an alias.  */
4736 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4737 choke me
4738 #else
4739 f = dlsym;
4740 #endif
4741
4742   ;
4743   return 0;
4744 }
4745 _ACEOF
4746 rm -f conftest.$ac_objext conftest$ac_exeext
4747 if { (eval echo "$as_me:4747: \"$ac_link\"") >&5
4748   (eval $ac_link) 2>&5
4749   ac_status=$?
4750   echo "$as_me:4750: \$? = $ac_status" >&5
4751   (exit $ac_status); } &&
4752          { ac_try='test -s conftest$ac_exeext'
4753   { (eval echo "$as_me:4753: \"$ac_try\"") >&5
4754   (eval $ac_try) 2>&5
4755   ac_status=$?
4756   echo "$as_me:4756: \$? = $ac_status" >&5
4757   (exit $ac_status); }; }; then
4758   ac_cv_func_dlsym=yes
4759 else
4760   echo "$as_me: failed program was:" >&5
4761 cat conftest.$ac_ext >&5
4762 ac_cv_func_dlsym=no
4763 fi
4764 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4765 fi
4766 echo "$as_me:4766: result: $ac_cv_func_dlsym" >&5
4767 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4768 if test $ac_cv_func_dlsym = yes; then
4769   cf_have_dlsym=yes
4770 else
4771
4772 cf_have_libdl=no
4773 echo "$as_me:4773: checking for dlsym in -ldl" >&5
4774 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4775 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4776   echo $ECHO_N "(cached) $ECHO_C" >&6
4777 else
4778   ac_check_lib_save_LIBS=$LIBS
4779 LIBS="-ldl  $LIBS"
4780 cat >conftest.$ac_ext <<_ACEOF
4781 #line 4781 "configure"
4782 #include "confdefs.h"
4783
4784 /* Override any gcc2 internal prototype to avoid an error.  */
4785 #ifdef __cplusplus
4786 extern "C"
4787 #endif
4788 /* We use char because int might match the return type of a gcc2
4789    builtin and then its argument prototype would still apply.  */
4790 char dlsym ();
4791 int
4792 main ()
4793 {
4794 dlsym ();
4795   ;
4796   return 0;
4797 }
4798 _ACEOF
4799 rm -f conftest.$ac_objext conftest$ac_exeext
4800 if { (eval echo "$as_me:4800: \"$ac_link\"") >&5
4801   (eval $ac_link) 2>&5
4802   ac_status=$?
4803   echo "$as_me:4803: \$? = $ac_status" >&5
4804   (exit $ac_status); } &&
4805          { ac_try='test -s conftest$ac_exeext'
4806   { (eval echo "$as_me:4806: \"$ac_try\"") >&5
4807   (eval $ac_try) 2>&5
4808   ac_status=$?
4809   echo "$as_me:4809: \$? = $ac_status" >&5
4810   (exit $ac_status); }; }; then
4811   ac_cv_lib_dl_dlsym=yes
4812 else
4813   echo "$as_me: failed program was:" >&5
4814 cat conftest.$ac_ext >&5
4815 ac_cv_lib_dl_dlsym=no
4816 fi
4817 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4818 LIBS=$ac_check_lib_save_LIBS
4819 fi
4820 echo "$as_me:4820: result: $ac_cv_lib_dl_dlsym" >&5
4821 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4822 if test $ac_cv_lib_dl_dlsym = yes; then
4823
4824         cf_have_dlsym=yes
4825         cf_have_libdl=yes
4826 fi
4827
4828 fi
4829
4830 if test "$cf_have_dlsym" = yes ; then
4831         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4832
4833         echo "$as_me:4833: checking whether able to link to dl*() functions" >&5
4834 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4835         cat >conftest.$ac_ext <<_ACEOF
4836 #line 4836 "configure"
4837 #include "confdefs.h"
4838 #include <dlfcn.h>
4839 int
4840 main ()
4841 {
4842
4843                 void *obj;
4844                 if ((obj = dlopen("filename", 0)) != 0) {
4845                         if (dlsym(obj, "symbolname") == 0) {
4846                         dlclose(obj);
4847                         }
4848                 }
4849   ;
4850   return 0;
4851 }
4852 _ACEOF
4853 rm -f conftest.$ac_objext conftest$ac_exeext
4854 if { (eval echo "$as_me:4854: \"$ac_link\"") >&5
4855   (eval $ac_link) 2>&5
4856   ac_status=$?
4857   echo "$as_me:4857: \$? = $ac_status" >&5
4858   (exit $ac_status); } &&
4859          { ac_try='test -s conftest$ac_exeext'
4860   { (eval echo "$as_me:4860: \"$ac_try\"") >&5
4861   (eval $ac_try) 2>&5
4862   ac_status=$?
4863   echo "$as_me:4863: \$? = $ac_status" >&5
4864   (exit $ac_status); }; }; then
4865
4866                 cat >>confdefs.h <<\EOF
4867 #define HAVE_LIBDL 1
4868 EOF
4869
4870 else
4871   echo "$as_me: failed program was:" >&5
4872 cat conftest.$ac_ext >&5
4873
4874                 { { echo "$as_me:4874: error: Cannot link test program for libdl" >&5
4875 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4876    { (exit 1); exit 1; }; }
4877 fi
4878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4879         echo "$as_me:4879: result: ok" >&5
4880 echo "${ECHO_T}ok" >&6
4881 else
4882         { { echo "$as_me:4882: error: Cannot find dlsym function" >&5
4883 echo "$as_me: error: Cannot find dlsym function" >&2;}
4884    { (exit 1); exit 1; }; }
4885 fi
4886
4887                 if test "$with_gpm" != yes ; then
4888                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4889
4890 echo "${as_me-configure}:4890: testing assuming soname for gpm is $with_gpm ..." 1>&5
4891
4892                         cf_cv_gpm_soname="$with_gpm"
4893                 else
4894
4895 echo "$as_me:4895: checking for soname of gpm library" >&5
4896 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4897 if test "${cf_cv_gpm_soname+set}" = set; then
4898   echo $ECHO_N "(cached) $ECHO_C" >&6
4899 else
4900
4901 cf_cv_gpm_soname=unknown
4902 if test "$cross_compiling" != yes ; then
4903 cat >conftest.$ac_ext <<CF_EOF
4904 #include <gpm.h>
4905 int main()
4906 {
4907 if (Gpm_Open(0,0)) Gpm_Close();
4908         ${cf_cv_main_return:-return}(0);
4909 }
4910 CF_EOF
4911 cf_save_LIBS="$LIBS"
4912         LIBS="-lgpm $LIBS"
4913         if { (eval echo "$as_me:4913: \"$ac_compile\"") >&5
4914   (eval $ac_compile) 2>&5
4915   ac_status=$?
4916   echo "$as_me:4916: \$? = $ac_status" >&5
4917   (exit $ac_status); } ; then
4918                 if { (eval echo "$as_me:4918: \"$ac_link\"") >&5
4919   (eval $ac_link) 2>&5
4920   ac_status=$?
4921   echo "$as_me:4921: \$? = $ac_status" >&5
4922   (exit $ac_status); } ; then
4923                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4924                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4925                 fi
4926         fi
4927 rm -f conftest*
4928 LIBS="$cf_save_LIBS"
4929 fi
4930
4931 fi
4932 echo "$as_me:4932: result: $cf_cv_gpm_soname" >&5
4933 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4934
4935                 fi
4936                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4937 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4938 EOF
4939
4940                 SHLIB_LIST="-ldl $SHLIB_LIST"
4941         else
4942                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4943         fi
4944         cat >>confdefs.h <<\EOF
4945 #define HAVE_LIBGPM 1
4946 EOF
4947
4948 echo "$as_me:4948: checking for Gpm_Wgetch in -lgpm" >&5
4949 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4950 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4951   echo $ECHO_N "(cached) $ECHO_C" >&6
4952 else
4953   ac_check_lib_save_LIBS=$LIBS
4954 LIBS="-lgpm  $LIBS"
4955 cat >conftest.$ac_ext <<_ACEOF
4956 #line 4956 "configure"
4957 #include "confdefs.h"
4958
4959 /* Override any gcc2 internal prototype to avoid an error.  */
4960 #ifdef __cplusplus
4961 extern "C"
4962 #endif
4963 /* We use char because int might match the return type of a gcc2
4964    builtin and then its argument prototype would still apply.  */
4965 char Gpm_Wgetch ();
4966 int
4967 main ()
4968 {
4969 Gpm_Wgetch ();
4970   ;
4971   return 0;
4972 }
4973 _ACEOF
4974 rm -f conftest.$ac_objext conftest$ac_exeext
4975 if { (eval echo "$as_me:4975: \"$ac_link\"") >&5
4976   (eval $ac_link) 2>&5
4977   ac_status=$?
4978   echo "$as_me:4978: \$? = $ac_status" >&5
4979   (exit $ac_status); } &&
4980          { ac_try='test -s conftest$ac_exeext'
4981   { (eval echo "$as_me:4981: \"$ac_try\"") >&5
4982   (eval $ac_try) 2>&5
4983   ac_status=$?
4984   echo "$as_me:4984: \$? = $ac_status" >&5
4985   (exit $ac_status); }; }; then
4986   ac_cv_lib_gpm_Gpm_Wgetch=yes
4987 else
4988   echo "$as_me: failed program was:" >&5
4989 cat conftest.$ac_ext >&5
4990 ac_cv_lib_gpm_Gpm_Wgetch=no
4991 fi
4992 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4993 LIBS=$ac_check_lib_save_LIBS
4994 fi
4995 echo "$as_me:4995: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4996 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4997 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4998
4999 echo "$as_me:4999: checking if GPM is weakly bound to curses library" >&5
5000 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5001 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5002   echo $ECHO_N "(cached) $ECHO_C" >&6
5003 else
5004
5005 cf_cv_check_gpm_wgetch=unknown
5006 if test "$cross_compiling" != yes ; then
5007
5008 cat >conftest.$ac_ext <<CF_EOF
5009 #include <gpm.h>
5010 int main()
5011 {
5012         Gpm_Wgetch();
5013         ${cf_cv_main_return:-return}(0);
5014 }
5015 CF_EOF
5016
5017         cf_save_LIBS="$LIBS"
5018         # This only works if we can look at the symbol table.  If a shared
5019         # library is stripped for install, we cannot use that.  So we're forced
5020         # to rely on the static library, noting that some packagers may not
5021         # include it.
5022         LIBS="-static -lgpm -dynamic $LIBS"
5023         if { (eval echo "$as_me:5023: \"$ac_compile\"") >&5
5024   (eval $ac_compile) 2>&5
5025   ac_status=$?
5026   echo "$as_me:5026: \$? = $ac_status" >&5
5027   (exit $ac_status); } ; then
5028                 if { (eval echo "$as_me:5028: \"$ac_link\"") >&5
5029   (eval $ac_link) 2>&5
5030   ac_status=$?
5031   echo "$as_me:5031: \$? = $ac_status" >&5
5032   (exit $ac_status); } ; then
5033                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5034                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5035                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5036                 fi
5037         fi
5038         rm -f conftest*
5039         LIBS="$cf_save_LIBS"
5040 fi
5041
5042 fi
5043 echo "$as_me:5043: result: $cf_cv_check_gpm_wgetch" >&5
5044 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5045
5046 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5047         { echo "$as_me:5047: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5048 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5049 fi
5050
5051 fi
5052
5053 fi
5054
5055 # not everyone has "test -c"
5056 if test -c /dev/sysmouse 2>/dev/null ; then
5057 echo "$as_me:5057: checking if you want to use sysmouse" >&5
5058 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5059
5060 # Check whether --with-sysmouse or --without-sysmouse was given.
5061 if test "${with_sysmouse+set}" = set; then
5062   withval="$with_sysmouse"
5063   cf_with_sysmouse=$withval
5064 else
5065   cf_with_sysmouse=maybe
5066 fi;
5067         if test "$cf_with_sysmouse" != no ; then
5068         cat >conftest.$ac_ext <<_ACEOF
5069 #line 5069 "configure"
5070 #include "confdefs.h"
5071
5072 #include <osreldate.h>
5073 #if (__FreeBSD_version >= 400017)
5074 #include <sys/consio.h>
5075 #include <sys/fbio.h>
5076 #else
5077 #include <machine/console.h>
5078 #endif
5079
5080 int
5081 main ()
5082 {
5083
5084         struct mouse_info the_mouse;
5085         ioctl(0, CONS_MOUSECTL, &the_mouse);
5086
5087   ;
5088   return 0;
5089 }
5090 _ACEOF
5091 rm -f conftest.$ac_objext
5092 if { (eval echo "$as_me:5092: \"$ac_compile\"") >&5
5093   (eval $ac_compile) 2>&5
5094   ac_status=$?
5095   echo "$as_me:5095: \$? = $ac_status" >&5
5096   (exit $ac_status); } &&
5097          { ac_try='test -s conftest.$ac_objext'
5098   { (eval echo "$as_me:5098: \"$ac_try\"") >&5
5099   (eval $ac_try) 2>&5
5100   ac_status=$?
5101   echo "$as_me:5101: \$? = $ac_status" >&5
5102   (exit $ac_status); }; }; then
5103   cf_with_sysmouse=yes
5104 else
5105   echo "$as_me: failed program was:" >&5
5106 cat conftest.$ac_ext >&5
5107 cf_with_sysmouse=no
5108 fi
5109 rm -f conftest.$ac_objext conftest.$ac_ext
5110         fi
5111 echo "$as_me:5111: result: $cf_with_sysmouse" >&5
5112 echo "${ECHO_T}$cf_with_sysmouse" >&6
5113 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5114 #define USE_SYSMOUSE 1
5115 EOF
5116
5117 fi
5118
5119 if test X"$CC_G_OPT" = X"" ; then
5120         CC_G_OPT='-g'
5121         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5122 fi
5123
5124 if test X"$CXX_G_OPT" = X"" ; then
5125         CXX_G_OPT='-g'
5126         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5127 fi
5128
5129 echo "$as_me:5129: checking for default loader flags" >&5
5130 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5131 case $DFT_LWR_MODEL in
5132 libtool) LD_MODEL=''   ;;
5133 normal)  LD_MODEL=''   ;;
5134 debug)   LD_MODEL=$CC_G_OPT ;;
5135 profile) LD_MODEL='-pg';;
5136 shared)  LD_MODEL=''   ;;
5137 esac
5138 echo "$as_me:5138: result: $LD_MODEL" >&5
5139 echo "${ECHO_T}$LD_MODEL" >&6
5140
5141 case $DFT_LWR_MODEL in
5142 shared)
5143
5144 echo "$as_me:5144: checking if rpath option should be used" >&5
5145 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5146
5147 # Check whether --enable-rpath or --disable-rpath was given.
5148 if test "${enable_rpath+set}" = set; then
5149   enableval="$enable_rpath"
5150   cf_cv_ld_rpath=$enableval
5151 else
5152   cf_cv_ld_rpath=no
5153 fi;
5154 echo "$as_me:5154: result: $cf_cv_ld_rpath" >&5
5155 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5156
5157 echo "$as_me:5157: checking if shared libraries should be relinked during install" >&5
5158 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5159
5160 # Check whether --enable-relink or --disable-relink was given.
5161 if test "${enable_relink+set}" = set; then
5162   enableval="$enable_relink"
5163   cf_cv_do_relink=$enableval
5164 else
5165   cf_cv_do_relink=yes
5166 fi;
5167 echo "$as_me:5167: result: $cf_cv_do_relink" >&5
5168 echo "${ECHO_T}$cf_cv_do_relink" >&6
5169         ;;
5170 esac
5171
5172         LOCAL_LDFLAGS=
5173         LOCAL_LDFLAGS2=
5174         LD_RPATH_OPT=
5175         LD_SHARED_OPTS=
5176         INSTALL_LIB="-m 644"
5177
5178         cf_cv_do_symlinks=no
5179
5180         echo "$as_me:5180: checking if release/abi version should be used for shared libs" >&5
5181 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5182
5183 # Check whether --with-shlib-version or --without-shlib-version was given.
5184 if test "${with_shlib_version+set}" = set; then
5185   withval="$with_shlib_version"
5186   test -z "$withval" && withval=auto
5187         case $withval in #(vi
5188         yes) #(vi
5189                 cf_cv_shlib_version=auto
5190                 ;;
5191         rel|abi|auto|no) #(vi
5192                 cf_cv_shlib_version=$withval
5193                 ;;
5194         *)
5195                 { { echo "$as_me:5195: error: option value must be one of: rel, abi, auto or no" >&5
5196 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5197    { (exit 1); exit 1; }; }
5198                 ;;
5199         esac
5200
5201 else
5202   cf_cv_shlib_version=auto
5203 fi;
5204         echo "$as_me:5204: result: $cf_cv_shlib_version" >&5
5205 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5206
5207         cf_cv_rm_so_locs=no
5208
5209         # Some less-capable ports of gcc support only -fpic
5210         CC_SHARED_OPTS=
5211         if test "$GCC" = yes
5212         then
5213                 echo "$as_me:5213: checking which $CC option to use" >&5
5214 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5215                 cf_save_CFLAGS="$CFLAGS"
5216                 for CC_SHARED_OPTS in -fPIC -fpic ''
5217                 do
5218                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5219                         cat >conftest.$ac_ext <<_ACEOF
5220 #line 5220 "configure"
5221 #include "confdefs.h"
5222 #include <stdio.h>
5223 int
5224 main ()
5225 {
5226 int x = 1
5227   ;
5228   return 0;
5229 }
5230 _ACEOF
5231 rm -f conftest.$ac_objext
5232 if { (eval echo "$as_me:5232: \"$ac_compile\"") >&5
5233   (eval $ac_compile) 2>&5
5234   ac_status=$?
5235   echo "$as_me:5235: \$? = $ac_status" >&5
5236   (exit $ac_status); } &&
5237          { ac_try='test -s conftest.$ac_objext'
5238   { (eval echo "$as_me:5238: \"$ac_try\"") >&5
5239   (eval $ac_try) 2>&5
5240   ac_status=$?
5241   echo "$as_me:5241: \$? = $ac_status" >&5
5242   (exit $ac_status); }; }; then
5243   break
5244 else
5245   echo "$as_me: failed program was:" >&5
5246 cat conftest.$ac_ext >&5
5247 fi
5248 rm -f conftest.$ac_objext conftest.$ac_ext
5249                 done
5250                 echo "$as_me:5250: result: $CC_SHARED_OPTS" >&5
5251 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5252                 CFLAGS="$cf_save_CFLAGS"
5253         fi
5254
5255         cf_cv_shlib_version_infix=no
5256
5257         case $cf_cv_system_name in
5258         aix[56]*)
5259                 if test "$GCC" = yes; then
5260                         CC_SHARED_OPTS=
5261                         MK_SHARED_LIB="$(CC) -shared"
5262                 fi
5263                 ;;
5264         beos*)
5265                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5266                 ;;
5267         cygwin*)
5268                 CC_SHARED_OPTS=
5269                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5270                 cf_cv_shlib_version=cygdll
5271                 cf_cv_shlib_version_infix=cygdll
5272                 cat >mk_shared_lib.sh <<-CF_EOF
5273                 #!/bin/sh
5274                 SHARED_LIB=\$1
5275                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5276                 shift
5277                 cat <<-EOF
5278                 Linking shared library
5279                 ** SHARED_LIB \$SHARED_LIB
5280                 ** IMPORT_LIB \$IMPORT_LIB
5281 EOF
5282                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5283 CF_EOF
5284                 chmod +x mk_shared_lib.sh
5285                 ;;
5286         darwin*)
5287                 EXTRA_CFLAGS="-no-cpp-precomp"
5288                 CC_SHARED_OPTS="-dynamic"
5289                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5290                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5291                 cf_cv_shlib_version_infix=yes
5292                 echo "$as_me:5292: checking if ld -search_paths_first works" >&5
5293 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5294 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5295   echo $ECHO_N "(cached) $ECHO_C" >&6
5296 else
5297
5298                         cf_save_LDFLAGS=$LDFLAGS
5299                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5300                         cat >conftest.$ac_ext <<_ACEOF
5301 #line 5301 "configure"
5302 #include "confdefs.h"
5303
5304 int
5305 main ()
5306 {
5307 int i;
5308   ;
5309   return 0;
5310 }
5311 _ACEOF
5312 rm -f conftest.$ac_objext conftest$ac_exeext
5313 if { (eval echo "$as_me:5313: \"$ac_link\"") >&5
5314   (eval $ac_link) 2>&5
5315   ac_status=$?
5316   echo "$as_me:5316: \$? = $ac_status" >&5
5317   (exit $ac_status); } &&
5318          { ac_try='test -s conftest$ac_exeext'
5319   { (eval echo "$as_me:5319: \"$ac_try\"") >&5
5320   (eval $ac_try) 2>&5
5321   ac_status=$?
5322   echo "$as_me:5322: \$? = $ac_status" >&5
5323   (exit $ac_status); }; }; then
5324   cf_cv_ldflags_search_paths_first=yes
5325 else
5326   echo "$as_me: failed program was:" >&5
5327 cat conftest.$ac_ext >&5
5328 cf_cv_ldflags_search_paths_first=no
5329 fi
5330 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5331                                 LDFLAGS=$cf_save_LDFLAGS
5332 fi
5333 echo "$as_me:5333: result: $cf_cv_ldflags_search_paths_first" >&5
5334 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5335                 if test $cf_cv_ldflags_search_paths_first = yes; then
5336                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5337                 fi
5338                 ;;
5339         hpux*)
5340                 # (tested with gcc 2.7.2 -- I don't have c89)
5341                 if test "$GCC" = yes; then
5342                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5343                 else
5344                         CC_SHARED_OPTS='+Z'
5345                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5346                 fi
5347                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5348                 # HP-UX shared libraries must be executable, and should be
5349                 # readonly to exploit a quirk in the memory manager.
5350                 INSTALL_LIB="-m 555"
5351                 ;;
5352         irix*)
5353                 if test "$cf_cv_ld_rpath" = yes ; then
5354                         if test "$GCC" = yes; then
5355                                 LD_RPATH_OPT="-Wl,-rpath,"
5356                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5357                         else
5358                                 LD_RPATH_OPT="-rpath "
5359                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5360                         fi
5361                 fi
5362                 # tested with IRIX 5.2 and 'cc'.
5363                 if test "$GCC" != yes; then
5364                         CC_SHARED_OPTS='-KPIC'
5365                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5366                 else
5367                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5368                 fi
5369                 cf_cv_rm_so_locs=yes
5370                 ;;
5371         linux*|gnu*|k*bsd*-gnu)
5372                 if test "$DFT_LWR_MODEL" = "shared" ; then
5373                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5374                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5375                 fi
5376                 if test "$cf_cv_ld_rpath" = yes ; then
5377                         LD_RPATH_OPT="-Wl,-rpath,"
5378                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5379                 fi
5380
5381         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5382         if test "$cf_cv_shlib_version" = rel; then
5383                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5384         else
5385                 cf_cv_shared_soname='`basename $@`'
5386         fi
5387
5388                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5389                 ;;
5390         openbsd[2-9].*)
5391                 if test "$DFT_LWR_MODEL" = "shared" ; then
5392                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5393                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5394                 fi
5395                 if test "$cf_cv_ld_rpath" = yes ; then
5396                         LD_RPATH_OPT="-Wl,-rpath,"
5397                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5398                 fi
5399                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5400
5401         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5402         if test "$cf_cv_shlib_version" = rel; then
5403                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5404         else
5405                 cf_cv_shared_soname='`basename $@`'
5406         fi
5407
5408                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5409                 ;;
5410         nto-qnx*|openbsd*|freebsd[12].*)
5411                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5412                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5413                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5414                 ;;
5415         freebsd*)
5416                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5417                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5418                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5419                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5420                         LD_RPATH_OPT="-rpath "
5421                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5422                 fi
5423
5424         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5425         if test "$cf_cv_shlib_version" = rel; then
5426                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5427         else
5428                 cf_cv_shared_soname='`basename $@`'
5429         fi
5430
5431                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5432                 ;;
5433         netbsd*)
5434                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5435                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5436                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5437                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5438                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5439                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5440                         if test "$cf_cv_shlib_version" = auto; then
5441                         if test -f /usr/libexec/ld.elf_so; then
5442                                 cf_cv_shlib_version=abi
5443                         else
5444                                 cf_cv_shlib_version=rel
5445                         fi
5446                         fi
5447
5448         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5449         if test "$cf_cv_shlib_version" = rel; then
5450                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5451         else
5452                 cf_cv_shared_soname='`basename $@`'
5453         fi
5454
5455                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5456                 else
5457                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5458                 fi
5459                 ;;
5460         osf*|mls+*)
5461                 # tested with OSF/1 V3.2 and 'cc'
5462                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5463                 # link with shared libs).
5464                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5465                 case $host_os in
5466                 osf4*)
5467                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5468                         ;;
5469                 esac
5470                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5471                 if test "$DFT_LWR_MODEL" = "shared" ; then
5472                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5473                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5474                 fi
5475                 if test "$cf_cv_ld_rpath" = yes ; then
5476                         LD_RPATH_OPT="-rpath"
5477                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5478                 fi
5479                 cf_cv_rm_so_locs=yes
5480                 ;;
5481         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5482                 # tested with osr5.0.5
5483                 if test "$GCC" != yes; then
5484                         CC_SHARED_OPTS='-belf -KPIC'
5485                 fi
5486                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5487                 if test "$cf_cv_ld_rpath" = yes ; then
5488                         # only way is to set LD_RUN_PATH but no switch for it
5489                         RUN_PATH=$libdir
5490                 fi
5491                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5492                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5493                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5494                 ;;
5495         sunos4*)
5496                 # tested with SunOS 4.1.1 and gcc 2.7.0
5497                 if test "$GCC" != yes; then
5498                         CC_SHARED_OPTS='-KPIC'
5499                 fi
5500                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5501                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5502                 ;;
5503         solaris2*)
5504                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5505                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5506                 if test "$DFT_LWR_MODEL" = "shared" ; then
5507                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5508                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5509                 fi
5510                 if test "$cf_cv_ld_rpath" = yes ; then
5511                         LD_RPATH_OPT="-R"
5512                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5513                 fi
5514
5515         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5516         if test "$cf_cv_shlib_version" = rel; then
5517                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5518         else
5519                 cf_cv_shared_soname='`basename $@`'
5520         fi
5521
5522                 if test "$GCC" != yes; then
5523                         cf_save_CFLAGS="$CFLAGS"
5524                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5525                         do
5526                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5527                                 cat >conftest.$ac_ext <<_ACEOF
5528 #line 5528 "configure"
5529 #include "confdefs.h"
5530 #include <stdio.h>
5531 int
5532 main ()
5533 {
5534 printf("Hello\n");
5535   ;
5536   return 0;
5537 }
5538 _ACEOF
5539 rm -f conftest.$ac_objext
5540 if { (eval echo "$as_me:5540: \"$ac_compile\"") >&5
5541   (eval $ac_compile) 2>&5
5542   ac_status=$?
5543   echo "$as_me:5543: \$? = $ac_status" >&5
5544   (exit $ac_status); } &&
5545          { ac_try='test -s conftest.$ac_objext'
5546   { (eval echo "$as_me:5546: \"$ac_try\"") >&5
5547   (eval $ac_try) 2>&5
5548   ac_status=$?
5549   echo "$as_me:5549: \$? = $ac_status" >&5
5550   (exit $ac_status); }; }; then
5551   break
5552 else
5553   echo "$as_me: failed program was:" >&5
5554 cat conftest.$ac_ext >&5
5555 fi
5556 rm -f conftest.$ac_objext conftest.$ac_ext
5557                         done
5558                         CFLAGS="$cf_save_CFLAGS"
5559                         CC_SHARED_OPTS=$cf_shared_opts
5560                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5561                 else
5562                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5563                 fi
5564                 ;;
5565         sysv5uw7*|unix_sv*)
5566                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5567                 if test "$GCC" != yes; then
5568                         CC_SHARED_OPTS='-KPIC'
5569                 fi
5570                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5571                 ;;
5572         *)
5573                 CC_SHARED_OPTS='unknown'
5574                 MK_SHARED_LIB='echo unknown'
5575                 ;;
5576         esac
5577
5578         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5579         case "$cf_cv_shlib_version" in #(vi
5580         rel|abi)
5581                 case "$MK_SHARED_LIB" in #(vi
5582                 *'-o $@')
5583                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5584                         ;;
5585                 *)
5586                         { echo "$as_me:5586: WARNING: ignored --with-shlib-version" >&5
5587 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5588                         ;;
5589                 esac
5590                 ;;
5591         esac
5592
5593         if test -n "$LD_RPATH_OPT" ; then
5594                 echo "$as_me:5594: checking if we need a space after rpath option" >&5
5595 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5596                 cf_save_LIBS="$LIBS"
5597                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5598                 cat >conftest.$ac_ext <<_ACEOF
5599 #line 5599 "configure"
5600 #include "confdefs.h"
5601
5602 int
5603 main ()
5604 {
5605
5606   ;
5607   return 0;
5608 }
5609 _ACEOF
5610 rm -f conftest.$ac_objext conftest$ac_exeext
5611 if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
5612   (eval $ac_link) 2>&5
5613   ac_status=$?
5614   echo "$as_me:5614: \$? = $ac_status" >&5
5615   (exit $ac_status); } &&
5616          { ac_try='test -s conftest$ac_exeext'
5617   { (eval echo "$as_me:5617: \"$ac_try\"") >&5
5618   (eval $ac_try) 2>&5
5619   ac_status=$?
5620   echo "$as_me:5620: \$? = $ac_status" >&5
5621   (exit $ac_status); }; }; then
5622   cf_rpath_space=no
5623 else
5624   echo "$as_me: failed program was:" >&5
5625 cat conftest.$ac_ext >&5
5626 cf_rpath_space=yes
5627 fi
5628 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5629                 LIBS="$cf_save_LIBS"
5630                 echo "$as_me:5630: result: $cf_rpath_space" >&5
5631 echo "${ECHO_T}$cf_rpath_space" >&6
5632                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5633                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5634         fi
5635
5636 if test "$CC_SHARED_OPTS" = "unknown"; then
5637         for model in $cf_list_models; do
5638                 if test "$model" = "shared"; then
5639                         { { echo "$as_me:5639: error: Shared libraries are not supported in this version" >&5
5640 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5641    { (exit 1); exit 1; }; }
5642                 fi
5643         done
5644 fi
5645
5646 ###############################################################################
5647
5648 ###     use option --disable-overwrite to leave out the link to -lcurses
5649 echo "$as_me:5649: checking if you wish to install ncurses overwriting curses" >&5
5650 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5651
5652 # Check whether --enable-overwrite or --disable-overwrite was given.
5653 if test "${enable_overwrite+set}" = set; then
5654   enableval="$enable_overwrite"
5655   with_overwrite=$enableval
5656 else
5657   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5658 fi;
5659 echo "$as_me:5659: result: $with_overwrite" >&5
5660 echo "${ECHO_T}$with_overwrite" >&6
5661
5662 echo "$as_me:5662: checking if external terminfo-database is used" >&5
5663 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5664
5665 # Check whether --enable-database or --disable-database was given.
5666 if test "${enable_database+set}" = set; then
5667   enableval="$enable_database"
5668   use_database=$enableval
5669 else
5670   use_database=yes
5671 fi;
5672 echo "$as_me:5672: result: $use_database" >&5
5673 echo "${ECHO_T}$use_database" >&6
5674
5675 case $host_os in #(vi
5676 os2*) #(vi
5677         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5678         ;;
5679 *) #(vi
5680         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5681         ;;
5682 esac
5683
5684         case $cf_cv_system_name in
5685         os2*)   PATH_SEPARATOR=';'  ;;
5686         *)      PATH_SEPARATOR=':'  ;;
5687         esac
5688
5689 if test "$use_database" != no ; then
5690         cat >>confdefs.h <<\EOF
5691 #define USE_DATABASE 1
5692 EOF
5693
5694         echo "$as_me:5694: checking which terminfo source-file will be installed" >&5
5695 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5696
5697 # Check whether --with-database or --without-database was given.
5698 if test "${with_database+set}" = set; then
5699   withval="$with_database"
5700   TERMINFO_SRC=$withval
5701 fi;
5702         echo "$as_me:5702: result: $TERMINFO_SRC" >&5
5703 echo "${ECHO_T}$TERMINFO_SRC" >&6
5704
5705         echo "$as_me:5705: checking whether to use hashed database instead of directory/tree" >&5
5706 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5707
5708 # Check whether --with-hashed-db or --without-hashed-db was given.
5709 if test "${with_hashed_db+set}" = set; then
5710   withval="$with_hashed_db"
5711
5712 else
5713   with_hashed_db=no
5714 fi;
5715         echo "$as_me:5715: result: $with_hashed_db" >&5
5716 echo "${ECHO_T}$with_hashed_db" >&6
5717 else
5718         with_hashed_db=no
5719 fi
5720
5721 echo "$as_me:5721: checking for list of fallback descriptions" >&5
5722 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5723
5724 # Check whether --with-fallbacks or --without-fallbacks was given.
5725 if test "${with_fallbacks+set}" = set; then
5726   withval="$with_fallbacks"
5727   with_fallback=$withval
5728 else
5729   with_fallback=
5730 fi;
5731 echo "$as_me:5731: result: $with_fallback" >&5
5732 echo "${ECHO_T}$with_fallback" >&6
5733 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5734
5735 echo "$as_me:5735: checking if you want modern xterm or antique" >&5
5736 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5737
5738 # Check whether --with-xterm-new or --without-xterm-new was given.
5739 if test "${with_xterm_new+set}" = set; then
5740   withval="$with_xterm_new"
5741   with_xterm_new=$withval
5742 else
5743   with_xterm_new=yes
5744 fi;
5745 case $with_xterm_new in
5746 no)     with_xterm_new=xterm-old;;
5747 *)      with_xterm_new=xterm-new;;
5748 esac
5749 echo "$as_me:5749: result: $with_xterm_new" >&5
5750 echo "${ECHO_T}$with_xterm_new" >&6
5751 WHICH_XTERM=$with_xterm_new
5752
5753 MAKE_TERMINFO=
5754 if test "$use_database" = no ; then
5755         TERMINFO="${datadir}/terminfo"
5756         MAKE_TERMINFO="#"
5757 else
5758
5759 echo "$as_me:5759: checking for list of terminfo directories" >&5
5760 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5761
5762 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5763 if test "${with_terminfo_dirs+set}" = set; then
5764   withval="$with_terminfo_dirs"
5765
5766 else
5767   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5768 fi;
5769 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5770 cf_dst_path=
5771 for cf_src_path in $withval
5772 do
5773
5774 if test "x$prefix" != xNONE; then
5775   cf_path_syntax="$prefix"
5776 else
5777   cf_path_syntax="$ac_default_prefix"
5778 fi
5779
5780 case ".$cf_src_path" in #(vi
5781 .\$\(*\)*|.\'*\'*) #(vi
5782   ;;
5783 ..|./*|.\\*) #(vi
5784   ;;
5785 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5786   ;;
5787 .\${*prefix}*) #(vi
5788   eval cf_src_path="$cf_src_path"
5789   case ".$cf_src_path" in #(vi
5790   .NONE/*)
5791     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5792     ;;
5793   esac
5794   ;; #(vi
5795 .no|.NONE/*)
5796   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5797   ;;
5798 *)
5799   { { echo "$as_me:5799: error: expected a pathname, not \"$cf_src_path\"" >&5
5800 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5801    { (exit 1); exit 1; }; }
5802   ;;
5803 esac
5804
5805   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5806   cf_dst_path="${cf_dst_path}${cf_src_path}"
5807 done
5808 IFS="$ac_save_ifs"
5809
5810 eval 'TERMINFO_DIRS="$cf_dst_path"'
5811
5812 echo "$as_me:5812: result: $TERMINFO_DIRS" >&5
5813 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5814 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5815 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5816 EOF
5817
5818 echo "$as_me:5818: checking for default terminfo directory" >&5
5819 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5820
5821 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5822 if test "${with_default_terminfo_dir+set}" = set; then
5823   withval="$with_default_terminfo_dir"
5824
5825 else
5826   withval="${TERMINFO-${datadir}/terminfo}"
5827 fi; if test -n "${datadir}/terminfo" ; then
5828
5829 if test "x$prefix" != xNONE; then
5830   cf_path_syntax="$prefix"
5831 else
5832   cf_path_syntax="$ac_default_prefix"
5833 fi
5834
5835 case ".$withval" in #(vi
5836 .\$\(*\)*|.\'*\'*) #(vi
5837   ;;
5838 ..|./*|.\\*) #(vi
5839   ;;
5840 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5841   ;;
5842 .\${*prefix}*) #(vi
5843   eval withval="$withval"
5844   case ".$withval" in #(vi
5845   .NONE/*)
5846     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5847     ;;
5848   esac
5849   ;; #(vi
5850 .no|.NONE/*)
5851   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5852   ;;
5853 *)
5854   { { echo "$as_me:5854: error: expected a pathname, not \"$withval\"" >&5
5855 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5856    { (exit 1); exit 1; }; }
5857   ;;
5858 esac
5859
5860 fi
5861 TERMINFO="$withval"
5862
5863 echo "$as_me:5863: result: $TERMINFO" >&5
5864 echo "${ECHO_T}$TERMINFO" >&6
5865 cat >>confdefs.h <<EOF
5866 #define TERMINFO "$TERMINFO"
5867 EOF
5868
5869 fi
5870
5871 ###     use option --disable-big-core to make tic run on small machines
5872 ###     We need 4Mb, check if we can allocate 50% more than that.
5873 echo "$as_me:5873: checking if big-core option selected" >&5
5874 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5875
5876 # Check whether --enable-big-core or --disable-big-core was given.
5877 if test "${enable_big_core+set}" = set; then
5878   enableval="$enable_big_core"
5879   with_big_core=$enableval
5880 else
5881   if test "$cross_compiling" = yes; then
5882   with_big_core=no
5883 else
5884   cat >conftest.$ac_ext <<_ACEOF
5885 #line 5885 "configure"
5886 #include "confdefs.h"
5887
5888 #include <stdlib.h>
5889 #include <string.h>
5890 int main() {
5891         unsigned long n = 6000000L;
5892         char *s = malloc(n);
5893         if (s != 0)
5894                 s[0] = s[n-1] = 0;
5895         ${cf_cv_main_return:-return}(s == 0);
5896 }
5897 _ACEOF
5898 rm -f conftest$ac_exeext
5899 if { (eval echo "$as_me:5899: \"$ac_link\"") >&5
5900   (eval $ac_link) 2>&5
5901   ac_status=$?
5902   echo "$as_me:5902: \$? = $ac_status" >&5
5903   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5904   { (eval echo "$as_me:5904: \"$ac_try\"") >&5
5905   (eval $ac_try) 2>&5
5906   ac_status=$?
5907   echo "$as_me:5907: \$? = $ac_status" >&5
5908   (exit $ac_status); }; }; then
5909   with_big_core=yes
5910 else
5911   echo "$as_me: program exited with status $ac_status" >&5
5912 echo "$as_me: failed program was:" >&5
5913 cat conftest.$ac_ext >&5
5914 with_big_core=no
5915 fi
5916 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5917 fi
5918 fi;
5919 echo "$as_me:5919: result: $with_big_core" >&5
5920 echo "${ECHO_T}$with_big_core" >&6
5921 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5922 #define HAVE_BIG_CORE 1
5923 EOF
5924
5925 ### ISO C only guarantees 512-char strings, we have tables which load faster
5926 ### when constructed using "big" strings.  More than the C compiler, the awk
5927 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5928 echo "$as_me:5928: checking if big-strings option selected" >&5
5929 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5930
5931 # Check whether --enable-big-strings or --disable-big-strings was given.
5932 if test "${enable_big_strings+set}" = set; then
5933   enableval="$enable_big_strings"
5934   with_big_strings=$enableval
5935 else
5936
5937         case x$AWK in #(vi
5938         x)
5939                 eval with_big_strings=no
5940                 ;;
5941         *) #(vi
5942                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5943                         | $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
5944                         eval with_big_strings=yes
5945                 else
5946                         eval with_big_strings=no
5947                 fi
5948                 ;;
5949         esac
5950
5951 fi;
5952 echo "$as_me:5952: result: $with_big_strings" >&5
5953 echo "${ECHO_T}$with_big_strings" >&6
5954
5955 USE_BIG_STRINGS=0
5956 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5957
5958 ###     use option --enable-termcap to compile in the termcap fallback support
5959 echo "$as_me:5959: checking if you want termcap-fallback support" >&5
5960 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5961
5962 # Check whether --enable-termcap or --disable-termcap was given.
5963 if test "${enable_termcap+set}" = set; then
5964   enableval="$enable_termcap"
5965   with_termcap=$enableval
5966 else
5967   with_termcap=no
5968 fi;
5969 echo "$as_me:5969: result: $with_termcap" >&5
5970 echo "${ECHO_T}$with_termcap" >&6
5971
5972 if test "$with_termcap" != "yes" ; then
5973         if test "$use_database" = no ; then
5974                 if test -z "$with_fallback" ; then
5975                         { { echo "$as_me:5975: error: You have disabled the database w/o specifying fallbacks" >&5
5976 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5977    { (exit 1); exit 1; }; }
5978                 fi
5979         fi
5980         cat >>confdefs.h <<\EOF
5981 #define PURE_TERMINFO 1
5982 EOF
5983
5984 else
5985
5986 if test "$with_ticlib" != no ; then
5987         { { echo "$as_me:5987: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5988 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5989    { (exit 1); exit 1; }; }
5990 fi
5991
5992 cat >>confdefs.h <<\EOF
5993 #define USE_TERMCAP 1
5994 EOF
5995
5996 echo "$as_me:5996: checking for list of termcap files" >&5
5997 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5998
5999 # Check whether --with-termpath or --without-termpath was given.
6000 if test "${with_termpath+set}" = set; then
6001   withval="$with_termpath"
6002
6003 else
6004   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6005 fi;
6006 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6007 cf_dst_path=
6008 for cf_src_path in $withval
6009 do
6010
6011 if test "x$prefix" != xNONE; then
6012   cf_path_syntax="$prefix"
6013 else
6014   cf_path_syntax="$ac_default_prefix"
6015 fi
6016
6017 case ".$cf_src_path" in #(vi
6018 .\$\(*\)*|.\'*\'*) #(vi
6019   ;;
6020 ..|./*|.\\*) #(vi
6021   ;;
6022 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6023   ;;
6024 .\${*prefix}*) #(vi
6025   eval cf_src_path="$cf_src_path"
6026   case ".$cf_src_path" in #(vi
6027   .NONE/*)
6028     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6029     ;;
6030   esac
6031   ;; #(vi
6032 .no|.NONE/*)
6033   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6034   ;;
6035 *)
6036   { { echo "$as_me:6036: error: expected a pathname, not \"$cf_src_path\"" >&5
6037 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6038    { (exit 1); exit 1; }; }
6039   ;;
6040 esac
6041
6042   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6043   cf_dst_path="${cf_dst_path}${cf_src_path}"
6044 done
6045 IFS="$ac_save_ifs"
6046
6047 eval 'TERMPATH="$cf_dst_path"'
6048
6049 echo "$as_me:6049: result: $TERMPATH" >&5
6050 echo "${ECHO_T}$TERMPATH" >&6
6051 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6052 #define TERMPATH "$TERMPATH"
6053 EOF
6054
6055 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6056 echo "$as_me:6056: checking if fast termcap-loader is needed" >&5
6057 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6058
6059 # Check whether --enable-getcap or --disable-getcap was given.
6060 if test "${enable_getcap+set}" = set; then
6061   enableval="$enable_getcap"
6062   with_getcap=$enableval
6063 else
6064   with_getcap=no
6065 fi;
6066 echo "$as_me:6066: result: $with_getcap" >&5
6067 echo "${ECHO_T}$with_getcap" >&6
6068 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6069 #define USE_GETCAP 1
6070 EOF
6071
6072 echo "$as_me:6072: checking if translated termcaps will be cached in ~/.terminfo" >&5
6073 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6074
6075 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6076 if test "${enable_getcap_cache+set}" = set; then
6077   enableval="$enable_getcap_cache"
6078   with_getcap_cache=$enableval
6079 else
6080   with_getcap_cache=no
6081 fi;
6082 echo "$as_me:6082: result: $with_getcap_cache" >&5
6083 echo "${ECHO_T}$with_getcap_cache" >&6
6084 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6085 #define USE_GETCAP_CACHE 1
6086 EOF
6087
6088 fi
6089
6090 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6091 echo "$as_me:6091: checking if ~/.terminfo is wanted" >&5
6092 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6093
6094 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6095 if test "${enable_home_terminfo+set}" = set; then
6096   enableval="$enable_home_terminfo"
6097   with_home_terminfo=$enableval
6098 else
6099   with_home_terminfo=yes
6100 fi;
6101 echo "$as_me:6101: result: $with_home_terminfo" >&5
6102 echo "${ECHO_T}$with_home_terminfo" >&6
6103 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6104 #define USE_HOME_TERMINFO 1
6105 EOF
6106
6107 echo "$as_me:6107: checking if you want to use restricted environment when running as root" >&5
6108 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6109
6110 # Check whether --enable-root-environ or --disable-root-environ was given.
6111 if test "${enable_root_environ+set}" = set; then
6112   enableval="$enable_root_environ"
6113   with_root_environ=$enableval
6114 else
6115   with_root_environ=yes
6116 fi;
6117 echo "$as_me:6117: result: $with_root_environ" >&5
6118 echo "${ECHO_T}$with_root_environ" >&6
6119 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6120 #define USE_ROOT_ENVIRON 1
6121 EOF
6122
6123 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6124 ###   to reduce storage requirements for the terminfo database.
6125
6126 for ac_func in \
6127         remove \
6128         unlink
6129 do
6130 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6131 echo "$as_me:6131: checking for $ac_func" >&5
6132 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6133 if eval "test \"\${$as_ac_var+set}\" = set"; then
6134   echo $ECHO_N "(cached) $ECHO_C" >&6
6135 else
6136   cat >conftest.$ac_ext <<_ACEOF
6137 #line 6137 "configure"
6138 #include "confdefs.h"
6139 /* System header to define __stub macros and hopefully few prototypes,
6140     which can conflict with char $ac_func (); below.  */
6141 #include <assert.h>
6142 /* Override any gcc2 internal prototype to avoid an error.  */
6143 #ifdef __cplusplus
6144 extern "C"
6145 #endif
6146 /* We use char because int might match the return type of a gcc2
6147    builtin and then its argument prototype would still apply.  */
6148 char $ac_func ();
6149 char (*f) ();
6150
6151 int
6152 main ()
6153 {
6154 /* The GNU C library defines this for functions which it implements
6155     to always fail with ENOSYS.  Some functions are actually named
6156     something starting with __ and the normal name is an alias.  */
6157 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6158 choke me
6159 #else
6160 f = $ac_func;
6161 #endif
6162
6163   ;
6164   return 0;
6165 }
6166 _ACEOF
6167 rm -f conftest.$ac_objext conftest$ac_exeext
6168 if { (eval echo "$as_me:6168: \"$ac_link\"") >&5
6169   (eval $ac_link) 2>&5
6170   ac_status=$?
6171   echo "$as_me:6171: \$? = $ac_status" >&5
6172   (exit $ac_status); } &&
6173          { ac_try='test -s conftest$ac_exeext'
6174   { (eval echo "$as_me:6174: \"$ac_try\"") >&5
6175   (eval $ac_try) 2>&5
6176   ac_status=$?
6177   echo "$as_me:6177: \$? = $ac_status" >&5
6178   (exit $ac_status); }; }; then
6179   eval "$as_ac_var=yes"
6180 else
6181   echo "$as_me: failed program was:" >&5
6182 cat conftest.$ac_ext >&5
6183 eval "$as_ac_var=no"
6184 fi
6185 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6186 fi
6187 echo "$as_me:6187: result: `eval echo '${'$as_ac_var'}'`" >&5
6188 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6189 if test `eval echo '${'$as_ac_var'}'` = yes; then
6190   cat >>confdefs.h <<EOF
6191 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6192 EOF
6193
6194 fi
6195 done
6196
6197 if test "$cross_compiling" = yes ; then
6198
6199 for ac_func in \
6200                 link \
6201                 symlink
6202 do
6203 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6204 echo "$as_me:6204: checking for $ac_func" >&5
6205 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6206 if eval "test \"\${$as_ac_var+set}\" = set"; then
6207   echo $ECHO_N "(cached) $ECHO_C" >&6
6208 else
6209   cat >conftest.$ac_ext <<_ACEOF
6210 #line 6210 "configure"
6211 #include "confdefs.h"
6212 /* System header to define __stub macros and hopefully few prototypes,
6213     which can conflict with char $ac_func (); below.  */
6214 #include <assert.h>
6215 /* Override any gcc2 internal prototype to avoid an error.  */
6216 #ifdef __cplusplus
6217 extern "C"
6218 #endif
6219 /* We use char because int might match the return type of a gcc2
6220    builtin and then its argument prototype would still apply.  */
6221 char $ac_func ();
6222 char (*f) ();
6223
6224 int
6225 main ()
6226 {
6227 /* The GNU C library defines this for functions which it implements
6228     to always fail with ENOSYS.  Some functions are actually named
6229     something starting with __ and the normal name is an alias.  */
6230 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6231 choke me
6232 #else
6233 f = $ac_func;
6234 #endif
6235
6236   ;
6237   return 0;
6238 }
6239 _ACEOF
6240 rm -f conftest.$ac_objext conftest$ac_exeext
6241 if { (eval echo "$as_me:6241: \"$ac_link\"") >&5
6242   (eval $ac_link) 2>&5
6243   ac_status=$?
6244   echo "$as_me:6244: \$? = $ac_status" >&5
6245   (exit $ac_status); } &&
6246          { ac_try='test -s conftest$ac_exeext'
6247   { (eval echo "$as_me:6247: \"$ac_try\"") >&5
6248   (eval $ac_try) 2>&5
6249   ac_status=$?
6250   echo "$as_me:6250: \$? = $ac_status" >&5
6251   (exit $ac_status); }; }; then
6252   eval "$as_ac_var=yes"
6253 else
6254   echo "$as_me: failed program was:" >&5
6255 cat conftest.$ac_ext >&5
6256 eval "$as_ac_var=no"
6257 fi
6258 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6259 fi
6260 echo "$as_me:6260: result: `eval echo '${'$as_ac_var'}'`" >&5
6261 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6262 if test `eval echo '${'$as_ac_var'}'` = yes; then
6263   cat >>confdefs.h <<EOF
6264 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6265 EOF
6266
6267 fi
6268 done
6269
6270 else
6271         echo "$as_me:6271: checking if link/symlink functions work" >&5
6272 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6273 if test "${cf_cv_link_funcs+set}" = set; then
6274   echo $ECHO_N "(cached) $ECHO_C" >&6
6275 else
6276
6277                 cf_cv_link_funcs=
6278                 for cf_func in link symlink ; do
6279                         if test "$cross_compiling" = yes; then
6280
6281                         eval 'ac_cv_func_'$cf_func'=error'
6282 else
6283   cat >conftest.$ac_ext <<_ACEOF
6284 #line 6284 "configure"
6285 #include "confdefs.h"
6286
6287 #include <sys/types.h>
6288 #include <sys/stat.h>
6289 #ifdef HAVE_UNISTD_H
6290 #include <unistd.h>
6291 #endif
6292 int main()
6293 {
6294         int fail = 0;
6295         char *src = "config.log";
6296         char *dst = "conftest.chk";
6297         struct stat src_sb;
6298         struct stat dst_sb;
6299
6300         stat(src, &src_sb);
6301         fail = ($cf_func("config.log", "conftest.chk") < 0)
6302             || (stat(dst, &dst_sb) < 0)
6303             || (dst_sb.st_mtime != src_sb.st_mtime);
6304 #ifdef HAVE_UNLINK
6305         unlink(dst);
6306 #else
6307         remove(dst);
6308 #endif
6309         ${cf_cv_main_return:-return} (fail);
6310 }
6311
6312 _ACEOF
6313 rm -f conftest$ac_exeext
6314 if { (eval echo "$as_me:6314: \"$ac_link\"") >&5
6315   (eval $ac_link) 2>&5
6316   ac_status=$?
6317   echo "$as_me:6317: \$? = $ac_status" >&5
6318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6319   { (eval echo "$as_me:6319: \"$ac_try\"") >&5
6320   (eval $ac_try) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit $ac_status); }; }; then
6324
6325                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6326                         eval 'ac_cv_func_'$cf_func'=yes'
6327 else
6328   echo "$as_me: program exited with status $ac_status" >&5
6329 echo "$as_me: failed program was:" >&5
6330 cat conftest.$ac_ext >&5
6331
6332                         eval 'ac_cv_func_'$cf_func'=no'
6333 fi
6334 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6335 fi
6336                 done
6337                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6338
6339 fi
6340 echo "$as_me:6340: result: $cf_cv_link_funcs" >&5
6341 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6342         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6343 #define HAVE_LINK 1
6344 EOF
6345
6346         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6347 #define HAVE_SYMLINK 1
6348 EOF
6349
6350 fi
6351
6352 with_links=no
6353 with_symlinks=no
6354
6355 # soft links (symbolic links) are useful for some systems where hard links do
6356 # not work, or to make it simpler to copy terminfo trees around.
6357 if test "$ac_cv_func_symlink" = yes ; then
6358     echo "$as_me:6358: checking if tic should use symbolic links" >&5
6359 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6360
6361 # Check whether --enable-symlinks or --disable-symlinks was given.
6362 if test "${enable_symlinks+set}" = set; then
6363   enableval="$enable_symlinks"
6364   with_symlinks=$enableval
6365 else
6366   with_symlinks=no
6367 fi;
6368     echo "$as_me:6368: result: $with_symlinks" >&5
6369 echo "${ECHO_T}$with_symlinks" >&6
6370 fi
6371
6372 # If we have hard links and did not choose to use soft links instead, there is
6373 # no reason to make this choice optional - use the hard links.
6374 if test "$with_symlinks" = no ; then
6375     echo "$as_me:6375: checking if tic should use hard links" >&5
6376 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6377     if test "$ac_cv_func_link" = yes ; then
6378         with_links=yes
6379     else
6380         with_links=no
6381     fi
6382     echo "$as_me:6382: result: $with_links" >&5
6383 echo "${ECHO_T}$with_links" >&6
6384 fi
6385
6386 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6387 #define USE_LINKS 1
6388 EOF
6389
6390 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6391 #define USE_SYMLINKS 1
6392 EOF
6393
6394 ###   use option --enable-broken-linker to force on use of broken-linker support
6395 echo "$as_me:6395: checking if you want broken-linker support code" >&5
6396 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6397
6398 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6399 if test "${enable_broken_linker+set}" = set; then
6400   enableval="$enable_broken_linker"
6401   with_broken_linker=$enableval
6402 else
6403   with_broken_linker=${BROKEN_LINKER-no}
6404 fi;
6405 echo "$as_me:6405: result: $with_broken_linker" >&5
6406 echo "${ECHO_T}$with_broken_linker" >&6
6407
6408 BROKEN_LINKER=0
6409 if test "$with_broken_linker" = yes ; then
6410         cat >>confdefs.h <<\EOF
6411 #define BROKEN_LINKER 1
6412 EOF
6413
6414         BROKEN_LINKER=1
6415 elif test "$DFT_LWR_MODEL" = shared ; then
6416         case $cf_cv_system_name in #(vi
6417         cygwin*)
6418                 cat >>confdefs.h <<\EOF
6419 #define BROKEN_LINKER 1
6420 EOF
6421
6422                 BROKEN_LINKER=1
6423                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6424
6425 echo "${as_me-configure}:6425: testing cygwin linker is broken anyway ..." 1>&5
6426
6427                 ;;
6428         esac
6429 fi
6430
6431 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6432 echo "$as_me:6432: checking if tputs should process BSD-style prefix padding" >&5
6433 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6434
6435 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6436 if test "${enable_bsdpad+set}" = set; then
6437   enableval="$enable_bsdpad"
6438   with_bsdpad=$enableval
6439 else
6440   with_bsdpad=no
6441 fi;
6442 echo "$as_me:6442: result: $with_bsdpad" >&5
6443 echo "${ECHO_T}$with_bsdpad" >&6
6444 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6445 #define BSD_TPUTS 1
6446 EOF
6447
6448 ###   use option --enable-widec to turn on use of wide-character support
6449 NCURSES_CH_T=chtype
6450 NCURSES_LIBUTF8=0
6451
6452 NEED_WCHAR_H=0
6453 NCURSES_MBSTATE_T=0
6454 NCURSES_WCHAR_T=0
6455 NCURSES_WINT_T=0
6456
6457 # Check to define _XOPEN_SOURCE "automatically"
6458
6459 echo "$as_me:6459: checking if $CC -U and -D options work together" >&5
6460 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6461 if test "${cf_cv_cc_u_d_options+set}" = set; then
6462   echo $ECHO_N "(cached) $ECHO_C" >&6
6463 else
6464
6465         cf_save_CPPFLAGS="$CPPFLAGS"
6466         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6467         cat >conftest.$ac_ext <<_ACEOF
6468 #line 6468 "configure"
6469 #include "confdefs.h"
6470
6471 int
6472 main ()
6473 {
6474
6475 #ifndef U_D_OPTIONS
6476 make an undefined-error
6477 #endif
6478 #ifdef  D_U_OPTIONS
6479 make a defined-error
6480 #endif
6481
6482   ;
6483   return 0;
6484 }
6485 _ACEOF
6486 rm -f conftest.$ac_objext
6487 if { (eval echo "$as_me:6487: \"$ac_compile\"") >&5
6488   (eval $ac_compile) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); } &&
6492          { ac_try='test -s conftest.$ac_objext'
6493   { (eval echo "$as_me:6493: \"$ac_try\"") >&5
6494   (eval $ac_try) 2>&5
6495   ac_status=$?
6496   echo "$as_me:6496: \$? = $ac_status" >&5
6497   (exit $ac_status); }; }; then
6498
6499         cf_cv_cc_u_d_options=yes
6500 else
6501   echo "$as_me: failed program was:" >&5
6502 cat conftest.$ac_ext >&5
6503
6504         cf_cv_cc_u_d_options=no
6505 fi
6506 rm -f conftest.$ac_objext conftest.$ac_ext
6507         CPPFLAGS="$cf_save_CPPFLAGS"
6508
6509 fi
6510 echo "$as_me:6510: result: $cf_cv_cc_u_d_options" >&5
6511 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6512
6513 cf_XOPEN_SOURCE=500
6514 cf_POSIX_C_SOURCE=199506L
6515
6516 case $host_os in #(vi
6517 aix[456]*) #(vi
6518         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6519         ;;
6520 freebsd*|dragonfly*) #(vi
6521         # 5.x headers associate
6522         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6523         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6524         cf_POSIX_C_SOURCE=200112L
6525         cf_XOPEN_SOURCE=600
6526         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6527         ;;
6528 hpux11*) #(vi
6529         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6530         ;;
6531 hpux*) #(vi
6532         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6533         ;;
6534 irix[56].*) #(vi
6535         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6536         ;;
6537 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6538
6539 echo "$as_me:6539: checking if we must define _GNU_SOURCE" >&5
6540 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6541 if test "${cf_cv_gnu_source+set}" = set; then
6542   echo $ECHO_N "(cached) $ECHO_C" >&6
6543 else
6544
6545 cat >conftest.$ac_ext <<_ACEOF
6546 #line 6546 "configure"
6547 #include "confdefs.h"
6548 #include <sys/types.h>
6549 int
6550 main ()
6551 {
6552
6553 #ifndef _XOPEN_SOURCE
6554 make an error
6555 #endif
6556   ;
6557   return 0;
6558 }
6559 _ACEOF
6560 rm -f conftest.$ac_objext
6561 if { (eval echo "$as_me:6561: \"$ac_compile\"") >&5
6562   (eval $ac_compile) 2>&5
6563   ac_status=$?
6564   echo "$as_me:6564: \$? = $ac_status" >&5
6565   (exit $ac_status); } &&
6566          { ac_try='test -s conftest.$ac_objext'
6567   { (eval echo "$as_me:6567: \"$ac_try\"") >&5
6568   (eval $ac_try) 2>&5
6569   ac_status=$?
6570   echo "$as_me:6570: \$? = $ac_status" >&5
6571   (exit $ac_status); }; }; then
6572   cf_cv_gnu_source=no
6573 else
6574   echo "$as_me: failed program was:" >&5
6575 cat conftest.$ac_ext >&5
6576 cf_save="$CPPFLAGS"
6577          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6578          cat >conftest.$ac_ext <<_ACEOF
6579 #line 6579 "configure"
6580 #include "confdefs.h"
6581 #include <sys/types.h>
6582 int
6583 main ()
6584 {
6585
6586 #ifdef _XOPEN_SOURCE
6587 make an error
6588 #endif
6589   ;
6590   return 0;
6591 }
6592 _ACEOF
6593 rm -f conftest.$ac_objext
6594 if { (eval echo "$as_me:6594: \"$ac_compile\"") >&5
6595   (eval $ac_compile) 2>&5
6596   ac_status=$?
6597   echo "$as_me:6597: \$? = $ac_status" >&5
6598   (exit $ac_status); } &&
6599          { ac_try='test -s conftest.$ac_objext'
6600   { (eval echo "$as_me:6600: \"$ac_try\"") >&5
6601   (eval $ac_try) 2>&5
6602   ac_status=$?
6603   echo "$as_me:6603: \$? = $ac_status" >&5
6604   (exit $ac_status); }; }; then
6605   cf_cv_gnu_source=no
6606 else
6607   echo "$as_me: failed program was:" >&5
6608 cat conftest.$ac_ext >&5
6609 cf_cv_gnu_source=yes
6610 fi
6611 rm -f conftest.$ac_objext conftest.$ac_ext
6612         CPPFLAGS="$cf_save"
6613
6614 fi
6615 rm -f conftest.$ac_objext conftest.$ac_ext
6616
6617 fi
6618 echo "$as_me:6618: result: $cf_cv_gnu_source" >&5
6619 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6620 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6621
6622         ;;
6623 mirbsd*) #(vi
6624         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6625         ;;
6626 netbsd*) #(vi
6627         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6628         ;;
6629 openbsd*) #(vi
6630         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6631         ;;
6632 osf[45]*) #(vi
6633         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6634         ;;
6635 nto-qnx*) #(vi
6636         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6637         ;;
6638 sco*) #(vi
6639         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6640         ;;
6641 solaris*) #(vi
6642         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6643         ;;
6644 *)
6645         echo "$as_me:6645: checking if we should define _XOPEN_SOURCE" >&5
6646 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6647 if test "${cf_cv_xopen_source+set}" = set; then
6648   echo $ECHO_N "(cached) $ECHO_C" >&6
6649 else
6650
6651         cat >conftest.$ac_ext <<_ACEOF
6652 #line 6652 "configure"
6653 #include "confdefs.h"
6654 #include <sys/types.h>
6655 int
6656 main ()
6657 {
6658
6659 #ifndef _XOPEN_SOURCE
6660 make an error
6661 #endif
6662   ;
6663   return 0;
6664 }
6665 _ACEOF
6666 rm -f conftest.$ac_objext
6667 if { (eval echo "$as_me:6667: \"$ac_compile\"") >&5
6668   (eval $ac_compile) 2>&5
6669   ac_status=$?
6670   echo "$as_me:6670: \$? = $ac_status" >&5
6671   (exit $ac_status); } &&
6672          { ac_try='test -s conftest.$ac_objext'
6673   { (eval echo "$as_me:6673: \"$ac_try\"") >&5
6674   (eval $ac_try) 2>&5
6675   ac_status=$?
6676   echo "$as_me:6676: \$? = $ac_status" >&5
6677   (exit $ac_status); }; }; then
6678   cf_cv_xopen_source=no
6679 else
6680   echo "$as_me: failed program was:" >&5
6681 cat conftest.$ac_ext >&5
6682 cf_save="$CPPFLAGS"
6683          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6684          cat >conftest.$ac_ext <<_ACEOF
6685 #line 6685 "configure"
6686 #include "confdefs.h"
6687 #include <sys/types.h>
6688 int
6689 main ()
6690 {
6691
6692 #ifdef _XOPEN_SOURCE
6693 make an error
6694 #endif
6695   ;
6696   return 0;
6697 }
6698 _ACEOF
6699 rm -f conftest.$ac_objext
6700 if { (eval echo "$as_me:6700: \"$ac_compile\"") >&5
6701   (eval $ac_compile) 2>&5
6702   ac_status=$?
6703   echo "$as_me:6703: \$? = $ac_status" >&5
6704   (exit $ac_status); } &&
6705          { ac_try='test -s conftest.$ac_objext'
6706   { (eval echo "$as_me:6706: \"$ac_try\"") >&5
6707   (eval $ac_try) 2>&5
6708   ac_status=$?
6709   echo "$as_me:6709: \$? = $ac_status" >&5
6710   (exit $ac_status); }; }; then
6711   cf_cv_xopen_source=no
6712 else
6713   echo "$as_me: failed program was:" >&5
6714 cat conftest.$ac_ext >&5
6715 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6716 fi
6717 rm -f conftest.$ac_objext conftest.$ac_ext
6718         CPPFLAGS="$cf_save"
6719
6720 fi
6721 rm -f conftest.$ac_objext conftest.$ac_ext
6722
6723 fi
6724 echo "$as_me:6724: result: $cf_cv_xopen_source" >&5
6725 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6726         if test "$cf_cv_xopen_source" != no ; then
6727
6728 # remove _XOPEN_SOURCE symbol from $CFLAGS
6729 CFLAGS=`echo "$CFLAGS" | \
6730         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6731                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6732
6733 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6734 CPPFLAGS=`echo "$CPPFLAGS" | \
6735         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6736                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6737
6738                 test "$cf_cv_cc_u_d_options" = yes && \
6739                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6740                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6741         fi
6742
6743 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6744
6745 cf_save_CFLAGS="$CFLAGS"
6746 cf_save_CPPFLAGS="$CPPFLAGS"
6747
6748 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6749 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6750         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6751                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6752
6753 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6754 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6755         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6756                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6757
6758 echo "$as_me:6758: checking if we should define _POSIX_C_SOURCE" >&5
6759 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6760 if test "${cf_cv_posix_c_source+set}" = set; then
6761   echo $ECHO_N "(cached) $ECHO_C" >&6
6762 else
6763
6764 echo "${as_me-configure}:6764: testing if the symbol is already defined go no further ..." 1>&5
6765
6766         cat >conftest.$ac_ext <<_ACEOF
6767 #line 6767 "configure"
6768 #include "confdefs.h"
6769 #include <sys/types.h>
6770 int
6771 main ()
6772 {
6773
6774 #ifndef _POSIX_C_SOURCE
6775 make an error
6776 #endif
6777   ;
6778   return 0;
6779 }
6780 _ACEOF
6781 rm -f conftest.$ac_objext
6782 if { (eval echo "$as_me:6782: \"$ac_compile\"") >&5
6783   (eval $ac_compile) 2>&5
6784   ac_status=$?
6785   echo "$as_me:6785: \$? = $ac_status" >&5
6786   (exit $ac_status); } &&
6787          { ac_try='test -s conftest.$ac_objext'
6788   { (eval echo "$as_me:6788: \"$ac_try\"") >&5
6789   (eval $ac_try) 2>&5
6790   ac_status=$?
6791   echo "$as_me:6791: \$? = $ac_status" >&5
6792   (exit $ac_status); }; }; then
6793   cf_cv_posix_c_source=no
6794 else
6795   echo "$as_me: failed program was:" >&5
6796 cat conftest.$ac_ext >&5
6797 cf_want_posix_source=no
6798          case .$cf_POSIX_C_SOURCE in #(vi
6799          .[12]??*) #(vi
6800                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6801                 ;;
6802          .2) #(vi
6803                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6804                 cf_want_posix_source=yes
6805                 ;;
6806          .*)
6807                 cf_want_posix_source=yes
6808                 ;;
6809          esac
6810          if test "$cf_want_posix_source" = yes ; then
6811                 cat >conftest.$ac_ext <<_ACEOF
6812 #line 6812 "configure"
6813 #include "confdefs.h"
6814 #include <sys/types.h>
6815 int
6816 main ()
6817 {
6818
6819 #ifdef _POSIX_SOURCE
6820 make an error
6821 #endif
6822   ;
6823   return 0;
6824 }
6825 _ACEOF
6826 rm -f conftest.$ac_objext
6827 if { (eval echo "$as_me:6827: \"$ac_compile\"") >&5
6828   (eval $ac_compile) 2>&5
6829   ac_status=$?
6830   echo "$as_me:6830: \$? = $ac_status" >&5
6831   (exit $ac_status); } &&
6832          { ac_try='test -s conftest.$ac_objext'
6833   { (eval echo "$as_me:6833: \"$ac_try\"") >&5
6834   (eval $ac_try) 2>&5
6835   ac_status=$?
6836   echo "$as_me:6836: \$? = $ac_status" >&5
6837   (exit $ac_status); }; }; then
6838   :
6839 else
6840   echo "$as_me: failed program was:" >&5
6841 cat conftest.$ac_ext >&5
6842 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6843 fi
6844 rm -f conftest.$ac_objext conftest.$ac_ext
6845          fi
6846
6847 echo "${as_me-configure}:6847: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6848
6849          CFLAGS="$cf_trim_CFLAGS"
6850          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6851
6852 echo "${as_me-configure}:6852: testing if the second compile does not leave our definition intact error ..." 1>&5
6853
6854          cat >conftest.$ac_ext <<_ACEOF
6855 #line 6855 "configure"
6856 #include "confdefs.h"
6857 #include <sys/types.h>
6858 int
6859 main ()
6860 {
6861
6862 #ifndef _POSIX_C_SOURCE
6863 make an error
6864 #endif
6865   ;
6866   return 0;
6867 }
6868 _ACEOF
6869 rm -f conftest.$ac_objext
6870 if { (eval echo "$as_me:6870: \"$ac_compile\"") >&5
6871   (eval $ac_compile) 2>&5
6872   ac_status=$?
6873   echo "$as_me:6873: \$? = $ac_status" >&5
6874   (exit $ac_status); } &&
6875          { ac_try='test -s conftest.$ac_objext'
6876   { (eval echo "$as_me:6876: \"$ac_try\"") >&5
6877   (eval $ac_try) 2>&5
6878   ac_status=$?
6879   echo "$as_me:6879: \$? = $ac_status" >&5
6880   (exit $ac_status); }; }; then
6881   :
6882 else
6883   echo "$as_me: failed program was:" >&5
6884 cat conftest.$ac_ext >&5
6885 cf_cv_posix_c_source=no
6886 fi
6887 rm -f conftest.$ac_objext conftest.$ac_ext
6888          CFLAGS="$cf_save_CFLAGS"
6889          CPPFLAGS="$cf_save_CPPFLAGS"
6890
6891 fi
6892 rm -f conftest.$ac_objext conftest.$ac_ext
6893
6894 fi
6895 echo "$as_me:6895: result: $cf_cv_posix_c_source" >&5
6896 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6897
6898 if test "$cf_cv_posix_c_source" != no ; then
6899         CFLAGS="$cf_trim_CFLAGS"
6900         CPPFLAGS="$cf_trim_CPPFLAGS"
6901         if test "$cf_cv_cc_u_d_options" = yes ; then
6902                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6903                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6904                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6905         fi
6906         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6907 fi
6908
6909         ;;
6910 esac
6911
6912 # Work around breakage on OS X
6913
6914 echo "$as_me:6914: checking if SIGWINCH is defined" >&5
6915 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6916 if test "${cf_cv_define_sigwinch+set}" = set; then
6917   echo $ECHO_N "(cached) $ECHO_C" >&6
6918 else
6919
6920         cat >conftest.$ac_ext <<_ACEOF
6921 #line 6921 "configure"
6922 #include "confdefs.h"
6923
6924 #include <sys/types.h>
6925 #include <sys/signal.h>
6926
6927 int
6928 main ()
6929 {
6930 int x = SIGWINCH
6931   ;
6932   return 0;
6933 }
6934 _ACEOF
6935 rm -f conftest.$ac_objext
6936 if { (eval echo "$as_me:6936: \"$ac_compile\"") >&5
6937   (eval $ac_compile) 2>&5
6938   ac_status=$?
6939   echo "$as_me:6939: \$? = $ac_status" >&5
6940   (exit $ac_status); } &&
6941          { ac_try='test -s conftest.$ac_objext'
6942   { (eval echo "$as_me:6942: \"$ac_try\"") >&5
6943   (eval $ac_try) 2>&5
6944   ac_status=$?
6945   echo "$as_me:6945: \$? = $ac_status" >&5
6946   (exit $ac_status); }; }; then
6947   cf_cv_define_sigwinch=yes
6948 else
6949   echo "$as_me: failed program was:" >&5
6950 cat conftest.$ac_ext >&5
6951 cat >conftest.$ac_ext <<_ACEOF
6952 #line 6952 "configure"
6953 #include "confdefs.h"
6954
6955 #undef _XOPEN_SOURCE
6956 #undef _POSIX_SOURCE
6957 #undef _POSIX_C_SOURCE
6958 #include <sys/types.h>
6959 #include <sys/signal.h>
6960
6961 int
6962 main ()
6963 {
6964 int x = SIGWINCH
6965   ;
6966   return 0;
6967 }
6968 _ACEOF
6969 rm -f conftest.$ac_objext
6970 if { (eval echo "$as_me:6970: \"$ac_compile\"") >&5
6971   (eval $ac_compile) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); } &&
6975          { ac_try='test -s conftest.$ac_objext'
6976   { (eval echo "$as_me:6976: \"$ac_try\"") >&5
6977   (eval $ac_try) 2>&5
6978   ac_status=$?
6979   echo "$as_me:6979: \$? = $ac_status" >&5
6980   (exit $ac_status); }; }; then
6981   cf_cv_define_sigwinch=maybe
6982 else
6983   echo "$as_me: failed program was:" >&5
6984 cat conftest.$ac_ext >&5
6985 cf_cv_define_sigwinch=no
6986 fi
6987 rm -f conftest.$ac_objext conftest.$ac_ext
6988
6989 fi
6990 rm -f conftest.$ac_objext conftest.$ac_ext
6991
6992 fi
6993 echo "$as_me:6993: result: $cf_cv_define_sigwinch" >&5
6994 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6995
6996 if test "$cf_cv_define_sigwinch" = maybe ; then
6997 echo "$as_me:6997: checking for actual SIGWINCH definition" >&5
6998 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6999 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7000   echo $ECHO_N "(cached) $ECHO_C" >&6
7001 else
7002
7003 cf_cv_fixup_sigwinch=unknown
7004 cf_sigwinch=32
7005 while test $cf_sigwinch != 1
7006 do
7007         cat >conftest.$ac_ext <<_ACEOF
7008 #line 7008 "configure"
7009 #include "confdefs.h"
7010
7011 #undef _XOPEN_SOURCE
7012 #undef _POSIX_SOURCE
7013 #undef _POSIX_C_SOURCE
7014 #include <sys/types.h>
7015 #include <sys/signal.h>
7016
7017 int
7018 main ()
7019 {
7020
7021 #if SIGWINCH != $cf_sigwinch
7022 make an error
7023 #endif
7024 int x = SIGWINCH
7025   ;
7026   return 0;
7027 }
7028 _ACEOF
7029 rm -f conftest.$ac_objext
7030 if { (eval echo "$as_me:7030: \"$ac_compile\"") >&5
7031   (eval $ac_compile) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); } &&
7035          { ac_try='test -s conftest.$ac_objext'
7036   { (eval echo "$as_me:7036: \"$ac_try\"") >&5
7037   (eval $ac_try) 2>&5
7038   ac_status=$?
7039   echo "$as_me:7039: \$? = $ac_status" >&5
7040   (exit $ac_status); }; }; then
7041   cf_cv_fixup_sigwinch=$cf_sigwinch
7042          break
7043 else
7044   echo "$as_me: failed program was:" >&5
7045 cat conftest.$ac_ext >&5
7046 fi
7047 rm -f conftest.$ac_objext conftest.$ac_ext
7048
7049 cf_sigwinch=`expr $cf_sigwinch - 1`
7050 done
7051
7052 fi
7053 echo "$as_me:7053: result: $cf_cv_fixup_sigwinch" >&5
7054 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7055
7056         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7057                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7058         fi
7059 fi
7060
7061 # Checks for CODESET support.
7062
7063   echo "$as_me:7063: checking for nl_langinfo and CODESET" >&5
7064 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7065 if test "${am_cv_langinfo_codeset+set}" = set; then
7066   echo $ECHO_N "(cached) $ECHO_C" >&6
7067 else
7068   cat >conftest.$ac_ext <<_ACEOF
7069 #line 7069 "configure"
7070 #include "confdefs.h"
7071 #include <langinfo.h>
7072 int
7073 main ()
7074 {
7075 char* cs = nl_langinfo(CODESET);
7076   ;
7077   return 0;
7078 }
7079 _ACEOF
7080 rm -f conftest.$ac_objext conftest$ac_exeext
7081 if { (eval echo "$as_me:7081: \"$ac_link\"") >&5
7082   (eval $ac_link) 2>&5
7083   ac_status=$?
7084   echo "$as_me:7084: \$? = $ac_status" >&5
7085   (exit $ac_status); } &&
7086          { ac_try='test -s conftest$ac_exeext'
7087   { (eval echo "$as_me:7087: \"$ac_try\"") >&5
7088   (eval $ac_try) 2>&5
7089   ac_status=$?
7090   echo "$as_me:7090: \$? = $ac_status" >&5
7091   (exit $ac_status); }; }; then
7092   am_cv_langinfo_codeset=yes
7093 else
7094   echo "$as_me: failed program was:" >&5
7095 cat conftest.$ac_ext >&5
7096 am_cv_langinfo_codeset=no
7097 fi
7098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7099
7100 fi
7101 echo "$as_me:7101: result: $am_cv_langinfo_codeset" >&5
7102 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7103   if test $am_cv_langinfo_codeset = yes; then
7104
7105 cat >>confdefs.h <<\EOF
7106 #define HAVE_LANGINFO_CODESET 1
7107 EOF
7108
7109   fi
7110
7111 # use these variables to work around a defect in gcc's fixincludes.
7112 NCURSES_OK_WCHAR_T=
7113 NCURSES_OK_WINT_T=
7114
7115 echo "$as_me:7115: checking if you want wide-character code" >&5
7116 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7117
7118 # Check whether --enable-widec or --disable-widec was given.
7119 if test "${enable_widec+set}" = set; then
7120   enableval="$enable_widec"
7121   with_widec=$enableval
7122 else
7123   with_widec=no
7124 fi;
7125 echo "$as_me:7125: result: $with_widec" >&5
7126 echo "${ECHO_T}$with_widec" >&6
7127 if test "$with_widec" = yes ; then
7128         LIB_SUFFIX="w${LIB_SUFFIX}"
7129         cat >>confdefs.h <<\EOF
7130 #define USE_WIDEC_SUPPORT 1
7131 EOF
7132
7133 echo "$as_me:7133: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7134 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7135 cat >conftest.$ac_ext <<_ACEOF
7136 #line 7136 "configure"
7137 #include "confdefs.h"
7138 #include <sys/types.h>
7139
7140 int
7141 main ()
7142 {
7143
7144 #ifndef _XOPEN_SOURCE_EXTENDED
7145 make an error
7146 #endif
7147   ;
7148   return 0;
7149 }
7150 _ACEOF
7151 rm -f conftest.$ac_objext
7152 if { (eval echo "$as_me:7152: \"$ac_compile\"") >&5
7153   (eval $ac_compile) 2>&5
7154   ac_status=$?
7155   echo "$as_me:7155: \$? = $ac_status" >&5
7156   (exit $ac_status); } &&
7157          { ac_try='test -s conftest.$ac_objext'
7158   { (eval echo "$as_me:7158: \"$ac_try\"") >&5
7159   (eval $ac_try) 2>&5
7160   ac_status=$?
7161   echo "$as_me:7161: \$? = $ac_status" >&5
7162   (exit $ac_status); }; }; then
7163   cf_result=no
7164 else
7165   echo "$as_me: failed program was:" >&5
7166 cat conftest.$ac_ext >&5
7167 cf_result=yes
7168 fi
7169 rm -f conftest.$ac_objext conftest.$ac_ext
7170 echo "$as_me:7170: result: $cf_result" >&5
7171 echo "${ECHO_T}$cf_result" >&6
7172
7173 if test "$cf_result" = yes ; then
7174         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7175 elif test "x" != "x" ; then
7176         echo "$as_me:7176: checking checking for compatible value versus " >&5
7177 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7178         cat >conftest.$ac_ext <<_ACEOF
7179 #line 7179 "configure"
7180 #include "confdefs.h"
7181 #include <sys/types.h>
7182
7183 int
7184 main ()
7185 {
7186
7187 #if _XOPEN_SOURCE_EXTENDED- < 0
7188 make an error
7189 #endif
7190   ;
7191   return 0;
7192 }
7193 _ACEOF
7194 rm -f conftest.$ac_objext
7195 if { (eval echo "$as_me:7195: \"$ac_compile\"") >&5
7196   (eval $ac_compile) 2>&5
7197   ac_status=$?
7198   echo "$as_me:7198: \$? = $ac_status" >&5
7199   (exit $ac_status); } &&
7200          { ac_try='test -s conftest.$ac_objext'
7201   { (eval echo "$as_me:7201: \"$ac_try\"") >&5
7202   (eval $ac_try) 2>&5
7203   ac_status=$?
7204   echo "$as_me:7204: \$? = $ac_status" >&5
7205   (exit $ac_status); }; }; then
7206   cf_result=yes
7207 else
7208   echo "$as_me: failed program was:" >&5
7209 cat conftest.$ac_ext >&5
7210 cf_result=no
7211 fi
7212 rm -f conftest.$ac_objext conftest.$ac_ext
7213         echo "$as_me:7213: result: $cf_result" >&5
7214 echo "${ECHO_T}$cf_result" >&6
7215         if test "$cf_result" = no ; then
7216                 # perhaps we can override it - try...
7217                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7218         fi
7219 fi
7220
7221         # with_overwrite=no
7222         NCURSES_CH_T=cchar_t
7223
7224 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7225 do
7226 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7227 echo "$as_me:7227: checking for $ac_func" >&5
7228 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7229 if eval "test \"\${$as_ac_var+set}\" = set"; then
7230   echo $ECHO_N "(cached) $ECHO_C" >&6
7231 else
7232   cat >conftest.$ac_ext <<_ACEOF
7233 #line 7233 "configure"
7234 #include "confdefs.h"
7235 /* System header to define __stub macros and hopefully few prototypes,
7236     which can conflict with char $ac_func (); below.  */
7237 #include <assert.h>
7238 /* Override any gcc2 internal prototype to avoid an error.  */
7239 #ifdef __cplusplus
7240 extern "C"
7241 #endif
7242 /* We use char because int might match the return type of a gcc2
7243    builtin and then its argument prototype would still apply.  */
7244 char $ac_func ();
7245 char (*f) ();
7246
7247 int
7248 main ()
7249 {
7250 /* The GNU C library defines this for functions which it implements
7251     to always fail with ENOSYS.  Some functions are actually named
7252     something starting with __ and the normal name is an alias.  */
7253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7254 choke me
7255 #else
7256 f = $ac_func;
7257 #endif
7258
7259   ;
7260   return 0;
7261 }
7262 _ACEOF
7263 rm -f conftest.$ac_objext conftest$ac_exeext
7264 if { (eval echo "$as_me:7264: \"$ac_link\"") >&5
7265   (eval $ac_link) 2>&5
7266   ac_status=$?
7267   echo "$as_me:7267: \$? = $ac_status" >&5
7268   (exit $ac_status); } &&
7269          { ac_try='test -s conftest$ac_exeext'
7270   { (eval echo "$as_me:7270: \"$ac_try\"") >&5
7271   (eval $ac_try) 2>&5
7272   ac_status=$?
7273   echo "$as_me:7273: \$? = $ac_status" >&5
7274   (exit $ac_status); }; }; then
7275   eval "$as_ac_var=yes"
7276 else
7277   echo "$as_me: failed program was:" >&5
7278 cat conftest.$ac_ext >&5
7279 eval "$as_ac_var=no"
7280 fi
7281 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7282 fi
7283 echo "$as_me:7283: result: `eval echo '${'$as_ac_var'}'`" >&5
7284 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7285 if test `eval echo '${'$as_ac_var'}'` = yes; then
7286   cat >>confdefs.h <<EOF
7287 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7288 EOF
7289
7290 fi
7291 done
7292
7293         if test "$ac_cv_func_putwc" != yes ; then
7294
7295 echo "$as_me:7295: checking for multibyte character support" >&5
7296 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7297 if test "${cf_cv_utf8_lib+set}" = set; then
7298   echo $ECHO_N "(cached) $ECHO_C" >&6
7299 else
7300
7301         cf_save_LIBS="$LIBS"
7302         cat >conftest.$ac_ext <<_ACEOF
7303 #line 7303 "configure"
7304 #include "confdefs.h"
7305
7306 #include <stdlib.h>
7307 int
7308 main ()
7309 {
7310 putwc(0,0);
7311   ;
7312   return 0;
7313 }
7314 _ACEOF
7315 rm -f conftest.$ac_objext conftest$ac_exeext
7316 if { (eval echo "$as_me:7316: \"$ac_link\"") >&5
7317   (eval $ac_link) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); } &&
7321          { ac_try='test -s conftest$ac_exeext'
7322   { (eval echo "$as_me:7322: \"$ac_try\"") >&5
7323   (eval $ac_try) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); }; }; then
7327   cf_cv_utf8_lib=yes
7328 else
7329   echo "$as_me: failed program was:" >&5
7330 cat conftest.$ac_ext >&5
7331
7332 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7333 # will be set on completion of the AC_TRY_LINK below.
7334 cf_cv_header_path_utf8=
7335 cf_cv_library_path_utf8=
7336
7337 echo "${as_me-configure}:7337: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7338
7339 cat >conftest.$ac_ext <<_ACEOF
7340 #line 7340 "configure"
7341 #include "confdefs.h"
7342
7343 #include <libutf8.h>
7344 int
7345 main ()
7346 {
7347 putwc(0,0);
7348   ;
7349   return 0;
7350 }
7351 _ACEOF
7352 rm -f conftest.$ac_objext conftest$ac_exeext
7353 if { (eval echo "$as_me:7353: \"$ac_link\"") >&5
7354   (eval $ac_link) 2>&5
7355   ac_status=$?
7356   echo "$as_me:7356: \$? = $ac_status" >&5
7357   (exit $ac_status); } &&
7358          { ac_try='test -s conftest$ac_exeext'
7359   { (eval echo "$as_me:7359: \"$ac_try\"") >&5
7360   (eval $ac_try) 2>&5
7361   ac_status=$?
7362   echo "$as_me:7362: \$? = $ac_status" >&5
7363   (exit $ac_status); }; }; then
7364   cf_cv_find_linkage_utf8=yes
7365 else
7366   echo "$as_me: failed program was:" >&5
7367 cat conftest.$ac_ext >&5
7368
7369     cf_cv_find_linkage_utf8=no
7370
7371     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7372
7373 echo "${as_me-configure}:7373: testing find linkage for utf8 library ..." 1>&5
7374
7375 echo "${as_me-configure}:7375: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7376
7377     cf_save_CPPFLAGS="$CPPFLAGS"
7378     cf_test_CPPFLAGS="$CPPFLAGS"
7379
7380 cf_header_path_list=""
7381 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7382         for cf_header_path in $CPPFLAGS $CFLAGS
7383         do
7384                 case $cf_header_path in #(vi
7385                 -I*)
7386                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7387
7388 test "$cf_header_path" != "NONE" && \
7389 test -d "$cf_header_path" && \
7390  {
7391         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7392         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7393         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7394         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7395         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7396         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7397 }
7398
7399                         cf_header_path_list="$cf_header_path_list $cf_search"
7400                         ;;
7401                 esac
7402         done
7403 fi
7404
7405 cf_search=""
7406
7407 test "/usr" != "$prefix" && \
7408 test -d "/usr" && \
7409 (test $prefix = NONE || test -d $prefix) && {
7410         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7411         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7412         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7413         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7414         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7415         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7416 }
7417
7418 test "$prefix" != "NONE" && \
7419 test -d "$prefix" && \
7420  {
7421         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7422         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7423         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7424         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7425         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7426         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7427 }
7428
7429 test "/usr/local" != "$prefix" && \
7430 test -d "/usr/local" && \
7431 (test $prefix = NONE || test -d $prefix) && {
7432         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7433         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7434         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7435         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7436         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7437         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7438 }
7439
7440 test "/opt" != "$prefix" && \
7441 test -d "/opt" && \
7442 (test $prefix = NONE || test -d $prefix) && {
7443         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7444         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7445         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7446         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7447         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7448         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7449 }
7450
7451 test "$HOME" != "$prefix" && \
7452 test -d "$HOME" && \
7453 (test $prefix = NONE || test -d $prefix) && {
7454         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7455         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7456         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7457         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7458         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7459         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7460 }
7461
7462 test "$includedir" != NONE && \
7463 test "$includedir" != "/usr/include" && \
7464 test -d "$includedir" && {
7465         test -d $includedir &&    cf_search="$cf_search $includedir"
7466         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7467 }
7468
7469 test "$oldincludedir" != NONE && \
7470 test "$oldincludedir" != "/usr/include" && \
7471 test -d "$oldincludedir" && {
7472         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7473         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7474 }
7475
7476 cf_search="$cf_header_path_list $cf_search"
7477
7478     for cf_cv_header_path_utf8 in $cf_search
7479     do
7480       if test -d $cf_cv_header_path_utf8 ; then
7481         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7482
7483 echo "${as_me-configure}:7483: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7484
7485         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7486         cat >conftest.$ac_ext <<_ACEOF
7487 #line 7487 "configure"
7488 #include "confdefs.h"
7489
7490 #include <libutf8.h>
7491 int
7492 main ()
7493 {
7494 putwc(0,0);
7495   ;
7496   return 0;
7497 }
7498 _ACEOF
7499 rm -f conftest.$ac_objext
7500 if { (eval echo "$as_me:7500: \"$ac_compile\"") >&5
7501   (eval $ac_compile) 2>&5
7502   ac_status=$?
7503   echo "$as_me:7503: \$? = $ac_status" >&5
7504   (exit $ac_status); } &&
7505          { ac_try='test -s conftest.$ac_objext'
7506   { (eval echo "$as_me:7506: \"$ac_try\"") >&5
7507   (eval $ac_try) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit $ac_status); }; }; then
7511
7512             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7513
7514 echo "${as_me-configure}:7514: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7515
7516             cf_cv_find_linkage_utf8=maybe
7517             cf_test_CPPFLAGS="$CPPFLAGS"
7518             break
7519 else
7520   echo "$as_me: failed program was:" >&5
7521 cat conftest.$ac_ext >&5
7522
7523             CPPFLAGS="$cf_save_CPPFLAGS"
7524
7525 fi
7526 rm -f conftest.$ac_objext conftest.$ac_ext
7527       fi
7528     done
7529
7530     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7531
7532 echo "${as_me-configure}:7532: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7533
7534       cf_save_LIBS="$LIBS"
7535       cf_save_LDFLAGS="$LDFLAGS"
7536
7537       if test "$cf_cv_find_linkage_utf8" != yes ; then
7538
7539 cf_library_path_list=""
7540 if test -n "${LDFLAGS}${LIBS}" ; then
7541         for cf_library_path in $LDFLAGS $LIBS
7542         do
7543                 case $cf_library_path in #(vi
7544                 -L*)
7545                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7546
7547 test "$cf_library_path" != "NONE" && \
7548 test -d "$cf_library_path" && \
7549  {
7550         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7551         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7552         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7553         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7554         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7555         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7556 }
7557
7558                         cf_library_path_list="$cf_library_path_list $cf_search"
7559                         ;;
7560                 esac
7561         done
7562 fi
7563
7564 cf_search=""
7565
7566 test "/usr" != "$prefix" && \
7567 test -d "/usr" && \
7568 (test $prefix = NONE || test -d $prefix) && {
7569         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7570         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7571         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7572         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7573         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7574         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7575 }
7576
7577 test "$prefix" != "NONE" && \
7578 test -d "$prefix" && \
7579  {
7580         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7581         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7582         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7583         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7584         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7585         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7586 }
7587
7588 test "/usr/local" != "$prefix" && \
7589 test -d "/usr/local" && \
7590 (test $prefix = NONE || test -d $prefix) && {
7591         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7592         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7593         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7594         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7595         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7596         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7597 }
7598
7599 test "/opt" != "$prefix" && \
7600 test -d "/opt" && \
7601 (test $prefix = NONE || test -d $prefix) && {
7602         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7603         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7604         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7605         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7606         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7607         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7608 }
7609
7610 test "$HOME" != "$prefix" && \
7611 test -d "$HOME" && \
7612 (test $prefix = NONE || test -d $prefix) && {
7613         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7614         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7615         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7616         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7617         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7618         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7619 }
7620
7621 cf_search="$cf_library_path_list $cf_search"
7622
7623         for cf_cv_library_path_utf8 in $cf_search
7624         do
7625           if test -d $cf_cv_library_path_utf8 ; then
7626             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7627
7628 echo "${as_me-configure}:7628: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7629
7630             CPPFLAGS="$cf_test_CPPFLAGS"
7631             LIBS="-lutf8  $cf_save_LIBS"
7632             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7633             cat >conftest.$ac_ext <<_ACEOF
7634 #line 7634 "configure"
7635 #include "confdefs.h"
7636
7637 #include <libutf8.h>
7638 int
7639 main ()
7640 {
7641 putwc(0,0);
7642   ;
7643   return 0;
7644 }
7645 _ACEOF
7646 rm -f conftest.$ac_objext conftest$ac_exeext
7647 if { (eval echo "$as_me:7647: \"$ac_link\"") >&5
7648   (eval $ac_link) 2>&5
7649   ac_status=$?
7650   echo "$as_me:7650: \$? = $ac_status" >&5
7651   (exit $ac_status); } &&
7652          { ac_try='test -s conftest$ac_exeext'
7653   { (eval echo "$as_me:7653: \"$ac_try\"") >&5
7654   (eval $ac_try) 2>&5
7655   ac_status=$?
7656   echo "$as_me:7656: \$? = $ac_status" >&5
7657   (exit $ac_status); }; }; then
7658
7659                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7660
7661 echo "${as_me-configure}:7661: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7662
7663                 cf_cv_find_linkage_utf8=yes
7664                 cf_cv_library_file_utf8="-lutf8"
7665                 break
7666 else
7667   echo "$as_me: failed program was:" >&5
7668 cat conftest.$ac_ext >&5
7669
7670                 CPPFLAGS="$cf_save_CPPFLAGS"
7671                 LIBS="$cf_save_LIBS"
7672                 LDFLAGS="$cf_save_LDFLAGS"
7673
7674 fi
7675 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7676           fi
7677         done
7678         LIBS="$cf_save_LIBS"
7679         CPPFLAGS="$cf_save_CPPFLAGS"
7680         LDFLAGS="$cf_save_LDFLAGS"
7681       fi
7682
7683     else
7684       cf_cv_find_linkage_utf8=no
7685     fi
7686
7687 fi
7688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7689
7690 if test "$cf_cv_find_linkage_utf8" = yes ; then
7691 cf_cv_utf8_lib=add-on
7692 else
7693 cf_cv_utf8_lib=no
7694 fi
7695
7696 fi
7697 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7698 fi
7699 echo "$as_me:7699: result: $cf_cv_utf8_lib" >&5
7700 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7701
7702 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7703 # ncurses/ncursesw:
7704 if test "$cf_cv_utf8_lib" = "add-on" ; then
7705         cat >>confdefs.h <<\EOF
7706 #define HAVE_LIBUTF8_H 1
7707 EOF
7708
7709 if test -n "$cf_cv_header_path_utf8" ; then
7710   for cf_add_incdir in $cf_cv_header_path_utf8
7711   do
7712         while test $cf_add_incdir != /usr/include
7713         do
7714           if test -d $cf_add_incdir
7715           then
7716                 cf_have_incdir=no
7717                 if test -n "$CFLAGS$CPPFLAGS" ; then
7718                   # a loop is needed to ensure we can add subdirs of existing dirs
7719                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7720                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7721                           cf_have_incdir=yes; break
7722                         fi
7723                   done
7724                 fi
7725
7726                 if test "$cf_have_incdir" = no ; then
7727                   if test "$cf_add_incdir" = /usr/local/include ; then
7728                         if test "$GCC" = yes
7729                         then
7730                           cf_save_CPPFLAGS=$CPPFLAGS
7731                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7732                           cat >conftest.$ac_ext <<_ACEOF
7733 #line 7733 "configure"
7734 #include "confdefs.h"
7735 #include <stdio.h>
7736 int
7737 main ()
7738 {
7739 printf("Hello")
7740   ;
7741   return 0;
7742 }
7743 _ACEOF
7744 rm -f conftest.$ac_objext
7745 if { (eval echo "$as_me:7745: \"$ac_compile\"") >&5
7746   (eval $ac_compile) 2>&5
7747   ac_status=$?
7748   echo "$as_me:7748: \$? = $ac_status" >&5
7749   (exit $ac_status); } &&
7750          { ac_try='test -s conftest.$ac_objext'
7751   { (eval echo "$as_me:7751: \"$ac_try\"") >&5
7752   (eval $ac_try) 2>&5
7753   ac_status=$?
7754   echo "$as_me:7754: \$? = $ac_status" >&5
7755   (exit $ac_status); }; }; then
7756   :
7757 else
7758   echo "$as_me: failed program was:" >&5
7759 cat conftest.$ac_ext >&5
7760 cf_have_incdir=yes
7761 fi
7762 rm -f conftest.$ac_objext conftest.$ac_ext
7763                           CPPFLAGS=$cf_save_CPPFLAGS
7764                         fi
7765                   fi
7766                 fi
7767
7768                 if test "$cf_have_incdir" = no ; then
7769                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7770
7771 echo "${as_me-configure}:7771: testing adding $cf_add_incdir to include-path ..." 1>&5
7772
7773                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7774
7775                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7776                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7777                   cf_add_incdir="$cf_top_incdir"
7778                 else
7779                   break
7780                 fi
7781           fi
7782         done
7783   done
7784 fi
7785
7786 if test -n "$cf_cv_library_path_utf8" ; then
7787   for cf_add_libdir in $cf_cv_library_path_utf8
7788   do
7789     if test $cf_add_libdir = /usr/lib ; then
7790       :
7791     elif test -d $cf_add_libdir
7792     then
7793       cf_have_libdir=no
7794       if test -n "$LDFLAGS$LIBS" ; then
7795         # a loop is needed to ensure we can add subdirs of existing dirs
7796         for cf_test_libdir in $LDFLAGS $LIBS ; do
7797           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7798             cf_have_libdir=yes; break
7799           fi
7800         done
7801       fi
7802       if test "$cf_have_libdir" = no ; then
7803         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7804
7805 echo "${as_me-configure}:7805: testing adding $cf_add_libdir to library-path ..." 1>&5
7806
7807         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7808       fi
7809     fi
7810   done
7811 fi
7812
7813         LIBS="-lutf8 $LIBS"
7814 fi
7815
7816                 if test "$cf_cv_utf8_lib" != no ; then
7817                         NCURSES_LIBUTF8=1
7818                 fi
7819         fi
7820
7821 # This is needed on Tru64 5.0 to declare mbstate_t
7822 echo "$as_me:7822: checking if we must include wchar.h to declare mbstate_t" >&5
7823 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7824 if test "${cf_cv_mbstate_t+set}" = set; then
7825   echo $ECHO_N "(cached) $ECHO_C" >&6
7826 else
7827
7828 cat >conftest.$ac_ext <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831
7832 #include <stdlib.h>
7833 #include <stdarg.h>
7834 #include <stdio.h>
7835 #ifdef HAVE_LIBUTF8_H
7836 #include <libutf8.h>
7837 #endif
7838 int
7839 main ()
7840 {
7841 mbstate_t state
7842   ;
7843   return 0;
7844 }
7845 _ACEOF
7846 rm -f conftest.$ac_objext
7847 if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit $ac_status); } &&
7852          { ac_try='test -s conftest.$ac_objext'
7853   { (eval echo "$as_me:7853: \"$ac_try\"") >&5
7854   (eval $ac_try) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit $ac_status); }; }; then
7858   cf_cv_mbstate_t=no
7859 else
7860   echo "$as_me: failed program was:" >&5
7861 cat conftest.$ac_ext >&5
7862 cat >conftest.$ac_ext <<_ACEOF
7863 #line 7863 "configure"
7864 #include "confdefs.h"
7865
7866 #include <stdlib.h>
7867 #include <stdarg.h>
7868 #include <stdio.h>
7869 #include <wchar.h>
7870 #ifdef HAVE_LIBUTF8_H
7871 #include <libutf8.h>
7872 #endif
7873 int
7874 main ()
7875 {
7876 mbstate_t value
7877   ;
7878   return 0;
7879 }
7880 _ACEOF
7881 rm -f conftest.$ac_objext
7882 if { (eval echo "$as_me:7882: \"$ac_compile\"") >&5
7883   (eval $ac_compile) 2>&5
7884   ac_status=$?
7885   echo "$as_me:7885: \$? = $ac_status" >&5
7886   (exit $ac_status); } &&
7887          { ac_try='test -s conftest.$ac_objext'
7888   { (eval echo "$as_me:7888: \"$ac_try\"") >&5
7889   (eval $ac_try) 2>&5
7890   ac_status=$?
7891   echo "$as_me:7891: \$? = $ac_status" >&5
7892   (exit $ac_status); }; }; then
7893   cf_cv_mbstate_t=yes
7894 else
7895   echo "$as_me: failed program was:" >&5
7896 cat conftest.$ac_ext >&5
7897 cf_cv_mbstate_t=unknown
7898 fi
7899 rm -f conftest.$ac_objext conftest.$ac_ext
7900 fi
7901 rm -f conftest.$ac_objext conftest.$ac_ext
7902 fi
7903 echo "$as_me:7903: result: $cf_cv_mbstate_t" >&5
7904 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7905
7906 if test "$cf_cv_mbstate_t" = yes ; then
7907         cat >>confdefs.h <<\EOF
7908 #define NEED_WCHAR_H 1
7909 EOF
7910
7911         NEED_WCHAR_H=1
7912 fi
7913
7914 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7915 if test "$cf_cv_mbstate_t" = unknown ; then
7916         NCURSES_MBSTATE_T=1
7917 fi
7918
7919 # This is needed on Tru64 5.0 to declare wchar_t
7920 echo "$as_me:7920: checking if we must include wchar.h to declare wchar_t" >&5
7921 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7922 if test "${cf_cv_wchar_t+set}" = set; then
7923   echo $ECHO_N "(cached) $ECHO_C" >&6
7924 else
7925
7926 cat >conftest.$ac_ext <<_ACEOF
7927 #line 7927 "configure"
7928 #include "confdefs.h"
7929
7930 #include <stdlib.h>
7931 #include <stdarg.h>
7932 #include <stdio.h>
7933 #ifdef HAVE_LIBUTF8_H
7934 #include <libutf8.h>
7935 #endif
7936 int
7937 main ()
7938 {
7939 wchar_t state
7940   ;
7941   return 0;
7942 }
7943 _ACEOF
7944 rm -f conftest.$ac_objext
7945 if { (eval echo "$as_me:7945: \"$ac_compile\"") >&5
7946   (eval $ac_compile) 2>&5
7947   ac_status=$?
7948   echo "$as_me:7948: \$? = $ac_status" >&5
7949   (exit $ac_status); } &&
7950          { ac_try='test -s conftest.$ac_objext'
7951   { (eval echo "$as_me:7951: \"$ac_try\"") >&5
7952   (eval $ac_try) 2>&5
7953   ac_status=$?
7954   echo "$as_me:7954: \$? = $ac_status" >&5
7955   (exit $ac_status); }; }; then
7956   cf_cv_wchar_t=no
7957 else
7958   echo "$as_me: failed program was:" >&5
7959 cat conftest.$ac_ext >&5
7960 cat >conftest.$ac_ext <<_ACEOF
7961 #line 7961 "configure"
7962 #include "confdefs.h"
7963
7964 #include <stdlib.h>
7965 #include <stdarg.h>
7966 #include <stdio.h>
7967 #include <wchar.h>
7968 #ifdef HAVE_LIBUTF8_H
7969 #include <libutf8.h>
7970 #endif
7971 int
7972 main ()
7973 {
7974 wchar_t value
7975   ;
7976   return 0;
7977 }
7978 _ACEOF
7979 rm -f conftest.$ac_objext
7980 if { (eval echo "$as_me:7980: \"$ac_compile\"") >&5
7981   (eval $ac_compile) 2>&5
7982   ac_status=$?
7983   echo "$as_me:7983: \$? = $ac_status" >&5
7984   (exit $ac_status); } &&
7985          { ac_try='test -s conftest.$ac_objext'
7986   { (eval echo "$as_me:7986: \"$ac_try\"") >&5
7987   (eval $ac_try) 2>&5
7988   ac_status=$?
7989   echo "$as_me:7989: \$? = $ac_status" >&5
7990   (exit $ac_status); }; }; then
7991   cf_cv_wchar_t=yes
7992 else
7993   echo "$as_me: failed program was:" >&5
7994 cat conftest.$ac_ext >&5
7995 cf_cv_wchar_t=unknown
7996 fi
7997 rm -f conftest.$ac_objext conftest.$ac_ext
7998 fi
7999 rm -f conftest.$ac_objext conftest.$ac_ext
8000 fi
8001 echo "$as_me:8001: result: $cf_cv_wchar_t" >&5
8002 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8003
8004 if test "$cf_cv_wchar_t" = yes ; then
8005         cat >>confdefs.h <<\EOF
8006 #define NEED_WCHAR_H 1
8007 EOF
8008
8009         NEED_WCHAR_H=1
8010 fi
8011
8012 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8013 if test "$cf_cv_wchar_t" = unknown ; then
8014         NCURSES_WCHAR_T=1
8015 fi
8016
8017 # if we find wchar_t in either place, use substitution to provide a fallback.
8018 if test "$cf_cv_wchar_t" != unknown ; then
8019         NCURSES_OK_WCHAR_T=1
8020 fi
8021
8022 # This is needed on Tru64 5.0 to declare wint_t
8023 echo "$as_me:8023: checking if we must include wchar.h to declare wint_t" >&5
8024 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8025 if test "${cf_cv_wint_t+set}" = set; then
8026   echo $ECHO_N "(cached) $ECHO_C" >&6
8027 else
8028
8029 cat >conftest.$ac_ext <<_ACEOF
8030 #line 8030 "configure"
8031 #include "confdefs.h"
8032
8033 #include <stdlib.h>
8034 #include <stdarg.h>
8035 #include <stdio.h>
8036 #ifdef HAVE_LIBUTF8_H
8037 #include <libutf8.h>
8038 #endif
8039 int
8040 main ()
8041 {
8042 wint_t state
8043   ;
8044   return 0;
8045 }
8046 _ACEOF
8047 rm -f conftest.$ac_objext
8048 if { (eval echo "$as_me:8048: \"$ac_compile\"") >&5
8049   (eval $ac_compile) 2>&5
8050   ac_status=$?
8051   echo "$as_me:8051: \$? = $ac_status" >&5
8052   (exit $ac_status); } &&
8053          { ac_try='test -s conftest.$ac_objext'
8054   { (eval echo "$as_me:8054: \"$ac_try\"") >&5
8055   (eval $ac_try) 2>&5
8056   ac_status=$?
8057   echo "$as_me:8057: \$? = $ac_status" >&5
8058   (exit $ac_status); }; }; then
8059   cf_cv_wint_t=no
8060 else
8061   echo "$as_me: failed program was:" >&5
8062 cat conftest.$ac_ext >&5
8063 cat >conftest.$ac_ext <<_ACEOF
8064 #line 8064 "configure"
8065 #include "confdefs.h"
8066
8067 #include <stdlib.h>
8068 #include <stdarg.h>
8069 #include <stdio.h>
8070 #include <wchar.h>
8071 #ifdef HAVE_LIBUTF8_H
8072 #include <libutf8.h>
8073 #endif
8074 int
8075 main ()
8076 {
8077 wint_t value
8078   ;
8079   return 0;
8080 }
8081 _ACEOF
8082 rm -f conftest.$ac_objext
8083 if { (eval echo "$as_me:8083: \"$ac_compile\"") >&5
8084   (eval $ac_compile) 2>&5
8085   ac_status=$?
8086   echo "$as_me:8086: \$? = $ac_status" >&5
8087   (exit $ac_status); } &&
8088          { ac_try='test -s conftest.$ac_objext'
8089   { (eval echo "$as_me:8089: \"$ac_try\"") >&5
8090   (eval $ac_try) 2>&5
8091   ac_status=$?
8092   echo "$as_me:8092: \$? = $ac_status" >&5
8093   (exit $ac_status); }; }; then
8094   cf_cv_wint_t=yes
8095 else
8096   echo "$as_me: failed program was:" >&5
8097 cat conftest.$ac_ext >&5
8098 cf_cv_wint_t=unknown
8099 fi
8100 rm -f conftest.$ac_objext conftest.$ac_ext
8101 fi
8102 rm -f conftest.$ac_objext conftest.$ac_ext
8103 fi
8104 echo "$as_me:8104: result: $cf_cv_wint_t" >&5
8105 echo "${ECHO_T}$cf_cv_wint_t" >&6
8106
8107 if test "$cf_cv_wint_t" = yes ; then
8108         cat >>confdefs.h <<\EOF
8109 #define NEED_WCHAR_H 1
8110 EOF
8111
8112         NEED_WCHAR_H=1
8113 fi
8114
8115 # if we do not find wint_t in either place, use substitution to provide a fallback.
8116 if test "$cf_cv_wint_t" = unknown ; then
8117         NCURSES_WINT_T=1
8118 fi
8119
8120 # if we find wint_t in either place, use substitution to provide a fallback.
8121 if test "$cf_cv_wint_t" != unknown ; then
8122         NCURSES_OK_WINT_T=1
8123 fi
8124
8125         if test "$NCURSES_MBSTATE_T" != 0; then
8126                 cat >>confdefs.h <<\EOF
8127 #define NEED_MBSTATE_T_DEF 1
8128 EOF
8129
8130         fi
8131 fi
8132
8133 ###   use option --disable-lp64 to allow long chtype
8134 case $cf_cv_abi_version in
8135 [345]*)
8136         default_with_lp64=no
8137         ;;
8138 *)
8139         default_with_lp64=yes
8140         ;;
8141 esac
8142
8143 echo "$as_me:8143: checking whether to enable _LP64 definition in curses.h" >&5
8144 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8145
8146 # Check whether --enable-lp64 or --disable-lp64 was given.
8147 if test "${enable_lp64+set}" = set; then
8148   enableval="$enable_lp64"
8149   with_lp64=$enableval
8150 else
8151   with_lp64=$default_with_lp64
8152 fi;
8153 echo "$as_me:8153: result: $with_lp64" >&5
8154 echo "${ECHO_T}$with_lp64" >&6
8155
8156 if test "$with_lp64" = yes ; then
8157         cf_cv_enable_lp64=1
8158 else
8159         cf_cv_enable_lp64=0
8160 fi
8161
8162 # Check whether --enable-largefile or --disable-largefile was given.
8163 if test "${enable_largefile+set}" = set; then
8164   enableval="$enable_largefile"
8165
8166 fi;
8167 if test "$enable_largefile" != no; then
8168
8169   echo "$as_me:8169: checking for special C compiler options needed for large files" >&5
8170 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8171 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8172   echo $ECHO_N "(cached) $ECHO_C" >&6
8173 else
8174   ac_cv_sys_largefile_CC=no
8175      if test "$GCC" != yes; then
8176        ac_save_CC=$CC
8177        while :; do
8178          # IRIX 6.2 and later do not support large files by default,
8179          # so use the C compiler's -n32 option if that helps.
8180          cat >conftest.$ac_ext <<_ACEOF
8181 #line 8181 "configure"
8182 #include "confdefs.h"
8183 #include <sys/types.h>
8184  /* Check that off_t can represent 2**63 - 1 correctly.
8185     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8186     since some C++ compilers masquerading as C compilers
8187     incorrectly reject 9223372036854775807.  */
8188 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8189   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8190                        && LARGE_OFF_T % 2147483647 == 1)
8191                       ? 1 : -1];
8192 int
8193 main ()
8194 {
8195
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200          rm -f conftest.$ac_objext
8201 if { (eval echo "$as_me:8201: \"$ac_compile\"") >&5
8202   (eval $ac_compile) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest.$ac_objext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212   break
8213 else
8214   echo "$as_me: failed program was:" >&5
8215 cat conftest.$ac_ext >&5
8216 fi
8217 rm -f conftest.$ac_objext
8218          CC="$CC -n32"
8219          rm -f conftest.$ac_objext
8220 if { (eval echo "$as_me:8220: \"$ac_compile\"") >&5
8221   (eval $ac_compile) 2>&5
8222   ac_status=$?
8223   echo "$as_me:8223: \$? = $ac_status" >&5
8224   (exit $ac_status); } &&
8225          { ac_try='test -s conftest.$ac_objext'
8226   { (eval echo "$as_me:8226: \"$ac_try\"") >&5
8227   (eval $ac_try) 2>&5
8228   ac_status=$?
8229   echo "$as_me:8229: \$? = $ac_status" >&5
8230   (exit $ac_status); }; }; then
8231   ac_cv_sys_largefile_CC=' -n32'; break
8232 else
8233   echo "$as_me: failed program was:" >&5
8234 cat conftest.$ac_ext >&5
8235 fi
8236 rm -f conftest.$ac_objext
8237          break
8238        done
8239        CC=$ac_save_CC
8240        rm -f conftest.$ac_ext
8241     fi
8242 fi
8243 echo "$as_me:8243: result: $ac_cv_sys_largefile_CC" >&5
8244 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8245   if test "$ac_cv_sys_largefile_CC" != no; then
8246     CC=$CC$ac_cv_sys_largefile_CC
8247   fi
8248
8249   echo "$as_me:8249: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8250 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8251 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8252   echo $ECHO_N "(cached) $ECHO_C" >&6
8253 else
8254   while :; do
8255   ac_cv_sys_file_offset_bits=no
8256   cat >conftest.$ac_ext <<_ACEOF
8257 #line 8257 "configure"
8258 #include "confdefs.h"
8259 #include <sys/types.h>
8260  /* Check that off_t can represent 2**63 - 1 correctly.
8261     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8262     since some C++ compilers masquerading as C compilers
8263     incorrectly reject 9223372036854775807.  */
8264 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8265   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8266                        && LARGE_OFF_T % 2147483647 == 1)
8267                       ? 1 : -1];
8268 int
8269 main ()
8270 {
8271
8272   ;
8273   return 0;
8274 }
8275 _ACEOF
8276 rm -f conftest.$ac_objext
8277 if { (eval echo "$as_me:8277: \"$ac_compile\"") >&5
8278   (eval $ac_compile) 2>&5
8279   ac_status=$?
8280   echo "$as_me:8280: \$? = $ac_status" >&5
8281   (exit $ac_status); } &&
8282          { ac_try='test -s conftest.$ac_objext'
8283   { (eval echo "$as_me:8283: \"$ac_try\"") >&5
8284   (eval $ac_try) 2>&5
8285   ac_status=$?
8286   echo "$as_me:8286: \$? = $ac_status" >&5
8287   (exit $ac_status); }; }; then
8288   break
8289 else
8290   echo "$as_me: failed program was:" >&5
8291 cat conftest.$ac_ext >&5
8292 fi
8293 rm -f conftest.$ac_objext conftest.$ac_ext
8294   cat >conftest.$ac_ext <<_ACEOF
8295 #line 8295 "configure"
8296 #include "confdefs.h"
8297 #define _FILE_OFFSET_BITS 64
8298 #include <sys/types.h>
8299  /* Check that off_t can represent 2**63 - 1 correctly.
8300     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8301     since some C++ compilers masquerading as C compilers
8302     incorrectly reject 9223372036854775807.  */
8303 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8304   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8305                        && LARGE_OFF_T % 2147483647 == 1)
8306                       ? 1 : -1];
8307 int
8308 main ()
8309 {
8310
8311   ;
8312   return 0;
8313 }
8314 _ACEOF
8315 rm -f conftest.$ac_objext
8316 if { (eval echo "$as_me:8316: \"$ac_compile\"") >&5
8317   (eval $ac_compile) 2>&5
8318   ac_status=$?
8319   echo "$as_me:8319: \$? = $ac_status" >&5
8320   (exit $ac_status); } &&
8321          { ac_try='test -s conftest.$ac_objext'
8322   { (eval echo "$as_me:8322: \"$ac_try\"") >&5
8323   (eval $ac_try) 2>&5
8324   ac_status=$?
8325   echo "$as_me:8325: \$? = $ac_status" >&5
8326   (exit $ac_status); }; }; then
8327   ac_cv_sys_file_offset_bits=64; break
8328 else
8329   echo "$as_me: failed program was:" >&5
8330 cat conftest.$ac_ext >&5
8331 fi
8332 rm -f conftest.$ac_objext conftest.$ac_ext
8333   break
8334 done
8335 fi
8336 echo "$as_me:8336: result: $ac_cv_sys_file_offset_bits" >&5
8337 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8338 if test "$ac_cv_sys_file_offset_bits" != no; then
8339
8340 cat >>confdefs.h <<EOF
8341 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8342 EOF
8343
8344 fi
8345 rm -f conftest*
8346   echo "$as_me:8346: checking for _LARGE_FILES value needed for large files" >&5
8347 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8348 if test "${ac_cv_sys_large_files+set}" = set; then
8349   echo $ECHO_N "(cached) $ECHO_C" >&6
8350 else
8351   while :; do
8352   ac_cv_sys_large_files=no
8353   cat >conftest.$ac_ext <<_ACEOF
8354 #line 8354 "configure"
8355 #include "confdefs.h"
8356 #include <sys/types.h>
8357  /* Check that off_t can represent 2**63 - 1 correctly.
8358     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8359     since some C++ compilers masquerading as C compilers
8360     incorrectly reject 9223372036854775807.  */
8361 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8362   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8363                        && LARGE_OFF_T % 2147483647 == 1)
8364                       ? 1 : -1];
8365 int
8366 main ()
8367 {
8368
8369   ;
8370   return 0;
8371 }
8372 _ACEOF
8373 rm -f conftest.$ac_objext
8374 if { (eval echo "$as_me:8374: \"$ac_compile\"") >&5
8375   (eval $ac_compile) 2>&5
8376   ac_status=$?
8377   echo "$as_me:8377: \$? = $ac_status" >&5
8378   (exit $ac_status); } &&
8379          { ac_try='test -s conftest.$ac_objext'
8380   { (eval echo "$as_me:8380: \"$ac_try\"") >&5
8381   (eval $ac_try) 2>&5
8382   ac_status=$?
8383   echo "$as_me:8383: \$? = $ac_status" >&5
8384   (exit $ac_status); }; }; then
8385   break
8386 else
8387   echo "$as_me: failed program was:" >&5
8388 cat conftest.$ac_ext >&5
8389 fi
8390 rm -f conftest.$ac_objext conftest.$ac_ext
8391   cat >conftest.$ac_ext <<_ACEOF
8392 #line 8392 "configure"
8393 #include "confdefs.h"
8394 #define _LARGE_FILES 1
8395 #include <sys/types.h>
8396  /* Check that off_t can represent 2**63 - 1 correctly.
8397     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8398     since some C++ compilers masquerading as C compilers
8399     incorrectly reject 9223372036854775807.  */
8400 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8401   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8402                        && LARGE_OFF_T % 2147483647 == 1)
8403                       ? 1 : -1];
8404 int
8405 main ()
8406 {
8407
8408   ;
8409   return 0;
8410 }
8411 _ACEOF
8412 rm -f conftest.$ac_objext
8413 if { (eval echo "$as_me:8413: \"$ac_compile\"") >&5
8414   (eval $ac_compile) 2>&5
8415   ac_status=$?
8416   echo "$as_me:8416: \$? = $ac_status" >&5
8417   (exit $ac_status); } &&
8418          { ac_try='test -s conftest.$ac_objext'
8419   { (eval echo "$as_me:8419: \"$ac_try\"") >&5
8420   (eval $ac_try) 2>&5
8421   ac_status=$?
8422   echo "$as_me:8422: \$? = $ac_status" >&5
8423   (exit $ac_status); }; }; then
8424   ac_cv_sys_large_files=1; break
8425 else
8426   echo "$as_me: failed program was:" >&5
8427 cat conftest.$ac_ext >&5
8428 fi
8429 rm -f conftest.$ac_objext conftest.$ac_ext
8430   break
8431 done
8432 fi
8433 echo "$as_me:8433: result: $ac_cv_sys_large_files" >&5
8434 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8435 if test "$ac_cv_sys_large_files" != no; then
8436
8437 cat >>confdefs.h <<EOF
8438 #define _LARGE_FILES $ac_cv_sys_large_files
8439 EOF
8440
8441 fi
8442 rm -f conftest*
8443 fi
8444
8445     if test "$enable_largefile" != no ; then
8446         echo "$as_me:8446: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8447 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8448 if test "${ac_cv_sys_largefile_source+set}" = set; then
8449   echo $ECHO_N "(cached) $ECHO_C" >&6
8450 else
8451   while :; do
8452   ac_cv_sys_largefile_source=no
8453   cat >conftest.$ac_ext <<_ACEOF
8454 #line 8454 "configure"
8455 #include "confdefs.h"
8456 #include <stdio.h>
8457 int
8458 main ()
8459 {
8460 return !fseeko;
8461   ;
8462   return 0;
8463 }
8464 _ACEOF
8465 rm -f conftest.$ac_objext
8466 if { (eval echo "$as_me:8466: \"$ac_compile\"") >&5
8467   (eval $ac_compile) 2>&5
8468   ac_status=$?
8469   echo "$as_me:8469: \$? = $ac_status" >&5
8470   (exit $ac_status); } &&
8471          { ac_try='test -s conftest.$ac_objext'
8472   { (eval echo "$as_me:8472: \"$ac_try\"") >&5
8473   (eval $ac_try) 2>&5
8474   ac_status=$?
8475   echo "$as_me:8475: \$? = $ac_status" >&5
8476   (exit $ac_status); }; }; then
8477   break
8478 else
8479   echo "$as_me: failed program was:" >&5
8480 cat conftest.$ac_ext >&5
8481 fi
8482 rm -f conftest.$ac_objext conftest.$ac_ext
8483   cat >conftest.$ac_ext <<_ACEOF
8484 #line 8484 "configure"
8485 #include "confdefs.h"
8486 #define _LARGEFILE_SOURCE 1
8487 #include <stdio.h>
8488 int
8489 main ()
8490 {
8491 return !fseeko;
8492   ;
8493   return 0;
8494 }
8495 _ACEOF
8496 rm -f conftest.$ac_objext
8497 if { (eval echo "$as_me:8497: \"$ac_compile\"") >&5
8498   (eval $ac_compile) 2>&5
8499   ac_status=$?
8500   echo "$as_me:8500: \$? = $ac_status" >&5
8501   (exit $ac_status); } &&
8502          { ac_try='test -s conftest.$ac_objext'
8503   { (eval echo "$as_me:8503: \"$ac_try\"") >&5
8504   (eval $ac_try) 2>&5
8505   ac_status=$?
8506   echo "$as_me:8506: \$? = $ac_status" >&5
8507   (exit $ac_status); }; }; then
8508   ac_cv_sys_largefile_source=1; break
8509 else
8510   echo "$as_me: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 fi
8513 rm -f conftest.$ac_objext conftest.$ac_ext
8514   break
8515 done
8516 fi
8517 echo "$as_me:8517: result: $ac_cv_sys_largefile_source" >&5
8518 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8519 if test "$ac_cv_sys_largefile_source" != no; then
8520
8521 cat >>confdefs.h <<EOF
8522 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8523 EOF
8524
8525 fi
8526 rm -f conftest*
8527
8528 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8529 # in glibc 2.1.3, but that breaks too many other things.
8530 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8531 echo "$as_me:8531: checking for fseeko" >&5
8532 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8533 if test "${ac_cv_func_fseeko+set}" = set; then
8534   echo $ECHO_N "(cached) $ECHO_C" >&6
8535 else
8536   cat >conftest.$ac_ext <<_ACEOF
8537 #line 8537 "configure"
8538 #include "confdefs.h"
8539 #include <stdio.h>
8540 int
8541 main ()
8542 {
8543 return fseeko && fseeko (stdin, 0, 0);
8544   ;
8545   return 0;
8546 }
8547 _ACEOF
8548 rm -f conftest.$ac_objext conftest$ac_exeext
8549 if { (eval echo "$as_me:8549: \"$ac_link\"") >&5
8550   (eval $ac_link) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); } &&
8554          { ac_try='test -s conftest$ac_exeext'
8555   { (eval echo "$as_me:8555: \"$ac_try\"") >&5
8556   (eval $ac_try) 2>&5
8557   ac_status=$?
8558   echo "$as_me:8558: \$? = $ac_status" >&5
8559   (exit $ac_status); }; }; then
8560   ac_cv_func_fseeko=yes
8561 else
8562   echo "$as_me: failed program was:" >&5
8563 cat conftest.$ac_ext >&5
8564 ac_cv_func_fseeko=no
8565 fi
8566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8567 fi
8568 echo "$as_me:8568: result: $ac_cv_func_fseeko" >&5
8569 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8570 if test $ac_cv_func_fseeko = yes; then
8571
8572 cat >>confdefs.h <<\EOF
8573 #define HAVE_FSEEKO 1
8574 EOF
8575
8576 fi
8577
8578         # Normally we would collect these definitions in the config.h,
8579         # but (like _XOPEN_SOURCE), some environments rely on having these
8580         # defined before any of the system headers are included.  Another
8581         # case comes up with C++, e.g., on AIX the compiler compiles the
8582         # header files by themselves before looking at the body files it is
8583         # told to compile.  For ncurses, those header files do not include
8584         # the config.h
8585         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8586         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8587         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8588
8589         echo "$as_me:8589: checking whether to use struct dirent64" >&5
8590 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8591 if test "${cf_cv_struct_dirent64+set}" = set; then
8592   echo $ECHO_N "(cached) $ECHO_C" >&6
8593 else
8594
8595                 cat >conftest.$ac_ext <<_ACEOF
8596 #line 8596 "configure"
8597 #include "confdefs.h"
8598
8599 #include <sys/types.h>
8600 #include <dirent.h>
8601
8602 int
8603 main ()
8604 {
8605
8606                 /* if transitional largefile support is setup, this is true */
8607                 extern struct dirent64 * readdir(DIR *);
8608                 struct dirent64 *x = readdir((DIR *)0);
8609                 struct dirent *y = readdir((DIR *)0);
8610                 int z = x - y;
8611
8612   ;
8613   return 0;
8614 }
8615 _ACEOF
8616 rm -f conftest.$ac_objext
8617 if { (eval echo "$as_me:8617: \"$ac_compile\"") >&5
8618   (eval $ac_compile) 2>&5
8619   ac_status=$?
8620   echo "$as_me:8620: \$? = $ac_status" >&5
8621   (exit $ac_status); } &&
8622          { ac_try='test -s conftest.$ac_objext'
8623   { (eval echo "$as_me:8623: \"$ac_try\"") >&5
8624   (eval $ac_try) 2>&5
8625   ac_status=$?
8626   echo "$as_me:8626: \$? = $ac_status" >&5
8627   (exit $ac_status); }; }; then
8628   cf_cv_struct_dirent64=yes
8629 else
8630   echo "$as_me: failed program was:" >&5
8631 cat conftest.$ac_ext >&5
8632 cf_cv_struct_dirent64=no
8633 fi
8634 rm -f conftest.$ac_objext conftest.$ac_ext
8635
8636 fi
8637 echo "$as_me:8637: result: $cf_cv_struct_dirent64" >&5
8638 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8639         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8640 #define HAVE_STRUCT_DIRENT64 1
8641 EOF
8642
8643     fi
8644
8645 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8646 echo "$as_me:8646: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8647 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8648
8649 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8650 if test "${enable_tparm_varargs+set}" = set; then
8651   enableval="$enable_tparm_varargs"
8652   with_tparm_varargs=$enableval
8653 else
8654   with_tparm_varargs=yes
8655 fi;
8656 echo "$as_me:8656: result: $with_tparm_varargs" >&5
8657 echo "${ECHO_T}$with_tparm_varargs" >&6
8658 NCURSES_TPARM_VARARGS=0
8659 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8660
8661 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8662 if test "$with_ticlib" != no ; then
8663 echo "$as_me:8663: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8664 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8665
8666 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8667 if test "${enable_tic_depends+set}" = set; then
8668   enableval="$enable_tic_depends"
8669   with_tic_depends=$enableval
8670 else
8671   with_tic_depends=yes
8672 fi;
8673 echo "$as_me:8673: result: $with_tic_depends" >&5
8674 echo "${ECHO_T}$with_tic_depends" >&6
8675 else
8676         with_tic_depends=no
8677 fi
8678
8679 ###   use option --with-bool to override bool's type
8680 echo "$as_me:8680: checking for type of bool" >&5
8681 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8682
8683 # Check whether --with-bool or --without-bool was given.
8684 if test "${with_bool+set}" = set; then
8685   withval="$with_bool"
8686   NCURSES_BOOL="$withval"
8687 else
8688   NCURSES_BOOL=auto
8689 fi;
8690 echo "$as_me:8690: result: $NCURSES_BOOL" >&5
8691 echo "${ECHO_T}$NCURSES_BOOL" >&6
8692
8693 echo "$as_me:8693: checking for alternate terminal capabilities file" >&5
8694 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8695
8696 # Check whether --with-caps or --without-caps was given.
8697 if test "${with_caps+set}" = set; then
8698   withval="$with_caps"
8699   TERMINFO_CAPS=Caps.$withval
8700 else
8701   TERMINFO_CAPS=Caps
8702 fi;
8703 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8704 echo "$as_me:8704: result: $TERMINFO_CAPS" >&5
8705 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8706
8707 ###   use option --with-chtype to override chtype's type
8708 echo "$as_me:8708: checking for type of chtype" >&5
8709 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8710
8711 # Check whether --with-chtype or --without-chtype was given.
8712 if test "${with_chtype+set}" = set; then
8713   withval="$with_chtype"
8714   NCURSES_CHTYPE="$withval"
8715 else
8716   NCURSES_CHTYPE=auto
8717 fi;
8718 echo "$as_me:8718: result: $NCURSES_CHTYPE" >&5
8719 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8720
8721 ###   use option --with-ospeed to override ospeed's type
8722 echo "$as_me:8722: checking for type of ospeed" >&5
8723 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8724
8725 # Check whether --with-ospeed or --without-ospeed was given.
8726 if test "${with_ospeed+set}" = set; then
8727   withval="$with_ospeed"
8728   NCURSES_OSPEED="$withval"
8729 else
8730   NCURSES_OSPEED=short
8731 fi;
8732 echo "$as_me:8732: result: $NCURSES_OSPEED" >&5
8733 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8734
8735 ###   use option --with-mmask-t to override mmask_t's type
8736 echo "$as_me:8736: checking for type of mmask_t" >&5
8737 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8738
8739 # Check whether --with-mmask-t or --without-mmask-t was given.
8740 if test "${with_mmask_t+set}" = set; then
8741   withval="$with_mmask_t"
8742   NCURSES_MMASK_T="$withval"
8743 else
8744   NCURSES_MMASK_T=auto
8745 fi;
8746 echo "$as_me:8746: result: $NCURSES_MMASK_T" >&5
8747 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8748
8749 ###   use option --with-ccharw-max to override CCHARW_MAX size
8750 echo "$as_me:8750: checking for size CCHARW_MAX" >&5
8751 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
8752
8753 # Check whether --with-ccharw-max or --without-ccharw-max was given.
8754 if test "${with_ccharw_max+set}" = set; then
8755   withval="$with_ccharw_max"
8756   NCURSES_CCHARW_MAX="$withval"
8757 else
8758   NCURSES_CCHARW_MAX=5
8759 fi;
8760 echo "$as_me:8760: result: $NCURSES_CCHARW_MAX" >&5
8761 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
8762
8763 ### Enable compiling-in rcs id's
8764 echo "$as_me:8764: checking if RCS identifiers should be compiled-in" >&5
8765 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8766
8767 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8768 if test "${with_rcs_ids+set}" = set; then
8769   withval="$with_rcs_ids"
8770   with_rcs_ids=$withval
8771 else
8772   with_rcs_ids=no
8773 fi;
8774 echo "$as_me:8774: result: $with_rcs_ids" >&5
8775 echo "${ECHO_T}$with_rcs_ids" >&6
8776 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8777 #define USE_RCS_IDS 1
8778 EOF
8779
8780 ###############################################################################
8781
8782 echo "$as_me:8782: checking format of man-pages" >&5
8783 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8784
8785 # Check whether --with-manpage-format or --without-manpage-format was given.
8786 if test "${with_manpage_format+set}" = set; then
8787   withval="$with_manpage_format"
8788   MANPAGE_FORMAT=$withval
8789 else
8790   MANPAGE_FORMAT=unknown
8791 fi;
8792
8793 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8794 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8795
8796 cf_unknown=
8797
8798 case $MANPAGE_FORMAT in
8799 unknown)
8800   if test -z "$MANPATH" ; then
8801     MANPATH="/usr/man:/usr/share/man"
8802   fi
8803
8804   # look for the 'date' man-page (it's most likely to be installed!)
8805   MANPAGE_FORMAT=
8806   cf_preform=no
8807   cf_catonly=yes
8808   cf_example=date
8809
8810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8811   for cf_dir in $MANPATH; do
8812     test -z "$cf_dir" && cf_dir=/usr/man
8813     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
8814     do
8815       cf_test=`echo $cf_name | sed -e 's/*//'`
8816       if test "x$cf_test" = "x$cf_name" ; then
8817
8818         case "$cf_name" in
8819         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8820         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8821         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8822         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8823         esac
8824
8825         case "$cf_name" in
8826         $cf_dir/man*)
8827           cf_catonly=no
8828           ;;
8829         $cf_dir/cat*)
8830           cf_preform=yes
8831           ;;
8832         esac
8833         break
8834       fi
8835
8836       # if we found a match in either man* or cat*, stop looking
8837       if test -n "$MANPAGE_FORMAT" ; then
8838         cf_found=no
8839         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8840         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8841         case "$cf_name" in
8842         $cf_dir/cat*)
8843           cf_found=yes
8844           ;;
8845         esac
8846         test $cf_found=yes && break
8847       fi
8848     done
8849     # only check the first directory in $MANPATH where we find manpages
8850     if test -n "$MANPAGE_FORMAT" ; then
8851        break
8852     fi
8853   done
8854   # if we did not find the example, just assume it is normal
8855   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8856   IFS="$ac_save_ifs"
8857   ;;
8858 *)
8859   for cf_option in $MANPAGE_FORMAT; do
8860      case $cf_option in #(vi
8861      gzip|compress|BSDI|normal|formatted|catonly)
8862        ;;
8863      *)
8864        cf_unknown="$cf_unknown $cf_option"
8865        ;;
8866      esac
8867   done
8868   ;;
8869 esac
8870
8871 echo "$as_me:8871: result: $MANPAGE_FORMAT" >&5
8872 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8873 if test -n "$cf_unknown" ; then
8874   { echo "$as_me:8874: WARNING: Unexpected manpage-format $cf_unknown" >&5
8875 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8876 fi
8877
8878 echo "$as_me:8878: checking for manpage renaming" >&5
8879 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8880
8881 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8882 if test "${with_manpage_renames+set}" = set; then
8883   withval="$with_manpage_renames"
8884   MANPAGE_RENAMES=$withval
8885 else
8886   MANPAGE_RENAMES=yes
8887 fi;
8888
8889 case ".$MANPAGE_RENAMES" in #(vi
8890 .no) #(vi
8891   ;;
8892 .|.yes)
8893   # Debian 'man' program?
8894   if test -f /etc/debian_version ; then
8895     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8896   else
8897     MANPAGE_RENAMES=no
8898   fi
8899   ;;
8900 esac
8901
8902 if test "$MANPAGE_RENAMES" != no ; then
8903   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8904     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8905   elif test ! -f $MANPAGE_RENAMES ; then
8906     { { echo "$as_me:8906: error: not a filename: $MANPAGE_RENAMES" >&5
8907 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8908    { (exit 1); exit 1; }; }
8909   fi
8910
8911   test ! -d man && mkdir man
8912
8913   # Construct a sed-script to perform renaming within man-pages
8914   if test -n "$MANPAGE_RENAMES" ; then
8915     test ! -d man && mkdir man
8916     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8917   fi
8918 fi
8919
8920 echo "$as_me:8920: result: $MANPAGE_RENAMES" >&5
8921 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8922
8923 echo "$as_me:8923: checking if manpage aliases will be installed" >&5
8924 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8925
8926 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8927 if test "${with_manpage_aliases+set}" = set; then
8928   withval="$with_manpage_aliases"
8929   MANPAGE_ALIASES=$withval
8930 else
8931   MANPAGE_ALIASES=yes
8932 fi;
8933
8934 echo "$as_me:8934: result: $MANPAGE_ALIASES" >&5
8935 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8936
8937 if test "$LN_S" = "ln -s"; then
8938         cf_use_symlinks=yes
8939 else
8940         cf_use_symlinks=no
8941 fi
8942
8943 MANPAGE_SYMLINKS=no
8944 if test "$MANPAGE_ALIASES" = yes ; then
8945 echo "$as_me:8945: checking if manpage symlinks should be used" >&5
8946 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8947
8948 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8949 if test "${with_manpage_symlinks+set}" = set; then
8950   withval="$with_manpage_symlinks"
8951   MANPAGE_SYMLINKS=$withval
8952 else
8953   MANPAGE_SYMLINKS=$cf_use_symlinks
8954 fi;
8955
8956 if test "$$cf_use_symlinks" = no; then
8957 if test "$MANPAGE_SYMLINKS" = yes ; then
8958         { echo "$as_me:8958: WARNING: cannot make symlinks" >&5
8959 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8960         MANPAGE_SYMLINKS=no
8961 fi
8962 fi
8963
8964 echo "$as_me:8964: result: $MANPAGE_SYMLINKS" >&5
8965 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8966 fi
8967
8968 echo "$as_me:8968: checking for manpage tbl" >&5
8969 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8970
8971 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8972 if test "${with_manpage_tbl+set}" = set; then
8973   withval="$with_manpage_tbl"
8974   MANPAGE_TBL=$withval
8975 else
8976   MANPAGE_TBL=no
8977 fi;
8978
8979 echo "$as_me:8979: result: $MANPAGE_TBL" >&5
8980 echo "${ECHO_T}$MANPAGE_TBL" >&6
8981
8982   if test "$prefix" = "NONE" ; then
8983      cf_prefix="$ac_default_prefix"
8984   else
8985      cf_prefix="$prefix"
8986   fi
8987
8988   case "$MANPAGE_FORMAT" in # (vi
8989   *catonly*) # (vi
8990     cf_format=yes
8991     cf_inboth=no
8992     ;;
8993   *formatted*) # (vi
8994     cf_format=yes
8995     cf_inboth=yes
8996     ;;
8997   *)
8998     cf_format=no
8999     cf_inboth=no
9000     ;;
9001   esac
9002
9003 test ! -d man && mkdir man
9004
9005 cf_so_strip=
9006 cf_compress=
9007 case "$MANPAGE_FORMAT" in #(vi
9008 *compress*) #(vi
9009         cf_so_strip="Z"
9010         cf_compress=compress
9011   ;;
9012 *gzip*) #(vi
9013         cf_so_strip="gz"
9014         cf_compress=gzip
9015   ;;
9016 esac
9017
9018 cf_edit_man=./edit_man.sh
9019 cf_man_alias=`pwd`/man_alias.sed
9020
9021 cat >$cf_edit_man <<CF_EOF
9022 #! /bin/sh
9023 # this script is generated by the configure-script CF_MAN_PAGES macro.
9024
9025 prefix="$cf_prefix"
9026 datadir="$datadir"
9027
9028 NCURSES_MAJOR="$NCURSES_MAJOR"
9029 NCURSES_MINOR="$NCURSES_MINOR"
9030 NCURSES_PATCH="$NCURSES_PATCH"
9031
9032 NCURSES_OSPEED="$NCURSES_OSPEED"
9033 TERMINFO="$TERMINFO"
9034
9035 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9036
9037 INSTALL="$INSTALL"
9038 INSTALL_DATA="$INSTALL_DATA"
9039
9040 transform="$program_transform_name"
9041
9042 TMP=\${TMPDIR-/tmp}/man\$\$
9043 trap "rm -f \$TMP" 0 1 2 5 15
9044
9045 form=\$1
9046 shift || exit 1
9047
9048 verb=\$1
9049 shift || exit 1
9050
9051 mandir=\$1
9052 shift || exit 1
9053
9054 srcdir=\$1
9055 top_srcdir=\$srcdir/..
9056 shift || exit 1
9057
9058 if test "\$form" = normal ; then
9059         if test "$cf_format" = yes ; then
9060         if test "$cf_inboth" = no ; then
9061                 sh \$0 format \$verb \$mandir \$srcdir \$*
9062                 exit $?
9063         fi
9064         fi
9065         cf_subdir=\$mandir/man
9066         cf_tables=$MANPAGE_TBL
9067 else
9068         cf_subdir=\$mandir/cat
9069         cf_tables=yes
9070 fi
9071
9072 # process the list of source-files
9073 for i in \$* ; do
9074 case \$i in #(vi
9075 *.orig|*.rej) ;; #(vi
9076 *.[0-9]*)
9077         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9078         if test \$verb = installing ; then
9079         if test ! -d \$cf_subdir\${section} ; then
9080                 \$MKDIRS \$cf_subdir\$section
9081         fi
9082         fi
9083
9084         # replace variables in man page
9085         if test ! -f $cf_man_alias ; then
9086 cat >>$cf_man_alias <<-CF_EOF2
9087                 s,@DATADIR@,\$datadir,g
9088                 s,@TERMINFO@,\$TERMINFO,g
9089                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9090                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9091                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9092                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9093 CF_EOF
9094
9095         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9096         do
9097                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9098                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9099 cat >>$cf_edit_man <<-CF_EOF
9100                 s,@$cf_NAME@,$cf_name,
9101 CF_EOF
9102         done
9103
9104 cat >>$cf_edit_man <<CF_EOF
9105 CF_EOF2
9106                 echo "...made $cf_man_alias"
9107         fi
9108
9109         aliases=
9110         cf_source=\`basename \$i\`
9111         inalias=\$cf_source
9112         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9113         if test ! -f \$inalias ; then
9114                 echo .. skipped \$cf_source
9115                 continue
9116         fi
9117 CF_EOF
9118
9119 if test "$MANPAGE_ALIASES" != no ; then
9120 cat >>$cf_edit_man <<CF_EOF
9121         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9122 CF_EOF
9123 fi
9124
9125 if test "$MANPAGE_RENAMES" = no ; then
9126 cat >>$cf_edit_man <<CF_EOF
9127         # perform program transformations for section 1 man pages
9128         if test \$section = 1 ; then
9129                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9130         else
9131                 cf_target=\$cf_subdir\${section}/\$cf_source
9132         fi
9133 CF_EOF
9134 else
9135 cat >>$cf_edit_man <<CF_EOF
9136         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9137         if test -z "\$cf_target" ; then
9138                 echo '? missing rename for '\$cf_source
9139                 cf_target="\$cf_source"
9140         fi
9141         cf_target="\$cf_subdir\${section}/\${cf_target}"
9142
9143 CF_EOF
9144 fi
9145
9146 cat >>$cf_edit_man <<CF_EOF
9147         sed     -f $cf_man_alias \\
9148 CF_EOF
9149
9150 if test -f $MANPAGE_RENAMES ; then
9151 cat >>$cf_edit_man <<CF_EOF
9152                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9153 CF_EOF
9154 else
9155 cat >>$cf_edit_man <<CF_EOF
9156                 < \$i >\$TMP
9157 CF_EOF
9158 fi
9159
9160 cat >>$cf_edit_man <<CF_EOF
9161 if test \$cf_tables = yes ; then
9162         tbl \$TMP >\$TMP.out
9163         mv \$TMP.out \$TMP
9164 fi
9165 CF_EOF
9166
9167 if test $with_curses_h != yes ; then
9168 cat >>$cf_edit_man <<CF_EOF
9169         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9170         mv \$TMP.out \$TMP
9171 CF_EOF
9172 fi
9173
9174 cat >>$cf_edit_man <<CF_EOF
9175         if test \$form = format ; then
9176                 nroff -man \$TMP >\$TMP.out
9177                 mv \$TMP.out \$TMP
9178         fi
9179 CF_EOF
9180
9181 if test -n "$cf_compress" ; then
9182 cat >>$cf_edit_man <<CF_EOF
9183         if test \$verb = installing ; then
9184         if ( $cf_compress -f \$TMP )
9185         then
9186                 mv \$TMP.$cf_so_strip \$TMP
9187         fi
9188         fi
9189         cf_target="\$cf_target.$cf_so_strip"
9190 CF_EOF
9191 fi
9192
9193 case "$MANPAGE_FORMAT" in #(vi
9194 *BSDI*)
9195 cat >>$cf_edit_man <<CF_EOF
9196         if test \$form = format ; then
9197                 # BSDI installs only .0 suffixes in the cat directories
9198                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9199         fi
9200 CF_EOF
9201   ;;
9202 esac
9203
9204 cat >>$cf_edit_man <<CF_EOF
9205         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9206         if test \$verb = installing ; then
9207                 echo \$verb \$cf_target
9208                 \$INSTALL_DATA \$TMP \$cf_target
9209                 test -d \$cf_subdir\${section} &&
9210                 test -n "\$aliases" && (
9211                         cd \$cf_subdir\${section} && (
9212                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9213                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9214                                 cf_target=\`basename \$cf_target\`
9215                                 for cf_alias in \$aliases
9216                                 do
9217                                         if test \$section = 1 ; then
9218                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9219                                         fi
9220
9221                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9222                                                 if test -f \$cf_alias\${suffix} ; then
9223                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9224                                                         then
9225                                                                 continue
9226                                                         fi
9227                                                 fi
9228                                                 echo .. \$verb alias \$cf_alias\${suffix}
9229                                                 rm -f \$cf_alias\${suffix}
9230                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9231                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9232                                                 echo ".so \$cf_source" >\$TMP
9233 CF_EOF
9234 if test -n "$cf_compress" ; then
9235 cat >>$cf_edit_man <<CF_EOF
9236                                                 if test -n "$cf_so_strip" ; then
9237                                                         $cf_compress -f \$TMP
9238                                                         mv \$TMP.$cf_so_strip \$TMP
9239                                                 fi
9240 CF_EOF
9241 fi
9242 cat >>$cf_edit_man <<CF_EOF
9243                                                 echo .. \$verb alias \$cf_alias\${suffix}
9244                                                 rm -f \$cf_alias\${suffix}
9245                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9246                                         fi
9247                                 done
9248                         )
9249                 )
9250         elif test \$verb = removing ; then
9251                 test -f \$cf_target && (
9252                         echo \$verb \$cf_target
9253                         rm -f \$cf_target
9254                 )
9255                 test -d \$cf_subdir\${section} &&
9256                 test -n "\$aliases" && (
9257                         cd \$cf_subdir\${section} && (
9258                                 for cf_alias in \$aliases
9259                                 do
9260                                         if test \$section = 1 ; then
9261                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9262                                         fi
9263
9264                                         echo .. \$verb alias \$cf_alias\${suffix}
9265                                         rm -f \$cf_alias\${suffix}
9266                                 done
9267                         )
9268                 )
9269         else
9270 #               echo ".hy 0"
9271                 cat \$TMP
9272         fi
9273         ;;
9274 esac
9275 done
9276
9277 if test $cf_inboth = yes ; then
9278 if test \$form != format ; then
9279         sh \$0 format \$verb \$mandir \$srcdir \$*
9280 fi
9281 fi
9282
9283 exit 0
9284 CF_EOF
9285 chmod 755 $cf_edit_man
9286
9287 ###############################################################################
9288
9289 ### Note that some functions (such as const) are normally disabled anyway.
9290 echo "$as_me:9290: checking if you want to build with function extensions" >&5
9291 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9292
9293 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9294 if test "${enable_ext_funcs+set}" = set; then
9295   enableval="$enable_ext_funcs"
9296   with_ext_funcs=$enableval
9297 else
9298   with_ext_funcs=yes
9299 fi;
9300 echo "$as_me:9300: result: $with_ext_funcs" >&5
9301 echo "${ECHO_T}$with_ext_funcs" >&6
9302 if test "$with_ext_funcs" = yes ; then
9303         NCURSES_EXT_FUNCS=1
9304         cat >>confdefs.h <<\EOF
9305 #define HAVE_CURSES_VERSION 1
9306 EOF
9307
9308         cat >>confdefs.h <<\EOF
9309 #define HAVE_HAS_KEY 1
9310 EOF
9311
9312         cat >>confdefs.h <<\EOF
9313 #define HAVE_RESIZETERM 1
9314 EOF
9315
9316         cat >>confdefs.h <<\EOF
9317 #define HAVE_RESIZE_TERM 1
9318 EOF
9319
9320         cat >>confdefs.h <<\EOF
9321 #define HAVE_USE_DEFAULT_COLORS 1
9322 EOF
9323
9324         cat >>confdefs.h <<\EOF
9325 #define HAVE_WRESIZE 1
9326 EOF
9327
9328         cat >>confdefs.h <<\EOF
9329 #define NCURSES_EXT_FUNCS 1
9330 EOF
9331
9332         GENERATED_EXT_FUNCS=generated
9333 else
9334         NCURSES_EXT_FUNCS=0
9335         GENERATED_EXT_FUNCS=
9336 fi
9337
9338 echo "$as_me:9338: checking if you want to build with experimental SCREEN extensions" >&5
9339 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9340
9341 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9342 if test "${enable_sp_funcs+set}" = set; then
9343   enableval="$enable_sp_funcs"
9344   with_sp_funcs=$enableval
9345 else
9346   with_sp_funcs=no
9347 fi;
9348 echo "$as_me:9348: result: $with_sp_funcs" >&5
9349 echo "${ECHO_T}$with_sp_funcs" >&6
9350 if test "$with_sp_funcs" = yes ; then
9351         NCURSES_SP_FUNCS=1
9352         cat >>confdefs.h <<\EOF
9353 #define NCURSES_SP_FUNCS 1
9354 EOF
9355
9356         GENERATED_SP_FUNCS=generated
9357 else
9358         NCURSES_SP_FUNCS=0
9359         GENERATED_SP_FUNCS=
9360 fi
9361
9362 echo "$as_me:9362: checking if you want to build with experimental terminal-driver" >&5
9363 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9364
9365 # Check whether --enable-term-driver or --disable-term-driver was given.
9366 if test "${enable_term_driver+set}" = set; then
9367   enableval="$enable_term_driver"
9368   with_term_driver=$enableval
9369 else
9370   with_term_driver=no
9371 fi;
9372 echo "$as_me:9372: result: $with_term_driver" >&5
9373 echo "${ECHO_T}$with_term_driver" >&6
9374 if test "$with_term_driver" = yes ; then
9375         cat >>confdefs.h <<\EOF
9376 #define USE_TERM_DRIVER 1
9377 EOF
9378
9379 fi
9380
9381 ###   use option --enable-const to turn on use of const beyond that in XSI.
9382 echo "$as_me:9382: checking for extended use of const keyword" >&5
9383 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9384
9385 # Check whether --enable-const or --disable-const was given.
9386 if test "${enable_const+set}" = set; then
9387   enableval="$enable_const"
9388   with_ext_const=$enableval
9389 else
9390   with_ext_const=no
9391 fi;
9392 echo "$as_me:9392: result: $with_ext_const" >&5
9393 echo "${ECHO_T}$with_ext_const" >&6
9394 NCURSES_CONST='/*nothing*/'
9395 if test "$with_ext_const" = yes ; then
9396         NCURSES_CONST=const
9397 fi
9398
9399 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9400 echo "$as_me:9400: checking if you want to use extended colors" >&5
9401 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9402
9403 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9404 if test "${enable_ext_colors+set}" = set; then
9405   enableval="$enable_ext_colors"
9406   with_ext_colors=$enableval
9407 else
9408   with_ext_colors=no
9409 fi;
9410 echo "$as_me:9410: result: $with_ext_colors" >&5
9411 echo "${ECHO_T}$with_ext_colors" >&6
9412 NCURSES_EXT_COLORS=0
9413 if test "$with_ext_colors" = yes ; then
9414         if test "$with_widec" != yes ; then
9415                 { { echo "$as_me:9415: error: This option applies only to wide-character library" >&5
9416 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9417    { (exit 1); exit 1; }; }
9418         else
9419                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9420
9421 if test "${with_abi_version+set}" != set; then
9422         case $cf_cv_rel_version in
9423         5.*)
9424                 cf_cv_rel_version=6.0
9425                 cf_cv_abi_version=6
9426                 { echo "$as_me:9426: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9427 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9428                 ;;
9429         esac
9430 fi
9431
9432         fi
9433         NCURSES_EXT_COLORS=1
9434         cat >>confdefs.h <<\EOF
9435 #define NCURSES_EXT_COLORS 1
9436 EOF
9437
9438 fi
9439
9440 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9441 echo "$as_me:9441: checking if you want to use extended mouse encoding" >&5
9442 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9443
9444 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9445 if test "${enable_ext_mouse+set}" = set; then
9446   enableval="$enable_ext_mouse"
9447   with_ext_mouse=$enableval
9448 else
9449   with_ext_mouse=no
9450 fi;
9451 echo "$as_me:9451: result: $with_ext_mouse" >&5
9452 echo "${ECHO_T}$with_ext_mouse" >&6
9453 NCURSES_MOUSE_VERSION=1
9454 if test "$with_ext_mouse" = yes ; then
9455         NCURSES_MOUSE_VERSION=2
9456
9457 if test "${with_abi_version+set}" != set; then
9458         case $cf_cv_rel_version in
9459         5.*)
9460                 cf_cv_rel_version=6.0
9461                 cf_cv_abi_version=6
9462                 { echo "$as_me:9462: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9463 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9464                 ;;
9465         esac
9466 fi
9467
9468 fi
9469
9470 echo "$as_me:9470: checking if you want \$NCURSES_NO_PADDING code" >&5
9471 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9472
9473 # Check whether --enable-no-padding or --disable-no-padding was given.
9474 if test "${enable_no_padding+set}" = set; then
9475   enableval="$enable_no_padding"
9476   with_no_padding=$enableval
9477 else
9478   with_no_padding=$with_ext_funcs
9479 fi;
9480 echo "$as_me:9480: result: $with_no_padding" >&5
9481 echo "${ECHO_T}$with_no_padding" >&6
9482 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9483 #define NCURSES_NO_PADDING 1
9484 EOF
9485
9486 echo "$as_me:9486: checking for ANSI C header files" >&5
9487 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9488 if test "${ac_cv_header_stdc+set}" = set; then
9489   echo $ECHO_N "(cached) $ECHO_C" >&6
9490 else
9491   cat >conftest.$ac_ext <<_ACEOF
9492 #line 9492 "configure"
9493 #include "confdefs.h"
9494 #include <stdlib.h>
9495 #include <stdarg.h>
9496 #include <string.h>
9497 #include <float.h>
9498
9499 _ACEOF
9500 if { (eval echo "$as_me:9500: \"$ac_cpp conftest.$ac_ext\"") >&5
9501   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9502   ac_status=$?
9503   egrep -v '^ *\+' conftest.er1 >conftest.err
9504   rm -f conftest.er1
9505   cat conftest.err >&5
9506   echo "$as_me:9506: \$? = $ac_status" >&5
9507   (exit $ac_status); } >/dev/null; then
9508   if test -s conftest.err; then
9509     ac_cpp_err=$ac_c_preproc_warn_flag
9510   else
9511     ac_cpp_err=
9512   fi
9513 else
9514   ac_cpp_err=yes
9515 fi
9516 if test -z "$ac_cpp_err"; then
9517   ac_cv_header_stdc=yes
9518 else
9519   echo "$as_me: failed program was:" >&5
9520   cat conftest.$ac_ext >&5
9521   ac_cv_header_stdc=no
9522 fi
9523 rm -f conftest.err conftest.$ac_ext
9524
9525 if test $ac_cv_header_stdc = yes; then
9526   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9527   cat >conftest.$ac_ext <<_ACEOF
9528 #line 9528 "configure"
9529 #include "confdefs.h"
9530 #include <string.h>
9531
9532 _ACEOF
9533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9534   egrep "memchr" >/dev/null 2>&1; then
9535   :
9536 else
9537   ac_cv_header_stdc=no
9538 fi
9539 rm -f conftest*
9540
9541 fi
9542
9543 if test $ac_cv_header_stdc = yes; then
9544   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9545   cat >conftest.$ac_ext <<_ACEOF
9546 #line 9546 "configure"
9547 #include "confdefs.h"
9548 #include <stdlib.h>
9549
9550 _ACEOF
9551 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9552   egrep "free" >/dev/null 2>&1; then
9553   :
9554 else
9555   ac_cv_header_stdc=no
9556 fi
9557 rm -f conftest*
9558
9559 fi
9560
9561 if test $ac_cv_header_stdc = yes; then
9562   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9563   if test "$cross_compiling" = yes; then
9564   :
9565 else
9566   cat >conftest.$ac_ext <<_ACEOF
9567 #line 9567 "configure"
9568 #include "confdefs.h"
9569 #include <ctype.h>
9570 #if ((' ' & 0x0FF) == 0x020)
9571 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9572 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9573 #else
9574 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9575                      || ('j' <= (c) && (c) <= 'r') \
9576                      || ('s' <= (c) && (c) <= 'z'))
9577 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9578 #endif
9579
9580 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9581 int
9582 main ()
9583 {
9584   int i;
9585   for (i = 0; i < 256; i++)
9586     if (XOR (islower (i), ISLOWER (i))
9587         || toupper (i) != TOUPPER (i))
9588       $ac_main_return(2);
9589   $ac_main_return (0);
9590 }
9591 _ACEOF
9592 rm -f conftest$ac_exeext
9593 if { (eval echo "$as_me:9593: \"$ac_link\"") >&5
9594   (eval $ac_link) 2>&5
9595   ac_status=$?
9596   echo "$as_me:9596: \$? = $ac_status" >&5
9597   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9598   { (eval echo "$as_me:9598: \"$ac_try\"") >&5
9599   (eval $ac_try) 2>&5
9600   ac_status=$?
9601   echo "$as_me:9601: \$? = $ac_status" >&5
9602   (exit $ac_status); }; }; then
9603   :
9604 else
9605   echo "$as_me: program exited with status $ac_status" >&5
9606 echo "$as_me: failed program was:" >&5
9607 cat conftest.$ac_ext >&5
9608 ac_cv_header_stdc=no
9609 fi
9610 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9611 fi
9612 fi
9613 fi
9614 echo "$as_me:9614: result: $ac_cv_header_stdc" >&5
9615 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9616 if test $ac_cv_header_stdc = yes; then
9617
9618 cat >>confdefs.h <<\EOF
9619 #define STDC_HEADERS 1
9620 EOF
9621
9622 fi
9623
9624 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9625
9626 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9627                   inttypes.h stdint.h unistd.h
9628 do
9629 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9630 echo "$as_me:9630: checking for $ac_header" >&5
9631 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9632 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9633   echo $ECHO_N "(cached) $ECHO_C" >&6
9634 else
9635   cat >conftest.$ac_ext <<_ACEOF
9636 #line 9636 "configure"
9637 #include "confdefs.h"
9638 $ac_includes_default
9639 #include <$ac_header>
9640 _ACEOF
9641 rm -f conftest.$ac_objext
9642 if { (eval echo "$as_me:9642: \"$ac_compile\"") >&5
9643   (eval $ac_compile) 2>&5
9644   ac_status=$?
9645   echo "$as_me:9645: \$? = $ac_status" >&5
9646   (exit $ac_status); } &&
9647          { ac_try='test -s conftest.$ac_objext'
9648   { (eval echo "$as_me:9648: \"$ac_try\"") >&5
9649   (eval $ac_try) 2>&5
9650   ac_status=$?
9651   echo "$as_me:9651: \$? = $ac_status" >&5
9652   (exit $ac_status); }; }; then
9653   eval "$as_ac_Header=yes"
9654 else
9655   echo "$as_me: failed program was:" >&5
9656 cat conftest.$ac_ext >&5
9657 eval "$as_ac_Header=no"
9658 fi
9659 rm -f conftest.$ac_objext conftest.$ac_ext
9660 fi
9661 echo "$as_me:9661: result: `eval echo '${'$as_ac_Header'}'`" >&5
9662 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9663 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9664   cat >>confdefs.h <<EOF
9665 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9666 EOF
9667
9668 fi
9669 done
9670
9671 echo "$as_me:9671: checking for signed char" >&5
9672 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9673 if test "${ac_cv_type_signed_char+set}" = set; then
9674   echo $ECHO_N "(cached) $ECHO_C" >&6
9675 else
9676   cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679 $ac_includes_default
9680 int
9681 main ()
9682 {
9683 if ((signed char *) 0)
9684   return 0;
9685 if (sizeof (signed char))
9686   return 0;
9687   ;
9688   return 0;
9689 }
9690 _ACEOF
9691 rm -f conftest.$ac_objext
9692 if { (eval echo "$as_me:9692: \"$ac_compile\"") >&5
9693   (eval $ac_compile) 2>&5
9694   ac_status=$?
9695   echo "$as_me:9695: \$? = $ac_status" >&5
9696   (exit $ac_status); } &&
9697          { ac_try='test -s conftest.$ac_objext'
9698   { (eval echo "$as_me:9698: \"$ac_try\"") >&5
9699   (eval $ac_try) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); }; }; then
9703   ac_cv_type_signed_char=yes
9704 else
9705   echo "$as_me: failed program was:" >&5
9706 cat conftest.$ac_ext >&5
9707 ac_cv_type_signed_char=no
9708 fi
9709 rm -f conftest.$ac_objext conftest.$ac_ext
9710 fi
9711 echo "$as_me:9711: result: $ac_cv_type_signed_char" >&5
9712 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9713
9714 echo "$as_me:9714: checking size of signed char" >&5
9715 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9716 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9717   echo $ECHO_N "(cached) $ECHO_C" >&6
9718 else
9719   if test "$ac_cv_type_signed_char" = yes; then
9720   if test "$cross_compiling" = yes; then
9721   # Depending upon the size, compute the lo and hi bounds.
9722 cat >conftest.$ac_ext <<_ACEOF
9723 #line 9723 "configure"
9724 #include "confdefs.h"
9725 $ac_includes_default
9726 int
9727 main ()
9728 {
9729 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9730   ;
9731   return 0;
9732 }
9733 _ACEOF
9734 rm -f conftest.$ac_objext
9735 if { (eval echo "$as_me:9735: \"$ac_compile\"") >&5
9736   (eval $ac_compile) 2>&5
9737   ac_status=$?
9738   echo "$as_me:9738: \$? = $ac_status" >&5
9739   (exit $ac_status); } &&
9740          { ac_try='test -s conftest.$ac_objext'
9741   { (eval echo "$as_me:9741: \"$ac_try\"") >&5
9742   (eval $ac_try) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); }; }; then
9746   ac_lo=0 ac_mid=0
9747   while :; do
9748     cat >conftest.$ac_ext <<_ACEOF
9749 #line 9749 "configure"
9750 #include "confdefs.h"
9751 $ac_includes_default
9752 int
9753 main ()
9754 {
9755 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9756   ;
9757   return 0;
9758 }
9759 _ACEOF
9760 rm -f conftest.$ac_objext
9761 if { (eval echo "$as_me:9761: \"$ac_compile\"") >&5
9762   (eval $ac_compile) 2>&5
9763   ac_status=$?
9764   echo "$as_me:9764: \$? = $ac_status" >&5
9765   (exit $ac_status); } &&
9766          { ac_try='test -s conftest.$ac_objext'
9767   { (eval echo "$as_me:9767: \"$ac_try\"") >&5
9768   (eval $ac_try) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit $ac_status); }; }; then
9772   ac_hi=$ac_mid; break
9773 else
9774   echo "$as_me: failed program was:" >&5
9775 cat conftest.$ac_ext >&5
9776 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9777 fi
9778 rm -f conftest.$ac_objext conftest.$ac_ext
9779   done
9780 else
9781   echo "$as_me: failed program was:" >&5
9782 cat conftest.$ac_ext >&5
9783 ac_hi=-1 ac_mid=-1
9784   while :; do
9785     cat >conftest.$ac_ext <<_ACEOF
9786 #line 9786 "configure"
9787 #include "confdefs.h"
9788 $ac_includes_default
9789 int
9790 main ()
9791 {
9792 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9793   ;
9794   return 0;
9795 }
9796 _ACEOF
9797 rm -f conftest.$ac_objext
9798 if { (eval echo "$as_me:9798: \"$ac_compile\"") >&5
9799   (eval $ac_compile) 2>&5
9800   ac_status=$?
9801   echo "$as_me:9801: \$? = $ac_status" >&5
9802   (exit $ac_status); } &&
9803          { ac_try='test -s conftest.$ac_objext'
9804   { (eval echo "$as_me:9804: \"$ac_try\"") >&5
9805   (eval $ac_try) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); }; }; then
9809   ac_lo=$ac_mid; break
9810 else
9811   echo "$as_me: failed program was:" >&5
9812 cat conftest.$ac_ext >&5
9813 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9814 fi
9815 rm -f conftest.$ac_objext conftest.$ac_ext
9816   done
9817 fi
9818 rm -f conftest.$ac_objext conftest.$ac_ext
9819 # Binary search between lo and hi bounds.
9820 while test "x$ac_lo" != "x$ac_hi"; do
9821   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9822   cat >conftest.$ac_ext <<_ACEOF
9823 #line 9823 "configure"
9824 #include "confdefs.h"
9825 $ac_includes_default
9826 int
9827 main ()
9828 {
9829 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9830   ;
9831   return 0;
9832 }
9833 _ACEOF
9834 rm -f conftest.$ac_objext
9835 if { (eval echo "$as_me:9835: \"$ac_compile\"") >&5
9836   (eval $ac_compile) 2>&5
9837   ac_status=$?
9838   echo "$as_me:9838: \$? = $ac_status" >&5
9839   (exit $ac_status); } &&
9840          { ac_try='test -s conftest.$ac_objext'
9841   { (eval echo "$as_me:9841: \"$ac_try\"") >&5
9842   (eval $ac_try) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); }; }; then
9846   ac_hi=$ac_mid
9847 else
9848   echo "$as_me: failed program was:" >&5
9849 cat conftest.$ac_ext >&5
9850 ac_lo=`expr $ac_mid + 1`
9851 fi
9852 rm -f conftest.$ac_objext conftest.$ac_ext
9853 done
9854 ac_cv_sizeof_signed_char=$ac_lo
9855 else
9856   if test "$cross_compiling" = yes; then
9857   { { echo "$as_me:9857: error: cannot run test program while cross compiling" >&5
9858 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9859    { (exit 1); exit 1; }; }
9860 else
9861   cat >conftest.$ac_ext <<_ACEOF
9862 #line 9862 "configure"
9863 #include "confdefs.h"
9864 $ac_includes_default
9865 int
9866 main ()
9867 {
9868 FILE *f = fopen ("conftest.val", "w");
9869 if (!f)
9870   $ac_main_return (1);
9871 fprintf (f, "%d", (sizeof (signed char)));
9872 fclose (f);
9873   ;
9874   return 0;
9875 }
9876 _ACEOF
9877 rm -f conftest$ac_exeext
9878 if { (eval echo "$as_me:9878: \"$ac_link\"") >&5
9879   (eval $ac_link) 2>&5
9880   ac_status=$?
9881   echo "$as_me:9881: \$? = $ac_status" >&5
9882   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9883   { (eval echo "$as_me:9883: \"$ac_try\"") >&5
9884   (eval $ac_try) 2>&5
9885   ac_status=$?
9886   echo "$as_me:9886: \$? = $ac_status" >&5
9887   (exit $ac_status); }; }; then
9888   ac_cv_sizeof_signed_char=`cat conftest.val`
9889 else
9890   echo "$as_me: program exited with status $ac_status" >&5
9891 echo "$as_me: failed program was:" >&5
9892 cat conftest.$ac_ext >&5
9893 fi
9894 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9895 fi
9896 fi
9897 rm -f conftest.val
9898 else
9899   ac_cv_sizeof_signed_char=0
9900 fi
9901 fi
9902 echo "$as_me:9902: result: $ac_cv_sizeof_signed_char" >&5
9903 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9904 cat >>confdefs.h <<EOF
9905 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9906 EOF
9907
9908 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9909         NCURSES_SBOOL="signed char"
9910 else
9911         NCURSES_SBOOL="char"
9912 fi
9913 echo "$as_me:9913: checking if you want to use signed Boolean array in term.h" >&5
9914 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9915
9916 # Check whether --enable-signed-char or --disable-signed-char was given.
9917 if test "${enable_signed_char+set}" = set; then
9918   enableval="$enable_signed_char"
9919   with_signed_char=$enableval
9920 else
9921   with_signed_char=no
9922 fi;
9923 echo "$as_me:9923: result: $with_signed_char" >&5
9924 echo "${ECHO_T}$with_signed_char" >&6
9925 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9926
9927 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9928 echo "$as_me:9928: checking if you want SIGWINCH handler" >&5
9929 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9930
9931 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9932 if test "${enable_sigwinch+set}" = set; then
9933   enableval="$enable_sigwinch"
9934   with_sigwinch=$enableval
9935 else
9936   with_sigwinch=$with_ext_funcs
9937 fi;
9938 echo "$as_me:9938: result: $with_sigwinch" >&5
9939 echo "${ECHO_T}$with_sigwinch" >&6
9940 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9941 #define USE_SIGWINCH 1
9942 EOF
9943
9944 ###   use option --enable-tcap-names to allow user to define new capabilities
9945 echo "$as_me:9945: checking if you want user-definable terminal capabilities like termcap" >&5
9946 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9947
9948 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9949 if test "${enable_tcap_names+set}" = set; then
9950   enableval="$enable_tcap_names"
9951   with_tcap_names=$enableval
9952 else
9953   with_tcap_names=$with_ext_funcs
9954 fi;
9955 echo "$as_me:9955: result: $with_tcap_names" >&5
9956 echo "${ECHO_T}$with_tcap_names" >&6
9957 NCURSES_XNAMES=0
9958 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9959
9960 ###############################################################################
9961 # These options are relatively safe to experiment with.
9962
9963 echo "$as_me:9963: checking if you want all development code" >&5
9964 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9965
9966 # Check whether --with-develop or --without-develop was given.
9967 if test "${with_develop+set}" = set; then
9968   withval="$with_develop"
9969   with_develop=$withval
9970 else
9971   with_develop=no
9972 fi;
9973 echo "$as_me:9973: result: $with_develop" >&5
9974 echo "${ECHO_T}$with_develop" >&6
9975
9976 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9977 echo "$as_me:9977: checking if you want hard-tabs code" >&5
9978 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9979
9980 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9981 if test "${enable_hard_tabs+set}" = set; then
9982   enableval="$enable_hard_tabs"
9983
9984 else
9985   enable_hard_tabs=$with_develop
9986 fi;
9987 echo "$as_me:9987: result: $enable_hard_tabs" >&5
9988 echo "${ECHO_T}$enable_hard_tabs" >&6
9989 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9990 #define USE_HARD_TABS 1
9991 EOF
9992
9993 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9994 echo "$as_me:9994: checking if you want limited support for xmc" >&5
9995 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9996
9997 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9998 if test "${enable_xmc_glitch+set}" = set; then
9999   enableval="$enable_xmc_glitch"
10000
10001 else
10002   enable_xmc_glitch=$with_develop
10003 fi;
10004 echo "$as_me:10004: result: $enable_xmc_glitch" >&5
10005 echo "${ECHO_T}$enable_xmc_glitch" >&6
10006 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10007 #define USE_XMC_SUPPORT 1
10008 EOF
10009
10010 ###############################################################################
10011 # These are just experimental, probably should not be in a package:
10012
10013 echo "$as_me:10013: checking if you do not want to assume colors are white-on-black" >&5
10014 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10015
10016 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10017 if test "${enable_assumed_color+set}" = set; then
10018   enableval="$enable_assumed_color"
10019   with_assumed_color=$enableval
10020 else
10021   with_assumed_color=yes
10022 fi;
10023 echo "$as_me:10023: result: $with_assumed_color" >&5
10024 echo "${ECHO_T}$with_assumed_color" >&6
10025 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10026 #define USE_ASSUMED_COLOR 1
10027 EOF
10028
10029 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10030 echo "$as_me:10030: checking if you want hashmap scrolling-optimization code" >&5
10031 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10032
10033 # Check whether --enable-hashmap or --disable-hashmap was given.
10034 if test "${enable_hashmap+set}" = set; then
10035   enableval="$enable_hashmap"
10036   with_hashmap=$enableval
10037 else
10038   with_hashmap=yes
10039 fi;
10040 echo "$as_me:10040: result: $with_hashmap" >&5
10041 echo "${ECHO_T}$with_hashmap" >&6
10042 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10043 #define USE_HASHMAP 1
10044 EOF
10045
10046 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10047 echo "$as_me:10047: checking if you want colorfgbg code" >&5
10048 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10049
10050 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10051 if test "${enable_colorfgbg+set}" = set; then
10052   enableval="$enable_colorfgbg"
10053   with_colorfgbg=$enableval
10054 else
10055   with_colorfgbg=no
10056 fi;
10057 echo "$as_me:10057: result: $with_colorfgbg" >&5
10058 echo "${ECHO_T}$with_colorfgbg" >&6
10059 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10060 #define USE_COLORFGBG 1
10061 EOF
10062
10063 # This is still experimental (20080329), but should ultimately be moved to
10064 # the script-block --with-normal, etc.
10065
10066 echo "$as_me:10066: checking if you want to link with the pthread library" >&5
10067 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10068
10069 # Check whether --with-pthread or --without-pthread was given.
10070 if test "${with_pthread+set}" = set; then
10071   withval="$with_pthread"
10072   with_pthread=$withval
10073 else
10074   with_pthread=no
10075 fi;
10076 echo "$as_me:10076: result: $with_pthread" >&5
10077 echo "${ECHO_T}$with_pthread" >&6
10078
10079 if test "$with_pthread" != no ; then
10080     echo "$as_me:10080: checking for pthread.h" >&5
10081 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10082 if test "${ac_cv_header_pthread_h+set}" = set; then
10083   echo $ECHO_N "(cached) $ECHO_C" >&6
10084 else
10085   cat >conftest.$ac_ext <<_ACEOF
10086 #line 10086 "configure"
10087 #include "confdefs.h"
10088 #include <pthread.h>
10089 _ACEOF
10090 if { (eval echo "$as_me:10090: \"$ac_cpp conftest.$ac_ext\"") >&5
10091   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10092   ac_status=$?
10093   egrep -v '^ *\+' conftest.er1 >conftest.err
10094   rm -f conftest.er1
10095   cat conftest.err >&5
10096   echo "$as_me:10096: \$? = $ac_status" >&5
10097   (exit $ac_status); } >/dev/null; then
10098   if test -s conftest.err; then
10099     ac_cpp_err=$ac_c_preproc_warn_flag
10100   else
10101     ac_cpp_err=
10102   fi
10103 else
10104   ac_cpp_err=yes
10105 fi
10106 if test -z "$ac_cpp_err"; then
10107   ac_cv_header_pthread_h=yes
10108 else
10109   echo "$as_me: failed program was:" >&5
10110   cat conftest.$ac_ext >&5
10111   ac_cv_header_pthread_h=no
10112 fi
10113 rm -f conftest.err conftest.$ac_ext
10114 fi
10115 echo "$as_me:10115: result: $ac_cv_header_pthread_h" >&5
10116 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10117 if test $ac_cv_header_pthread_h = yes; then
10118
10119         cat >>confdefs.h <<\EOF
10120 #define HAVE_PTHREADS_H 1
10121 EOF
10122
10123         echo "$as_me:10123: checking if we can link with the pthread library" >&5
10124 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10125         cf_save_LIBS="$LIBS"
10126         LIBS="-lpthread $LIBS"
10127         cat >conftest.$ac_ext <<_ACEOF
10128 #line 10128 "configure"
10129 #include "confdefs.h"
10130
10131 #include <pthread.h>
10132
10133 int
10134 main ()
10135 {
10136
10137         int rc = pthread_create(0,0,0,0);
10138
10139   ;
10140   return 0;
10141 }
10142 _ACEOF
10143 rm -f conftest.$ac_objext conftest$ac_exeext
10144 if { (eval echo "$as_me:10144: \"$ac_link\"") >&5
10145   (eval $ac_link) 2>&5
10146   ac_status=$?
10147   echo "$as_me:10147: \$? = $ac_status" >&5
10148   (exit $ac_status); } &&
10149          { ac_try='test -s conftest$ac_exeext'
10150   { (eval echo "$as_me:10150: \"$ac_try\"") >&5
10151   (eval $ac_try) 2>&5
10152   ac_status=$?
10153   echo "$as_me:10153: \$? = $ac_status" >&5
10154   (exit $ac_status); }; }; then
10155   with_pthread=yes
10156 else
10157   echo "$as_me: failed program was:" >&5
10158 cat conftest.$ac_ext >&5
10159 with_pthread=no
10160 fi
10161 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10162         LIBS="$cf_save_LIBS"
10163         echo "$as_me:10163: result: $with_pthread" >&5
10164 echo "${ECHO_T}$with_pthread" >&6
10165
10166         if test "$with_pthread" = yes ; then
10167             LIBS="-lpthread $LIBS"
10168             cat >>confdefs.h <<\EOF
10169 #define HAVE_LIBPTHREADS 1
10170 EOF
10171
10172         else
10173             { { echo "$as_me:10173: error: Cannot link with pthread library" >&5
10174 echo "$as_me: error: Cannot link with pthread library" >&2;}
10175    { (exit 1); exit 1; }; }
10176         fi
10177
10178 fi
10179
10180 fi
10181
10182 echo "$as_me:10182: checking if you want to use weak-symbols for pthreads" >&5
10183 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10184
10185 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10186 if test "${enable_weak_symbols+set}" = set; then
10187   enableval="$enable_weak_symbols"
10188   use_weak_symbols=$withval
10189 else
10190   use_weak_symbols=no
10191 fi;
10192 echo "$as_me:10192: result: $use_weak_symbols" >&5
10193 echo "${ECHO_T}$use_weak_symbols" >&6
10194 if test "$use_weak_symbols" = yes ; then
10195
10196 echo "$as_me:10196: checking if $CC supports weak symbols" >&5
10197 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10198 if test "${cf_cv_weak_symbols+set}" = set; then
10199   echo $ECHO_N "(cached) $ECHO_C" >&6
10200 else
10201
10202 cat >conftest.$ac_ext <<_ACEOF
10203 #line 10203 "configure"
10204 #include "confdefs.h"
10205
10206 #include <stdio.h>
10207 int
10208 main ()
10209 {
10210
10211 #if defined(__GNUC__)
10212 #  if defined __USE_ISOC99
10213 #    define _cat_pragma(exp)    _Pragma(#exp)
10214 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10215 #  else
10216 #    define _weak_pragma(exp)
10217 #  endif
10218 #  define _declare(name)        __extension__ extern __typeof__(name) name
10219 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10220 #endif
10221
10222 weak_symbol(fopen);
10223
10224   ;
10225   return 0;
10226 }
10227 _ACEOF
10228 rm -f conftest.$ac_objext
10229 if { (eval echo "$as_me:10229: \"$ac_compile\"") >&5
10230   (eval $ac_compile) 2>&5
10231   ac_status=$?
10232   echo "$as_me:10232: \$? = $ac_status" >&5
10233   (exit $ac_status); } &&
10234          { ac_try='test -s conftest.$ac_objext'
10235   { (eval echo "$as_me:10235: \"$ac_try\"") >&5
10236   (eval $ac_try) 2>&5
10237   ac_status=$?
10238   echo "$as_me:10238: \$? = $ac_status" >&5
10239   (exit $ac_status); }; }; then
10240   cf_cv_weak_symbols=yes
10241 else
10242   echo "$as_me: failed program was:" >&5
10243 cat conftest.$ac_ext >&5
10244 cf_cv_weak_symbols=no
10245 fi
10246 rm -f conftest.$ac_objext conftest.$ac_ext
10247
10248 fi
10249 echo "$as_me:10249: result: $cf_cv_weak_symbols" >&5
10250 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10251
10252 else
10253     cf_cv_weak_symbols=no
10254 fi
10255
10256 if test $cf_cv_weak_symbols = yes ; then
10257     cat >>confdefs.h <<\EOF
10258 #define USE_WEAK_SYMBOLS 1
10259 EOF
10260
10261 fi
10262
10263 PTHREAD=
10264 if test "$with_pthread" = "yes" ; then
10265     cat >>confdefs.h <<\EOF
10266 #define USE_PTHREADS 1
10267 EOF
10268
10269     enable_reentrant=yes
10270     if test $cf_cv_weak_symbols = yes ; then
10271         PTHREAD=-lpthread
10272     fi
10273 fi
10274
10275 # Reentrant code has to be opaque; there's little advantage to making ncurses
10276 # opaque outside of that, so there is no --enable-opaque option.  We can use
10277 # this option without --with-pthreads, but this will be always set for
10278 # pthreads.
10279 echo "$as_me:10279: checking if you want experimental reentrant code" >&5
10280 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10281
10282 # Check whether --enable-reentrant or --disable-reentrant was given.
10283 if test "${enable_reentrant+set}" = set; then
10284   enableval="$enable_reentrant"
10285   with_reentrant=$enableval
10286 else
10287   with_reentrant=no
10288 fi;
10289 echo "$as_me:10289: result: $with_reentrant" >&5
10290 echo "${ECHO_T}$with_reentrant" >&6
10291 if test "$with_reentrant" = yes ; then
10292         cf_cv_enable_reentrant=1
10293         cf_cv_enable_opaque="NCURSES_INTERNALS"
10294         NCURSES_OPAQUE=1
10295         NCURSES_SIZE_T=int
10296         if test $cf_cv_weak_symbols = yes ; then
10297
10298 # remove pthread library from $LIBS
10299 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10300
10301         else
10302                 LIB_SUFFIX="t${LIB_SUFFIX}"
10303         fi
10304         cat >>confdefs.h <<\EOF
10305 #define USE_REENTRANT 1
10306 EOF
10307
10308 if test "${with_abi_version+set}" != set; then
10309         case $cf_cv_rel_version in
10310         5.*)
10311                 cf_cv_rel_version=6.0
10312                 cf_cv_abi_version=6
10313                 { echo "$as_me:10313: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10314 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10315                 ;;
10316         esac
10317 fi
10318
10319 else
10320         cf_cv_enable_reentrant=0
10321         cf_cv_enable_opaque="NCURSES_OPAQUE"
10322         NCURSES_OPAQUE=0
10323         NCURSES_SIZE_T=short
10324 fi
10325
10326 ### Allow using a different wrap-prefix
10327 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10328         echo "$as_me:10328: checking for prefix used to wrap public variables" >&5
10329 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10330
10331 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10332 if test "${with_wrap_prefix+set}" = set; then
10333   withval="$with_wrap_prefix"
10334   NCURSES_WRAP_PREFIX=$withval
10335 else
10336   NCURSES_WRAP_PREFIX=_nc_
10337 fi;
10338         echo "$as_me:10338: result: $NCURSES_WRAP_PREFIX" >&5
10339 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10340 else
10341         NCURSES_WRAP_PREFIX=_nc_
10342 fi
10343
10344 cat >>confdefs.h <<EOF
10345 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10346 EOF
10347
10348 echo "$as_me:10348: checking if you want experimental safe-sprintf code" >&5
10349 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10350
10351 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10352 if test "${enable_safe_sprintf+set}" = set; then
10353   enableval="$enable_safe_sprintf"
10354   with_safe_sprintf=$enableval
10355 else
10356   with_safe_sprintf=no
10357 fi;
10358 echo "$as_me:10358: result: $with_safe_sprintf" >&5
10359 echo "${ECHO_T}$with_safe_sprintf" >&6
10360 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10361 #define USE_SAFE_SPRINTF 1
10362 EOF
10363
10364 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10365 # when hashmap is used scroll hints are useless
10366 if test "$with_hashmap" = no ; then
10367 echo "$as_me:10367: checking if you want to experiment without scrolling-hints code" >&5
10368 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10369
10370 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10371 if test "${enable_scroll_hints+set}" = set; then
10372   enableval="$enable_scroll_hints"
10373   with_scroll_hints=$enableval
10374 else
10375   with_scroll_hints=yes
10376 fi;
10377 echo "$as_me:10377: result: $with_scroll_hints" >&5
10378 echo "${ECHO_T}$with_scroll_hints" >&6
10379 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10380 #define USE_SCROLL_HINTS 1
10381 EOF
10382
10383 fi
10384
10385 echo "$as_me:10385: checking if you want experimental wgetch-events code" >&5
10386 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10387
10388 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10389 if test "${enable_wgetch_events+set}" = set; then
10390   enableval="$enable_wgetch_events"
10391   with_wgetch_events=$enableval
10392 else
10393   with_wgetch_events=no
10394 fi;
10395 echo "$as_me:10395: result: $with_wgetch_events" >&5
10396 echo "${ECHO_T}$with_wgetch_events" >&6
10397 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10398 #define NCURSES_WGETCH_EVENTS 1
10399 EOF
10400
10401 ###############################################################################
10402
10403 ###     use option --disable-echo to suppress full display compiling commands
10404 echo "$as_me:10404: checking if you want to display full commands during build" >&5
10405 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10406
10407 # Check whether --enable-echo or --disable-echo was given.
10408 if test "${enable_echo+set}" = set; then
10409   enableval="$enable_echo"
10410   with_echo=$enableval
10411 else
10412   with_echo=yes
10413 fi;
10414 if test "$with_echo" = yes; then
10415         ECHO_LINK=
10416 else
10417         ECHO_LINK='@ echo linking $@ ... ;'
10418         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10419         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10420 fi
10421 echo "$as_me:10421: result: $with_echo" >&5
10422 echo "${ECHO_T}$with_echo" >&6
10423
10424 ###     use option --enable-warnings to turn on all gcc warnings
10425 echo "$as_me:10425: checking if you want to see compiler warnings" >&5
10426 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10427
10428 # Check whether --enable-warnings or --disable-warnings was given.
10429 if test "${enable_warnings+set}" = set; then
10430   enableval="$enable_warnings"
10431   with_warnings=$enableval
10432 fi;
10433 echo "$as_me:10433: result: $with_warnings" >&5
10434 echo "${ECHO_T}$with_warnings" >&6
10435
10436 if test "x$with_warnings" = "xyes"; then
10437         ADAFLAGS="$ADAFLAGS -gnatg"
10438
10439 INTEL_COMPILER=no
10440
10441 if test "$GCC" = yes ; then
10442         case $host_os in
10443         linux*|gnu*)
10444                 echo "$as_me:10444: checking if this is really Intel C compiler" >&5
10445 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10446                 cf_save_CFLAGS="$CFLAGS"
10447                 CFLAGS="$CFLAGS -no-gcc"
10448                 cat >conftest.$ac_ext <<_ACEOF
10449 #line 10449 "configure"
10450 #include "confdefs.h"
10451
10452 int
10453 main ()
10454 {
10455
10456 #ifdef __INTEL_COMPILER
10457 #else
10458 make an error
10459 #endif
10460
10461   ;
10462   return 0;
10463 }
10464 _ACEOF
10465 rm -f conftest.$ac_objext
10466 if { (eval echo "$as_me:10466: \"$ac_compile\"") >&5
10467   (eval $ac_compile) 2>&5
10468   ac_status=$?
10469   echo "$as_me:10469: \$? = $ac_status" >&5
10470   (exit $ac_status); } &&
10471          { ac_try='test -s conftest.$ac_objext'
10472   { (eval echo "$as_me:10472: \"$ac_try\"") >&5
10473   (eval $ac_try) 2>&5
10474   ac_status=$?
10475   echo "$as_me:10475: \$? = $ac_status" >&5
10476   (exit $ac_status); }; }; then
10477   INTEL_COMPILER=yes
10478 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10479
10480 else
10481   echo "$as_me: failed program was:" >&5
10482 cat conftest.$ac_ext >&5
10483 fi
10484 rm -f conftest.$ac_objext conftest.$ac_ext
10485                 CFLAGS="$cf_save_CFLAGS"
10486                 echo "$as_me:10486: result: $INTEL_COMPILER" >&5
10487 echo "${ECHO_T}$INTEL_COMPILER" >&6
10488                 ;;
10489         esac
10490 fi
10491
10492 cat > conftest.$ac_ext <<EOF
10493 #line 10493 "${as_me-configure}"
10494 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10495 EOF
10496
10497 if test "$INTEL_COMPILER" = yes
10498 then
10499 # The "-wdXXX" options suppress warnings:
10500 # remark #1419: external declaration in primary source file
10501 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10502 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10503 # remark #193: zero used for undefined preprocessing identifier
10504 # remark #593: variable "curs_sb_left_arrow" was set but never used
10505 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10506 # remark #869: parameter "tw" was never referenced
10507 # remark #981: operands are evaluated in unspecified order
10508 # warning #279: controlling expression is constant
10509
10510         { echo "$as_me:10510: checking for $CC warning options..." >&5
10511 echo "$as_me: checking for $CC warning options..." >&6;}
10512         cf_save_CFLAGS="$CFLAGS"
10513         EXTRA_CFLAGS="-Wall"
10514         for cf_opt in \
10515                 wd1419 \
10516                 wd1683 \
10517                 wd1684 \
10518                 wd193 \
10519                 wd593 \
10520                 wd279 \
10521                 wd810 \
10522                 wd869 \
10523                 wd981
10524         do
10525                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10526                 if { (eval echo "$as_me:10526: \"$ac_compile\"") >&5
10527   (eval $ac_compile) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit $ac_status); }; then
10531                         test -n "$verbose" && echo "$as_me:10531: result: ... -$cf_opt" >&5
10532 echo "${ECHO_T}... -$cf_opt" >&6
10533                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10534                 fi
10535         done
10536         CFLAGS="$cf_save_CFLAGS"
10537
10538 elif test "$GCC" = yes
10539 then
10540         { echo "$as_me:10540: checking for $CC warning options..." >&5
10541 echo "$as_me: checking for $CC warning options..." >&6;}
10542         cf_save_CFLAGS="$CFLAGS"
10543         EXTRA_CFLAGS="-W -Wall"
10544         cf_warn_CONST=""
10545         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10546         for cf_opt in \
10547                 Wbad-function-cast \
10548                 Wcast-align \
10549                 Wcast-qual \
10550                 Winline \
10551                 Wmissing-declarations \
10552                 Wmissing-prototypes \
10553                 Wnested-externs \
10554                 Wpointer-arith \
10555                 Wshadow \
10556                 Wstrict-prototypes \
10557                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10558         do
10559                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10560                 if { (eval echo "$as_me:10560: \"$ac_compile\"") >&5
10561   (eval $ac_compile) 2>&5
10562   ac_status=$?
10563   echo "$as_me:10563: \$? = $ac_status" >&5
10564   (exit $ac_status); }; then
10565                         test -n "$verbose" && echo "$as_me:10565: result: ... -$cf_opt" >&5
10566 echo "${ECHO_T}... -$cf_opt" >&6
10567                         case $cf_opt in #(vi
10568                         Wcast-qual) #(vi
10569                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10570                                 ;;
10571                         Winline) #(vi
10572                                 case $GCC_VERSION in
10573                                 [34].*)
10574                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10575
10576 echo "${as_me-configure}:10576: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10577
10578                                         continue;;
10579                                 esac
10580                                 ;;
10581                         esac
10582                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10583                 fi
10584         done
10585         CFLAGS="$cf_save_CFLAGS"
10586 fi
10587 rm -f conftest*
10588
10589         if test "$cf_with_cxx" = yes ; then
10590
10591 INTEL_CPLUSPLUS=no
10592
10593 if test "$GCC" = yes ; then
10594         case $host_os in
10595         linux*|gnu*)
10596                 echo "$as_me:10596: checking if this is really Intel C++ compiler" >&5
10597 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10598                 cf_save_CFLAGS="$CXXFLAGS"
10599                 CXXFLAGS="$CXXFLAGS -no-gcc"
10600                 cat >conftest.$ac_ext <<_ACEOF
10601 #line 10601 "configure"
10602 #include "confdefs.h"
10603
10604 int
10605 main ()
10606 {
10607
10608 #ifdef __INTEL_COMPILER
10609 #else
10610 make an error
10611 #endif
10612
10613   ;
10614   return 0;
10615 }
10616 _ACEOF
10617 rm -f conftest.$ac_objext
10618 if { (eval echo "$as_me:10618: \"$ac_compile\"") >&5
10619   (eval $ac_compile) 2>&5
10620   ac_status=$?
10621   echo "$as_me:10621: \$? = $ac_status" >&5
10622   (exit $ac_status); } &&
10623          { ac_try='test -s conftest.$ac_objext'
10624   { (eval echo "$as_me:10624: \"$ac_try\"") >&5
10625   (eval $ac_try) 2>&5
10626   ac_status=$?
10627   echo "$as_me:10627: \$? = $ac_status" >&5
10628   (exit $ac_status); }; }; then
10629   INTEL_CPLUSPLUS=yes
10630 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10631
10632 else
10633   echo "$as_me: failed program was:" >&5
10634 cat conftest.$ac_ext >&5
10635 fi
10636 rm -f conftest.$ac_objext conftest.$ac_ext
10637                 CXXFLAGS="$cf_save_CFLAGS"
10638                 echo "$as_me:10638: result: $INTEL_CPLUSPLUS" >&5
10639 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10640                 ;;
10641         esac
10642 fi
10643
10644 ac_ext=cc
10645 ac_cpp='$CXXCPP $CPPFLAGS'
10646 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10647 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10648 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10649 ac_main_return=return
10650
10651 cat > conftest.$ac_ext <<EOF
10652 #line 10652 "configure"
10653 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10654 EOF
10655
10656 if test "$INTEL_CPLUSPLUS" = yes
10657 then
10658 # The "-wdXXX" options suppress warnings:
10659 # remark #1419: external declaration in primary source file
10660 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10661 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10662 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10663 # remark #193: zero used for undefined preprocessing identifier
10664 # remark #593: variable "curs_sb_left_arrow" was set but never used
10665 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10666 # remark #869: parameter "tw" was never referenced
10667 # remark #981: operands are evaluated in unspecified order
10668 # warning #269: invalid format string conversion
10669
10670         { echo "$as_me:10670: checking for $CC warning options..." >&5
10671 echo "$as_me: checking for $CC warning options..." >&6;}
10672         cf_save_CXXFLAGS="$CXXFLAGS"
10673         EXTRA_CXXFLAGS="-Wall"
10674         for cf_opt in \
10675                 wd1419 \
10676                 wd1682 \
10677                 wd1683 \
10678                 wd1684 \
10679                 wd193 \
10680                 wd279 \
10681                 wd593 \
10682                 wd810 \
10683                 wd869 \
10684                 wd981
10685         do
10686                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10687                 if { (eval echo "$as_me:10687: \"$ac_compile\"") >&5
10688   (eval $ac_compile) 2>&5
10689   ac_status=$?
10690   echo "$as_me:10690: \$? = $ac_status" >&5
10691   (exit $ac_status); }; then
10692                         test -n "$verbose" && echo "$as_me:10692: result: ... -$cf_opt" >&5
10693 echo "${ECHO_T}... -$cf_opt" >&6
10694                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10695                 fi
10696         done
10697         CXXFLAGS="$cf_save_CXXFLAGS"
10698
10699 elif test "$GXX" = yes
10700 then
10701         { echo "$as_me:10701: checking for $CXX warning options..." >&5
10702 echo "$as_me: checking for $CXX warning options..." >&6;}
10703         cf_save_CXXFLAGS="$CXXFLAGS"
10704         EXTRA_CXXFLAGS="-W -Wall"
10705         cf_gxx_extra_warnings=""
10706         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10707         case "$GCC_VERSION" in
10708         [1-2].*)
10709                 ;;
10710         *)
10711                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10712                 ;;
10713         esac
10714         for cf_opt in \
10715                 Wabi \
10716                 fabi-version=0 \
10717                 Woverloaded-virtual \
10718                 Wsign-promo \
10719                 Wsynth \
10720                 Wold-style-cast \
10721                 Wcast-align \
10722                 Wcast-qual \
10723                 Wmissing-prototypes \
10724                 Wpointer-arith \
10725                 Wshadow \
10726                 Wstrict-prototypes \
10727                 Wundef $cf_gxx_extra_warnings Wno-unused
10728         do
10729                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10730                 if { (eval echo "$as_me:10730: \"$ac_compile\"") >&5
10731   (eval $ac_compile) 2>&5
10732   ac_status=$?
10733   echo "$as_me:10733: \$? = $ac_status" >&5
10734   (exit $ac_status); }; then
10735                         test -n "$verbose" && echo "$as_me:10735: result: ... -$cf_opt" >&5
10736 echo "${ECHO_T}... -$cf_opt" >&6
10737                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10738                 else
10739                         test -n "$verbose" && echo "$as_me:10739: result: ... no -$cf_opt" >&5
10740 echo "${ECHO_T}... no -$cf_opt" >&6
10741                 fi
10742         done
10743         CXXFLAGS="$cf_save_CXXFLAGS"
10744 fi
10745
10746 rm -f conftest*
10747 ac_ext=c
10748 ac_cpp='$CPP $CPPFLAGS'
10749 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10750 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10751 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10752 ac_main_return=return
10753
10754         fi
10755 fi
10756
10757 if test "$GCC" = yes
10758 then
10759 cat > conftest.i <<EOF
10760 #ifndef GCC_PRINTF
10761 #define GCC_PRINTF 0
10762 #endif
10763 #ifndef GCC_SCANF
10764 #define GCC_SCANF 0
10765 #endif
10766 #ifndef GCC_NORETURN
10767 #define GCC_NORETURN /* nothing */
10768 #endif
10769 #ifndef GCC_UNUSED
10770 #define GCC_UNUSED /* nothing */
10771 #endif
10772 EOF
10773 if test "$GCC" = yes
10774 then
10775         { echo "$as_me:10775: checking for $CC __attribute__ directives..." >&5
10776 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10777 cat > conftest.$ac_ext <<EOF
10778 #line 10778 "${as_me-configure}"
10779 #include "confdefs.h"
10780 #include "conftest.h"
10781 #include "conftest.i"
10782 #if     GCC_PRINTF
10783 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10784 #else
10785 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10786 #endif
10787 #if     GCC_SCANF
10788 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10789 #else
10790 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10791 #endif
10792 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10793 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10794 extern void foo(void) GCC_NORETURN;
10795 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10796 EOF
10797         for cf_attribute in scanf printf unused noreturn
10798         do
10799
10800 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10801
10802                 cf_directive="__attribute__(($cf_attribute))"
10803                 echo "checking for $CC $cf_directive" 1>&5
10804                 case $cf_attribute in
10805                 scanf|printf)
10806                 cat >conftest.h <<EOF
10807 #define GCC_$cf_ATTRIBUTE 1
10808 EOF
10809                         ;;
10810                 *)
10811                 cat >conftest.h <<EOF
10812 #define GCC_$cf_ATTRIBUTE $cf_directive
10813 EOF
10814                         ;;
10815                 esac
10816                 if { (eval echo "$as_me:10816: \"$ac_compile\"") >&5
10817   (eval $ac_compile) 2>&5
10818   ac_status=$?
10819   echo "$as_me:10819: \$? = $ac_status" >&5
10820   (exit $ac_status); }; then
10821                         test -n "$verbose" && echo "$as_me:10821: result: ... $cf_attribute" >&5
10822 echo "${ECHO_T}... $cf_attribute" >&6
10823                         cat conftest.h >>confdefs.h
10824                 fi
10825         done
10826 else
10827         fgrep define conftest.i >>confdefs.h
10828 fi
10829 rm -rf conftest*
10830 fi
10831
10832 ###     use option --enable-assertions to turn on generation of assertion code
10833 echo "$as_me:10833: checking if you want to enable runtime assertions" >&5
10834 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10835
10836 # Check whether --enable-assertions or --disable-assertions was given.
10837 if test "${enable_assertions+set}" = set; then
10838   enableval="$enable_assertions"
10839   with_assertions=$enableval
10840 else
10841   with_assertions=no
10842 fi;
10843 echo "$as_me:10843: result: $with_assertions" >&5
10844 echo "${ECHO_T}$with_assertions" >&6
10845 if test -n "$GCC"
10846 then
10847         if test "$with_assertions" = no
10848         then
10849                 cat >>confdefs.h <<\EOF
10850 #define NDEBUG 1
10851 EOF
10852
10853                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10854         else
10855                 ADAFLAGS="$ADAFLAGS -gnata"
10856         fi
10857 fi
10858
10859 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10860
10861 echo "$as_me:10861: checking if you want to use dmalloc for testing" >&5
10862 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10863
10864 # Check whether --with-dmalloc or --without-dmalloc was given.
10865 if test "${with_dmalloc+set}" = set; then
10866   withval="$with_dmalloc"
10867   cat >>confdefs.h <<\EOF
10868 #define USE_DMALLOC 1
10869 EOF
10870
10871         : ${with_cflags:=-g}
10872         : ${with_no_leaks:=yes}
10873          with_dmalloc=yes
10874 else
10875   with_dmalloc=
10876 fi;
10877 echo "$as_me:10877: result: ${with_dmalloc:-no}" >&5
10878 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10879
10880 case .$with_cflags in #(vi
10881 .*-g*)
10882         case .$CFLAGS in #(vi
10883         .*-g*) #(vi
10884                 ;;
10885         *)
10886
10887 cf_fix_cppflags=no
10888 cf_new_cflags=
10889 cf_new_cppflags=
10890 cf_new_extra_cppflags=
10891
10892 for cf_add_cflags in -g
10893 do
10894 case $cf_fix_cppflags in
10895 no)
10896         case $cf_add_cflags in #(vi
10897         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10898                 case $cf_add_cflags in
10899                 -D*)
10900                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10901
10902                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10903                         && test -z "${cf_tst_cflags}" \
10904                         && cf_fix_cppflags=yes
10905
10906                         if test $cf_fix_cppflags = yes ; then
10907                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10908                                 continue
10909                         elif test "${cf_tst_cflags}" = "\"'" ; then
10910                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10911                                 continue
10912                         fi
10913                         ;;
10914                 esac
10915                 case "$CPPFLAGS" in
10916                 *$cf_add_cflags) #(vi
10917                         ;;
10918                 *) #(vi
10919                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10920                         ;;
10921                 esac
10922                 ;;
10923         *)
10924                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10925                 ;;
10926         esac
10927         ;;
10928 yes)
10929         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10930
10931         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10932
10933         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10934         && test -z "${cf_tst_cflags}" \
10935         && cf_fix_cppflags=no
10936         ;;
10937 esac
10938 done
10939
10940 if test -n "$cf_new_cflags" ; then
10941
10942         CFLAGS="$CFLAGS $cf_new_cflags"
10943 fi
10944
10945 if test -n "$cf_new_cppflags" ; then
10946
10947         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10948 fi
10949
10950 if test -n "$cf_new_extra_cppflags" ; then
10951
10952         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10953 fi
10954
10955                 ;;
10956         esac
10957         ;;
10958 esac
10959
10960 if test "$with_dmalloc" = yes ; then
10961         echo "$as_me:10961: checking for dmalloc.h" >&5
10962 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10963 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10964   echo $ECHO_N "(cached) $ECHO_C" >&6
10965 else
10966   cat >conftest.$ac_ext <<_ACEOF
10967 #line 10967 "configure"
10968 #include "confdefs.h"
10969 #include <dmalloc.h>
10970 _ACEOF
10971 if { (eval echo "$as_me:10971: \"$ac_cpp conftest.$ac_ext\"") >&5
10972   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10973   ac_status=$?
10974   egrep -v '^ *\+' conftest.er1 >conftest.err
10975   rm -f conftest.er1
10976   cat conftest.err >&5
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit $ac_status); } >/dev/null; then
10979   if test -s conftest.err; then
10980     ac_cpp_err=$ac_c_preproc_warn_flag
10981   else
10982     ac_cpp_err=
10983   fi
10984 else
10985   ac_cpp_err=yes
10986 fi
10987 if test -z "$ac_cpp_err"; then
10988   ac_cv_header_dmalloc_h=yes
10989 else
10990   echo "$as_me: failed program was:" >&5
10991   cat conftest.$ac_ext >&5
10992   ac_cv_header_dmalloc_h=no
10993 fi
10994 rm -f conftest.err conftest.$ac_ext
10995 fi
10996 echo "$as_me:10996: result: $ac_cv_header_dmalloc_h" >&5
10997 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10998 if test $ac_cv_header_dmalloc_h = yes; then
10999
11000 echo "$as_me:11000: checking for dmalloc_debug in -ldmalloc" >&5
11001 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11002 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11003   echo $ECHO_N "(cached) $ECHO_C" >&6
11004 else
11005   ac_check_lib_save_LIBS=$LIBS
11006 LIBS="-ldmalloc  $LIBS"
11007 cat >conftest.$ac_ext <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010
11011 /* Override any gcc2 internal prototype to avoid an error.  */
11012 #ifdef __cplusplus
11013 extern "C"
11014 #endif
11015 /* We use char because int might match the return type of a gcc2
11016    builtin and then its argument prototype would still apply.  */
11017 char dmalloc_debug ();
11018 int
11019 main ()
11020 {
11021 dmalloc_debug ();
11022   ;
11023   return 0;
11024 }
11025 _ACEOF
11026 rm -f conftest.$ac_objext conftest$ac_exeext
11027 if { (eval echo "$as_me:11027: \"$ac_link\"") >&5
11028   (eval $ac_link) 2>&5
11029   ac_status=$?
11030   echo "$as_me:11030: \$? = $ac_status" >&5
11031   (exit $ac_status); } &&
11032          { ac_try='test -s conftest$ac_exeext'
11033   { (eval echo "$as_me:11033: \"$ac_try\"") >&5
11034   (eval $ac_try) 2>&5
11035   ac_status=$?
11036   echo "$as_me:11036: \$? = $ac_status" >&5
11037   (exit $ac_status); }; }; then
11038   ac_cv_lib_dmalloc_dmalloc_debug=yes
11039 else
11040   echo "$as_me: failed program was:" >&5
11041 cat conftest.$ac_ext >&5
11042 ac_cv_lib_dmalloc_dmalloc_debug=no
11043 fi
11044 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11045 LIBS=$ac_check_lib_save_LIBS
11046 fi
11047 echo "$as_me:11047: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11048 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11049 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11050   cat >>confdefs.h <<EOF
11051 #define HAVE_LIBDMALLOC 1
11052 EOF
11053
11054   LIBS="-ldmalloc $LIBS"
11055
11056 fi
11057
11058 fi
11059
11060 fi
11061
11062 echo "$as_me:11062: checking if you want to use dbmalloc for testing" >&5
11063 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11064
11065 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11066 if test "${with_dbmalloc+set}" = set; then
11067   withval="$with_dbmalloc"
11068   cat >>confdefs.h <<\EOF
11069 #define USE_DBMALLOC 1
11070 EOF
11071
11072         : ${with_cflags:=-g}
11073         : ${with_no_leaks:=yes}
11074          with_dbmalloc=yes
11075 else
11076   with_dbmalloc=
11077 fi;
11078 echo "$as_me:11078: result: ${with_dbmalloc:-no}" >&5
11079 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11080
11081 case .$with_cflags in #(vi
11082 .*-g*)
11083         case .$CFLAGS in #(vi
11084         .*-g*) #(vi
11085                 ;;
11086         *)
11087
11088 cf_fix_cppflags=no
11089 cf_new_cflags=
11090 cf_new_cppflags=
11091 cf_new_extra_cppflags=
11092
11093 for cf_add_cflags in -g
11094 do
11095 case $cf_fix_cppflags in
11096 no)
11097         case $cf_add_cflags in #(vi
11098         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11099                 case $cf_add_cflags in
11100                 -D*)
11101                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11102
11103                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11104                         && test -z "${cf_tst_cflags}" \
11105                         && cf_fix_cppflags=yes
11106
11107                         if test $cf_fix_cppflags = yes ; then
11108                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11109                                 continue
11110                         elif test "${cf_tst_cflags}" = "\"'" ; then
11111                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11112                                 continue
11113                         fi
11114                         ;;
11115                 esac
11116                 case "$CPPFLAGS" in
11117                 *$cf_add_cflags) #(vi
11118                         ;;
11119                 *) #(vi
11120                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11121                         ;;
11122                 esac
11123                 ;;
11124         *)
11125                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11126                 ;;
11127         esac
11128         ;;
11129 yes)
11130         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11131
11132         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11133
11134         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11135         && test -z "${cf_tst_cflags}" \
11136         && cf_fix_cppflags=no
11137         ;;
11138 esac
11139 done
11140
11141 if test -n "$cf_new_cflags" ; then
11142
11143         CFLAGS="$CFLAGS $cf_new_cflags"
11144 fi
11145
11146 if test -n "$cf_new_cppflags" ; then
11147
11148         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11149 fi
11150
11151 if test -n "$cf_new_extra_cppflags" ; then
11152
11153         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11154 fi
11155
11156                 ;;
11157         esac
11158         ;;
11159 esac
11160
11161 if test "$with_dbmalloc" = yes ; then
11162         echo "$as_me:11162: checking for dbmalloc.h" >&5
11163 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11164 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11165   echo $ECHO_N "(cached) $ECHO_C" >&6
11166 else
11167   cat >conftest.$ac_ext <<_ACEOF
11168 #line 11168 "configure"
11169 #include "confdefs.h"
11170 #include <dbmalloc.h>
11171 _ACEOF
11172 if { (eval echo "$as_me:11172: \"$ac_cpp conftest.$ac_ext\"") >&5
11173   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11174   ac_status=$?
11175   egrep -v '^ *\+' conftest.er1 >conftest.err
11176   rm -f conftest.er1
11177   cat conftest.err >&5
11178   echo "$as_me:11178: \$? = $ac_status" >&5
11179   (exit $ac_status); } >/dev/null; then
11180   if test -s conftest.err; then
11181     ac_cpp_err=$ac_c_preproc_warn_flag
11182   else
11183     ac_cpp_err=
11184   fi
11185 else
11186   ac_cpp_err=yes
11187 fi
11188 if test -z "$ac_cpp_err"; then
11189   ac_cv_header_dbmalloc_h=yes
11190 else
11191   echo "$as_me: failed program was:" >&5
11192   cat conftest.$ac_ext >&5
11193   ac_cv_header_dbmalloc_h=no
11194 fi
11195 rm -f conftest.err conftest.$ac_ext
11196 fi
11197 echo "$as_me:11197: result: $ac_cv_header_dbmalloc_h" >&5
11198 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11199 if test $ac_cv_header_dbmalloc_h = yes; then
11200
11201 echo "$as_me:11201: checking for debug_malloc in -ldbmalloc" >&5
11202 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11203 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11204   echo $ECHO_N "(cached) $ECHO_C" >&6
11205 else
11206   ac_check_lib_save_LIBS=$LIBS
11207 LIBS="-ldbmalloc  $LIBS"
11208 cat >conftest.$ac_ext <<_ACEOF
11209 #line 11209 "configure"
11210 #include "confdefs.h"
11211
11212 /* Override any gcc2 internal prototype to avoid an error.  */
11213 #ifdef __cplusplus
11214 extern "C"
11215 #endif
11216 /* We use char because int might match the return type of a gcc2
11217    builtin and then its argument prototype would still apply.  */
11218 char debug_malloc ();
11219 int
11220 main ()
11221 {
11222 debug_malloc ();
11223   ;
11224   return 0;
11225 }
11226 _ACEOF
11227 rm -f conftest.$ac_objext conftest$ac_exeext
11228 if { (eval echo "$as_me:11228: \"$ac_link\"") >&5
11229   (eval $ac_link) 2>&5
11230   ac_status=$?
11231   echo "$as_me:11231: \$? = $ac_status" >&5
11232   (exit $ac_status); } &&
11233          { ac_try='test -s conftest$ac_exeext'
11234   { (eval echo "$as_me:11234: \"$ac_try\"") >&5
11235   (eval $ac_try) 2>&5
11236   ac_status=$?
11237   echo "$as_me:11237: \$? = $ac_status" >&5
11238   (exit $ac_status); }; }; then
11239   ac_cv_lib_dbmalloc_debug_malloc=yes
11240 else
11241   echo "$as_me: failed program was:" >&5
11242 cat conftest.$ac_ext >&5
11243 ac_cv_lib_dbmalloc_debug_malloc=no
11244 fi
11245 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11246 LIBS=$ac_check_lib_save_LIBS
11247 fi
11248 echo "$as_me:11248: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11249 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11250 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11251   cat >>confdefs.h <<EOF
11252 #define HAVE_LIBDBMALLOC 1
11253 EOF
11254
11255   LIBS="-ldbmalloc $LIBS"
11256
11257 fi
11258
11259 fi
11260
11261 fi
11262
11263 echo "$as_me:11263: checking if you want to use valgrind for testing" >&5
11264 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11265
11266 # Check whether --with-valgrind or --without-valgrind was given.
11267 if test "${with_valgrind+set}" = set; then
11268   withval="$with_valgrind"
11269   cat >>confdefs.h <<\EOF
11270 #define USE_VALGRIND 1
11271 EOF
11272
11273         : ${with_cflags:=-g}
11274         : ${with_no_leaks:=yes}
11275          with_valgrind=yes
11276 else
11277   with_valgrind=
11278 fi;
11279 echo "$as_me:11279: result: ${with_valgrind:-no}" >&5
11280 echo "${ECHO_T}${with_valgrind:-no}" >&6
11281
11282 case .$with_cflags in #(vi
11283 .*-g*)
11284         case .$CFLAGS in #(vi
11285         .*-g*) #(vi
11286                 ;;
11287         *)
11288
11289 cf_fix_cppflags=no
11290 cf_new_cflags=
11291 cf_new_cppflags=
11292 cf_new_extra_cppflags=
11293
11294 for cf_add_cflags in -g
11295 do
11296 case $cf_fix_cppflags in
11297 no)
11298         case $cf_add_cflags in #(vi
11299         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11300                 case $cf_add_cflags in
11301                 -D*)
11302                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11303
11304                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11305                         && test -z "${cf_tst_cflags}" \
11306                         && cf_fix_cppflags=yes
11307
11308                         if test $cf_fix_cppflags = yes ; then
11309                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11310                                 continue
11311                         elif test "${cf_tst_cflags}" = "\"'" ; then
11312                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11313                                 continue
11314                         fi
11315                         ;;
11316                 esac
11317                 case "$CPPFLAGS" in
11318                 *$cf_add_cflags) #(vi
11319                         ;;
11320                 *) #(vi
11321                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11322                         ;;
11323                 esac
11324                 ;;
11325         *)
11326                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11327                 ;;
11328         esac
11329         ;;
11330 yes)
11331         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11332
11333         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11334
11335         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11336         && test -z "${cf_tst_cflags}" \
11337         && cf_fix_cppflags=no
11338         ;;
11339 esac
11340 done
11341
11342 if test -n "$cf_new_cflags" ; then
11343
11344         CFLAGS="$CFLAGS $cf_new_cflags"
11345 fi
11346
11347 if test -n "$cf_new_cppflags" ; then
11348
11349         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11350 fi
11351
11352 if test -n "$cf_new_extra_cppflags" ; then
11353
11354         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11355 fi
11356
11357                 ;;
11358         esac
11359         ;;
11360 esac
11361
11362 echo "$as_me:11362: checking if you want to perform memory-leak testing" >&5
11363 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11364
11365 # Check whether --enable-leaks or --disable-leaks was given.
11366 if test "${enable_leaks+set}" = set; then
11367   enableval="$enable_leaks"
11368   with_no_leaks=yes
11369 else
11370   : ${with_no_leaks:=no}
11371 fi;
11372 echo "$as_me:11372: result: $with_no_leaks" >&5
11373 echo "${ECHO_T}$with_no_leaks" >&6
11374
11375 if test "$with_no_leaks" = yes ; then
11376         cat >>confdefs.h <<\EOF
11377 #define NO_LEAKS 1
11378 EOF
11379
11380 fi
11381
11382 cat >>confdefs.h <<\EOF
11383 #define HAVE_NC_ALLOC_H 1
11384 EOF
11385
11386 ###     use option --enable-expanded to generate certain macros as functions
11387
11388 # Check whether --enable-expanded or --disable-expanded was given.
11389 if test "${enable_expanded+set}" = set; then
11390   enableval="$enable_expanded"
11391   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11392 #define NCURSES_EXPANDED 1
11393 EOF
11394
11395 fi;
11396
11397 ###     use option --disable-macros to suppress macros in favor of functions
11398
11399 # Check whether --enable-macros or --disable-macros was given.
11400 if test "${enable_macros+set}" = set; then
11401   enableval="$enable_macros"
11402   test "$enableval" = no && cat >>confdefs.h <<\EOF
11403 #define NCURSES_NOMACROS 1
11404 EOF
11405
11406 fi;
11407
11408 # Normally we only add trace() to the debug-library.  Allow this to be
11409 # extended to all models of the ncurses library:
11410 cf_all_traces=no
11411 case "$CFLAGS $CPPFLAGS" in
11412 *-DTRACE*)
11413         cf_all_traces=yes
11414         ;;
11415 esac
11416
11417 echo "$as_me:11417: checking whether to add trace feature to all models" >&5
11418 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11419
11420 # Check whether --with-trace or --without-trace was given.
11421 if test "${with_trace+set}" = set; then
11422   withval="$with_trace"
11423   cf_with_trace=$withval
11424 else
11425   cf_with_trace=$cf_all_traces
11426 fi;
11427 echo "$as_me:11427: result: $cf_with_trace" >&5
11428 echo "${ECHO_T}$cf_with_trace" >&6
11429
11430 if test "$cf_with_trace" = yes ; then
11431         LIB_TRACING=all
11432         ADA_TRACE=TRUE
11433
11434 cf_fix_cppflags=no
11435 cf_new_cflags=
11436 cf_new_cppflags=
11437 cf_new_extra_cppflags=
11438
11439 for cf_add_cflags in -DTRACE
11440 do
11441 case $cf_fix_cppflags in
11442 no)
11443         case $cf_add_cflags in #(vi
11444         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11445                 case $cf_add_cflags in
11446                 -D*)
11447                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11448
11449                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11450                         && test -z "${cf_tst_cflags}" \
11451                         && cf_fix_cppflags=yes
11452
11453                         if test $cf_fix_cppflags = yes ; then
11454                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11455                                 continue
11456                         elif test "${cf_tst_cflags}" = "\"'" ; then
11457                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11458                                 continue
11459                         fi
11460                         ;;
11461                 esac
11462                 case "$CPPFLAGS" in
11463                 *$cf_add_cflags) #(vi
11464                         ;;
11465                 *) #(vi
11466                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11467                         ;;
11468                 esac
11469                 ;;
11470         *)
11471                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11472                 ;;
11473         esac
11474         ;;
11475 yes)
11476         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11477
11478         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11479
11480         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11481         && test -z "${cf_tst_cflags}" \
11482         && cf_fix_cppflags=no
11483         ;;
11484 esac
11485 done
11486
11487 if test -n "$cf_new_cflags" ; then
11488
11489         CFLAGS="$CFLAGS $cf_new_cflags"
11490 fi
11491
11492 if test -n "$cf_new_cppflags" ; then
11493
11494         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11495 fi
11496
11497 if test -n "$cf_new_extra_cppflags" ; then
11498
11499         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11500 fi
11501
11502 else
11503         LIB_TRACING=DEBUG
11504         ADA_TRACE=FALSE
11505 fi
11506
11507 ###     Checks for libraries.
11508 case $cf_cv_system_name in #(vi
11509 *mingw32*) #(vi
11510         ;;
11511 *)
11512 echo "$as_me:11512: checking for gettimeofday" >&5
11513 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11514 if test "${ac_cv_func_gettimeofday+set}" = set; then
11515   echo $ECHO_N "(cached) $ECHO_C" >&6
11516 else
11517   cat >conftest.$ac_ext <<_ACEOF
11518 #line 11518 "configure"
11519 #include "confdefs.h"
11520 /* System header to define __stub macros and hopefully few prototypes,
11521     which can conflict with char gettimeofday (); below.  */
11522 #include <assert.h>
11523 /* Override any gcc2 internal prototype to avoid an error.  */
11524 #ifdef __cplusplus
11525 extern "C"
11526 #endif
11527 /* We use char because int might match the return type of a gcc2
11528    builtin and then its argument prototype would still apply.  */
11529 char gettimeofday ();
11530 char (*f) ();
11531
11532 int
11533 main ()
11534 {
11535 /* The GNU C library defines this for functions which it implements
11536     to always fail with ENOSYS.  Some functions are actually named
11537     something starting with __ and the normal name is an alias.  */
11538 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11539 choke me
11540 #else
11541 f = gettimeofday;
11542 #endif
11543
11544   ;
11545   return 0;
11546 }
11547 _ACEOF
11548 rm -f conftest.$ac_objext conftest$ac_exeext
11549 if { (eval echo "$as_me:11549: \"$ac_link\"") >&5
11550   (eval $ac_link) 2>&5
11551   ac_status=$?
11552   echo "$as_me:11552: \$? = $ac_status" >&5
11553   (exit $ac_status); } &&
11554          { ac_try='test -s conftest$ac_exeext'
11555   { (eval echo "$as_me:11555: \"$ac_try\"") >&5
11556   (eval $ac_try) 2>&5
11557   ac_status=$?
11558   echo "$as_me:11558: \$? = $ac_status" >&5
11559   (exit $ac_status); }; }; then
11560   ac_cv_func_gettimeofday=yes
11561 else
11562   echo "$as_me: failed program was:" >&5
11563 cat conftest.$ac_ext >&5
11564 ac_cv_func_gettimeofday=no
11565 fi
11566 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11567 fi
11568 echo "$as_me:11568: result: $ac_cv_func_gettimeofday" >&5
11569 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11570 if test $ac_cv_func_gettimeofday = yes; then
11571   cat >>confdefs.h <<\EOF
11572 #define HAVE_GETTIMEOFDAY 1
11573 EOF
11574
11575 else
11576
11577 echo "$as_me:11577: checking for gettimeofday in -lbsd" >&5
11578 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11579 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11580   echo $ECHO_N "(cached) $ECHO_C" >&6
11581 else
11582   ac_check_lib_save_LIBS=$LIBS
11583 LIBS="-lbsd  $LIBS"
11584 cat >conftest.$ac_ext <<_ACEOF
11585 #line 11585 "configure"
11586 #include "confdefs.h"
11587
11588 /* Override any gcc2 internal prototype to avoid an error.  */
11589 #ifdef __cplusplus
11590 extern "C"
11591 #endif
11592 /* We use char because int might match the return type of a gcc2
11593    builtin and then its argument prototype would still apply.  */
11594 char gettimeofday ();
11595 int
11596 main ()
11597 {
11598 gettimeofday ();
11599   ;
11600   return 0;
11601 }
11602 _ACEOF
11603 rm -f conftest.$ac_objext conftest$ac_exeext
11604 if { (eval echo "$as_me:11604: \"$ac_link\"") >&5
11605   (eval $ac_link) 2>&5
11606   ac_status=$?
11607   echo "$as_me:11607: \$? = $ac_status" >&5
11608   (exit $ac_status); } &&
11609          { ac_try='test -s conftest$ac_exeext'
11610   { (eval echo "$as_me:11610: \"$ac_try\"") >&5
11611   (eval $ac_try) 2>&5
11612   ac_status=$?
11613   echo "$as_me:11613: \$? = $ac_status" >&5
11614   (exit $ac_status); }; }; then
11615   ac_cv_lib_bsd_gettimeofday=yes
11616 else
11617   echo "$as_me: failed program was:" >&5
11618 cat conftest.$ac_ext >&5
11619 ac_cv_lib_bsd_gettimeofday=no
11620 fi
11621 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11622 LIBS=$ac_check_lib_save_LIBS
11623 fi
11624 echo "$as_me:11624: result: $ac_cv_lib_bsd_gettimeofday" >&5
11625 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11626 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11627   cat >>confdefs.h <<\EOF
11628 #define HAVE_GETTIMEOFDAY 1
11629 EOF
11630
11631         LIBS="$LIBS -lbsd"
11632 fi
11633
11634 fi
11635         ;;
11636 esac
11637
11638 echo "$as_me:11638: checking if -lm needed for math functions" >&5
11639 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11640 if test "${cf_cv_need_libm+set}" = set; then
11641   echo $ECHO_N "(cached) $ECHO_C" >&6
11642 else
11643
11644         cat >conftest.$ac_ext <<_ACEOF
11645 #line 11645 "configure"
11646 #include "confdefs.h"
11647
11648         #include <stdio.h>
11649         #include <math.h>
11650
11651 int
11652 main ()
11653 {
11654 double x = rand(); printf("result = %g\n", sin(x))
11655   ;
11656   return 0;
11657 }
11658 _ACEOF
11659 rm -f conftest.$ac_objext conftest$ac_exeext
11660 if { (eval echo "$as_me:11660: \"$ac_link\"") >&5
11661   (eval $ac_link) 2>&5
11662   ac_status=$?
11663   echo "$as_me:11663: \$? = $ac_status" >&5
11664   (exit $ac_status); } &&
11665          { ac_try='test -s conftest$ac_exeext'
11666   { (eval echo "$as_me:11666: \"$ac_try\"") >&5
11667   (eval $ac_try) 2>&5
11668   ac_status=$?
11669   echo "$as_me:11669: \$? = $ac_status" >&5
11670   (exit $ac_status); }; }; then
11671   cf_cv_need_libm=no
11672 else
11673   echo "$as_me: failed program was:" >&5
11674 cat conftest.$ac_ext >&5
11675 cf_cv_need_libm=yes
11676 fi
11677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11678 fi
11679 echo "$as_me:11679: result: $cf_cv_need_libm" >&5
11680 echo "${ECHO_T}$cf_cv_need_libm" >&6
11681 if test "$cf_cv_need_libm" = yes
11682 then
11683 MATH_LIB=-lm
11684 fi
11685
11686 ###     Checks for header files.
11687 echo "$as_me:11687: checking for ANSI C header files" >&5
11688 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11689 if test "${ac_cv_header_stdc+set}" = set; then
11690   echo $ECHO_N "(cached) $ECHO_C" >&6
11691 else
11692   cat >conftest.$ac_ext <<_ACEOF
11693 #line 11693 "configure"
11694 #include "confdefs.h"
11695 #include <stdlib.h>
11696 #include <stdarg.h>
11697 #include <string.h>
11698 #include <float.h>
11699
11700 _ACEOF
11701 if { (eval echo "$as_me:11701: \"$ac_cpp conftest.$ac_ext\"") >&5
11702   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11703   ac_status=$?
11704   egrep -v '^ *\+' conftest.er1 >conftest.err
11705   rm -f conftest.er1
11706   cat conftest.err >&5
11707   echo "$as_me:11707: \$? = $ac_status" >&5
11708   (exit $ac_status); } >/dev/null; then
11709   if test -s conftest.err; then
11710     ac_cpp_err=$ac_c_preproc_warn_flag
11711   else
11712     ac_cpp_err=
11713   fi
11714 else
11715   ac_cpp_err=yes
11716 fi
11717 if test -z "$ac_cpp_err"; then
11718   ac_cv_header_stdc=yes
11719 else
11720   echo "$as_me: failed program was:" >&5
11721   cat conftest.$ac_ext >&5
11722   ac_cv_header_stdc=no
11723 fi
11724 rm -f conftest.err conftest.$ac_ext
11725
11726 if test $ac_cv_header_stdc = yes; then
11727   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11728   cat >conftest.$ac_ext <<_ACEOF
11729 #line 11729 "configure"
11730 #include "confdefs.h"
11731 #include <string.h>
11732
11733 _ACEOF
11734 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11735   egrep "memchr" >/dev/null 2>&1; then
11736   :
11737 else
11738   ac_cv_header_stdc=no
11739 fi
11740 rm -f conftest*
11741
11742 fi
11743
11744 if test $ac_cv_header_stdc = yes; then
11745   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11746   cat >conftest.$ac_ext <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749 #include <stdlib.h>
11750
11751 _ACEOF
11752 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11753   egrep "free" >/dev/null 2>&1; then
11754   :
11755 else
11756   ac_cv_header_stdc=no
11757 fi
11758 rm -f conftest*
11759
11760 fi
11761
11762 if test $ac_cv_header_stdc = yes; then
11763   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11764   if test "$cross_compiling" = yes; then
11765   :
11766 else
11767   cat >conftest.$ac_ext <<_ACEOF
11768 #line 11768 "configure"
11769 #include "confdefs.h"
11770 #include <ctype.h>
11771 #if ((' ' & 0x0FF) == 0x020)
11772 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11773 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11774 #else
11775 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11776                      || ('j' <= (c) && (c) <= 'r') \
11777                      || ('s' <= (c) && (c) <= 'z'))
11778 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11779 #endif
11780
11781 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11782 int
11783 main ()
11784 {
11785   int i;
11786   for (i = 0; i < 256; i++)
11787     if (XOR (islower (i), ISLOWER (i))
11788         || toupper (i) != TOUPPER (i))
11789       $ac_main_return(2);
11790   $ac_main_return (0);
11791 }
11792 _ACEOF
11793 rm -f conftest$ac_exeext
11794 if { (eval echo "$as_me:11794: \"$ac_link\"") >&5
11795   (eval $ac_link) 2>&5
11796   ac_status=$?
11797   echo "$as_me:11797: \$? = $ac_status" >&5
11798   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11799   { (eval echo "$as_me:11799: \"$ac_try\"") >&5
11800   (eval $ac_try) 2>&5
11801   ac_status=$?
11802   echo "$as_me:11802: \$? = $ac_status" >&5
11803   (exit $ac_status); }; }; then
11804   :
11805 else
11806   echo "$as_me: program exited with status $ac_status" >&5
11807 echo "$as_me: failed program was:" >&5
11808 cat conftest.$ac_ext >&5
11809 ac_cv_header_stdc=no
11810 fi
11811 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11812 fi
11813 fi
11814 fi
11815 echo "$as_me:11815: result: $ac_cv_header_stdc" >&5
11816 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11817 if test $ac_cv_header_stdc = yes; then
11818
11819 cat >>confdefs.h <<\EOF
11820 #define STDC_HEADERS 1
11821 EOF
11822
11823 fi
11824
11825 ac_header_dirent=no
11826 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11827   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11828 echo "$as_me:11828: checking for $ac_hdr that defines DIR" >&5
11829 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11830 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11831   echo $ECHO_N "(cached) $ECHO_C" >&6
11832 else
11833   cat >conftest.$ac_ext <<_ACEOF
11834 #line 11834 "configure"
11835 #include "confdefs.h"
11836 #include <sys/types.h>
11837 #include <$ac_hdr>
11838
11839 int
11840 main ()
11841 {
11842 if ((DIR *) 0)
11843 return 0;
11844   ;
11845   return 0;
11846 }
11847 _ACEOF
11848 rm -f conftest.$ac_objext
11849 if { (eval echo "$as_me:11849: \"$ac_compile\"") >&5
11850   (eval $ac_compile) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit $ac_status); } &&
11854          { ac_try='test -s conftest.$ac_objext'
11855   { (eval echo "$as_me:11855: \"$ac_try\"") >&5
11856   (eval $ac_try) 2>&5
11857   ac_status=$?
11858   echo "$as_me:11858: \$? = $ac_status" >&5
11859   (exit $ac_status); }; }; then
11860   eval "$as_ac_Header=yes"
11861 else
11862   echo "$as_me: failed program was:" >&5
11863 cat conftest.$ac_ext >&5
11864 eval "$as_ac_Header=no"
11865 fi
11866 rm -f conftest.$ac_objext conftest.$ac_ext
11867 fi
11868 echo "$as_me:11868: result: `eval echo '${'$as_ac_Header'}'`" >&5
11869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11870 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11871   cat >>confdefs.h <<EOF
11872 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11873 EOF
11874
11875 ac_header_dirent=$ac_hdr; break
11876 fi
11877
11878 done
11879 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11880 if test $ac_header_dirent = dirent.h; then
11881   echo "$as_me:11881: checking for opendir in -ldir" >&5
11882 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11883 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11884   echo $ECHO_N "(cached) $ECHO_C" >&6
11885 else
11886   ac_check_lib_save_LIBS=$LIBS
11887 LIBS="-ldir  $LIBS"
11888 cat >conftest.$ac_ext <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891
11892 /* Override any gcc2 internal prototype to avoid an error.  */
11893 #ifdef __cplusplus
11894 extern "C"
11895 #endif
11896 /* We use char because int might match the return type of a gcc2
11897    builtin and then its argument prototype would still apply.  */
11898 char opendir ();
11899 int
11900 main ()
11901 {
11902 opendir ();
11903   ;
11904   return 0;
11905 }
11906 _ACEOF
11907 rm -f conftest.$ac_objext conftest$ac_exeext
11908 if { (eval echo "$as_me:11908: \"$ac_link\"") >&5
11909   (eval $ac_link) 2>&5
11910   ac_status=$?
11911   echo "$as_me:11911: \$? = $ac_status" >&5
11912   (exit $ac_status); } &&
11913          { ac_try='test -s conftest$ac_exeext'
11914   { (eval echo "$as_me:11914: \"$ac_try\"") >&5
11915   (eval $ac_try) 2>&5
11916   ac_status=$?
11917   echo "$as_me:11917: \$? = $ac_status" >&5
11918   (exit $ac_status); }; }; then
11919   ac_cv_lib_dir_opendir=yes
11920 else
11921   echo "$as_me: failed program was:" >&5
11922 cat conftest.$ac_ext >&5
11923 ac_cv_lib_dir_opendir=no
11924 fi
11925 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11926 LIBS=$ac_check_lib_save_LIBS
11927 fi
11928 echo "$as_me:11928: result: $ac_cv_lib_dir_opendir" >&5
11929 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11930 if test $ac_cv_lib_dir_opendir = yes; then
11931   LIBS="$LIBS -ldir"
11932 fi
11933
11934 else
11935   echo "$as_me:11935: checking for opendir in -lx" >&5
11936 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11937 if test "${ac_cv_lib_x_opendir+set}" = set; then
11938   echo $ECHO_N "(cached) $ECHO_C" >&6
11939 else
11940   ac_check_lib_save_LIBS=$LIBS
11941 LIBS="-lx  $LIBS"
11942 cat >conftest.$ac_ext <<_ACEOF
11943 #line 11943 "configure"
11944 #include "confdefs.h"
11945
11946 /* Override any gcc2 internal prototype to avoid an error.  */
11947 #ifdef __cplusplus
11948 extern "C"
11949 #endif
11950 /* We use char because int might match the return type of a gcc2
11951    builtin and then its argument prototype would still apply.  */
11952 char opendir ();
11953 int
11954 main ()
11955 {
11956 opendir ();
11957   ;
11958   return 0;
11959 }
11960 _ACEOF
11961 rm -f conftest.$ac_objext conftest$ac_exeext
11962 if { (eval echo "$as_me:11962: \"$ac_link\"") >&5
11963   (eval $ac_link) 2>&5
11964   ac_status=$?
11965   echo "$as_me:11965: \$? = $ac_status" >&5
11966   (exit $ac_status); } &&
11967          { ac_try='test -s conftest$ac_exeext'
11968   { (eval echo "$as_me:11968: \"$ac_try\"") >&5
11969   (eval $ac_try) 2>&5
11970   ac_status=$?
11971   echo "$as_me:11971: \$? = $ac_status" >&5
11972   (exit $ac_status); }; }; then
11973   ac_cv_lib_x_opendir=yes
11974 else
11975   echo "$as_me: failed program was:" >&5
11976 cat conftest.$ac_ext >&5
11977 ac_cv_lib_x_opendir=no
11978 fi
11979 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11980 LIBS=$ac_check_lib_save_LIBS
11981 fi
11982 echo "$as_me:11982: result: $ac_cv_lib_x_opendir" >&5
11983 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11984 if test $ac_cv_lib_x_opendir = yes; then
11985   LIBS="$LIBS -lx"
11986 fi
11987
11988 fi
11989
11990 echo "$as_me:11990: checking whether time.h and sys/time.h may both be included" >&5
11991 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11992 if test "${ac_cv_header_time+set}" = set; then
11993   echo $ECHO_N "(cached) $ECHO_C" >&6
11994 else
11995   cat >conftest.$ac_ext <<_ACEOF
11996 #line 11996 "configure"
11997 #include "confdefs.h"
11998 #include <sys/types.h>
11999 #include <sys/time.h>
12000 #include <time.h>
12001
12002 int
12003 main ()
12004 {
12005 if ((struct tm *) 0)
12006 return 0;
12007   ;
12008   return 0;
12009 }
12010 _ACEOF
12011 rm -f conftest.$ac_objext
12012 if { (eval echo "$as_me:12012: \"$ac_compile\"") >&5
12013   (eval $ac_compile) 2>&5
12014   ac_status=$?
12015   echo "$as_me:12015: \$? = $ac_status" >&5
12016   (exit $ac_status); } &&
12017          { ac_try='test -s conftest.$ac_objext'
12018   { (eval echo "$as_me:12018: \"$ac_try\"") >&5
12019   (eval $ac_try) 2>&5
12020   ac_status=$?
12021   echo "$as_me:12021: \$? = $ac_status" >&5
12022   (exit $ac_status); }; }; then
12023   ac_cv_header_time=yes
12024 else
12025   echo "$as_me: failed program was:" >&5
12026 cat conftest.$ac_ext >&5
12027 ac_cv_header_time=no
12028 fi
12029 rm -f conftest.$ac_objext conftest.$ac_ext
12030 fi
12031 echo "$as_me:12031: result: $ac_cv_header_time" >&5
12032 echo "${ECHO_T}$ac_cv_header_time" >&6
12033 if test $ac_cv_header_time = yes; then
12034
12035 cat >>confdefs.h <<\EOF
12036 #define TIME_WITH_SYS_TIME 1
12037 EOF
12038
12039 fi
12040
12041 echo "$as_me:12041: checking for regular-expression headers" >&5
12042 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12043 if test "${cf_cv_regex+set}" = set; then
12044   echo $ECHO_N "(cached) $ECHO_C" >&6
12045 else
12046
12047 cat >conftest.$ac_ext <<_ACEOF
12048 #line 12048 "configure"
12049 #include "confdefs.h"
12050 #include <sys/types.h>
12051 #include <regex.h>
12052 int
12053 main ()
12054 {
12055
12056         regex_t *p;
12057         int x = regcomp(p, "", 0);
12058         int y = regexec(p, "", 0, 0, 0);
12059         regfree(p);
12060
12061   ;
12062   return 0;
12063 }
12064 _ACEOF
12065 rm -f conftest.$ac_objext conftest$ac_exeext
12066 if { (eval echo "$as_me:12066: \"$ac_link\"") >&5
12067   (eval $ac_link) 2>&5
12068   ac_status=$?
12069   echo "$as_me:12069: \$? = $ac_status" >&5
12070   (exit $ac_status); } &&
12071          { ac_try='test -s conftest$ac_exeext'
12072   { (eval echo "$as_me:12072: \"$ac_try\"") >&5
12073   (eval $ac_try) 2>&5
12074   ac_status=$?
12075   echo "$as_me:12075: \$? = $ac_status" >&5
12076   (exit $ac_status); }; }; then
12077   cf_cv_regex="regex.h"
12078 else
12079   echo "$as_me: failed program was:" >&5
12080 cat conftest.$ac_ext >&5
12081
12082         cat >conftest.$ac_ext <<_ACEOF
12083 #line 12083 "configure"
12084 #include "confdefs.h"
12085 #include <regexp.h>
12086 int
12087 main ()
12088 {
12089
12090                 char *p = compile("", "", "", 0);
12091                 int x = step("", "");
12092
12093   ;
12094   return 0;
12095 }
12096 _ACEOF
12097 rm -f conftest.$ac_objext conftest$ac_exeext
12098 if { (eval echo "$as_me:12098: \"$ac_link\"") >&5
12099   (eval $ac_link) 2>&5
12100   ac_status=$?
12101   echo "$as_me:12101: \$? = $ac_status" >&5
12102   (exit $ac_status); } &&
12103          { ac_try='test -s conftest$ac_exeext'
12104   { (eval echo "$as_me:12104: \"$ac_try\"") >&5
12105   (eval $ac_try) 2>&5
12106   ac_status=$?
12107   echo "$as_me:12107: \$? = $ac_status" >&5
12108   (exit $ac_status); }; }; then
12109   cf_cv_regex="regexp.h"
12110 else
12111   echo "$as_me: failed program was:" >&5
12112 cat conftest.$ac_ext >&5
12113
12114                 cf_save_LIBS="$LIBS"
12115                 LIBS="-lgen $LIBS"
12116                 cat >conftest.$ac_ext <<_ACEOF
12117 #line 12117 "configure"
12118 #include "confdefs.h"
12119 #include <regexpr.h>
12120 int
12121 main ()
12122 {
12123
12124                         char *p = compile("", "", "");
12125                         int x = step("", "");
12126
12127   ;
12128   return 0;
12129 }
12130 _ACEOF
12131 rm -f conftest.$ac_objext conftest$ac_exeext
12132 if { (eval echo "$as_me:12132: \"$ac_link\"") >&5
12133   (eval $ac_link) 2>&5
12134   ac_status=$?
12135   echo "$as_me:12135: \$? = $ac_status" >&5
12136   (exit $ac_status); } &&
12137          { ac_try='test -s conftest$ac_exeext'
12138   { (eval echo "$as_me:12138: \"$ac_try\"") >&5
12139   (eval $ac_try) 2>&5
12140   ac_status=$?
12141   echo "$as_me:12141: \$? = $ac_status" >&5
12142   (exit $ac_status); }; }; then
12143   cf_cv_regex="regexpr.h"
12144 else
12145   echo "$as_me: failed program was:" >&5
12146 cat conftest.$ac_ext >&5
12147 LIBS="$cf_save_LIBS"
12148 fi
12149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12150 fi
12151 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12152 fi
12153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12154
12155 fi
12156
12157 echo "$as_me:12157: result: $cf_cv_regex" >&5
12158 echo "${ECHO_T}$cf_cv_regex" >&6
12159 case $cf_cv_regex in
12160         regex.h)   cat >>confdefs.h <<\EOF
12161 #define HAVE_REGEX_H_FUNCS 1
12162 EOF
12163  ;;
12164         regexp.h)  cat >>confdefs.h <<\EOF
12165 #define HAVE_REGEXP_H_FUNCS 1
12166 EOF
12167  ;;
12168         regexpr.h) cat >>confdefs.h <<\EOF
12169 #define HAVE_REGEXPR_H_FUNCS 1
12170 EOF
12171  ;;
12172 esac
12173
12174 for ac_header in \
12175 fcntl.h \
12176 getopt.h \
12177 limits.h \
12178 locale.h \
12179 poll.h \
12180 sys/bsdtypes.h \
12181 sys/ioctl.h \
12182 sys/param.h \
12183 sys/poll.h \
12184 sys/select.h \
12185 sys/time.h \
12186 sys/times.h \
12187 ttyent.h \
12188 unistd.h \
12189 wctype.h \
12190
12191 do
12192 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12193 echo "$as_me:12193: checking for $ac_header" >&5
12194 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12195 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12196   echo $ECHO_N "(cached) $ECHO_C" >&6
12197 else
12198   cat >conftest.$ac_ext <<_ACEOF
12199 #line 12199 "configure"
12200 #include "confdefs.h"
12201 #include <$ac_header>
12202 _ACEOF
12203 if { (eval echo "$as_me:12203: \"$ac_cpp conftest.$ac_ext\"") >&5
12204   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12205   ac_status=$?
12206   egrep -v '^ *\+' conftest.er1 >conftest.err
12207   rm -f conftest.er1
12208   cat conftest.err >&5
12209   echo "$as_me:12209: \$? = $ac_status" >&5
12210   (exit $ac_status); } >/dev/null; then
12211   if test -s conftest.err; then
12212     ac_cpp_err=$ac_c_preproc_warn_flag
12213   else
12214     ac_cpp_err=
12215   fi
12216 else
12217   ac_cpp_err=yes
12218 fi
12219 if test -z "$ac_cpp_err"; then
12220   eval "$as_ac_Header=yes"
12221 else
12222   echo "$as_me: failed program was:" >&5
12223   cat conftest.$ac_ext >&5
12224   eval "$as_ac_Header=no"
12225 fi
12226 rm -f conftest.err conftest.$ac_ext
12227 fi
12228 echo "$as_me:12228: result: `eval echo '${'$as_ac_Header'}'`" >&5
12229 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12230 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12231   cat >>confdefs.h <<EOF
12232 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12233 EOF
12234
12235 fi
12236 done
12237
12238 # check for ISC (this may also define _POSIX_SOURCE)
12239 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12240 if test "$ISC" = yes ; then
12241
12242 echo "$as_me:12242: checking for main in -lcposix" >&5
12243 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12244 if test "${ac_cv_lib_cposix_main+set}" = set; then
12245   echo $ECHO_N "(cached) $ECHO_C" >&6
12246 else
12247   ac_check_lib_save_LIBS=$LIBS
12248 LIBS="-lcposix  $LIBS"
12249 cat >conftest.$ac_ext <<_ACEOF
12250 #line 12250 "configure"
12251 #include "confdefs.h"
12252
12253 int
12254 main ()
12255 {
12256 main ();
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 rm -f conftest.$ac_objext conftest$ac_exeext
12262 if { (eval echo "$as_me:12262: \"$ac_link\"") >&5
12263   (eval $ac_link) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); } &&
12267          { ac_try='test -s conftest$ac_exeext'
12268   { (eval echo "$as_me:12268: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:12271: \$? = $ac_status" >&5
12272   (exit $ac_status); }; }; then
12273   ac_cv_lib_cposix_main=yes
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 cat conftest.$ac_ext >&5
12277 ac_cv_lib_cposix_main=no
12278 fi
12279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12280 LIBS=$ac_check_lib_save_LIBS
12281 fi
12282 echo "$as_me:12282: result: $ac_cv_lib_cposix_main" >&5
12283 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12284 if test $ac_cv_lib_cposix_main = yes; then
12285   cat >>confdefs.h <<EOF
12286 #define HAVE_LIBCPOSIX 1
12287 EOF
12288
12289   LIBS="-lcposix $LIBS"
12290
12291 fi
12292
12293         echo "$as_me:12293: checking for bzero in -linet" >&5
12294 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12295 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12296   echo $ECHO_N "(cached) $ECHO_C" >&6
12297 else
12298   ac_check_lib_save_LIBS=$LIBS
12299 LIBS="-linet  $LIBS"
12300 cat >conftest.$ac_ext <<_ACEOF
12301 #line 12301 "configure"
12302 #include "confdefs.h"
12303
12304 /* Override any gcc2 internal prototype to avoid an error.  */
12305 #ifdef __cplusplus
12306 extern "C"
12307 #endif
12308 /* We use char because int might match the return type of a gcc2
12309    builtin and then its argument prototype would still apply.  */
12310 char bzero ();
12311 int
12312 main ()
12313 {
12314 bzero ();
12315   ;
12316   return 0;
12317 }
12318 _ACEOF
12319 rm -f conftest.$ac_objext conftest$ac_exeext
12320 if { (eval echo "$as_me:12320: \"$ac_link\"") >&5
12321   (eval $ac_link) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit $ac_status); } &&
12325          { ac_try='test -s conftest$ac_exeext'
12326   { (eval echo "$as_me:12326: \"$ac_try\"") >&5
12327   (eval $ac_try) 2>&5
12328   ac_status=$?
12329   echo "$as_me:12329: \$? = $ac_status" >&5
12330   (exit $ac_status); }; }; then
12331   ac_cv_lib_inet_bzero=yes
12332 else
12333   echo "$as_me: failed program was:" >&5
12334 cat conftest.$ac_ext >&5
12335 ac_cv_lib_inet_bzero=no
12336 fi
12337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12339 fi
12340 echo "$as_me:12340: result: $ac_cv_lib_inet_bzero" >&5
12341 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12342 if test $ac_cv_lib_inet_bzero = yes; then
12343   LIBS="$LIBS -linet"
12344 fi
12345 fi
12346
12347 echo "$as_me:12347: checking if sys/time.h works with sys/select.h" >&5
12348 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12349 if test "${cf_cv_sys_time_select+set}" = set; then
12350   echo $ECHO_N "(cached) $ECHO_C" >&6
12351 else
12352
12353 cat >conftest.$ac_ext <<_ACEOF
12354 #line 12354 "configure"
12355 #include "confdefs.h"
12356
12357 #include <sys/types.h>
12358 #ifdef HAVE_SYS_TIME_H
12359 #include <sys/time.h>
12360 #endif
12361 #ifdef HAVE_SYS_SELECT_H
12362 #include <sys/select.h>
12363 #endif
12364
12365 int
12366 main ()
12367 {
12368
12369   ;
12370   return 0;
12371 }
12372 _ACEOF
12373 rm -f conftest.$ac_objext
12374 if { (eval echo "$as_me:12374: \"$ac_compile\"") >&5
12375   (eval $ac_compile) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit $ac_status); } &&
12379          { ac_try='test -s conftest.$ac_objext'
12380   { (eval echo "$as_me:12380: \"$ac_try\"") >&5
12381   (eval $ac_try) 2>&5
12382   ac_status=$?
12383   echo "$as_me:12383: \$? = $ac_status" >&5
12384   (exit $ac_status); }; }; then
12385   cf_cv_sys_time_select=yes
12386 else
12387   echo "$as_me: failed program was:" >&5
12388 cat conftest.$ac_ext >&5
12389 cf_cv_sys_time_select=no
12390 fi
12391 rm -f conftest.$ac_objext conftest.$ac_ext
12392
12393 fi
12394
12395 echo "$as_me:12395: result: $cf_cv_sys_time_select" >&5
12396 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12397 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12398 #define HAVE_SYS_TIME_SELECT 1
12399 EOF
12400
12401 ###     checks for compiler characteristics
12402 ac_ext=c
12403 ac_cpp='$CPP $CPPFLAGS'
12404 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12405 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12406 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12407 ac_main_return=return
12408
12409 echo "$as_me:12409: checking for $CC option to accept ANSI C" >&5
12410 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12411 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12412   echo $ECHO_N "(cached) $ECHO_C" >&6
12413 else
12414   ac_cv_prog_cc_stdc=no
12415 ac_save_CC=$CC
12416 cat >conftest.$ac_ext <<_ACEOF
12417 #line 12417 "configure"
12418 #include "confdefs.h"
12419 #include <stdarg.h>
12420 #include <stdio.h>
12421 #include <sys/types.h>
12422 #include <sys/stat.h>
12423 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12424 struct buf { int x; };
12425 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12426 static char *e (p, i)
12427      char **p;
12428      int i;
12429 {
12430   return p[i];
12431 }
12432 static char *f (char * (*g) (char **, int), char **p, ...)
12433 {
12434   char *s;
12435   va_list v;
12436   va_start (v,p);
12437   s = g (p, va_arg (v,int));
12438   va_end (v);
12439   return s;
12440 }
12441 int test (int i, double x);
12442 struct s1 {int (*f) (int a);};
12443 struct s2 {int (*f) (double a);};
12444 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12445 int argc;
12446 char **argv;
12447 int
12448 main ()
12449 {
12450 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12451   ;
12452   return 0;
12453 }
12454 _ACEOF
12455 # Don't try gcc -ansi; that turns off useful extensions and
12456 # breaks some systems' header files.
12457 # AIX                   -qlanglvl=ansi
12458 # Ultrix and OSF/1      -std1
12459 # HP-UX 10.20 and later -Ae
12460 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12461 # SVR4                  -Xc -D__EXTENSIONS__
12462 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12463 do
12464   CC="$ac_save_CC $ac_arg"
12465   rm -f conftest.$ac_objext
12466 if { (eval echo "$as_me:12466: \"$ac_compile\"") >&5
12467   (eval $ac_compile) 2>&5
12468   ac_status=$?
12469   echo "$as_me:12469: \$? = $ac_status" >&5
12470   (exit $ac_status); } &&
12471          { ac_try='test -s conftest.$ac_objext'
12472   { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; }; then
12477   ac_cv_prog_cc_stdc=$ac_arg
12478 break
12479 else
12480   echo "$as_me: failed program was:" >&5
12481 cat conftest.$ac_ext >&5
12482 fi
12483 rm -f conftest.$ac_objext
12484 done
12485 rm -f conftest.$ac_ext conftest.$ac_objext
12486 CC=$ac_save_CC
12487
12488 fi
12489
12490 case "x$ac_cv_prog_cc_stdc" in
12491   x|xno)
12492     echo "$as_me:12492: result: none needed" >&5
12493 echo "${ECHO_T}none needed" >&6 ;;
12494   *)
12495     echo "$as_me:12495: result: $ac_cv_prog_cc_stdc" >&5
12496 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12497     CC="$CC $ac_cv_prog_cc_stdc" ;;
12498 esac
12499
12500 echo "$as_me:12500: checking for an ANSI C-conforming const" >&5
12501 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12502 if test "${ac_cv_c_const+set}" = set; then
12503   echo $ECHO_N "(cached) $ECHO_C" >&6
12504 else
12505   cat >conftest.$ac_ext <<_ACEOF
12506 #line 12506 "configure"
12507 #include "confdefs.h"
12508
12509 int
12510 main ()
12511 {
12512 /* FIXME: Include the comments suggested by Paul. */
12513 #ifndef __cplusplus
12514   /* Ultrix mips cc rejects this.  */
12515   typedef int charset[2];
12516   const charset x;
12517   /* SunOS 4.1.1 cc rejects this.  */
12518   char const *const *ccp;
12519   char **p;
12520   /* NEC SVR4.0.2 mips cc rejects this.  */
12521   struct point {int x, y;};
12522   static struct point const zero = {0,0};
12523   /* AIX XL C 1.02.0.0 rejects this.
12524      It does not let you subtract one const X* pointer from another in
12525      an arm of an if-expression whose if-part is not a constant
12526      expression */
12527   const char *g = "string";
12528   ccp = &g + (g ? g-g : 0);
12529   /* HPUX 7.0 cc rejects these. */
12530   ++ccp;
12531   p = (char**) ccp;
12532   ccp = (char const *const *) p;
12533   { /* SCO 3.2v4 cc rejects this.  */
12534     char *t;
12535     char const *s = 0 ? (char *) 0 : (char const *) 0;
12536
12537     *t++ = 0;
12538   }
12539   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12540     int x[] = {25, 17};
12541     const int *foo = &x[0];
12542     ++foo;
12543   }
12544   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12545     typedef const int *iptr;
12546     iptr p = 0;
12547     ++p;
12548   }
12549   { /* AIX XL C 1.02.0.0 rejects this saying
12550        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12551     struct s { int j; const int *ap[3]; };
12552     struct s *b; b->j = 5;
12553   }
12554   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12555     const int foo = 10;
12556   }
12557 #endif
12558
12559   ;
12560   return 0;
12561 }
12562 _ACEOF
12563 rm -f conftest.$ac_objext
12564 if { (eval echo "$as_me:12564: \"$ac_compile\"") >&5
12565   (eval $ac_compile) 2>&5
12566   ac_status=$?
12567   echo "$as_me:12567: \$? = $ac_status" >&5
12568   (exit $ac_status); } &&
12569          { ac_try='test -s conftest.$ac_objext'
12570   { (eval echo "$as_me:12570: \"$ac_try\"") >&5
12571   (eval $ac_try) 2>&5
12572   ac_status=$?
12573   echo "$as_me:12573: \$? = $ac_status" >&5
12574   (exit $ac_status); }; }; then
12575   ac_cv_c_const=yes
12576 else
12577   echo "$as_me: failed program was:" >&5
12578 cat conftest.$ac_ext >&5
12579 ac_cv_c_const=no
12580 fi
12581 rm -f conftest.$ac_objext conftest.$ac_ext
12582 fi
12583 echo "$as_me:12583: result: $ac_cv_c_const" >&5
12584 echo "${ECHO_T}$ac_cv_c_const" >&6
12585 if test $ac_cv_c_const = no; then
12586
12587 cat >>confdefs.h <<\EOF
12588 #define const
12589 EOF
12590
12591 fi
12592
12593 echo "$as_me:12593: checking for inline" >&5
12594 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12595 if test "${ac_cv_c_inline+set}" = set; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598   ac_cv_c_inline=no
12599 for ac_kw in inline __inline__ __inline; do
12600   cat >conftest.$ac_ext <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603 #ifndef __cplusplus
12604 static $ac_kw int static_foo () {return 0; }
12605 $ac_kw int foo () {return 0; }
12606 #endif
12607
12608 _ACEOF
12609 rm -f conftest.$ac_objext
12610 if { (eval echo "$as_me:12610: \"$ac_compile\"") >&5
12611   (eval $ac_compile) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit $ac_status); } &&
12615          { ac_try='test -s conftest.$ac_objext'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit $ac_status); }; }; then
12621   ac_cv_c_inline=$ac_kw; break
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat conftest.$ac_ext >&5
12625 fi
12626 rm -f conftest.$ac_objext conftest.$ac_ext
12627 done
12628
12629 fi
12630 echo "$as_me:12630: result: $ac_cv_c_inline" >&5
12631 echo "${ECHO_T}$ac_cv_c_inline" >&6
12632 case $ac_cv_c_inline in
12633   inline | yes) ;;
12634   no)
12635 cat >>confdefs.h <<\EOF
12636 #define inline
12637 EOF
12638  ;;
12639   *)  cat >>confdefs.h <<EOF
12640 #define inline $ac_cv_c_inline
12641 EOF
12642  ;;
12643 esac
12644
12645 NCURSES_INLINE=
12646 if test "$ac_cv_c_inline" != no ; then
12647   NCURSES_INLINE=inline
12648   if test "$INTEL_COMPILER" = yes
12649   then
12650     :
12651   elif test "$GCC" = yes
12652   then
12653     echo "$as_me:12653: checking if gcc supports options to tune inlining" >&5
12654 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12655 if test "${cf_cv_gcc_inline+set}" = set; then
12656   echo $ECHO_N "(cached) $ECHO_C" >&6
12657 else
12658
12659       cf_save_CFLAGS=$CFLAGS
12660       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12661       cat >conftest.$ac_ext <<_ACEOF
12662 #line 12662 "configure"
12663 #include "confdefs.h"
12664 inline int foo(void) { return 1; }
12665 int
12666 main ()
12667 {
12668 ${cf_cv_main_return:-return} foo()
12669   ;
12670   return 0;
12671 }
12672 _ACEOF
12673 rm -f conftest.$ac_objext
12674 if { (eval echo "$as_me:12674: \"$ac_compile\"") >&5
12675   (eval $ac_compile) 2>&5
12676   ac_status=$?
12677   echo "$as_me:12677: \$? = $ac_status" >&5
12678   (exit $ac_status); } &&
12679          { ac_try='test -s conftest.$ac_objext'
12680   { (eval echo "$as_me:12680: \"$ac_try\"") >&5
12681   (eval $ac_try) 2>&5
12682   ac_status=$?
12683   echo "$as_me:12683: \$? = $ac_status" >&5
12684   (exit $ac_status); }; }; then
12685   cf_cv_gcc_inline=yes
12686 else
12687   echo "$as_me: failed program was:" >&5
12688 cat conftest.$ac_ext >&5
12689 cf_cv_gcc_inline=no
12690 fi
12691 rm -f conftest.$ac_objext conftest.$ac_ext
12692       CFLAGS=$cf_save_CFLAGS
12693
12694 fi
12695 echo "$as_me:12695: result: $cf_cv_gcc_inline" >&5
12696 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12697     if test "$cf_cv_gcc_inline" = yes ; then
12698
12699 cf_fix_cppflags=no
12700 cf_new_cflags=
12701 cf_new_cppflags=
12702 cf_new_extra_cppflags=
12703
12704 for cf_add_cflags in --param max-inline-insns-single=1200
12705 do
12706 case $cf_fix_cppflags in
12707 no)
12708         case $cf_add_cflags in #(vi
12709         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12710                 case $cf_add_cflags in
12711                 -D*)
12712                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12713
12714                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12715                         && test -z "${cf_tst_cflags}" \
12716                         && cf_fix_cppflags=yes
12717
12718                         if test $cf_fix_cppflags = yes ; then
12719                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12720                                 continue
12721                         elif test "${cf_tst_cflags}" = "\"'" ; then
12722                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12723                                 continue
12724                         fi
12725                         ;;
12726                 esac
12727                 case "$CPPFLAGS" in
12728                 *$cf_add_cflags) #(vi
12729                         ;;
12730                 *) #(vi
12731                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12732                         ;;
12733                 esac
12734                 ;;
12735         *)
12736                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12737                 ;;
12738         esac
12739         ;;
12740 yes)
12741         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12742
12743         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12744
12745         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12746         && test -z "${cf_tst_cflags}" \
12747         && cf_fix_cppflags=no
12748         ;;
12749 esac
12750 done
12751
12752 if test -n "$cf_new_cflags" ; then
12753
12754         CFLAGS="$CFLAGS $cf_new_cflags"
12755 fi
12756
12757 if test -n "$cf_new_cppflags" ; then
12758
12759         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12760 fi
12761
12762 if test -n "$cf_new_extra_cppflags" ; then
12763
12764         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12765 fi
12766
12767     fi
12768   fi
12769 fi
12770
12771 echo "$as_me:12771: checking for signal global datatype" >&5
12772 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12773 if test "${cf_cv_sig_atomic_t+set}" = set; then
12774   echo $ECHO_N "(cached) $ECHO_C" >&6
12775 else
12776
12777         for cf_type in \
12778                 "volatile sig_atomic_t" \
12779                 "sig_atomic_t" \
12780                 "int"
12781         do
12782         cat >conftest.$ac_ext <<_ACEOF
12783 #line 12783 "configure"
12784 #include "confdefs.h"
12785
12786 #include <sys/types.h>
12787 #include <signal.h>
12788 #include <stdio.h>
12789
12790 extern $cf_type x;
12791 $cf_type x;
12792 static void handler(int sig)
12793 {
12794         x = 5;
12795 }
12796 int
12797 main ()
12798 {
12799 signal(SIGINT, handler);
12800                  x = 1
12801   ;
12802   return 0;
12803 }
12804 _ACEOF
12805 rm -f conftest.$ac_objext
12806 if { (eval echo "$as_me:12806: \"$ac_compile\"") >&5
12807   (eval $ac_compile) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit $ac_status); } &&
12811          { ac_try='test -s conftest.$ac_objext'
12812   { (eval echo "$as_me:12812: \"$ac_try\"") >&5
12813   (eval $ac_try) 2>&5
12814   ac_status=$?
12815   echo "$as_me:12815: \$? = $ac_status" >&5
12816   (exit $ac_status); }; }; then
12817   cf_cv_sig_atomic_t=$cf_type
12818 else
12819   echo "$as_me: failed program was:" >&5
12820 cat conftest.$ac_ext >&5
12821 cf_cv_sig_atomic_t=no
12822 fi
12823 rm -f conftest.$ac_objext conftest.$ac_ext
12824                 test "$cf_cv_sig_atomic_t" != no && break
12825         done
12826
12827 fi
12828
12829 echo "$as_me:12829: result: $cf_cv_sig_atomic_t" >&5
12830 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12831 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12832 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12833 EOF
12834
12835 if test $NCURSES_CHTYPE = auto ; then
12836
12837 echo "$as_me:12837: checking for type of chtype" >&5
12838 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12839 if test "${cf_cv_typeof_chtype+set}" = set; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842
12843                 if test "$cross_compiling" = yes; then
12844   cf_cv_typeof_chtype=long
12845 else
12846   cat >conftest.$ac_ext <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849
12850 #define WANT_BITS 31
12851 #include <stdio.h>
12852 int main()
12853 {
12854         FILE *fp = fopen("cf_test.out", "w");
12855         if (fp != 0) {
12856                 char *result = "long";
12857                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12858                         int n;
12859                         unsigned int x, y;
12860                         for (n = 0; n < WANT_BITS; n++) {
12861                                 x = (1 << n);
12862                                 y = (x >> n);
12863                                 if (y != 1 || x == 0) {
12864                                         x = 0;
12865                                         break;
12866                                 }
12867                         }
12868                         /*
12869                          * If x is nonzero, an int is big enough for the bits
12870                          * that we want.
12871                          */
12872                         result = (x != 0) ? "int" : "long";
12873                 }
12874                 fputs(result, fp);
12875                 fclose(fp);
12876         }
12877         ${cf_cv_main_return:-return}(0);
12878 }
12879
12880 _ACEOF
12881 rm -f conftest$ac_exeext
12882 if { (eval echo "$as_me:12882: \"$ac_link\"") >&5
12883   (eval $ac_link) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12887   { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888   (eval $ac_try) 2>&5
12889   ac_status=$?
12890   echo "$as_me:12890: \$? = $ac_status" >&5
12891   (exit $ac_status); }; }; then
12892   cf_cv_typeof_chtype=`cat cf_test.out`
12893 else
12894   echo "$as_me: program exited with status $ac_status" >&5
12895 echo "$as_me: failed program was:" >&5
12896 cat conftest.$ac_ext >&5
12897 cf_cv_typeof_chtype=long
12898 fi
12899 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12900 fi
12901                 rm -f cf_test.out
12902
12903 fi
12904
12905 echo "$as_me:12905: result: $cf_cv_typeof_chtype" >&5
12906 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12907
12908 cat >>confdefs.h <<EOF
12909 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12910 EOF
12911
12912 else
12913         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12914 fi
12915 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12916
12917 echo "$as_me:12917: checking if unsigned literals are legal" >&5
12918 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12919 if test "${cf_cv_unsigned_literals+set}" = set; then
12920   echo $ECHO_N "(cached) $ECHO_C" >&6
12921 else
12922
12923         cat >conftest.$ac_ext <<_ACEOF
12924 #line 12924 "configure"
12925 #include "confdefs.h"
12926
12927 int
12928 main ()
12929 {
12930 long x = 1L + 1UL + 1U + 1
12931   ;
12932   return 0;
12933 }
12934 _ACEOF
12935 rm -f conftest.$ac_objext
12936 if { (eval echo "$as_me:12936: \"$ac_compile\"") >&5
12937   (eval $ac_compile) 2>&5
12938   ac_status=$?
12939   echo "$as_me:12939: \$? = $ac_status" >&5
12940   (exit $ac_status); } &&
12941          { ac_try='test -s conftest.$ac_objext'
12942   { (eval echo "$as_me:12942: \"$ac_try\"") >&5
12943   (eval $ac_try) 2>&5
12944   ac_status=$?
12945   echo "$as_me:12945: \$? = $ac_status" >&5
12946   (exit $ac_status); }; }; then
12947   cf_cv_unsigned_literals=yes
12948 else
12949   echo "$as_me: failed program was:" >&5
12950 cat conftest.$ac_ext >&5
12951 cf_cv_unsigned_literals=no
12952 fi
12953 rm -f conftest.$ac_objext conftest.$ac_ext
12954
12955 fi
12956
12957 echo "$as_me:12957: result: $cf_cv_unsigned_literals" >&5
12958 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12959
12960 cf_cv_1UL="1"
12961 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12962 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12963
12964 if test $NCURSES_MMASK_T = auto ; then
12965         cf_cv_typeof_mmask_t=long
12966 else
12967         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12968 fi
12969 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12970
12971 ###     Checks for external-data
12972
12973 echo "$as_me:12973: checking if external errno is declared" >&5
12974 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12975 if test "${cf_cv_dcl_errno+set}" = set; then
12976   echo $ECHO_N "(cached) $ECHO_C" >&6
12977 else
12978
12979     cat >conftest.$ac_ext <<_ACEOF
12980 #line 12980 "configure"
12981 #include "confdefs.h"
12982
12983 #ifdef HAVE_STDLIB_H
12984 #include <stdlib.h>
12985 #endif
12986 #include <stdio.h>
12987 #include <sys/types.h>
12988 #include <errno.h>
12989 int
12990 main ()
12991 {
12992 int x = (int) errno
12993   ;
12994   return 0;
12995 }
12996 _ACEOF
12997 rm -f conftest.$ac_objext
12998 if { (eval echo "$as_me:12998: \"$ac_compile\"") >&5
12999   (eval $ac_compile) 2>&5
13000   ac_status=$?
13001   echo "$as_me:13001: \$? = $ac_status" >&5
13002   (exit $ac_status); } &&
13003          { ac_try='test -s conftest.$ac_objext'
13004   { (eval echo "$as_me:13004: \"$ac_try\"") >&5
13005   (eval $ac_try) 2>&5
13006   ac_status=$?
13007   echo "$as_me:13007: \$? = $ac_status" >&5
13008   (exit $ac_status); }; }; then
13009   cf_cv_dcl_errno=yes
13010 else
13011   echo "$as_me: failed program was:" >&5
13012 cat conftest.$ac_ext >&5
13013 cf_cv_dcl_errno=no
13014 fi
13015 rm -f conftest.$ac_objext conftest.$ac_ext
13016
13017 fi
13018 echo "$as_me:13018: result: $cf_cv_dcl_errno" >&5
13019 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13020
13021 if test "$cf_cv_dcl_errno" = no ; then
13022
13023 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13024
13025     cat >>confdefs.h <<EOF
13026 #define $cf_result 1
13027 EOF
13028
13029 fi
13030
13031 # It's possible (for near-UNIX clones) that the data doesn't exist
13032
13033 echo "$as_me:13033: checking if external errno exists" >&5
13034 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13035 if test "${cf_cv_have_errno+set}" = set; then
13036   echo $ECHO_N "(cached) $ECHO_C" >&6
13037 else
13038
13039     cat >conftest.$ac_ext <<_ACEOF
13040 #line 13040 "configure"
13041 #include "confdefs.h"
13042
13043 #undef errno
13044 extern int errno;
13045
13046 int
13047 main ()
13048 {
13049 errno = 2
13050   ;
13051   return 0;
13052 }
13053 _ACEOF
13054 rm -f conftest.$ac_objext conftest$ac_exeext
13055 if { (eval echo "$as_me:13055: \"$ac_link\"") >&5
13056   (eval $ac_link) 2>&5
13057   ac_status=$?
13058   echo "$as_me:13058: \$? = $ac_status" >&5
13059   (exit $ac_status); } &&
13060          { ac_try='test -s conftest$ac_exeext'
13061   { (eval echo "$as_me:13061: \"$ac_try\"") >&5
13062   (eval $ac_try) 2>&5
13063   ac_status=$?
13064   echo "$as_me:13064: \$? = $ac_status" >&5
13065   (exit $ac_status); }; }; then
13066   cf_cv_have_errno=yes
13067 else
13068   echo "$as_me: failed program was:" >&5
13069 cat conftest.$ac_ext >&5
13070 cf_cv_have_errno=no
13071 fi
13072 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13073
13074 fi
13075 echo "$as_me:13075: result: $cf_cv_have_errno" >&5
13076 echo "${ECHO_T}$cf_cv_have_errno" >&6
13077
13078 if test "$cf_cv_have_errno" = yes ; then
13079
13080 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13081
13082     cat >>confdefs.h <<EOF
13083 #define $cf_result 1
13084 EOF
13085
13086 fi
13087
13088 echo "$as_me:13088: checking if data-only library module links" >&5
13089 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13090 if test "${cf_cv_link_dataonly+set}" = set; then
13091   echo $ECHO_N "(cached) $ECHO_C" >&6
13092 else
13093
13094         rm -f conftest.a
13095         cat >conftest.$ac_ext <<EOF
13096 #line 13096 "configure"
13097 int     testdata[3] = { 123, 456, 789 };
13098 EOF
13099         if { (eval echo "$as_me:13099: \"$ac_compile\"") >&5
13100   (eval $ac_compile) 2>&5
13101   ac_status=$?
13102   echo "$as_me:13102: \$? = $ac_status" >&5
13103   (exit $ac_status); } ; then
13104                 mv conftest.o data.o && \
13105                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13106         fi
13107         rm -f conftest.$ac_ext data.o
13108         cat >conftest.$ac_ext <<EOF
13109 #line 13109 "configure"
13110 int     testfunc()
13111 {
13112 #if defined(NeXT)
13113         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13114 #else
13115         extern int testdata[3];
13116         return testdata[0] == 123
13117            &&  testdata[1] == 456
13118            &&  testdata[2] == 789;
13119 #endif
13120 }
13121 EOF
13122         if { (eval echo "$as_me:13122: \"$ac_compile\"") >&5
13123   (eval $ac_compile) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; then
13127                 mv conftest.o func.o && \
13128                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13129         fi
13130         rm -f conftest.$ac_ext func.o
13131         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13132         cf_saveLIBS="$LIBS"
13133         LIBS="conftest.a $LIBS"
13134         if test "$cross_compiling" = yes; then
13135   cf_cv_link_dataonly=unknown
13136 else
13137   cat >conftest.$ac_ext <<_ACEOF
13138 #line 13138 "configure"
13139 #include "confdefs.h"
13140
13141         int main()
13142         {
13143                 extern int testfunc();
13144                 ${cf_cv_main_return:-return} (!testfunc());
13145         }
13146
13147 _ACEOF
13148 rm -f conftest$ac_exeext
13149 if { (eval echo "$as_me:13149: \"$ac_link\"") >&5
13150   (eval $ac_link) 2>&5
13151   ac_status=$?
13152   echo "$as_me:13152: \$? = $ac_status" >&5
13153   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13154   { (eval echo "$as_me:13154: \"$ac_try\"") >&5
13155   (eval $ac_try) 2>&5
13156   ac_status=$?
13157   echo "$as_me:13157: \$? = $ac_status" >&5
13158   (exit $ac_status); }; }; then
13159   cf_cv_link_dataonly=yes
13160 else
13161   echo "$as_me: program exited with status $ac_status" >&5
13162 echo "$as_me: failed program was:" >&5
13163 cat conftest.$ac_ext >&5
13164 cf_cv_link_dataonly=no
13165 fi
13166 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13167 fi
13168         LIBS="$cf_saveLIBS"
13169
13170 fi
13171
13172 echo "$as_me:13172: result: $cf_cv_link_dataonly" >&5
13173 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13174
13175 if test "$cf_cv_link_dataonly" = no ; then
13176         cat >>confdefs.h <<\EOF
13177 #define BROKEN_LINKER 1
13178 EOF
13179
13180         BROKEN_LINKER=1
13181 fi
13182
13183 ###     Checks for library functions.
13184
13185 for ac_func in \
13186 getcwd \
13187 getegid \
13188 geteuid \
13189 getttynam \
13190 issetugid \
13191 poll \
13192 remove \
13193 select \
13194 setbuf \
13195 setbuffer \
13196 setvbuf \
13197 sigaction \
13198 sigvec \
13199 strdup \
13200 strstr \
13201 tcgetpgrp \
13202 times \
13203 vsnprintf \
13204
13205 do
13206 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13207 echo "$as_me:13207: checking for $ac_func" >&5
13208 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13209 if eval "test \"\${$as_ac_var+set}\" = set"; then
13210   echo $ECHO_N "(cached) $ECHO_C" >&6
13211 else
13212   cat >conftest.$ac_ext <<_ACEOF
13213 #line 13213 "configure"
13214 #include "confdefs.h"
13215 /* System header to define __stub macros and hopefully few prototypes,
13216     which can conflict with char $ac_func (); below.  */
13217 #include <assert.h>
13218 /* Override any gcc2 internal prototype to avoid an error.  */
13219 #ifdef __cplusplus
13220 extern "C"
13221 #endif
13222 /* We use char because int might match the return type of a gcc2
13223    builtin and then its argument prototype would still apply.  */
13224 char $ac_func ();
13225 char (*f) ();
13226
13227 int
13228 main ()
13229 {
13230 /* The GNU C library defines this for functions which it implements
13231     to always fail with ENOSYS.  Some functions are actually named
13232     something starting with __ and the normal name is an alias.  */
13233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13234 choke me
13235 #else
13236 f = $ac_func;
13237 #endif
13238
13239   ;
13240   return 0;
13241 }
13242 _ACEOF
13243 rm -f conftest.$ac_objext conftest$ac_exeext
13244 if { (eval echo "$as_me:13244: \"$ac_link\"") >&5
13245   (eval $ac_link) 2>&5
13246   ac_status=$?
13247   echo "$as_me:13247: \$? = $ac_status" >&5
13248   (exit $ac_status); } &&
13249          { ac_try='test -s conftest$ac_exeext'
13250   { (eval echo "$as_me:13250: \"$ac_try\"") >&5
13251   (eval $ac_try) 2>&5
13252   ac_status=$?
13253   echo "$as_me:13253: \$? = $ac_status" >&5
13254   (exit $ac_status); }; }; then
13255   eval "$as_ac_var=yes"
13256 else
13257   echo "$as_me: failed program was:" >&5
13258 cat conftest.$ac_ext >&5
13259 eval "$as_ac_var=no"
13260 fi
13261 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13262 fi
13263 echo "$as_me:13263: result: `eval echo '${'$as_ac_var'}'`" >&5
13264 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13265 if test `eval echo '${'$as_ac_var'}'` = yes; then
13266   cat >>confdefs.h <<EOF
13267 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13268 EOF
13269
13270 fi
13271 done
13272
13273 if test "$with_getcap" = "yes" ; then
13274
13275 echo "$as_me:13275: checking for terminal-capability database functions" >&5
13276 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13277 if test "${cf_cv_cgetent+set}" = set; then
13278   echo $ECHO_N "(cached) $ECHO_C" >&6
13279 else
13280
13281 cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284
13285 #include <stdlib.h>
13286 int
13287 main ()
13288 {
13289
13290         char temp[128];
13291         char *buf = temp;
13292         char *db_array = temp;
13293         cgetent(&buf, /* int *, */ &db_array, "vt100");
13294         cgetcap(buf, "tc", '=');
13295         cgetmatch(buf, "tc");
13296
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext conftest$ac_exeext
13302 if { (eval echo "$as_me:13302: \"$ac_link\"") >&5
13303   (eval $ac_link) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); } &&
13307          { ac_try='test -s conftest$ac_exeext'
13308   { (eval echo "$as_me:13308: \"$ac_try\"") >&5
13309   (eval $ac_try) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; }; then
13313   cf_cv_cgetent=yes
13314 else
13315   echo "$as_me: failed program was:" >&5
13316 cat conftest.$ac_ext >&5
13317 cf_cv_cgetent=no
13318 fi
13319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13320
13321 fi
13322
13323 echo "$as_me:13323: result: $cf_cv_cgetent" >&5
13324 echo "${ECHO_T}$cf_cv_cgetent" >&6
13325 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13326 #define HAVE_BSD_CGETENT 1
13327 EOF
13328
13329 fi
13330
13331 echo "$as_me:13331: checking for isascii" >&5
13332 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13333 if test "${cf_cv_have_isascii+set}" = set; then
13334   echo $ECHO_N "(cached) $ECHO_C" >&6
13335 else
13336
13337         cat >conftest.$ac_ext <<_ACEOF
13338 #line 13338 "configure"
13339 #include "confdefs.h"
13340 #include <ctype.h>
13341 int
13342 main ()
13343 {
13344 int x = isascii(' ')
13345   ;
13346   return 0;
13347 }
13348 _ACEOF
13349 rm -f conftest.$ac_objext conftest$ac_exeext
13350 if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
13351   (eval $ac_link) 2>&5
13352   ac_status=$?
13353   echo "$as_me:13353: \$? = $ac_status" >&5
13354   (exit $ac_status); } &&
13355          { ac_try='test -s conftest$ac_exeext'
13356   { (eval echo "$as_me:13356: \"$ac_try\"") >&5
13357   (eval $ac_try) 2>&5
13358   ac_status=$?
13359   echo "$as_me:13359: \$? = $ac_status" >&5
13360   (exit $ac_status); }; }; then
13361   cf_cv_have_isascii=yes
13362 else
13363   echo "$as_me: failed program was:" >&5
13364 cat conftest.$ac_ext >&5
13365 cf_cv_have_isascii=no
13366 fi
13367 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13368
13369 fi
13370 echo "$as_me:13370: result: $cf_cv_have_isascii" >&5
13371 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13372 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13373 #define HAVE_ISASCII 1
13374 EOF
13375
13376 if test "$ac_cv_func_sigaction" = yes; then
13377 echo "$as_me:13377: checking whether sigaction needs _POSIX_SOURCE" >&5
13378 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13379 cat >conftest.$ac_ext <<_ACEOF
13380 #line 13380 "configure"
13381 #include "confdefs.h"
13382
13383 #include <sys/types.h>
13384 #include <signal.h>
13385 int
13386 main ()
13387 {
13388 struct sigaction act
13389   ;
13390   return 0;
13391 }
13392 _ACEOF
13393 rm -f conftest.$ac_objext
13394 if { (eval echo "$as_me:13394: \"$ac_compile\"") >&5
13395   (eval $ac_compile) 2>&5
13396   ac_status=$?
13397   echo "$as_me:13397: \$? = $ac_status" >&5
13398   (exit $ac_status); } &&
13399          { ac_try='test -s conftest.$ac_objext'
13400   { (eval echo "$as_me:13400: \"$ac_try\"") >&5
13401   (eval $ac_try) 2>&5
13402   ac_status=$?
13403   echo "$as_me:13403: \$? = $ac_status" >&5
13404   (exit $ac_status); }; }; then
13405   sigact_bad=no
13406 else
13407   echo "$as_me: failed program was:" >&5
13408 cat conftest.$ac_ext >&5
13409
13410 cat >conftest.$ac_ext <<_ACEOF
13411 #line 13411 "configure"
13412 #include "confdefs.h"
13413
13414 #define _POSIX_SOURCE
13415 #include <sys/types.h>
13416 #include <signal.h>
13417 int
13418 main ()
13419 {
13420 struct sigaction act
13421   ;
13422   return 0;
13423 }
13424 _ACEOF
13425 rm -f conftest.$ac_objext
13426 if { (eval echo "$as_me:13426: \"$ac_compile\"") >&5
13427   (eval $ac_compile) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit $ac_status); } &&
13431          { ac_try='test -s conftest.$ac_objext'
13432   { (eval echo "$as_me:13432: \"$ac_try\"") >&5
13433   (eval $ac_try) 2>&5
13434   ac_status=$?
13435   echo "$as_me:13435: \$? = $ac_status" >&5
13436   (exit $ac_status); }; }; then
13437   sigact_bad=yes
13438          cat >>confdefs.h <<\EOF
13439 #define SVR4_ACTION 1
13440 EOF
13441
13442 else
13443   echo "$as_me: failed program was:" >&5
13444 cat conftest.$ac_ext >&5
13445 sigact_bad=unknown
13446 fi
13447 rm -f conftest.$ac_objext conftest.$ac_ext
13448 fi
13449 rm -f conftest.$ac_objext conftest.$ac_ext
13450 echo "$as_me:13450: result: $sigact_bad" >&5
13451 echo "${ECHO_T}$sigact_bad" >&6
13452 fi
13453
13454 echo "$as_me:13454: checking if nanosleep really works" >&5
13455 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13456 if test "${cf_cv_func_nanosleep+set}" = set; then
13457   echo $ECHO_N "(cached) $ECHO_C" >&6
13458 else
13459
13460 if test "$cross_compiling" = yes; then
13461   cf_cv_func_nanosleep=unknown
13462 else
13463   cat >conftest.$ac_ext <<_ACEOF
13464 #line 13464 "configure"
13465 #include "confdefs.h"
13466
13467 #include <stdio.h>
13468 #include <errno.h>
13469 #include <time.h>
13470
13471 #ifdef HAVE_SYS_TIME_H
13472 #include <sys/time.h>
13473 #endif
13474
13475 int main() {
13476         struct timespec ts1, ts2;
13477         int code;
13478         ts1.tv_sec  = 0;
13479         ts1.tv_nsec = 750000000;
13480         ts2.tv_sec  = 0;
13481         ts2.tv_nsec = 0;
13482         errno = 0;
13483         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13484         ${cf_cv_main_return:-return}(code != 0);
13485 }
13486
13487 _ACEOF
13488 rm -f conftest$ac_exeext
13489 if { (eval echo "$as_me:13489: \"$ac_link\"") >&5
13490   (eval $ac_link) 2>&5
13491   ac_status=$?
13492   echo "$as_me:13492: \$? = $ac_status" >&5
13493   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13494   { (eval echo "$as_me:13494: \"$ac_try\"") >&5
13495   (eval $ac_try) 2>&5
13496   ac_status=$?
13497   echo "$as_me:13497: \$? = $ac_status" >&5
13498   (exit $ac_status); }; }; then
13499   cf_cv_func_nanosleep=yes
13500 else
13501   echo "$as_me: program exited with status $ac_status" >&5
13502 echo "$as_me: failed program was:" >&5
13503 cat conftest.$ac_ext >&5
13504 cf_cv_func_nanosleep=no
13505 fi
13506 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13507 fi
13508 fi
13509 echo "$as_me:13509: result: $cf_cv_func_nanosleep" >&5
13510 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13511
13512 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13513 #define HAVE_NANOSLEEP 1
13514 EOF
13515
13516 for ac_header in \
13517 termio.h \
13518 termios.h \
13519 unistd.h \
13520
13521 do
13522 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13523 echo "$as_me:13523: checking for $ac_header" >&5
13524 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13525 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528   cat >conftest.$ac_ext <<_ACEOF
13529 #line 13529 "configure"
13530 #include "confdefs.h"
13531 #include <$ac_header>
13532 _ACEOF
13533 if { (eval echo "$as_me:13533: \"$ac_cpp conftest.$ac_ext\"") >&5
13534   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13535   ac_status=$?
13536   egrep -v '^ *\+' conftest.er1 >conftest.err
13537   rm -f conftest.er1
13538   cat conftest.err >&5
13539   echo "$as_me:13539: \$? = $ac_status" >&5
13540   (exit $ac_status); } >/dev/null; then
13541   if test -s conftest.err; then
13542     ac_cpp_err=$ac_c_preproc_warn_flag
13543   else
13544     ac_cpp_err=
13545   fi
13546 else
13547   ac_cpp_err=yes
13548 fi
13549 if test -z "$ac_cpp_err"; then
13550   eval "$as_ac_Header=yes"
13551 else
13552   echo "$as_me: failed program was:" >&5
13553   cat conftest.$ac_ext >&5
13554   eval "$as_ac_Header=no"
13555 fi
13556 rm -f conftest.err conftest.$ac_ext
13557 fi
13558 echo "$as_me:13558: result: `eval echo '${'$as_ac_Header'}'`" >&5
13559 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13560 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13561   cat >>confdefs.h <<EOF
13562 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13563 EOF
13564
13565 fi
13566 done
13567
13568 if test "$ISC" = yes ; then
13569
13570 for ac_header in sys/termio.h
13571 do
13572 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13573 echo "$as_me:13573: checking for $ac_header" >&5
13574 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13575 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13576   echo $ECHO_N "(cached) $ECHO_C" >&6
13577 else
13578   cat >conftest.$ac_ext <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 #include <$ac_header>
13582 _ACEOF
13583 if { (eval echo "$as_me:13583: \"$ac_cpp conftest.$ac_ext\"") >&5
13584   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13585   ac_status=$?
13586   egrep -v '^ *\+' conftest.er1 >conftest.err
13587   rm -f conftest.er1
13588   cat conftest.err >&5
13589   echo "$as_me:13589: \$? = $ac_status" >&5
13590   (exit $ac_status); } >/dev/null; then
13591   if test -s conftest.err; then
13592     ac_cpp_err=$ac_c_preproc_warn_flag
13593   else
13594     ac_cpp_err=
13595   fi
13596 else
13597   ac_cpp_err=yes
13598 fi
13599 if test -z "$ac_cpp_err"; then
13600   eval "$as_ac_Header=yes"
13601 else
13602   echo "$as_me: failed program was:" >&5
13603   cat conftest.$ac_ext >&5
13604   eval "$as_ac_Header=no"
13605 fi
13606 rm -f conftest.err conftest.$ac_ext
13607 fi
13608 echo "$as_me:13608: result: `eval echo '${'$as_ac_Header'}'`" >&5
13609 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13610 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13611   cat >>confdefs.h <<EOF
13612 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13613 EOF
13614
13615 fi
13616 done
13617
13618 fi
13619 if test "$ac_cv_header_termios_h" = yes ; then
13620         case "$CFLAGS $CPPFLAGS" in
13621         *-D_POSIX_SOURCE*)
13622                 termios_bad=dunno ;;
13623         *)      termios_bad=maybe ;;
13624         esac
13625         if test "$termios_bad" = maybe ; then
13626         echo "$as_me:13626: checking whether termios.h needs _POSIX_SOURCE" >&5
13627 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13628         cat >conftest.$ac_ext <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631 #include <termios.h>
13632 int
13633 main ()
13634 {
13635 struct termios foo; int x = foo.c_iflag
13636   ;
13637   return 0;
13638 }
13639 _ACEOF
13640 rm -f conftest.$ac_objext
13641 if { (eval echo "$as_me:13641: \"$ac_compile\"") >&5
13642   (eval $ac_compile) 2>&5
13643   ac_status=$?
13644   echo "$as_me:13644: \$? = $ac_status" >&5
13645   (exit $ac_status); } &&
13646          { ac_try='test -s conftest.$ac_objext'
13647   { (eval echo "$as_me:13647: \"$ac_try\"") >&5
13648   (eval $ac_try) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit $ac_status); }; }; then
13652   termios_bad=no
13653 else
13654   echo "$as_me: failed program was:" >&5
13655 cat conftest.$ac_ext >&5
13656
13657                 cat >conftest.$ac_ext <<_ACEOF
13658 #line 13658 "configure"
13659 #include "confdefs.h"
13660
13661 #define _POSIX_SOURCE
13662 #include <termios.h>
13663 int
13664 main ()
13665 {
13666 struct termios foo; int x = foo.c_iflag
13667   ;
13668   return 0;
13669 }
13670 _ACEOF
13671 rm -f conftest.$ac_objext
13672 if { (eval echo "$as_me:13672: \"$ac_compile\"") >&5
13673   (eval $ac_compile) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); } &&
13677          { ac_try='test -s conftest.$ac_objext'
13678   { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679   (eval $ac_try) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit $ac_status); }; }; then
13683   termios_bad=unknown
13684 else
13685   echo "$as_me: failed program was:" >&5
13686 cat conftest.$ac_ext >&5
13687 termios_bad=yes cat >>confdefs.h <<\EOF
13688 #define SVR4_TERMIO 1
13689 EOF
13690
13691 fi
13692 rm -f conftest.$ac_objext conftest.$ac_ext
13693
13694 fi
13695 rm -f conftest.$ac_objext conftest.$ac_ext
13696         echo "$as_me:13696: result: $termios_bad" >&5
13697 echo "${ECHO_T}$termios_bad" >&6
13698         fi
13699 fi
13700
13701 echo "$as_me:13701: checking for tcgetattr" >&5
13702 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13703 if test "${cf_cv_have_tcgetattr+set}" = set; then
13704   echo $ECHO_N "(cached) $ECHO_C" >&6
13705 else
13706
13707 cat >conftest.$ac_ext <<_ACEOF
13708 #line 13708 "configure"
13709 #include "confdefs.h"
13710
13711 #include <sys/types.h>
13712 #ifdef HAVE_UNISTD_H
13713 #include <unistd.h>
13714 #endif
13715 #ifdef HAVE_TERMIOS_H
13716 #include <termios.h>
13717 #define TTY struct termios
13718 #else
13719 #ifdef HAVE_TERMIO_H
13720 #include <termio.h>
13721 #define TTY struct termio
13722 #endif
13723 #endif
13724
13725 int
13726 main ()
13727 {
13728
13729 TTY foo;
13730 tcgetattr(1, &foo);
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext conftest$ac_exeext
13736 if { (eval echo "$as_me:13736: \"$ac_link\"") >&5
13737   (eval $ac_link) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -s conftest$ac_exeext'
13742   { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743   (eval $ac_try) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit $ac_status); }; }; then
13747   cf_cv_have_tcgetattr=yes
13748 else
13749   echo "$as_me: failed program was:" >&5
13750 cat conftest.$ac_ext >&5
13751 cf_cv_have_tcgetattr=no
13752 fi
13753 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13754 fi
13755 echo "$as_me:13755: result: $cf_cv_have_tcgetattr" >&5
13756 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13757 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13758 #define HAVE_TCGETATTR 1
13759 EOF
13760
13761 echo "$as_me:13761: checking for vsscanf function or workaround" >&5
13762 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13763 if test "${cf_cv_func_vsscanf+set}" = set; then
13764   echo $ECHO_N "(cached) $ECHO_C" >&6
13765 else
13766
13767 cat >conftest.$ac_ext <<_ACEOF
13768 #line 13768 "configure"
13769 #include "confdefs.h"
13770
13771 #include <stdarg.h>
13772 #include <stdio.h>
13773 int
13774 main ()
13775 {
13776
13777         va_list ap;
13778         vsscanf("from", "%d", ap)
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f conftest.$ac_objext conftest$ac_exeext
13784 if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
13785   (eval $ac_link) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); } &&
13789          { ac_try='test -s conftest$ac_exeext'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   cf_cv_func_vsscanf=vsscanf
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 cat conftest.$ac_ext >&5
13799
13800 cat >conftest.$ac_ext <<_ACEOF
13801 #line 13801 "configure"
13802 #include "confdefs.h"
13803
13804 #include <stdarg.h>
13805 #include <stdio.h>
13806 int
13807 main ()
13808 {
13809
13810     FILE strbuf;
13811     char *str = "from";
13812
13813     strbuf._flag = _IOREAD;
13814     strbuf._ptr = strbuf._base = (unsigned char *) str;
13815     strbuf._cnt = strlen(str);
13816     strbuf._file = _NFILE;
13817     return (vfscanf(&strbuf, "%d", ap))
13818   ;
13819   return 0;
13820 }
13821 _ACEOF
13822 rm -f conftest.$ac_objext conftest$ac_exeext
13823 if { (eval echo "$as_me:13823: \"$ac_link\"") >&5
13824   (eval $ac_link) 2>&5
13825   ac_status=$?
13826   echo "$as_me:13826: \$? = $ac_status" >&5
13827   (exit $ac_status); } &&
13828          { ac_try='test -s conftest$ac_exeext'
13829   { (eval echo "$as_me:13829: \"$ac_try\"") >&5
13830   (eval $ac_try) 2>&5
13831   ac_status=$?
13832   echo "$as_me:13832: \$? = $ac_status" >&5
13833   (exit $ac_status); }; }; then
13834   cf_cv_func_vsscanf=vfscanf
13835 else
13836   echo "$as_me: failed program was:" >&5
13837 cat conftest.$ac_ext >&5
13838
13839 cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842
13843 #include <stdarg.h>
13844 #include <stdio.h>
13845 int
13846 main ()
13847 {
13848
13849     FILE strbuf;
13850     char *str = "from";
13851
13852     strbuf._flag = _IOREAD;
13853     strbuf._ptr = strbuf._base = (unsigned char *) str;
13854     strbuf._cnt = strlen(str);
13855     strbuf._file = _NFILE;
13856     return (_doscan(&strbuf, "%d", ap))
13857   ;
13858   return 0;
13859 }
13860 _ACEOF
13861 rm -f conftest.$ac_objext conftest$ac_exeext
13862 if { (eval echo "$as_me:13862: \"$ac_link\"") >&5
13863   (eval $ac_link) 2>&5
13864   ac_status=$?
13865   echo "$as_me:13865: \$? = $ac_status" >&5
13866   (exit $ac_status); } &&
13867          { ac_try='test -s conftest$ac_exeext'
13868   { (eval echo "$as_me:13868: \"$ac_try\"") >&5
13869   (eval $ac_try) 2>&5
13870   ac_status=$?
13871   echo "$as_me:13871: \$? = $ac_status" >&5
13872   (exit $ac_status); }; }; then
13873   cf_cv_func_vsscanf=_doscan
13874 else
13875   echo "$as_me: failed program was:" >&5
13876 cat conftest.$ac_ext >&5
13877
13878 cf_cv_func_vsscanf=no
13879 fi
13880 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13881 fi
13882 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13883 fi
13884 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13885 fi
13886 echo "$as_me:13886: result: $cf_cv_func_vsscanf" >&5
13887 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13888
13889 case $cf_cv_func_vsscanf in #(vi
13890 vsscanf) cat >>confdefs.h <<\EOF
13891 #define HAVE_VSSCANF 1
13892 EOF
13893 ;; #(vi
13894 vfscanf) cat >>confdefs.h <<\EOF
13895 #define HAVE_VFSCANF 1
13896 EOF
13897 ;; #(vi
13898 _doscan) cat >>confdefs.h <<\EOF
13899 #define HAVE__DOSCAN 1
13900 EOF
13901 ;;
13902 esac
13903
13904 echo "$as_me:13904: checking for working mkstemp" >&5
13905 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13906 if test "${cf_cv_func_mkstemp+set}" = set; then
13907   echo $ECHO_N "(cached) $ECHO_C" >&6
13908 else
13909
13910 rm -f conftest*
13911 if test "$cross_compiling" = yes; then
13912   echo "$as_me:13912: checking for mkstemp" >&5
13913 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13914 if test "${ac_cv_func_mkstemp+set}" = set; then
13915   echo $ECHO_N "(cached) $ECHO_C" >&6
13916 else
13917   cat >conftest.$ac_ext <<_ACEOF
13918 #line 13918 "configure"
13919 #include "confdefs.h"
13920 /* System header to define __stub macros and hopefully few prototypes,
13921     which can conflict with char mkstemp (); below.  */
13922 #include <assert.h>
13923 /* Override any gcc2 internal prototype to avoid an error.  */
13924 #ifdef __cplusplus
13925 extern "C"
13926 #endif
13927 /* We use char because int might match the return type of a gcc2
13928    builtin and then its argument prototype would still apply.  */
13929 char mkstemp ();
13930 char (*f) ();
13931
13932 int
13933 main ()
13934 {
13935 /* The GNU C library defines this for functions which it implements
13936     to always fail with ENOSYS.  Some functions are actually named
13937     something starting with __ and the normal name is an alias.  */
13938 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13939 choke me
13940 #else
13941 f = mkstemp;
13942 #endif
13943
13944   ;
13945   return 0;
13946 }
13947 _ACEOF
13948 rm -f conftest.$ac_objext conftest$ac_exeext
13949 if { (eval echo "$as_me:13949: \"$ac_link\"") >&5
13950   (eval $ac_link) 2>&5
13951   ac_status=$?
13952   echo "$as_me:13952: \$? = $ac_status" >&5
13953   (exit $ac_status); } &&
13954          { ac_try='test -s conftest$ac_exeext'
13955   { (eval echo "$as_me:13955: \"$ac_try\"") >&5
13956   (eval $ac_try) 2>&5
13957   ac_status=$?
13958   echo "$as_me:13958: \$? = $ac_status" >&5
13959   (exit $ac_status); }; }; then
13960   ac_cv_func_mkstemp=yes
13961 else
13962   echo "$as_me: failed program was:" >&5
13963 cat conftest.$ac_ext >&5
13964 ac_cv_func_mkstemp=no
13965 fi
13966 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13967 fi
13968 echo "$as_me:13968: result: $ac_cv_func_mkstemp" >&5
13969 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13970
13971 else
13972   cat >conftest.$ac_ext <<_ACEOF
13973 #line 13973 "configure"
13974 #include "confdefs.h"
13975
13976 #include <sys/types.h>
13977 #include <stdlib.h>
13978 #include <stdio.h>
13979 #include <string.h>
13980 #include <sys/stat.h>
13981 int main()
13982 {
13983         char *tmpl = "conftestXXXXXX";
13984         char name[2][80];
13985         int n;
13986         int result = 0;
13987         int fd;
13988         struct stat sb;
13989
13990         umask(077);
13991         for (n = 0; n < 2; ++n) {
13992                 strcpy(name[n], tmpl);
13993                 if ((fd = mkstemp(name[n])) >= 0) {
13994                         if (!strcmp(name[n], tmpl)
13995                          || stat(name[n], &sb) != 0
13996                          || (sb.st_mode & S_IFMT) != S_IFREG
13997                          || (sb.st_mode & 077) != 0) {
13998                                 result = 1;
13999                         }
14000                         close(fd);
14001                 }
14002         }
14003         if (result == 0
14004          && !strcmp(name[0], name[1]))
14005                 result = 1;
14006         ${cf_cv_main_return:-return}(result);
14007 }
14008
14009 _ACEOF
14010 rm -f conftest$ac_exeext
14011 if { (eval echo "$as_me:14011: \"$ac_link\"") >&5
14012   (eval $ac_link) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14016   { (eval echo "$as_me:14016: \"$ac_try\"") >&5
14017   (eval $ac_try) 2>&5
14018   ac_status=$?
14019   echo "$as_me:14019: \$? = $ac_status" >&5
14020   (exit $ac_status); }; }; then
14021   cf_cv_func_mkstemp=yes
14022
14023 else
14024   echo "$as_me: program exited with status $ac_status" >&5
14025 echo "$as_me: failed program was:" >&5
14026 cat conftest.$ac_ext >&5
14027 cf_cv_func_mkstemp=no
14028
14029 fi
14030 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14031 fi
14032
14033 fi
14034 echo "$as_me:14034: result: $cf_cv_func_mkstemp" >&5
14035 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14036 if test "$cf_cv_func_mkstemp" = yes ; then
14037         cat >>confdefs.h <<\EOF
14038 #define HAVE_MKSTEMP 1
14039 EOF
14040
14041 fi
14042
14043 # setup for prototype of fallback for vsscanf()
14044
14045 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14046         HAVE_VSSCANF=1
14047 else
14048         HAVE_VSSCANF=0
14049 fi
14050
14051 if test "$cross_compiling" = yes ; then
14052         { echo "$as_me:14052: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14053 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14054 else
14055         echo "$as_me:14055: checking whether setvbuf arguments are reversed" >&5
14056 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14057 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14058   echo $ECHO_N "(cached) $ECHO_C" >&6
14059 else
14060   if test "$cross_compiling" = yes; then
14061   { { echo "$as_me:14061: error: cannot run test program while cross compiling" >&5
14062 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14063    { (exit 1); exit 1; }; }
14064 else
14065   cat >conftest.$ac_ext <<_ACEOF
14066 #line 14066 "configure"
14067 #include "confdefs.h"
14068 #include <stdio.h>
14069 /* If setvbuf has the reversed format, exit 0. */
14070 int
14071 main ()
14072 {
14073   /* This call has the arguments reversed.
14074      A reversed system may check and see that the address of main
14075      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14076   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14077     $ac_main_return(1);
14078   putc('\r', stdout);
14079   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14080 }
14081 _ACEOF
14082 rm -f conftest$ac_exeext
14083 if { (eval echo "$as_me:14083: \"$ac_link\"") >&5
14084   (eval $ac_link) 2>&5
14085   ac_status=$?
14086   echo "$as_me:14086: \$? = $ac_status" >&5
14087   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14088   { (eval echo "$as_me:14088: \"$ac_try\"") >&5
14089   (eval $ac_try) 2>&5
14090   ac_status=$?
14091   echo "$as_me:14091: \$? = $ac_status" >&5
14092   (exit $ac_status); }; }; then
14093   ac_cv_func_setvbuf_reversed=yes
14094 else
14095   echo "$as_me: program exited with status $ac_status" >&5
14096 echo "$as_me: failed program was:" >&5
14097 cat conftest.$ac_ext >&5
14098 ac_cv_func_setvbuf_reversed=no
14099 fi
14100 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14101 fi
14102 rm -f core core.* *.core
14103 fi
14104 echo "$as_me:14104: result: $ac_cv_func_setvbuf_reversed" >&5
14105 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14106 if test $ac_cv_func_setvbuf_reversed = yes; then
14107
14108 cat >>confdefs.h <<\EOF
14109 #define SETVBUF_REVERSED 1
14110 EOF
14111
14112 fi
14113
14114 fi
14115 echo "$as_me:14115: checking return type of signal handlers" >&5
14116 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14117 if test "${ac_cv_type_signal+set}" = set; then
14118   echo $ECHO_N "(cached) $ECHO_C" >&6
14119 else
14120   cat >conftest.$ac_ext <<_ACEOF
14121 #line 14121 "configure"
14122 #include "confdefs.h"
14123 #include <sys/types.h>
14124 #include <signal.h>
14125 #ifdef signal
14126 # undef signal
14127 #endif
14128 #ifdef __cplusplus
14129 extern "C" void (*signal (int, void (*)(int)))(int);
14130 #else
14131 void (*signal ()) ();
14132 #endif
14133
14134 int
14135 main ()
14136 {
14137 int i;
14138   ;
14139   return 0;
14140 }
14141 _ACEOF
14142 rm -f conftest.$ac_objext
14143 if { (eval echo "$as_me:14143: \"$ac_compile\"") >&5
14144   (eval $ac_compile) 2>&5
14145   ac_status=$?
14146   echo "$as_me:14146: \$? = $ac_status" >&5
14147   (exit $ac_status); } &&
14148          { ac_try='test -s conftest.$ac_objext'
14149   { (eval echo "$as_me:14149: \"$ac_try\"") >&5
14150   (eval $ac_try) 2>&5
14151   ac_status=$?
14152   echo "$as_me:14152: \$? = $ac_status" >&5
14153   (exit $ac_status); }; }; then
14154   ac_cv_type_signal=void
14155 else
14156   echo "$as_me: failed program was:" >&5
14157 cat conftest.$ac_ext >&5
14158 ac_cv_type_signal=int
14159 fi
14160 rm -f conftest.$ac_objext conftest.$ac_ext
14161 fi
14162 echo "$as_me:14162: result: $ac_cv_type_signal" >&5
14163 echo "${ECHO_T}$ac_cv_type_signal" >&6
14164
14165 cat >>confdefs.h <<EOF
14166 #define RETSIGTYPE $ac_cv_type_signal
14167 EOF
14168
14169 echo "$as_me:14169: checking for type sigaction_t" >&5
14170 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14171 if test "${cf_cv_type_sigaction+set}" = set; then
14172   echo $ECHO_N "(cached) $ECHO_C" >&6
14173 else
14174
14175         cat >conftest.$ac_ext <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178
14179 #include <signal.h>
14180 int
14181 main ()
14182 {
14183 sigaction_t x
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f conftest.$ac_objext
14189 if { (eval echo "$as_me:14189: \"$ac_compile\"") >&5
14190   (eval $ac_compile) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit $ac_status); } &&
14194          { ac_try='test -s conftest.$ac_objext'
14195   { (eval echo "$as_me:14195: \"$ac_try\"") >&5
14196   (eval $ac_try) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit $ac_status); }; }; then
14200   cf_cv_type_sigaction=yes
14201 else
14202   echo "$as_me: failed program was:" >&5
14203 cat conftest.$ac_ext >&5
14204 cf_cv_type_sigaction=no
14205 fi
14206 rm -f conftest.$ac_objext conftest.$ac_ext
14207 fi
14208
14209 echo "$as_me:14209: result: $cf_cv_type_sigaction" >&5
14210 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14211 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14212 #define HAVE_TYPE_SIGACTION 1
14213 EOF
14214
14215 echo "$as_me:14215: checking declaration of size-change" >&5
14216 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14217 if test "${cf_cv_sizechange+set}" = set; then
14218   echo $ECHO_N "(cached) $ECHO_C" >&6
14219 else
14220
14221     cf_cv_sizechange=unknown
14222     cf_save_CPPFLAGS="$CPPFLAGS"
14223
14224 for cf_opts in "" "NEED_PTEM_H"
14225 do
14226
14227     CPPFLAGS="$cf_save_CPPFLAGS"
14228     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14229     cat >conftest.$ac_ext <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14232 #include <sys/types.h>
14233 #ifdef HAVE_TERMIOS_H
14234 #include <termios.h>
14235 #else
14236 #ifdef HAVE_TERMIO_H
14237 #include <termio.h>
14238 #endif
14239 #endif
14240 #ifdef NEED_PTEM_H
14241 /* This is a workaround for SCO:  they neglected to define struct winsize in
14242  * termios.h -- it's only in termio.h and ptem.h
14243  */
14244 #include        <sys/stream.h>
14245 #include        <sys/ptem.h>
14246 #endif
14247 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14248 #include <sys/ioctl.h>
14249 #endif
14250
14251 int
14252 main ()
14253 {
14254
14255 #ifdef TIOCGSIZE
14256         struct ttysize win;     /* FIXME: what system is this? */
14257         int y = win.ts_lines;
14258         int x = win.ts_cols;
14259 #else
14260 #ifdef TIOCGWINSZ
14261         struct winsize win;
14262         int y = win.ws_row;
14263         int x = win.ws_col;
14264 #else
14265         no TIOCGSIZE or TIOCGWINSZ
14266 #endif /* TIOCGWINSZ */
14267 #endif /* TIOCGSIZE */
14268
14269   ;
14270   return 0;
14271 }
14272 _ACEOF
14273 rm -f conftest.$ac_objext
14274 if { (eval echo "$as_me:14274: \"$ac_compile\"") >&5
14275   (eval $ac_compile) 2>&5
14276   ac_status=$?
14277   echo "$as_me:14277: \$? = $ac_status" >&5
14278   (exit $ac_status); } &&
14279          { ac_try='test -s conftest.$ac_objext'
14280   { (eval echo "$as_me:14280: \"$ac_try\"") >&5
14281   (eval $ac_try) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); }; }; then
14285   cf_cv_sizechange=yes
14286 else
14287   echo "$as_me: failed program was:" >&5
14288 cat conftest.$ac_ext >&5
14289 cf_cv_sizechange=no
14290 fi
14291 rm -f conftest.$ac_objext conftest.$ac_ext
14292
14293         CPPFLAGS="$cf_save_CPPFLAGS"
14294         if test "$cf_cv_sizechange" = yes ; then
14295                 echo "size-change succeeded ($cf_opts)" >&5
14296                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14297                 break
14298         fi
14299 done
14300
14301 fi
14302 echo "$as_me:14302: result: $cf_cv_sizechange" >&5
14303 echo "${ECHO_T}$cf_cv_sizechange" >&6
14304 if test "$cf_cv_sizechange" != no ; then
14305         cat >>confdefs.h <<\EOF
14306 #define HAVE_SIZECHANGE 1
14307 EOF
14308
14309         case $cf_cv_sizechange in #(vi
14310         NEED*)
14311                 cat >>confdefs.h <<EOF
14312 #define $cf_cv_sizechange  1
14313 EOF
14314
14315                 ;;
14316         esac
14317 fi
14318
14319 echo "$as_me:14319: checking for memmove" >&5
14320 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14321 if test "${ac_cv_func_memmove+set}" = set; then
14322   echo $ECHO_N "(cached) $ECHO_C" >&6
14323 else
14324   cat >conftest.$ac_ext <<_ACEOF
14325 #line 14325 "configure"
14326 #include "confdefs.h"
14327 /* System header to define __stub macros and hopefully few prototypes,
14328     which can conflict with char memmove (); below.  */
14329 #include <assert.h>
14330 /* Override any gcc2 internal prototype to avoid an error.  */
14331 #ifdef __cplusplus
14332 extern "C"
14333 #endif
14334 /* We use char because int might match the return type of a gcc2
14335    builtin and then its argument prototype would still apply.  */
14336 char memmove ();
14337 char (*f) ();
14338
14339 int
14340 main ()
14341 {
14342 /* The GNU C library defines this for functions which it implements
14343     to always fail with ENOSYS.  Some functions are actually named
14344     something starting with __ and the normal name is an alias.  */
14345 #if defined (__stub_memmove) || defined (__stub___memmove)
14346 choke me
14347 #else
14348 f = memmove;
14349 #endif
14350
14351   ;
14352   return 0;
14353 }
14354 _ACEOF
14355 rm -f conftest.$ac_objext conftest$ac_exeext
14356 if { (eval echo "$as_me:14356: \"$ac_link\"") >&5
14357   (eval $ac_link) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } &&
14361          { ac_try='test -s conftest$ac_exeext'
14362   { (eval echo "$as_me:14362: \"$ac_try\"") >&5
14363   (eval $ac_try) 2>&5
14364   ac_status=$?
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); }; }; then
14367   ac_cv_func_memmove=yes
14368 else
14369   echo "$as_me: failed program was:" >&5
14370 cat conftest.$ac_ext >&5
14371 ac_cv_func_memmove=no
14372 fi
14373 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14374 fi
14375 echo "$as_me:14375: result: $ac_cv_func_memmove" >&5
14376 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14377 if test $ac_cv_func_memmove = yes; then
14378   :
14379 else
14380
14381 echo "$as_me:14381: checking for bcopy" >&5
14382 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14383 if test "${ac_cv_func_bcopy+set}" = set; then
14384   echo $ECHO_N "(cached) $ECHO_C" >&6
14385 else
14386   cat >conftest.$ac_ext <<_ACEOF
14387 #line 14387 "configure"
14388 #include "confdefs.h"
14389 /* System header to define __stub macros and hopefully few prototypes,
14390     which can conflict with char bcopy (); below.  */
14391 #include <assert.h>
14392 /* Override any gcc2 internal prototype to avoid an error.  */
14393 #ifdef __cplusplus
14394 extern "C"
14395 #endif
14396 /* We use char because int might match the return type of a gcc2
14397    builtin and then its argument prototype would still apply.  */
14398 char bcopy ();
14399 char (*f) ();
14400
14401 int
14402 main ()
14403 {
14404 /* The GNU C library defines this for functions which it implements
14405     to always fail with ENOSYS.  Some functions are actually named
14406     something starting with __ and the normal name is an alias.  */
14407 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14408 choke me
14409 #else
14410 f = bcopy;
14411 #endif
14412
14413   ;
14414   return 0;
14415 }
14416 _ACEOF
14417 rm -f conftest.$ac_objext conftest$ac_exeext
14418 if { (eval echo "$as_me:14418: \"$ac_link\"") >&5
14419   (eval $ac_link) 2>&5
14420   ac_status=$?
14421   echo "$as_me:14421: \$? = $ac_status" >&5
14422   (exit $ac_status); } &&
14423          { ac_try='test -s conftest$ac_exeext'
14424   { (eval echo "$as_me:14424: \"$ac_try\"") >&5
14425   (eval $ac_try) 2>&5
14426   ac_status=$?
14427   echo "$as_me:14427: \$? = $ac_status" >&5
14428   (exit $ac_status); }; }; then
14429   ac_cv_func_bcopy=yes
14430 else
14431   echo "$as_me: failed program was:" >&5
14432 cat conftest.$ac_ext >&5
14433 ac_cv_func_bcopy=no
14434 fi
14435 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14436 fi
14437 echo "$as_me:14437: result: $ac_cv_func_bcopy" >&5
14438 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14439 if test $ac_cv_func_bcopy = yes; then
14440
14441         echo "$as_me:14441: checking if bcopy does overlapping moves" >&5
14442 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14443 if test "${cf_cv_good_bcopy+set}" = set; then
14444   echo $ECHO_N "(cached) $ECHO_C" >&6
14445 else
14446
14447                 if test "$cross_compiling" = yes; then
14448   cf_cv_good_bcopy=unknown
14449 else
14450   cat >conftest.$ac_ext <<_ACEOF
14451 #line 14451 "configure"
14452 #include "confdefs.h"
14453
14454 int main() {
14455         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14456         char temp[40];
14457         bcopy(data, temp, sizeof(data));
14458         bcopy(temp+10, temp, 15);
14459         bcopy(temp+5, temp+15, 10);
14460         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14461 }
14462
14463 _ACEOF
14464 rm -f conftest$ac_exeext
14465 if { (eval echo "$as_me:14465: \"$ac_link\"") >&5
14466   (eval $ac_link) 2>&5
14467   ac_status=$?
14468   echo "$as_me:14468: \$? = $ac_status" >&5
14469   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14470   { (eval echo "$as_me:14470: \"$ac_try\"") >&5
14471   (eval $ac_try) 2>&5
14472   ac_status=$?
14473   echo "$as_me:14473: \$? = $ac_status" >&5
14474   (exit $ac_status); }; }; then
14475   cf_cv_good_bcopy=yes
14476 else
14477   echo "$as_me: program exited with status $ac_status" >&5
14478 echo "$as_me: failed program was:" >&5
14479 cat conftest.$ac_ext >&5
14480 cf_cv_good_bcopy=no
14481 fi
14482 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14483 fi
14484
14485 fi
14486 echo "$as_me:14486: result: $cf_cv_good_bcopy" >&5
14487 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14488
14489 else
14490   cf_cv_good_bcopy=no
14491 fi
14492
14493         if test "$cf_cv_good_bcopy" = yes ; then
14494                 cat >>confdefs.h <<\EOF
14495 #define USE_OK_BCOPY 1
14496 EOF
14497
14498         else
14499                 cat >>confdefs.h <<\EOF
14500 #define USE_MY_MEMMOVE 1
14501 EOF
14502
14503         fi
14504
14505 fi
14506
14507 echo "$as_me:14507: checking if poll really works" >&5
14508 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14509 if test "${cf_cv_working_poll+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512
14513 if test "$cross_compiling" = yes; then
14514   cf_cv_working_poll=unknown
14515 else
14516   cat >conftest.$ac_ext <<_ACEOF
14517 #line 14517 "configure"
14518 #include "confdefs.h"
14519
14520 #include <stdio.h>
14521 #ifdef HAVE_POLL_H
14522 #include <poll.h>
14523 #else
14524 #include <sys/poll.h>
14525 #endif
14526 int main() {
14527         struct pollfd myfds;
14528         int ret;
14529
14530         myfds.fd = 0;
14531         myfds.events = POLLIN;
14532
14533         ret = poll(&myfds, 1, 100);
14534         ${cf_cv_main_return:-return}(ret != 0);
14535 }
14536 _ACEOF
14537 rm -f conftest$ac_exeext
14538 if { (eval echo "$as_me:14538: \"$ac_link\"") >&5
14539   (eval $ac_link) 2>&5
14540   ac_status=$?
14541   echo "$as_me:14541: \$? = $ac_status" >&5
14542   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14543   { (eval echo "$as_me:14543: \"$ac_try\"") >&5
14544   (eval $ac_try) 2>&5
14545   ac_status=$?
14546   echo "$as_me:14546: \$? = $ac_status" >&5
14547   (exit $ac_status); }; }; then
14548   cf_cv_working_poll=yes
14549 else
14550   echo "$as_me: program exited with status $ac_status" >&5
14551 echo "$as_me: failed program was:" >&5
14552 cat conftest.$ac_ext >&5
14553 cf_cv_working_poll=no
14554 fi
14555 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14556 fi
14557 fi
14558 echo "$as_me:14558: result: $cf_cv_working_poll" >&5
14559 echo "${ECHO_T}$cf_cv_working_poll" >&6
14560 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14561 #define HAVE_WORKING_POLL 1
14562 EOF
14563
14564 # special check for test/ditto.c
14565
14566 echo "$as_me:14566: checking for openpty in -lutil" >&5
14567 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14568 if test "${ac_cv_lib_util_openpty+set}" = set; then
14569   echo $ECHO_N "(cached) $ECHO_C" >&6
14570 else
14571   ac_check_lib_save_LIBS=$LIBS
14572 LIBS="-lutil  $LIBS"
14573 cat >conftest.$ac_ext <<_ACEOF
14574 #line 14574 "configure"
14575 #include "confdefs.h"
14576
14577 /* Override any gcc2 internal prototype to avoid an error.  */
14578 #ifdef __cplusplus
14579 extern "C"
14580 #endif
14581 /* We use char because int might match the return type of a gcc2
14582    builtin and then its argument prototype would still apply.  */
14583 char openpty ();
14584 int
14585 main ()
14586 {
14587 openpty ();
14588   ;
14589   return 0;
14590 }
14591 _ACEOF
14592 rm -f conftest.$ac_objext conftest$ac_exeext
14593 if { (eval echo "$as_me:14593: \"$ac_link\"") >&5
14594   (eval $ac_link) 2>&5
14595   ac_status=$?
14596   echo "$as_me:14596: \$? = $ac_status" >&5
14597   (exit $ac_status); } &&
14598          { ac_try='test -s conftest$ac_exeext'
14599   { (eval echo "$as_me:14599: \"$ac_try\"") >&5
14600   (eval $ac_try) 2>&5
14601   ac_status=$?
14602   echo "$as_me:14602: \$? = $ac_status" >&5
14603   (exit $ac_status); }; }; then
14604   ac_cv_lib_util_openpty=yes
14605 else
14606   echo "$as_me: failed program was:" >&5
14607 cat conftest.$ac_ext >&5
14608 ac_cv_lib_util_openpty=no
14609 fi
14610 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14611 LIBS=$ac_check_lib_save_LIBS
14612 fi
14613 echo "$as_me:14613: result: $ac_cv_lib_util_openpty" >&5
14614 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14615 if test $ac_cv_lib_util_openpty = yes; then
14616   cf_cv_lib_util=yes
14617 else
14618   cf_cv_lib_util=no
14619 fi
14620
14621 echo "$as_me:14621: checking for openpty header" >&5
14622 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14623 if test "${cf_cv_func_openpty+set}" = set; then
14624   echo $ECHO_N "(cached) $ECHO_C" >&6
14625 else
14626
14627     cf_save_LIBS="$LIBS"
14628     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14629     for cf_header in pty.h libutil.h util.h
14630     do
14631     cat >conftest.$ac_ext <<_ACEOF
14632 #line 14632 "configure"
14633 #include "confdefs.h"
14634
14635 #include <$cf_header>
14636
14637 int
14638 main ()
14639 {
14640
14641     int x = openpty((int *)0, (int *)0, (char *)0,
14642                    (struct termios *)0, (struct winsize *)0);
14643
14644   ;
14645   return 0;
14646 }
14647 _ACEOF
14648 rm -f conftest.$ac_objext conftest$ac_exeext
14649 if { (eval echo "$as_me:14649: \"$ac_link\"") >&5
14650   (eval $ac_link) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit $ac_status); } &&
14654          { ac_try='test -s conftest$ac_exeext'
14655   { (eval echo "$as_me:14655: \"$ac_try\"") >&5
14656   (eval $ac_try) 2>&5
14657   ac_status=$?
14658   echo "$as_me:14658: \$? = $ac_status" >&5
14659   (exit $ac_status); }; }; then
14660
14661         cf_cv_func_openpty=$cf_header
14662         break
14663
14664 else
14665   echo "$as_me: failed program was:" >&5
14666 cat conftest.$ac_ext >&5
14667
14668         cf_cv_func_openpty=no
14669
14670 fi
14671 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14672     done
14673     LIBS="$cf_save_LIBS"
14674
14675 fi
14676 echo "$as_me:14676: result: $cf_cv_func_openpty" >&5
14677 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14678
14679 if test "$cf_cv_func_openpty" != no ; then
14680     cat >>confdefs.h <<EOF
14681 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14682 EOF
14683
14684     cat >>confdefs.h <<\EOF
14685 #define USE_XTERM_PTY 1
14686 EOF
14687
14688     if test "$cf_cv_lib_util" = yes ; then
14689         TEST_LIBS="-lutil $TEST_LIBS"
14690     fi
14691 fi
14692
14693 if test "$with_hashed_db" != no ; then
14694         cat >>confdefs.h <<\EOF
14695 #define USE_HASHED_DB 1
14696 EOF
14697
14698 case $with_hashed_db in #(vi
14699 yes|*able*) #(vi
14700     ;;
14701 *)
14702     if test -d "$with_hashed_db" ; then
14703
14704 if test -n "$with_hashed_db/include" ; then
14705   for cf_add_incdir in $with_hashed_db/include
14706   do
14707         while test $cf_add_incdir != /usr/include
14708         do
14709           if test -d $cf_add_incdir
14710           then
14711                 cf_have_incdir=no
14712                 if test -n "$CFLAGS$CPPFLAGS" ; then
14713                   # a loop is needed to ensure we can add subdirs of existing dirs
14714                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14715                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14716                           cf_have_incdir=yes; break
14717                         fi
14718                   done
14719                 fi
14720
14721                 if test "$cf_have_incdir" = no ; then
14722                   if test "$cf_add_incdir" = /usr/local/include ; then
14723                         if test "$GCC" = yes
14724                         then
14725                           cf_save_CPPFLAGS=$CPPFLAGS
14726                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14727                           cat >conftest.$ac_ext <<_ACEOF
14728 #line 14728 "configure"
14729 #include "confdefs.h"
14730 #include <stdio.h>
14731 int
14732 main ()
14733 {
14734 printf("Hello")
14735   ;
14736   return 0;
14737 }
14738 _ACEOF
14739 rm -f conftest.$ac_objext
14740 if { (eval echo "$as_me:14740: \"$ac_compile\"") >&5
14741   (eval $ac_compile) 2>&5
14742   ac_status=$?
14743   echo "$as_me:14743: \$? = $ac_status" >&5
14744   (exit $ac_status); } &&
14745          { ac_try='test -s conftest.$ac_objext'
14746   { (eval echo "$as_me:14746: \"$ac_try\"") >&5
14747   (eval $ac_try) 2>&5
14748   ac_status=$?
14749   echo "$as_me:14749: \$? = $ac_status" >&5
14750   (exit $ac_status); }; }; then
14751   :
14752 else
14753   echo "$as_me: failed program was:" >&5
14754 cat conftest.$ac_ext >&5
14755 cf_have_incdir=yes
14756 fi
14757 rm -f conftest.$ac_objext conftest.$ac_ext
14758                           CPPFLAGS=$cf_save_CPPFLAGS
14759                         fi
14760                   fi
14761                 fi
14762
14763                 if test "$cf_have_incdir" = no ; then
14764                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14765
14766 echo "${as_me-configure}:14766: testing adding $cf_add_incdir to include-path ..." 1>&5
14767
14768                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14769
14770                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14771                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14772                   cf_add_incdir="$cf_top_incdir"
14773                 else
14774                   break
14775                 fi
14776           fi
14777         done
14778   done
14779 fi
14780
14781 if test -n "$with_hashed_db/lib" ; then
14782   for cf_add_libdir in $with_hashed_db/lib
14783   do
14784     if test $cf_add_libdir = /usr/lib ; then
14785       :
14786     elif test -d $cf_add_libdir
14787     then
14788       cf_have_libdir=no
14789       if test -n "$LDFLAGS$LIBS" ; then
14790         # a loop is needed to ensure we can add subdirs of existing dirs
14791         for cf_test_libdir in $LDFLAGS $LIBS ; do
14792           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14793             cf_have_libdir=yes; break
14794           fi
14795         done
14796       fi
14797       if test "$cf_have_libdir" = no ; then
14798         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14799
14800 echo "${as_me-configure}:14800: testing adding $cf_add_libdir to library-path ..." 1>&5
14801
14802         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14803       fi
14804     fi
14805   done
14806 fi
14807
14808     fi
14809 esac
14810
14811 echo "$as_me:14811: checking for db.h" >&5
14812 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14813 if test "${ac_cv_header_db_h+set}" = set; then
14814   echo $ECHO_N "(cached) $ECHO_C" >&6
14815 else
14816   cat >conftest.$ac_ext <<_ACEOF
14817 #line 14817 "configure"
14818 #include "confdefs.h"
14819 #include <db.h>
14820 _ACEOF
14821 if { (eval echo "$as_me:14821: \"$ac_cpp conftest.$ac_ext\"") >&5
14822   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14823   ac_status=$?
14824   egrep -v '^ *\+' conftest.er1 >conftest.err
14825   rm -f conftest.er1
14826   cat conftest.err >&5
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } >/dev/null; then
14829   if test -s conftest.err; then
14830     ac_cpp_err=$ac_c_preproc_warn_flag
14831   else
14832     ac_cpp_err=
14833   fi
14834 else
14835   ac_cpp_err=yes
14836 fi
14837 if test -z "$ac_cpp_err"; then
14838   ac_cv_header_db_h=yes
14839 else
14840   echo "$as_me: failed program was:" >&5
14841   cat conftest.$ac_ext >&5
14842   ac_cv_header_db_h=no
14843 fi
14844 rm -f conftest.err conftest.$ac_ext
14845 fi
14846 echo "$as_me:14846: result: $ac_cv_header_db_h" >&5
14847 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14848 if test $ac_cv_header_db_h = yes; then
14849
14850 echo "$as_me:14850: checking for version of db" >&5
14851 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14852 if test "${cf_cv_hashed_db_version+set}" = set; then
14853   echo $ECHO_N "(cached) $ECHO_C" >&6
14854 else
14855
14856 cf_cv_hashed_db_version=unknown
14857
14858 for cf_db_version in 1 2 3 4 5
14859 do
14860
14861 echo "${as_me-configure}:14861: testing checking for db version $cf_db_version ..." 1>&5
14862
14863         cat >conftest.$ac_ext <<_ACEOF
14864 #line 14864 "configure"
14865 #include "confdefs.h"
14866
14867 $ac_includes_default
14868 #include <db.h>
14869
14870 #ifdef DB_VERSION_MAJOR
14871         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14872 #if $cf_db_version == DB_VERSION_MAJOR
14873         /* ok */
14874 #else
14875         make an error
14876 #endif
14877 #else
14878 #if $cf_db_version == 1
14879         /* ok: assuming this is DB 1.8.5 */
14880 #else
14881         make an error
14882 #endif
14883 #endif
14884
14885 int
14886 main ()
14887 {
14888 DBT *foo = 0
14889   ;
14890   return 0;
14891 }
14892 _ACEOF
14893 rm -f conftest.$ac_objext
14894 if { (eval echo "$as_me:14894: \"$ac_compile\"") >&5
14895   (eval $ac_compile) 2>&5
14896   ac_status=$?
14897   echo "$as_me:14897: \$? = $ac_status" >&5
14898   (exit $ac_status); } &&
14899          { ac_try='test -s conftest.$ac_objext'
14900   { (eval echo "$as_me:14900: \"$ac_try\"") >&5
14901   (eval $ac_try) 2>&5
14902   ac_status=$?
14903   echo "$as_me:14903: \$? = $ac_status" >&5
14904   (exit $ac_status); }; }; then
14905
14906         cf_cv_hashed_db_version=$cf_db_version
14907         break
14908
14909 else
14910   echo "$as_me: failed program was:" >&5
14911 cat conftest.$ac_ext >&5
14912 fi
14913 rm -f conftest.$ac_objext conftest.$ac_ext
14914 done
14915
14916 fi
14917 echo "$as_me:14917: result: $cf_cv_hashed_db_version" >&5
14918 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14919
14920 if test "$cf_cv_hashed_db_version" = unknown ; then
14921         { { echo "$as_me:14921: error: Cannot determine version of db" >&5
14922 echo "$as_me: error: Cannot determine version of db" >&2;}
14923    { (exit 1); exit 1; }; }
14924 else
14925
14926 echo "$as_me:14926: checking for db libraries" >&5
14927 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14928 if test "${cf_cv_hashed_db_libs+set}" = set; then
14929   echo $ECHO_N "(cached) $ECHO_C" >&6
14930 else
14931
14932 cf_cv_hashed_db_libs=unknown
14933 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14934 do
14935         cf_save_libs="$LIBS"
14936         if test -n "$cf_db_libs"; then
14937                 LIBS="-l$cf_db_libs $LIBS"
14938         fi
14939
14940 echo "${as_me-configure}:14940: testing checking for library "$cf_db_libs" ..." 1>&5
14941
14942         cat >conftest.$ac_ext <<_ACEOF
14943 #line 14943 "configure"
14944 #include "confdefs.h"
14945
14946 $ac_includes_default
14947 #include <db.h>
14948
14949 int
14950 main ()
14951 {
14952
14953         char *path = "/tmp/foo";
14954 #ifdef DB_VERSION_MAJOR
14955 #if DB_VERSION_MAJOR >= 4
14956         DB *result = 0;
14957         db_create(&result, NULL, 0);
14958         result->open(result,
14959                 NULL,
14960                 path,
14961                 path,
14962                 DB_HASH,
14963                 DB_CREATE,
14964                 0644);
14965 #elif DB_VERSION_MAJOR >= 3
14966         DB *result = 0;
14967         db_create(&result, NULL, 0);
14968         result->open(result,
14969                 path,
14970                 path,
14971                 DB_HASH,
14972                 DB_CREATE,
14973                 0644);
14974 #elif DB_VERSION_MAJOR >= 2
14975         DB *result = 0;
14976         db_open(path,
14977                 DB_HASH,
14978                 DB_CREATE,
14979                 0644,
14980                 (DB_ENV *) 0,
14981                 (DB_INFO *) 0,
14982                 &result);
14983 #endif /* DB_VERSION_MAJOR */
14984 #else
14985         DB *result = dbopen(path,
14986                      2,
14987                      0644,
14988                      DB_HASH,
14989                      0);
14990 #endif
14991         ${cf_cv_main_return:-return}(result != 0)
14992
14993   ;
14994   return 0;
14995 }
14996 _ACEOF
14997 rm -f conftest.$ac_objext conftest$ac_exeext
14998 if { (eval echo "$as_me:14998: \"$ac_link\"") >&5
14999   (eval $ac_link) 2>&5
15000   ac_status=$?
15001   echo "$as_me:15001: \$? = $ac_status" >&5
15002   (exit $ac_status); } &&
15003          { ac_try='test -s conftest$ac_exeext'
15004   { (eval echo "$as_me:15004: \"$ac_try\"") >&5
15005   (eval $ac_try) 2>&5
15006   ac_status=$?
15007   echo "$as_me:15007: \$? = $ac_status" >&5
15008   (exit $ac_status); }; }; then
15009
15010         if test -n "$cf_db_libs" ; then
15011                 cf_cv_hashed_db_libs=$cf_db_libs
15012         else
15013                 cf_cv_hashed_db_libs=default
15014         fi
15015         LIBS="$cf_save_libs"
15016         break
15017
15018 else
15019   echo "$as_me: failed program was:" >&5
15020 cat conftest.$ac_ext >&5
15021 fi
15022 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15023         LIBS="$cf_save_libs"
15024 done
15025
15026 fi
15027 echo "$as_me:15027: result: $cf_cv_hashed_db_libs" >&5
15028 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
15029
15030         if test "$cf_cv_hashed_db_libs" = unknown ; then
15031                 { { echo "$as_me:15031: error: Cannot determine library for db" >&5
15032 echo "$as_me: error: Cannot determine library for db" >&2;}
15033    { (exit 1); exit 1; }; }
15034         elif test "$cf_cv_hashed_db_libs" != default ; then
15035                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
15036         fi
15037 fi
15038
15039 else
15040
15041         { { echo "$as_me:15041: error: Cannot find db.h" >&5
15042 echo "$as_me: error: Cannot find db.h" >&2;}
15043    { (exit 1); exit 1; }; }
15044
15045 fi
15046
15047 fi
15048
15049 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15050         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15051         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15052 fi
15053
15054 # Just in case, check if the C compiler has a bool type.
15055
15056 echo "$as_me:15056: checking if we should include stdbool.h" >&5
15057 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15058
15059 if test "${cf_cv_header_stdbool_h+set}" = set; then
15060   echo $ECHO_N "(cached) $ECHO_C" >&6
15061 else
15062
15063         cat >conftest.$ac_ext <<_ACEOF
15064 #line 15064 "configure"
15065 #include "confdefs.h"
15066
15067 int
15068 main ()
15069 {
15070 bool foo = false
15071   ;
15072   return 0;
15073 }
15074 _ACEOF
15075 rm -f conftest.$ac_objext
15076 if { (eval echo "$as_me:15076: \"$ac_compile\"") >&5
15077   (eval $ac_compile) 2>&5
15078   ac_status=$?
15079   echo "$as_me:15079: \$? = $ac_status" >&5
15080   (exit $ac_status); } &&
15081          { ac_try='test -s conftest.$ac_objext'
15082   { (eval echo "$as_me:15082: \"$ac_try\"") >&5
15083   (eval $ac_try) 2>&5
15084   ac_status=$?
15085   echo "$as_me:15085: \$? = $ac_status" >&5
15086   (exit $ac_status); }; }; then
15087   cf_cv_header_stdbool_h=0
15088 else
15089   echo "$as_me: failed program was:" >&5
15090 cat conftest.$ac_ext >&5
15091 cat >conftest.$ac_ext <<_ACEOF
15092 #line 15092 "configure"
15093 #include "confdefs.h"
15094
15095 #ifndef __BEOS__
15096 #include <stdbool.h>
15097 #endif
15098
15099 int
15100 main ()
15101 {
15102 bool foo = false
15103   ;
15104   return 0;
15105 }
15106 _ACEOF
15107 rm -f conftest.$ac_objext
15108 if { (eval echo "$as_me:15108: \"$ac_compile\"") >&5
15109   (eval $ac_compile) 2>&5
15110   ac_status=$?
15111   echo "$as_me:15111: \$? = $ac_status" >&5
15112   (exit $ac_status); } &&
15113          { ac_try='test -s conftest.$ac_objext'
15114   { (eval echo "$as_me:15114: \"$ac_try\"") >&5
15115   (eval $ac_try) 2>&5
15116   ac_status=$?
15117   echo "$as_me:15117: \$? = $ac_status" >&5
15118   (exit $ac_status); }; }; then
15119   cf_cv_header_stdbool_h=1
15120 else
15121   echo "$as_me: failed program was:" >&5
15122 cat conftest.$ac_ext >&5
15123 cf_cv_header_stdbool_h=0
15124 fi
15125 rm -f conftest.$ac_objext conftest.$ac_ext
15126 fi
15127 rm -f conftest.$ac_objext conftest.$ac_ext
15128 fi
15129
15130 if test "$cf_cv_header_stdbool_h" = 1
15131 then    echo "$as_me:15131: result: yes" >&5
15132 echo "${ECHO_T}yes" >&6
15133 else    echo "$as_me:15133: result: no" >&5
15134 echo "${ECHO_T}no" >&6
15135 fi
15136
15137 echo "$as_me:15137: checking for builtin bool type" >&5
15138 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15139
15140 if test "${cf_cv_cc_bool_type+set}" = set; then
15141   echo $ECHO_N "(cached) $ECHO_C" >&6
15142 else
15143
15144         cat >conftest.$ac_ext <<_ACEOF
15145 #line 15145 "configure"
15146 #include "confdefs.h"
15147
15148 #include <stdio.h>
15149 #include <sys/types.h>
15150
15151 int
15152 main ()
15153 {
15154 bool x = false
15155   ;
15156   return 0;
15157 }
15158 _ACEOF
15159 rm -f conftest.$ac_objext
15160 if { (eval echo "$as_me:15160: \"$ac_compile\"") >&5
15161   (eval $ac_compile) 2>&5
15162   ac_status=$?
15163   echo "$as_me:15163: \$? = $ac_status" >&5
15164   (exit $ac_status); } &&
15165          { ac_try='test -s conftest.$ac_objext'
15166   { (eval echo "$as_me:15166: \"$ac_try\"") >&5
15167   (eval $ac_try) 2>&5
15168   ac_status=$?
15169   echo "$as_me:15169: \$? = $ac_status" >&5
15170   (exit $ac_status); }; }; then
15171   cf_cv_cc_bool_type=1
15172 else
15173   echo "$as_me: failed program was:" >&5
15174 cat conftest.$ac_ext >&5
15175 cf_cv_cc_bool_type=0
15176 fi
15177 rm -f conftest.$ac_objext conftest.$ac_ext
15178
15179 fi
15180
15181 if test "$cf_cv_cc_bool_type" = 1
15182 then    echo "$as_me:15182: result: yes" >&5
15183 echo "${ECHO_T}yes" >&6
15184 else    echo "$as_me:15184: result: no" >&5
15185 echo "${ECHO_T}no" >&6
15186 fi
15187
15188 # Check for C++ compiler characteristics (and ensure that it's there!)
15189 if test -n "$CXX" ; then
15190         ac_ext=cc
15191 ac_cpp='$CXXCPP $CPPFLAGS'
15192 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15193 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15194 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15195 ac_main_return=return
15196
15197 if test -n "$GXX" ; then
15198 case $cf_cv_system_name in #(vi
15199 os2*) #(vi
15200         cf_stdcpp_libname=stdcpp
15201         ;;
15202 *)
15203         cf_stdcpp_libname=stdc++
15204         ;;
15205 esac
15206 echo "$as_me:15206: checking for library $cf_stdcpp_libname" >&5
15207 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15208 if test "${cf_cv_libstdcpp+set}" = set; then
15209   echo $ECHO_N "(cached) $ECHO_C" >&6
15210 else
15211
15212         cf_save="$LIBS"
15213         LIBS="$LIBS -l$cf_stdcpp_libname"
15214 cat >conftest.$ac_ext <<_ACEOF
15215 #line 15215 "configure"
15216 #include "confdefs.h"
15217
15218 #include <strstream.h>
15219 int
15220 main ()
15221 {
15222
15223 char buf[80];
15224 strstreambuf foo(buf, sizeof(buf))
15225
15226   ;
15227   return 0;
15228 }
15229 _ACEOF
15230 rm -f conftest.$ac_objext conftest$ac_exeext
15231 if { (eval echo "$as_me:15231: \"$ac_link\"") >&5
15232   (eval $ac_link) 2>&5
15233   ac_status=$?
15234   echo "$as_me:15234: \$? = $ac_status" >&5
15235   (exit $ac_status); } &&
15236          { ac_try='test -s conftest$ac_exeext'
15237   { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238   (eval $ac_try) 2>&5
15239   ac_status=$?
15240   echo "$as_me:15240: \$? = $ac_status" >&5
15241   (exit $ac_status); }; }; then
15242   cf_cv_libstdcpp=yes
15243 else
15244   echo "$as_me: failed program was:" >&5
15245 cat conftest.$ac_ext >&5
15246 cf_cv_libstdcpp=no
15247 fi
15248 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15249         LIBS="$cf_save"
15250
15251 fi
15252 echo "$as_me:15252: result: $cf_cv_libstdcpp" >&5
15253 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15254 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15255 fi
15256
15257         echo "$as_me:15257: checking whether $CXX understands -c and -o together" >&5
15258 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15259 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15260   echo $ECHO_N "(cached) $ECHO_C" >&6
15261 else
15262
15263 cat > conftest.$ac_ext <<CF_EOF
15264 #include <stdio.h>
15265 int main()
15266 {
15267         ${cf_cv_main_return:-return}(0);
15268 }
15269 CF_EOF
15270 # We do the test twice because some compilers refuse to overwrite an
15271 # existing .o file with -o, though they will create one.
15272 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15273 if { (eval echo "$as_me:15273: \"$ac_try\"") >&5
15274   (eval $ac_try) 2>&5
15275   ac_status=$?
15276   echo "$as_me:15276: \$? = $ac_status" >&5
15277   (exit $ac_status); } &&
15278   test -f conftest2.$ac_objext && { (eval echo "$as_me:15278: \"$ac_try\"") >&5
15279   (eval $ac_try) 2>&5
15280   ac_status=$?
15281   echo "$as_me:15281: \$? = $ac_status" >&5
15282   (exit $ac_status); };
15283 then
15284   eval cf_cv_prog_CXX_c_o=yes
15285 else
15286   eval cf_cv_prog_CXX_c_o=no
15287 fi
15288 rm -f conftest*
15289
15290 fi
15291 if test $cf_cv_prog_CXX_c_o = yes; then
15292   echo "$as_me:15292: result: yes" >&5
15293 echo "${ECHO_T}yes" >&6
15294 else
15295   echo "$as_me:15295: result: no" >&5
15296 echo "${ECHO_T}no" >&6
15297 fi
15298
15299         case $GXX_VERSION in
15300         1*|2.0-6*)
15301                 cf_cxx_library=yes
15302                 ;;
15303         *-2.7*|2.7*)
15304
15305 cf_cxx_library=unknown
15306 case $cf_cv_system_name in #(vi
15307 os2*) #(vi
15308         cf_gpp_libname=gpp
15309         ;;
15310 *)
15311         cf_gpp_libname=g++
15312         ;;
15313 esac
15314 if test "$GXX" = yes; then
15315         echo "$as_me:15315: checking for lib$cf_gpp_libname" >&5
15316 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15317         cf_save="$LIBS"
15318         LIBS="$LIBS -l$cf_gpp_libname"
15319         cat >conftest.$ac_ext <<_ACEOF
15320 #line 15320 "configure"
15321 #include "confdefs.h"
15322
15323 #include <$cf_gpp_libname/builtin.h>
15324
15325 int
15326 main ()
15327 {
15328 two_arg_error_handler_t foo2 = lib_error_handler
15329   ;
15330   return 0;
15331 }
15332 _ACEOF
15333 rm -f conftest.$ac_objext conftest$ac_exeext
15334 if { (eval echo "$as_me:15334: \"$ac_link\"") >&5
15335   (eval $ac_link) 2>&5
15336   ac_status=$?
15337   echo "$as_me:15337: \$? = $ac_status" >&5
15338   (exit $ac_status); } &&
15339          { ac_try='test -s conftest$ac_exeext'
15340   { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341   (eval $ac_try) 2>&5
15342   ac_status=$?
15343   echo "$as_me:15343: \$? = $ac_status" >&5
15344   (exit $ac_status); }; }; then
15345   cf_cxx_library=yes
15346          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15347          if test "$cf_gpp_libname" = cpp ; then
15348             cat >>confdefs.h <<\EOF
15349 #define HAVE_GPP_BUILTIN_H 1
15350 EOF
15351
15352          else
15353             cat >>confdefs.h <<\EOF
15354 #define HAVE_GXX_BUILTIN_H 1
15355 EOF
15356
15357          fi
15358 else
15359   echo "$as_me: failed program was:" >&5
15360 cat conftest.$ac_ext >&5
15361 cat >conftest.$ac_ext <<_ACEOF
15362 #line 15362 "configure"
15363 #include "confdefs.h"
15364
15365 #include <builtin.h>
15366
15367 int
15368 main ()
15369 {
15370 two_arg_error_handler_t foo2 = lib_error_handler
15371   ;
15372   return 0;
15373 }
15374 _ACEOF
15375 rm -f conftest.$ac_objext conftest$ac_exeext
15376 if { (eval echo "$as_me:15376: \"$ac_link\"") >&5
15377   (eval $ac_link) 2>&5
15378   ac_status=$?
15379   echo "$as_me:15379: \$? = $ac_status" >&5
15380   (exit $ac_status); } &&
15381          { ac_try='test -s conftest$ac_exeext'
15382   { (eval echo "$as_me:15382: \"$ac_try\"") >&5
15383   (eval $ac_try) 2>&5
15384   ac_status=$?
15385   echo "$as_me:15385: \$? = $ac_status" >&5
15386   (exit $ac_status); }; }; then
15387   cf_cxx_library=yes
15388          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15389          cat >>confdefs.h <<\EOF
15390 #define HAVE_BUILTIN_H 1
15391 EOF
15392
15393 else
15394   echo "$as_me: failed program was:" >&5
15395 cat conftest.$ac_ext >&5
15396 cf_cxx_library=no
15397 fi
15398 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15399 fi
15400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15401         LIBS="$cf_save"
15402         echo "$as_me:15402: result: $cf_cxx_library" >&5
15403 echo "${ECHO_T}$cf_cxx_library" >&6
15404 fi
15405
15406                 ;;
15407         *)
15408                 cf_cxx_library=no
15409                 ;;
15410         esac
15411
15412         ac_ext=cc
15413 ac_cpp='$CXXCPP $CPPFLAGS'
15414 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15415 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15416 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15417 ac_main_return=return
15418 echo "$as_me:15418: checking how to run the C++ preprocessor" >&5
15419 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15420 if test -z "$CXXCPP"; then
15421   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15422   echo $ECHO_N "(cached) $ECHO_C" >&6
15423 else
15424       # Double quotes because CXXCPP needs to be expanded
15425     for CXXCPP in "$CXX -E" "/lib/cpp"
15426     do
15427       ac_preproc_ok=false
15428 for ac_cxx_preproc_warn_flag in '' yes
15429 do
15430   # Use a header file that comes with gcc, so configuring glibc
15431   # with a fresh cross-compiler works.
15432   # On the NeXT, cc -E runs the code through the compiler's parser,
15433   # not just through cpp. "Syntax error" is here to catch this case.
15434   cat >conftest.$ac_ext <<_ACEOF
15435 #line 15435 "configure"
15436 #include "confdefs.h"
15437 #include <assert.h>
15438                      Syntax error
15439 _ACEOF
15440 if { (eval echo "$as_me:15440: \"$ac_cpp conftest.$ac_ext\"") >&5
15441   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15442   ac_status=$?
15443   egrep -v '^ *\+' conftest.er1 >conftest.err
15444   rm -f conftest.er1
15445   cat conftest.err >&5
15446   echo "$as_me:15446: \$? = $ac_status" >&5
15447   (exit $ac_status); } >/dev/null; then
15448   if test -s conftest.err; then
15449     ac_cpp_err=$ac_cxx_preproc_warn_flag
15450   else
15451     ac_cpp_err=
15452   fi
15453 else
15454   ac_cpp_err=yes
15455 fi
15456 if test -z "$ac_cpp_err"; then
15457   :
15458 else
15459   echo "$as_me: failed program was:" >&5
15460   cat conftest.$ac_ext >&5
15461   # Broken: fails on valid input.
15462 continue
15463 fi
15464 rm -f conftest.err conftest.$ac_ext
15465
15466   # OK, works on sane cases.  Now check whether non-existent headers
15467   # can be detected and how.
15468   cat >conftest.$ac_ext <<_ACEOF
15469 #line 15469 "configure"
15470 #include "confdefs.h"
15471 #include <ac_nonexistent.h>
15472 _ACEOF
15473 if { (eval echo "$as_me:15473: \"$ac_cpp conftest.$ac_ext\"") >&5
15474   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15475   ac_status=$?
15476   egrep -v '^ *\+' conftest.er1 >conftest.err
15477   rm -f conftest.er1
15478   cat conftest.err >&5
15479   echo "$as_me:15479: \$? = $ac_status" >&5
15480   (exit $ac_status); } >/dev/null; then
15481   if test -s conftest.err; then
15482     ac_cpp_err=$ac_cxx_preproc_warn_flag
15483   else
15484     ac_cpp_err=
15485   fi
15486 else
15487   ac_cpp_err=yes
15488 fi
15489 if test -z "$ac_cpp_err"; then
15490   # Broken: success on invalid input.
15491 continue
15492 else
15493   echo "$as_me: failed program was:" >&5
15494   cat conftest.$ac_ext >&5
15495   # Passes both tests.
15496 ac_preproc_ok=:
15497 break
15498 fi
15499 rm -f conftest.err conftest.$ac_ext
15500
15501 done
15502 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15503 rm -f conftest.err conftest.$ac_ext
15504 if $ac_preproc_ok; then
15505   break
15506 fi
15507
15508     done
15509     ac_cv_prog_CXXCPP=$CXXCPP
15510
15511 fi
15512   CXXCPP=$ac_cv_prog_CXXCPP
15513 else
15514   ac_cv_prog_CXXCPP=$CXXCPP
15515 fi
15516 echo "$as_me:15516: result: $CXXCPP" >&5
15517 echo "${ECHO_T}$CXXCPP" >&6
15518 ac_preproc_ok=false
15519 for ac_cxx_preproc_warn_flag in '' yes
15520 do
15521   # Use a header file that comes with gcc, so configuring glibc
15522   # with a fresh cross-compiler works.
15523   # On the NeXT, cc -E runs the code through the compiler's parser,
15524   # not just through cpp. "Syntax error" is here to catch this case.
15525   cat >conftest.$ac_ext <<_ACEOF
15526 #line 15526 "configure"
15527 #include "confdefs.h"
15528 #include <assert.h>
15529                      Syntax error
15530 _ACEOF
15531 if { (eval echo "$as_me:15531: \"$ac_cpp conftest.$ac_ext\"") >&5
15532   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15533   ac_status=$?
15534   egrep -v '^ *\+' conftest.er1 >conftest.err
15535   rm -f conftest.er1
15536   cat conftest.err >&5
15537   echo "$as_me:15537: \$? = $ac_status" >&5
15538   (exit $ac_status); } >/dev/null; then
15539   if test -s conftest.err; then
15540     ac_cpp_err=$ac_cxx_preproc_warn_flag
15541   else
15542     ac_cpp_err=
15543   fi
15544 else
15545   ac_cpp_err=yes
15546 fi
15547 if test -z "$ac_cpp_err"; then
15548   :
15549 else
15550   echo "$as_me: failed program was:" >&5
15551   cat conftest.$ac_ext >&5
15552   # Broken: fails on valid input.
15553 continue
15554 fi
15555 rm -f conftest.err conftest.$ac_ext
15556
15557   # OK, works on sane cases.  Now check whether non-existent headers
15558   # can be detected and how.
15559   cat >conftest.$ac_ext <<_ACEOF
15560 #line 15560 "configure"
15561 #include "confdefs.h"
15562 #include <ac_nonexistent.h>
15563 _ACEOF
15564 if { (eval echo "$as_me:15564: \"$ac_cpp conftest.$ac_ext\"") >&5
15565   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15566   ac_status=$?
15567   egrep -v '^ *\+' conftest.er1 >conftest.err
15568   rm -f conftest.er1
15569   cat conftest.err >&5
15570   echo "$as_me:15570: \$? = $ac_status" >&5
15571   (exit $ac_status); } >/dev/null; then
15572   if test -s conftest.err; then
15573     ac_cpp_err=$ac_cxx_preproc_warn_flag
15574   else
15575     ac_cpp_err=
15576   fi
15577 else
15578   ac_cpp_err=yes
15579 fi
15580 if test -z "$ac_cpp_err"; then
15581   # Broken: success on invalid input.
15582 continue
15583 else
15584   echo "$as_me: failed program was:" >&5
15585   cat conftest.$ac_ext >&5
15586   # Passes both tests.
15587 ac_preproc_ok=:
15588 break
15589 fi
15590 rm -f conftest.err conftest.$ac_ext
15591
15592 done
15593 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15594 rm -f conftest.err conftest.$ac_ext
15595 if $ac_preproc_ok; then
15596   :
15597 else
15598   { { echo "$as_me:15598: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15599 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15600    { (exit 1); exit 1; }; }
15601 fi
15602
15603 ac_ext=cc
15604 ac_cpp='$CXXCPP $CPPFLAGS'
15605 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15606 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15607 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15608 ac_main_return=return
15609
15610 for ac_header in iostream typeinfo
15611 do
15612 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15613 echo "$as_me:15613: checking for $ac_header" >&5
15614 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15615 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15616   echo $ECHO_N "(cached) $ECHO_C" >&6
15617 else
15618   cat >conftest.$ac_ext <<_ACEOF
15619 #line 15619 "configure"
15620 #include "confdefs.h"
15621 #include <$ac_header>
15622 _ACEOF
15623 if { (eval echo "$as_me:15623: \"$ac_cpp conftest.$ac_ext\"") >&5
15624   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15625   ac_status=$?
15626   egrep -v '^ *\+' conftest.er1 >conftest.err
15627   rm -f conftest.er1
15628   cat conftest.err >&5
15629   echo "$as_me:15629: \$? = $ac_status" >&5
15630   (exit $ac_status); } >/dev/null; then
15631   if test -s conftest.err; then
15632     ac_cpp_err=$ac_cxx_preproc_warn_flag
15633   else
15634     ac_cpp_err=
15635   fi
15636 else
15637   ac_cpp_err=yes
15638 fi
15639 if test -z "$ac_cpp_err"; then
15640   eval "$as_ac_Header=yes"
15641 else
15642   echo "$as_me: failed program was:" >&5
15643   cat conftest.$ac_ext >&5
15644   eval "$as_ac_Header=no"
15645 fi
15646 rm -f conftest.err conftest.$ac_ext
15647 fi
15648 echo "$as_me:15648: result: `eval echo '${'$as_ac_Header'}'`" >&5
15649 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15650 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15651   cat >>confdefs.h <<EOF
15652 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15653 EOF
15654
15655 fi
15656 done
15657
15658     if test x"$ac_cv_header_iostream" = xyes ; then
15659         echo "$as_me:15659: checking if iostream uses std-namespace" >&5
15660 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15661         cat >conftest.$ac_ext <<_ACEOF
15662 #line 15662 "configure"
15663 #include "confdefs.h"
15664
15665 #include <iostream>
15666 using std::endl;
15667 using std::cerr;
15668 int
15669 main ()
15670 {
15671
15672 cerr << "testing" << endl;
15673
15674   ;
15675   return 0;
15676 }
15677 _ACEOF
15678 rm -f conftest.$ac_objext
15679 if { (eval echo "$as_me:15679: \"$ac_compile\"") >&5
15680   (eval $ac_compile) 2>&5
15681   ac_status=$?
15682   echo "$as_me:15682: \$? = $ac_status" >&5
15683   (exit $ac_status); } &&
15684          { ac_try='test -s conftest.$ac_objext'
15685   { (eval echo "$as_me:15685: \"$ac_try\"") >&5
15686   (eval $ac_try) 2>&5
15687   ac_status=$?
15688   echo "$as_me:15688: \$? = $ac_status" >&5
15689   (exit $ac_status); }; }; then
15690   cf_iostream_namespace=yes
15691 else
15692   echo "$as_me: failed program was:" >&5
15693 cat conftest.$ac_ext >&5
15694 cf_iostream_namespace=no
15695 fi
15696 rm -f conftest.$ac_objext conftest.$ac_ext
15697         echo "$as_me:15697: result: $cf_iostream_namespace" >&5
15698 echo "${ECHO_T}$cf_iostream_namespace" >&6
15699         if test "$cf_iostream_namespace" = yes ; then
15700             cat >>confdefs.h <<\EOF
15701 #define IOSTREAM_NAMESPACE 1
15702 EOF
15703
15704         fi
15705     fi
15706
15707 echo "$as_me:15707: checking if we should include stdbool.h" >&5
15708 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15709
15710 if test "${cf_cv_header_stdbool_h+set}" = set; then
15711   echo $ECHO_N "(cached) $ECHO_C" >&6
15712 else
15713
15714         cat >conftest.$ac_ext <<_ACEOF
15715 #line 15715 "configure"
15716 #include "confdefs.h"
15717
15718 int
15719 main ()
15720 {
15721 bool foo = false
15722   ;
15723   return 0;
15724 }
15725 _ACEOF
15726 rm -f conftest.$ac_objext
15727 if { (eval echo "$as_me:15727: \"$ac_compile\"") >&5
15728   (eval $ac_compile) 2>&5
15729   ac_status=$?
15730   echo "$as_me:15730: \$? = $ac_status" >&5
15731   (exit $ac_status); } &&
15732          { ac_try='test -s conftest.$ac_objext'
15733   { (eval echo "$as_me:15733: \"$ac_try\"") >&5
15734   (eval $ac_try) 2>&5
15735   ac_status=$?
15736   echo "$as_me:15736: \$? = $ac_status" >&5
15737   (exit $ac_status); }; }; then
15738   cf_cv_header_stdbool_h=0
15739 else
15740   echo "$as_me: failed program was:" >&5
15741 cat conftest.$ac_ext >&5
15742 cat >conftest.$ac_ext <<_ACEOF
15743 #line 15743 "configure"
15744 #include "confdefs.h"
15745
15746 #ifndef __BEOS__
15747 #include <stdbool.h>
15748 #endif
15749
15750 int
15751 main ()
15752 {
15753 bool foo = false
15754   ;
15755   return 0;
15756 }
15757 _ACEOF
15758 rm -f conftest.$ac_objext
15759 if { (eval echo "$as_me:15759: \"$ac_compile\"") >&5
15760   (eval $ac_compile) 2>&5
15761   ac_status=$?
15762   echo "$as_me:15762: \$? = $ac_status" >&5
15763   (exit $ac_status); } &&
15764          { ac_try='test -s conftest.$ac_objext'
15765   { (eval echo "$as_me:15765: \"$ac_try\"") >&5
15766   (eval $ac_try) 2>&5
15767   ac_status=$?
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit $ac_status); }; }; then
15770   cf_cv_header_stdbool_h=1
15771 else
15772   echo "$as_me: failed program was:" >&5
15773 cat conftest.$ac_ext >&5
15774 cf_cv_header_stdbool_h=0
15775 fi
15776 rm -f conftest.$ac_objext conftest.$ac_ext
15777 fi
15778 rm -f conftest.$ac_objext conftest.$ac_ext
15779 fi
15780
15781 if test "$cf_cv_header_stdbool_h" = 1
15782 then    echo "$as_me:15782: result: yes" >&5
15783 echo "${ECHO_T}yes" >&6
15784 else    echo "$as_me:15784: result: no" >&5
15785 echo "${ECHO_T}no" >&6
15786 fi
15787
15788 echo "$as_me:15788: checking for builtin bool type" >&5
15789 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15790
15791 if test "${cf_cv_builtin_bool+set}" = set; then
15792   echo $ECHO_N "(cached) $ECHO_C" >&6
15793 else
15794
15795         cat >conftest.$ac_ext <<_ACEOF
15796 #line 15796 "configure"
15797 #include "confdefs.h"
15798
15799 #include <stdio.h>
15800 #include <sys/types.h>
15801
15802 int
15803 main ()
15804 {
15805 bool x = false
15806   ;
15807   return 0;
15808 }
15809 _ACEOF
15810 rm -f conftest.$ac_objext
15811 if { (eval echo "$as_me:15811: \"$ac_compile\"") >&5
15812   (eval $ac_compile) 2>&5
15813   ac_status=$?
15814   echo "$as_me:15814: \$? = $ac_status" >&5
15815   (exit $ac_status); } &&
15816          { ac_try='test -s conftest.$ac_objext'
15817   { (eval echo "$as_me:15817: \"$ac_try\"") >&5
15818   (eval $ac_try) 2>&5
15819   ac_status=$?
15820   echo "$as_me:15820: \$? = $ac_status" >&5
15821   (exit $ac_status); }; }; then
15822   cf_cv_builtin_bool=1
15823 else
15824   echo "$as_me: failed program was:" >&5
15825 cat conftest.$ac_ext >&5
15826 cf_cv_builtin_bool=0
15827 fi
15828 rm -f conftest.$ac_objext conftest.$ac_ext
15829
15830 fi
15831
15832 if test "$cf_cv_builtin_bool" = 1
15833 then    echo "$as_me:15833: result: yes" >&5
15834 echo "${ECHO_T}yes" >&6
15835 else    echo "$as_me:15835: result: no" >&5
15836 echo "${ECHO_T}no" >&6
15837 fi
15838
15839 echo "$as_me:15839: checking for size of bool" >&5
15840 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15841 if test "${cf_cv_type_of_bool+set}" = set; then
15842   echo $ECHO_N "(cached) $ECHO_C" >&6
15843 else
15844
15845         rm -f cf_test.out
15846         if test "$cross_compiling" = yes; then
15847   cf_cv_type_of_bool=unknown
15848 else
15849   cat >conftest.$ac_ext <<_ACEOF
15850 #line 15850 "configure"
15851 #include "confdefs.h"
15852
15853 #include <stdlib.h>
15854 #include <stdio.h>
15855
15856 #if defined(__cplusplus)
15857
15858 #ifdef HAVE_GXX_BUILTIN_H
15859 #include <g++/builtin.h>
15860 #elif HAVE_GPP_BUILTIN_H
15861 #include <gpp/builtin.h>
15862 #elif HAVE_BUILTIN_H
15863 #include <builtin.h>
15864 #endif
15865
15866 #else
15867
15868 #if $cf_cv_header_stdbool_h
15869 #include <stdbool.h>
15870 #endif
15871
15872 #endif
15873
15874 main()
15875 {
15876         FILE *fp = fopen("cf_test.out", "w");
15877         if (fp != 0) {
15878                 bool x = true;
15879                 if ((bool)(-x) >= 0)
15880                         fputs("unsigned ", fp);
15881                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15882                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15883                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15884                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15885                 fclose(fp);
15886         }
15887         ${cf_cv_main_return:-return}(0);
15888 }
15889
15890 _ACEOF
15891 rm -f conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15897   { (eval echo "$as_me:15897: \"$ac_try\"") >&5
15898   (eval $ac_try) 2>&5
15899   ac_status=$?
15900   echo "$as_me:15900: \$? = $ac_status" >&5
15901   (exit $ac_status); }; }; then
15902   cf_cv_type_of_bool=`cat cf_test.out`
15903                  if test -z "$cf_cv_type_of_bool"; then
15904                    cf_cv_type_of_bool=unknown
15905                  fi
15906 else
15907   echo "$as_me: program exited with status $ac_status" >&5
15908 echo "$as_me: failed program was:" >&5
15909 cat conftest.$ac_ext >&5
15910 cf_cv_type_of_bool=unknown
15911 fi
15912 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15913 fi
15914
15915 fi
15916
15917         rm -f cf_test.out
15918 echo "$as_me:15918: result: $cf_cv_type_of_bool" >&5
15919 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15920 if test "$cf_cv_type_of_bool" = unknown ; then
15921         case .$NCURSES_BOOL in #(vi
15922         .auto|.) NCURSES_BOOL=unsigned;;
15923         esac
15924         { echo "$as_me:15924: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15925 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15926         cf_cv_type_of_bool=$NCURSES_BOOL
15927 fi
15928
15929 echo "$as_me:15929: checking for special defines needed for etip.h" >&5
15930 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15931 cf_save_CXXFLAGS="$CXXFLAGS"
15932 cf_result="none"
15933 for cf_math in "" MATH_H
15934 do
15935 for cf_excp in "" MATH_EXCEPTION
15936 do
15937         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15938         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15939         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15940 cat >conftest.$ac_ext <<_ACEOF
15941 #line 15941 "configure"
15942 #include "confdefs.h"
15943
15944 #include <etip.h.in>
15945
15946 int
15947 main ()
15948 {
15949
15950   ;
15951   return 0;
15952 }
15953 _ACEOF
15954 rm -f conftest.$ac_objext
15955 if { (eval echo "$as_me:15955: \"$ac_compile\"") >&5
15956   (eval $ac_compile) 2>&5
15957   ac_status=$?
15958   echo "$as_me:15958: \$? = $ac_status" >&5
15959   (exit $ac_status); } &&
15960          { ac_try='test -s conftest.$ac_objext'
15961   { (eval echo "$as_me:15961: \"$ac_try\"") >&5
15962   (eval $ac_try) 2>&5
15963   ac_status=$?
15964   echo "$as_me:15964: \$? = $ac_status" >&5
15965   (exit $ac_status); }; }; then
15966
15967         test -n "$cf_math" && cat >>confdefs.h <<EOF
15968 #define ETIP_NEEDS_${cf_math} 1
15969 EOF
15970
15971         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15972 #define ETIP_NEEDS_${cf_excp} 1
15973 EOF
15974
15975         cf_result="$cf_math $cf_excp"
15976         break
15977
15978 else
15979   echo "$as_me: failed program was:" >&5
15980 cat conftest.$ac_ext >&5
15981 fi
15982 rm -f conftest.$ac_objext conftest.$ac_ext
15983 done
15984 done
15985 echo "$as_me:15985: result: $cf_result" >&5
15986 echo "${ECHO_T}$cf_result" >&6
15987 CXXFLAGS="$cf_save_CXXFLAGS"
15988
15989 if test -n "$CXX"; then
15990 echo "$as_me:15990: checking if $CXX accepts parameter initialization" >&5
15991 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15992 if test "${cf_cv_cpp_param_init+set}" = set; then
15993   echo $ECHO_N "(cached) $ECHO_C" >&6
15994 else
15995
15996         ac_ext=cc
15997 ac_cpp='$CXXCPP $CPPFLAGS'
15998 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15999 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16000 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16001 ac_main_return=return
16002
16003         if test "$cross_compiling" = yes; then
16004   cf_cv_cpp_param_init=unknown
16005 else
16006   cat >conftest.$ac_ext <<_ACEOF
16007 #line 16007 "configure"
16008 #include "confdefs.h"
16009
16010 class TEST {
16011 private:
16012         int value;
16013 public:
16014         TEST(int x = 1);
16015         ~TEST();
16016 };
16017
16018 TEST::TEST(int x = 1)   // some compilers do not like second initializer
16019 {
16020         value = x;
16021 }
16022 void main() { }
16023
16024 _ACEOF
16025 rm -f conftest$ac_exeext
16026 if { (eval echo "$as_me:16026: \"$ac_link\"") >&5
16027   (eval $ac_link) 2>&5
16028   ac_status=$?
16029   echo "$as_me:16029: \$? = $ac_status" >&5
16030   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16031   { (eval echo "$as_me:16031: \"$ac_try\"") >&5
16032   (eval $ac_try) 2>&5
16033   ac_status=$?
16034   echo "$as_me:16034: \$? = $ac_status" >&5
16035   (exit $ac_status); }; }; then
16036   cf_cv_cpp_param_init=yes
16037 else
16038   echo "$as_me: program exited with status $ac_status" >&5
16039 echo "$as_me: failed program was:" >&5
16040 cat conftest.$ac_ext >&5
16041 cf_cv_cpp_param_init=no
16042 fi
16043 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16044 fi
16045         ac_ext=cc
16046 ac_cpp='$CXXCPP $CPPFLAGS'
16047 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16048 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16049 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16050 ac_main_return=return
16051
16052 fi
16053 echo "$as_me:16053: result: $cf_cv_cpp_param_init" >&5
16054 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16055 fi
16056 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16057 #define CPP_HAS_PARAM_INIT 1
16058 EOF
16059
16060 if test -n "$CXX"; then
16061
16062 echo "$as_me:16062: checking if $CXX accepts static_cast" >&5
16063 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16064 if test "${cf_cv_cpp_static_cast+set}" = set; then
16065   echo $ECHO_N "(cached) $ECHO_C" >&6
16066 else
16067
16068         ac_ext=cc
16069 ac_cpp='$CXXCPP $CPPFLAGS'
16070 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16071 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16072 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16073 ac_main_return=return
16074
16075         cat >conftest.$ac_ext <<_ACEOF
16076 #line 16076 "configure"
16077 #include "confdefs.h"
16078
16079 class NCursesPanel
16080 {
16081 public:
16082   NCursesPanel(int nlines,
16083                int ncols,
16084                int begin_y = 0,
16085                int begin_x = 0)
16086   {
16087   }
16088
16089   ~NCursesPanel();
16090 };
16091
16092 template<class T> class NCursesUserPanel : public NCursesPanel
16093 {
16094 public:
16095   NCursesUserPanel (int nlines,
16096                     int ncols,
16097                     int begin_y = 0,
16098                     int begin_x = 0,
16099                     const T* p_UserData = static_cast<T*>(0))
16100     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16101   {
16102   };
16103   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16104   {
16105   };
16106
16107   virtual ~NCursesUserPanel() {};
16108 };
16109
16110 int
16111 main ()
16112 {
16113
16114         const char* p_UserData = static_cast<char*>(0)
16115   ;
16116   return 0;
16117 }
16118 _ACEOF
16119 rm -f conftest.$ac_objext
16120 if { (eval echo "$as_me:16120: \"$ac_compile\"") >&5
16121   (eval $ac_compile) 2>&5
16122   ac_status=$?
16123   echo "$as_me:16123: \$? = $ac_status" >&5
16124   (exit $ac_status); } &&
16125          { ac_try='test -s conftest.$ac_objext'
16126   { (eval echo "$as_me:16126: \"$ac_try\"") >&5
16127   (eval $ac_try) 2>&5
16128   ac_status=$?
16129   echo "$as_me:16129: \$? = $ac_status" >&5
16130   (exit $ac_status); }; }; then
16131   cf_cv_cpp_static_cast=yes
16132 else
16133   echo "$as_me: failed program was:" >&5
16134 cat conftest.$ac_ext >&5
16135 cf_cv_cpp_static_cast=no
16136 fi
16137 rm -f conftest.$ac_objext conftest.$ac_ext
16138
16139         ac_ext=cc
16140 ac_cpp='$CXXCPP $CPPFLAGS'
16141 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16142 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16143 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16144 ac_main_return=return
16145
16146 fi
16147 echo "$as_me:16147: result: $cf_cv_cpp_static_cast" >&5
16148 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16149
16150 fi
16151
16152 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16153 #define CPP_HAS_STATIC_CAST 1
16154 EOF
16155
16156         CXX_AR='$(AR)'
16157         CXX_ARFLAGS='$(ARFLAGS)'
16158         case $cf_cv_system_name in #(vi
16159         irix*) #(vi
16160             if test "$GXX" != yes ; then
16161                 CXX_AR='$(CXX)'
16162                 CXX_ARFLAGS='-ar -o'
16163             fi
16164             ;;
16165         sco3.2v5*) #(vi
16166             CXXLDFLAGS="-u main"
16167             ;;
16168         solaris2*)
16169             if test "$GXX" != yes ; then
16170                 CXX_AR='$(CXX)'
16171                 CXX_ARFLAGS='-xar -o'
16172             fi
16173             ;;
16174         esac
16175
16176 else
16177         cf_cxx_library=no
16178         cf_cv_builtin_bool=1
16179
16180         # Just because we are not configuring against C++ right now does not
16181         # mean that a user will not want to use C++.  Some distributors disable
16182         # the C++ portion of this configuration as a shortcut (or just to avoid
16183         # compiling the demo in the c++ directory).  So we need a reasonable
16184         # default for the 'bool' type.
16185         #
16186         # Caveat: since the storage of the bool type is not standardized, it
16187         # may change.
16188
16189         if test "$NCURSES_BOOL" != auto ; then
16190                 cf_cv_type_of_bool=$NCURSES_BOOL
16191                 cf_cv_header_stdbool_h=0
16192         else
16193                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16194
16195 echo "$as_me:16195: checking for size of bool" >&5
16196 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16197 if test "${cf_cv_type_of_bool+set}" = set; then
16198   echo $ECHO_N "(cached) $ECHO_C" >&6
16199 else
16200
16201         rm -f cf_test.out
16202         if test "$cross_compiling" = yes; then
16203   cf_cv_type_of_bool=unknown
16204 else
16205   cat >conftest.$ac_ext <<_ACEOF
16206 #line 16206 "configure"
16207 #include "confdefs.h"
16208
16209 #include <stdlib.h>
16210 #include <stdio.h>
16211
16212 #if defined(__cplusplus)
16213
16214 #ifdef HAVE_GXX_BUILTIN_H
16215 #include <g++/builtin.h>
16216 #elif HAVE_GPP_BUILTIN_H
16217 #include <gpp/builtin.h>
16218 #elif HAVE_BUILTIN_H
16219 #include <builtin.h>
16220 #endif
16221
16222 #else
16223
16224 #if $cf_cv_header_stdbool_h
16225 #include <stdbool.h>
16226 #endif
16227
16228 #endif
16229
16230 main()
16231 {
16232         FILE *fp = fopen("cf_test.out", "w");
16233         if (fp != 0) {
16234                 bool x = true;
16235                 if ((bool)(-x) >= 0)
16236                         fputs("unsigned ", fp);
16237                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16238                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16239                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16240                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16241                 fclose(fp);
16242         }
16243         ${cf_cv_main_return:-return}(0);
16244 }
16245
16246 _ACEOF
16247 rm -f conftest$ac_exeext
16248 if { (eval echo "$as_me:16248: \"$ac_link\"") >&5
16249   (eval $ac_link) 2>&5
16250   ac_status=$?
16251   echo "$as_me:16251: \$? = $ac_status" >&5
16252   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16253   { (eval echo "$as_me:16253: \"$ac_try\"") >&5
16254   (eval $ac_try) 2>&5
16255   ac_status=$?
16256   echo "$as_me:16256: \$? = $ac_status" >&5
16257   (exit $ac_status); }; }; then
16258   cf_cv_type_of_bool=`cat cf_test.out`
16259                  if test -z "$cf_cv_type_of_bool"; then
16260                    cf_cv_type_of_bool=unknown
16261                  fi
16262 else
16263   echo "$as_me: program exited with status $ac_status" >&5
16264 echo "$as_me: failed program was:" >&5
16265 cat conftest.$ac_ext >&5
16266 cf_cv_type_of_bool=unknown
16267 fi
16268 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16269 fi
16270
16271 fi
16272
16273         rm -f cf_test.out
16274 echo "$as_me:16274: result: $cf_cv_type_of_bool" >&5
16275 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16276 if test "$cf_cv_type_of_bool" = unknown ; then
16277         case .$NCURSES_BOOL in #(vi
16278         .auto|.) NCURSES_BOOL=unsigned;;
16279         esac
16280         { echo "$as_me:16280: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16281 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16282         cf_cv_type_of_bool=$NCURSES_BOOL
16283 fi
16284
16285                 else
16286                         echo "$as_me:16286: checking for fallback type of bool" >&5
16287 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16288                         case "$host_cpu" in #(vi
16289                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16290                         *)      cf_cv_type_of_bool=int  ;;
16291                         esac
16292                         echo "$as_me:16292: result: $cf_cv_type_of_bool" >&5
16293 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16294                 fi
16295         fi
16296 fi
16297
16298 # If the C compiler did not declare bool, and we did not determine that the C++
16299 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16300 # ncurses library use the same type as C++ bool.  Note that this allows one to
16301 # specify the type of bool in a configure-script option and postpone
16302 # integration with the C++ compiler provided that the types are compatible.
16303 USE_CXX_BOOL=1
16304 if test $cf_cv_cc_bool_type = 1
16305 then
16306         # oops: C has a bool.  Unlikely, but C++ could differ.
16307         USE_CXX_BOOL=0
16308 elif test $cf_cv_builtin_bool = 0
16309 then
16310         # C++ has no bool
16311         USE_CXX_BOOL=0
16312 else
16313         # this is the normal case
16314         USE_CXX_BOOL='defined(__cplusplus)'
16315 fi
16316
16317 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16318
16319 if test "$cf_with_ada" != "no" ; then
16320     if test "$with_libtool" != "no"; then
16321         { echo "$as_me:16321: WARNING: libtool does not support Ada - disabling feature" >&5
16322 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16323         cf_with_ada=no
16324     fi
16325 fi
16326
16327 if test "$cf_with_ada" != "no" ; then
16328 cf_ada_make=gnatmake
16329 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16330 set dummy $cf_ada_make; ac_word=$2
16331 echo "$as_me:16331: checking for $ac_word" >&5
16332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16333 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16334   echo $ECHO_N "(cached) $ECHO_C" >&6
16335 else
16336   if test -n "$gnat_exists"; then
16337   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16338 else
16339   ac_save_IFS=$IFS; IFS=$ac_path_separator
16340 ac_dummy="$PATH"
16341 for ac_dir in $ac_dummy; do
16342   IFS=$ac_save_IFS
16343   test -z "$ac_dir" && ac_dir=.
16344   $as_executable_p "$ac_dir/$ac_word" || continue
16345 ac_cv_prog_gnat_exists="yes"
16346 echo "$as_me:16346: found $ac_dir/$ac_word" >&5
16347 break
16348 done
16349
16350   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16351 fi
16352 fi
16353 gnat_exists=$ac_cv_prog_gnat_exists
16354 if test -n "$gnat_exists"; then
16355   echo "$as_me:16355: result: $gnat_exists" >&5
16356 echo "${ECHO_T}$gnat_exists" >&6
16357 else
16358   echo "$as_me:16358: result: no" >&5
16359 echo "${ECHO_T}no" >&6
16360 fi
16361
16362 if test "$ac_cv_prog_gnat_exists" = no; then
16363    cf_ada_make=
16364 else
16365
16366 echo "$as_me:16366: checking for gnat version" >&5
16367 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16368 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16369   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16370 echo "$as_me:16370: result: $cf_gnat_version" >&5
16371 echo "${ECHO_T}$cf_gnat_version" >&6
16372
16373 case $cf_gnat_version in
16374   3.1[1-9]*|3.[2-9]*|[4-9].*)
16375     cf_cv_prog_gnat_correct=yes
16376     ;;
16377   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16378      cf_cv_prog_gnat_correct=no
16379      ;;
16380 esac
16381 case $cf_gnat_version in
16382   3.[1-9]*|[4-9].*)
16383       cf_compile_generics=generics
16384       cf_generic_objects="\${GENOBJS}"
16385       ;;
16386   *)  cf_compile_generics=
16387       cf_generic_objects=
16388       ;;
16389 esac
16390
16391    # Extract the first word of "m4", so it can be a program name with args.
16392 set dummy m4; ac_word=$2
16393 echo "$as_me:16393: checking for $ac_word" >&5
16394 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16395 if test "${ac_cv_prog_M4_exists+set}" = set; then
16396   echo $ECHO_N "(cached) $ECHO_C" >&6
16397 else
16398   if test -n "$M4_exists"; then
16399   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16400 else
16401   ac_save_IFS=$IFS; IFS=$ac_path_separator
16402 ac_dummy="$PATH"
16403 for ac_dir in $ac_dummy; do
16404   IFS=$ac_save_IFS
16405   test -z "$ac_dir" && ac_dir=.
16406   $as_executable_p "$ac_dir/$ac_word" || continue
16407 ac_cv_prog_M4_exists="yes"
16408 echo "$as_me:16408: found $ac_dir/$ac_word" >&5
16409 break
16410 done
16411
16412   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16413 fi
16414 fi
16415 M4_exists=$ac_cv_prog_M4_exists
16416 if test -n "$M4_exists"; then
16417   echo "$as_me:16417: result: $M4_exists" >&5
16418 echo "${ECHO_T}$M4_exists" >&6
16419 else
16420   echo "$as_me:16420: result: no" >&5
16421 echo "${ECHO_T}no" >&6
16422 fi
16423
16424    if test "$ac_cv_prog_M4_exists" = no; then
16425       cf_cv_prog_gnat_correct=no
16426       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16427    fi
16428    if test "$cf_cv_prog_gnat_correct" = yes; then
16429       echo "$as_me:16429: checking if GNAT works" >&5
16430 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16431
16432 rm -f conftest*
16433 cat >>conftest.ads <<CF_EOF
16434 procedure conftest;
16435 CF_EOF
16436 cat >>conftest.adb <<CF_EOF
16437 with Text_IO;
16438 with GNAT.OS_Lib;
16439 procedure conftest is
16440 begin
16441    Text_IO.Put ("Hello World");
16442    Text_IO.New_Line;
16443    GNAT.OS_Lib.OS_Exit (0);
16444 end conftest;
16445 CF_EOF
16446 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16447    if ( ./conftest 1>&5 2>&1 ) ; then
16448       cf_cv_prog_gnat_correct=yes
16449    else
16450       cf_cv_prog_gnat_correct=no
16451    fi
16452 else
16453    cf_cv_prog_gnat_correct=no
16454 fi
16455 rm -f conftest*
16456
16457       echo "$as_me:16457: result: $cf_cv_prog_gnat_correct" >&5
16458 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16459    fi
16460 fi
16461 if test "$cf_cv_prog_gnat_correct" = yes; then
16462    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16463
16464    echo "$as_me:16464: checking if GNAT pragma Unreferenced works" >&5
16465 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16466
16467 rm -f conftest*
16468 cat >>conftest.ads <<CF_EOF
16469 procedure conftest;
16470 CF_EOF
16471 cat >>conftest.adb <<CF_EOF
16472 with Text_IO;
16473 with GNAT.OS_Lib;
16474 procedure conftest is
16475    test : Integer;
16476    pragma Unreferenced (test);
16477 begin
16478    test := 1;
16479    Text_IO.Put ("Hello World");
16480    Text_IO.New_Line;
16481    GNAT.OS_Lib.OS_Exit (0);
16482 end conftest;
16483 CF_EOF
16484 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16485       cf_cv_pragma_unreferenced=yes
16486 else
16487    cf_cv_pragma_unreferenced=no
16488 fi
16489 rm -f conftest*
16490
16491    echo "$as_me:16491: result: $cf_cv_pragma_unreferenced" >&5
16492 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16493
16494    # if the pragma is supported, use it (needed in the Trace code).
16495    if test $cf_cv_pragma_unreferenced = yes ; then
16496       PRAGMA_UNREF=TRUE
16497    else
16498       PRAGMA_UNREF=FALSE
16499    fi
16500
16501 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16502 if test "${with_ada_compiler+set}" = set; then
16503   withval="$with_ada_compiler"
16504   cf_ada_compiler=$withval
16505 else
16506   cf_ada_compiler=gnatmake
16507 fi;
16508
16509    cf_ada_package=terminal_interface
16510
16511 # Check whether --with-ada-include or --without-ada-include was given.
16512 if test "${with_ada_include+set}" = set; then
16513   withval="$with_ada_include"
16514
16515 else
16516   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16517 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16518
16519 if test "x$prefix" != xNONE; then
16520   cf_path_syntax="$prefix"
16521 else
16522   cf_path_syntax="$ac_default_prefix"
16523 fi
16524
16525 case ".$withval" in #(vi
16526 .\$\(*\)*|.\'*\'*) #(vi
16527   ;;
16528 ..|./*|.\\*) #(vi
16529   ;;
16530 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16531   ;;
16532 .\${*prefix}*) #(vi
16533   eval withval="$withval"
16534   case ".$withval" in #(vi
16535   .NONE/*)
16536     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16537     ;;
16538   esac
16539   ;; #(vi
16540 .no|.NONE/*)
16541   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16542   ;;
16543 *)
16544   { { echo "$as_me:16544: error: expected a pathname, not \"$withval\"" >&5
16545 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16546    { (exit 1); exit 1; }; }
16547   ;;
16548 esac
16549
16550 fi
16551 ADA_INCLUDE="$withval"
16552
16553 # Check whether --with-ada-objects or --without-ada-objects was given.
16554 if test "${with_ada_objects+set}" = set; then
16555   withval="$with_ada_objects"
16556
16557 else
16558   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16559 fi; if test -n "$prefix/lib/ada/adalib" ; then
16560
16561 if test "x$prefix" != xNONE; then
16562   cf_path_syntax="$prefix"
16563 else
16564   cf_path_syntax="$ac_default_prefix"
16565 fi
16566
16567 case ".$withval" in #(vi
16568 .\$\(*\)*|.\'*\'*) #(vi
16569   ;;
16570 ..|./*|.\\*) #(vi
16571   ;;
16572 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16573   ;;
16574 .\${*prefix}*) #(vi
16575   eval withval="$withval"
16576   case ".$withval" in #(vi
16577   .NONE/*)
16578     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16579     ;;
16580   esac
16581   ;; #(vi
16582 .no|.NONE/*)
16583   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16584   ;;
16585 *)
16586   { { echo "$as_me:16586: error: expected a pathname, not \"$withval\"" >&5
16587 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16588    { (exit 1); exit 1; }; }
16589   ;;
16590 esac
16591
16592 fi
16593 ADA_OBJECTS="$withval"
16594
16595 fi
16596 fi
16597 else
16598    cf_with_ada=no
16599 fi
16600
16601 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16602 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16603 ###
16604 ### ticlib modules may be a separate library, otherwise contained in termlib.
16605 ### termlib modules may be a separate library, otherwise contained in ncurses.
16606 ###
16607 ### The of "+" or " " between the tokens controls the way the script
16608 ### chooses to split module lists into libraries.
16609 ###
16610 ### (see CF_LIB_RULES).
16611 echo "$as_me:16611: checking for library subsets" >&5
16612 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16613 LIB_SUBSETS=
16614
16615 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16616         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16617         if test "$with_ticlib" != no ; then
16618                 LIB_SUBSETS="${LIB_SUBSETS} "
16619         else
16620                 LIB_SUBSETS="${LIB_SUBSETS}+"
16621         fi
16622 fi
16623
16624 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16625 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16626
16627 if test "$with_term_driver" != no ; then
16628         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
16629         case $cf_cv_system_name in #(vi
16630         *mingw32*) #(vi
16631                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16632                 ;;
16633         *) #(vi
16634                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16635                 ;;
16636         esac
16637 fi
16638
16639 if test "$with_termlib" != no ; then
16640         LIB_SUBSETS="${LIB_SUBSETS} "
16641 else
16642         LIB_SUBSETS="${LIB_SUBSETS}+"
16643 fi
16644
16645 LIB_SUBSETS="${LIB_SUBSETS}base"
16646
16647 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16648 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16649
16650 echo "$as_me:16650: result: $LIB_SUBSETS" >&5
16651 echo "${ECHO_T}$LIB_SUBSETS" >&6
16652
16653 ### Construct the list of include-directories to be generated
16654
16655 CPPFLAGS="$CPPFLAGS -I. -I../include"
16656 if test "$srcdir" != "."; then
16657         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16658 fi
16659 if test "$GCC" != yes; then
16660         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16661 elif test "$includedir" != "/usr/include"; then
16662         if test "$includedir" = '${prefix}/include' ; then
16663                 if test $prefix != /usr ; then
16664                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16665                 fi
16666         else
16667                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16668         fi
16669 fi
16670
16671 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16672 if test "$srcdir" != "."; then
16673         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16674 fi
16675 if test "$GCC" != yes; then
16676         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16677 elif test "$includedir" != "/usr/include"; then
16678         if test "$includedir" = '${prefix}/include' ; then
16679                 if test $prefix != /usr ; then
16680                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16681                 fi
16682         else
16683                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16684         fi
16685 fi
16686
16687 ### Build up pieces for makefile rules
16688 echo "$as_me:16688: checking default library suffix" >&5
16689 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16690
16691         case $DFT_LWR_MODEL in
16692         libtool) DFT_ARG_SUFFIX=''   ;;
16693         normal)  DFT_ARG_SUFFIX=''   ;;
16694         debug)   DFT_ARG_SUFFIX='_g' ;;
16695         profile) DFT_ARG_SUFFIX='_p' ;;
16696         shared)  DFT_ARG_SUFFIX=''   ;;
16697         esac
16698         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16699 echo "$as_me:16699: result: $DFT_ARG_SUFFIX" >&5
16700 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16701
16702 echo "$as_me:16702: checking default library-dependency suffix" >&5
16703 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16704
16705         case $DFT_LWR_MODEL in #(vi
16706         libtool) #(vi
16707                 DFT_LIB_SUFFIX='.la'
16708                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16709                 ;;
16710         normal) #(vi
16711                 DFT_LIB_SUFFIX='.a'
16712                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16713                 ;;
16714         debug) #(vi
16715                 DFT_LIB_SUFFIX='_g.a'
16716                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16717                 ;;
16718         profile) #(vi
16719                 DFT_LIB_SUFFIX='_p.a'
16720                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16721                 ;;
16722         shared) #(vi
16723                 case $cf_cv_system_name in
16724                 aix[56]*) #(vi
16725                         DFT_LIB_SUFFIX='.a'
16726                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16727                         ;;
16728                 cygwin*) #(vi
16729                         DFT_LIB_SUFFIX='.dll'
16730                         DFT_DEP_SUFFIX='.dll.a'
16731                         ;;
16732                 darwin*) #(vi
16733                         DFT_LIB_SUFFIX='.dylib'
16734                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16735                         ;;
16736                 hpux*) #(vi
16737                         case $target in
16738                         ia64*) #(vi
16739                                 DFT_LIB_SUFFIX='.so'
16740                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16741                                 ;;
16742                         *) #(vi
16743                                 DFT_LIB_SUFFIX='.sl'
16744                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16745                                 ;;
16746                         esac
16747                         ;;
16748                 *)      DFT_LIB_SUFFIX='.so'
16749                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16750                         ;;
16751                 esac
16752         esac
16753         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16754         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16755 echo "$as_me:16755: result: $DFT_DEP_SUFFIX" >&5
16756 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16757
16758 echo "$as_me:16758: checking default object directory" >&5
16759 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16760
16761         case $DFT_LWR_MODEL in
16762         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16763         normal)  DFT_OBJ_SUBDIR='objects' ;;
16764         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16765         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16766         shared)
16767                 case $cf_cv_system_name in #(vi
16768                 cygwin) #(vi
16769                         DFT_OBJ_SUBDIR='objects' ;;
16770                 *)
16771                         DFT_OBJ_SUBDIR='obj_s' ;;
16772                 esac
16773         esac
16774 echo "$as_me:16774: result: $DFT_OBJ_SUBDIR" >&5
16775 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16776
16777 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16778 if test "$cf_with_cxx" = yes ; then
16779 echo "$as_me:16779: checking c++ library-dependency suffix" >&5
16780 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16781 if test "$with_libtool" != "no"; then
16782         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16783 else
16784
16785         case normal in #(vi
16786         libtool) #(vi
16787                 CXX_LIB_SUFFIX='.la'
16788                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16789                 ;;
16790         normal) #(vi
16791                 CXX_LIB_SUFFIX='.a'
16792                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16793                 ;;
16794         debug) #(vi
16795                 CXX_LIB_SUFFIX='_g.a'
16796                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16797                 ;;
16798         profile) #(vi
16799                 CXX_LIB_SUFFIX='_p.a'
16800                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16801                 ;;
16802         shared) #(vi
16803                 case $cf_cv_system_name in
16804                 aix[56]*) #(vi
16805                         CXX_LIB_SUFFIX='.a'
16806                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16807                         ;;
16808                 cygwin*) #(vi
16809                         CXX_LIB_SUFFIX='.dll'
16810                         CXX_DEP_SUFFIX='.dll.a'
16811                         ;;
16812                 darwin*) #(vi
16813                         CXX_LIB_SUFFIX='.dylib'
16814                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16815                         ;;
16816                 hpux*) #(vi
16817                         case $target in
16818                         ia64*) #(vi
16819                                 CXX_LIB_SUFFIX='.so'
16820                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16821                                 ;;
16822                         *) #(vi
16823                                 CXX_LIB_SUFFIX='.sl'
16824                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16825                                 ;;
16826                         esac
16827                         ;;
16828                 *)      CXX_LIB_SUFFIX='.so'
16829                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16830                         ;;
16831                 esac
16832         esac
16833         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16834         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16835 fi
16836 echo "$as_me:16836: result: $CXX_LIB_SUFFIX" >&5
16837 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16838
16839 fi
16840
16841 # do not want -ldl in build except as needed for -lncurses dependency
16842 if test "$with_dlsym" = yes ; then
16843 if test $DFT_LWR_MODEL = shared || \
16844    test $DFT_LWR_MODEL = libtool ; then
16845
16846 # remove dl library from $LIBS
16847 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16848
16849 fi
16850 fi
16851 ### Set up low-level terminfo dependencies for makefiles.
16852
16853 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16854 # do not need libdl
16855 TICS_LIST=
16856 if test "$with_dlsym" = yes ; then
16857
16858 # remove dl library from $SHLIB_LIST
16859 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16860
16861 fi
16862
16863 if test "$with_ticlib" != no ; then
16864
16865         if test "$with_ticlib" != yes ; then
16866                 TICS_NAME=$with_ticlib
16867                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16868                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16869                 TICS_LIB_SUFFIX="${with_ticlib}"
16870         else
16871                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16872                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16873                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16874         fi
16875         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16876 else
16877         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16878 fi
16879
16880 if test "$with_termlib" != no ; then
16881
16882         if test "$with_termlib" != yes ; then
16883                 TINFO_NAME=$with_termlib
16884                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16885                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16886                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16887                 TINFO_LIB_SUFFIX="${with_termlib}"
16888         else
16889                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16890                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16891                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16892                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16893         fi
16894
16895         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16896         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16897         if test "$DFT_LWR_MODEL" = "libtool"; then
16898                 TEST_ARGS="${TEST_DEPS}"
16899                 TEST_ARG2="${TEST_DEP2}"
16900                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16901                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
16902                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
16903         else
16904                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16905                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16906                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16907                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16908                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16909         fi
16910 else
16911         # the next lines are needed for linking libtic over libncurses
16912         TINFO_NAME=${LIB_NAME}
16913         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16914         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16915         if test "$with_tic_depends" = yes ; then
16916                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16917         else
16918                 TICS_LIST="$SHLIB_LIST"
16919         fi
16920
16921         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16922 fi
16923
16924 if test "$DFT_LWR_MODEL" = shared ; then
16925         case $cf_cv_system_name in #(vi
16926         cygwin*)
16927                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16928                 TINFO_SUFFIX=.dll
16929                 ;;
16930         esac
16931 fi
16932
16933 if test "$with_dlsym" = yes ; then
16934
16935 # remove dl library from $TICS_LIST
16936 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16937
16938 fi
16939
16940 if test "$DFT_LWR_MODEL" = "libtool"; then
16941     OBJEXT=lo
16942 fi
16943
16944 # needed for Ada95
16945 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16946
16947 case $DFT_LWR_MODEL in
16948 normal|debug|profile)
16949
16950 if test "$GCC" = yes ; then
16951         case $cf_cv_system_name in #(
16952         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
16953                 LDFLAGS_STATIC=
16954                 LDFLAGS_SHARED=
16955                 ;;
16956     *)  #( normally, except when broken
16957         LDFLAGS_STATIC=-static
16958         LDFLAGS_SHARED=-dynamic
16959         ;;
16960     esac
16961 else
16962         case $cf_cv_system_name in #(
16963         aix[456]*)      #( from ld manpage
16964                 LDFLAGS_STATIC=-bstatic
16965                 LDFLAGS_SHARED=-bdynamic
16966                 ;;
16967         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16968                 # We could also use just "archive" and "shared".
16969                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16970                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16971                 ;;
16972         irix*)          #( from ld manpage IRIX64
16973                 LDFLAGS_STATIC=-Bstatic
16974                 LDFLAGS_SHARED=-Bdynamic
16975                 ;;
16976         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16977                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16978                 LDFLAGS_STATIC=-noso
16979                 LDFLAGS_SHARED=-so_archive
16980                 ;;
16981         solaris2*)
16982                 LDFLAGS_STATIC=-Bstatic
16983                 LDFLAGS_SHARED=-Bdynamic
16984                 ;;
16985         esac
16986 fi
16987
16988         ;;
16989 esac
16990
16991 echo "$as_me:16991: checking where we will install curses.h" >&5
16992 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16993 test "$with_overwrite" = no && \
16994 test "x$includedir" = 'x${prefix}/include' && \
16995         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16996 echo "$as_me:16996: result: $includedir" >&5
16997 echo "${ECHO_T}$includedir" >&6
16998
16999 ### Resolve a conflict between normal and wide-curses by forcing applications
17000 ### that will need libutf8 to add it to their configure script.
17001 if test "$with_overwrite" != no ; then
17002 if test "$NCURSES_LIBUTF8" = 1 ; then
17003         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
17004         { echo "$as_me:17004: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
17005 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
17006 fi
17007 fi
17008 WITH_OVERWRITE=$with_overwrite
17009
17010 # used to separate tack out of the tree
17011 NCURSES_TREE=
17012
17013 ### predefined stuff for the test programs
17014 cat >>confdefs.h <<\EOF
17015 #define HAVE_SLK_COLOR 1
17016 EOF
17017
17018 ### Construct the list of subdirectories for which we'll customize makefiles
17019 ### with the appropriate compile-rules.
17020
17021 echo "$as_me:17021: checking for src modules" >&5
17022 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
17023
17024 # dependencies and linker-arguments for test-programs
17025 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
17026 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
17027 if test "$DFT_LWR_MODEL" = "libtool"; then
17028         TEST_ARGS="${TEST_DEPS}"
17029         TEST_ARG2="${TEST_DEP2}"
17030 else
17031         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
17032         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
17033 fi
17034
17035 cf_cv_src_modules=
17036 for cf_dir in $modules_to_build
17037 do
17038         if test -f $srcdir/$cf_dir/modules; then
17039
17040                 # We may/may not have tack in the distribution, though the
17041                 # makefile is.
17042                 if test $cf_dir = tack ; then
17043                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17044                                 continue
17045                         fi
17046                 fi
17047
17048                 if test -z "$cf_cv_src_modules"; then
17049                         cf_cv_src_modules=$cf_dir
17050                 else
17051                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17052                 fi
17053
17054                 # Make the ncurses_cfg.h file record the library interface files as
17055                 # well.  These are header files that are the same name as their
17056                 # directory.  Ncurses is the only library that does not follow
17057                 # that pattern.
17058                 if test $cf_dir = tack ; then
17059                         continue
17060                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17061
17062 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17063
17064                         cat >>confdefs.h <<EOF
17065 #define HAVE_${cf_have_include}_H 1
17066 EOF
17067
17068                         cat >>confdefs.h <<EOF
17069 #define HAVE_LIB${cf_have_include} 1
17070 EOF
17071
17072                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17073                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17074                         if test "$DFT_LWR_MODEL" = "libtool"; then
17075                                 TEST_ARGS="${TEST_DEPS}"
17076                                 TEST_ARG2="${TEST_DEP2}"
17077                         else
17078                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17079                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17080                         fi
17081                 fi
17082         fi
17083 done
17084 echo "$as_me:17084: result: $cf_cv_src_modules" >&5
17085 echo "${ECHO_T}$cf_cv_src_modules" >&6
17086
17087 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17088 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17089
17090 SRC_SUBDIRS=
17091 if test "x$cf_with_manpages" != xno ; then
17092         SRC_SUBDIRS="$SRC_SUBDIRS man"
17093 fi
17094 SRC_SUBDIRS="$SRC_SUBDIRS include"
17095 for cf_dir in $cf_cv_src_modules
17096 do
17097         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17098 done
17099 SRC_SUBDIRS="$SRC_SUBDIRS test"
17100 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17101 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17102
17103 ADA_SUBDIRS=
17104 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17105         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17106         ADA_SUBDIRS="gen src samples"
17107 fi
17108
17109 SUB_MAKEFILES=
17110 for cf_dir in $SRC_SUBDIRS
17111 do
17112         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17113 done
17114
17115 if test -n "$ADA_SUBDIRS"; then
17116         for cf_dir in $ADA_SUBDIRS
17117         do
17118                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17119         done
17120
17121 fi
17122
17123 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17124    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17125 fi
17126
17127 DIRS_TO_MAKE="lib"
17128 for cf_item in $cf_list_models
17129 do
17130
17131         case $cf_item in
17132         libtool) cf_subdir='obj_lo'  ;;
17133         normal)  cf_subdir='objects' ;;
17134         debug)   cf_subdir='obj_g' ;;
17135         profile) cf_subdir='obj_p' ;;
17136         shared)
17137                 case $cf_cv_system_name in #(vi
17138                 cygwin) #(vi
17139                         cf_subdir='objects' ;;
17140                 *)
17141                         cf_subdir='obj_s' ;;
17142                 esac
17143         esac
17144
17145         for cf_item2 in $DIRS_TO_MAKE
17146         do
17147                 test $cf_item2 = $cf_subdir && break
17148         done
17149         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17150 done
17151 for cf_dir in $DIRS_TO_MAKE
17152 do
17153         test ! -d $cf_dir && mkdir $cf_dir
17154 done
17155
17156 cat >>confdefs.h <<EOF
17157 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17158 EOF
17159
17160 cat >>confdefs.h <<EOF
17161 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17162 EOF
17163
17164 ### Now that we're done running tests, add the compiler-warnings, if any
17165
17166 cf_fix_cppflags=no
17167 cf_new_cflags=
17168 cf_new_cppflags=
17169 cf_new_extra_cppflags=
17170
17171 for cf_add_cflags in $EXTRA_CFLAGS
17172 do
17173 case $cf_fix_cppflags in
17174 no)
17175         case $cf_add_cflags in #(vi
17176         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17177                 case $cf_add_cflags in
17178                 -D*)
17179                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17180
17181                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17182                         && test -z "${cf_tst_cflags}" \
17183                         && cf_fix_cppflags=yes
17184
17185                         if test $cf_fix_cppflags = yes ; then
17186                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17187                                 continue
17188                         elif test "${cf_tst_cflags}" = "\"'" ; then
17189                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17190                                 continue
17191                         fi
17192                         ;;
17193                 esac
17194                 case "$CPPFLAGS" in
17195                 *$cf_add_cflags) #(vi
17196                         ;;
17197                 *) #(vi
17198                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17199                         ;;
17200                 esac
17201                 ;;
17202         *)
17203                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17204                 ;;
17205         esac
17206         ;;
17207 yes)
17208         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17209
17210         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17211
17212         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17213         && test -z "${cf_tst_cflags}" \
17214         && cf_fix_cppflags=no
17215         ;;
17216 esac
17217 done
17218
17219 if test -n "$cf_new_cflags" ; then
17220
17221         CFLAGS="$CFLAGS $cf_new_cflags"
17222 fi
17223
17224 if test -n "$cf_new_cppflags" ; then
17225
17226         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17227 fi
17228
17229 if test -n "$cf_new_extra_cppflags" ; then
17230
17231         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17232 fi
17233
17234 ### If we're building with rpath, try to link non-standard libs that way too.
17235 if test "$DFT_LWR_MODEL" = "shared"; then
17236
17237 echo "$as_me:17237: checking for updated LDFLAGS" >&5
17238 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17239 if test -n "$LDFLAGS" ; then
17240 echo "$as_me:17240: result: maybe" >&5
17241 echo "${ECHO_T}maybe" >&6
17242 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17243
17244 echo "${as_me-configure}:17244: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17245
17246 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17247
17248 echo "${as_me-configure}:17248: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17249
17250 case "$EXTRA_LDFLAGS" in #(vi
17251 -Wl,-rpath,*) #(vi
17252         cf_rpath_hack="-Wl,-rpath,"
17253         ;;
17254 -R\ *)
17255         cf_rpath_hack="-R "
17256         ;;
17257 -R*)
17258         cf_rpath_hack="-R"
17259         ;;
17260 *)
17261         cf_rpath_hack=
17262         ;;
17263 esac
17264 if test -n "$cf_rpath_hack" ; then
17265         cf_rpath_dst=
17266         for cf_rpath_src in $LDFLAGS
17267         do
17268                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17269
17270 echo "${as_me-configure}:17270: testing Filtering $cf_rpath_src ..." 1>&5
17271
17272                 case $cf_rpath_src in #(vi
17273                 -L*) #(vi
17274                         if test "$cf_rpath_hack" = "-R " ; then
17275                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17276                         else
17277                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17278                         fi
17279                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17280
17281 echo "${as_me-configure}:17281: testing ...Filter $cf_rpath_tmp ..." 1>&5
17282
17283                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17284                         ;;
17285                 esac
17286                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17287         done
17288         LDFLAGS=$cf_rpath_dst
17289         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17290
17291 echo "${as_me-configure}:17291: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17292
17293         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17294
17295 echo "${as_me-configure}:17295: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17296
17297 fi
17298 else
17299 echo "$as_me:17299: result: no" >&5
17300 echo "${ECHO_T}no" >&6
17301 fi
17302
17303 fi
17304
17305 ### Define substitutions for header files to avoid name-pollution
17306
17307 if test "$cf_cv_have_tcgetattr" = yes ; then
17308         HAVE_TCGETATTR=1
17309 else
17310         HAVE_TCGETATTR=0
17311 fi
17312
17313 if test "$ac_cv_header_termio_h" = yes ; then
17314         HAVE_TERMIO_H=1
17315 else
17316         HAVE_TERMIO_H=0
17317 fi
17318
17319 if test "$ac_cv_header_termios_h" = yes ; then
17320         HAVE_TERMIOS_H=1
17321 else
17322         HAVE_TERMIOS_H=0
17323 fi
17324
17325 ################################################################################
17326 test "$use_database" = yes && \
17327 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17328
17329 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17330
17331 if test x"$enable_pc_files" = xyes ; then \
17332 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17333 MAKE_PC_FILES=
17334 else
17335 MAKE_PC_FILES="#"
17336 fi
17337
17338 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"
17339 ac_config_commands="$ac_config_commands default"
17340 cat >confcache <<\_ACEOF
17341 # This file is a shell script that caches the results of configure
17342 # tests run on this system so they can be shared between configure
17343 # scripts and configure runs, see configure's option --config-cache.
17344 # It is not useful on other systems.  If it contains results you don't
17345 # want to keep, you may remove or edit it.
17346 #
17347 # config.status only pays attention to the cache file if you give it
17348 # the --recheck option to rerun configure.
17349 #
17350 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17351 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17352 # following values.
17353
17354 _ACEOF
17355
17356 # The following way of writing the cache mishandles newlines in values,
17357 # but we know of no workaround that is simple, portable, and efficient.
17358 # So, don't put newlines in cache variables' values.
17359 # Ultrix sh set writes to stderr and can't be redirected directly,
17360 # and sets the high bit in the cache file unless we assign to the vars.
17361 {
17362   (set) 2>&1 |
17363     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17364     *ac_space=\ *)
17365       # `set' does not quote correctly, so add quotes (double-quote
17366       # substitution turns \\\\ into \\, and sed turns \\ into \).
17367       sed -n \
17368         "s/'/'\\\\''/g;
17369           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17370       ;;
17371     *)
17372       # `set' quotes correctly as required by POSIX, so do not add quotes.
17373       sed -n \
17374         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17375       ;;
17376     esac;
17377 } |
17378   sed '
17379      t clear
17380      : clear
17381      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17382      t end
17383      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17384      : end' >>confcache
17385 if cmp -s $cache_file confcache; then :; else
17386   if test -w $cache_file; then
17387     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17388     cat confcache >$cache_file
17389   else
17390     echo "not updating unwritable cache $cache_file"
17391   fi
17392 fi
17393 rm -f confcache
17394
17395 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17396 # Let make expand exec_prefix.
17397 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17398
17399 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17400 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17401 # trailing colons and then remove the whole line if VPATH becomes empty
17402 # (actually we leave an empty line to preserve line numbers).
17403 if test "x$srcdir" = x.; then
17404   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17405 s/:*\$(srcdir):*/:/;
17406 s/:*\${srcdir}:*/:/;
17407 s/:*@srcdir@:*/:/;
17408 s/^\([^=]*=[    ]*\):*/\1/;
17409 s/:*$//;
17410 s/^[^=]*=[      ]*$//;
17411 }'
17412 fi
17413
17414 DEFS=-DHAVE_CONFIG_H
17415
17416 : ${CONFIG_STATUS=./config.status}
17417 ac_clean_files_save=$ac_clean_files
17418 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17419 { echo "$as_me:17419: creating $CONFIG_STATUS" >&5
17420 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17421 cat >$CONFIG_STATUS <<_ACEOF
17422 #! $SHELL
17423 # Generated automatically by configure.
17424 # Run this file to recreate the current configuration.
17425 # Compiler output produced by configure, useful for debugging
17426 # configure, is in config.log if it exists.
17427
17428 debug=false
17429 SHELL=\${CONFIG_SHELL-$SHELL}
17430 ac_cs_invocation="\$0 \$@"
17431
17432 _ACEOF
17433
17434 cat >>$CONFIG_STATUS <<\_ACEOF
17435 # Be Bourne compatible
17436 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17437   emulate sh
17438   NULLCMD=:
17439 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17440   set -o posix
17441 fi
17442
17443 # Name of the executable.
17444 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17445
17446 if expr a : '\(a\)' >/dev/null 2>&1; then
17447   as_expr=expr
17448 else
17449   as_expr=false
17450 fi
17451
17452 rm -f conf$$ conf$$.exe conf$$.file
17453 echo >conf$$.file
17454 if ln -s conf$$.file conf$$ 2>/dev/null; then
17455   # We could just check for DJGPP; but this test a) works b) is more generic
17456   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17457   if test -f conf$$.exe; then
17458     # Don't use ln at all; we don't have any links
17459     as_ln_s='cp -p'
17460   else
17461     as_ln_s='ln -s'
17462   fi
17463 elif ln conf$$.file conf$$ 2>/dev/null; then
17464   as_ln_s=ln
17465 else
17466   as_ln_s='cp -p'
17467 fi
17468 rm -f conf$$ conf$$.exe conf$$.file
17469
17470 as_executable_p="test -f"
17471
17472 # Support unset when possible.
17473 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17474   as_unset=unset
17475 else
17476   as_unset=false
17477 fi
17478
17479 # NLS nuisances.
17480 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17481 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17482 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17483 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17484 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17485 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17486 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17487 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17488
17489 # IFS
17490 # We need space, tab and new line, in precisely that order.
17491 as_nl='
17492 '
17493 IFS="   $as_nl"
17494
17495 # CDPATH.
17496 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17497
17498 exec 6>&1
17499
17500 _ACEOF
17501
17502 # Files that config.status was made for.
17503 if test -n "$ac_config_files"; then
17504   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17505 fi
17506
17507 if test -n "$ac_config_headers"; then
17508   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17509 fi
17510
17511 if test -n "$ac_config_links"; then
17512   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17513 fi
17514
17515 if test -n "$ac_config_commands"; then
17516   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17517 fi
17518
17519 cat >>$CONFIG_STATUS <<\EOF
17520
17521 ac_cs_usage="\
17522 \`$as_me' instantiates files from templates according to the
17523 current configuration.
17524
17525 Usage: $0 [OPTIONS] [FILE]...
17526
17527   -h, --help       print this help, then exit
17528   -V, --version    print version number, then exit
17529   -d, --debug      don't remove temporary files
17530       --recheck    update $as_me by reconfiguring in the same conditions
17531   --file=FILE[:TEMPLATE]
17532                    instantiate the configuration file FILE
17533   --header=FILE[:TEMPLATE]
17534                    instantiate the configuration header FILE
17535
17536 Configuration files:
17537 $config_files
17538
17539 Configuration headers:
17540 $config_headers
17541
17542 Configuration commands:
17543 $config_commands
17544
17545 Report bugs to <bug-autoconf@gnu.org>."
17546 EOF
17547
17548 cat >>$CONFIG_STATUS <<EOF
17549 ac_cs_version="\\
17550 config.status
17551 configured by $0, generated by GNU Autoconf 2.52.20081225,
17552   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17553
17554 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17555 Free Software Foundation, Inc.
17556 This config.status script is free software; the Free Software Foundation
17557 gives unlimited permission to copy, distribute and modify it."
17558 srcdir=$srcdir
17559 INSTALL="$INSTALL"
17560 EOF
17561
17562 cat >>$CONFIG_STATUS <<\EOF
17563 # If no file are specified by the user, then we need to provide default
17564 # value.  By we need to know if files were specified by the user.
17565 ac_need_defaults=:
17566 while test $# != 0
17567 do
17568   case $1 in
17569   --*=*)
17570     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17571     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17572     shift
17573     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17574     shift
17575     ;;
17576   -*);;
17577   *) # This is not an option, so the user has probably given explicit
17578      # arguments.
17579      ac_need_defaults=false;;
17580   esac
17581
17582   case $1 in
17583   # Handling of the options.
17584 EOF
17585 cat >>$CONFIG_STATUS <<EOF
17586   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17587     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17588     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17589 EOF
17590 cat >>$CONFIG_STATUS <<\EOF
17591   --version | --vers* | -V )
17592     echo "$ac_cs_version"; exit 0 ;;
17593   --he | --h)
17594     # Conflict between --help and --header
17595     { { echo "$as_me:17595: error: ambiguous option: $1
17596 Try \`$0 --help' for more information." >&5
17597 echo "$as_me: error: ambiguous option: $1
17598 Try \`$0 --help' for more information." >&2;}
17599    { (exit 1); exit 1; }; };;
17600   --help | --hel | -h )
17601     echo "$ac_cs_usage"; exit 0 ;;
17602   --debug | --d* | -d )
17603     debug=: ;;
17604   --file | --fil | --fi | --f )
17605     shift
17606     CONFIG_FILES="$CONFIG_FILES $1"
17607     ac_need_defaults=false;;
17608   --header | --heade | --head | --hea )
17609     shift
17610     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17611     ac_need_defaults=false;;
17612
17613   # This is an error.
17614   -*) { { echo "$as_me:17614: error: unrecognized option: $1
17615 Try \`$0 --help' for more information." >&5
17616 echo "$as_me: error: unrecognized option: $1
17617 Try \`$0 --help' for more information." >&2;}
17618    { (exit 1); exit 1; }; } ;;
17619
17620   *) ac_config_targets="$ac_config_targets $1" ;;
17621
17622   esac
17623   shift
17624 done
17625
17626 exec 5>>config.log
17627 cat >&5 << _ACEOF
17628
17629 ## ----------------------- ##
17630 ## Running config.status.  ##
17631 ## ----------------------- ##
17632
17633 This file was extended by $as_me 2.52.20081225, executed with
17634   CONFIG_FILES    = $CONFIG_FILES
17635   CONFIG_HEADERS  = $CONFIG_HEADERS
17636   CONFIG_LINKS    = $CONFIG_LINKS
17637   CONFIG_COMMANDS = $CONFIG_COMMANDS
17638   > $ac_cs_invocation
17639 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17640
17641 _ACEOF
17642 EOF
17643
17644 cat >>$CONFIG_STATUS <<EOF
17645 #
17646 # INIT-COMMANDS section.
17647 #
17648
17649 ### Special initialization commands, used to pass information from the
17650 ### configuration-run into config.status
17651
17652 AWK="$AWK"
17653 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17654 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17655 ECHO_LINK="$ECHO_LINK"
17656 LDCONFIG="$LDCONFIG"
17657 LIB_NAME="$LIB_NAME"
17658 LIB_SUBSETS="$LIB_SUBSETS"
17659 LIB_SUFFIX="$LIB_SUFFIX"
17660 LIB_TRACING="$LIB_TRACING"
17661 MAKE_TERMINFO="$MAKE_TERMINFO"
17662 NCURSES_MAJOR="$NCURSES_MAJOR"
17663 NCURSES_MINOR="$NCURSES_MINOR"
17664 NCURSES_OSPEED="$NCURSES_OSPEED"
17665 NCURSES_PATCH="$NCURSES_PATCH"
17666 SRC_SUBDIRS="$SRC_SUBDIRS"
17667 TERMINFO="$TERMINFO"
17668 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17669 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17670 TICS_NAME="$TICS_NAME"
17671 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17672 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17673 TINFO_NAME="$TINFO_NAME"
17674 TINFO_SUFFIX="$TINFO_SUFFIX"
17675 WITH_CURSES_H="$with_curses_h"
17676 WITH_ECHO="$with_echo"
17677 WITH_OVERWRITE="$with_overwrite"
17678 cf_LIST_MODELS="$cf_list_models"
17679 cf_cv_abi_version="$cf_cv_abi_version"
17680 cf_cv_do_relink="$cf_cv_do_relink"
17681 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17682 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17683 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17684 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17685 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17686 cf_cv_rel_version="$cf_cv_rel_version"
17687 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17688 cf_cv_shared_soname='$cf_cv_shared_soname'
17689 cf_cv_shlib_version="$cf_cv_shlib_version"
17690 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17691 cf_cv_system_name="$cf_cv_system_name"
17692 cf_with_cxx_binding="$cf_with_cxx_binding"
17693 cf_with_manpages="$cf_with_manpages"
17694 host="$host"
17695 target="$target"
17696
17697 EOF
17698
17699 cat >>$CONFIG_STATUS <<\EOF
17700 for ac_config_target in $ac_config_targets
17701 do
17702   case "$ac_config_target" in
17703   # Handling of arguments.
17704   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17705   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17706   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
17707   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17708   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17709   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17710   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17711   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17712   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17713   *) { { echo "$as_me:17713: error: invalid argument: $ac_config_target" >&5
17714 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17715    { (exit 1); exit 1; }; };;
17716   esac
17717 done
17718
17719 # If the user did not use the arguments to specify the items to instantiate,
17720 # then the envvar interface is used.  Set only those that are not.
17721 # We use the long form for the default assignment because of an extremely
17722 # bizarre bug on SunOS 4.1.3.
17723 if $ac_need_defaults; then
17724   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17725   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17726   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17727 fi
17728
17729 # Create a temporary directory, and hook for its removal unless debugging.
17730 $debug ||
17731 {
17732   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17733   trap '{ (exit 1); exit 1; }' 1 2 13 15
17734 }
17735
17736 # Create a (secure) tmp directory for tmp files.
17737 : ${TMPDIR=/tmp}
17738 {
17739   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17740   test -n "$tmp" && test -d "$tmp"
17741 }  ||
17742 {
17743   tmp=$TMPDIR/cs$$-$RANDOM
17744   (umask 077 && mkdir $tmp)
17745 } ||
17746 {
17747    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17748    { (exit 1); exit 1; }
17749 }
17750
17751 EOF
17752
17753 cat >>$CONFIG_STATUS <<EOF
17754
17755 #
17756 # CONFIG_FILES section.
17757 #
17758
17759 # No need to generate the scripts if there are no CONFIG_FILES.
17760 # This happens for instance when ./config.status config.h
17761 if test -n "\$CONFIG_FILES"; then
17762   # Protect against being on the right side of a sed subst in config.status.
17763   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17764    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17765 s,@SHELL@,$SHELL,;t t
17766 s,@exec_prefix@,$exec_prefix,;t t
17767 s,@prefix@,$prefix,;t t
17768 s,@program_transform_name@,$program_transform_name,;t t
17769 s,@bindir@,$bindir,;t t
17770 s,@sbindir@,$sbindir,;t t
17771 s,@libexecdir@,$libexecdir,;t t
17772 s,@datadir@,$datadir,;t t
17773 s,@sysconfdir@,$sysconfdir,;t t
17774 s,@sharedstatedir@,$sharedstatedir,;t t
17775 s,@localstatedir@,$localstatedir,;t t
17776 s,@libdir@,$libdir,;t t
17777 s,@includedir@,$includedir,;t t
17778 s,@oldincludedir@,$oldincludedir,;t t
17779 s,@infodir@,$infodir,;t t
17780 s,@mandir@,$mandir,;t t
17781 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17782 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17783 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17784 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17785 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17786 s,@build_alias@,$build_alias,;t t
17787 s,@host_alias@,$host_alias,;t t
17788 s,@target_alias@,$target_alias,;t t
17789 s,@ECHO_C@,$ECHO_C,;t t
17790 s,@ECHO_N@,$ECHO_N,;t t
17791 s,@ECHO_T@,$ECHO_T,;t t
17792 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17793 s,@DEFS@,$DEFS,;t t
17794 s,@LIBS@,$LIBS,;t t
17795 s,@top_builddir@,$top_builddir,;t t
17796 s,@EGREP@,$EGREP,;t t
17797 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17798 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17799 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17800 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17801 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17802 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17803 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17804 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17805 s,@build@,$build,;t t
17806 s,@build_cpu@,$build_cpu,;t t
17807 s,@build_vendor@,$build_vendor,;t t
17808 s,@build_os@,$build_os,;t t
17809 s,@host@,$host,;t t
17810 s,@host_cpu@,$host_cpu,;t t
17811 s,@host_vendor@,$host_vendor,;t t
17812 s,@host_os@,$host_os,;t t
17813 s,@target@,$target,;t t
17814 s,@target_cpu@,$target_cpu,;t t
17815 s,@target_vendor@,$target_vendor,;t t
17816 s,@target_os@,$target_os,;t t
17817 s,@CC@,$CC,;t t
17818 s,@CFLAGS@,$CFLAGS,;t t
17819 s,@LDFLAGS@,$LDFLAGS,;t t
17820 s,@CPPFLAGS@,$CPPFLAGS,;t t
17821 s,@ac_ct_CC@,$ac_ct_CC,;t t
17822 s,@EXEEXT@,$EXEEXT,;t t
17823 s,@OBJEXT@,$OBJEXT,;t t
17824 s,@CPP@,$CPP,;t t
17825 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17826 s,@PROG_EXT@,$PROG_EXT,;t t
17827 s,@LDCONFIG@,$LDCONFIG,;t t
17828 s,@CXX@,$CXX,;t t
17829 s,@CXXFLAGS@,$CXXFLAGS,;t t
17830 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17831 s,@AWK@,$AWK,;t t
17832 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17833 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17834 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17835 s,@LINT@,$LINT,;t t
17836 s,@LINT_OPTS@,$LINT_OPTS,;t t
17837 s,@LN_S@,$LN_S,;t t
17838 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17839 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17840 s,@SET_MAKE@,$SET_MAKE,;t t
17841 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17842 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17843 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17844 s,@RANLIB@,$RANLIB,;t t
17845 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17846 s,@LD@,$LD,;t t
17847 s,@ac_ct_LD@,$ac_ct_LD,;t t
17848 s,@AR@,$AR,;t t
17849 s,@ac_ct_AR@,$ac_ct_AR,;t t
17850 s,@ARFLAGS@,$ARFLAGS,;t t
17851 s,@DESTDIR@,$DESTDIR,;t t
17852 s,@BUILD_CC@,$BUILD_CC,;t t
17853 s,@BUILD_CPP@,$BUILD_CPP,;t t
17854 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17855 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17856 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17857 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17858 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17859 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17860 s,@cf_list_models@,$cf_list_models,;t t
17861 s,@LIBTOOL@,$LIBTOOL,;t t
17862 s,@LT_UNDEF@,$LT_UNDEF,;t t
17863 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17864 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17865 s,@LIB_CREATE@,$LIB_CREATE,;t t
17866 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17867 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17868 s,@LIB_PREP@,$LIB_PREP,;t t
17869 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17870 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17871 s,@LIB_LINK@,$LIB_LINK,;t t
17872 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17873 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17874 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17875 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17876 s,@TICS_NAME@,$TICS_NAME,;t t
17877 s,@TINFO_NAME@,$TINFO_NAME,;t t
17878 s,@LIB_NAME@,$LIB_NAME,;t t
17879 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17880 s,@CC_G_OPT@,$CC_G_OPT,;t t
17881 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17882 s,@LD_MODEL@,$LD_MODEL,;t t
17883 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17884 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17885 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17886 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17887 s,@LINK_PROGS@,$LINK_PROGS,;t t
17888 s,@LINK_TESTS@,$LINK_TESTS,;t t
17889 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17890 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17891 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17892 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17893 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17894 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17895 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17896 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17897 s,@TERMINFO@,$TERMINFO,;t t
17898 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17899 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17900 s,@TERMPATH@,$TERMPATH,;t t
17901 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17902 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17903 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17904 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17905 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17906 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17907 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17908 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17909 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17910 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17911 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17912 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17913 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17914 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17915 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
17916 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17917 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17918 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17919 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17920 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17921 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17922 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17923 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17924 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17925 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17926 s,@PTHREAD@,$PTHREAD,;t t
17927 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17928 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17929 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17930 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17931 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17932 s,@ECHO_LINK@,$ECHO_LINK,;t t
17933 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17934 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17935 s,@ADA_TRACE@,$ADA_TRACE,;t t
17936 s,@MATH_LIB@,$MATH_LIB,;t t
17937 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17938 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17939 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17940 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17941 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17942 s,@TEST_LIBS@,$TEST_LIBS,;t t
17943 s,@CXXCPP@,$CXXCPP,;t t
17944 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17945 s,@CXX_AR@,$CXX_AR,;t t
17946 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17947 s,@CXXLIBS@,$CXXLIBS,;t t
17948 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17949 s,@gnat_exists@,$gnat_exists,;t t
17950 s,@M4_exists@,$M4_exists,;t t
17951 s,@cf_ada_make@,$cf_ada_make,;t t
17952 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17953 s,@cf_ada_package@,$cf_ada_package,;t t
17954 s,@ADAFLAGS@,$ADAFLAGS,;t t
17955 s,@cf_compile_generics@,$cf_compile_generics,;t t
17956 s,@cf_generic_objects@,$cf_generic_objects,;t t
17957 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17958 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17959 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17960 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17961 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17962 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17963 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17964 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17965 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17966 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17967 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17968 s,@TICS_ARGS@,$TICS_ARGS,;t t
17969 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17970 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17971 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17972 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17973 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17974 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17975 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17976 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17977 s,@TICS_LIST@,$TICS_LIST,;t t
17978 s,@TINFO_LIST@,$TINFO_LIST,;t t
17979 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17980 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17981 s,@TEST_ARGS@,$TEST_ARGS,;t t
17982 s,@TEST_DEPS@,$TEST_DEPS,;t t
17983 s,@TEST_ARG2@,$TEST_ARG2,;t t
17984 s,@TEST_DEP2@,$TEST_DEP2,;t t
17985 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17986 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17987 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17988 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17989 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17990 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17991 s,@cross_compiling@,$cross_compiling,;t t
17992 CEOF
17993
17994 EOF
17995
17996   cat >>$CONFIG_STATUS <<\EOF
17997   # Split the substitutions into bite-sized pieces for seds with
17998   # small command number limits, like on Digital OSF/1 and HP-UX.
17999   ac_max_sed_lines=48
18000   ac_sed_frag=1 # Number of current file.
18001   ac_beg=1 # First line for current file.
18002   ac_end=$ac_max_sed_lines # Line after last line for current file.
18003   ac_more_lines=:
18004   ac_sed_cmds=
18005   while $ac_more_lines; do
18006     if test $ac_beg -gt 1; then
18007       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18008     else
18009       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18010     fi
18011     if test ! -s $tmp/subs.frag; then
18012       ac_more_lines=false
18013     else
18014       # The purpose of the label and of the branching condition is to
18015       # speed up the sed processing (if there are no `@' at all, there
18016       # is no need to browse any of the substitutions).
18017       # These are the two extra sed commands mentioned above.
18018       (echo ':t
18019   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18020       if test -z "$ac_sed_cmds"; then
18021         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18022       else
18023         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18024       fi
18025       ac_sed_frag=`expr $ac_sed_frag + 1`
18026       ac_beg=$ac_end
18027       ac_end=`expr $ac_end + $ac_max_sed_lines`
18028     fi
18029   done
18030   if test -z "$ac_sed_cmds"; then
18031     ac_sed_cmds=cat
18032   fi
18033 fi # test -n "$CONFIG_FILES"
18034
18035 EOF
18036 cat >>$CONFIG_STATUS <<\EOF
18037 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18038   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18039   case $ac_file in
18040   - | *:- | *:-:* ) # input from stdin
18041         cat >$tmp/stdin
18042         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18043         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18044   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18045         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18046   * )   ac_file_in=$ac_file.in ;;
18047   esac
18048
18049   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18050   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18051          X"$ac_file" : 'X\(//\)[^/]' \| \
18052          X"$ac_file" : 'X\(//\)$' \| \
18053          X"$ac_file" : 'X\(/\)' \| \
18054          .     : '\(.\)' 2>/dev/null ||
18055 echo X"$ac_file" |
18056     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18057           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18058           /^X\(\/\/\)$/{ s//\1/; q; }
18059           /^X\(\/\).*/{ s//\1/; q; }
18060           s/.*/./; q'`
18061   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18062     { case "$ac_dir" in
18063   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18064   *)                      as_incr_dir=.;;
18065 esac
18066 as_dummy="$ac_dir"
18067 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18068   case $as_mkdir_dir in
18069     # Skip DOS drivespec
18070     ?:) as_incr_dir=$as_mkdir_dir ;;
18071     *)
18072       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18073       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18074     ;;
18075   esac
18076 done; }
18077
18078     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18079     # A "../" for each directory in $ac_dir_suffix.
18080     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18081   else
18082     ac_dir_suffix= ac_dots=
18083   fi
18084
18085   case $srcdir in
18086   .)  ac_srcdir=.
18087       if test -z "$ac_dots"; then
18088          ac_top_srcdir=.
18089       else
18090          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18091       fi ;;
18092   [\\/]* | ?:[\\/]* )
18093       ac_srcdir=$srcdir$ac_dir_suffix;
18094       ac_top_srcdir=$srcdir ;;
18095   *) # Relative path.
18096     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18097     ac_top_srcdir=$ac_dots$srcdir ;;
18098   esac
18099
18100   case $INSTALL in
18101   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18102   *) ac_INSTALL=$ac_dots$INSTALL ;;
18103   esac
18104
18105   if test x"$ac_file" != x-; then
18106     { echo "$as_me:18106: creating $ac_file" >&5
18107 echo "$as_me: creating $ac_file" >&6;}
18108     rm -f "$ac_file"
18109   fi
18110   # Let's still pretend it is `configure' which instantiates (i.e., don't
18111   # use $as_me), people would be surprised to read:
18112   #    /* config.h.  Generated automatically by config.status.  */
18113   configure_input="Generated automatically from `echo $ac_file_in |
18114                                                  sed 's,.*/,,'` by configure."
18115
18116   # First look for the input files in the build tree, otherwise in the
18117   # src tree.
18118   ac_file_inputs=`IFS=:
18119     for f in $ac_file_in; do
18120       case $f in
18121       -) echo $tmp/stdin ;;
18122       [\\/$]*)
18123          # Absolute (can't be DOS-style, as IFS=:)
18124          test -f "$f" || { { echo "$as_me:18124: error: cannot find input file: $f" >&5
18125 echo "$as_me: error: cannot find input file: $f" >&2;}
18126    { (exit 1); exit 1; }; }
18127          echo $f;;
18128       *) # Relative
18129          if test -f "$f"; then
18130            # Build tree
18131            echo $f
18132          elif test -f "$srcdir/$f"; then
18133            # Source tree
18134            echo $srcdir/$f
18135          else
18136            # /dev/null tree
18137            { { echo "$as_me:18137: error: cannot find input file: $f" >&5
18138 echo "$as_me: error: cannot find input file: $f" >&2;}
18139    { (exit 1); exit 1; }; }
18140          fi;;
18141       esac
18142     done` || { (exit 1); exit 1; }
18143 EOF
18144 cat >>$CONFIG_STATUS <<EOF
18145   sed "$ac_vpsub
18146 $extrasub
18147 EOF
18148 cat >>$CONFIG_STATUS <<\EOF
18149 :t
18150 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18151 s,@configure_input@,$configure_input,;t t
18152 s,@srcdir@,$ac_srcdir,;t t
18153 s,@top_srcdir@,$ac_top_srcdir,;t t
18154 s,@INSTALL@,$ac_INSTALL,;t t
18155 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18156   rm -f $tmp/stdin
18157   if test x"$ac_file" != x-; then
18158     mv $tmp/out $ac_file
18159   else
18160     cat $tmp/out
18161     rm -f $tmp/out
18162   fi
18163
18164 done
18165 EOF
18166 cat >>$CONFIG_STATUS <<\EOF
18167
18168 #
18169 # CONFIG_HEADER section.
18170 #
18171
18172 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18173 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18174 #
18175 # ac_d sets the value in "#define NAME VALUE" lines.
18176 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18177 ac_dB='[        ].*$,\1#\2'
18178 ac_dC=' '
18179 ac_dD=',;t'
18180 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18181 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18182 ac_iB='\([      ]\),\1#\2define\3'
18183 ac_iC=' '
18184 ac_iD='\4,;t'
18185 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18186 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18187 ac_uB='$,\1#\2define\3'
18188 ac_uC=' '
18189 ac_uD=',;t'
18190
18191 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18192   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18193   case $ac_file in
18194   - | *:- | *:-:* ) # input from stdin
18195         cat >$tmp/stdin
18196         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18197         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18198   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18199         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18200   * )   ac_file_in=$ac_file.in ;;
18201   esac
18202
18203   test x"$ac_file" != x- && { echo "$as_me:18203: creating $ac_file" >&5
18204 echo "$as_me: creating $ac_file" >&6;}
18205
18206   # First look for the input files in the build tree, otherwise in the
18207   # src tree.
18208   ac_file_inputs=`IFS=:
18209     for f in $ac_file_in; do
18210       case $f in
18211       -) echo $tmp/stdin ;;
18212       [\\/$]*)
18213          # Absolute (can't be DOS-style, as IFS=:)
18214          test -f "$f" || { { echo "$as_me:18214: error: cannot find input file: $f" >&5
18215 echo "$as_me: error: cannot find input file: $f" >&2;}
18216    { (exit 1); exit 1; }; }
18217          echo $f;;
18218       *) # Relative
18219          if test -f "$f"; then
18220            # Build tree
18221            echo $f
18222          elif test -f "$srcdir/$f"; then
18223            # Source tree
18224            echo $srcdir/$f
18225          else
18226            # /dev/null tree
18227            { { echo "$as_me:18227: error: cannot find input file: $f" >&5
18228 echo "$as_me: error: cannot find input file: $f" >&2;}
18229    { (exit 1); exit 1; }; }
18230          fi;;
18231       esac
18232     done` || { (exit 1); exit 1; }
18233   # Remove the trailing spaces.
18234   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18235
18236 EOF
18237
18238 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18239 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18240 # be either 'cat' or 'sort'.
18241 cat confdefs.h | uniq >conftest.vals
18242
18243 # Break up conftest.vals because some shells have a limit on
18244 # the size of here documents, and old seds have small limits too.
18245
18246 rm -f conftest.tail
18247 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18248 while grep . conftest.vals >/dev/null
18249 do
18250   # Write chunks of a limited-size here document to conftest.frag.
18251   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18252   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18253   echo 'CEOF' >> $CONFIG_STATUS
18254   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18255   rm -f conftest.vals
18256   mv conftest.tail conftest.vals
18257 done
18258 rm -f conftest.vals
18259
18260 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18261 # marker @DEFS@.
18262 echo '  cat >> conftest.edit <<CEOF
18263 /@DEFS@/r conftest.frag
18264 /@DEFS@/d
18265 CEOF
18266 sed -f conftest.edit $tmp/in > $tmp/out
18267 rm -f $tmp/in
18268 mv $tmp/out $tmp/in
18269 rm -f conftest.edit conftest.frag
18270 ' >> $CONFIG_STATUS
18271
18272 cat >>$CONFIG_STATUS <<\EOF
18273   # Let's still pretend it is `configure' which instantiates (i.e., don't
18274   # use $as_me), people would be surprised to read:
18275   #    /* config.h.  Generated automatically by config.status.  */
18276   if test x"$ac_file" = x-; then
18277     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18278   else
18279     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18280   fi
18281   cat $tmp/in >>$tmp/config.h
18282   rm -f $tmp/in
18283   if test x"$ac_file" != x-; then
18284     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18285       { echo "$as_me:18285: $ac_file is unchanged" >&5
18286 echo "$as_me: $ac_file is unchanged" >&6;}
18287     else
18288       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18289          X"$ac_file" : 'X\(//\)[^/]' \| \
18290          X"$ac_file" : 'X\(//\)$' \| \
18291          X"$ac_file" : 'X\(/\)' \| \
18292          .     : '\(.\)' 2>/dev/null ||
18293 echo X"$ac_file" |
18294     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18295           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18296           /^X\(\/\/\)$/{ s//\1/; q; }
18297           /^X\(\/\).*/{ s//\1/; q; }
18298           s/.*/./; q'`
18299       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18300         { case "$ac_dir" in
18301   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18302   *)                      as_incr_dir=.;;
18303 esac
18304 as_dummy="$ac_dir"
18305 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18306   case $as_mkdir_dir in
18307     # Skip DOS drivespec
18308     ?:) as_incr_dir=$as_mkdir_dir ;;
18309     *)
18310       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18311       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18312     ;;
18313   esac
18314 done; }
18315
18316       fi
18317       rm -f $ac_file
18318       mv $tmp/config.h $ac_file
18319     fi
18320   else
18321     cat $tmp/config.h
18322     rm -f $tmp/config.h
18323   fi
18324 done
18325 EOF
18326 cat >>$CONFIG_STATUS <<\EOF
18327
18328 #
18329 # CONFIG_COMMANDS section.
18330 #
18331 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18332   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18333   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18334
18335   case $ac_dest in
18336     default )
18337
18338 for cf_dir in test
18339 do
18340         if test ! -d $srcdir/$cf_dir; then
18341                 continue
18342         elif test -f $srcdir/$cf_dir/programs; then
18343                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18344         fi
18345 done
18346
18347         case $cf_cv_system_name in #(vi
18348         OS/2*|os2*) #(vi
18349         LIB_PREFIX=''
18350         ;;
18351         *)      LIB_PREFIX='lib'
18352         ;;
18353         esac
18354 cf_prefix=$LIB_PREFIX
18355
18356 if test $cf_cv_shlib_version = cygdll ; then
18357         TINFO_NAME=$TINFO_ARG_SUFFIX
18358         TINFO_SUFFIX=.dll
18359 fi
18360
18361 for cf_dir in $SRC_SUBDIRS
18362 do
18363         if test ! -d $srcdir/$cf_dir ; then
18364                 continue
18365         elif test -f $srcdir/$cf_dir/modules; then
18366
18367                 SHARED_LIB=
18368                 LIBS_TO_MAKE=
18369                 for cf_item in $cf_LIST_MODELS
18370                 do
18371
18372         case $cf_item in #(vi
18373         libtool) #(vi
18374                 cf_suffix='.la'
18375                 cf_depsuf=$cf_suffix
18376                 ;;
18377         normal) #(vi
18378                 cf_suffix='.a'
18379                 cf_depsuf=$cf_suffix
18380                 ;;
18381         debug) #(vi
18382                 cf_suffix='_g.a'
18383                 cf_depsuf=$cf_suffix
18384                 ;;
18385         profile) #(vi
18386                 cf_suffix='_p.a'
18387                 cf_depsuf=$cf_suffix
18388                 ;;
18389         shared) #(vi
18390                 case $cf_cv_system_name in
18391                 aix[56]*) #(vi
18392                         cf_suffix='.a'
18393                         cf_depsuf=$cf_suffix
18394                         ;;
18395                 cygwin*) #(vi
18396                         cf_suffix='.dll'
18397                         cf_depsuf='.dll.a'
18398                         ;;
18399                 darwin*) #(vi
18400                         cf_suffix='.dylib'
18401                         cf_depsuf=$cf_suffix
18402                         ;;
18403                 hpux*) #(vi
18404                         case $target in
18405                         ia64*) #(vi
18406                                 cf_suffix='.so'
18407                                 cf_depsuf=$cf_suffix
18408                                 ;;
18409                         *) #(vi
18410                                 cf_suffix='.sl'
18411                                 cf_depsuf=$cf_suffix
18412                                 ;;
18413                         esac
18414                         ;;
18415                 *)      cf_suffix='.so'
18416                         cf_depsuf=$cf_suffix
18417                         ;;
18418                 esac
18419         esac
18420         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18421         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18422
18423                         if test $cf_item = shared ; then
18424                         if test "$cf_cv_do_symlinks" = yes ; then
18425                                 case "$cf_cv_shlib_version" in #(vi
18426                                 rel) #(vi
18427                                         case "$cf_cv_system_name" in #(vi
18428                                         darwin*)
18429                                         case .${LIB_SUFFIX} in
18430                                         .w*)
18431                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18432                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18433                                                 ;;
18434                                         *)
18435                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18436                                                 ;;
18437                                         esac
18438                                         ;; #(vi
18439                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18440                                         esac
18441                                         ;;
18442                                 abi)
18443                                         case "$cf_cv_system_name" in #(vi
18444                                         darwin*)
18445                                         case .${LIB_SUFFIX} in
18446                                         .w*)
18447                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18448                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18449                                                 ;;
18450                                         *)
18451                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18452                                                 ;;
18453                                         esac
18454                                         ;; #(vi
18455                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18456                                         esac
18457                                         ;;
18458                                 esac
18459                         fi
18460                         # cygwin needs import library, and has unique naming convention
18461                         # use autodetected ${cf_prefix} for import lib and static lib, but
18462                         # use 'cyg' prefix for shared lib.
18463                         if test $cf_cv_shlib_version = cygdll ; then
18464                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18465                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18466                                 continue
18467                         fi
18468                         fi
18469                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18470                 done
18471
18472                 if test $cf_dir = ncurses ; then
18473                         cf_subsets="$LIB_SUBSETS"
18474                         cf_r_parts="$cf_subsets"
18475                         cf_liblist="$LIBS_TO_MAKE"
18476
18477                         while test -n "$cf_r_parts"
18478                         do
18479                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18480                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18481                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18482                                         cf_item=
18483                                         case $cf_l_parts in #(vi
18484                                         *termlib*) #(vi
18485                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18486                                                 ;;
18487                                         *ticlib*)
18488                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18489                                                 ;;
18490                                         *)
18491                                                 break
18492                                                 ;;
18493                                         esac
18494                                         if test -n "$cf_item"; then
18495                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18496                                         fi
18497                                 else
18498                                         break
18499                                 fi
18500                         done
18501                 else
18502                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18503                 fi
18504
18505                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18506                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18507                         $cf_dir/Makefile >$cf_dir/Makefile.out
18508                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18509
18510                 $AWK -f $srcdir/mk-0th.awk \
18511                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18512                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18513
18514                 for cf_subset in $cf_subsets
18515                 do
18516                         cf_subdirs=
18517                         for cf_item in $cf_LIST_MODELS
18518                         do
18519                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18520
18521 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18522
18523         case $cf_item in #(vi
18524         libtool) #(vi
18525                 cf_suffix='.la'
18526                 cf_depsuf=$cf_suffix
18527                 ;;
18528         normal) #(vi
18529                 cf_suffix='.a'
18530                 cf_depsuf=$cf_suffix
18531                 ;;
18532         debug) #(vi
18533                 cf_suffix='_g.a'
18534                 cf_depsuf=$cf_suffix
18535                 ;;
18536         profile) #(vi
18537                 cf_suffix='_p.a'
18538                 cf_depsuf=$cf_suffix
18539                 ;;
18540         shared) #(vi
18541                 case $cf_cv_system_name in
18542                 aix[56]*) #(vi
18543                         cf_suffix='.a'
18544                         cf_depsuf=$cf_suffix
18545                         ;;
18546                 cygwin*) #(vi
18547                         cf_suffix='.dll'
18548                         cf_depsuf='.dll.a'
18549                         ;;
18550                 darwin*) #(vi
18551                         cf_suffix='.dylib'
18552                         cf_depsuf=$cf_suffix
18553                         ;;
18554                 hpux*) #(vi
18555                         case $target in
18556                         ia64*) #(vi
18557                                 cf_suffix='.so'
18558                                 cf_depsuf=$cf_suffix
18559                                 ;;
18560                         *) #(vi
18561                                 cf_suffix='.sl'
18562                                 cf_depsuf=$cf_suffix
18563                                 ;;
18564                         esac
18565                         ;;
18566                 *)      cf_suffix='.so'
18567                         cf_depsuf=$cf_suffix
18568                         ;;
18569                 esac
18570         esac
18571         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18572         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18573
18574         case $cf_item in
18575         libtool) cf_subdir='obj_lo'  ;;
18576         normal)  cf_subdir='objects' ;;
18577         debug)   cf_subdir='obj_g' ;;
18578         profile) cf_subdir='obj_p' ;;
18579         shared)
18580                 case $cf_cv_system_name in #(vi
18581                 cygwin) #(vi
18582                         cf_subdir='objects' ;;
18583                 *)
18584                         cf_subdir='obj_s' ;;
18585                 esac
18586         esac
18587
18588                         # Test for case where we build libtinfo with a different name.
18589                         cf_libname=$cf_dir
18590                         if test $cf_dir = ncurses ; then
18591                                 case $cf_subset in
18592                                 *base*)
18593                                         cf_libname=${cf_libname}$LIB_SUFFIX
18594                                         ;;
18595                                 *termlib*)
18596                                         cf_libname=$TINFO_LIB_SUFFIX
18597                                         ;;
18598                                 ticlib*)
18599                                         cf_libname=$TICS_LIB_SUFFIX
18600                                         ;;
18601                                 esac
18602                         else
18603                                 cf_libname=${cf_libname}$LIB_SUFFIX
18604                         fi
18605                         if test -n "${DFT_ARG_SUFFIX}" ; then
18606                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18607                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18608                         fi
18609
18610                         # These dependencies really are for development, not
18611                         # builds, but they are useful in porting, too.
18612                         cf_depend="../include/ncurses_cfg.h"
18613                         if test "$srcdir" = "."; then
18614                                 cf_reldir="."
18615                         else
18616                                 cf_reldir="\${srcdir}"
18617                         fi
18618
18619                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18620                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18621                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18622                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18623                         fi
18624
18625                         cf_dir_suffix=
18626                         old_cf_suffix="$cf_suffix"
18627                         if test "$cf_cv_shlib_version_infix" = yes ; then
18628                         if test -n "$LIB_SUFFIX" ; then
18629                                 case $LIB_SUFFIX in
18630                                 w*)
18631                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18632                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18633                                         cf_dir_suffix=w
18634                                         ;;
18635                                 esac
18636                         fi
18637                         fi
18638
18639                         $AWK -f $srcdir/mk-1st.awk \
18640                                 name=${cf_libname}${cf_dir_suffix} \
18641                                 traces=$LIB_TRACING \
18642                                 MODEL=$cf_ITEM \
18643                                 model=$cf_subdir \
18644                                 prefix=$cf_prefix \
18645                                 suffix=$cf_suffix \
18646                                 subset=$cf_subset \
18647                                 TermlibRoot=$TINFO_NAME \
18648                                 TermlibSuffix=$TINFO_SUFFIX \
18649                                 ShlibVer=$cf_cv_shlib_version \
18650                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18651                                 ReLink=${cf_cv_do_relink-no} \
18652                                 DoLinks=$cf_cv_do_symlinks \
18653                                 rmSoLocs=$cf_cv_rm_so_locs \
18654                                 ldconfig="$LDCONFIG" \
18655                                 overwrite=$WITH_OVERWRITE \
18656                                 depend="$cf_depend" \
18657                                 host="$host" \
18658                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18659
18660                         cf_suffix="$old_cf_suffix"
18661
18662                         for cf_subdir2 in $cf_subdirs lib
18663                         do
18664                                 test $cf_subdir = $cf_subdir2 && break
18665                         done
18666                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18667                         $AWK -f $srcdir/mk-2nd.awk \
18668                                 name=$cf_dir \
18669                                 traces=$LIB_TRACING \
18670                                 MODEL=$cf_ITEM \
18671                                 model=$cf_subdir \
18672                                 subset=$cf_subset \
18673                                 srcdir=$srcdir \
18674                                 echo=$WITH_ECHO \
18675                                 crenames=$cf_cv_prog_CC_c_o \
18676                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18677                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18678                         cf_subdirs="$cf_subdirs $cf_subdir"
18679                         done
18680                 done
18681         fi
18682
18683         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18684 done
18685
18686 for cf_dir in $SRC_SUBDIRS
18687 do
18688         if test ! -d $srcdir/$cf_dir ; then
18689                 continue
18690         fi
18691
18692         if test -f $cf_dir/Makefile ; then
18693                 case "$cf_dir" in
18694                 Ada95) #(vi
18695                         echo 'libs \' >> Makefile
18696                         echo 'install.libs \' >> Makefile
18697                         echo 'uninstall.libs ::' >> Makefile
18698                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18699                         ;;
18700                 esac
18701         fi
18702
18703         if test -f $srcdir/$cf_dir/modules; then
18704                 echo >> Makefile
18705                 if test -f $srcdir/$cf_dir/headers; then
18706 cat >> Makefile <<CF_EOF
18707 install.includes \\
18708 uninstall.includes \\
18709 CF_EOF
18710                 fi
18711 if test "$cf_dir" != "c++" ; then
18712 echo 'lint \' >> Makefile
18713 fi
18714 cat >> Makefile <<CF_EOF
18715 libs \\
18716 lintlib \\
18717 install.libs \\
18718 uninstall.libs \\
18719 install.$cf_dir \\
18720 uninstall.$cf_dir ::
18721         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18722 CF_EOF
18723         elif test -f $srcdir/$cf_dir/headers; then
18724 cat >> Makefile <<CF_EOF
18725
18726 libs \\
18727 install.libs \\
18728 uninstall.libs \\
18729 install.includes \\
18730 uninstall.includes ::
18731         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18732 CF_EOF
18733 fi
18734 done
18735
18736 cat >> Makefile <<CF_EOF
18737
18738 install.libs uninstall.libs \\
18739 install.data uninstall.data ::
18740 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18741 CF_EOF
18742
18743 if test "x$cf_with_manpages" = xyes; then
18744 cat >> Makefile <<CF_EOF
18745
18746 install.man \\
18747 uninstall.man ::
18748         cd man && \${MAKE} \${CF_MFLAGS} \$@
18749 CF_EOF
18750 fi
18751
18752 cat >> Makefile <<CF_EOF
18753
18754 distclean ::
18755         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18756         rm -f headers.sh headers.sed mk_shared_lib.sh
18757         rm -f edit_man.* man_alias.*
18758         rm -rf \${DIRS_TO_MAKE}
18759 CF_EOF
18760
18761 # Special case: tack's manpage lives in its own directory.
18762 if test "x$cf_with_manpages" = xyes; then
18763 if test -d tack ; then
18764 if test -f $srcdir/$tack.h; then
18765 cat >> Makefile <<CF_EOF
18766
18767 install.man \\
18768 uninstall.man ::
18769         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18770 CF_EOF
18771 fi
18772 fi
18773 fi
18774
18775 rm -f headers.sed headers.sh
18776
18777 echo creating headers.sh
18778 cat >headers.sh <<CF_EOF
18779 #! /bin/sh
18780 # This shell script is generated by the 'configure' script.  It is invoked in a
18781 # subdirectory of the build tree.  It generates a sed-script in the parent
18782 # directory that is used to adjust includes for header files that reside in a
18783 # subdirectory of /usr/include, etc.
18784 PRG=""
18785 while test \$# != 3
18786 do
18787 PRG="\$PRG \$1"; shift
18788 done
18789 DST=\$1
18790 REF=\$2
18791 SRC=\$3
18792 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18793 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18794 echo installing \$SRC in \$DST
18795 CF_EOF
18796
18797 if test $WITH_CURSES_H = yes; then
18798         cat >>headers.sh <<CF_EOF
18799 case \$DST in
18800 /*/include/*)
18801         END=\`basename \$DST\`
18802         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18803         do
18804                 NAME=\`basename \$i\`
18805                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18806         done
18807         ;;
18808 *)
18809         echo "" >> \$TMPSED
18810         ;;
18811 esac
18812 CF_EOF
18813
18814 else
18815         cat >>headers.sh <<CF_EOF
18816 case \$DST in
18817 /*/include/*)
18818         END=\`basename \$DST\`
18819         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18820         do
18821                 NAME=\`basename \$i\`
18822                 if test "\$NAME" = "curses.h"
18823                 then
18824                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18825                         NAME=ncurses.h
18826                 fi
18827                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18828         done
18829         ;;
18830 *)
18831         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18832         ;;
18833 esac
18834 CF_EOF
18835 fi
18836 cat >>headers.sh <<CF_EOF
18837 rm -f \$TMPSRC
18838 sed -f \$TMPSED \$SRC > \$TMPSRC
18839 NAME=\`basename \$SRC\`
18840 CF_EOF
18841 if test $WITH_CURSES_H != yes; then
18842         cat >>headers.sh <<CF_EOF
18843 test "\$NAME" = "curses.h" && NAME=ncurses.h
18844 CF_EOF
18845 fi
18846 cat >>headers.sh <<CF_EOF
18847 # Just in case someone gzip'd manpages, remove the conflicting copy.
18848 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18849
18850 eval \$PRG \$TMPSRC \$DST/\$NAME
18851 rm -f \$TMPSRC \$TMPSED
18852 CF_EOF
18853
18854 chmod 0755 headers.sh
18855
18856 for cf_dir in $SRC_SUBDIRS
18857 do
18858         if test ! -d $srcdir/$cf_dir ; then
18859                 continue
18860         fi
18861
18862         if test -f $srcdir/$cf_dir/headers; then
18863                 $AWK -f $srcdir/mk-hdr.awk \
18864                         subset="$LIB_SUBSETS" \
18865                         compat="$WITH_CURSES_H" \
18866                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18867         fi
18868
18869         if test -f $srcdir/$cf_dir/modules; then
18870                 if test "$cf_dir" != "c++" ; then
18871                         cat >>$cf_dir/Makefile <<"CF_EOF"
18872 depend : ${AUTO_SRC}
18873         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18874
18875 # DO NOT DELETE THIS LINE -- make depend depends on it.
18876 CF_EOF
18877                 fi
18878         fi
18879 done
18880
18881  ;;
18882   esac
18883 done
18884 EOF
18885
18886 cat >>$CONFIG_STATUS <<\EOF
18887
18888 { (exit 0); exit 0; }
18889 EOF
18890 chmod +x $CONFIG_STATUS
18891 ac_clean_files=$ac_clean_files_save
18892
18893 # configure is writing to config.log, and then calls config.status.
18894 # config.status does its own redirection, appending to config.log.
18895 # Unfortunately, on DOS this fails, as config.log is still kept open
18896 # by configure, so config.status won't be able to write to it; its
18897 # output is simply discarded.  So we exec the FD to /dev/null,
18898 # effectively closing config.log, so it can be properly (re)opened and
18899 # appended to by config.status.  When coming back to configure, we
18900 # need to make the FD available again.
18901 if test "$no_create" != yes; then
18902   ac_cs_success=:
18903   exec 5>/dev/null
18904   $SHELL $CONFIG_STATUS || ac_cs_success=false
18905   exec 5>>config.log
18906   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18907   # would make configure fail if this is the last instruction.
18908   $ac_cs_success || { (exit 1); exit 1; }
18909 fi
18910 ${MAKE-make} preinstall