]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
8f0a8bdf4c85adadd45f10906af35ef7a532bec2
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.494 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --disable-libtool-version  enable to use libtool's incompatible naming scheme
716   --with-libtool          generate libraries with libtool
717   --with-shared           generate shared-libraries
718   --with-normal           generate normal-libraries (default)
719   --with-debug            generate debug-libraries (default)
720   --with-profile          generate profile-libraries
721   --with-termlib          generate separate terminfo library
722   --with-ticlib           generate separate tic library
723   --with-gpm              use Alessandro Rubini's GPM library
724   --without-dlsym         do not use dlsym() to load GPM dynamically
725   --with-sysmouse         use sysmouse (FreeBSD console)
726   --enable-rpath          use rpath option when generating shared libraries
727   --disable-relink        relink shared libraries during install
728   --with-shlib-version=X  Specify rel or abi version for shared libs
729 Fine-Tuning Your Configuration:
730   --disable-overwrite     leave out the link to -lcurses
731   --disable-database      do not use terminfo, only fallbacks/termcap
732   --with-database=XXX     specify terminfo source to install
733   --with-hashed-db        specify hashed-database library
734   --with-fallbacks=XXX    specify list of fallback terminal descriptions
735   --without-xterm-new     specify if xterm terminfo should be old version
736   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
737   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
738   --disable-big-core      assume machine has little memory
739   --disable-big-strings   assume compiler has only standard-size strings
740   --enable-termcap        compile in termcap fallback support
741   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
742   --enable-getcap         fast termcap load, no xrefs to terminfo
743   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
744   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
745   --disable-root-environ  restrict environment when running as root
746   --enable-symlinks       make tic use symbolic links not hard links
747   --enable-broken_linker  compile with broken-linker support code
748   --enable-bsdpad         recognize BSD-style prefix padding
749   --enable-widec          compile with wide-char/UTF-8 code
750   --disable-lp64          allow chtype to be long (ignore _LP64)
751   --disable-largefile     omit support for large files
752   --disable-tparm-varargs compile tparm() without varargs interface
753   --disable-tic-depends   link tic library without explicit dependency on ncurses library
754   --with-bool=TYPE        override fallback type of bool variable
755   --with-caps=alt         compile with alternate Caps file
756   --with-chtype=TYPE      override type of chtype
757   --with-ospeed=TYPE      override type of ospeed variable
758   --with-mmask-t=TYPE     override type of mmask_t
759   --with-ccharw-max=XXX   override size CCHARW_MAX
760   --with-rcs-ids          compile-in RCS identifiers
761 Options to Specify How Manpages are Installed:
762   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
763                           optionally formatted/catonly, e.g., gzip,formatted
764   --with-manpage-renames  specify manpage-renaming
765   --with-manpage-aliases  specify manpage-aliases using .so
766   --with-manpage-symlinks specify manpage-aliases using symlinks
767   --with-manpage-tbl      specify manpage processing with tbl
768 Extensions:
769   --disable-ext-funcs     disable function-extensions
770   --enable-sp-funcs       enable experimental SCREEN-extensions
771   --enable-term-driver    enable experimental terminal-driver
772   --enable-const          compile with extra/non-standard const
773   --enable-ext-colors     compile for 256-color support
774   --enable-ext-mouse      compile for extended mouse-encoding
775   --enable-no-padding     compile with $NCURSES_NO_PADDING code
776   --enable-signed-char    compile using signed Boolean's in term.h
777   --enable-sigwinch       compile with SIGWINCH handler
778   --enable-tcap-names     compile with user-definable terminal capabilities
779 Development Code:
780   --without-develop       disable development options
781   --enable-hard-tabs      compile with hard-tabs code
782   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
783 Experimental Code:
784   --disable-assumed-color do not assume anything about default-colors
785   --disable-hashmap       compile without hashmap scrolling-optimization
786   --enable-colorfgbg      compile-in experimental $COLORFGBG code
787   --enable-interop        compile-in experimental interop bindings
788   --with-pthread          use POSIX thread library
789   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
790   --enable-weak-symbols   enable weak-symbols for pthreads
791   --enable-reentrant      compile with experimental reentrant code
792   --with-wrap-prefix=XXX  override prefix used for public variables
793   --enable-safe-sprintf   compile with experimental safe-sprintf code
794   --disable-scroll-hints  compile without scroll-hints code
795   --enable-wgetch-events  compile with experimental wgetch-events code
796 Testing/development Options:
797   --enable-echo           build: display "compiling" commands (default)
798   --enable-warnings       build: turn on GCC compiler warnings
799   --enable-assertions     test: turn on generation of assertion code
800   --with-dmalloc          test: use Gray Watson's dmalloc library
801   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
802   --with-valgrind         test: use valgrind
803   --disable-leaks         test: free permanent memory, analyze leaks
804   --enable-expanded       test: generate functions for certain macros
805   --disable-macros        test: use functions rather than macros
806   --with-trace            test: add trace() function to all models of ncurses
807 Ada95 Binding Options:
808   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
809   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
810   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
811   --disable-rpath-hack    don't add rpath options for additional libraries
812
813 Some influential environment variables:
814   CC          C compiler command
815   CFLAGS      C compiler flags
816   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
817               nonstandard directory <lib dir>
818   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
819               headers in a nonstandard directory <include dir>
820   CPP         C preprocessor
821   CXX         C++ compiler command
822   CXXFLAGS    C++ compiler flags
823   CXXCPP      C++ preprocessor
824
825 Use these variables to override the choices made by `configure' or to help
826 it to find libraries and programs with nonstandard names/locations.
827
828 EOF
829 fi
830
831 if test "$ac_init_help" = "recursive"; then
832   # If there are subdirs, report their specific --help.
833   ac_popdir=`pwd`
834   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
835     cd $ac_subdir
836     # A "../" for each directory in /$ac_subdir.
837     ac_dots=`echo $ac_subdir |
838              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
839
840     case $srcdir in
841     .) # No --srcdir option.  We are building in place.
842       ac_sub_srcdir=$srcdir ;;
843     [\\/]* | ?:[\\/]* ) # Absolute path.
844       ac_sub_srcdir=$srcdir/$ac_subdir ;;
845     *) # Relative path.
846       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
847     esac
848
849     # Check for guested configure; otherwise get Cygnus style configure.
850     if test -f $ac_sub_srcdir/configure.gnu; then
851       echo
852       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
853     elif test -f $ac_sub_srcdir/configure; then
854       echo
855       $SHELL $ac_sub_srcdir/configure  --help=recursive
856     elif test -f $ac_sub_srcdir/configure.ac ||
857            test -f $ac_sub_srcdir/configure.in; then
858       echo
859       $ac_configure --help
860     else
861       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
862     fi
863     cd $ac_popdir
864   done
865 fi
866
867 test -n "$ac_init_help" && exit 0
868 if $ac_init_version; then
869   cat <<\EOF
870
871 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
872 Free Software Foundation, Inc.
873 This configure script is free software; the Free Software Foundation
874 gives unlimited permission to copy, distribute and modify it.
875 EOF
876   exit 0
877 fi
878 exec 5>config.log
879 cat >&5 <<EOF
880 This file contains any messages produced by compilers while
881 running configure, to aid debugging if configure makes a mistake.
882
883 It was created by $as_me, which was
884 generated by GNU Autoconf 2.52.20100320.  Invocation command line was
885
886   $ $0 $@
887
888 EOF
889 {
890 cat <<_ASUNAME
891 ## ---------- ##
892 ## Platform.  ##
893 ## ---------- ##
894
895 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
896 uname -m = `(uname -m) 2>/dev/null || echo unknown`
897 uname -r = `(uname -r) 2>/dev/null || echo unknown`
898 uname -s = `(uname -s) 2>/dev/null || echo unknown`
899 uname -v = `(uname -v) 2>/dev/null || echo unknown`
900
901 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
902 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
903
904 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
905 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
906 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
907 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
908 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
909 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
910 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
911
912 PATH = $PATH
913
914 _ASUNAME
915 } >&5
916
917 cat >&5 <<EOF
918 ## ------------ ##
919 ## Core tests.  ##
920 ## ------------ ##
921
922 EOF
923
924 # Keep a trace of the command line.
925 # Strip out --no-create and --no-recursion so they do not pile up.
926 # Also quote any args containing shell meta-characters.
927 ac_configure_args=
928 ac_sep=
929 for ac_arg
930 do
931   case $ac_arg in
932   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
933   | --no-cr | --no-c) ;;
934   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
935   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
936   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
937     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
938     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
939     ac_sep=" " ;;
940   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
941      ac_sep=" " ;;
942   esac
943   # Get rid of the leading space.
944 done
945
946 # When interrupted or exit'd, cleanup temporary files, and complete
947 # config.log.  We remove comments because anyway the quotes in there
948 # would cause problems or look ugly.
949 trap 'exit_status=$?
950   # Save into config.log some information that might help in debugging.
951   echo >&5
952   echo "## ----------------- ##" >&5
953   echo "## Cache variables.  ##" >&5
954   echo "## ----------------- ##" >&5
955   echo >&5
956   # The following way of writing the cache mishandles newlines in values,
957 {
958   (set) 2>&1 |
959     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
960     *ac_space=\ *)
961       sed -n \
962         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
963           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
964       ;;
965     *)
966       sed -n \
967         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
968       ;;
969     esac;
970 } >&5
971   sed "/^$/d" confdefs.h >conftest.log
972   if test -s conftest.log; then
973     echo >&5
974     echo "## ------------ ##" >&5
975     echo "## confdefs.h.  ##" >&5
976     echo "## ------------ ##" >&5
977     echo >&5
978     cat conftest.log >&5
979   fi
980   (echo; echo) >&5
981   test "$ac_signal" != 0 &&
982     echo "$as_me: caught signal $ac_signal" >&5
983   echo "$as_me: exit $exit_status" >&5
984   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
985     exit $exit_status
986      ' 0
987 for ac_signal in 1 2 13 15; do
988   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
989 done
990 ac_signal=0
991
992 # confdefs.h avoids OS command line length limits that DEFS can exceed.
993 rm -rf conftest* confdefs.h
994 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
995 echo >confdefs.h
996
997 # Let the site file select an alternate cache file if it wants to.
998 # Prefer explicitly selected file to automatically selected ones.
999 if test -z "$CONFIG_SITE"; then
1000   if test "x$prefix" != xNONE; then
1001     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1002   else
1003     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1004   fi
1005 fi
1006 for ac_site_file in $CONFIG_SITE; do
1007   if test -r "$ac_site_file"; then
1008     { echo "$as_me:1008: loading site script $ac_site_file" >&5
1009 echo "$as_me: loading site script $ac_site_file" >&6;}
1010     cat "$ac_site_file" >&5
1011     . "$ac_site_file"
1012   fi
1013 done
1014
1015 if test -r "$cache_file"; then
1016   # Some versions of bash will fail to source /dev/null (special
1017   # files actually), so we avoid doing that.
1018   if test -f "$cache_file"; then
1019     { echo "$as_me:1019: loading cache $cache_file" >&5
1020 echo "$as_me: loading cache $cache_file" >&6;}
1021     case $cache_file in
1022       [\\/]* | ?:[\\/]* ) . $cache_file;;
1023       *)                      . ./$cache_file;;
1024     esac
1025   fi
1026 else
1027   { echo "$as_me:1027: creating cache $cache_file" >&5
1028 echo "$as_me: creating cache $cache_file" >&6;}
1029   >$cache_file
1030 fi
1031
1032 # Check that the precious variables saved in the cache have kept the same
1033 # value.
1034 ac_cache_corrupted=false
1035 for ac_var in `(set) 2>&1 |
1036                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1037   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1038   eval ac_new_set=\$ac_env_${ac_var}_set
1039   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1040   eval ac_new_val="\$ac_env_${ac_var}_value"
1041   case $ac_old_set,$ac_new_set in
1042     set,)
1043       { echo "$as_me:1043: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1044 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1045       ac_cache_corrupted=: ;;
1046     ,set)
1047       { echo "$as_me:1047: error: \`$ac_var' was not set in the previous run" >&5
1048 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1049       ac_cache_corrupted=: ;;
1050     ,);;
1051     *)
1052       if test "x$ac_old_val" != "x$ac_new_val"; then
1053         { echo "$as_me:1053: error: \`$ac_var' has changed since the previous run:" >&5
1054 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1055         { echo "$as_me:1055:   former value:  $ac_old_val" >&5
1056 echo "$as_me:   former value:  $ac_old_val" >&2;}
1057         { echo "$as_me:1057:   current value: $ac_new_val" >&5
1058 echo "$as_me:   current value: $ac_new_val" >&2;}
1059         ac_cache_corrupted=:
1060       fi;;
1061   esac
1062   # Pass precious variables to config.status.  It doesn't matter if
1063   # we pass some twice (in addition to the command line arguments).
1064   if test "$ac_new_set" = set; then
1065     case $ac_new_val in
1066     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1067       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1068       ac_configure_args="$ac_configure_args '$ac_arg'"
1069       ;;
1070     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1071        ;;
1072     esac
1073   fi
1074 done
1075 if $ac_cache_corrupted; then
1076   { echo "$as_me:1076: error: changes in the environment can compromise the build" >&5
1077 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1078   { { echo "$as_me:1078: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1079 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1080    { (exit 1); exit 1; }; }
1081 fi
1082
1083 ac_ext=c
1084 ac_cpp='$CPP $CPPFLAGS'
1085 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1086 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1087 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1088 ac_main_return=return
1089
1090 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1091   *c*,-n*) ECHO_N= ECHO_C='
1092 ' ECHO_T='      ' ;;
1093   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1094   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1095 esac
1096 echo "#! $SHELL" >conftest.sh
1097 echo  "exit 0"   >>conftest.sh
1098 chmod +x conftest.sh
1099 if { (echo "$as_me:1099: PATH=\".;.\"; conftest.sh") >&5
1100   (PATH=".;."; conftest.sh) 2>&5
1101   ac_status=$?
1102   echo "$as_me:1102: \$? = $ac_status" >&5
1103   (exit $ac_status); }; then
1104   ac_path_separator=';'
1105 else
1106   ac_path_separator=:
1107 fi
1108 PATH_SEPARATOR="$ac_path_separator"
1109 rm -f conftest.sh
1110
1111 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1112
1113 top_builddir=`pwd`
1114
1115 echo "$as_me:1115: checking for egrep" >&5
1116 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1117 if test "${ac_cv_prog_egrep+set}" = set; then
1118   echo $ECHO_N "(cached) $ECHO_C" >&6
1119 else
1120   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1121     then ac_cv_prog_egrep='grep -E'
1122     else ac_cv_prog_egrep='egrep'
1123     fi
1124 fi
1125 echo "$as_me:1125: result: $ac_cv_prog_egrep" >&5
1126 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1127  EGREP=$ac_cv_prog_egrep
1128
1129 test -z "$EGREP" && { { echo "$as_me:1129: error: No egrep program found" >&5
1130 echo "$as_me: error: No egrep program found" >&2;}
1131    { (exit 1); exit 1; }; }
1132
1133 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1134 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1135 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 cf_cv_abi_version=${NCURSES_MAJOR}
1137 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1138 cf_cv_timestamp=`date`
1139 echo "$as_me:1139: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1140 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1141
1142 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1143
1144 # Check whether --with-rel-version or --without-rel-version was given.
1145 if test "${with_rel_version+set}" = set; then
1146   withval="$with_rel_version"
1147   { echo "$as_me:1147: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1148 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1149  cf_cv_rel_version=$withval
1150 fi;
1151
1152  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1153  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1154
1155 if test -n "$NCURSES_MAJOR" ; then
1156   case $NCURSES_MAJOR in #(vi
1157   [0-9]*) #(vi
1158         ;;
1159   *)
1160         { { echo "$as_me:1160: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1161 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1162    { (exit 1); exit 1; }; }
1163         ;;
1164   esac
1165 else
1166   { { echo "$as_me:1166: error: Release major-version value is empty" >&5
1167 echo "$as_me: error: Release major-version value is empty" >&2;}
1168    { (exit 1); exit 1; }; }
1169 fi
1170
1171 if test -n "$NCURSES_MINOR" ; then
1172   case $NCURSES_MINOR in #(vi
1173   [0-9]*) #(vi
1174         ;;
1175   *)
1176         { { echo "$as_me:1176: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1177 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1178    { (exit 1); exit 1; }; }
1179         ;;
1180   esac
1181 else
1182   { { echo "$as_me:1182: error: Release minor-version value is empty" >&5
1183 echo "$as_me: error: Release minor-version value is empty" >&2;}
1184    { (exit 1); exit 1; }; }
1185 fi
1186
1187 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1188
1189 # Check whether --with-abi-version or --without-abi-version was given.
1190 if test "${with_abi_version+set}" = set; then
1191   withval="$with_abi_version"
1192   { echo "$as_me:1192: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1193 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1194  cf_cv_abi_version=$withval
1195 fi;
1196
1197 if test -n "$cf_cv_abi_version" ; then
1198   case $cf_cv_abi_version in #(vi
1199   [0-9]*) #(vi
1200         ;;
1201   *)
1202         { { echo "$as_me:1202: error: ABI version is not a number: $cf_cv_abi_version" >&5
1203 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1204    { (exit 1); exit 1; }; }
1205         ;;
1206   esac
1207 else
1208   { { echo "$as_me:1208: error: ABI version value is empty" >&5
1209 echo "$as_me: error: ABI version value is empty" >&2;}
1210    { (exit 1); exit 1; }; }
1211 fi
1212
1213 ac_aux_dir=
1214 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1215   if test -f $ac_dir/install-sh; then
1216     ac_aux_dir=$ac_dir
1217     ac_install_sh="$ac_aux_dir/install-sh -c"
1218     break
1219   elif test -f $ac_dir/install.sh; then
1220     ac_aux_dir=$ac_dir
1221     ac_install_sh="$ac_aux_dir/install.sh -c"
1222     break
1223   elif test -f $ac_dir/shtool; then
1224     ac_aux_dir=$ac_dir
1225     ac_install_sh="$ac_aux_dir/shtool install -c"
1226     break
1227   fi
1228 done
1229 if test -z "$ac_aux_dir"; then
1230   { { echo "$as_me:1230: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1231 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1232    { (exit 1); exit 1; }; }
1233 fi
1234 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1235 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1236 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1237
1238 # Make sure we can run config.sub.
1239 $ac_config_sub sun4 >/dev/null 2>&1 ||
1240   { { echo "$as_me:1240: error: cannot run $ac_config_sub" >&5
1241 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1242    { (exit 1); exit 1; }; }
1243
1244 echo "$as_me:1244: checking build system type" >&5
1245 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1246 if test "${ac_cv_build+set}" = set; then
1247   echo $ECHO_N "(cached) $ECHO_C" >&6
1248 else
1249   ac_cv_build_alias=$build_alias
1250 test -z "$ac_cv_build_alias" &&
1251   ac_cv_build_alias=`$ac_config_guess`
1252 test -z "$ac_cv_build_alias" &&
1253   { { echo "$as_me:1253: error: cannot guess build type; you must specify one" >&5
1254 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1255    { (exit 1); exit 1; }; }
1256 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1257   { { echo "$as_me:1257: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1258 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1259    { (exit 1); exit 1; }; }
1260
1261 fi
1262 echo "$as_me:1262: result: $ac_cv_build" >&5
1263 echo "${ECHO_T}$ac_cv_build" >&6
1264 build=$ac_cv_build
1265 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1266 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1267 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1268
1269 echo "$as_me:1269: checking host system type" >&5
1270 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1271 if test "${ac_cv_host+set}" = set; then
1272   echo $ECHO_N "(cached) $ECHO_C" >&6
1273 else
1274   ac_cv_host_alias=$host_alias
1275 test -z "$ac_cv_host_alias" &&
1276   ac_cv_host_alias=$ac_cv_build_alias
1277 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1278   { { echo "$as_me:1278: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1279 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1280    { (exit 1); exit 1; }; }
1281
1282 fi
1283 echo "$as_me:1283: result: $ac_cv_host" >&5
1284 echo "${ECHO_T}$ac_cv_host" >&6
1285 host=$ac_cv_host
1286 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1287 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1288 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1289
1290 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1291         echo "$as_me:1291: checking target system type" >&5
1292 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1293 if test "${ac_cv_target+set}" = set; then
1294   echo $ECHO_N "(cached) $ECHO_C" >&6
1295 else
1296   ac_cv_target_alias=$target_alias
1297 test "x$ac_cv_target_alias" = "x" &&
1298   ac_cv_target_alias=$ac_cv_host_alias
1299 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1300   { { echo "$as_me:1300: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1301 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1302    { (exit 1); exit 1; }; }
1303
1304 fi
1305 echo "$as_me:1305: result: $ac_cv_target" >&5
1306 echo "${ECHO_T}$ac_cv_target" >&6
1307 target=$ac_cv_target
1308 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1309 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1310 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1311
1312 # The aliases save the names the user supplied, while $host etc.
1313 # will get canonicalized.
1314 test -n "$target_alias" &&
1315   test "$program_prefix$program_suffix$program_transform_name" = \
1316     NONENONEs,x,x, &&
1317   program_prefix=${target_alias}-
1318         system_name="$host_os"
1319 else
1320         system_name="`(uname -s -r) 2>/dev/null`"
1321         if test -z "$system_name" ; then
1322                 system_name="`(hostname) 2>/dev/null`"
1323         fi
1324 fi
1325 test -n "$system_name" && cat >>confdefs.h <<EOF
1326 #define SYSTEM_NAME "$system_name"
1327 EOF
1328
1329 if test "${cf_cv_system_name+set}" = set; then
1330   echo $ECHO_N "(cached) $ECHO_C" >&6
1331 else
1332   cf_cv_system_name="$system_name"
1333 fi
1334
1335 test -z "$system_name" && system_name="$cf_cv_system_name"
1336 test -n "$cf_cv_system_name" && echo "$as_me:1336: result: Configuring for $cf_cv_system_name" >&5
1337 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1338
1339 if test ".$system_name" != ".$cf_cv_system_name" ; then
1340         echo "$as_me:1340: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1341 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1342         { { echo "$as_me:1342: error: \"Please remove config.cache and try again.\"" >&5
1343 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1344    { (exit 1); exit 1; }; }
1345 fi
1346
1347 # Check whether --with-system-type or --without-system-type was given.
1348 if test "${with_system_type+set}" = set; then
1349   withval="$with_system_type"
1350   { echo "$as_me:1350: WARNING: overriding system type to $withval" >&5
1351 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1352  cf_cv_system_name=$withval
1353 fi;
1354
1355 ###     Save the given $CFLAGS to allow user-override.
1356 cf_user_CFLAGS="$CFLAGS"
1357
1358 ###     Default install-location
1359
1360 echo "$as_me:1360: checking for prefix" >&5
1361 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1362 if test "x$prefix" = "xNONE" ; then
1363         case "$cf_cv_system_name" in
1364                 # non-vendor systems don't have a conflict
1365         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1366                 prefix=/usr
1367                 ;;
1368         *)      prefix=$ac_default_prefix
1369                 ;;
1370         esac
1371 fi
1372 echo "$as_me:1372: result: $prefix" >&5
1373 echo "${ECHO_T}$prefix" >&6
1374
1375 if test "x$prefix" = "xNONE" ; then
1376 echo "$as_me:1376: checking for default include-directory" >&5
1377 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1378 test -n "$verbose" && echo 1>&6
1379 for cf_symbol in \
1380         $includedir \
1381         $includedir/ncurses \
1382         $prefix/include \
1383         $prefix/include/ncurses \
1384         /usr/local/include \
1385         /usr/local/include/ncurses \
1386         /usr/include \
1387         /usr/include/ncurses
1388 do
1389         cf_dir=`eval echo $cf_symbol`
1390         if test -f $cf_dir/curses.h ; then
1391         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1392                 includedir="$cf_symbol"
1393                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1394                 break
1395         fi
1396         fi
1397         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1398 done
1399 echo "$as_me:1399: result: $includedir" >&5
1400 echo "${ECHO_T}$includedir" >&6
1401 fi
1402
1403 ###     Checks for programs.
1404 ac_ext=c
1405 ac_cpp='$CPP $CPPFLAGS'
1406 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1407 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1408 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1409 ac_main_return=return
1410 if test -n "$ac_tool_prefix"; then
1411   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1412 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1413 echo "$as_me:1413: checking for $ac_word" >&5
1414 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1415 if test "${ac_cv_prog_CC+set}" = set; then
1416   echo $ECHO_N "(cached) $ECHO_C" >&6
1417 else
1418   if test -n "$CC"; then
1419   ac_cv_prog_CC="$CC" # Let the user override the test.
1420 else
1421   ac_save_IFS=$IFS; IFS=$ac_path_separator
1422 ac_dummy="$PATH"
1423 for ac_dir in $ac_dummy; do
1424   IFS=$ac_save_IFS
1425   test -z "$ac_dir" && ac_dir=.
1426   $as_executable_p "$ac_dir/$ac_word" || continue
1427 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1428 echo "$as_me:1428: found $ac_dir/$ac_word" >&5
1429 break
1430 done
1431
1432 fi
1433 fi
1434 CC=$ac_cv_prog_CC
1435 if test -n "$CC"; then
1436   echo "$as_me:1436: result: $CC" >&5
1437 echo "${ECHO_T}$CC" >&6
1438 else
1439   echo "$as_me:1439: result: no" >&5
1440 echo "${ECHO_T}no" >&6
1441 fi
1442
1443 fi
1444 if test -z "$ac_cv_prog_CC"; then
1445   ac_ct_CC=$CC
1446   # Extract the first word of "gcc", so it can be a program name with args.
1447 set dummy gcc; ac_word=$2
1448 echo "$as_me:1448: checking for $ac_word" >&5
1449 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1450 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1451   echo $ECHO_N "(cached) $ECHO_C" >&6
1452 else
1453   if test -n "$ac_ct_CC"; then
1454   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1455 else
1456   ac_save_IFS=$IFS; IFS=$ac_path_separator
1457 ac_dummy="$PATH"
1458 for ac_dir in $ac_dummy; do
1459   IFS=$ac_save_IFS
1460   test -z "$ac_dir" && ac_dir=.
1461   $as_executable_p "$ac_dir/$ac_word" || continue
1462 ac_cv_prog_ac_ct_CC="gcc"
1463 echo "$as_me:1463: found $ac_dir/$ac_word" >&5
1464 break
1465 done
1466
1467 fi
1468 fi
1469 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1470 if test -n "$ac_ct_CC"; then
1471   echo "$as_me:1471: result: $ac_ct_CC" >&5
1472 echo "${ECHO_T}$ac_ct_CC" >&6
1473 else
1474   echo "$as_me:1474: result: no" >&5
1475 echo "${ECHO_T}no" >&6
1476 fi
1477
1478   CC=$ac_ct_CC
1479 else
1480   CC="$ac_cv_prog_CC"
1481 fi
1482
1483 if test -z "$CC"; then
1484   if test -n "$ac_tool_prefix"; then
1485   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1486 set dummy ${ac_tool_prefix}cc; ac_word=$2
1487 echo "$as_me:1487: checking for $ac_word" >&5
1488 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1489 if test "${ac_cv_prog_CC+set}" = set; then
1490   echo $ECHO_N "(cached) $ECHO_C" >&6
1491 else
1492   if test -n "$CC"; then
1493   ac_cv_prog_CC="$CC" # Let the user override the test.
1494 else
1495   ac_save_IFS=$IFS; IFS=$ac_path_separator
1496 ac_dummy="$PATH"
1497 for ac_dir in $ac_dummy; do
1498   IFS=$ac_save_IFS
1499   test -z "$ac_dir" && ac_dir=.
1500   $as_executable_p "$ac_dir/$ac_word" || continue
1501 ac_cv_prog_CC="${ac_tool_prefix}cc"
1502 echo "$as_me:1502: found $ac_dir/$ac_word" >&5
1503 break
1504 done
1505
1506 fi
1507 fi
1508 CC=$ac_cv_prog_CC
1509 if test -n "$CC"; then
1510   echo "$as_me:1510: result: $CC" >&5
1511 echo "${ECHO_T}$CC" >&6
1512 else
1513   echo "$as_me:1513: result: no" >&5
1514 echo "${ECHO_T}no" >&6
1515 fi
1516
1517 fi
1518 if test -z "$ac_cv_prog_CC"; then
1519   ac_ct_CC=$CC
1520   # Extract the first word of "cc", so it can be a program name with args.
1521 set dummy cc; ac_word=$2
1522 echo "$as_me:1522: checking for $ac_word" >&5
1523 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1524 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1525   echo $ECHO_N "(cached) $ECHO_C" >&6
1526 else
1527   if test -n "$ac_ct_CC"; then
1528   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1529 else
1530   ac_save_IFS=$IFS; IFS=$ac_path_separator
1531 ac_dummy="$PATH"
1532 for ac_dir in $ac_dummy; do
1533   IFS=$ac_save_IFS
1534   test -z "$ac_dir" && ac_dir=.
1535   $as_executable_p "$ac_dir/$ac_word" || continue
1536 ac_cv_prog_ac_ct_CC="cc"
1537 echo "$as_me:1537: found $ac_dir/$ac_word" >&5
1538 break
1539 done
1540
1541 fi
1542 fi
1543 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1544 if test -n "$ac_ct_CC"; then
1545   echo "$as_me:1545: result: $ac_ct_CC" >&5
1546 echo "${ECHO_T}$ac_ct_CC" >&6
1547 else
1548   echo "$as_me:1548: result: no" >&5
1549 echo "${ECHO_T}no" >&6
1550 fi
1551
1552   CC=$ac_ct_CC
1553 else
1554   CC="$ac_cv_prog_CC"
1555 fi
1556
1557 fi
1558 if test -z "$CC"; then
1559   # Extract the first word of "cc", so it can be a program name with args.
1560 set dummy cc; ac_word=$2
1561 echo "$as_me:1561: checking for $ac_word" >&5
1562 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1563 if test "${ac_cv_prog_CC+set}" = set; then
1564   echo $ECHO_N "(cached) $ECHO_C" >&6
1565 else
1566   if test -n "$CC"; then
1567   ac_cv_prog_CC="$CC" # Let the user override the test.
1568 else
1569   ac_prog_rejected=no
1570   ac_save_IFS=$IFS; IFS=$ac_path_separator
1571 ac_dummy="$PATH"
1572 for ac_dir in $ac_dummy; do
1573   IFS=$ac_save_IFS
1574   test -z "$ac_dir" && ac_dir=.
1575   $as_executable_p "$ac_dir/$ac_word" || continue
1576 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1577   ac_prog_rejected=yes
1578   continue
1579 fi
1580 ac_cv_prog_CC="cc"
1581 echo "$as_me:1581: found $ac_dir/$ac_word" >&5
1582 break
1583 done
1584
1585 if test $ac_prog_rejected = yes; then
1586   # We found a bogon in the path, so make sure we never use it.
1587   set dummy $ac_cv_prog_CC
1588   shift
1589   if test $# != 0; then
1590     # We chose a different compiler from the bogus one.
1591     # However, it has the same basename, so the bogon will be chosen
1592     # first if we set CC to just the basename; use the full file name.
1593     shift
1594     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1595     shift
1596     ac_cv_prog_CC="$@"
1597   fi
1598 fi
1599 fi
1600 fi
1601 CC=$ac_cv_prog_CC
1602 if test -n "$CC"; then
1603   echo "$as_me:1603: result: $CC" >&5
1604 echo "${ECHO_T}$CC" >&6
1605 else
1606   echo "$as_me:1606: result: no" >&5
1607 echo "${ECHO_T}no" >&6
1608 fi
1609
1610 fi
1611 if test -z "$CC"; then
1612   if test -n "$ac_tool_prefix"; then
1613   for ac_prog in cl
1614   do
1615     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1616 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1617 echo "$as_me:1617: checking for $ac_word" >&5
1618 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1619 if test "${ac_cv_prog_CC+set}" = set; then
1620   echo $ECHO_N "(cached) $ECHO_C" >&6
1621 else
1622   if test -n "$CC"; then
1623   ac_cv_prog_CC="$CC" # Let the user override the test.
1624 else
1625   ac_save_IFS=$IFS; IFS=$ac_path_separator
1626 ac_dummy="$PATH"
1627 for ac_dir in $ac_dummy; do
1628   IFS=$ac_save_IFS
1629   test -z "$ac_dir" && ac_dir=.
1630   $as_executable_p "$ac_dir/$ac_word" || continue
1631 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1632 echo "$as_me:1632: found $ac_dir/$ac_word" >&5
1633 break
1634 done
1635
1636 fi
1637 fi
1638 CC=$ac_cv_prog_CC
1639 if test -n "$CC"; then
1640   echo "$as_me:1640: result: $CC" >&5
1641 echo "${ECHO_T}$CC" >&6
1642 else
1643   echo "$as_me:1643: result: no" >&5
1644 echo "${ECHO_T}no" >&6
1645 fi
1646
1647     test -n "$CC" && break
1648   done
1649 fi
1650 if test -z "$CC"; then
1651   ac_ct_CC=$CC
1652   for ac_prog in cl
1653 do
1654   # Extract the first word of "$ac_prog", so it can be a program name with args.
1655 set dummy $ac_prog; ac_word=$2
1656 echo "$as_me:1656: checking for $ac_word" >&5
1657 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1658 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1659   echo $ECHO_N "(cached) $ECHO_C" >&6
1660 else
1661   if test -n "$ac_ct_CC"; then
1662   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1663 else
1664   ac_save_IFS=$IFS; IFS=$ac_path_separator
1665 ac_dummy="$PATH"
1666 for ac_dir in $ac_dummy; do
1667   IFS=$ac_save_IFS
1668   test -z "$ac_dir" && ac_dir=.
1669   $as_executable_p "$ac_dir/$ac_word" || continue
1670 ac_cv_prog_ac_ct_CC="$ac_prog"
1671 echo "$as_me:1671: found $ac_dir/$ac_word" >&5
1672 break
1673 done
1674
1675 fi
1676 fi
1677 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1678 if test -n "$ac_ct_CC"; then
1679   echo "$as_me:1679: result: $ac_ct_CC" >&5
1680 echo "${ECHO_T}$ac_ct_CC" >&6
1681 else
1682   echo "$as_me:1682: result: no" >&5
1683 echo "${ECHO_T}no" >&6
1684 fi
1685
1686   test -n "$ac_ct_CC" && break
1687 done
1688
1689   CC=$ac_ct_CC
1690 fi
1691
1692 fi
1693
1694 test -z "$CC" && { { echo "$as_me:1694: error: no acceptable cc found in \$PATH" >&5
1695 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1696    { (exit 1); exit 1; }; }
1697
1698 # Provide some information about the compiler.
1699 echo "$as_me:1699:" \
1700      "checking for C compiler version" >&5
1701 ac_compiler=`set X $ac_compile; echo $2`
1702 { (eval echo "$as_me:1702: \"$ac_compiler --version </dev/null >&5\"") >&5
1703   (eval $ac_compiler --version </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707 { (eval echo "$as_me:1707: \"$ac_compiler -v </dev/null >&5\"") >&5
1708   (eval $ac_compiler -v </dev/null >&5) 2>&5
1709   ac_status=$?
1710   echo "$as_me:1710: \$? = $ac_status" >&5
1711   (exit $ac_status); }
1712 { (eval echo "$as_me:1712: \"$ac_compiler -V </dev/null >&5\"") >&5
1713   (eval $ac_compiler -V </dev/null >&5) 2>&5
1714   ac_status=$?
1715   echo "$as_me:1715: \$? = $ac_status" >&5
1716   (exit $ac_status); }
1717
1718 cat >conftest.$ac_ext <<_ACEOF
1719 #line 1719 "configure"
1720 #include "confdefs.h"
1721
1722 int
1723 main ()
1724 {
1725
1726   ;
1727   return 0;
1728 }
1729 _ACEOF
1730 ac_clean_files_save=$ac_clean_files
1731 ac_clean_files="$ac_clean_files a.out a.exe"
1732 # Try to create an executable without -o first, disregard a.out.
1733 # It will help us diagnose broken compilers, and finding out an intuition
1734 # of exeext.
1735 echo "$as_me:1735: checking for C compiler default output" >&5
1736 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1737 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1738 if { (eval echo "$as_me:1738: \"$ac_link_default\"") >&5
1739   (eval $ac_link_default) 2>&5
1740   ac_status=$?
1741   echo "$as_me:1741: \$? = $ac_status" >&5
1742   (exit $ac_status); }; then
1743   # Find the output, starting from the most likely.  This scheme is
1744 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1745 # resort.
1746 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1747                 ls a.out conftest 2>/dev/null;
1748                 ls a.* conftest.* 2>/dev/null`; do
1749   case $ac_file in
1750     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1751     a.out ) # We found the default executable, but exeext='' is most
1752             # certainly right.
1753             break;;
1754     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1755           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1756           export ac_cv_exeext
1757           break;;
1758     * ) break;;
1759   esac
1760 done
1761 else
1762   echo "$as_me: failed program was:" >&5
1763 cat conftest.$ac_ext >&5
1764 { { echo "$as_me:1764: error: C compiler cannot create executables" >&5
1765 echo "$as_me: error: C compiler cannot create executables" >&2;}
1766    { (exit 77); exit 77; }; }
1767 fi
1768
1769 ac_exeext=$ac_cv_exeext
1770 echo "$as_me:1770: result: $ac_file" >&5
1771 echo "${ECHO_T}$ac_file" >&6
1772
1773 # Check the compiler produces executables we can run.  If not, either
1774 # the compiler is broken, or we cross compile.
1775 echo "$as_me:1775: checking whether the C compiler works" >&5
1776 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1777 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1778 # If not cross compiling, check that we can run a simple program.
1779 if test "$cross_compiling" != yes; then
1780   if { ac_try='./$ac_file'
1781   { (eval echo "$as_me:1781: \"$ac_try\"") >&5
1782   (eval $ac_try) 2>&5
1783   ac_status=$?
1784   echo "$as_me:1784: \$? = $ac_status" >&5
1785   (exit $ac_status); }; }; then
1786     cross_compiling=no
1787   else
1788     if test "$cross_compiling" = maybe; then
1789         cross_compiling=yes
1790     else
1791         { { echo "$as_me:1791: error: cannot run C compiled programs.
1792 If you meant to cross compile, use \`--host'." >&5
1793 echo "$as_me: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&2;}
1795    { (exit 1); exit 1; }; }
1796     fi
1797   fi
1798 fi
1799 echo "$as_me:1799: result: yes" >&5
1800 echo "${ECHO_T}yes" >&6
1801
1802 rm -f a.out a.exe conftest$ac_cv_exeext
1803 ac_clean_files=$ac_clean_files_save
1804 # Check the compiler produces executables we can run.  If not, either
1805 # the compiler is broken, or we cross compile.
1806 echo "$as_me:1806: checking whether we are cross compiling" >&5
1807 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1808 echo "$as_me:1808: result: $cross_compiling" >&5
1809 echo "${ECHO_T}$cross_compiling" >&6
1810
1811 echo "$as_me:1811: checking for executable suffix" >&5
1812 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1813 if { (eval echo "$as_me:1813: \"$ac_link\"") >&5
1814   (eval $ac_link) 2>&5
1815   ac_status=$?
1816   echo "$as_me:1816: \$? = $ac_status" >&5
1817   (exit $ac_status); }; then
1818   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1819 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1820 # work properly (i.e., refer to `conftest.exe'), while it won't with
1821 # `rm'.
1822 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1823   case $ac_file in
1824     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1825     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1826           export ac_cv_exeext
1827           break;;
1828     * ) break;;
1829   esac
1830 done
1831 else
1832   { { echo "$as_me:1832: error: cannot compute EXEEXT: cannot compile and link" >&5
1833 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1834    { (exit 1); exit 1; }; }
1835 fi
1836
1837 rm -f conftest$ac_cv_exeext
1838 echo "$as_me:1838: result: $ac_cv_exeext" >&5
1839 echo "${ECHO_T}$ac_cv_exeext" >&6
1840
1841 rm -f conftest.$ac_ext
1842 EXEEXT=$ac_cv_exeext
1843 ac_exeext=$EXEEXT
1844 echo "$as_me:1844: checking for object suffix" >&5
1845 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1846 if test "${ac_cv_objext+set}" = set; then
1847   echo $ECHO_N "(cached) $ECHO_C" >&6
1848 else
1849   cat >conftest.$ac_ext <<_ACEOF
1850 #line 1850 "configure"
1851 #include "confdefs.h"
1852
1853 int
1854 main ()
1855 {
1856
1857   ;
1858   return 0;
1859 }
1860 _ACEOF
1861 rm -f conftest.o conftest.obj
1862 if { (eval echo "$as_me:1862: \"$ac_compile\"") >&5
1863   (eval $ac_compile) 2>&5
1864   ac_status=$?
1865   echo "$as_me:1865: \$? = $ac_status" >&5
1866   (exit $ac_status); }; then
1867   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1868   case $ac_file in
1869     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1870     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1871        break;;
1872   esac
1873 done
1874 else
1875   echo "$as_me: failed program was:" >&5
1876 cat conftest.$ac_ext >&5
1877 { { echo "$as_me:1877: error: cannot compute OBJEXT: cannot compile" >&5
1878 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1879    { (exit 1); exit 1; }; }
1880 fi
1881
1882 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1883 fi
1884 echo "$as_me:1884: result: $ac_cv_objext" >&5
1885 echo "${ECHO_T}$ac_cv_objext" >&6
1886 OBJEXT=$ac_cv_objext
1887 ac_objext=$OBJEXT
1888 echo "$as_me:1888: checking whether we are using the GNU C compiler" >&5
1889 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1890 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1891   echo $ECHO_N "(cached) $ECHO_C" >&6
1892 else
1893   cat >conftest.$ac_ext <<_ACEOF
1894 #line 1894 "configure"
1895 #include "confdefs.h"
1896
1897 int
1898 main ()
1899 {
1900 #ifndef __GNUC__
1901        choke me
1902 #endif
1903
1904   ;
1905   return 0;
1906 }
1907 _ACEOF
1908 rm -f conftest.$ac_objext
1909 if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
1910   (eval $ac_compile) 2>&5
1911   ac_status=$?
1912   echo "$as_me:1912: \$? = $ac_status" >&5
1913   (exit $ac_status); } &&
1914          { ac_try='test -s conftest.$ac_objext'
1915   { (eval echo "$as_me:1915: \"$ac_try\"") >&5
1916   (eval $ac_try) 2>&5
1917   ac_status=$?
1918   echo "$as_me:1918: \$? = $ac_status" >&5
1919   (exit $ac_status); }; }; then
1920   ac_compiler_gnu=yes
1921 else
1922   echo "$as_me: failed program was:" >&5
1923 cat conftest.$ac_ext >&5
1924 ac_compiler_gnu=no
1925 fi
1926 rm -f conftest.$ac_objext conftest.$ac_ext
1927 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1928
1929 fi
1930 echo "$as_me:1930: result: $ac_cv_c_compiler_gnu" >&5
1931 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1932 GCC=`test $ac_compiler_gnu = yes && echo yes`
1933 ac_test_CFLAGS=${CFLAGS+set}
1934 ac_save_CFLAGS=$CFLAGS
1935 CFLAGS="-g"
1936 echo "$as_me:1936: checking whether $CC accepts -g" >&5
1937 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1938 if test "${ac_cv_prog_cc_g+set}" = set; then
1939   echo $ECHO_N "(cached) $ECHO_C" >&6
1940 else
1941   cat >conftest.$ac_ext <<_ACEOF
1942 #line 1942 "configure"
1943 #include "confdefs.h"
1944
1945 int
1946 main ()
1947 {
1948
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 rm -f conftest.$ac_objext
1954 if { (eval echo "$as_me:1954: \"$ac_compile\"") >&5
1955   (eval $ac_compile) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit $ac_status); } &&
1959          { ac_try='test -s conftest.$ac_objext'
1960   { (eval echo "$as_me:1960: \"$ac_try\"") >&5
1961   (eval $ac_try) 2>&5
1962   ac_status=$?
1963   echo "$as_me:1963: \$? = $ac_status" >&5
1964   (exit $ac_status); }; }; then
1965   ac_cv_prog_cc_g=yes
1966 else
1967   echo "$as_me: failed program was:" >&5
1968 cat conftest.$ac_ext >&5
1969 ac_cv_prog_cc_g=no
1970 fi
1971 rm -f conftest.$ac_objext conftest.$ac_ext
1972 fi
1973 echo "$as_me:1973: result: $ac_cv_prog_cc_g" >&5
1974 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1975 if test "$ac_test_CFLAGS" = set; then
1976   CFLAGS=$ac_save_CFLAGS
1977 elif test $ac_cv_prog_cc_g = yes; then
1978   if test "$GCC" = yes; then
1979     CFLAGS="-g -O2"
1980   else
1981     CFLAGS="-g"
1982   fi
1983 else
1984   if test "$GCC" = yes; then
1985     CFLAGS="-O2"
1986   else
1987     CFLAGS=
1988   fi
1989 fi
1990 # Some people use a C++ compiler to compile C.  Since we use `exit',
1991 # in C++ we need to declare it.  In case someone uses the same compiler
1992 # for both compiling C and C++ we need to have the C++ compiler decide
1993 # the declaration of exit, since it's the most demanding environment.
1994 cat >conftest.$ac_ext <<_ACEOF
1995 #ifndef __cplusplus
1996   choke me
1997 #endif
1998 _ACEOF
1999 rm -f conftest.$ac_objext
2000 if { (eval echo "$as_me:2000: \"$ac_compile\"") >&5
2001   (eval $ac_compile) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit $ac_status); } &&
2005          { ac_try='test -s conftest.$ac_objext'
2006   { (eval echo "$as_me:2006: \"$ac_try\"") >&5
2007   (eval $ac_try) 2>&5
2008   ac_status=$?
2009   echo "$as_me:2009: \$? = $ac_status" >&5
2010   (exit $ac_status); }; }; then
2011   for ac_declaration in \
2012    ''\
2013    '#include <stdlib.h>' \
2014    'extern "C" void std::exit (int) throw (); using std::exit;' \
2015    'extern "C" void std::exit (int); using std::exit;' \
2016    'extern "C" void exit (int) throw ();' \
2017    'extern "C" void exit (int);' \
2018    'void exit (int);'
2019 do
2020   cat >conftest.$ac_ext <<_ACEOF
2021 #line 2021 "configure"
2022 #include "confdefs.h"
2023 #include <stdlib.h>
2024 $ac_declaration
2025 int
2026 main ()
2027 {
2028 exit (42);
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 rm -f conftest.$ac_objext
2034 if { (eval echo "$as_me:2034: \"$ac_compile\"") >&5
2035   (eval $ac_compile) 2>&5
2036   ac_status=$?
2037   echo "$as_me:2037: \$? = $ac_status" >&5
2038   (exit $ac_status); } &&
2039          { ac_try='test -s conftest.$ac_objext'
2040   { (eval echo "$as_me:2040: \"$ac_try\"") >&5
2041   (eval $ac_try) 2>&5
2042   ac_status=$?
2043   echo "$as_me:2043: \$? = $ac_status" >&5
2044   (exit $ac_status); }; }; then
2045   :
2046 else
2047   echo "$as_me: failed program was:" >&5
2048 cat conftest.$ac_ext >&5
2049 continue
2050 fi
2051 rm -f conftest.$ac_objext conftest.$ac_ext
2052   cat >conftest.$ac_ext <<_ACEOF
2053 #line 2053 "configure"
2054 #include "confdefs.h"
2055 $ac_declaration
2056 int
2057 main ()
2058 {
2059 exit (42);
2060   ;
2061   return 0;
2062 }
2063 _ACEOF
2064 rm -f conftest.$ac_objext
2065 if { (eval echo "$as_me:2065: \"$ac_compile\"") >&5
2066   (eval $ac_compile) 2>&5
2067   ac_status=$?
2068   echo "$as_me:2068: \$? = $ac_status" >&5
2069   (exit $ac_status); } &&
2070          { ac_try='test -s conftest.$ac_objext'
2071   { (eval echo "$as_me:2071: \"$ac_try\"") >&5
2072   (eval $ac_try) 2>&5
2073   ac_status=$?
2074   echo "$as_me:2074: \$? = $ac_status" >&5
2075   (exit $ac_status); }; }; then
2076   break
2077 else
2078   echo "$as_me: failed program was:" >&5
2079 cat conftest.$ac_ext >&5
2080 fi
2081 rm -f conftest.$ac_objext conftest.$ac_ext
2082 done
2083 rm -f conftest*
2084 if test -n "$ac_declaration"; then
2085   echo '#ifdef __cplusplus' >>confdefs.h
2086   echo $ac_declaration      >>confdefs.h
2087   echo '#endif'             >>confdefs.h
2088 fi
2089
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat conftest.$ac_ext >&5
2093 fi
2094 rm -f conftest.$ac_objext conftest.$ac_ext
2095 ac_ext=c
2096 ac_cpp='$CPP $CPPFLAGS'
2097 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2098 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2099 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2100 ac_main_return=return
2101
2102 GCC_VERSION=none
2103 if test "$GCC" = yes ; then
2104         echo "$as_me:2104: checking version of $CC" >&5
2105 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2106         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2107         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2108         echo "$as_me:2108: result: $GCC_VERSION" >&5
2109 echo "${ECHO_T}$GCC_VERSION" >&6
2110 fi
2111
2112 ac_ext=c
2113 ac_cpp='$CPP $CPPFLAGS'
2114 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2115 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2116 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2117 ac_main_return=return
2118 echo "$as_me:2118: checking how to run the C preprocessor" >&5
2119 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2120 # On Suns, sometimes $CPP names a directory.
2121 if test -n "$CPP" && test -d "$CPP"; then
2122   CPP=
2123 fi
2124 if test -z "$CPP"; then
2125   if test "${ac_cv_prog_CPP+set}" = set; then
2126   echo $ECHO_N "(cached) $ECHO_C" >&6
2127 else
2128       # Double quotes because CPP needs to be expanded
2129     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2130     do
2131       ac_preproc_ok=false
2132 for ac_c_preproc_warn_flag in '' yes
2133 do
2134   # Use a header file that comes with gcc, so configuring glibc
2135   # with a fresh cross-compiler works.
2136   # On the NeXT, cc -E runs the code through the compiler's parser,
2137   # not just through cpp. "Syntax error" is here to catch this case.
2138   cat >conftest.$ac_ext <<_ACEOF
2139 #line 2139 "configure"
2140 #include "confdefs.h"
2141 #include <assert.h>
2142                      Syntax error
2143 _ACEOF
2144 if { (eval echo "$as_me:2144: \"$ac_cpp conftest.$ac_ext\"") >&5
2145   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2146   ac_status=$?
2147   egrep -v '^ *\+' conftest.er1 >conftest.err
2148   rm -f conftest.er1
2149   cat conftest.err >&5
2150   echo "$as_me:2150: \$? = $ac_status" >&5
2151   (exit $ac_status); } >/dev/null; then
2152   if test -s conftest.err; then
2153     ac_cpp_err=$ac_c_preproc_warn_flag
2154   else
2155     ac_cpp_err=
2156   fi
2157 else
2158   ac_cpp_err=yes
2159 fi
2160 if test -z "$ac_cpp_err"; then
2161   :
2162 else
2163   echo "$as_me: failed program was:" >&5
2164   cat conftest.$ac_ext >&5
2165   # Broken: fails on valid input.
2166 continue
2167 fi
2168 rm -f conftest.err conftest.$ac_ext
2169
2170   # OK, works on sane cases.  Now check whether non-existent headers
2171   # can be detected and how.
2172   cat >conftest.$ac_ext <<_ACEOF
2173 #line 2173 "configure"
2174 #include "confdefs.h"
2175 #include <ac_nonexistent.h>
2176 _ACEOF
2177 if { (eval echo "$as_me:2177: \"$ac_cpp conftest.$ac_ext\"") >&5
2178   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2179   ac_status=$?
2180   egrep -v '^ *\+' conftest.er1 >conftest.err
2181   rm -f conftest.er1
2182   cat conftest.err >&5
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit $ac_status); } >/dev/null; then
2185   if test -s conftest.err; then
2186     ac_cpp_err=$ac_c_preproc_warn_flag
2187   else
2188     ac_cpp_err=
2189   fi
2190 else
2191   ac_cpp_err=yes
2192 fi
2193 if test -z "$ac_cpp_err"; then
2194   # Broken: success on invalid input.
2195 continue
2196 else
2197   echo "$as_me: failed program was:" >&5
2198   cat conftest.$ac_ext >&5
2199   # Passes both tests.
2200 ac_preproc_ok=:
2201 break
2202 fi
2203 rm -f conftest.err conftest.$ac_ext
2204
2205 done
2206 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2207 rm -f conftest.err conftest.$ac_ext
2208 if $ac_preproc_ok; then
2209   break
2210 fi
2211
2212     done
2213     ac_cv_prog_CPP=$CPP
2214
2215 fi
2216   CPP=$ac_cv_prog_CPP
2217 else
2218   ac_cv_prog_CPP=$CPP
2219 fi
2220 echo "$as_me:2220: result: $CPP" >&5
2221 echo "${ECHO_T}$CPP" >&6
2222 ac_preproc_ok=false
2223 for ac_c_preproc_warn_flag in '' yes
2224 do
2225   # Use a header file that comes with gcc, so configuring glibc
2226   # with a fresh cross-compiler works.
2227   # On the NeXT, cc -E runs the code through the compiler's parser,
2228   # not just through cpp. "Syntax error" is here to catch this case.
2229   cat >conftest.$ac_ext <<_ACEOF
2230 #line 2230 "configure"
2231 #include "confdefs.h"
2232 #include <assert.h>
2233                      Syntax error
2234 _ACEOF
2235 if { (eval echo "$as_me:2235: \"$ac_cpp conftest.$ac_ext\"") >&5
2236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2237   ac_status=$?
2238   egrep -v '^ *\+' conftest.er1 >conftest.err
2239   rm -f conftest.er1
2240   cat conftest.err >&5
2241   echo "$as_me:2241: \$? = $ac_status" >&5
2242   (exit $ac_status); } >/dev/null; then
2243   if test -s conftest.err; then
2244     ac_cpp_err=$ac_c_preproc_warn_flag
2245   else
2246     ac_cpp_err=
2247   fi
2248 else
2249   ac_cpp_err=yes
2250 fi
2251 if test -z "$ac_cpp_err"; then
2252   :
2253 else
2254   echo "$as_me: failed program was:" >&5
2255   cat conftest.$ac_ext >&5
2256   # Broken: fails on valid input.
2257 continue
2258 fi
2259 rm -f conftest.err conftest.$ac_ext
2260
2261   # OK, works on sane cases.  Now check whether non-existent headers
2262   # can be detected and how.
2263   cat >conftest.$ac_ext <<_ACEOF
2264 #line 2264 "configure"
2265 #include "confdefs.h"
2266 #include <ac_nonexistent.h>
2267 _ACEOF
2268 if { (eval echo "$as_me:2268: \"$ac_cpp conftest.$ac_ext\"") >&5
2269   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2270   ac_status=$?
2271   egrep -v '^ *\+' conftest.er1 >conftest.err
2272   rm -f conftest.er1
2273   cat conftest.err >&5
2274   echo "$as_me:2274: \$? = $ac_status" >&5
2275   (exit $ac_status); } >/dev/null; then
2276   if test -s conftest.err; then
2277     ac_cpp_err=$ac_c_preproc_warn_flag
2278   else
2279     ac_cpp_err=
2280   fi
2281 else
2282   ac_cpp_err=yes
2283 fi
2284 if test -z "$ac_cpp_err"; then
2285   # Broken: success on invalid input.
2286 continue
2287 else
2288   echo "$as_me: failed program was:" >&5
2289   cat conftest.$ac_ext >&5
2290   # Passes both tests.
2291 ac_preproc_ok=:
2292 break
2293 fi
2294 rm -f conftest.err conftest.$ac_ext
2295
2296 done
2297 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2298 rm -f conftest.err conftest.$ac_ext
2299 if $ac_preproc_ok; then
2300   :
2301 else
2302   { { echo "$as_me:2302: error: C preprocessor \"$CPP\" fails sanity check" >&5
2303 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2304    { (exit 1); exit 1; }; }
2305 fi
2306
2307 ac_ext=c
2308 ac_cpp='$CPP $CPPFLAGS'
2309 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2310 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2311 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2312 ac_main_return=return
2313
2314 if test $ac_cv_c_compiler_gnu = yes; then
2315     echo "$as_me:2315: checking whether $CC needs -traditional" >&5
2316 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2317 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2318   echo $ECHO_N "(cached) $ECHO_C" >&6
2319 else
2320     ac_pattern="Autoconf.*'x'"
2321   cat >conftest.$ac_ext <<_ACEOF
2322 #line 2322 "configure"
2323 #include "confdefs.h"
2324 #include <sgtty.h>
2325 int Autoconf = TIOCGETP;
2326 _ACEOF
2327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2328   egrep "$ac_pattern" >/dev/null 2>&1; then
2329   ac_cv_prog_gcc_traditional=yes
2330 else
2331   ac_cv_prog_gcc_traditional=no
2332 fi
2333 rm -f conftest*
2334
2335   if test $ac_cv_prog_gcc_traditional = no; then
2336     cat >conftest.$ac_ext <<_ACEOF
2337 #line 2337 "configure"
2338 #include "confdefs.h"
2339 #include <termio.h>
2340 int Autoconf = TCGETA;
2341 _ACEOF
2342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2343   egrep "$ac_pattern" >/dev/null 2>&1; then
2344   ac_cv_prog_gcc_traditional=yes
2345 fi
2346 rm -f conftest*
2347
2348   fi
2349 fi
2350 echo "$as_me:2350: result: $ac_cv_prog_gcc_traditional" >&5
2351 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2352   if test $ac_cv_prog_gcc_traditional = yes; then
2353     CC="$CC -traditional"
2354   fi
2355 fi
2356
2357 echo "$as_me:2357: checking whether $CC understands -c and -o together" >&5
2358 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2359 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2360   echo $ECHO_N "(cached) $ECHO_C" >&6
2361 else
2362
2363 cat > conftest.$ac_ext <<CF_EOF
2364 #include <stdio.h>
2365 int main()
2366 {
2367         ${cf_cv_main_return:-return}(0);
2368 }
2369 CF_EOF
2370 # We do the test twice because some compilers refuse to overwrite an
2371 # existing .o file with -o, though they will create one.
2372 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2373 if { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit $ac_status); } &&
2378   test -f conftest2.$ac_objext && { (eval echo "$as_me:2378: \"$ac_try\"") >&5
2379   (eval $ac_try) 2>&5
2380   ac_status=$?
2381   echo "$as_me:2381: \$? = $ac_status" >&5
2382   (exit $ac_status); };
2383 then
2384   eval cf_cv_prog_CC_c_o=yes
2385 else
2386   eval cf_cv_prog_CC_c_o=no
2387 fi
2388 rm -f conftest*
2389
2390 fi
2391 if test $cf_cv_prog_CC_c_o = yes; then
2392   echo "$as_me:2392: result: yes" >&5
2393 echo "${ECHO_T}yes" >&6
2394 else
2395   echo "$as_me:2395: result: no" >&5
2396 echo "${ECHO_T}no" >&6
2397 fi
2398
2399 echo "$as_me:2399: checking for POSIXized ISC" >&5
2400 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2401 if test -d /etc/conf/kconfig.d &&
2402    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2403 then
2404   echo "$as_me:2404: result: yes" >&5
2405 echo "${ECHO_T}yes" >&6
2406   ISC=yes # If later tests want to check for ISC.
2407
2408 cat >>confdefs.h <<\EOF
2409 #define _POSIX_SOURCE 1
2410 EOF
2411
2412   if test "$GCC" = yes; then
2413     CC="$CC -posix"
2414   else
2415     CC="$CC -Xp"
2416   fi
2417 else
2418   echo "$as_me:2418: result: no" >&5
2419 echo "${ECHO_T}no" >&6
2420   ISC=
2421 fi
2422
2423 echo "$as_me:2423: checking for ${CC-cc} option to accept ANSI C" >&5
2424 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2425 if test "${cf_cv_ansi_cc+set}" = set; then
2426   echo $ECHO_N "(cached) $ECHO_C" >&6
2427 else
2428
2429 cf_cv_ansi_cc=no
2430 cf_save_CFLAGS="$CFLAGS"
2431 cf_save_CPPFLAGS="$CPPFLAGS"
2432 # Don't try gcc -ansi; that turns off useful extensions and
2433 # breaks some systems' header files.
2434 # AIX                   -qlanglvl=ansi
2435 # Ultrix and OSF/1      -std1
2436 # HP-UX                 -Aa -D_HPUX_SOURCE
2437 # SVR4                  -Xc
2438 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2439 for cf_arg in "-DCC_HAS_PROTOS" \
2440         "" \
2441         -qlanglvl=ansi \
2442         -std1 \
2443         -Ae \
2444         "-Aa -D_HPUX_SOURCE" \
2445         -Xc
2446 do
2447
2448 cf_fix_cppflags=no
2449 cf_new_cflags=
2450 cf_new_cppflags=
2451 cf_new_extra_cppflags=
2452
2453 for cf_add_cflags in $cf_arg
2454 do
2455 case $cf_fix_cppflags in
2456 no)
2457         case $cf_add_cflags in #(vi
2458         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2459                 case $cf_add_cflags in
2460                 -D*)
2461                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2462
2463                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2464                                 && test -z "${cf_tst_cflags}" \
2465                                 && cf_fix_cppflags=yes
2466
2467                         if test $cf_fix_cppflags = yes ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         elif test "${cf_tst_cflags}" = "\"'" ; then
2471                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2472                                 continue
2473                         fi
2474                         ;;
2475                 esac
2476                 case "$CPPFLAGS" in
2477                 *$cf_add_cflags) #(vi
2478                         ;;
2479                 *) #(vi
2480                         case $cf_add_cflags in #(vi
2481                         -D*)
2482                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2483
2484 CPPFLAGS=`echo "$CPPFLAGS" | \
2485         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2486                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2487
2488                                 ;;
2489                         esac
2490                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2491                         ;;
2492                 esac
2493                 ;;
2494         *)
2495                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2496                 ;;
2497         esac
2498         ;;
2499 yes)
2500         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2501
2502         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2503
2504         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2505                 && test -z "${cf_tst_cflags}" \
2506                 && cf_fix_cppflags=no
2507         ;;
2508 esac
2509 done
2510
2511 if test -n "$cf_new_cflags" ; then
2512
2513         CFLAGS="$CFLAGS $cf_new_cflags"
2514 fi
2515
2516 if test -n "$cf_new_cppflags" ; then
2517
2518         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2519 fi
2520
2521 if test -n "$cf_new_extra_cppflags" ; then
2522
2523         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2524 fi
2525
2526         cat >conftest.$ac_ext <<_ACEOF
2527 #line 2527 "configure"
2528 #include "confdefs.h"
2529
2530 #ifndef CC_HAS_PROTOS
2531 #if !defined(__STDC__) || (__STDC__ != 1)
2532 choke me
2533 #endif
2534 #endif
2535
2536 int
2537 main ()
2538 {
2539
2540         int test (int i, double x);
2541         struct s1 {int (*f) (int a);};
2542         struct s2 {int (*f) (double a);};
2543   ;
2544   return 0;
2545 }
2546 _ACEOF
2547 rm -f conftest.$ac_objext
2548 if { (eval echo "$as_me:2548: \"$ac_compile\"") >&5
2549   (eval $ac_compile) 2>&5
2550   ac_status=$?
2551   echo "$as_me:2551: \$? = $ac_status" >&5
2552   (exit $ac_status); } &&
2553          { ac_try='test -s conftest.$ac_objext'
2554   { (eval echo "$as_me:2554: \"$ac_try\"") >&5
2555   (eval $ac_try) 2>&5
2556   ac_status=$?
2557   echo "$as_me:2557: \$? = $ac_status" >&5
2558   (exit $ac_status); }; }; then
2559   cf_cv_ansi_cc="$cf_arg"; break
2560 else
2561   echo "$as_me: failed program was:" >&5
2562 cat conftest.$ac_ext >&5
2563 fi
2564 rm -f conftest.$ac_objext conftest.$ac_ext
2565 done
2566 CFLAGS="$cf_save_CFLAGS"
2567 CPPFLAGS="$cf_save_CPPFLAGS"
2568
2569 fi
2570 echo "$as_me:2570: result: $cf_cv_ansi_cc" >&5
2571 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2572
2573 if test "$cf_cv_ansi_cc" != "no"; then
2574 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2575
2576 cf_fix_cppflags=no
2577 cf_new_cflags=
2578 cf_new_cppflags=
2579 cf_new_extra_cppflags=
2580
2581 for cf_add_cflags in $cf_cv_ansi_cc
2582 do
2583 case $cf_fix_cppflags in
2584 no)
2585         case $cf_add_cflags in #(vi
2586         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2587                 case $cf_add_cflags in
2588                 -D*)
2589                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2590
2591                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2592                                 && test -z "${cf_tst_cflags}" \
2593                                 && cf_fix_cppflags=yes
2594
2595                         if test $cf_fix_cppflags = yes ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         elif test "${cf_tst_cflags}" = "\"'" ; then
2599                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2600                                 continue
2601                         fi
2602                         ;;
2603                 esac
2604                 case "$CPPFLAGS" in
2605                 *$cf_add_cflags) #(vi
2606                         ;;
2607                 *) #(vi
2608                         case $cf_add_cflags in #(vi
2609                         -D*)
2610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2611
2612 CPPFLAGS=`echo "$CPPFLAGS" | \
2613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2615
2616                                 ;;
2617                         esac
2618                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2619                         ;;
2620                 esac
2621                 ;;
2622         *)
2623                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2624                 ;;
2625         esac
2626         ;;
2627 yes)
2628         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2629
2630         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2631
2632         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2633                 && test -z "${cf_tst_cflags}" \
2634                 && cf_fix_cppflags=no
2635         ;;
2636 esac
2637 done
2638
2639 if test -n "$cf_new_cflags" ; then
2640
2641         CFLAGS="$CFLAGS $cf_new_cflags"
2642 fi
2643
2644 if test -n "$cf_new_cppflags" ; then
2645
2646         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2647 fi
2648
2649 if test -n "$cf_new_extra_cppflags" ; then
2650
2651         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2652 fi
2653
2654 else
2655         cat >>confdefs.h <<\EOF
2656 #define CC_HAS_PROTOS 1
2657 EOF
2658
2659 fi
2660 fi
2661
2662 if test "$cf_cv_ansi_cc" = "no"; then
2663         { { echo "$as_me:2663: error: Your compiler does not appear to recognize prototypes.
2664 You have the following choices:
2665         a. adjust your compiler options
2666         b. get an up-to-date compiler
2667         c. use a wrapper such as unproto" >&5
2668 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2669 You have the following choices:
2670         a. adjust your compiler options
2671         b. get an up-to-date compiler
2672         c. use a wrapper such as unproto" >&2;}
2673    { (exit 1); exit 1; }; }
2674 fi
2675
2676 case $cf_cv_system_name in
2677 os2*)
2678     CFLAGS="$CFLAGS -Zmt"
2679     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2680     CXXFLAGS="$CXXFLAGS -Zmt"
2681     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2682     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2683     ac_cv_exeext=.exe
2684     ;;
2685 esac
2686
2687 PROG_EXT="$EXEEXT"
2688
2689 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2690 #define PROG_EXT "$PROG_EXT"
2691 EOF
2692
2693 if test "$cross_compiling" = yes ; then
2694   LDCONFIG=:
2695 else
2696 case "$cf_cv_system_name" in #(vi
2697 dragonfly*|freebsd*) #(vi
2698   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2699   ;;
2700 *) LDPATH=$PATH:/sbin:/usr/sbin
2701   # Extract the first word of "ldconfig", so it can be a program name with args.
2702 set dummy ldconfig; ac_word=$2
2703 echo "$as_me:2703: checking for $ac_word" >&5
2704 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2705 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2706   echo $ECHO_N "(cached) $ECHO_C" >&6
2707 else
2708   case $LDCONFIG in
2709   [\\/]* | ?:[\\/]*)
2710   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2711   ;;
2712   *)
2713   ac_save_IFS=$IFS; IFS=$ac_path_separator
2714 ac_dummy="$LDPATH"
2715 for ac_dir in $ac_dummy; do
2716   IFS=$ac_save_IFS
2717   test -z "$ac_dir" && ac_dir=.
2718   if $as_executable_p "$ac_dir/$ac_word"; then
2719    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2720    echo "$as_me:2720: found $ac_dir/$ac_word" >&5
2721    break
2722 fi
2723 done
2724
2725   ;;
2726 esac
2727 fi
2728 LDCONFIG=$ac_cv_path_LDCONFIG
2729
2730 if test -n "$LDCONFIG"; then
2731   echo "$as_me:2731: result: $LDCONFIG" >&5
2732 echo "${ECHO_T}$LDCONFIG" >&6
2733 else
2734   echo "$as_me:2734: result: no" >&5
2735 echo "${ECHO_T}no" >&6
2736 fi
2737
2738   ;;
2739 esac
2740 fi
2741
2742 echo "$as_me:2742: checking if you want to ensure bool is consistent with C++" >&5
2743 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2744
2745 # Check whether --with-cxx or --without-cxx was given.
2746 if test "${with_cxx+set}" = set; then
2747   withval="$with_cxx"
2748   cf_with_cxx=$withval
2749 else
2750   cf_with_cxx=yes
2751 fi;
2752 echo "$as_me:2752: result: $cf_with_cxx" >&5
2753 echo "${ECHO_T}$cf_with_cxx" >&6
2754 if test "X$cf_with_cxx" = Xno ; then
2755         CXX=""
2756         GXX=""
2757 else
2758         # with autoconf 2.13, we can change the error to a warning:
2759                 ac_ext=cc
2760 ac_cpp='$CXXCPP $CPPFLAGS'
2761 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2762 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2763 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2764 ac_main_return=return
2765 if test -n "$ac_tool_prefix"; then
2766   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2767   do
2768     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2769 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2770 echo "$as_me:2770: checking for $ac_word" >&5
2771 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2772 if test "${ac_cv_prog_CXX+set}" = set; then
2773   echo $ECHO_N "(cached) $ECHO_C" >&6
2774 else
2775   if test -n "$CXX"; then
2776   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2777 else
2778   ac_save_IFS=$IFS; IFS=$ac_path_separator
2779 ac_dummy="$PATH"
2780 for ac_dir in $ac_dummy; do
2781   IFS=$ac_save_IFS
2782   test -z "$ac_dir" && ac_dir=.
2783   $as_executable_p "$ac_dir/$ac_word" || continue
2784 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2785 echo "$as_me:2785: found $ac_dir/$ac_word" >&5
2786 break
2787 done
2788
2789 fi
2790 fi
2791 CXX=$ac_cv_prog_CXX
2792 if test -n "$CXX"; then
2793   echo "$as_me:2793: result: $CXX" >&5
2794 echo "${ECHO_T}$CXX" >&6
2795 else
2796   echo "$as_me:2796: result: no" >&5
2797 echo "${ECHO_T}no" >&6
2798 fi
2799
2800     test -n "$CXX" && break
2801   done
2802 fi
2803 if test -z "$CXX"; then
2804   ac_ct_CXX=$CXX
2805   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2806 do
2807   # Extract the first word of "$ac_prog", so it can be a program name with args.
2808 set dummy $ac_prog; ac_word=$2
2809 echo "$as_me:2809: checking for $ac_word" >&5
2810 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2811 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2812   echo $ECHO_N "(cached) $ECHO_C" >&6
2813 else
2814   if test -n "$ac_ct_CXX"; then
2815   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2816 else
2817   ac_save_IFS=$IFS; IFS=$ac_path_separator
2818 ac_dummy="$PATH"
2819 for ac_dir in $ac_dummy; do
2820   IFS=$ac_save_IFS
2821   test -z "$ac_dir" && ac_dir=.
2822   $as_executable_p "$ac_dir/$ac_word" || continue
2823 ac_cv_prog_ac_ct_CXX="$ac_prog"
2824 echo "$as_me:2824: found $ac_dir/$ac_word" >&5
2825 break
2826 done
2827
2828 fi
2829 fi
2830 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2831 if test -n "$ac_ct_CXX"; then
2832   echo "$as_me:2832: result: $ac_ct_CXX" >&5
2833 echo "${ECHO_T}$ac_ct_CXX" >&6
2834 else
2835   echo "$as_me:2835: result: no" >&5
2836 echo "${ECHO_T}no" >&6
2837 fi
2838
2839   test -n "$ac_ct_CXX" && break
2840 done
2841 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2842
2843   CXX=$ac_ct_CXX
2844 fi
2845
2846 # Provide some information about the compiler.
2847 echo "$as_me:2847:" \
2848      "checking for C++ compiler version" >&5
2849 ac_compiler=`set X $ac_compile; echo $2`
2850 { (eval echo "$as_me:2850: \"$ac_compiler --version </dev/null >&5\"") >&5
2851   (eval $ac_compiler --version </dev/null >&5) 2>&5
2852   ac_status=$?
2853   echo "$as_me:2853: \$? = $ac_status" >&5
2854   (exit $ac_status); }
2855 { (eval echo "$as_me:2855: \"$ac_compiler -v </dev/null >&5\"") >&5
2856   (eval $ac_compiler -v </dev/null >&5) 2>&5
2857   ac_status=$?
2858   echo "$as_me:2858: \$? = $ac_status" >&5
2859   (exit $ac_status); }
2860 { (eval echo "$as_me:2860: \"$ac_compiler -V </dev/null >&5\"") >&5
2861   (eval $ac_compiler -V </dev/null >&5) 2>&5
2862   ac_status=$?
2863   echo "$as_me:2863: \$? = $ac_status" >&5
2864   (exit $ac_status); }
2865
2866 echo "$as_me:2866: checking whether we are using the GNU C++ compiler" >&5
2867 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2868 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2869   echo $ECHO_N "(cached) $ECHO_C" >&6
2870 else
2871   cat >conftest.$ac_ext <<_ACEOF
2872 #line 2872 "configure"
2873 #include "confdefs.h"
2874
2875 int
2876 main ()
2877 {
2878 #ifndef __GNUC__
2879        choke me
2880 #endif
2881
2882   ;
2883   return 0;
2884 }
2885 _ACEOF
2886 rm -f conftest.$ac_objext
2887 if { (eval echo "$as_me:2887: \"$ac_compile\"") >&5
2888   (eval $ac_compile) 2>&5
2889   ac_status=$?
2890   echo "$as_me:2890: \$? = $ac_status" >&5
2891   (exit $ac_status); } &&
2892          { ac_try='test -s conftest.$ac_objext'
2893   { (eval echo "$as_me:2893: \"$ac_try\"") >&5
2894   (eval $ac_try) 2>&5
2895   ac_status=$?
2896   echo "$as_me:2896: \$? = $ac_status" >&5
2897   (exit $ac_status); }; }; then
2898   ac_compiler_gnu=yes
2899 else
2900   echo "$as_me: failed program was:" >&5
2901 cat conftest.$ac_ext >&5
2902 ac_compiler_gnu=no
2903 fi
2904 rm -f conftest.$ac_objext conftest.$ac_ext
2905 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2906
2907 fi
2908 echo "$as_me:2908: result: $ac_cv_cxx_compiler_gnu" >&5
2909 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2910 GXX=`test $ac_compiler_gnu = yes && echo yes`
2911 ac_test_CXXFLAGS=${CXXFLAGS+set}
2912 ac_save_CXXFLAGS=$CXXFLAGS
2913 CXXFLAGS="-g"
2914 echo "$as_me:2914: checking whether $CXX accepts -g" >&5
2915 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2916 if test "${ac_cv_prog_cxx_g+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   cat >conftest.$ac_ext <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922
2923 int
2924 main ()
2925 {
2926
2927   ;
2928   return 0;
2929 }
2930 _ACEOF
2931 rm -f conftest.$ac_objext
2932 if { (eval echo "$as_me:2932: \"$ac_compile\"") >&5
2933   (eval $ac_compile) 2>&5
2934   ac_status=$?
2935   echo "$as_me:2935: \$? = $ac_status" >&5
2936   (exit $ac_status); } &&
2937          { ac_try='test -s conftest.$ac_objext'
2938   { (eval echo "$as_me:2938: \"$ac_try\"") >&5
2939   (eval $ac_try) 2>&5
2940   ac_status=$?
2941   echo "$as_me:2941: \$? = $ac_status" >&5
2942   (exit $ac_status); }; }; then
2943   ac_cv_prog_cxx_g=yes
2944 else
2945   echo "$as_me: failed program was:" >&5
2946 cat conftest.$ac_ext >&5
2947 ac_cv_prog_cxx_g=no
2948 fi
2949 rm -f conftest.$ac_objext conftest.$ac_ext
2950 fi
2951 echo "$as_me:2951: result: $ac_cv_prog_cxx_g" >&5
2952 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2953 if test "$ac_test_CXXFLAGS" = set; then
2954   CXXFLAGS=$ac_save_CXXFLAGS
2955 elif test $ac_cv_prog_cxx_g = yes; then
2956   if test "$GXX" = yes; then
2957     CXXFLAGS="-g -O2"
2958   else
2959     CXXFLAGS="-g"
2960   fi
2961 else
2962   if test "$GXX" = yes; then
2963     CXXFLAGS="-O2"
2964   else
2965     CXXFLAGS=
2966   fi
2967 fi
2968 for ac_declaration in \
2969    ''\
2970    '#include <stdlib.h>' \
2971    'extern "C" void std::exit (int) throw (); using std::exit;' \
2972    'extern "C" void std::exit (int); using std::exit;' \
2973    'extern "C" void exit (int) throw ();' \
2974    'extern "C" void exit (int);' \
2975    'void exit (int);'
2976 do
2977   cat >conftest.$ac_ext <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <stdlib.h>
2981 $ac_declaration
2982 int
2983 main ()
2984 {
2985 exit (42);
2986   ;
2987   return 0;
2988 }
2989 _ACEOF
2990 rm -f conftest.$ac_objext
2991 if { (eval echo "$as_me:2991: \"$ac_compile\"") >&5
2992   (eval $ac_compile) 2>&5
2993   ac_status=$?
2994   echo "$as_me:2994: \$? = $ac_status" >&5
2995   (exit $ac_status); } &&
2996          { ac_try='test -s conftest.$ac_objext'
2997   { (eval echo "$as_me:2997: \"$ac_try\"") >&5
2998   (eval $ac_try) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); }; }; then
3002   :
3003 else
3004   echo "$as_me: failed program was:" >&5
3005 cat conftest.$ac_ext >&5
3006 continue
3007 fi
3008 rm -f conftest.$ac_objext conftest.$ac_ext
3009   cat >conftest.$ac_ext <<_ACEOF
3010 #line 3010 "configure"
3011 #include "confdefs.h"
3012 $ac_declaration
3013 int
3014 main ()
3015 {
3016 exit (42);
3017   ;
3018   return 0;
3019 }
3020 _ACEOF
3021 rm -f conftest.$ac_objext
3022 if { (eval echo "$as_me:3022: \"$ac_compile\"") >&5
3023   (eval $ac_compile) 2>&5
3024   ac_status=$?
3025   echo "$as_me:3025: \$? = $ac_status" >&5
3026   (exit $ac_status); } &&
3027          { ac_try='test -s conftest.$ac_objext'
3028   { (eval echo "$as_me:3028: \"$ac_try\"") >&5
3029   (eval $ac_try) 2>&5
3030   ac_status=$?
3031   echo "$as_me:3031: \$? = $ac_status" >&5
3032   (exit $ac_status); }; }; then
3033   break
3034 else
3035   echo "$as_me: failed program was:" >&5
3036 cat conftest.$ac_ext >&5
3037 fi
3038 rm -f conftest.$ac_objext conftest.$ac_ext
3039 done
3040 rm -f conftest*
3041 if test -n "$ac_declaration"; then
3042   echo '#ifdef __cplusplus' >>confdefs.h
3043   echo $ac_declaration      >>confdefs.h
3044   echo '#endif'             >>confdefs.h
3045 fi
3046
3047 ac_ext=c
3048 ac_cpp='$CPP $CPPFLAGS'
3049 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3050 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3051 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3052 ac_main_return=return
3053
3054                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3055         if test "$CXX" = "g++" ; then
3056                 # Extract the first word of "g++", so it can be a program name with args.
3057 set dummy g++; ac_word=$2
3058 echo "$as_me:3058: checking for $ac_word" >&5
3059 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3060 if test "${ac_cv_path_CXX+set}" = set; then
3061   echo $ECHO_N "(cached) $ECHO_C" >&6
3062 else
3063   case $CXX in
3064   [\\/]* | ?:[\\/]*)
3065   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3066   ;;
3067   *)
3068   ac_save_IFS=$IFS; IFS=$ac_path_separator
3069 ac_dummy="$PATH"
3070 for ac_dir in $ac_dummy; do
3071   IFS=$ac_save_IFS
3072   test -z "$ac_dir" && ac_dir=.
3073   if $as_executable_p "$ac_dir/$ac_word"; then
3074    ac_cv_path_CXX="$ac_dir/$ac_word"
3075    echo "$as_me:3075: found $ac_dir/$ac_word" >&5
3076    break
3077 fi
3078 done
3079
3080   ;;
3081 esac
3082 fi
3083 CXX=$ac_cv_path_CXX
3084
3085 if test -n "$CXX"; then
3086   echo "$as_me:3086: result: $CXX" >&5
3087 echo "${ECHO_T}$CXX" >&6
3088 else
3089   echo "$as_me:3089: result: no" >&5
3090 echo "${ECHO_T}no" >&6
3091 fi
3092
3093         fi
3094         if test "$CXX" = "g++" ; then
3095                 { echo "$as_me:3095: WARNING: ignoring hardcoded g++" >&5
3096 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3097                 cf_with_cxx=no; CXX=""; GXX="";
3098         fi
3099 fi
3100
3101 GXX_VERSION=none
3102 if test "$GXX" = yes; then
3103         echo "$as_me:3103: checking version of g++" >&5
3104 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3105         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3106         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3107         echo "$as_me:3107: result: $GXX_VERSION" >&5
3108 echo "${ECHO_T}$GXX_VERSION" >&6
3109 fi
3110
3111 case $GXX_VERSION in
3112 1*|2.[0-6]*)
3113         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3114         # cf_cxx_library=no
3115         { echo "$as_me:3115: WARNING: templates do not work" >&5
3116 echo "$as_me: WARNING: templates do not work" >&2;}
3117         ;;
3118 esac
3119
3120 echo "$as_me:3120: checking if you want to build C++ binding and demo" >&5
3121 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3122
3123 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3124 if test "${with_cxx_binding+set}" = set; then
3125   withval="$with_cxx_binding"
3126   cf_with_cxx_binding=$withval
3127 else
3128   cf_with_cxx_binding=$cf_with_cxx
3129 fi;
3130 echo "$as_me:3130: result: $cf_with_cxx_binding" >&5
3131 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3132
3133 echo "$as_me:3133: checking if you want to build with Ada95" >&5
3134 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3135
3136 # Check whether --with-ada or --without-ada was given.
3137 if test "${with_ada+set}" = set; then
3138   withval="$with_ada"
3139   cf_with_ada=$withval
3140 else
3141   cf_with_ada=yes
3142 fi;
3143 echo "$as_me:3143: result: $cf_with_ada" >&5
3144 echo "${ECHO_T}$cf_with_ada" >&6
3145
3146 echo "$as_me:3146: checking if you want to install manpages" >&5
3147 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3148
3149 # Check whether --with-manpages or --without-manpages was given.
3150 if test "${with_manpages+set}" = set; then
3151   withval="$with_manpages"
3152   cf_with_manpages=$withval
3153 else
3154   cf_with_manpages=yes
3155 fi;
3156 echo "$as_me:3156: result: $cf_with_manpages" >&5
3157 echo "${ECHO_T}$cf_with_manpages" >&6
3158
3159 echo "$as_me:3159: checking if you want to build programs such as tic" >&5
3160 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3161
3162 # Check whether --with-progs or --without-progs was given.
3163 if test "${with_progs+set}" = set; then
3164   withval="$with_progs"
3165   cf_with_progs=$withval
3166 else
3167   cf_with_progs=yes
3168 fi;
3169 echo "$as_me:3169: result: $cf_with_progs" >&5
3170 echo "${ECHO_T}$cf_with_progs" >&6
3171
3172 echo "$as_me:3172: checking if you wish to install curses.h" >&5
3173 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3174
3175 # Check whether --with-curses-h or --without-curses-h was given.
3176 if test "${with_curses_h+set}" = set; then
3177   withval="$with_curses_h"
3178   with_curses_h=$withval
3179 else
3180   with_curses_h=yes
3181 fi;
3182 echo "$as_me:3182: result: $with_curses_h" >&5
3183 echo "${ECHO_T}$with_curses_h" >&6
3184
3185 modules_to_build="ncurses"
3186 if test "X$cf_with_progs" != Xno ; then
3187 modules_to_build="$modules_to_build progs tack"
3188 fi
3189 modules_to_build="$modules_to_build panel menu form"
3190
3191 test "$program_prefix" != NONE &&
3192   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3193 # Use a double $ so make ignores it.
3194 test "$program_suffix" != NONE &&
3195   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3196 # Double any \ or $.  echo might interpret backslashes.
3197 # By default was `s,x,x', remove it if useless.
3198 cat <<\_ACEOF >conftest.sed
3199 s/[\\$]/&&/g;s/;s,x,x,$//
3200 _ACEOF
3201 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3202 rm conftest.sed
3203
3204 for ac_prog in mawk gawk nawk awk
3205 do
3206   # Extract the first word of "$ac_prog", so it can be a program name with args.
3207 set dummy $ac_prog; ac_word=$2
3208 echo "$as_me:3208: checking for $ac_word" >&5
3209 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3210 if test "${ac_cv_prog_AWK+set}" = set; then
3211   echo $ECHO_N "(cached) $ECHO_C" >&6
3212 else
3213   if test -n "$AWK"; then
3214   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3215 else
3216   ac_save_IFS=$IFS; IFS=$ac_path_separator
3217 ac_dummy="$PATH"
3218 for ac_dir in $ac_dummy; do
3219   IFS=$ac_save_IFS
3220   test -z "$ac_dir" && ac_dir=.
3221   $as_executable_p "$ac_dir/$ac_word" || continue
3222 ac_cv_prog_AWK="$ac_prog"
3223 echo "$as_me:3223: found $ac_dir/$ac_word" >&5
3224 break
3225 done
3226
3227 fi
3228 fi
3229 AWK=$ac_cv_prog_AWK
3230 if test -n "$AWK"; then
3231   echo "$as_me:3231: result: $AWK" >&5
3232 echo "${ECHO_T}$AWK" >&6
3233 else
3234   echo "$as_me:3234: result: no" >&5
3235 echo "${ECHO_T}no" >&6
3236 fi
3237
3238   test -n "$AWK" && break
3239 done
3240
3241 test -z "$AWK" && { { echo "$as_me:3241: error: No awk program found" >&5
3242 echo "$as_me: error: No awk program found" >&2;}
3243    { (exit 1); exit 1; }; }
3244
3245 echo "$as_me:3245: checking for egrep" >&5
3246 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3247 if test "${ac_cv_prog_egrep+set}" = set; then
3248   echo $ECHO_N "(cached) $ECHO_C" >&6
3249 else
3250   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3251     then ac_cv_prog_egrep='grep -E'
3252     else ac_cv_prog_egrep='egrep'
3253     fi
3254 fi
3255 echo "$as_me:3255: result: $ac_cv_prog_egrep" >&5
3256 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3257  EGREP=$ac_cv_prog_egrep
3258
3259 test -z "$EGREP" && { { echo "$as_me:3259: error: No egrep program found" >&5
3260 echo "$as_me: error: No egrep program found" >&2;}
3261    { (exit 1); exit 1; }; }
3262
3263 # Find a good install program.  We prefer a C program (faster),
3264 # so one script is as good as another.  But avoid the broken or
3265 # incompatible versions:
3266 # SysV /etc/install, /usr/sbin/install
3267 # SunOS /usr/etc/install
3268 # IRIX /sbin/install
3269 # AIX /bin/install
3270 # AmigaOS /C/install, which installs bootblocks on floppy discs
3271 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3272 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3273 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3274 # ./install, which can be erroneously created by make from ./install.sh.
3275 echo "$as_me:3275: checking for a BSD compatible install" >&5
3276 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3277 if test -z "$INSTALL"; then
3278 if test "${ac_cv_path_install+set}" = set; then
3279   echo $ECHO_N "(cached) $ECHO_C" >&6
3280 else
3281     ac_save_IFS=$IFS; IFS=$ac_path_separator
3282   for ac_dir in $PATH; do
3283     IFS=$ac_save_IFS
3284     # Account for people who put trailing slashes in PATH elements.
3285     case $ac_dir/ in
3286     / | ./ | .// | /cC/* \
3287     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3288     | /usr/ucb/* ) ;;
3289     *)
3290       # OSF1 and SCO ODT 3.0 have their own names for install.
3291       # Don't use installbsd from OSF since it installs stuff as root
3292       # by default.
3293       for ac_prog in ginstall scoinst install; do
3294         if $as_executable_p "$ac_dir/$ac_prog"; then
3295           if test $ac_prog = install &&
3296             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3297             # AIX install.  It has an incompatible calling convention.
3298             :
3299           elif test $ac_prog = install &&
3300             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3301             # program-specific install script used by HP pwplus--don't use.
3302             :
3303           else
3304             ac_cv_path_install="$ac_dir/$ac_prog -c"
3305             break 2
3306           fi
3307         fi
3308       done
3309       ;;
3310     esac
3311   done
3312
3313 fi
3314   if test "${ac_cv_path_install+set}" = set; then
3315     INSTALL=$ac_cv_path_install
3316   else
3317     # As a last resort, use the slow shell script.  We don't cache a
3318     # path for INSTALL within a source directory, because that will
3319     # break other packages using the cache if that directory is
3320     # removed, or if the path is relative.
3321     INSTALL=$ac_install_sh
3322   fi
3323 fi
3324 echo "$as_me:3324: result: $INSTALL" >&5
3325 echo "${ECHO_T}$INSTALL" >&6
3326
3327 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3328 # It thinks the first close brace ends the variable substitution.
3329 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3330
3331 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3332
3333 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3334
3335 case $INSTALL in
3336 /*)
3337   ;;
3338 *)
3339   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3340   test -z "$cf_dir" && cf_dir=.
3341   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3342   ;;
3343 esac
3344
3345 for ac_prog in tdlint lint alint splint lclint
3346 do
3347   # Extract the first word of "$ac_prog", so it can be a program name with args.
3348 set dummy $ac_prog; ac_word=$2
3349 echo "$as_me:3349: checking for $ac_word" >&5
3350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3351 if test "${ac_cv_prog_LINT+set}" = set; then
3352   echo $ECHO_N "(cached) $ECHO_C" >&6
3353 else
3354   if test -n "$LINT"; then
3355   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3356 else
3357   ac_save_IFS=$IFS; IFS=$ac_path_separator
3358 ac_dummy="$PATH"
3359 for ac_dir in $ac_dummy; do
3360   IFS=$ac_save_IFS
3361   test -z "$ac_dir" && ac_dir=.
3362   $as_executable_p "$ac_dir/$ac_word" || continue
3363 ac_cv_prog_LINT="$ac_prog"
3364 echo "$as_me:3364: found $ac_dir/$ac_word" >&5
3365 break
3366 done
3367
3368 fi
3369 fi
3370 LINT=$ac_cv_prog_LINT
3371 if test -n "$LINT"; then
3372   echo "$as_me:3372: result: $LINT" >&5
3373 echo "${ECHO_T}$LINT" >&6
3374 else
3375   echo "$as_me:3375: result: no" >&5
3376 echo "${ECHO_T}no" >&6
3377 fi
3378
3379   test -n "$LINT" && break
3380 done
3381
3382 echo "$as_me:3382: checking whether ln -s works" >&5
3383 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3384 LN_S=$as_ln_s
3385 if test "$LN_S" = "ln -s"; then
3386   echo "$as_me:3386: result: yes" >&5
3387 echo "${ECHO_T}yes" >&6
3388 else
3389   echo "$as_me:3389: result: no, using $LN_S" >&5
3390 echo "${ECHO_T}no, using $LN_S" >&6
3391 fi
3392
3393 echo "$as_me:3393: checking for long file names" >&5
3394 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3395 if test "${ac_cv_sys_long_file_names+set}" = set; then
3396   echo $ECHO_N "(cached) $ECHO_C" >&6
3397 else
3398   ac_cv_sys_long_file_names=yes
3399 # Test for long file names in all the places we know might matter:
3400 #      .                the current directory, where building will happen
3401 #      $prefix/lib      where we will be installing things
3402 #      $exec_prefix/lib likewise
3403 # eval it to expand exec_prefix.
3404 #      $TMPDIR          if set, where it might want to write temporary files
3405 # if $TMPDIR is not set:
3406 #      /tmp             where it might want to write temporary files
3407 #      /var/tmp         likewise
3408 #      /usr/tmp         likewise
3409 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3410   ac_tmpdirs=$TMPDIR
3411 else
3412   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3413 fi
3414 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3415   test -d $ac_dir || continue
3416   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3417   ac_xdir=$ac_dir/cf$$
3418   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3419   ac_tf1=$ac_xdir/conftest9012345
3420   ac_tf2=$ac_xdir/conftest9012346
3421   (echo 1 >$ac_tf1) 2>/dev/null
3422   (echo 2 >$ac_tf2) 2>/dev/null
3423   ac_val=`cat $ac_tf1 2>/dev/null`
3424   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3425     ac_cv_sys_long_file_names=no
3426     rm -rf $ac_xdir 2>/dev/null
3427     break
3428   fi
3429   rm -rf $ac_xdir 2>/dev/null
3430 done
3431 fi
3432 echo "$as_me:3432: result: $ac_cv_sys_long_file_names" >&5
3433 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3434 if test $ac_cv_sys_long_file_names = yes; then
3435
3436 cat >>confdefs.h <<\EOF
3437 #define HAVE_LONG_FILE_NAMES 1
3438 EOF
3439
3440 fi
3441
3442 # if we find pkg-config, check if we should install the ".pc" files.
3443
3444 echo "$as_me:3444: checking if you want to use pkg-config" >&5
3445 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3446
3447 # Check whether --with-pkg-config or --without-pkg-config was given.
3448 if test "${with_pkg_config+set}" = set; then
3449   withval="$with_pkg_config"
3450   cf_pkg_config=$withval
3451 else
3452   cf_pkg_config=yes
3453 fi;
3454 echo "$as_me:3454: result: $cf_pkg_config" >&5
3455 echo "${ECHO_T}$cf_pkg_config" >&6
3456
3457 case $cf_pkg_config in #(vi
3458 no) #(vi
3459         PKG_CONFIG=none
3460         ;;
3461 yes) #(vi
3462         # Extract the first word of "pkg-config", so it can be a program name with args.
3463 set dummy pkg-config; ac_word=$2
3464 echo "$as_me:3464: checking for $ac_word" >&5
3465 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3466 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3467   echo $ECHO_N "(cached) $ECHO_C" >&6
3468 else
3469   case $PKG_CONFIG in
3470   [\\/]* | ?:[\\/]*)
3471   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3472   ;;
3473   *)
3474   ac_save_IFS=$IFS; IFS=$ac_path_separator
3475 ac_dummy="$PATH"
3476 for ac_dir in $ac_dummy; do
3477   IFS=$ac_save_IFS
3478   test -z "$ac_dir" && ac_dir=.
3479   if $as_executable_p "$ac_dir/$ac_word"; then
3480    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3481    echo "$as_me:3481: found $ac_dir/$ac_word" >&5
3482    break
3483 fi
3484 done
3485
3486   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3487   ;;
3488 esac
3489 fi
3490 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3491
3492 if test -n "$PKG_CONFIG"; then
3493   echo "$as_me:3493: result: $PKG_CONFIG" >&5
3494 echo "${ECHO_T}$PKG_CONFIG" >&6
3495 else
3496   echo "$as_me:3496: result: no" >&5
3497 echo "${ECHO_T}no" >&6
3498 fi
3499
3500         ;;
3501 *)
3502         PKG_CONFIG=$withval
3503         ;;
3504 esac
3505
3506 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3507 if test "$PKG_CONFIG" != none ; then
3508
3509 if test "x$prefix" != xNONE; then
3510   cf_path_syntax="$prefix"
3511 else
3512   cf_path_syntax="$ac_default_prefix"
3513 fi
3514
3515 case ".$PKG_CONFIG" in #(vi
3516 .\$\(*\)*|.\'*\'*) #(vi
3517   ;;
3518 ..|./*|.\\*) #(vi
3519   ;;
3520 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3521   ;;
3522 .\${*prefix}*) #(vi
3523   eval PKG_CONFIG="$PKG_CONFIG"
3524   case ".$PKG_CONFIG" in #(vi
3525   .NONE/*)
3526     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3527     ;;
3528   esac
3529   ;; #(vi
3530 .no|.NONE/*)
3531   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3532   ;;
3533 *)
3534   { { echo "$as_me:3534: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3535 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3536    { (exit 1); exit 1; }; }
3537   ;;
3538 esac
3539
3540 fi
3541
3542 if test "$PKG_CONFIG" != no ; then
3543         echo "$as_me:3543: checking if we should install .pc files for $PKG_CONFIG" >&5
3544 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3545
3546         # Leave this as something that can be overridden in the environment.
3547         if test -z "$PKG_CONFIG_LIBDIR" ; then
3548                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3549         fi
3550         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3551         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3552
3553 # Check whether --enable-pc-files or --disable-pc-files was given.
3554 if test "${enable_pc_files+set}" = set; then
3555   enableval="$enable_pc_files"
3556   enable_pc_files=$enableval
3557 else
3558   enable_pc_files=no
3559 fi;
3560                 echo "$as_me:3560: result: $enable_pc_files" >&5
3561 echo "${ECHO_T}$enable_pc_files" >&6
3562         else
3563                 echo "$as_me:3563: result: no" >&5
3564 echo "${ECHO_T}no" >&6
3565                 { echo "$as_me:3565: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3566 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3567                 enable_pc_files=no
3568         fi
3569 fi
3570
3571 echo "$as_me:3571: checking if we should assume mixed-case filenames" >&5
3572 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3573
3574 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3575 if test "${enable_mixed_case+set}" = set; then
3576   enableval="$enable_mixed_case"
3577   enable_mixedcase=$enableval
3578 else
3579   enable_mixedcase=auto
3580 fi;
3581 echo "$as_me:3581: result: $enable_mixedcase" >&5
3582 echo "${ECHO_T}$enable_mixedcase" >&6
3583 if test "$enable_mixedcase" = "auto" ; then
3584
3585 echo "$as_me:3585: checking if filesystem supports mixed-case filenames" >&5
3586 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3587 if test "${cf_cv_mixedcase+set}" = set; then
3588   echo $ECHO_N "(cached) $ECHO_C" >&6
3589 else
3590
3591 if test "$cross_compiling" = yes ; then
3592         case $target_alias in #(vi
3593         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3594                 cf_cv_mixedcase=no
3595                 ;;
3596         *)
3597                 cf_cv_mixedcase=yes
3598                 ;;
3599         esac
3600 else
3601         rm -f conftest CONFTEST
3602         echo test >conftest
3603         if test -f CONFTEST ; then
3604                 cf_cv_mixedcase=no
3605         else
3606                 cf_cv_mixedcase=yes
3607         fi
3608         rm -f conftest CONFTEST
3609 fi
3610
3611 fi
3612 echo "$as_me:3612: result: $cf_cv_mixedcase" >&5
3613 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3614 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3615 #define MIXEDCASE_FILENAMES 1
3616 EOF
3617
3618 else
3619     cf_cv_mixedcase=$enable_mixedcase
3620     if test "$enable_mixedcase" = "yes" ; then
3621         cat >>confdefs.h <<\EOF
3622 #define MIXEDCASE_FILENAMES 1
3623 EOF
3624
3625     fi
3626 fi
3627
3628 # do this after mixed-case option (tags/TAGS is not as important as tic).
3629 echo "$as_me:3629: checking whether ${MAKE-make} sets \${MAKE}" >&5
3630 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3631 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3632 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3633   echo $ECHO_N "(cached) $ECHO_C" >&6
3634 else
3635   cat >conftest.make <<\EOF
3636 all:
3637         @echo 'ac_maketemp="${MAKE}"'
3638 EOF
3639 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3640 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3641 if test -n "$ac_maketemp"; then
3642   eval ac_cv_prog_make_${ac_make}_set=yes
3643 else
3644   eval ac_cv_prog_make_${ac_make}_set=no
3645 fi
3646 rm -f conftest.make
3647 fi
3648 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3649   echo "$as_me:3649: result: yes" >&5
3650 echo "${ECHO_T}yes" >&6
3651   SET_MAKE=
3652 else
3653   echo "$as_me:3653: result: no" >&5
3654 echo "${ECHO_T}no" >&6
3655   SET_MAKE="MAKE=${MAKE-make}"
3656 fi
3657
3658 for ac_prog in exctags ctags
3659 do
3660   # Extract the first word of "$ac_prog", so it can be a program name with args.
3661 set dummy $ac_prog; ac_word=$2
3662 echo "$as_me:3662: checking for $ac_word" >&5
3663 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3664 if test "${ac_cv_prog_CTAGS+set}" = set; then
3665   echo $ECHO_N "(cached) $ECHO_C" >&6
3666 else
3667   if test -n "$CTAGS"; then
3668   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3669 else
3670   ac_save_IFS=$IFS; IFS=$ac_path_separator
3671 ac_dummy="$PATH"
3672 for ac_dir in $ac_dummy; do
3673   IFS=$ac_save_IFS
3674   test -z "$ac_dir" && ac_dir=.
3675   $as_executable_p "$ac_dir/$ac_word" || continue
3676 ac_cv_prog_CTAGS="$ac_prog"
3677 echo "$as_me:3677: found $ac_dir/$ac_word" >&5
3678 break
3679 done
3680
3681 fi
3682 fi
3683 CTAGS=$ac_cv_prog_CTAGS
3684 if test -n "$CTAGS"; then
3685   echo "$as_me:3685: result: $CTAGS" >&5
3686 echo "${ECHO_T}$CTAGS" >&6
3687 else
3688   echo "$as_me:3688: result: no" >&5
3689 echo "${ECHO_T}no" >&6
3690 fi
3691
3692   test -n "$CTAGS" && break
3693 done
3694
3695 for ac_prog in exetags etags
3696 do
3697   # Extract the first word of "$ac_prog", so it can be a program name with args.
3698 set dummy $ac_prog; ac_word=$2
3699 echo "$as_me:3699: checking for $ac_word" >&5
3700 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3701 if test "${ac_cv_prog_ETAGS+set}" = set; then
3702   echo $ECHO_N "(cached) $ECHO_C" >&6
3703 else
3704   if test -n "$ETAGS"; then
3705   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3706 else
3707   ac_save_IFS=$IFS; IFS=$ac_path_separator
3708 ac_dummy="$PATH"
3709 for ac_dir in $ac_dummy; do
3710   IFS=$ac_save_IFS
3711   test -z "$ac_dir" && ac_dir=.
3712   $as_executable_p "$ac_dir/$ac_word" || continue
3713 ac_cv_prog_ETAGS="$ac_prog"
3714 echo "$as_me:3714: found $ac_dir/$ac_word" >&5
3715 break
3716 done
3717
3718 fi
3719 fi
3720 ETAGS=$ac_cv_prog_ETAGS
3721 if test -n "$ETAGS"; then
3722   echo "$as_me:3722: result: $ETAGS" >&5
3723 echo "${ECHO_T}$ETAGS" >&6
3724 else
3725   echo "$as_me:3725: result: no" >&5
3726 echo "${ECHO_T}no" >&6
3727 fi
3728
3729   test -n "$ETAGS" && break
3730 done
3731
3732 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3733 set dummy ${CTAGS-ctags}; ac_word=$2
3734 echo "$as_me:3734: checking for $ac_word" >&5
3735 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3736 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3737   echo $ECHO_N "(cached) $ECHO_C" >&6
3738 else
3739   if test -n "$MAKE_LOWER_TAGS"; then
3740   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3741 else
3742   ac_save_IFS=$IFS; IFS=$ac_path_separator
3743 ac_dummy="$PATH"
3744 for ac_dir in $ac_dummy; do
3745   IFS=$ac_save_IFS
3746   test -z "$ac_dir" && ac_dir=.
3747   $as_executable_p "$ac_dir/$ac_word" || continue
3748 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3749 echo "$as_me:3749: found $ac_dir/$ac_word" >&5
3750 break
3751 done
3752
3753   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3754 fi
3755 fi
3756 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3757 if test -n "$MAKE_LOWER_TAGS"; then
3758   echo "$as_me:3758: result: $MAKE_LOWER_TAGS" >&5
3759 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3760 else
3761   echo "$as_me:3761: result: no" >&5
3762 echo "${ECHO_T}no" >&6
3763 fi
3764
3765 if test "$cf_cv_mixedcase" = yes ; then
3766         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3767 set dummy ${ETAGS-etags}; ac_word=$2
3768 echo "$as_me:3768: checking for $ac_word" >&5
3769 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3770 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3771   echo $ECHO_N "(cached) $ECHO_C" >&6
3772 else
3773   if test -n "$MAKE_UPPER_TAGS"; then
3774   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3775 else
3776   ac_save_IFS=$IFS; IFS=$ac_path_separator
3777 ac_dummy="$PATH"
3778 for ac_dir in $ac_dummy; do
3779   IFS=$ac_save_IFS
3780   test -z "$ac_dir" && ac_dir=.
3781   $as_executable_p "$ac_dir/$ac_word" || continue
3782 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3783 echo "$as_me:3783: found $ac_dir/$ac_word" >&5
3784 break
3785 done
3786
3787   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3788 fi
3789 fi
3790 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3791 if test -n "$MAKE_UPPER_TAGS"; then
3792   echo "$as_me:3792: result: $MAKE_UPPER_TAGS" >&5
3793 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3794 else
3795   echo "$as_me:3795: result: no" >&5
3796 echo "${ECHO_T}no" >&6
3797 fi
3798
3799 else
3800         MAKE_UPPER_TAGS=no
3801 fi
3802
3803 if test "$MAKE_UPPER_TAGS" = yes ; then
3804         MAKE_UPPER_TAGS=
3805 else
3806         MAKE_UPPER_TAGS="#"
3807 fi
3808
3809 if test "$MAKE_LOWER_TAGS" = yes ; then
3810         MAKE_LOWER_TAGS=
3811 else
3812         MAKE_LOWER_TAGS="#"
3813 fi
3814
3815 echo "$as_me:3815: checking for makeflags variable" >&5
3816 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3817 if test "${cf_cv_makeflags+set}" = set; then
3818   echo $ECHO_N "(cached) $ECHO_C" >&6
3819 else
3820
3821         cf_cv_makeflags=''
3822         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3823         do
3824                 cat >cf_makeflags.tmp <<CF_EOF
3825 SHELL = /bin/sh
3826 all :
3827         @ echo '.$cf_option'
3828 CF_EOF
3829                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3830                 case "$cf_result" in
3831                 .*k)
3832                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3833                         case "$cf_result" in
3834                         .*CC=*) cf_cv_makeflags=
3835                                 ;;
3836                         *)      cf_cv_makeflags=$cf_option
3837                                 ;;
3838                         esac
3839                         break
3840                         ;;
3841                 .-)     ;;
3842                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3843                         ;;
3844                 esac
3845         done
3846         rm -f cf_makeflags.tmp
3847
3848 fi
3849 echo "$as_me:3849: result: $cf_cv_makeflags" >&5
3850 echo "${ECHO_T}$cf_cv_makeflags" >&6
3851
3852 if test -n "$ac_tool_prefix"; then
3853   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3854 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3855 echo "$as_me:3855: checking for $ac_word" >&5
3856 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3857 if test "${ac_cv_prog_RANLIB+set}" = set; then
3858   echo $ECHO_N "(cached) $ECHO_C" >&6
3859 else
3860   if test -n "$RANLIB"; then
3861   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3862 else
3863   ac_save_IFS=$IFS; IFS=$ac_path_separator
3864 ac_dummy="$PATH"
3865 for ac_dir in $ac_dummy; do
3866   IFS=$ac_save_IFS
3867   test -z "$ac_dir" && ac_dir=.
3868   $as_executable_p "$ac_dir/$ac_word" || continue
3869 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3870 echo "$as_me:3870: found $ac_dir/$ac_word" >&5
3871 break
3872 done
3873
3874 fi
3875 fi
3876 RANLIB=$ac_cv_prog_RANLIB
3877 if test -n "$RANLIB"; then
3878   echo "$as_me:3878: result: $RANLIB" >&5
3879 echo "${ECHO_T}$RANLIB" >&6
3880 else
3881   echo "$as_me:3881: result: no" >&5
3882 echo "${ECHO_T}no" >&6
3883 fi
3884
3885 fi
3886 if test -z "$ac_cv_prog_RANLIB"; then
3887   ac_ct_RANLIB=$RANLIB
3888   # Extract the first word of "ranlib", so it can be a program name with args.
3889 set dummy ranlib; ac_word=$2
3890 echo "$as_me:3890: checking for $ac_word" >&5
3891 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3892 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3893   echo $ECHO_N "(cached) $ECHO_C" >&6
3894 else
3895   if test -n "$ac_ct_RANLIB"; then
3896   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3897 else
3898   ac_save_IFS=$IFS; IFS=$ac_path_separator
3899 ac_dummy="$PATH"
3900 for ac_dir in $ac_dummy; do
3901   IFS=$ac_save_IFS
3902   test -z "$ac_dir" && ac_dir=.
3903   $as_executable_p "$ac_dir/$ac_word" || continue
3904 ac_cv_prog_ac_ct_RANLIB="ranlib"
3905 echo "$as_me:3905: found $ac_dir/$ac_word" >&5
3906 break
3907 done
3908
3909   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3910 fi
3911 fi
3912 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3913 if test -n "$ac_ct_RANLIB"; then
3914   echo "$as_me:3914: result: $ac_ct_RANLIB" >&5
3915 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3916 else
3917   echo "$as_me:3917: result: no" >&5
3918 echo "${ECHO_T}no" >&6
3919 fi
3920
3921   RANLIB=$ac_ct_RANLIB
3922 else
3923   RANLIB="$ac_cv_prog_RANLIB"
3924 fi
3925
3926 if test -n "$ac_tool_prefix"; then
3927   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3928 set dummy ${ac_tool_prefix}ld; ac_word=$2
3929 echo "$as_me:3929: checking for $ac_word" >&5
3930 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3931 if test "${ac_cv_prog_LD+set}" = set; then
3932   echo $ECHO_N "(cached) $ECHO_C" >&6
3933 else
3934   if test -n "$LD"; then
3935   ac_cv_prog_LD="$LD" # Let the user override the test.
3936 else
3937   ac_save_IFS=$IFS; IFS=$ac_path_separator
3938 ac_dummy="$PATH"
3939 for ac_dir in $ac_dummy; do
3940   IFS=$ac_save_IFS
3941   test -z "$ac_dir" && ac_dir=.
3942   $as_executable_p "$ac_dir/$ac_word" || continue
3943 ac_cv_prog_LD="${ac_tool_prefix}ld"
3944 echo "$as_me:3944: found $ac_dir/$ac_word" >&5
3945 break
3946 done
3947
3948 fi
3949 fi
3950 LD=$ac_cv_prog_LD
3951 if test -n "$LD"; then
3952   echo "$as_me:3952: result: $LD" >&5
3953 echo "${ECHO_T}$LD" >&6
3954 else
3955   echo "$as_me:3955: result: no" >&5
3956 echo "${ECHO_T}no" >&6
3957 fi
3958
3959 fi
3960 if test -z "$ac_cv_prog_LD"; then
3961   ac_ct_LD=$LD
3962   # Extract the first word of "ld", so it can be a program name with args.
3963 set dummy ld; ac_word=$2
3964 echo "$as_me:3964: checking for $ac_word" >&5
3965 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3966 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3967   echo $ECHO_N "(cached) $ECHO_C" >&6
3968 else
3969   if test -n "$ac_ct_LD"; then
3970   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3971 else
3972   ac_save_IFS=$IFS; IFS=$ac_path_separator
3973 ac_dummy="$PATH"
3974 for ac_dir in $ac_dummy; do
3975   IFS=$ac_save_IFS
3976   test -z "$ac_dir" && ac_dir=.
3977   $as_executable_p "$ac_dir/$ac_word" || continue
3978 ac_cv_prog_ac_ct_LD="ld"
3979 echo "$as_me:3979: found $ac_dir/$ac_word" >&5
3980 break
3981 done
3982
3983   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3984 fi
3985 fi
3986 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3987 if test -n "$ac_ct_LD"; then
3988   echo "$as_me:3988: result: $ac_ct_LD" >&5
3989 echo "${ECHO_T}$ac_ct_LD" >&6
3990 else
3991   echo "$as_me:3991: result: no" >&5
3992 echo "${ECHO_T}no" >&6
3993 fi
3994
3995   LD=$ac_ct_LD
3996 else
3997   LD="$ac_cv_prog_LD"
3998 fi
3999
4000 if test -n "$ac_tool_prefix"; then
4001   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4002 set dummy ${ac_tool_prefix}ar; ac_word=$2
4003 echo "$as_me:4003: checking for $ac_word" >&5
4004 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4005 if test "${ac_cv_prog_AR+set}" = set; then
4006   echo $ECHO_N "(cached) $ECHO_C" >&6
4007 else
4008   if test -n "$AR"; then
4009   ac_cv_prog_AR="$AR" # Let the user override the test.
4010 else
4011   ac_save_IFS=$IFS; IFS=$ac_path_separator
4012 ac_dummy="$PATH"
4013 for ac_dir in $ac_dummy; do
4014   IFS=$ac_save_IFS
4015   test -z "$ac_dir" && ac_dir=.
4016   $as_executable_p "$ac_dir/$ac_word" || continue
4017 ac_cv_prog_AR="${ac_tool_prefix}ar"
4018 echo "$as_me:4018: found $ac_dir/$ac_word" >&5
4019 break
4020 done
4021
4022 fi
4023 fi
4024 AR=$ac_cv_prog_AR
4025 if test -n "$AR"; then
4026   echo "$as_me:4026: result: $AR" >&5
4027 echo "${ECHO_T}$AR" >&6
4028 else
4029   echo "$as_me:4029: result: no" >&5
4030 echo "${ECHO_T}no" >&6
4031 fi
4032
4033 fi
4034 if test -z "$ac_cv_prog_AR"; then
4035   ac_ct_AR=$AR
4036   # Extract the first word of "ar", so it can be a program name with args.
4037 set dummy ar; ac_word=$2
4038 echo "$as_me:4038: checking for $ac_word" >&5
4039 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4040 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4041   echo $ECHO_N "(cached) $ECHO_C" >&6
4042 else
4043   if test -n "$ac_ct_AR"; then
4044   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4045 else
4046   ac_save_IFS=$IFS; IFS=$ac_path_separator
4047 ac_dummy="$PATH"
4048 for ac_dir in $ac_dummy; do
4049   IFS=$ac_save_IFS
4050   test -z "$ac_dir" && ac_dir=.
4051   $as_executable_p "$ac_dir/$ac_word" || continue
4052 ac_cv_prog_ac_ct_AR="ar"
4053 echo "$as_me:4053: found $ac_dir/$ac_word" >&5
4054 break
4055 done
4056
4057   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4058 fi
4059 fi
4060 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4061 if test -n "$ac_ct_AR"; then
4062   echo "$as_me:4062: result: $ac_ct_AR" >&5
4063 echo "${ECHO_T}$ac_ct_AR" >&6
4064 else
4065   echo "$as_me:4065: result: no" >&5
4066 echo "${ECHO_T}no" >&6
4067 fi
4068
4069   AR=$ac_ct_AR
4070 else
4071   AR="$ac_cv_prog_AR"
4072 fi
4073
4074 if test -n "$ac_tool_prefix"; then
4075   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4076 set dummy ${ac_tool_prefix}ar; ac_word=$2
4077 echo "$as_me:4077: checking for $ac_word" >&5
4078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4079 if test "${ac_cv_prog_AR+set}" = set; then
4080   echo $ECHO_N "(cached) $ECHO_C" >&6
4081 else
4082   if test -n "$AR"; then
4083   ac_cv_prog_AR="$AR" # Let the user override the test.
4084 else
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   $as_executable_p "$ac_dir/$ac_word" || continue
4091 ac_cv_prog_AR="${ac_tool_prefix}ar"
4092 echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093 break
4094 done
4095
4096 fi
4097 fi
4098 AR=$ac_cv_prog_AR
4099 if test -n "$AR"; then
4100   echo "$as_me:4100: result: $AR" >&5
4101 echo "${ECHO_T}$AR" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107 fi
4108 if test -z "$ac_cv_prog_AR"; then
4109   ac_ct_AR=$AR
4110   # Extract the first word of "ar", so it can be a program name with args.
4111 set dummy ar; ac_word=$2
4112 echo "$as_me:4112: checking for $ac_word" >&5
4113 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4114 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4115   echo $ECHO_N "(cached) $ECHO_C" >&6
4116 else
4117   if test -n "$ac_ct_AR"; then
4118   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4119 else
4120   ac_save_IFS=$IFS; IFS=$ac_path_separator
4121 ac_dummy="$PATH"
4122 for ac_dir in $ac_dummy; do
4123   IFS=$ac_save_IFS
4124   test -z "$ac_dir" && ac_dir=.
4125   $as_executable_p "$ac_dir/$ac_word" || continue
4126 ac_cv_prog_ac_ct_AR="ar"
4127 echo "$as_me:4127: found $ac_dir/$ac_word" >&5
4128 break
4129 done
4130
4131   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4132 fi
4133 fi
4134 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4135 if test -n "$ac_ct_AR"; then
4136   echo "$as_me:4136: result: $ac_ct_AR" >&5
4137 echo "${ECHO_T}$ac_ct_AR" >&6
4138 else
4139   echo "$as_me:4139: result: no" >&5
4140 echo "${ECHO_T}no" >&6
4141 fi
4142
4143   AR=$ac_ct_AR
4144 else
4145   AR="$ac_cv_prog_AR"
4146 fi
4147
4148 echo "$as_me:4148: checking for options to update archives" >&5
4149 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4150 if test "${cf_cv_ar_flags+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153
4154         cf_cv_ar_flags=unknown
4155         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4156         do
4157
4158                 # check if $ARFLAGS already contains this choice
4159                 if test "x$ARFLAGS" != "x" ; then
4160                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4161                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4162                                 cf_cv_ar_flags=
4163                                 break
4164                         fi
4165                 fi
4166
4167                 rm -f conftest.$ac_cv_objext
4168                 rm -f conftest.a
4169
4170                 cat >conftest.$ac_ext <<EOF
4171 #line 4171 "configure"
4172 int     testdata[3] = { 123, 456, 789 };
4173 EOF
4174                 if { (eval echo "$as_me:4174: \"$ac_compile\"") >&5
4175   (eval $ac_compile) 2>&5
4176   ac_status=$?
4177   echo "$as_me:4177: \$? = $ac_status" >&5
4178   (exit $ac_status); } ; then
4179                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4180                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4181                         if test -f conftest.a ; then
4182                                 cf_cv_ar_flags=$cf_ar_flags
4183                                 break
4184                         fi
4185                 else
4186                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4187
4188 echo "${as_me-configure}:4188: testing cannot compile test-program ..." 1>&5
4189
4190                         break
4191                 fi
4192         done
4193         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4194
4195 fi
4196 echo "$as_me:4196: result: $cf_cv_ar_flags" >&5
4197 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4198
4199 if test -n "$ARFLAGS" ; then
4200         if test -n "$cf_cv_ar_flags" ; then
4201                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4202         fi
4203 else
4204         ARFLAGS=$cf_cv_ar_flags
4205 fi
4206
4207 echo "$as_me:4207: checking if you have specified an install-prefix" >&5
4208 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4209
4210 # Check whether --with-install-prefix or --without-install-prefix was given.
4211 if test "${with_install_prefix+set}" = set; then
4212   withval="$with_install_prefix"
4213   case "$withval" in #(vi
4214         yes|no) #(vi
4215                 ;;
4216         *)      DESTDIR="$withval"
4217                 ;;
4218         esac
4219 fi;
4220 echo "$as_me:4220: result: $DESTDIR" >&5
4221 echo "${ECHO_T}$DESTDIR" >&6
4222
4223 ###############################################################################
4224
4225 # If we're cross-compiling, allow the user to override the tools and their
4226 # options.  The configure script is oriented toward identifying the host
4227 # compiler, etc., but we need a build compiler to generate parts of the source.
4228
4229 if test "$cross_compiling" = yes ; then
4230
4231         # defaults that we might want to override
4232         : ${BUILD_CFLAGS:=''}
4233         : ${BUILD_CPPFLAGS:=''}
4234         : ${BUILD_LDFLAGS:=''}
4235         : ${BUILD_LIBS:=''}
4236         : ${BUILD_EXEEXT:='$x'}
4237         : ${BUILD_OBJEXT:='o'}
4238
4239 # Check whether --with-build-cc or --without-build-cc was given.
4240 if test "${with_build_cc+set}" = set; then
4241   withval="$with_build_cc"
4242   BUILD_CC="$withval"
4243 else
4244   for ac_prog in gcc cc cl
4245 do
4246   # Extract the first word of "$ac_prog", so it can be a program name with args.
4247 set dummy $ac_prog; ac_word=$2
4248 echo "$as_me:4248: checking for $ac_word" >&5
4249 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4250 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4251   echo $ECHO_N "(cached) $ECHO_C" >&6
4252 else
4253   if test -n "$BUILD_CC"; then
4254   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4255 else
4256   ac_save_IFS=$IFS; IFS=$ac_path_separator
4257 ac_dummy="$PATH"
4258 for ac_dir in $ac_dummy; do
4259   IFS=$ac_save_IFS
4260   test -z "$ac_dir" && ac_dir=.
4261   $as_executable_p "$ac_dir/$ac_word" || continue
4262 ac_cv_prog_BUILD_CC="$ac_prog"
4263 echo "$as_me:4263: found $ac_dir/$ac_word" >&5
4264 break
4265 done
4266
4267 fi
4268 fi
4269 BUILD_CC=$ac_cv_prog_BUILD_CC
4270 if test -n "$BUILD_CC"; then
4271   echo "$as_me:4271: result: $BUILD_CC" >&5
4272 echo "${ECHO_T}$BUILD_CC" >&6
4273 else
4274   echo "$as_me:4274: result: no" >&5
4275 echo "${ECHO_T}no" >&6
4276 fi
4277
4278   test -n "$BUILD_CC" && break
4279 done
4280
4281 fi;
4282         echo "$as_me:4282: checking for native build C compiler" >&5
4283 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4284         echo "$as_me:4284: result: $BUILD_CC" >&5
4285 echo "${ECHO_T}$BUILD_CC" >&6
4286
4287         echo "$as_me:4287: checking for native build C preprocessor" >&5
4288 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4289
4290 # Check whether --with-build-cpp or --without-build-cpp was given.
4291 if test "${with_build_cpp+set}" = set; then
4292   withval="$with_build_cpp"
4293   BUILD_CPP="$withval"
4294 else
4295   BUILD_CPP='${BUILD_CC} -E'
4296 fi;
4297         echo "$as_me:4297: result: $BUILD_CPP" >&5
4298 echo "${ECHO_T}$BUILD_CPP" >&6
4299
4300         echo "$as_me:4300: checking for native build C flags" >&5
4301 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4302
4303 # Check whether --with-build-cflags or --without-build-cflags was given.
4304 if test "${with_build_cflags+set}" = set; then
4305   withval="$with_build_cflags"
4306   BUILD_CFLAGS="$withval"
4307 fi;
4308         echo "$as_me:4308: result: $BUILD_CFLAGS" >&5
4309 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4310
4311         echo "$as_me:4311: checking for native build C preprocessor-flags" >&5
4312 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4313
4314 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4315 if test "${with_build_cppflags+set}" = set; then
4316   withval="$with_build_cppflags"
4317   BUILD_CPPFLAGS="$withval"
4318 fi;
4319         echo "$as_me:4319: result: $BUILD_CPPFLAGS" >&5
4320 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4321
4322         echo "$as_me:4322: checking for native build linker-flags" >&5
4323 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4324
4325 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4326 if test "${with_build_ldflags+set}" = set; then
4327   withval="$with_build_ldflags"
4328   BUILD_LDFLAGS="$withval"
4329 fi;
4330         echo "$as_me:4330: result: $BUILD_LDFLAGS" >&5
4331 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4332
4333         echo "$as_me:4333: checking for native build linker-libraries" >&5
4334 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4335
4336 # Check whether --with-build-libs or --without-build-libs was given.
4337 if test "${with_build_libs+set}" = set; then
4338   withval="$with_build_libs"
4339   BUILD_LIBS="$withval"
4340 fi;
4341         echo "$as_me:4341: result: $BUILD_LIBS" >&5
4342 echo "${ECHO_T}$BUILD_LIBS" >&6
4343
4344         # this assumes we're on Unix.
4345         BUILD_EXEEXT=
4346         BUILD_OBJEXT=o
4347
4348         : ${BUILD_CC:='${CC}'}
4349
4350         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4351                 { { echo "$as_me:4351: error: Cross-build requires two compilers.
4352 Use --with-build-cc to specify the native compiler." >&5
4353 echo "$as_me: error: Cross-build requires two compilers.
4354 Use --with-build-cc to specify the native compiler." >&2;}
4355    { (exit 1); exit 1; }; }
4356         fi
4357
4358 else
4359         : ${BUILD_CC:='${CC}'}
4360         : ${BUILD_CPP:='${CPP}'}
4361         : ${BUILD_CFLAGS:='${CFLAGS}'}
4362         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4363         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4364         : ${BUILD_LIBS:='${LIBS}'}
4365         : ${BUILD_EXEEXT:='$x'}
4366         : ${BUILD_OBJEXT:='o'}
4367 fi
4368
4369 ###############################################################################
4370
4371 ### Options to allow the user to specify the set of libraries which are used.
4372 ### Use "--without-normal --with-shared" to allow the default model to be
4373 ### shared, for example.
4374 cf_list_models=""
4375
4376 echo "$as_me:4376: checking if libtool -version-number should be used" >&5
4377 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4378
4379 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4380 if test "${enable_libtool_version+set}" = set; then
4381   enableval="$enable_libtool_version"
4382   test "$enableval" != no && enableval=yes
4383   if test "$enableval" != "yes" ; then
4384     cf_libtool_version=no
4385   else
4386     cf_libtool_version=yes
4387   fi
4388 else
4389   enableval=yes
4390   cf_libtool_version=yes
4391
4392 fi;
4393 echo "$as_me:4393: result: $cf_libtool_version" >&5
4394 echo "${ECHO_T}$cf_libtool_version" >&6
4395
4396 if test "$cf_libtool_version" = yes ; then
4397         LIBTOOL_VERSION="-version-number"
4398 else
4399         LIBTOOL_VERSION="-version-info"
4400 fi
4401
4402 LIBTOOL=
4403
4404 # common library maintenance symbols that are convenient for libtool scripts:
4405 LIB_CREATE='${AR} -cr'
4406 LIB_OBJECT='${OBJECTS}'
4407 LIB_SUFFIX=.a
4408 LIB_PREP="$RANLIB"
4409
4410 # symbols used to prop libtool up to enable it to determine what it should be
4411 # doing:
4412 LIB_CLEAN=
4413 LIB_COMPILE=
4414 LIB_LINK='${CC}'
4415 LIB_INSTALL=
4416 LIB_UNINSTALL=
4417
4418 echo "$as_me:4418: checking if you want to build libraries with libtool" >&5
4419 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4420
4421 # Check whether --with-libtool or --without-libtool was given.
4422 if test "${with_libtool+set}" = set; then
4423   withval="$with_libtool"
4424   with_libtool=$withval
4425 else
4426   with_libtool=no
4427 fi;
4428 echo "$as_me:4428: result: $with_libtool" >&5
4429 echo "${ECHO_T}$with_libtool" >&6
4430 if test "$with_libtool" != "no"; then
4431
4432         if test "$with_libtool" != "yes" ; then
4433
4434 if test "x$prefix" != xNONE; then
4435   cf_path_syntax="$prefix"
4436 else
4437   cf_path_syntax="$ac_default_prefix"
4438 fi
4439
4440 case ".$with_libtool" in #(vi
4441 .\$\(*\)*|.\'*\'*) #(vi
4442   ;;
4443 ..|./*|.\\*) #(vi
4444   ;;
4445 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4446   ;;
4447 .\${*prefix}*) #(vi
4448   eval with_libtool="$with_libtool"
4449   case ".$with_libtool" in #(vi
4450   .NONE/*)
4451     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4452     ;;
4453   esac
4454   ;; #(vi
4455 .no|.NONE/*)
4456   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4457   ;;
4458 *)
4459   { { echo "$as_me:4459: error: expected a pathname, not \"$with_libtool\"" >&5
4460 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4461    { (exit 1); exit 1; }; }
4462   ;;
4463 esac
4464
4465                 LIBTOOL=$with_libtool
4466         else
4467                 # Extract the first word of "libtool", so it can be a program name with args.
4468 set dummy libtool; ac_word=$2
4469 echo "$as_me:4469: checking for $ac_word" >&5
4470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4471 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4472   echo $ECHO_N "(cached) $ECHO_C" >&6
4473 else
4474   case $LIBTOOL in
4475   [\\/]* | ?:[\\/]*)
4476   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4477   ;;
4478   *)
4479   ac_save_IFS=$IFS; IFS=$ac_path_separator
4480 ac_dummy="$PATH"
4481 for ac_dir in $ac_dummy; do
4482   IFS=$ac_save_IFS
4483   test -z "$ac_dir" && ac_dir=.
4484   if $as_executable_p "$ac_dir/$ac_word"; then
4485    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4486    echo "$as_me:4486: found $ac_dir/$ac_word" >&5
4487    break
4488 fi
4489 done
4490
4491   ;;
4492 esac
4493 fi
4494 LIBTOOL=$ac_cv_path_LIBTOOL
4495
4496 if test -n "$LIBTOOL"; then
4497   echo "$as_me:4497: result: $LIBTOOL" >&5
4498 echo "${ECHO_T}$LIBTOOL" >&6
4499 else
4500   echo "$as_me:4500: result: no" >&5
4501 echo "${ECHO_T}no" >&6
4502 fi
4503
4504         fi
4505         if test -z "$LIBTOOL" ; then
4506                 { { echo "$as_me:4506: error: Cannot find libtool" >&5
4507 echo "$as_me: error: Cannot find libtool" >&2;}
4508    { (exit 1); exit 1; }; }
4509         fi
4510         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4511         LIB_OBJECT='${OBJECTS:.o=.lo}'
4512         LIB_SUFFIX=.la
4513         LIB_CLEAN='${LIBTOOL} --mode=clean'
4514         LIB_COMPILE='${LIBTOOL} --mode=compile'
4515         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4516         LIB_INSTALL='${LIBTOOL} --mode=install'
4517         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4518         LIB_PREP=:
4519
4520         # Show the version of libtool
4521         echo "$as_me:4521: checking version of libtool" >&5
4522 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4523
4524         # Save the version in a cache variable - this is not entirely a good
4525         # thing, but the version string from libtool is very ugly, and for
4526         # bug reports it might be useful to have the original string. "("
4527         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.].*//'`
4528         echo "$as_me:4528: result: $cf_cv_libtool_version" >&5
4529 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4530         if test -z "$cf_cv_libtool_version" ; then
4531                 { { echo "$as_me:4531: error: This is not GNU libtool" >&5
4532 echo "$as_me: error: This is not GNU libtool" >&2;}
4533    { (exit 1); exit 1; }; }
4534         fi
4535
4536         # special hack to add -no-undefined (which libtool should do for itself)
4537         LT_UNDEF=
4538         case "$cf_cv_system_name" in #(vi
4539         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4540                 LT_UNDEF=-no-undefined
4541                 ;;
4542         esac
4543
4544         # special hack to add --tag option for C++ compiler
4545         case $cf_cv_libtool_version in #(vi
4546         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4547                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4548                 LIBTOOL="$LIBTOOL --tag=CC"
4549                 ;;
4550         *)
4551                 LIBTOOL_CXX="$LIBTOOL"
4552                 ;;
4553         esac
4554 else
4555         LIBTOOL=""
4556         LIBTOOL_CXX=""
4557 fi
4558
4559 test -z "$LIBTOOL" && ECHO_LT=
4560
4561 if test "$with_libtool" != "no" ; then
4562
4563 cf_list_models="$cf_list_models libtool"
4564
4565 else
4566
4567 echo "$as_me:4567: checking if you want to build shared libraries" >&5
4568 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4569
4570 # Check whether --with-shared or --without-shared was given.
4571 if test "${with_shared+set}" = set; then
4572   withval="$with_shared"
4573   with_shared=$withval
4574 else
4575   with_shared=no
4576 fi;
4577 echo "$as_me:4577: result: $with_shared" >&5
4578 echo "${ECHO_T}$with_shared" >&6
4579 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4580
4581 echo "$as_me:4581: checking if you want to build static libraries" >&5
4582 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4583
4584 # Check whether --with-normal or --without-normal was given.
4585 if test "${with_normal+set}" = set; then
4586   withval="$with_normal"
4587   with_normal=$withval
4588 else
4589   with_normal=yes
4590 fi;
4591 echo "$as_me:4591: result: $with_normal" >&5
4592 echo "${ECHO_T}$with_normal" >&6
4593 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4594
4595 echo "$as_me:4595: checking if you want to build debug libraries" >&5
4596 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4597
4598 # Check whether --with-debug or --without-debug was given.
4599 if test "${with_debug+set}" = set; then
4600   withval="$with_debug"
4601   with_debug=$withval
4602 else
4603   with_debug=yes
4604 fi;
4605 echo "$as_me:4605: result: $with_debug" >&5
4606 echo "${ECHO_T}$with_debug" >&6
4607 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4608
4609 echo "$as_me:4609: checking if you want to build profiling libraries" >&5
4610 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4611
4612 # Check whether --with-profile or --without-profile was given.
4613 if test "${with_profile+set}" = set; then
4614   withval="$with_profile"
4615   with_profile=$withval
4616 else
4617   with_profile=no
4618 fi;
4619 echo "$as_me:4619: result: $with_profile" >&5
4620 echo "${ECHO_T}$with_profile" >&6
4621 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4622
4623 fi
4624
4625 ###############################################################################
4626
4627 echo "$as_me:4627: checking for specified models" >&5
4628 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4629 test -z "$cf_list_models" && cf_list_models=normal
4630 test "$with_libtool" != "no" && cf_list_models=libtool
4631 echo "$as_me:4631: result: $cf_list_models" >&5
4632 echo "${ECHO_T}$cf_list_models" >&6
4633
4634 ### Use the first model as the default, and save its suffix for use in building
4635 ### up test-applications.
4636 echo "$as_me:4636: checking for default model" >&5
4637 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4638 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4639 echo "$as_me:4639: result: $DFT_LWR_MODEL" >&5
4640 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4641
4642 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4643
4644 TICS_NAME=tic
4645
4646 TINFO_NAME=tinfo
4647
4648 LIB_NAME=ncurses
4649
4650 LIB_DIR=../lib
4651 LIB_2ND=../../lib
4652
4653         case $cf_cv_system_name in #(vi
4654         OS/2*|os2*) #(vi
4655         LIB_PREFIX=''
4656         ;;
4657         *)      LIB_PREFIX='lib'
4658         ;;
4659         esac
4660 cf_prefix=$LIB_PREFIX
4661
4662 LIB_PREFIX=$cf_prefix
4663
4664 LIB_SUFFIX=
4665
4666 ###############################################################################
4667
4668 echo "$as_me:4668: checking if you want to build a separate terminfo library" >&5
4669 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4670
4671 # Check whether --with-termlib or --without-termlib was given.
4672 if test "${with_termlib+set}" = set; then
4673   withval="$with_termlib"
4674   with_termlib=$withval
4675 else
4676   with_termlib=no
4677 fi;
4678 echo "$as_me:4678: result: $with_termlib" >&5
4679 echo "${ECHO_T}$with_termlib" >&6
4680
4681 echo "$as_me:4681: checking if you want to build a separate tic library" >&5
4682 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4683
4684 # Check whether --with-ticlib or --without-ticlib was given.
4685 if test "${with_ticlib+set}" = set; then
4686   withval="$with_ticlib"
4687   with_ticlib=$withval
4688 else
4689   with_ticlib=no
4690 fi;
4691 echo "$as_me:4691: result: $with_ticlib" >&5
4692 echo "${ECHO_T}$with_ticlib" >&6
4693
4694 ### Checks for special libraries, must be done up-front.
4695 SHLIB_LIST=""
4696
4697 echo "$as_me:4697: checking if you want to link with the GPM mouse library" >&5
4698 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4699
4700 # Check whether --with-gpm or --without-gpm was given.
4701 if test "${with_gpm+set}" = set; then
4702   withval="$with_gpm"
4703   with_gpm=$withval
4704 else
4705   with_gpm=maybe
4706 fi;
4707 echo "$as_me:4707: result: $with_gpm" >&5
4708 echo "${ECHO_T}$with_gpm" >&6
4709
4710 if test "$with_gpm" != no ; then
4711         echo "$as_me:4711: checking for gpm.h" >&5
4712 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4713 if test "${ac_cv_header_gpm_h+set}" = set; then
4714   echo $ECHO_N "(cached) $ECHO_C" >&6
4715 else
4716   cat >conftest.$ac_ext <<_ACEOF
4717 #line 4717 "configure"
4718 #include "confdefs.h"
4719 #include <gpm.h>
4720 _ACEOF
4721 if { (eval echo "$as_me:4721: \"$ac_cpp conftest.$ac_ext\"") >&5
4722   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4723   ac_status=$?
4724   egrep -v '^ *\+' conftest.er1 >conftest.err
4725   rm -f conftest.er1
4726   cat conftest.err >&5
4727   echo "$as_me:4727: \$? = $ac_status" >&5
4728   (exit $ac_status); } >/dev/null; then
4729   if test -s conftest.err; then
4730     ac_cpp_err=$ac_c_preproc_warn_flag
4731   else
4732     ac_cpp_err=
4733   fi
4734 else
4735   ac_cpp_err=yes
4736 fi
4737 if test -z "$ac_cpp_err"; then
4738   ac_cv_header_gpm_h=yes
4739 else
4740   echo "$as_me: failed program was:" >&5
4741   cat conftest.$ac_ext >&5
4742   ac_cv_header_gpm_h=no
4743 fi
4744 rm -f conftest.err conftest.$ac_ext
4745 fi
4746 echo "$as_me:4746: result: $ac_cv_header_gpm_h" >&5
4747 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4748 if test $ac_cv_header_gpm_h = yes; then
4749
4750                 cat >>confdefs.h <<\EOF
4751 #define HAVE_GPM_H 1
4752 EOF
4753
4754                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4755                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4756
4757 echo "${as_me-configure}:4757: testing assuming we really have GPM library ..." 1>&5
4758
4759                         cat >>confdefs.h <<\EOF
4760 #define HAVE_LIBGPM 1
4761 EOF
4762
4763                 else
4764                         echo "$as_me:4764: checking for Gpm_Open in -lgpm" >&5
4765 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4766 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4767   echo $ECHO_N "(cached) $ECHO_C" >&6
4768 else
4769   ac_check_lib_save_LIBS=$LIBS
4770 LIBS="-lgpm  $LIBS"
4771 cat >conftest.$ac_ext <<_ACEOF
4772 #line 4772 "configure"
4773 #include "confdefs.h"
4774
4775 /* Override any gcc2 internal prototype to avoid an error.  */
4776 #ifdef __cplusplus
4777 extern "C"
4778 #endif
4779 /* We use char because int might match the return type of a gcc2
4780    builtin and then its argument prototype would still apply.  */
4781 char Gpm_Open ();
4782 int
4783 main ()
4784 {
4785 Gpm_Open ();
4786   ;
4787   return 0;
4788 }
4789 _ACEOF
4790 rm -f conftest.$ac_objext conftest$ac_exeext
4791 if { (eval echo "$as_me:4791: \"$ac_link\"") >&5
4792   (eval $ac_link) 2>&5
4793   ac_status=$?
4794   echo "$as_me:4794: \$? = $ac_status" >&5
4795   (exit $ac_status); } &&
4796          { ac_try='test -s conftest$ac_exeext'
4797   { (eval echo "$as_me:4797: \"$ac_try\"") >&5
4798   (eval $ac_try) 2>&5
4799   ac_status=$?
4800   echo "$as_me:4800: \$? = $ac_status" >&5
4801   (exit $ac_status); }; }; then
4802   ac_cv_lib_gpm_Gpm_Open=yes
4803 else
4804   echo "$as_me: failed program was:" >&5
4805 cat conftest.$ac_ext >&5
4806 ac_cv_lib_gpm_Gpm_Open=no
4807 fi
4808 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4809 LIBS=$ac_check_lib_save_LIBS
4810 fi
4811 echo "$as_me:4811: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4812 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4813 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4814   :
4815 else
4816
4817                                 { { echo "$as_me:4817: error: Cannot link with GPM library" >&5
4818 echo "$as_me: error: Cannot link with GPM library" >&2;}
4819    { (exit 1); exit 1; }; }
4820                 fi
4821                 with_gpm=yes
4822
4823 fi
4824
4825 else
4826
4827                 test "$with_gpm" != maybe && { echo "$as_me:4827: WARNING: Cannot find GPM header" >&5
4828 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4829                 with_gpm=no
4830
4831 fi
4832
4833 fi
4834
4835 if test "$with_gpm" != no ; then
4836         echo "$as_me:4836: checking if you want to load GPM dynamically" >&5
4837 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4838
4839 # Check whether --with-dlsym or --without-dlsym was given.
4840 if test "${with_dlsym+set}" = set; then
4841   withval="$with_dlsym"
4842   with_dlsym=$withval
4843 else
4844   with_dlsym=yes
4845 fi;
4846         echo "$as_me:4846: result: $with_dlsym" >&5
4847 echo "${ECHO_T}$with_dlsym" >&6
4848         if test "$with_dlsym" = yes ; then
4849
4850 cf_have_dlsym=no
4851 echo "$as_me:4851: checking for dlsym" >&5
4852 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4853 if test "${ac_cv_func_dlsym+set}" = set; then
4854   echo $ECHO_N "(cached) $ECHO_C" >&6
4855 else
4856   cat >conftest.$ac_ext <<_ACEOF
4857 #line 4857 "configure"
4858 #include "confdefs.h"
4859 /* System header to define __stub macros and hopefully few prototypes,
4860     which can conflict with char dlsym (); below.  */
4861 #include <assert.h>
4862 /* Override any gcc2 internal prototype to avoid an error.  */
4863 #ifdef __cplusplus
4864 extern "C"
4865 #endif
4866 /* We use char because int might match the return type of a gcc2
4867    builtin and then its argument prototype would still apply.  */
4868 char dlsym ();
4869 char (*f) ();
4870
4871 int
4872 main ()
4873 {
4874 /* The GNU C library defines this for functions which it implements
4875     to always fail with ENOSYS.  Some functions are actually named
4876     something starting with __ and the normal name is an alias.  */
4877 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4878 choke me
4879 #else
4880 f = dlsym;
4881 #endif
4882
4883   ;
4884   return 0;
4885 }
4886 _ACEOF
4887 rm -f conftest.$ac_objext conftest$ac_exeext
4888 if { (eval echo "$as_me:4888: \"$ac_link\"") >&5
4889   (eval $ac_link) 2>&5
4890   ac_status=$?
4891   echo "$as_me:4891: \$? = $ac_status" >&5
4892   (exit $ac_status); } &&
4893          { ac_try='test -s conftest$ac_exeext'
4894   { (eval echo "$as_me:4894: \"$ac_try\"") >&5
4895   (eval $ac_try) 2>&5
4896   ac_status=$?
4897   echo "$as_me:4897: \$? = $ac_status" >&5
4898   (exit $ac_status); }; }; then
4899   ac_cv_func_dlsym=yes
4900 else
4901   echo "$as_me: failed program was:" >&5
4902 cat conftest.$ac_ext >&5
4903 ac_cv_func_dlsym=no
4904 fi
4905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4906 fi
4907 echo "$as_me:4907: result: $ac_cv_func_dlsym" >&5
4908 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4909 if test $ac_cv_func_dlsym = yes; then
4910   cf_have_dlsym=yes
4911 else
4912
4913 cf_have_libdl=no
4914 echo "$as_me:4914: checking for dlsym in -ldl" >&5
4915 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4916 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4917   echo $ECHO_N "(cached) $ECHO_C" >&6
4918 else
4919   ac_check_lib_save_LIBS=$LIBS
4920 LIBS="-ldl  $LIBS"
4921 cat >conftest.$ac_ext <<_ACEOF
4922 #line 4922 "configure"
4923 #include "confdefs.h"
4924
4925 /* Override any gcc2 internal prototype to avoid an error.  */
4926 #ifdef __cplusplus
4927 extern "C"
4928 #endif
4929 /* We use char because int might match the return type of a gcc2
4930    builtin and then its argument prototype would still apply.  */
4931 char dlsym ();
4932 int
4933 main ()
4934 {
4935 dlsym ();
4936   ;
4937   return 0;
4938 }
4939 _ACEOF
4940 rm -f conftest.$ac_objext conftest$ac_exeext
4941 if { (eval echo "$as_me:4941: \"$ac_link\"") >&5
4942   (eval $ac_link) 2>&5
4943   ac_status=$?
4944   echo "$as_me:4944: \$? = $ac_status" >&5
4945   (exit $ac_status); } &&
4946          { ac_try='test -s conftest$ac_exeext'
4947   { (eval echo "$as_me:4947: \"$ac_try\"") >&5
4948   (eval $ac_try) 2>&5
4949   ac_status=$?
4950   echo "$as_me:4950: \$? = $ac_status" >&5
4951   (exit $ac_status); }; }; then
4952   ac_cv_lib_dl_dlsym=yes
4953 else
4954   echo "$as_me: failed program was:" >&5
4955 cat conftest.$ac_ext >&5
4956 ac_cv_lib_dl_dlsym=no
4957 fi
4958 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4959 LIBS=$ac_check_lib_save_LIBS
4960 fi
4961 echo "$as_me:4961: result: $ac_cv_lib_dl_dlsym" >&5
4962 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4963 if test $ac_cv_lib_dl_dlsym = yes; then
4964
4965         cf_have_dlsym=yes
4966         cf_have_libdl=yes
4967 fi
4968
4969 fi
4970
4971 if test "$cf_have_dlsym" = yes ; then
4972         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4973
4974         echo "$as_me:4974: checking whether able to link to dl*() functions" >&5
4975 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4976         cat >conftest.$ac_ext <<_ACEOF
4977 #line 4977 "configure"
4978 #include "confdefs.h"
4979 #include <dlfcn.h>
4980 int
4981 main ()
4982 {
4983
4984                 void *obj;
4985                 if ((obj = dlopen("filename", 0)) != 0) {
4986                         if (dlsym(obj, "symbolname") == 0) {
4987                         dlclose(obj);
4988                         }
4989                 }
4990   ;
4991   return 0;
4992 }
4993 _ACEOF
4994 rm -f conftest.$ac_objext conftest$ac_exeext
4995 if { (eval echo "$as_me:4995: \"$ac_link\"") >&5
4996   (eval $ac_link) 2>&5
4997   ac_status=$?
4998   echo "$as_me:4998: \$? = $ac_status" >&5
4999   (exit $ac_status); } &&
5000          { ac_try='test -s conftest$ac_exeext'
5001   { (eval echo "$as_me:5001: \"$ac_try\"") >&5
5002   (eval $ac_try) 2>&5
5003   ac_status=$?
5004   echo "$as_me:5004: \$? = $ac_status" >&5
5005   (exit $ac_status); }; }; then
5006
5007                 cat >>confdefs.h <<\EOF
5008 #define HAVE_LIBDL 1
5009 EOF
5010
5011 else
5012   echo "$as_me: failed program was:" >&5
5013 cat conftest.$ac_ext >&5
5014
5015                 { { echo "$as_me:5015: error: Cannot link test program for libdl" >&5
5016 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5017    { (exit 1); exit 1; }; }
5018 fi
5019 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5020         echo "$as_me:5020: result: ok" >&5
5021 echo "${ECHO_T}ok" >&6
5022 else
5023         { { echo "$as_me:5023: error: Cannot find dlsym function" >&5
5024 echo "$as_me: error: Cannot find dlsym function" >&2;}
5025    { (exit 1); exit 1; }; }
5026 fi
5027
5028                 if test "$with_gpm" != yes ; then
5029                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5030
5031 echo "${as_me-configure}:5031: testing assuming soname for gpm is $with_gpm ..." 1>&5
5032
5033                         cf_cv_gpm_soname="$with_gpm"
5034                 else
5035
5036 echo "$as_me:5036: checking for soname of gpm library" >&5
5037 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5038 if test "${cf_cv_gpm_soname+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041
5042 cf_cv_gpm_soname=unknown
5043 if test "$cross_compiling" != yes ; then
5044 cat >conftest.$ac_ext <<CF_EOF
5045 #include <gpm.h>
5046 int main()
5047 {
5048 if (Gpm_Open(0,0)) Gpm_Close();
5049         ${cf_cv_main_return:-return}(0);
5050 }
5051 CF_EOF
5052 cf_save_LIBS="$LIBS"
5053         LIBS="-lgpm $LIBS"
5054         if { (eval echo "$as_me:5054: \"$ac_compile\"") >&5
5055   (eval $ac_compile) 2>&5
5056   ac_status=$?
5057   echo "$as_me:5057: \$? = $ac_status" >&5
5058   (exit $ac_status); } ; then
5059                 if { (eval echo "$as_me:5059: \"$ac_link\"") >&5
5060   (eval $ac_link) 2>&5
5061   ac_status=$?
5062   echo "$as_me:5062: \$? = $ac_status" >&5
5063   (exit $ac_status); } ; then
5064                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5065                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5066                 fi
5067         fi
5068 rm -f conftest*
5069 LIBS="$cf_save_LIBS"
5070 fi
5071
5072 fi
5073 echo "$as_me:5073: result: $cf_cv_gpm_soname" >&5
5074 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5075
5076                 fi
5077                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5078 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5079 EOF
5080
5081                 SHLIB_LIST="-ldl $SHLIB_LIST"
5082         else
5083                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5084                 TEST_LIBS="-lgpm $TEST_LIBS"
5085         fi
5086         cat >>confdefs.h <<\EOF
5087 #define HAVE_LIBGPM 1
5088 EOF
5089
5090 echo "$as_me:5090: checking for Gpm_Wgetch in -lgpm" >&5
5091 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5092 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5093   echo $ECHO_N "(cached) $ECHO_C" >&6
5094 else
5095   ac_check_lib_save_LIBS=$LIBS
5096 LIBS="-lgpm  $LIBS"
5097 cat >conftest.$ac_ext <<_ACEOF
5098 #line 5098 "configure"
5099 #include "confdefs.h"
5100
5101 /* Override any gcc2 internal prototype to avoid an error.  */
5102 #ifdef __cplusplus
5103 extern "C"
5104 #endif
5105 /* We use char because int might match the return type of a gcc2
5106    builtin and then its argument prototype would still apply.  */
5107 char Gpm_Wgetch ();
5108 int
5109 main ()
5110 {
5111 Gpm_Wgetch ();
5112   ;
5113   return 0;
5114 }
5115 _ACEOF
5116 rm -f conftest.$ac_objext conftest$ac_exeext
5117 if { (eval echo "$as_me:5117: \"$ac_link\"") >&5
5118   (eval $ac_link) 2>&5
5119   ac_status=$?
5120   echo "$as_me:5120: \$? = $ac_status" >&5
5121   (exit $ac_status); } &&
5122          { ac_try='test -s conftest$ac_exeext'
5123   { (eval echo "$as_me:5123: \"$ac_try\"") >&5
5124   (eval $ac_try) 2>&5
5125   ac_status=$?
5126   echo "$as_me:5126: \$? = $ac_status" >&5
5127   (exit $ac_status); }; }; then
5128   ac_cv_lib_gpm_Gpm_Wgetch=yes
5129 else
5130   echo "$as_me: failed program was:" >&5
5131 cat conftest.$ac_ext >&5
5132 ac_cv_lib_gpm_Gpm_Wgetch=no
5133 fi
5134 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5135 LIBS=$ac_check_lib_save_LIBS
5136 fi
5137 echo "$as_me:5137: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5138 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5139 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5140
5141 echo "$as_me:5141: checking if GPM is weakly bound to curses library" >&5
5142 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5143 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5144   echo $ECHO_N "(cached) $ECHO_C" >&6
5145 else
5146
5147 cf_cv_check_gpm_wgetch=unknown
5148 if test "$cross_compiling" != yes ; then
5149
5150 cat >conftest.$ac_ext <<CF_EOF
5151 #include <gpm.h>
5152 int main()
5153 {
5154         Gpm_Wgetch();
5155         ${cf_cv_main_return:-return}(0);
5156 }
5157 CF_EOF
5158
5159         cf_save_LIBS="$LIBS"
5160         # This only works if we can look at the symbol table.  If a shared
5161         # library is stripped for install, we cannot use that.  So we're forced
5162         # to rely on the static library, noting that some packagers may not
5163         # include it.
5164         LIBS="-static -lgpm -dynamic $LIBS"
5165         if { (eval echo "$as_me:5165: \"$ac_compile\"") >&5
5166   (eval $ac_compile) 2>&5
5167   ac_status=$?
5168   echo "$as_me:5168: \$? = $ac_status" >&5
5169   (exit $ac_status); } ; then
5170                 if { (eval echo "$as_me:5170: \"$ac_link\"") >&5
5171   (eval $ac_link) 2>&5
5172   ac_status=$?
5173   echo "$as_me:5173: \$? = $ac_status" >&5
5174   (exit $ac_status); } ; then
5175                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5176                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5177                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5178                 fi
5179         fi
5180         rm -f conftest*
5181         LIBS="$cf_save_LIBS"
5182 fi
5183
5184 fi
5185 echo "$as_me:5185: result: $cf_cv_check_gpm_wgetch" >&5
5186 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5187
5188 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5189         { echo "$as_me:5189: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5190 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5191 fi
5192
5193 fi
5194
5195 fi
5196
5197 # not everyone has "test -c"
5198 if test -c /dev/sysmouse 2>/dev/null ; then
5199 echo "$as_me:5199: checking if you want to use sysmouse" >&5
5200 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5201
5202 # Check whether --with-sysmouse or --without-sysmouse was given.
5203 if test "${with_sysmouse+set}" = set; then
5204   withval="$with_sysmouse"
5205   cf_with_sysmouse=$withval
5206 else
5207   cf_with_sysmouse=maybe
5208 fi;
5209         if test "$cf_with_sysmouse" != no ; then
5210         cat >conftest.$ac_ext <<_ACEOF
5211 #line 5211 "configure"
5212 #include "confdefs.h"
5213
5214 #include <osreldate.h>
5215 #if (__FreeBSD_version >= 400017)
5216 #include <sys/consio.h>
5217 #include <sys/fbio.h>
5218 #else
5219 #include <machine/console.h>
5220 #endif
5221
5222 int
5223 main ()
5224 {
5225
5226         struct mouse_info the_mouse;
5227         ioctl(0, CONS_MOUSECTL, &the_mouse);
5228
5229   ;
5230   return 0;
5231 }
5232 _ACEOF
5233 rm -f conftest.$ac_objext
5234 if { (eval echo "$as_me:5234: \"$ac_compile\"") >&5
5235   (eval $ac_compile) 2>&5
5236   ac_status=$?
5237   echo "$as_me:5237: \$? = $ac_status" >&5
5238   (exit $ac_status); } &&
5239          { ac_try='test -s conftest.$ac_objext'
5240   { (eval echo "$as_me:5240: \"$ac_try\"") >&5
5241   (eval $ac_try) 2>&5
5242   ac_status=$?
5243   echo "$as_me:5243: \$? = $ac_status" >&5
5244   (exit $ac_status); }; }; then
5245   cf_with_sysmouse=yes
5246 else
5247   echo "$as_me: failed program was:" >&5
5248 cat conftest.$ac_ext >&5
5249 cf_with_sysmouse=no
5250 fi
5251 rm -f conftest.$ac_objext conftest.$ac_ext
5252         fi
5253 echo "$as_me:5253: result: $cf_with_sysmouse" >&5
5254 echo "${ECHO_T}$cf_with_sysmouse" >&6
5255 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5256 #define USE_SYSMOUSE 1
5257 EOF
5258
5259 fi
5260
5261 if test X"$CC_G_OPT" = X"" ; then
5262         CC_G_OPT='-g'
5263         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5264 fi
5265
5266 if test X"$CXX_G_OPT" = X"" ; then
5267         CXX_G_OPT='-g'
5268         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5269 fi
5270
5271 echo "$as_me:5271: checking for default loader flags" >&5
5272 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5273 case $DFT_LWR_MODEL in
5274 libtool) LD_MODEL=''   ;;
5275 normal)  LD_MODEL=''   ;;
5276 debug)   LD_MODEL=$CC_G_OPT ;;
5277 profile) LD_MODEL='-pg';;
5278 shared)  LD_MODEL=''   ;;
5279 esac
5280 echo "$as_me:5280: result: $LD_MODEL" >&5
5281 echo "${ECHO_T}$LD_MODEL" >&6
5282
5283 case $DFT_LWR_MODEL in
5284 shared)
5285
5286 echo "$as_me:5286: checking if rpath option should be used" >&5
5287 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5288
5289 # Check whether --enable-rpath or --disable-rpath was given.
5290 if test "${enable_rpath+set}" = set; then
5291   enableval="$enable_rpath"
5292   cf_cv_enable_rpath=$enableval
5293 else
5294   cf_cv_enable_rpath=no
5295 fi;
5296 echo "$as_me:5296: result: $cf_cv_enable_rpath" >&5
5297 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5298
5299 echo "$as_me:5299: checking if shared libraries should be relinked during install" >&5
5300 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5301
5302 # Check whether --enable-relink or --disable-relink was given.
5303 if test "${enable_relink+set}" = set; then
5304   enableval="$enable_relink"
5305   cf_cv_do_relink=$enableval
5306 else
5307   cf_cv_do_relink=yes
5308 fi;
5309 echo "$as_me:5309: result: $cf_cv_do_relink" >&5
5310 echo "${ECHO_T}$cf_cv_do_relink" >&6
5311         ;;
5312 esac
5313
5314 LD_RPATH_OPT=
5315 echo "$as_me:5315: checking for an rpath option" >&5
5316 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5317 case $cf_cv_system_name in #(vi
5318 irix*) #(vi
5319         if test "$GCC" = yes; then
5320                 LD_RPATH_OPT="-Wl,-rpath,"
5321         else
5322                 LD_RPATH_OPT="-rpath "
5323         fi
5324         ;;
5325 linux*|gnu*|k*bsd*-gnu) #(vi
5326         LD_RPATH_OPT="-Wl,-rpath,"
5327         ;;
5328 openbsd[2-9].*) #(vi
5329         LD_RPATH_OPT="-Wl,-rpath,"
5330         ;;
5331 freebsd*) #(vi
5332         LD_RPATH_OPT="-rpath "
5333         ;;
5334 netbsd*) #(vi
5335         LD_RPATH_OPT="-Wl,-rpath,"
5336         ;;
5337 osf*|mls+*) #(vi
5338         LD_RPATH_OPT="-rpath "
5339         ;;
5340 solaris2*) #(vi
5341         LD_RPATH_OPT="-R"
5342         ;;
5343 *)
5344         ;;
5345 esac
5346 echo "$as_me:5346: result: $LD_RPATH_OPT" >&5
5347 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5348
5349 case "x$LD_RPATH_OPT" in #(vi
5350 x-R*)
5351         echo "$as_me:5351: checking if we need a space after rpath option" >&5
5352 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5353         cf_save_LIBS="$LIBS"
5354         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5355         cat >conftest.$ac_ext <<_ACEOF
5356 #line 5356 "configure"
5357 #include "confdefs.h"
5358
5359 int
5360 main ()
5361 {
5362
5363   ;
5364   return 0;
5365 }
5366 _ACEOF
5367 rm -f conftest.$ac_objext conftest$ac_exeext
5368 if { (eval echo "$as_me:5368: \"$ac_link\"") >&5
5369   (eval $ac_link) 2>&5
5370   ac_status=$?
5371   echo "$as_me:5371: \$? = $ac_status" >&5
5372   (exit $ac_status); } &&
5373          { ac_try='test -s conftest$ac_exeext'
5374   { (eval echo "$as_me:5374: \"$ac_try\"") >&5
5375   (eval $ac_try) 2>&5
5376   ac_status=$?
5377   echo "$as_me:5377: \$? = $ac_status" >&5
5378   (exit $ac_status); }; }; then
5379   cf_rpath_space=no
5380 else
5381   echo "$as_me: failed program was:" >&5
5382 cat conftest.$ac_ext >&5
5383 cf_rpath_space=yes
5384 fi
5385 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5386         LIBS="$cf_save_LIBS"
5387         echo "$as_me:5387: result: $cf_rpath_space" >&5
5388 echo "${ECHO_T}$cf_rpath_space" >&6
5389         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5390         ;;
5391 esac
5392
5393         LOCAL_LDFLAGS=
5394         LOCAL_LDFLAGS2=
5395         LD_SHARED_OPTS=
5396         INSTALL_LIB="-m 644"
5397
5398         cf_cv_do_symlinks=no
5399         cf_ld_rpath_opt=
5400         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5401
5402         echo "$as_me:5402: checking if release/abi version should be used for shared libs" >&5
5403 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5404
5405 # Check whether --with-shlib-version or --without-shlib-version was given.
5406 if test "${with_shlib_version+set}" = set; then
5407   withval="$with_shlib_version"
5408   test -z "$withval" && withval=auto
5409         case $withval in #(vi
5410         yes) #(vi
5411                 cf_cv_shlib_version=auto
5412                 ;;
5413         rel|abi|auto|no) #(vi
5414                 cf_cv_shlib_version=$withval
5415                 ;;
5416         *)
5417                 { { echo "$as_me:5417: error: option value must be one of: rel, abi, auto or no" >&5
5418 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5419    { (exit 1); exit 1; }; }
5420                 ;;
5421         esac
5422
5423 else
5424   cf_cv_shlib_version=auto
5425 fi;
5426         echo "$as_me:5426: result: $cf_cv_shlib_version" >&5
5427 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5428
5429         cf_cv_rm_so_locs=no
5430
5431         # Some less-capable ports of gcc support only -fpic
5432         CC_SHARED_OPTS=
5433         if test "$GCC" = yes
5434         then
5435                 echo "$as_me:5435: checking which $CC option to use" >&5
5436 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5437                 cf_save_CFLAGS="$CFLAGS"
5438                 for CC_SHARED_OPTS in -fPIC -fpic ''
5439                 do
5440                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5441                         cat >conftest.$ac_ext <<_ACEOF
5442 #line 5442 "configure"
5443 #include "confdefs.h"
5444 #include <stdio.h>
5445 int
5446 main ()
5447 {
5448 int x = 1
5449   ;
5450   return 0;
5451 }
5452 _ACEOF
5453 rm -f conftest.$ac_objext
5454 if { (eval echo "$as_me:5454: \"$ac_compile\"") >&5
5455   (eval $ac_compile) 2>&5
5456   ac_status=$?
5457   echo "$as_me:5457: \$? = $ac_status" >&5
5458   (exit $ac_status); } &&
5459          { ac_try='test -s conftest.$ac_objext'
5460   { (eval echo "$as_me:5460: \"$ac_try\"") >&5
5461   (eval $ac_try) 2>&5
5462   ac_status=$?
5463   echo "$as_me:5463: \$? = $ac_status" >&5
5464   (exit $ac_status); }; }; then
5465   break
5466 else
5467   echo "$as_me: failed program was:" >&5
5468 cat conftest.$ac_ext >&5
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471                 done
5472                 echo "$as_me:5472: result: $CC_SHARED_OPTS" >&5
5473 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5474                 CFLAGS="$cf_save_CFLAGS"
5475         fi
5476
5477         cf_cv_shlib_version_infix=no
5478
5479         case $cf_cv_system_name in #(vi
5480         aix[56]*) #(vi
5481                 if test "$GCC" = yes; then
5482                         CC_SHARED_OPTS=
5483                         MK_SHARED_LIB="$(CC) -shared"
5484                 fi
5485                 ;;
5486         beos*) #(vi
5487                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5488                 ;;
5489         cygwin*) #(vi
5490                 CC_SHARED_OPTS=
5491                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5492                 cf_cv_shlib_version=cygdll
5493                 cf_cv_shlib_version_infix=cygdll
5494                 cat >mk_shared_lib.sh <<-CF_EOF
5495                 #!/bin/sh
5496                 SHARED_LIB=\$1
5497                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5498                 shift
5499                 cat <<-EOF
5500                 Linking shared library
5501                 ** SHARED_LIB \$SHARED_LIB
5502                 ** IMPORT_LIB \$IMPORT_LIB
5503 EOF
5504                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5505 CF_EOF
5506                 chmod +x mk_shared_lib.sh
5507                 ;;
5508         darwin*) #(vi
5509                 EXTRA_CFLAGS="-no-cpp-precomp"
5510                 CC_SHARED_OPTS="-dynamic"
5511                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5512                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5513                 cf_cv_shlib_version_infix=yes
5514                 echo "$as_me:5514: checking if ld -search_paths_first works" >&5
5515 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5516 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5517   echo $ECHO_N "(cached) $ECHO_C" >&6
5518 else
5519
5520                         cf_save_LDFLAGS=$LDFLAGS
5521                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5522                         cat >conftest.$ac_ext <<_ACEOF
5523 #line 5523 "configure"
5524 #include "confdefs.h"
5525
5526 int
5527 main ()
5528 {
5529 int i;
5530   ;
5531   return 0;
5532 }
5533 _ACEOF
5534 rm -f conftest.$ac_objext conftest$ac_exeext
5535 if { (eval echo "$as_me:5535: \"$ac_link\"") >&5
5536   (eval $ac_link) 2>&5
5537   ac_status=$?
5538   echo "$as_me:5538: \$? = $ac_status" >&5
5539   (exit $ac_status); } &&
5540          { ac_try='test -s conftest$ac_exeext'
5541   { (eval echo "$as_me:5541: \"$ac_try\"") >&5
5542   (eval $ac_try) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); }; }; then
5546   cf_cv_ldflags_search_paths_first=yes
5547 else
5548   echo "$as_me: failed program was:" >&5
5549 cat conftest.$ac_ext >&5
5550 cf_cv_ldflags_search_paths_first=no
5551 fi
5552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5553                                 LDFLAGS=$cf_save_LDFLAGS
5554 fi
5555 echo "$as_me:5555: result: $cf_cv_ldflags_search_paths_first" >&5
5556 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5557                 if test $cf_cv_ldflags_search_paths_first = yes; then
5558                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5559                 fi
5560                 ;;
5561         hpux*) #(vi
5562                 # (tested with gcc 2.7.2 -- I don't have c89)
5563                 if test "$GCC" = yes; then
5564                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5565                 else
5566                         CC_SHARED_OPTS='+Z'
5567                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5568                 fi
5569                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5570                 # HP-UX shared libraries must be executable, and should be
5571                 # readonly to exploit a quirk in the memory manager.
5572                 INSTALL_LIB="-m 555"
5573                 ;;
5574         irix*) #(vi
5575                 if test "$cf_cv_enable_rpath" = yes ; then
5576                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5577                 fi
5578                 # tested with IRIX 5.2 and 'cc'.
5579                 if test "$GCC" != yes; then
5580                         CC_SHARED_OPTS='-KPIC'
5581                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5582                 else
5583                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5584                 fi
5585                 cf_cv_rm_so_locs=yes
5586                 ;;
5587         linux*|gnu*|k*bsd*-gnu) #(vi
5588                 if test "$DFT_LWR_MODEL" = "shared" ; then
5589                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5590                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5591                 fi
5592                 if test "$cf_cv_enable_rpath" = yes ; then
5593                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5594                 fi
5595
5596         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5597         if test "$cf_cv_shlib_version" = rel; then
5598                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5599         else
5600                 cf_cv_shared_soname='`basename $@`'
5601         fi
5602
5603                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5604                 ;;
5605         openbsd[2-9].*) #(vi
5606                 if test "$DFT_LWR_MODEL" = "shared" ; then
5607                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5608                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5609                 fi
5610                 if test "$cf_cv_enable_rpath" = yes ; then
5611                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5612                 fi
5613                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5614
5615         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5616         if test "$cf_cv_shlib_version" = rel; then
5617                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5618         else
5619                 cf_cv_shared_soname='`basename $@`'
5620         fi
5621
5622                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5623                 ;;
5624         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5625                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5626                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5627                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5628                 ;;
5629         freebsd*) #(vi
5630                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5631                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5632                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5633                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5634                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5635                 fi
5636
5637         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5638         if test "$cf_cv_shlib_version" = rel; then
5639                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5640         else
5641                 cf_cv_shared_soname='`basename $@`'
5642         fi
5643
5644                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5645                 ;;
5646         netbsd*) #(vi
5647                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5648                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5649                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5650                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5651                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5652                         if test "$cf_cv_shlib_version" = auto; then
5653                         if test -f /usr/libexec/ld.elf_so; then
5654                                 cf_cv_shlib_version=abi
5655                         else
5656                                 cf_cv_shlib_version=rel
5657                         fi
5658                         fi
5659
5660         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5661         if test "$cf_cv_shlib_version" = rel; then
5662                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5663         else
5664                 cf_cv_shared_soname='`basename $@`'
5665         fi
5666
5667                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5668                 else
5669                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5670                 fi
5671                 ;;
5672         osf*|mls+*) #(vi
5673                 # tested with OSF/1 V3.2 and 'cc'
5674                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5675                 # link with shared libs).
5676                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5677                 case $host_os in #(vi
5678                 osf4*)
5679                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5680                         ;;
5681                 esac
5682                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5683                 if test "$DFT_LWR_MODEL" = "shared" ; then
5684                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5685                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5686                 fi
5687                 cf_cv_rm_so_locs=yes
5688                 ;;
5689         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5690                 # tested with osr5.0.5
5691                 if test "$GCC" != yes; then
5692                         CC_SHARED_OPTS='-belf -KPIC'
5693                 fi
5694                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5695                 if test "$cf_cv_enable_rpath" = yes ; then
5696                         # only way is to set LD_RUN_PATH but no switch for it
5697                         RUN_PATH=$libdir
5698                 fi
5699                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5700                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5701                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5702                 ;;
5703         sunos4*) #(vi
5704                 # tested with SunOS 4.1.1 and gcc 2.7.0
5705                 if test "$GCC" != yes; then
5706                         CC_SHARED_OPTS='-KPIC'
5707                 fi
5708                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5709                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5710                 ;;
5711         solaris2*) #(vi
5712                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5713                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5714                 if test "$DFT_LWR_MODEL" = "shared" ; then
5715                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5716                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5717                 fi
5718                 if test "$cf_cv_enable_rpath" = yes ; then
5719                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5720                 fi
5721
5722         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5723         if test "$cf_cv_shlib_version" = rel; then
5724                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5725         else
5726                 cf_cv_shared_soname='`basename $@`'
5727         fi
5728
5729                 if test "$GCC" != yes; then
5730                         cf_save_CFLAGS="$CFLAGS"
5731                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5732                         do
5733                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5734                                 cat >conftest.$ac_ext <<_ACEOF
5735 #line 5735 "configure"
5736 #include "confdefs.h"
5737 #include <stdio.h>
5738 int
5739 main ()
5740 {
5741 printf("Hello\n");
5742   ;
5743   return 0;
5744 }
5745 _ACEOF
5746 rm -f conftest.$ac_objext
5747 if { (eval echo "$as_me:5747: \"$ac_compile\"") >&5
5748   (eval $ac_compile) 2>&5
5749   ac_status=$?
5750   echo "$as_me:5750: \$? = $ac_status" >&5
5751   (exit $ac_status); } &&
5752          { ac_try='test -s conftest.$ac_objext'
5753   { (eval echo "$as_me:5753: \"$ac_try\"") >&5
5754   (eval $ac_try) 2>&5
5755   ac_status=$?
5756   echo "$as_me:5756: \$? = $ac_status" >&5
5757   (exit $ac_status); }; }; then
5758   break
5759 else
5760   echo "$as_me: failed program was:" >&5
5761 cat conftest.$ac_ext >&5
5762 fi
5763 rm -f conftest.$ac_objext conftest.$ac_ext
5764                         done
5765                         CFLAGS="$cf_save_CFLAGS"
5766                         CC_SHARED_OPTS=$cf_shared_opts
5767                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5768                 else
5769                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5770                 fi
5771                 ;;
5772         sysv5uw7*|unix_sv*) #(vi
5773                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5774                 if test "$GCC" != yes; then
5775                         CC_SHARED_OPTS='-KPIC'
5776                 fi
5777                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5778                 ;;
5779         *)
5780                 CC_SHARED_OPTS='unknown'
5781                 MK_SHARED_LIB='echo unknown'
5782                 ;;
5783         esac
5784
5785         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5786         case "$cf_cv_shlib_version" in #(vi
5787         rel|abi)
5788                 case "$MK_SHARED_LIB" in #(vi
5789                 *'-o $@') #(vi
5790                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5791                         ;;
5792                 *)
5793                         { echo "$as_me:5793: WARNING: ignored --with-shlib-version" >&5
5794 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5795                         ;;
5796                 esac
5797                 ;;
5798         esac
5799
5800         if test -n "$cf_ld_rpath_opt" ; then
5801                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5802         fi
5803
5804 if test "$CC_SHARED_OPTS" = "unknown"; then
5805         for model in $cf_list_models; do
5806                 if test "$model" = "shared"; then
5807                         { { echo "$as_me:5807: error: Shared libraries are not supported in this version" >&5
5808 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5809    { (exit 1); exit 1; }; }
5810                 fi
5811         done
5812 fi
5813
5814 ###############################################################################
5815
5816 ###     use option --disable-overwrite to leave out the link to -lcurses
5817 echo "$as_me:5817: checking if you wish to install ncurses overwriting curses" >&5
5818 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5819
5820 # Check whether --enable-overwrite or --disable-overwrite was given.
5821 if test "${enable_overwrite+set}" = set; then
5822   enableval="$enable_overwrite"
5823   with_overwrite=$enableval
5824 else
5825   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5826 fi;
5827 echo "$as_me:5827: result: $with_overwrite" >&5
5828 echo "${ECHO_T}$with_overwrite" >&6
5829
5830 echo "$as_me:5830: checking if external terminfo-database is used" >&5
5831 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5832
5833 # Check whether --enable-database or --disable-database was given.
5834 if test "${enable_database+set}" = set; then
5835   enableval="$enable_database"
5836   use_database=$enableval
5837 else
5838   use_database=yes
5839 fi;
5840 echo "$as_me:5840: result: $use_database" >&5
5841 echo "${ECHO_T}$use_database" >&6
5842
5843 case $host_os in #(vi
5844 os2*) #(vi
5845         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5846         ;;
5847 *) #(vi
5848         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5849         ;;
5850 esac
5851
5852         case $cf_cv_system_name in
5853         os2*)   PATH_SEPARATOR=';'  ;;
5854         *)      PATH_SEPARATOR=':'  ;;
5855         esac
5856
5857 if test "$use_database" != no ; then
5858         cat >>confdefs.h <<\EOF
5859 #define USE_DATABASE 1
5860 EOF
5861
5862         echo "$as_me:5862: checking which terminfo source-file will be installed" >&5
5863 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5864
5865 # Check whether --with-database or --without-database was given.
5866 if test "${with_database+set}" = set; then
5867   withval="$with_database"
5868   TERMINFO_SRC=$withval
5869 fi;
5870         echo "$as_me:5870: result: $TERMINFO_SRC" >&5
5871 echo "${ECHO_T}$TERMINFO_SRC" >&6
5872
5873         echo "$as_me:5873: checking whether to use hashed database instead of directory/tree" >&5
5874 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5875
5876 # Check whether --with-hashed-db or --without-hashed-db was given.
5877 if test "${with_hashed_db+set}" = set; then
5878   withval="$with_hashed_db"
5879
5880 else
5881   with_hashed_db=no
5882 fi;
5883         echo "$as_me:5883: result: $with_hashed_db" >&5
5884 echo "${ECHO_T}$with_hashed_db" >&6
5885 else
5886         with_hashed_db=no
5887 fi
5888
5889 echo "$as_me:5889: checking for list of fallback descriptions" >&5
5890 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5891
5892 # Check whether --with-fallbacks or --without-fallbacks was given.
5893 if test "${with_fallbacks+set}" = set; then
5894   withval="$with_fallbacks"
5895   with_fallback=$withval
5896 else
5897   with_fallback=
5898 fi;
5899 echo "$as_me:5899: result: $with_fallback" >&5
5900 echo "${ECHO_T}$with_fallback" >&6
5901 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5902
5903 echo "$as_me:5903: checking if you want modern xterm or antique" >&5
5904 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5905
5906 # Check whether --with-xterm-new or --without-xterm-new was given.
5907 if test "${with_xterm_new+set}" = set; then
5908   withval="$with_xterm_new"
5909   with_xterm_new=$withval
5910 else
5911   with_xterm_new=yes
5912 fi;
5913 case $with_xterm_new in
5914 no)     with_xterm_new=xterm-old;;
5915 *)      with_xterm_new=xterm-new;;
5916 esac
5917 echo "$as_me:5917: result: $with_xterm_new" >&5
5918 echo "${ECHO_T}$with_xterm_new" >&6
5919 WHICH_XTERM=$with_xterm_new
5920
5921 MAKE_TERMINFO=
5922 if test "$use_database" = no ; then
5923         TERMINFO="${datadir}/terminfo"
5924         MAKE_TERMINFO="#"
5925 else
5926
5927 echo "$as_me:5927: checking for list of terminfo directories" >&5
5928 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5929
5930 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5931 if test "${with_terminfo_dirs+set}" = set; then
5932   withval="$with_terminfo_dirs"
5933
5934 else
5935   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5936 fi;
5937 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5938 cf_dst_path=
5939 for cf_src_path in $withval
5940 do
5941
5942 if test "x$prefix" != xNONE; then
5943   cf_path_syntax="$prefix"
5944 else
5945   cf_path_syntax="$ac_default_prefix"
5946 fi
5947
5948 case ".$cf_src_path" in #(vi
5949 .\$\(*\)*|.\'*\'*) #(vi
5950   ;;
5951 ..|./*|.\\*) #(vi
5952   ;;
5953 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5954   ;;
5955 .\${*prefix}*) #(vi
5956   eval cf_src_path="$cf_src_path"
5957   case ".$cf_src_path" in #(vi
5958   .NONE/*)
5959     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5960     ;;
5961   esac
5962   ;; #(vi
5963 .no|.NONE/*)
5964   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5965   ;;
5966 *)
5967   { { echo "$as_me:5967: error: expected a pathname, not \"$cf_src_path\"" >&5
5968 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5969    { (exit 1); exit 1; }; }
5970   ;;
5971 esac
5972
5973   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5974   cf_dst_path="${cf_dst_path}${cf_src_path}"
5975 done
5976 IFS="$ac_save_ifs"
5977
5978 eval 'TERMINFO_DIRS="$cf_dst_path"'
5979
5980 echo "$as_me:5980: result: $TERMINFO_DIRS" >&5
5981 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5982 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5983 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5984 EOF
5985
5986 echo "$as_me:5986: checking for default terminfo directory" >&5
5987 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5988
5989 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5990 if test "${with_default_terminfo_dir+set}" = set; then
5991   withval="$with_default_terminfo_dir"
5992
5993 else
5994   withval="${TERMINFO-${datadir}/terminfo}"
5995 fi; if test -n "${datadir}/terminfo" ; then
5996
5997 if test "x$prefix" != xNONE; then
5998   cf_path_syntax="$prefix"
5999 else
6000   cf_path_syntax="$ac_default_prefix"
6001 fi
6002
6003 case ".$withval" in #(vi
6004 .\$\(*\)*|.\'*\'*) #(vi
6005   ;;
6006 ..|./*|.\\*) #(vi
6007   ;;
6008 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6009   ;;
6010 .\${*prefix}*) #(vi
6011   eval withval="$withval"
6012   case ".$withval" in #(vi
6013   .NONE/*)
6014     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6015     ;;
6016   esac
6017   ;; #(vi
6018 .no|.NONE/*)
6019   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6020   ;;
6021 *)
6022   { { echo "$as_me:6022: error: expected a pathname, not \"$withval\"" >&5
6023 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6024    { (exit 1); exit 1; }; }
6025   ;;
6026 esac
6027
6028 fi
6029 TERMINFO="$withval"
6030
6031 echo "$as_me:6031: result: $TERMINFO" >&5
6032 echo "${ECHO_T}$TERMINFO" >&6
6033 cat >>confdefs.h <<EOF
6034 #define TERMINFO "$TERMINFO"
6035 EOF
6036
6037 fi
6038
6039 ###     use option --disable-big-core to make tic run on small machines
6040 ###     We need 4Mb, check if we can allocate 50% more than that.
6041 echo "$as_me:6041: checking if big-core option selected" >&5
6042 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6043
6044 # Check whether --enable-big-core or --disable-big-core was given.
6045 if test "${enable_big_core+set}" = set; then
6046   enableval="$enable_big_core"
6047   with_big_core=$enableval
6048 else
6049   if test "$cross_compiling" = yes; then
6050   with_big_core=no
6051 else
6052   cat >conftest.$ac_ext <<_ACEOF
6053 #line 6053 "configure"
6054 #include "confdefs.h"
6055
6056 #include <stdlib.h>
6057 #include <string.h>
6058 int main() {
6059         unsigned long n = 6000000L;
6060         char *s = malloc(n);
6061         if (s != 0)
6062                 s[0] = s[n-1] = 0;
6063         ${cf_cv_main_return:-return}(s == 0);
6064 }
6065 _ACEOF
6066 rm -f conftest$ac_exeext
6067 if { (eval echo "$as_me:6067: \"$ac_link\"") >&5
6068   (eval $ac_link) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6072   { (eval echo "$as_me:6072: \"$ac_try\"") >&5
6073   (eval $ac_try) 2>&5
6074   ac_status=$?
6075   echo "$as_me:6075: \$? = $ac_status" >&5
6076   (exit $ac_status); }; }; then
6077   with_big_core=yes
6078 else
6079   echo "$as_me: program exited with status $ac_status" >&5
6080 echo "$as_me: failed program was:" >&5
6081 cat conftest.$ac_ext >&5
6082 with_big_core=no
6083 fi
6084 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6085 fi
6086 fi;
6087 echo "$as_me:6087: result: $with_big_core" >&5
6088 echo "${ECHO_T}$with_big_core" >&6
6089 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6090 #define HAVE_BIG_CORE 1
6091 EOF
6092
6093 ### ISO C only guarantees 512-char strings, we have tables which load faster
6094 ### when constructed using "big" strings.  More than the C compiler, the awk
6095 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6096 echo "$as_me:6096: checking if big-strings option selected" >&5
6097 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6098
6099 # Check whether --enable-big-strings or --disable-big-strings was given.
6100 if test "${enable_big_strings+set}" = set; then
6101   enableval="$enable_big_strings"
6102   with_big_strings=$enableval
6103 else
6104
6105         case x$AWK in #(vi
6106         x)
6107                 eval with_big_strings=no
6108                 ;;
6109         *) #(vi
6110                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6111                         | $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
6112                         eval with_big_strings=yes
6113                 else
6114                         eval with_big_strings=no
6115                 fi
6116                 ;;
6117         esac
6118
6119 fi;
6120 echo "$as_me:6120: result: $with_big_strings" >&5
6121 echo "${ECHO_T}$with_big_strings" >&6
6122
6123 USE_BIG_STRINGS=0
6124 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6125
6126 ###     use option --enable-termcap to compile in the termcap fallback support
6127 echo "$as_me:6127: checking if you want termcap-fallback support" >&5
6128 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6129
6130 # Check whether --enable-termcap or --disable-termcap was given.
6131 if test "${enable_termcap+set}" = set; then
6132   enableval="$enable_termcap"
6133   with_termcap=$enableval
6134 else
6135   with_termcap=no
6136 fi;
6137 echo "$as_me:6137: result: $with_termcap" >&5
6138 echo "${ECHO_T}$with_termcap" >&6
6139
6140 if test "$with_termcap" != "yes" ; then
6141         if test "$use_database" = no ; then
6142                 if test -z "$with_fallback" ; then
6143                         { { echo "$as_me:6143: error: You have disabled the database w/o specifying fallbacks" >&5
6144 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6145    { (exit 1); exit 1; }; }
6146                 fi
6147         fi
6148         cat >>confdefs.h <<\EOF
6149 #define PURE_TERMINFO 1
6150 EOF
6151
6152 else
6153
6154 if test "$with_ticlib" != no ; then
6155         { { echo "$as_me:6155: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6156 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6157    { (exit 1); exit 1; }; }
6158 fi
6159
6160 cat >>confdefs.h <<\EOF
6161 #define USE_TERMCAP 1
6162 EOF
6163
6164 echo "$as_me:6164: checking for list of termcap files" >&5
6165 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6166
6167 # Check whether --with-termpath or --without-termpath was given.
6168 if test "${with_termpath+set}" = set; then
6169   withval="$with_termpath"
6170
6171 else
6172   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6173 fi;
6174 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6175 cf_dst_path=
6176 for cf_src_path in $withval
6177 do
6178
6179 if test "x$prefix" != xNONE; then
6180   cf_path_syntax="$prefix"
6181 else
6182   cf_path_syntax="$ac_default_prefix"
6183 fi
6184
6185 case ".$cf_src_path" in #(vi
6186 .\$\(*\)*|.\'*\'*) #(vi
6187   ;;
6188 ..|./*|.\\*) #(vi
6189   ;;
6190 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6191   ;;
6192 .\${*prefix}*) #(vi
6193   eval cf_src_path="$cf_src_path"
6194   case ".$cf_src_path" in #(vi
6195   .NONE/*)
6196     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6197     ;;
6198   esac
6199   ;; #(vi
6200 .no|.NONE/*)
6201   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6202   ;;
6203 *)
6204   { { echo "$as_me:6204: error: expected a pathname, not \"$cf_src_path\"" >&5
6205 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6206    { (exit 1); exit 1; }; }
6207   ;;
6208 esac
6209
6210   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6211   cf_dst_path="${cf_dst_path}${cf_src_path}"
6212 done
6213 IFS="$ac_save_ifs"
6214
6215 eval 'TERMPATH="$cf_dst_path"'
6216
6217 echo "$as_me:6217: result: $TERMPATH" >&5
6218 echo "${ECHO_T}$TERMPATH" >&6
6219 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6220 #define TERMPATH "$TERMPATH"
6221 EOF
6222
6223 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6224 echo "$as_me:6224: checking if fast termcap-loader is needed" >&5
6225 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6226
6227 # Check whether --enable-getcap or --disable-getcap was given.
6228 if test "${enable_getcap+set}" = set; then
6229   enableval="$enable_getcap"
6230   with_getcap=$enableval
6231 else
6232   with_getcap=no
6233 fi;
6234 echo "$as_me:6234: result: $with_getcap" >&5
6235 echo "${ECHO_T}$with_getcap" >&6
6236 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6237 #define USE_GETCAP 1
6238 EOF
6239
6240 echo "$as_me:6240: checking if translated termcaps will be cached in ~/.terminfo" >&5
6241 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6242
6243 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6244 if test "${enable_getcap_cache+set}" = set; then
6245   enableval="$enable_getcap_cache"
6246   with_getcap_cache=$enableval
6247 else
6248   with_getcap_cache=no
6249 fi;
6250 echo "$as_me:6250: result: $with_getcap_cache" >&5
6251 echo "${ECHO_T}$with_getcap_cache" >&6
6252 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6253 #define USE_GETCAP_CACHE 1
6254 EOF
6255
6256 fi
6257
6258 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6259 echo "$as_me:6259: checking if ~/.terminfo is wanted" >&5
6260 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6261
6262 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6263 if test "${enable_home_terminfo+set}" = set; then
6264   enableval="$enable_home_terminfo"
6265   with_home_terminfo=$enableval
6266 else
6267   with_home_terminfo=yes
6268 fi;
6269 echo "$as_me:6269: result: $with_home_terminfo" >&5
6270 echo "${ECHO_T}$with_home_terminfo" >&6
6271 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6272 #define USE_HOME_TERMINFO 1
6273 EOF
6274
6275 echo "$as_me:6275: checking if you want to use restricted environment when running as root" >&5
6276 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6277
6278 # Check whether --enable-root-environ or --disable-root-environ was given.
6279 if test "${enable_root_environ+set}" = set; then
6280   enableval="$enable_root_environ"
6281   with_root_environ=$enableval
6282 else
6283   with_root_environ=yes
6284 fi;
6285 echo "$as_me:6285: result: $with_root_environ" >&5
6286 echo "${ECHO_T}$with_root_environ" >&6
6287 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6288 #define USE_ROOT_ENVIRON 1
6289 EOF
6290
6291 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6292 ###   to reduce storage requirements for the terminfo database.
6293
6294 for ac_func in \
6295         remove \
6296         unlink
6297 do
6298 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6299 echo "$as_me:6299: checking for $ac_func" >&5
6300 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6301 if eval "test \"\${$as_ac_var+set}\" = set"; then
6302   echo $ECHO_N "(cached) $ECHO_C" >&6
6303 else
6304   cat >conftest.$ac_ext <<_ACEOF
6305 #line 6305 "configure"
6306 #include "confdefs.h"
6307 /* System header to define __stub macros and hopefully few prototypes,
6308     which can conflict with char $ac_func (); below.  */
6309 #include <assert.h>
6310 /* Override any gcc2 internal prototype to avoid an error.  */
6311 #ifdef __cplusplus
6312 extern "C"
6313 #endif
6314 /* We use char because int might match the return type of a gcc2
6315    builtin and then its argument prototype would still apply.  */
6316 char $ac_func ();
6317 char (*f) ();
6318
6319 int
6320 main ()
6321 {
6322 /* The GNU C library defines this for functions which it implements
6323     to always fail with ENOSYS.  Some functions are actually named
6324     something starting with __ and the normal name is an alias.  */
6325 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6326 choke me
6327 #else
6328 f = $ac_func;
6329 #endif
6330
6331   ;
6332   return 0;
6333 }
6334 _ACEOF
6335 rm -f conftest.$ac_objext conftest$ac_exeext
6336 if { (eval echo "$as_me:6336: \"$ac_link\"") >&5
6337   (eval $ac_link) 2>&5
6338   ac_status=$?
6339   echo "$as_me:6339: \$? = $ac_status" >&5
6340   (exit $ac_status); } &&
6341          { ac_try='test -s conftest$ac_exeext'
6342   { (eval echo "$as_me:6342: \"$ac_try\"") >&5
6343   (eval $ac_try) 2>&5
6344   ac_status=$?
6345   echo "$as_me:6345: \$? = $ac_status" >&5
6346   (exit $ac_status); }; }; then
6347   eval "$as_ac_var=yes"
6348 else
6349   echo "$as_me: failed program was:" >&5
6350 cat conftest.$ac_ext >&5
6351 eval "$as_ac_var=no"
6352 fi
6353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6354 fi
6355 echo "$as_me:6355: result: `eval echo '${'$as_ac_var'}'`" >&5
6356 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6357 if test `eval echo '${'$as_ac_var'}'` = yes; then
6358   cat >>confdefs.h <<EOF
6359 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6360 EOF
6361
6362 fi
6363 done
6364
6365 if test "$cross_compiling" = yes ; then
6366
6367 for ac_func in \
6368                 link \
6369                 symlink
6370 do
6371 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6372 echo "$as_me:6372: checking for $ac_func" >&5
6373 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6374 if eval "test \"\${$as_ac_var+set}\" = set"; then
6375   echo $ECHO_N "(cached) $ECHO_C" >&6
6376 else
6377   cat >conftest.$ac_ext <<_ACEOF
6378 #line 6378 "configure"
6379 #include "confdefs.h"
6380 /* System header to define __stub macros and hopefully few prototypes,
6381     which can conflict with char $ac_func (); below.  */
6382 #include <assert.h>
6383 /* Override any gcc2 internal prototype to avoid an error.  */
6384 #ifdef __cplusplus
6385 extern "C"
6386 #endif
6387 /* We use char because int might match the return type of a gcc2
6388    builtin and then its argument prototype would still apply.  */
6389 char $ac_func ();
6390 char (*f) ();
6391
6392 int
6393 main ()
6394 {
6395 /* The GNU C library defines this for functions which it implements
6396     to always fail with ENOSYS.  Some functions are actually named
6397     something starting with __ and the normal name is an alias.  */
6398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6399 choke me
6400 #else
6401 f = $ac_func;
6402 #endif
6403
6404   ;
6405   return 0;
6406 }
6407 _ACEOF
6408 rm -f conftest.$ac_objext conftest$ac_exeext
6409 if { (eval echo "$as_me:6409: \"$ac_link\"") >&5
6410   (eval $ac_link) 2>&5
6411   ac_status=$?
6412   echo "$as_me:6412: \$? = $ac_status" >&5
6413   (exit $ac_status); } &&
6414          { ac_try='test -s conftest$ac_exeext'
6415   { (eval echo "$as_me:6415: \"$ac_try\"") >&5
6416   (eval $ac_try) 2>&5
6417   ac_status=$?
6418   echo "$as_me:6418: \$? = $ac_status" >&5
6419   (exit $ac_status); }; }; then
6420   eval "$as_ac_var=yes"
6421 else
6422   echo "$as_me: failed program was:" >&5
6423 cat conftest.$ac_ext >&5
6424 eval "$as_ac_var=no"
6425 fi
6426 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6427 fi
6428 echo "$as_me:6428: result: `eval echo '${'$as_ac_var'}'`" >&5
6429 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6430 if test `eval echo '${'$as_ac_var'}'` = yes; then
6431   cat >>confdefs.h <<EOF
6432 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6433 EOF
6434
6435 fi
6436 done
6437
6438 else
6439         echo "$as_me:6439: checking if link/symlink functions work" >&5
6440 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6441 if test "${cf_cv_link_funcs+set}" = set; then
6442   echo $ECHO_N "(cached) $ECHO_C" >&6
6443 else
6444
6445                 cf_cv_link_funcs=
6446                 for cf_func in link symlink ; do
6447                         if test "$cross_compiling" = yes; then
6448
6449                         eval 'ac_cv_func_'$cf_func'=error'
6450 else
6451   cat >conftest.$ac_ext <<_ACEOF
6452 #line 6452 "configure"
6453 #include "confdefs.h"
6454
6455 #include <sys/types.h>
6456 #include <sys/stat.h>
6457 #ifdef HAVE_UNISTD_H
6458 #include <unistd.h>
6459 #endif
6460 int main()
6461 {
6462         int fail = 0;
6463         char *src = "config.log";
6464         char *dst = "conftest.chk";
6465         struct stat src_sb;
6466         struct stat dst_sb;
6467
6468         stat(src, &src_sb);
6469         fail = ($cf_func("config.log", "conftest.chk") < 0)
6470             || (stat(dst, &dst_sb) < 0)
6471             || (dst_sb.st_mtime != src_sb.st_mtime);
6472 #ifdef HAVE_UNLINK
6473         unlink(dst);
6474 #else
6475         remove(dst);
6476 #endif
6477         ${cf_cv_main_return:-return} (fail);
6478 }
6479
6480 _ACEOF
6481 rm -f conftest$ac_exeext
6482 if { (eval echo "$as_me:6482: \"$ac_link\"") >&5
6483   (eval $ac_link) 2>&5
6484   ac_status=$?
6485   echo "$as_me:6485: \$? = $ac_status" >&5
6486   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6487   { (eval echo "$as_me:6487: \"$ac_try\"") >&5
6488   (eval $ac_try) 2>&5
6489   ac_status=$?
6490   echo "$as_me:6490: \$? = $ac_status" >&5
6491   (exit $ac_status); }; }; then
6492
6493                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6494                         eval 'ac_cv_func_'$cf_func'=yes'
6495 else
6496   echo "$as_me: program exited with status $ac_status" >&5
6497 echo "$as_me: failed program was:" >&5
6498 cat conftest.$ac_ext >&5
6499
6500                         eval 'ac_cv_func_'$cf_func'=no'
6501 fi
6502 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6503 fi
6504                 done
6505                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6506
6507 fi
6508 echo "$as_me:6508: result: $cf_cv_link_funcs" >&5
6509 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6510         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6511 #define HAVE_LINK 1
6512 EOF
6513
6514         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6515 #define HAVE_SYMLINK 1
6516 EOF
6517
6518 fi
6519
6520 with_links=no
6521 with_symlinks=no
6522
6523 # soft links (symbolic links) are useful for some systems where hard links do
6524 # not work, or to make it simpler to copy terminfo trees around.
6525 if test "$ac_cv_func_symlink" = yes ; then
6526     echo "$as_me:6526: checking if tic should use symbolic links" >&5
6527 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6528
6529 # Check whether --enable-symlinks or --disable-symlinks was given.
6530 if test "${enable_symlinks+set}" = set; then
6531   enableval="$enable_symlinks"
6532   with_symlinks=$enableval
6533 else
6534   with_symlinks=no
6535 fi;
6536     echo "$as_me:6536: result: $with_symlinks" >&5
6537 echo "${ECHO_T}$with_symlinks" >&6
6538 fi
6539
6540 # If we have hard links and did not choose to use soft links instead, there is
6541 # no reason to make this choice optional - use the hard links.
6542 if test "$with_symlinks" = no ; then
6543     echo "$as_me:6543: checking if tic should use hard links" >&5
6544 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6545     if test "$ac_cv_func_link" = yes ; then
6546         with_links=yes
6547     else
6548         with_links=no
6549     fi
6550     echo "$as_me:6550: result: $with_links" >&5
6551 echo "${ECHO_T}$with_links" >&6
6552 fi
6553
6554 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6555 #define USE_LINKS 1
6556 EOF
6557
6558 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6559 #define USE_SYMLINKS 1
6560 EOF
6561
6562 ###   use option --enable-broken-linker to force on use of broken-linker support
6563 echo "$as_me:6563: checking if you want broken-linker support code" >&5
6564 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6565
6566 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6567 if test "${enable_broken_linker+set}" = set; then
6568   enableval="$enable_broken_linker"
6569   with_broken_linker=$enableval
6570 else
6571   with_broken_linker=${BROKEN_LINKER-no}
6572 fi;
6573 echo "$as_me:6573: result: $with_broken_linker" >&5
6574 echo "${ECHO_T}$with_broken_linker" >&6
6575
6576 BROKEN_LINKER=0
6577 if test "$with_broken_linker" = yes ; then
6578         cat >>confdefs.h <<\EOF
6579 #define BROKEN_LINKER 1
6580 EOF
6581
6582         BROKEN_LINKER=1
6583 elif test "$DFT_LWR_MODEL" = shared ; then
6584         case $cf_cv_system_name in #(vi
6585         cygwin*)
6586                 cat >>confdefs.h <<\EOF
6587 #define BROKEN_LINKER 1
6588 EOF
6589
6590                 BROKEN_LINKER=1
6591                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6592
6593 echo "${as_me-configure}:6593: testing cygwin linker is broken anyway ..." 1>&5
6594
6595                 ;;
6596         esac
6597 fi
6598
6599 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6600 echo "$as_me:6600: checking if tputs should process BSD-style prefix padding" >&5
6601 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6602
6603 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6604 if test "${enable_bsdpad+set}" = set; then
6605   enableval="$enable_bsdpad"
6606   with_bsdpad=$enableval
6607 else
6608   with_bsdpad=no
6609 fi;
6610 echo "$as_me:6610: result: $with_bsdpad" >&5
6611 echo "${ECHO_T}$with_bsdpad" >&6
6612 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6613 #define BSD_TPUTS 1
6614 EOF
6615
6616 ###   use option --enable-widec to turn on use of wide-character support
6617 NCURSES_CH_T=chtype
6618 NCURSES_LIBUTF8=0
6619
6620 NEED_WCHAR_H=0
6621 NCURSES_MBSTATE_T=0
6622 NCURSES_WCHAR_T=0
6623 NCURSES_WINT_T=0
6624
6625 # Check to define _XOPEN_SOURCE "automatically"
6626
6627 cf_XOPEN_SOURCE=500
6628 cf_POSIX_C_SOURCE=199506L
6629 cf_xopen_source=
6630
6631 case $host_os in #(vi
6632 aix[456]*) #(vi
6633         cf_xopen_source="-D_ALL_SOURCE"
6634         ;;
6635 darwin[0-8].*) #(vi
6636         cf_xopen_source="-D_APPLE_C_SOURCE"
6637         ;;
6638 darwin*) #(vi
6639         cf_xopen_source="-D_DARWIN_C_SOURCE"
6640         ;;
6641 freebsd*|dragonfly*) #(vi
6642         # 5.x headers associate
6643         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6644         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6645         cf_POSIX_C_SOURCE=200112L
6646         cf_XOPEN_SOURCE=600
6647         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6648         ;;
6649 hpux11*) #(vi
6650         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6651         ;;
6652 hpux*) #(vi
6653         cf_xopen_source="-D_HPUX_SOURCE"
6654         ;;
6655 irix[56].*) #(vi
6656         cf_xopen_source="-D_SGI_SOURCE"
6657         ;;
6658 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6659
6660 echo "$as_me:6660: checking if we must define _GNU_SOURCE" >&5
6661 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6662 if test "${cf_cv_gnu_source+set}" = set; then
6663   echo $ECHO_N "(cached) $ECHO_C" >&6
6664 else
6665
6666 cat >conftest.$ac_ext <<_ACEOF
6667 #line 6667 "configure"
6668 #include "confdefs.h"
6669 #include <sys/types.h>
6670 int
6671 main ()
6672 {
6673
6674 #ifndef _XOPEN_SOURCE
6675 make an error
6676 #endif
6677   ;
6678   return 0;
6679 }
6680 _ACEOF
6681 rm -f conftest.$ac_objext
6682 if { (eval echo "$as_me:6682: \"$ac_compile\"") >&5
6683   (eval $ac_compile) 2>&5
6684   ac_status=$?
6685   echo "$as_me:6685: \$? = $ac_status" >&5
6686   (exit $ac_status); } &&
6687          { ac_try='test -s conftest.$ac_objext'
6688   { (eval echo "$as_me:6688: \"$ac_try\"") >&5
6689   (eval $ac_try) 2>&5
6690   ac_status=$?
6691   echo "$as_me:6691: \$? = $ac_status" >&5
6692   (exit $ac_status); }; }; then
6693   cf_cv_gnu_source=no
6694 else
6695   echo "$as_me: failed program was:" >&5
6696 cat conftest.$ac_ext >&5
6697 cf_save="$CPPFLAGS"
6698          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6699          cat >conftest.$ac_ext <<_ACEOF
6700 #line 6700 "configure"
6701 #include "confdefs.h"
6702 #include <sys/types.h>
6703 int
6704 main ()
6705 {
6706
6707 #ifdef _XOPEN_SOURCE
6708 make an error
6709 #endif
6710   ;
6711   return 0;
6712 }
6713 _ACEOF
6714 rm -f conftest.$ac_objext
6715 if { (eval echo "$as_me:6715: \"$ac_compile\"") >&5
6716   (eval $ac_compile) 2>&5
6717   ac_status=$?
6718   echo "$as_me:6718: \$? = $ac_status" >&5
6719   (exit $ac_status); } &&
6720          { ac_try='test -s conftest.$ac_objext'
6721   { (eval echo "$as_me:6721: \"$ac_try\"") >&5
6722   (eval $ac_try) 2>&5
6723   ac_status=$?
6724   echo "$as_me:6724: \$? = $ac_status" >&5
6725   (exit $ac_status); }; }; then
6726   cf_cv_gnu_source=no
6727 else
6728   echo "$as_me: failed program was:" >&5
6729 cat conftest.$ac_ext >&5
6730 cf_cv_gnu_source=yes
6731 fi
6732 rm -f conftest.$ac_objext conftest.$ac_ext
6733         CPPFLAGS="$cf_save"
6734
6735 fi
6736 rm -f conftest.$ac_objext conftest.$ac_ext
6737
6738 fi
6739 echo "$as_me:6739: result: $cf_cv_gnu_source" >&5
6740 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6741 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6742
6743         ;;
6744 mirbsd*) #(vi
6745         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6746         ;;
6747 netbsd*) #(vi
6748         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6749         ;;
6750 openbsd*) #(vi
6751         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6752         ;;
6753 osf[45]*) #(vi
6754         cf_xopen_source="-D_OSF_SOURCE"
6755         ;;
6756 nto-qnx*) #(vi
6757         cf_xopen_source="-D_QNX_SOURCE"
6758         ;;
6759 sco*) #(vi
6760         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6761         ;;
6762 solaris2.1[0-9]) #(vi
6763         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6764         ;;
6765 solaris2.[1-9]) #(vi
6766         cf_xopen_source="-D__EXTENSIONS__"
6767         ;;
6768 *)
6769         echo "$as_me:6769: checking if we should define _XOPEN_SOURCE" >&5
6770 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6771 if test "${cf_cv_xopen_source+set}" = set; then
6772   echo $ECHO_N "(cached) $ECHO_C" >&6
6773 else
6774
6775         cat >conftest.$ac_ext <<_ACEOF
6776 #line 6776 "configure"
6777 #include "confdefs.h"
6778 #include <sys/types.h>
6779 int
6780 main ()
6781 {
6782
6783 #ifndef _XOPEN_SOURCE
6784 make an error
6785 #endif
6786   ;
6787   return 0;
6788 }
6789 _ACEOF
6790 rm -f conftest.$ac_objext
6791 if { (eval echo "$as_me:6791: \"$ac_compile\"") >&5
6792   (eval $ac_compile) 2>&5
6793   ac_status=$?
6794   echo "$as_me:6794: \$? = $ac_status" >&5
6795   (exit $ac_status); } &&
6796          { ac_try='test -s conftest.$ac_objext'
6797   { (eval echo "$as_me:6797: \"$ac_try\"") >&5
6798   (eval $ac_try) 2>&5
6799   ac_status=$?
6800   echo "$as_me:6800: \$? = $ac_status" >&5
6801   (exit $ac_status); }; }; then
6802   cf_cv_xopen_source=no
6803 else
6804   echo "$as_me: failed program was:" >&5
6805 cat conftest.$ac_ext >&5
6806 cf_save="$CPPFLAGS"
6807          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6808          cat >conftest.$ac_ext <<_ACEOF
6809 #line 6809 "configure"
6810 #include "confdefs.h"
6811 #include <sys/types.h>
6812 int
6813 main ()
6814 {
6815
6816 #ifdef _XOPEN_SOURCE
6817 make an error
6818 #endif
6819   ;
6820   return 0;
6821 }
6822 _ACEOF
6823 rm -f conftest.$ac_objext
6824 if { (eval echo "$as_me:6824: \"$ac_compile\"") >&5
6825   (eval $ac_compile) 2>&5
6826   ac_status=$?
6827   echo "$as_me:6827: \$? = $ac_status" >&5
6828   (exit $ac_status); } &&
6829          { ac_try='test -s conftest.$ac_objext'
6830   { (eval echo "$as_me:6830: \"$ac_try\"") >&5
6831   (eval $ac_try) 2>&5
6832   ac_status=$?
6833   echo "$as_me:6833: \$? = $ac_status" >&5
6834   (exit $ac_status); }; }; then
6835   cf_cv_xopen_source=no
6836 else
6837   echo "$as_me: failed program was:" >&5
6838 cat conftest.$ac_ext >&5
6839 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6840 fi
6841 rm -f conftest.$ac_objext conftest.$ac_ext
6842         CPPFLAGS="$cf_save"
6843
6844 fi
6845 rm -f conftest.$ac_objext conftest.$ac_ext
6846
6847 fi
6848 echo "$as_me:6848: result: $cf_cv_xopen_source" >&5
6849 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6850         if test "$cf_cv_xopen_source" != no ; then
6851
6852 CFLAGS=`echo "$CFLAGS" | \
6853         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6854                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6855
6856 CPPFLAGS=`echo "$CPPFLAGS" | \
6857         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6858                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6859
6860                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6861
6862 cf_fix_cppflags=no
6863 cf_new_cflags=
6864 cf_new_cppflags=
6865 cf_new_extra_cppflags=
6866
6867 for cf_add_cflags in $cf_temp_xopen_source
6868 do
6869 case $cf_fix_cppflags in
6870 no)
6871         case $cf_add_cflags in #(vi
6872         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6873                 case $cf_add_cflags in
6874                 -D*)
6875                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6876
6877                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6878                                 && test -z "${cf_tst_cflags}" \
6879                                 && cf_fix_cppflags=yes
6880
6881                         if test $cf_fix_cppflags = yes ; then
6882                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6883                                 continue
6884                         elif test "${cf_tst_cflags}" = "\"'" ; then
6885                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6886                                 continue
6887                         fi
6888                         ;;
6889                 esac
6890                 case "$CPPFLAGS" in
6891                 *$cf_add_cflags) #(vi
6892                         ;;
6893                 *) #(vi
6894                         case $cf_add_cflags in #(vi
6895                         -D*)
6896                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6897
6898 CPPFLAGS=`echo "$CPPFLAGS" | \
6899         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6900                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6901
6902                                 ;;
6903                         esac
6904                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6905                         ;;
6906                 esac
6907                 ;;
6908         *)
6909                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6910                 ;;
6911         esac
6912         ;;
6913 yes)
6914         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6915
6916         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6917
6918         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6919                 && test -z "${cf_tst_cflags}" \
6920                 && cf_fix_cppflags=no
6921         ;;
6922 esac
6923 done
6924
6925 if test -n "$cf_new_cflags" ; then
6926
6927         CFLAGS="$CFLAGS $cf_new_cflags"
6928 fi
6929
6930 if test -n "$cf_new_cppflags" ; then
6931
6932         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6933 fi
6934
6935 if test -n "$cf_new_extra_cppflags" ; then
6936
6937         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6938 fi
6939
6940         fi
6941
6942 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6943
6944 cf_save_CFLAGS="$CFLAGS"
6945 cf_save_CPPFLAGS="$CPPFLAGS"
6946
6947 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6948         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6949                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6950
6951 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6952         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6953                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6954
6955 echo "$as_me:6955: checking if we should define _POSIX_C_SOURCE" >&5
6956 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6957 if test "${cf_cv_posix_c_source+set}" = set; then
6958   echo $ECHO_N "(cached) $ECHO_C" >&6
6959 else
6960
6961 echo "${as_me-configure}:6961: testing if the symbol is already defined go no further ..." 1>&5
6962
6963         cat >conftest.$ac_ext <<_ACEOF
6964 #line 6964 "configure"
6965 #include "confdefs.h"
6966 #include <sys/types.h>
6967 int
6968 main ()
6969 {
6970
6971 #ifndef _POSIX_C_SOURCE
6972 make an error
6973 #endif
6974   ;
6975   return 0;
6976 }
6977 _ACEOF
6978 rm -f conftest.$ac_objext
6979 if { (eval echo "$as_me:6979: \"$ac_compile\"") >&5
6980   (eval $ac_compile) 2>&5
6981   ac_status=$?
6982   echo "$as_me:6982: \$? = $ac_status" >&5
6983   (exit $ac_status); } &&
6984          { ac_try='test -s conftest.$ac_objext'
6985   { (eval echo "$as_me:6985: \"$ac_try\"") >&5
6986   (eval $ac_try) 2>&5
6987   ac_status=$?
6988   echo "$as_me:6988: \$? = $ac_status" >&5
6989   (exit $ac_status); }; }; then
6990   cf_cv_posix_c_source=no
6991 else
6992   echo "$as_me: failed program was:" >&5
6993 cat conftest.$ac_ext >&5
6994 cf_want_posix_source=no
6995          case .$cf_POSIX_C_SOURCE in #(vi
6996          .[12]??*) #(vi
6997                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6998                 ;;
6999          .2) #(vi
7000                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7001                 cf_want_posix_source=yes
7002                 ;;
7003          .*)
7004                 cf_want_posix_source=yes
7005                 ;;
7006          esac
7007          if test "$cf_want_posix_source" = yes ; then
7008                 cat >conftest.$ac_ext <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7011 #include <sys/types.h>
7012 int
7013 main ()
7014 {
7015
7016 #ifdef _POSIX_SOURCE
7017 make an error
7018 #endif
7019   ;
7020   return 0;
7021 }
7022 _ACEOF
7023 rm -f conftest.$ac_objext
7024 if { (eval echo "$as_me:7024: \"$ac_compile\"") >&5
7025   (eval $ac_compile) 2>&5
7026   ac_status=$?
7027   echo "$as_me:7027: \$? = $ac_status" >&5
7028   (exit $ac_status); } &&
7029          { ac_try='test -s conftest.$ac_objext'
7030   { (eval echo "$as_me:7030: \"$ac_try\"") >&5
7031   (eval $ac_try) 2>&5
7032   ac_status=$?
7033   echo "$as_me:7033: \$? = $ac_status" >&5
7034   (exit $ac_status); }; }; then
7035   :
7036 else
7037   echo "$as_me: failed program was:" >&5
7038 cat conftest.$ac_ext >&5
7039 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7040 fi
7041 rm -f conftest.$ac_objext conftest.$ac_ext
7042          fi
7043
7044 echo "${as_me-configure}:7044: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7045
7046          CFLAGS="$cf_trim_CFLAGS"
7047          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7048
7049 echo "${as_me-configure}:7049: testing if the second compile does not leave our definition intact error ..." 1>&5
7050
7051          cat >conftest.$ac_ext <<_ACEOF
7052 #line 7052 "configure"
7053 #include "confdefs.h"
7054 #include <sys/types.h>
7055 int
7056 main ()
7057 {
7058
7059 #ifndef _POSIX_C_SOURCE
7060 make an error
7061 #endif
7062   ;
7063   return 0;
7064 }
7065 _ACEOF
7066 rm -f conftest.$ac_objext
7067 if { (eval echo "$as_me:7067: \"$ac_compile\"") >&5
7068   (eval $ac_compile) 2>&5
7069   ac_status=$?
7070   echo "$as_me:7070: \$? = $ac_status" >&5
7071   (exit $ac_status); } &&
7072          { ac_try='test -s conftest.$ac_objext'
7073   { (eval echo "$as_me:7073: \"$ac_try\"") >&5
7074   (eval $ac_try) 2>&5
7075   ac_status=$?
7076   echo "$as_me:7076: \$? = $ac_status" >&5
7077   (exit $ac_status); }; }; then
7078   :
7079 else
7080   echo "$as_me: failed program was:" >&5
7081 cat conftest.$ac_ext >&5
7082 cf_cv_posix_c_source=no
7083 fi
7084 rm -f conftest.$ac_objext conftest.$ac_ext
7085          CFLAGS="$cf_save_CFLAGS"
7086          CPPFLAGS="$cf_save_CPPFLAGS"
7087
7088 fi
7089 rm -f conftest.$ac_objext conftest.$ac_ext
7090
7091 fi
7092 echo "$as_me:7092: result: $cf_cv_posix_c_source" >&5
7093 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7094
7095 if test "$cf_cv_posix_c_source" != no ; then
7096         CFLAGS="$cf_trim_CFLAGS"
7097         CPPFLAGS="$cf_trim_CPPFLAGS"
7098
7099 cf_fix_cppflags=no
7100 cf_new_cflags=
7101 cf_new_cppflags=
7102 cf_new_extra_cppflags=
7103
7104 for cf_add_cflags in $cf_cv_posix_c_source
7105 do
7106 case $cf_fix_cppflags in
7107 no)
7108         case $cf_add_cflags in #(vi
7109         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7110                 case $cf_add_cflags in
7111                 -D*)
7112                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7113
7114                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7115                                 && test -z "${cf_tst_cflags}" \
7116                                 && cf_fix_cppflags=yes
7117
7118                         if test $cf_fix_cppflags = yes ; then
7119                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7120                                 continue
7121                         elif test "${cf_tst_cflags}" = "\"'" ; then
7122                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7123                                 continue
7124                         fi
7125                         ;;
7126                 esac
7127                 case "$CPPFLAGS" in
7128                 *$cf_add_cflags) #(vi
7129                         ;;
7130                 *) #(vi
7131                         case $cf_add_cflags in #(vi
7132                         -D*)
7133                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7134
7135 CPPFLAGS=`echo "$CPPFLAGS" | \
7136         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7137                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7138
7139                                 ;;
7140                         esac
7141                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7142                         ;;
7143                 esac
7144                 ;;
7145         *)
7146                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7147                 ;;
7148         esac
7149         ;;
7150 yes)
7151         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7152
7153         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7154
7155         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7156                 && test -z "${cf_tst_cflags}" \
7157                 && cf_fix_cppflags=no
7158         ;;
7159 esac
7160 done
7161
7162 if test -n "$cf_new_cflags" ; then
7163
7164         CFLAGS="$CFLAGS $cf_new_cflags"
7165 fi
7166
7167 if test -n "$cf_new_cppflags" ; then
7168
7169         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7170 fi
7171
7172 if test -n "$cf_new_extra_cppflags" ; then
7173
7174         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7175 fi
7176
7177 fi
7178
7179         ;;
7180 esac
7181
7182 if test -n "$cf_xopen_source" ; then
7183
7184 cf_fix_cppflags=no
7185 cf_new_cflags=
7186 cf_new_cppflags=
7187 cf_new_extra_cppflags=
7188
7189 for cf_add_cflags in $cf_xopen_source
7190 do
7191 case $cf_fix_cppflags in
7192 no)
7193         case $cf_add_cflags in #(vi
7194         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7195                 case $cf_add_cflags in
7196                 -D*)
7197                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7198
7199                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7200                                 && test -z "${cf_tst_cflags}" \
7201                                 && cf_fix_cppflags=yes
7202
7203                         if test $cf_fix_cppflags = yes ; then
7204                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7205                                 continue
7206                         elif test "${cf_tst_cflags}" = "\"'" ; then
7207                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7208                                 continue
7209                         fi
7210                         ;;
7211                 esac
7212                 case "$CPPFLAGS" in
7213                 *$cf_add_cflags) #(vi
7214                         ;;
7215                 *) #(vi
7216                         case $cf_add_cflags in #(vi
7217                         -D*)
7218                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7219
7220 CPPFLAGS=`echo "$CPPFLAGS" | \
7221         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7222                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7223
7224                                 ;;
7225                         esac
7226                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7227                         ;;
7228                 esac
7229                 ;;
7230         *)
7231                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7232                 ;;
7233         esac
7234         ;;
7235 yes)
7236         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7237
7238         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7239
7240         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7241                 && test -z "${cf_tst_cflags}" \
7242                 && cf_fix_cppflags=no
7243         ;;
7244 esac
7245 done
7246
7247 if test -n "$cf_new_cflags" ; then
7248
7249         CFLAGS="$CFLAGS $cf_new_cflags"
7250 fi
7251
7252 if test -n "$cf_new_cppflags" ; then
7253
7254         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7255 fi
7256
7257 if test -n "$cf_new_extra_cppflags" ; then
7258
7259         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7260 fi
7261
7262 fi
7263
7264 # Work around breakage on OS X
7265
7266 echo "$as_me:7266: checking if SIGWINCH is defined" >&5
7267 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7268 if test "${cf_cv_define_sigwinch+set}" = set; then
7269   echo $ECHO_N "(cached) $ECHO_C" >&6
7270 else
7271
7272         cat >conftest.$ac_ext <<_ACEOF
7273 #line 7273 "configure"
7274 #include "confdefs.h"
7275
7276 #include <sys/types.h>
7277 #include <sys/signal.h>
7278
7279 int
7280 main ()
7281 {
7282 int x = SIGWINCH
7283   ;
7284   return 0;
7285 }
7286 _ACEOF
7287 rm -f conftest.$ac_objext
7288 if { (eval echo "$as_me:7288: \"$ac_compile\"") >&5
7289   (eval $ac_compile) 2>&5
7290   ac_status=$?
7291   echo "$as_me:7291: \$? = $ac_status" >&5
7292   (exit $ac_status); } &&
7293          { ac_try='test -s conftest.$ac_objext'
7294   { (eval echo "$as_me:7294: \"$ac_try\"") >&5
7295   (eval $ac_try) 2>&5
7296   ac_status=$?
7297   echo "$as_me:7297: \$? = $ac_status" >&5
7298   (exit $ac_status); }; }; then
7299   cf_cv_define_sigwinch=yes
7300 else
7301   echo "$as_me: failed program was:" >&5
7302 cat conftest.$ac_ext >&5
7303 cat >conftest.$ac_ext <<_ACEOF
7304 #line 7304 "configure"
7305 #include "confdefs.h"
7306
7307 #undef _XOPEN_SOURCE
7308 #undef _POSIX_SOURCE
7309 #undef _POSIX_C_SOURCE
7310 #include <sys/types.h>
7311 #include <sys/signal.h>
7312
7313 int
7314 main ()
7315 {
7316 int x = SIGWINCH
7317   ;
7318   return 0;
7319 }
7320 _ACEOF
7321 rm -f conftest.$ac_objext
7322 if { (eval echo "$as_me:7322: \"$ac_compile\"") >&5
7323   (eval $ac_compile) 2>&5
7324   ac_status=$?
7325   echo "$as_me:7325: \$? = $ac_status" >&5
7326   (exit $ac_status); } &&
7327          { ac_try='test -s conftest.$ac_objext'
7328   { (eval echo "$as_me:7328: \"$ac_try\"") >&5
7329   (eval $ac_try) 2>&5
7330   ac_status=$?
7331   echo "$as_me:7331: \$? = $ac_status" >&5
7332   (exit $ac_status); }; }; then
7333   cf_cv_define_sigwinch=maybe
7334 else
7335   echo "$as_me: failed program was:" >&5
7336 cat conftest.$ac_ext >&5
7337 cf_cv_define_sigwinch=no
7338 fi
7339 rm -f conftest.$ac_objext conftest.$ac_ext
7340
7341 fi
7342 rm -f conftest.$ac_objext conftest.$ac_ext
7343
7344 fi
7345 echo "$as_me:7345: result: $cf_cv_define_sigwinch" >&5
7346 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7347
7348 if test "$cf_cv_define_sigwinch" = maybe ; then
7349 echo "$as_me:7349: checking for actual SIGWINCH definition" >&5
7350 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7351 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7352   echo $ECHO_N "(cached) $ECHO_C" >&6
7353 else
7354
7355 cf_cv_fixup_sigwinch=unknown
7356 cf_sigwinch=32
7357 while test $cf_sigwinch != 1
7358 do
7359         cat >conftest.$ac_ext <<_ACEOF
7360 #line 7360 "configure"
7361 #include "confdefs.h"
7362
7363 #undef _XOPEN_SOURCE
7364 #undef _POSIX_SOURCE
7365 #undef _POSIX_C_SOURCE
7366 #include <sys/types.h>
7367 #include <sys/signal.h>
7368
7369 int
7370 main ()
7371 {
7372
7373 #if SIGWINCH != $cf_sigwinch
7374 make an error
7375 #endif
7376 int x = SIGWINCH
7377   ;
7378   return 0;
7379 }
7380 _ACEOF
7381 rm -f conftest.$ac_objext
7382 if { (eval echo "$as_me:7382: \"$ac_compile\"") >&5
7383   (eval $ac_compile) 2>&5
7384   ac_status=$?
7385   echo "$as_me:7385: \$? = $ac_status" >&5
7386   (exit $ac_status); } &&
7387          { ac_try='test -s conftest.$ac_objext'
7388   { (eval echo "$as_me:7388: \"$ac_try\"") >&5
7389   (eval $ac_try) 2>&5
7390   ac_status=$?
7391   echo "$as_me:7391: \$? = $ac_status" >&5
7392   (exit $ac_status); }; }; then
7393   cf_cv_fixup_sigwinch=$cf_sigwinch
7394          break
7395 else
7396   echo "$as_me: failed program was:" >&5
7397 cat conftest.$ac_ext >&5
7398 fi
7399 rm -f conftest.$ac_objext conftest.$ac_ext
7400
7401 cf_sigwinch=`expr $cf_sigwinch - 1`
7402 done
7403
7404 fi
7405 echo "$as_me:7405: result: $cf_cv_fixup_sigwinch" >&5
7406 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7407
7408         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7409                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7410         fi
7411 fi
7412
7413 # Checks for CODESET support.
7414
7415   echo "$as_me:7415: checking for nl_langinfo and CODESET" >&5
7416 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7417 if test "${am_cv_langinfo_codeset+set}" = set; then
7418   echo $ECHO_N "(cached) $ECHO_C" >&6
7419 else
7420   cat >conftest.$ac_ext <<_ACEOF
7421 #line 7421 "configure"
7422 #include "confdefs.h"
7423 #include <langinfo.h>
7424 int
7425 main ()
7426 {
7427 char* cs = nl_langinfo(CODESET);
7428   ;
7429   return 0;
7430 }
7431 _ACEOF
7432 rm -f conftest.$ac_objext conftest$ac_exeext
7433 if { (eval echo "$as_me:7433: \"$ac_link\"") >&5
7434   (eval $ac_link) 2>&5
7435   ac_status=$?
7436   echo "$as_me:7436: \$? = $ac_status" >&5
7437   (exit $ac_status); } &&
7438          { ac_try='test -s conftest$ac_exeext'
7439   { (eval echo "$as_me:7439: \"$ac_try\"") >&5
7440   (eval $ac_try) 2>&5
7441   ac_status=$?
7442   echo "$as_me:7442: \$? = $ac_status" >&5
7443   (exit $ac_status); }; }; then
7444   am_cv_langinfo_codeset=yes
7445 else
7446   echo "$as_me: failed program was:" >&5
7447 cat conftest.$ac_ext >&5
7448 am_cv_langinfo_codeset=no
7449 fi
7450 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7451
7452 fi
7453 echo "$as_me:7453: result: $am_cv_langinfo_codeset" >&5
7454 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7455   if test $am_cv_langinfo_codeset = yes; then
7456
7457 cat >>confdefs.h <<\EOF
7458 #define HAVE_LANGINFO_CODESET 1
7459 EOF
7460
7461   fi
7462
7463 # use these variables to work around a defect in gcc's fixincludes.
7464 NCURSES_OK_WCHAR_T=
7465 NCURSES_OK_WINT_T=
7466
7467 echo "$as_me:7467: checking if you want wide-character code" >&5
7468 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7469
7470 # Check whether --enable-widec or --disable-widec was given.
7471 if test "${enable_widec+set}" = set; then
7472   enableval="$enable_widec"
7473   with_widec=$enableval
7474 else
7475   with_widec=no
7476 fi;
7477 echo "$as_me:7477: result: $with_widec" >&5
7478 echo "${ECHO_T}$with_widec" >&6
7479 if test "$with_widec" = yes ; then
7480         LIB_SUFFIX="w${LIB_SUFFIX}"
7481         cat >>confdefs.h <<\EOF
7482 #define USE_WIDEC_SUPPORT 1
7483 EOF
7484
7485         case "$CFLAGS $CPPFLAGS" in #(vi
7486         *-D_XOPEN_SOURCE=500) #(vi
7487                 ;;
7488         *)
7489
7490 echo "$as_me:7490: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7491 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7492 cat >conftest.$ac_ext <<_ACEOF
7493 #line 7493 "configure"
7494 #include "confdefs.h"
7495 #include <sys/types.h>
7496
7497 int
7498 main ()
7499 {
7500
7501 #ifndef _XOPEN_SOURCE_EXTENDED
7502 make an error
7503 #endif
7504   ;
7505   return 0;
7506 }
7507 _ACEOF
7508 rm -f conftest.$ac_objext
7509 if { (eval echo "$as_me:7509: \"$ac_compile\"") >&5
7510   (eval $ac_compile) 2>&5
7511   ac_status=$?
7512   echo "$as_me:7512: \$? = $ac_status" >&5
7513   (exit $ac_status); } &&
7514          { ac_try='test -s conftest.$ac_objext'
7515   { (eval echo "$as_me:7515: \"$ac_try\"") >&5
7516   (eval $ac_try) 2>&5
7517   ac_status=$?
7518   echo "$as_me:7518: \$? = $ac_status" >&5
7519   (exit $ac_status); }; }; then
7520   cf_result=no
7521 else
7522   echo "$as_me: failed program was:" >&5
7523 cat conftest.$ac_ext >&5
7524 cf_result=yes
7525 fi
7526 rm -f conftest.$ac_objext conftest.$ac_ext
7527 echo "$as_me:7527: result: $cf_result" >&5
7528 echo "${ECHO_T}$cf_result" >&6
7529
7530 if test "$cf_result" = yes ; then
7531         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7532 elif test "x" != "x" ; then
7533         echo "$as_me:7533: checking checking for compatible value versus " >&5
7534 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7535         cat >conftest.$ac_ext <<_ACEOF
7536 #line 7536 "configure"
7537 #include "confdefs.h"
7538 #include <sys/types.h>
7539
7540 int
7541 main ()
7542 {
7543
7544 #if _XOPEN_SOURCE_EXTENDED- < 0
7545 make an error
7546 #endif
7547   ;
7548   return 0;
7549 }
7550 _ACEOF
7551 rm -f conftest.$ac_objext
7552 if { (eval echo "$as_me:7552: \"$ac_compile\"") >&5
7553   (eval $ac_compile) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit $ac_status); } &&
7557          { ac_try='test -s conftest.$ac_objext'
7558   { (eval echo "$as_me:7558: \"$ac_try\"") >&5
7559   (eval $ac_try) 2>&5
7560   ac_status=$?
7561   echo "$as_me:7561: \$? = $ac_status" >&5
7562   (exit $ac_status); }; }; then
7563   cf_result=yes
7564 else
7565   echo "$as_me: failed program was:" >&5
7566 cat conftest.$ac_ext >&5
7567 cf_result=no
7568 fi
7569 rm -f conftest.$ac_objext conftest.$ac_ext
7570         echo "$as_me:7570: result: $cf_result" >&5
7571 echo "${ECHO_T}$cf_result" >&6
7572         if test "$cf_result" = no ; then
7573                 # perhaps we can override it - try...
7574                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7575         fi
7576 fi
7577
7578                 ;;
7579         esac
7580
7581         # with_overwrite=no
7582         NCURSES_CH_T=cchar_t
7583
7584 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7585 do
7586 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7587 echo "$as_me:7587: checking for $ac_func" >&5
7588 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7589 if eval "test \"\${$as_ac_var+set}\" = set"; then
7590   echo $ECHO_N "(cached) $ECHO_C" >&6
7591 else
7592   cat >conftest.$ac_ext <<_ACEOF
7593 #line 7593 "configure"
7594 #include "confdefs.h"
7595 /* System header to define __stub macros and hopefully few prototypes,
7596     which can conflict with char $ac_func (); below.  */
7597 #include <assert.h>
7598 /* Override any gcc2 internal prototype to avoid an error.  */
7599 #ifdef __cplusplus
7600 extern "C"
7601 #endif
7602 /* We use char because int might match the return type of a gcc2
7603    builtin and then its argument prototype would still apply.  */
7604 char $ac_func ();
7605 char (*f) ();
7606
7607 int
7608 main ()
7609 {
7610 /* The GNU C library defines this for functions which it implements
7611     to always fail with ENOSYS.  Some functions are actually named
7612     something starting with __ and the normal name is an alias.  */
7613 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7614 choke me
7615 #else
7616 f = $ac_func;
7617 #endif
7618
7619   ;
7620   return 0;
7621 }
7622 _ACEOF
7623 rm -f conftest.$ac_objext conftest$ac_exeext
7624 if { (eval echo "$as_me:7624: \"$ac_link\"") >&5
7625   (eval $ac_link) 2>&5
7626   ac_status=$?
7627   echo "$as_me:7627: \$? = $ac_status" >&5
7628   (exit $ac_status); } &&
7629          { ac_try='test -s conftest$ac_exeext'
7630   { (eval echo "$as_me:7630: \"$ac_try\"") >&5
7631   (eval $ac_try) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); }; }; then
7635   eval "$as_ac_var=yes"
7636 else
7637   echo "$as_me: failed program was:" >&5
7638 cat conftest.$ac_ext >&5
7639 eval "$as_ac_var=no"
7640 fi
7641 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7642 fi
7643 echo "$as_me:7643: result: `eval echo '${'$as_ac_var'}'`" >&5
7644 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7645 if test `eval echo '${'$as_ac_var'}'` = yes; then
7646   cat >>confdefs.h <<EOF
7647 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7648 EOF
7649
7650 fi
7651 done
7652
7653         if test "$ac_cv_func_putwc" != yes ; then
7654
7655 echo "$as_me:7655: checking for multibyte character support" >&5
7656 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7657 if test "${cf_cv_utf8_lib+set}" = set; then
7658   echo $ECHO_N "(cached) $ECHO_C" >&6
7659 else
7660
7661         cf_save_LIBS="$LIBS"
7662         cat >conftest.$ac_ext <<_ACEOF
7663 #line 7663 "configure"
7664 #include "confdefs.h"
7665
7666 #include <stdlib.h>
7667 int
7668 main ()
7669 {
7670 putwc(0,0);
7671   ;
7672   return 0;
7673 }
7674 _ACEOF
7675 rm -f conftest.$ac_objext conftest$ac_exeext
7676 if { (eval echo "$as_me:7676: \"$ac_link\"") >&5
7677   (eval $ac_link) 2>&5
7678   ac_status=$?
7679   echo "$as_me:7679: \$? = $ac_status" >&5
7680   (exit $ac_status); } &&
7681          { ac_try='test -s conftest$ac_exeext'
7682   { (eval echo "$as_me:7682: \"$ac_try\"") >&5
7683   (eval $ac_try) 2>&5
7684   ac_status=$?
7685   echo "$as_me:7685: \$? = $ac_status" >&5
7686   (exit $ac_status); }; }; then
7687   cf_cv_utf8_lib=yes
7688 else
7689   echo "$as_me: failed program was:" >&5
7690 cat conftest.$ac_ext >&5
7691
7692 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7693 # will be set on completion of the AC_TRY_LINK below.
7694 cf_cv_header_path_utf8=
7695 cf_cv_library_path_utf8=
7696
7697 echo "${as_me-configure}:7697: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7698
7699 cf_save_LIBS="$LIBS"
7700
7701 cat >conftest.$ac_ext <<_ACEOF
7702 #line 7702 "configure"
7703 #include "confdefs.h"
7704
7705 #include <libutf8.h>
7706 int
7707 main ()
7708 {
7709 putwc(0,0);
7710   ;
7711   return 0;
7712 }
7713 _ACEOF
7714 rm -f conftest.$ac_objext conftest$ac_exeext
7715 if { (eval echo "$as_me:7715: \"$ac_link\"") >&5
7716   (eval $ac_link) 2>&5
7717   ac_status=$?
7718   echo "$as_me:7718: \$? = $ac_status" >&5
7719   (exit $ac_status); } &&
7720          { ac_try='test -s conftest$ac_exeext'
7721   { (eval echo "$as_me:7721: \"$ac_try\"") >&5
7722   (eval $ac_try) 2>&5
7723   ac_status=$?
7724   echo "$as_me:7724: \$? = $ac_status" >&5
7725   (exit $ac_status); }; }; then
7726
7727         cf_cv_find_linkage_utf8=yes
7728         cf_cv_header_path_utf8=/usr/include
7729         cf_cv_library_path_utf8=/usr/lib
7730
7731 else
7732   echo "$as_me: failed program was:" >&5
7733 cat conftest.$ac_ext >&5
7734
7735 LIBS="-lutf8  $cf_save_LIBS"
7736
7737 cat >conftest.$ac_ext <<_ACEOF
7738 #line 7738 "configure"
7739 #include "confdefs.h"
7740
7741 #include <libutf8.h>
7742 int
7743 main ()
7744 {
7745 putwc(0,0);
7746   ;
7747   return 0;
7748 }
7749 _ACEOF
7750 rm -f conftest.$ac_objext conftest$ac_exeext
7751 if { (eval echo "$as_me:7751: \"$ac_link\"") >&5
7752   (eval $ac_link) 2>&5
7753   ac_status=$?
7754   echo "$as_me:7754: \$? = $ac_status" >&5
7755   (exit $ac_status); } &&
7756          { ac_try='test -s conftest$ac_exeext'
7757   { (eval echo "$as_me:7757: \"$ac_try\"") >&5
7758   (eval $ac_try) 2>&5
7759   ac_status=$?
7760   echo "$as_me:7760: \$? = $ac_status" >&5
7761   (exit $ac_status); }; }; then
7762
7763         cf_cv_find_linkage_utf8=yes
7764         cf_cv_header_path_utf8=/usr/include
7765         cf_cv_library_path_utf8=/usr/lib
7766         cf_cv_library_file_utf8="-lutf8"
7767
7768 else
7769   echo "$as_me: failed program was:" >&5
7770 cat conftest.$ac_ext >&5
7771
7772         cf_cv_find_linkage_utf8=no
7773         LIBS="$cf_save_LIBS"
7774
7775     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7776
7777 echo "${as_me-configure}:7777: testing find linkage for utf8 library ..." 1>&5
7778
7779 echo "${as_me-configure}:7779: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7780
7781     cf_save_CPPFLAGS="$CPPFLAGS"
7782     cf_test_CPPFLAGS="$CPPFLAGS"
7783
7784 cf_search=
7785
7786 # collect the current set of include-directories from compiler flags
7787 cf_header_path_list=""
7788 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7789         for cf_header_path in $CPPFLAGS $CFLAGS
7790         do
7791                 case $cf_header_path in #(vi
7792                 -I*)
7793                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7794
7795 test "$cf_header_path" != "NONE" && \
7796 test -d "$cf_header_path" && \
7797  {
7798         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7799         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7800         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7801         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7802         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7803         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7804 }
7805
7806                         cf_header_path_list="$cf_header_path_list $cf_search"
7807                         ;;
7808                 esac
7809         done
7810 fi
7811
7812 # add the variations for the package we are looking for
7813
7814 cf_search=
7815
7816 test "/usr" != "$prefix" && \
7817 test -d "/usr" && \
7818 (test $prefix = NONE || test -d $prefix) && {
7819         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7820         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7821         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7822         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7823         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7824         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7825 }
7826
7827 test "$prefix" != "NONE" && \
7828 test -d "$prefix" && \
7829  {
7830         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7831         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7832         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7833         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7834         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7835         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7836 }
7837
7838 test "/usr/local" != "$prefix" && \
7839 test -d "/usr/local" && \
7840 (test $prefix = NONE || test -d $prefix) && {
7841         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7842         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7843         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7844         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7845         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7846         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7847 }
7848
7849 test "/opt" != "$prefix" && \
7850 test -d "/opt" && \
7851 (test $prefix = NONE || test -d $prefix) && {
7852         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7853         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7854         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7855         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7856         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7857         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7858 }
7859
7860 test "$HOME" != "$prefix" && \
7861 test -d "$HOME" && \
7862 (test $prefix = NONE || test -d $prefix) && {
7863         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7864         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7865         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7866         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7867         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7868         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7869 }
7870
7871 test "$includedir" != NONE && \
7872 test "$includedir" != "/usr/include" && \
7873 test -d "$includedir" && {
7874         test -d $includedir &&    cf_search="$cf_search $includedir"
7875         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7876 }
7877
7878 test "$oldincludedir" != NONE && \
7879 test "$oldincludedir" != "/usr/include" && \
7880 test -d "$oldincludedir" && {
7881         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7882         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7883 }
7884
7885 cf_search="$cf_search $cf_header_path_list"
7886
7887     for cf_cv_header_path_utf8 in $cf_search
7888     do
7889       if test -d $cf_cv_header_path_utf8 ; then
7890         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7891
7892 echo "${as_me-configure}:7892: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7893
7894         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7895         cat >conftest.$ac_ext <<_ACEOF
7896 #line 7896 "configure"
7897 #include "confdefs.h"
7898
7899 #include <libutf8.h>
7900 int
7901 main ()
7902 {
7903 putwc(0,0);
7904   ;
7905   return 0;
7906 }
7907 _ACEOF
7908 rm -f conftest.$ac_objext
7909 if { (eval echo "$as_me:7909: \"$ac_compile\"") >&5
7910   (eval $ac_compile) 2>&5
7911   ac_status=$?
7912   echo "$as_me:7912: \$? = $ac_status" >&5
7913   (exit $ac_status); } &&
7914          { ac_try='test -s conftest.$ac_objext'
7915   { (eval echo "$as_me:7915: \"$ac_try\"") >&5
7916   (eval $ac_try) 2>&5
7917   ac_status=$?
7918   echo "$as_me:7918: \$? = $ac_status" >&5
7919   (exit $ac_status); }; }; then
7920
7921             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7922
7923 echo "${as_me-configure}:7923: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7924
7925             cf_cv_find_linkage_utf8=maybe
7926             cf_test_CPPFLAGS="$CPPFLAGS"
7927             break
7928 else
7929   echo "$as_me: failed program was:" >&5
7930 cat conftest.$ac_ext >&5
7931
7932             CPPFLAGS="$cf_save_CPPFLAGS"
7933
7934 fi
7935 rm -f conftest.$ac_objext conftest.$ac_ext
7936       fi
7937     done
7938
7939     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7940
7941 echo "${as_me-configure}:7941: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7942
7943       cf_save_LIBS="$LIBS"
7944       cf_save_LDFLAGS="$LDFLAGS"
7945
7946       if test "$cf_cv_find_linkage_utf8" != yes ; then
7947
7948 cf_search=
7949 cf_library_path_list=""
7950 if test -n "${LDFLAGS}${LIBS}" ; then
7951         for cf_library_path in $LDFLAGS $LIBS
7952         do
7953                 case $cf_library_path in #(vi
7954                 -L*)
7955                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7956
7957 test "$cf_library_path" != "NONE" && \
7958 test -d "$cf_library_path" && \
7959  {
7960         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7961         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7962         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7963         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7964         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7965         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7966 }
7967
7968                         cf_library_path_list="$cf_library_path_list $cf_search"
7969                         ;;
7970                 esac
7971         done
7972 fi
7973
7974 cf_search=
7975
7976 test "/usr" != "$prefix" && \
7977 test -d "/usr" && \
7978 (test $prefix = NONE || test -d $prefix) && {
7979         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7980         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7981         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7982         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7983         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7984         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7985 }
7986
7987 test "$prefix" != "NONE" && \
7988 test -d "$prefix" && \
7989  {
7990         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7991         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7992         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7993         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7994         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7995         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7996 }
7997
7998 test "/usr/local" != "$prefix" && \
7999 test -d "/usr/local" && \
8000 (test $prefix = NONE || test -d $prefix) && {
8001         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8002         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8003         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8004         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8005         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8006         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8007 }
8008
8009 test "/opt" != "$prefix" && \
8010 test -d "/opt" && \
8011 (test $prefix = NONE || test -d $prefix) && {
8012         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8013         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8014         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8015         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8016         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8017         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8018 }
8019
8020 test "$HOME" != "$prefix" && \
8021 test -d "$HOME" && \
8022 (test $prefix = NONE || test -d $prefix) && {
8023         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8024         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8025         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8026         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8027         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8028         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8029 }
8030
8031 cf_search="$cf_library_path_list $cf_search"
8032
8033         for cf_cv_library_path_utf8 in $cf_search
8034         do
8035           if test -d $cf_cv_library_path_utf8 ; then
8036             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8037
8038 echo "${as_me-configure}:8038: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8039
8040             CPPFLAGS="$cf_test_CPPFLAGS"
8041             LIBS="-lutf8  $cf_save_LIBS"
8042             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8043             cat >conftest.$ac_ext <<_ACEOF
8044 #line 8044 "configure"
8045 #include "confdefs.h"
8046
8047 #include <libutf8.h>
8048 int
8049 main ()
8050 {
8051 putwc(0,0);
8052   ;
8053   return 0;
8054 }
8055 _ACEOF
8056 rm -f conftest.$ac_objext conftest$ac_exeext
8057 if { (eval echo "$as_me:8057: \"$ac_link\"") >&5
8058   (eval $ac_link) 2>&5
8059   ac_status=$?
8060   echo "$as_me:8060: \$? = $ac_status" >&5
8061   (exit $ac_status); } &&
8062          { ac_try='test -s conftest$ac_exeext'
8063   { (eval echo "$as_me:8063: \"$ac_try\"") >&5
8064   (eval $ac_try) 2>&5
8065   ac_status=$?
8066   echo "$as_me:8066: \$? = $ac_status" >&5
8067   (exit $ac_status); }; }; then
8068
8069                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8070
8071 echo "${as_me-configure}:8071: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8072
8073                 cf_cv_find_linkage_utf8=yes
8074                 cf_cv_library_file_utf8="-lutf8"
8075                 break
8076 else
8077   echo "$as_me: failed program was:" >&5
8078 cat conftest.$ac_ext >&5
8079
8080                 CPPFLAGS="$cf_save_CPPFLAGS"
8081                 LIBS="$cf_save_LIBS"
8082                 LDFLAGS="$cf_save_LDFLAGS"
8083
8084 fi
8085 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8086           fi
8087         done
8088         CPPFLAGS="$cf_save_CPPFLAGS"
8089         LDFLAGS="$cf_save_LDFLAGS"
8090       fi
8091
8092     else
8093       cf_cv_find_linkage_utf8=no
8094     fi
8095
8096 fi
8097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8098
8099 fi
8100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8101
8102 LIBS="$cf_save_LIBS"
8103
8104 if test "$cf_cv_find_linkage_utf8" = yes ; then
8105 cf_cv_utf8_lib=add-on
8106 else
8107 cf_cv_utf8_lib=no
8108 fi
8109
8110 fi
8111 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8112 fi
8113 echo "$as_me:8113: result: $cf_cv_utf8_lib" >&5
8114 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8115
8116 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8117 # ncurses/ncursesw:
8118 if test "$cf_cv_utf8_lib" = "add-on" ; then
8119         cat >>confdefs.h <<\EOF
8120 #define HAVE_LIBUTF8_H 1
8121 EOF
8122
8123 if test -n "$cf_cv_header_path_utf8" ; then
8124   for cf_add_incdir in $cf_cv_header_path_utf8
8125   do
8126         while test $cf_add_incdir != /usr/include
8127         do
8128           if test -d $cf_add_incdir
8129           then
8130                 cf_have_incdir=no
8131                 if test -n "$CFLAGS$CPPFLAGS" ; then
8132                   # a loop is needed to ensure we can add subdirs of existing dirs
8133                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8134                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8135                           cf_have_incdir=yes; break
8136                         fi
8137                   done
8138                 fi
8139
8140                 if test "$cf_have_incdir" = no ; then
8141                   if test "$cf_add_incdir" = /usr/local/include ; then
8142                         if test "$GCC" = yes
8143                         then
8144                           cf_save_CPPFLAGS=$CPPFLAGS
8145                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8146                           cat >conftest.$ac_ext <<_ACEOF
8147 #line 8147 "configure"
8148 #include "confdefs.h"
8149 #include <stdio.h>
8150 int
8151 main ()
8152 {
8153 printf("Hello")
8154   ;
8155   return 0;
8156 }
8157 _ACEOF
8158 rm -f conftest.$ac_objext
8159 if { (eval echo "$as_me:8159: \"$ac_compile\"") >&5
8160   (eval $ac_compile) 2>&5
8161   ac_status=$?
8162   echo "$as_me:8162: \$? = $ac_status" >&5
8163   (exit $ac_status); } &&
8164          { ac_try='test -s conftest.$ac_objext'
8165   { (eval echo "$as_me:8165: \"$ac_try\"") >&5
8166   (eval $ac_try) 2>&5
8167   ac_status=$?
8168   echo "$as_me:8168: \$? = $ac_status" >&5
8169   (exit $ac_status); }; }; then
8170   :
8171 else
8172   echo "$as_me: failed program was:" >&5
8173 cat conftest.$ac_ext >&5
8174 cf_have_incdir=yes
8175 fi
8176 rm -f conftest.$ac_objext conftest.$ac_ext
8177                           CPPFLAGS=$cf_save_CPPFLAGS
8178                         fi
8179                   fi
8180                 fi
8181
8182                 if test "$cf_have_incdir" = no ; then
8183                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8184
8185 echo "${as_me-configure}:8185: testing adding $cf_add_incdir to include-path ..." 1>&5
8186
8187                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8188
8189                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8190                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8191                   cf_add_incdir="$cf_top_incdir"
8192                 else
8193                   break
8194                 fi
8195           fi
8196         done
8197   done
8198 fi
8199
8200 if test -n "$cf_cv_library_path_utf8" ; then
8201   for cf_add_libdir in $cf_cv_library_path_utf8
8202   do
8203     if test $cf_add_libdir = /usr/lib ; then
8204       :
8205     elif test -d $cf_add_libdir
8206     then
8207       cf_have_libdir=no
8208       if test -n "$LDFLAGS$LIBS" ; then
8209         # a loop is needed to ensure we can add subdirs of existing dirs
8210         for cf_test_libdir in $LDFLAGS $LIBS ; do
8211           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8212             cf_have_libdir=yes; break
8213           fi
8214         done
8215       fi
8216       if test "$cf_have_libdir" = no ; then
8217         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8218
8219 echo "${as_me-configure}:8219: testing adding $cf_add_libdir to library-path ..." 1>&5
8220
8221         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8222       fi
8223     fi
8224   done
8225 fi
8226
8227         LIBS="$cf_cv_library_file_utf8 $LIBS"
8228 fi
8229
8230                 if test "$cf_cv_utf8_lib" != no ; then
8231                         NCURSES_LIBUTF8=1
8232                 fi
8233         fi
8234
8235 # This is needed on Tru64 5.0 to declare mbstate_t
8236 echo "$as_me:8236: checking if we must include wchar.h to declare mbstate_t" >&5
8237 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8238 if test "${cf_cv_mbstate_t+set}" = set; then
8239   echo $ECHO_N "(cached) $ECHO_C" >&6
8240 else
8241
8242 cat >conftest.$ac_ext <<_ACEOF
8243 #line 8243 "configure"
8244 #include "confdefs.h"
8245
8246 #include <stdlib.h>
8247 #include <stdarg.h>
8248 #include <stdio.h>
8249 #ifdef HAVE_LIBUTF8_H
8250 #include <libutf8.h>
8251 #endif
8252 int
8253 main ()
8254 {
8255 mbstate_t state
8256   ;
8257   return 0;
8258 }
8259 _ACEOF
8260 rm -f conftest.$ac_objext
8261 if { (eval echo "$as_me:8261: \"$ac_compile\"") >&5
8262   (eval $ac_compile) 2>&5
8263   ac_status=$?
8264   echo "$as_me:8264: \$? = $ac_status" >&5
8265   (exit $ac_status); } &&
8266          { ac_try='test -s conftest.$ac_objext'
8267   { (eval echo "$as_me:8267: \"$ac_try\"") >&5
8268   (eval $ac_try) 2>&5
8269   ac_status=$?
8270   echo "$as_me:8270: \$? = $ac_status" >&5
8271   (exit $ac_status); }; }; then
8272   cf_cv_mbstate_t=no
8273 else
8274   echo "$as_me: failed program was:" >&5
8275 cat conftest.$ac_ext >&5
8276 cat >conftest.$ac_ext <<_ACEOF
8277 #line 8277 "configure"
8278 #include "confdefs.h"
8279
8280 #include <stdlib.h>
8281 #include <stdarg.h>
8282 #include <stdio.h>
8283 #include <wchar.h>
8284 #ifdef HAVE_LIBUTF8_H
8285 #include <libutf8.h>
8286 #endif
8287 int
8288 main ()
8289 {
8290 mbstate_t value
8291   ;
8292   return 0;
8293 }
8294 _ACEOF
8295 rm -f conftest.$ac_objext
8296 if { (eval echo "$as_me:8296: \"$ac_compile\"") >&5
8297   (eval $ac_compile) 2>&5
8298   ac_status=$?
8299   echo "$as_me:8299: \$? = $ac_status" >&5
8300   (exit $ac_status); } &&
8301          { ac_try='test -s conftest.$ac_objext'
8302   { (eval echo "$as_me:8302: \"$ac_try\"") >&5
8303   (eval $ac_try) 2>&5
8304   ac_status=$?
8305   echo "$as_me:8305: \$? = $ac_status" >&5
8306   (exit $ac_status); }; }; then
8307   cf_cv_mbstate_t=yes
8308 else
8309   echo "$as_me: failed program was:" >&5
8310 cat conftest.$ac_ext >&5
8311 cf_cv_mbstate_t=unknown
8312 fi
8313 rm -f conftest.$ac_objext conftest.$ac_ext
8314 fi
8315 rm -f conftest.$ac_objext conftest.$ac_ext
8316 fi
8317 echo "$as_me:8317: result: $cf_cv_mbstate_t" >&5
8318 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8319
8320 if test "$cf_cv_mbstate_t" = yes ; then
8321         cat >>confdefs.h <<\EOF
8322 #define NEED_WCHAR_H 1
8323 EOF
8324
8325         NEED_WCHAR_H=1
8326 fi
8327
8328 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8329 if test "$cf_cv_mbstate_t" = unknown ; then
8330         NCURSES_MBSTATE_T=1
8331 fi
8332
8333 # This is needed on Tru64 5.0 to declare wchar_t
8334 echo "$as_me:8334: checking if we must include wchar.h to declare wchar_t" >&5
8335 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8336 if test "${cf_cv_wchar_t+set}" = set; then
8337   echo $ECHO_N "(cached) $ECHO_C" >&6
8338 else
8339
8340 cat >conftest.$ac_ext <<_ACEOF
8341 #line 8341 "configure"
8342 #include "confdefs.h"
8343
8344 #include <stdlib.h>
8345 #include <stdarg.h>
8346 #include <stdio.h>
8347 #ifdef HAVE_LIBUTF8_H
8348 #include <libutf8.h>
8349 #endif
8350 int
8351 main ()
8352 {
8353 wchar_t state
8354   ;
8355   return 0;
8356 }
8357 _ACEOF
8358 rm -f conftest.$ac_objext
8359 if { (eval echo "$as_me:8359: \"$ac_compile\"") >&5
8360   (eval $ac_compile) 2>&5
8361   ac_status=$?
8362   echo "$as_me:8362: \$? = $ac_status" >&5
8363   (exit $ac_status); } &&
8364          { ac_try='test -s conftest.$ac_objext'
8365   { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8366   (eval $ac_try) 2>&5
8367   ac_status=$?
8368   echo "$as_me:8368: \$? = $ac_status" >&5
8369   (exit $ac_status); }; }; then
8370   cf_cv_wchar_t=no
8371 else
8372   echo "$as_me: failed program was:" >&5
8373 cat conftest.$ac_ext >&5
8374 cat >conftest.$ac_ext <<_ACEOF
8375 #line 8375 "configure"
8376 #include "confdefs.h"
8377
8378 #include <stdlib.h>
8379 #include <stdarg.h>
8380 #include <stdio.h>
8381 #include <wchar.h>
8382 #ifdef HAVE_LIBUTF8_H
8383 #include <libutf8.h>
8384 #endif
8385 int
8386 main ()
8387 {
8388 wchar_t value
8389   ;
8390   return 0;
8391 }
8392 _ACEOF
8393 rm -f conftest.$ac_objext
8394 if { (eval echo "$as_me:8394: \"$ac_compile\"") >&5
8395   (eval $ac_compile) 2>&5
8396   ac_status=$?
8397   echo "$as_me:8397: \$? = $ac_status" >&5
8398   (exit $ac_status); } &&
8399          { ac_try='test -s conftest.$ac_objext'
8400   { (eval echo "$as_me:8400: \"$ac_try\"") >&5
8401   (eval $ac_try) 2>&5
8402   ac_status=$?
8403   echo "$as_me:8403: \$? = $ac_status" >&5
8404   (exit $ac_status); }; }; then
8405   cf_cv_wchar_t=yes
8406 else
8407   echo "$as_me: failed program was:" >&5
8408 cat conftest.$ac_ext >&5
8409 cf_cv_wchar_t=unknown
8410 fi
8411 rm -f conftest.$ac_objext conftest.$ac_ext
8412 fi
8413 rm -f conftest.$ac_objext conftest.$ac_ext
8414 fi
8415 echo "$as_me:8415: result: $cf_cv_wchar_t" >&5
8416 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8417
8418 if test "$cf_cv_wchar_t" = yes ; then
8419         cat >>confdefs.h <<\EOF
8420 #define NEED_WCHAR_H 1
8421 EOF
8422
8423         NEED_WCHAR_H=1
8424 fi
8425
8426 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8427 if test "$cf_cv_wchar_t" = unknown ; then
8428         NCURSES_WCHAR_T=1
8429 fi
8430
8431 # if we find wchar_t in either place, use substitution to provide a fallback.
8432 if test "$cf_cv_wchar_t" != unknown ; then
8433         NCURSES_OK_WCHAR_T=1
8434 fi
8435
8436 # This is needed on Tru64 5.0 to declare wint_t
8437 echo "$as_me:8437: checking if we must include wchar.h to declare wint_t" >&5
8438 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8439 if test "${cf_cv_wint_t+set}" = set; then
8440   echo $ECHO_N "(cached) $ECHO_C" >&6
8441 else
8442
8443 cat >conftest.$ac_ext <<_ACEOF
8444 #line 8444 "configure"
8445 #include "confdefs.h"
8446
8447 #include <stdlib.h>
8448 #include <stdarg.h>
8449 #include <stdio.h>
8450 #ifdef HAVE_LIBUTF8_H
8451 #include <libutf8.h>
8452 #endif
8453 int
8454 main ()
8455 {
8456 wint_t state
8457   ;
8458   return 0;
8459 }
8460 _ACEOF
8461 rm -f conftest.$ac_objext
8462 if { (eval echo "$as_me:8462: \"$ac_compile\"") >&5
8463   (eval $ac_compile) 2>&5
8464   ac_status=$?
8465   echo "$as_me:8465: \$? = $ac_status" >&5
8466   (exit $ac_status); } &&
8467          { ac_try='test -s conftest.$ac_objext'
8468   { (eval echo "$as_me:8468: \"$ac_try\"") >&5
8469   (eval $ac_try) 2>&5
8470   ac_status=$?
8471   echo "$as_me:8471: \$? = $ac_status" >&5
8472   (exit $ac_status); }; }; then
8473   cf_cv_wint_t=no
8474 else
8475   echo "$as_me: failed program was:" >&5
8476 cat conftest.$ac_ext >&5
8477 cat >conftest.$ac_ext <<_ACEOF
8478 #line 8478 "configure"
8479 #include "confdefs.h"
8480
8481 #include <stdlib.h>
8482 #include <stdarg.h>
8483 #include <stdio.h>
8484 #include <wchar.h>
8485 #ifdef HAVE_LIBUTF8_H
8486 #include <libutf8.h>
8487 #endif
8488 int
8489 main ()
8490 {
8491 wint_t value
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   cf_cv_wint_t=yes
8509 else
8510   echo "$as_me: failed program was:" >&5
8511 cat conftest.$ac_ext >&5
8512 cf_cv_wint_t=unknown
8513 fi
8514 rm -f conftest.$ac_objext conftest.$ac_ext
8515 fi
8516 rm -f conftest.$ac_objext conftest.$ac_ext
8517 fi
8518 echo "$as_me:8518: result: $cf_cv_wint_t" >&5
8519 echo "${ECHO_T}$cf_cv_wint_t" >&6
8520
8521 if test "$cf_cv_wint_t" = yes ; then
8522         cat >>confdefs.h <<\EOF
8523 #define NEED_WCHAR_H 1
8524 EOF
8525
8526         NEED_WCHAR_H=1
8527 fi
8528
8529 # if we do not find wint_t in either place, use substitution to provide a fallback.
8530 if test "$cf_cv_wint_t" = unknown ; then
8531         NCURSES_WINT_T=1
8532 fi
8533
8534 # if we find wint_t in either place, use substitution to provide a fallback.
8535 if test "$cf_cv_wint_t" != unknown ; then
8536         NCURSES_OK_WINT_T=1
8537 fi
8538
8539         if test "$NCURSES_MBSTATE_T" != 0; then
8540                 cat >>confdefs.h <<\EOF
8541 #define NEED_MBSTATE_T_DEF 1
8542 EOF
8543
8544         fi
8545 fi
8546
8547 ###   use option --disable-lp64 to allow long chtype
8548 case $cf_cv_abi_version in
8549 [345]*)
8550         default_with_lp64=no
8551         ;;
8552 *)
8553         default_with_lp64=yes
8554         ;;
8555 esac
8556
8557 echo "$as_me:8557: checking whether to enable _LP64 definition in curses.h" >&5
8558 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8559
8560 # Check whether --enable-lp64 or --disable-lp64 was given.
8561 if test "${enable_lp64+set}" = set; then
8562   enableval="$enable_lp64"
8563   with_lp64=$enableval
8564 else
8565   with_lp64=$default_with_lp64
8566 fi;
8567 echo "$as_me:8567: result: $with_lp64" >&5
8568 echo "${ECHO_T}$with_lp64" >&6
8569
8570 if test "$with_lp64" = yes ; then
8571         cf_cv_enable_lp64=1
8572 else
8573         cf_cv_enable_lp64=0
8574 fi
8575
8576 # Check whether --enable-largefile or --disable-largefile was given.
8577 if test "${enable_largefile+set}" = set; then
8578   enableval="$enable_largefile"
8579
8580 fi;
8581 if test "$enable_largefile" != no; then
8582
8583   echo "$as_me:8583: checking for special C compiler options needed for large files" >&5
8584 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8585 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8586   echo $ECHO_N "(cached) $ECHO_C" >&6
8587 else
8588   ac_cv_sys_largefile_CC=no
8589      if test "$GCC" != yes; then
8590        ac_save_CC=$CC
8591        while :; do
8592          # IRIX 6.2 and later do not support large files by default,
8593          # so use the C compiler's -n32 option if that helps.
8594          cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597 #include <sys/types.h>
8598  /* Check that off_t can represent 2**63 - 1 correctly.
8599     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8600     since some C++ compilers masquerading as C compilers
8601     incorrectly reject 9223372036854775807.  */
8602 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8603   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8604                        && LARGE_OFF_T % 2147483647 == 1)
8605                       ? 1 : -1];
8606 int
8607 main ()
8608 {
8609
8610   ;
8611   return 0;
8612 }
8613 _ACEOF
8614          rm -f conftest.$ac_objext
8615 if { (eval echo "$as_me:8615: \"$ac_compile\"") >&5
8616   (eval $ac_compile) 2>&5
8617   ac_status=$?
8618   echo "$as_me:8618: \$? = $ac_status" >&5
8619   (exit $ac_status); } &&
8620          { ac_try='test -s conftest.$ac_objext'
8621   { (eval echo "$as_me:8621: \"$ac_try\"") >&5
8622   (eval $ac_try) 2>&5
8623   ac_status=$?
8624   echo "$as_me:8624: \$? = $ac_status" >&5
8625   (exit $ac_status); }; }; then
8626   break
8627 else
8628   echo "$as_me: failed program was:" >&5
8629 cat conftest.$ac_ext >&5
8630 fi
8631 rm -f conftest.$ac_objext
8632          CC="$CC -n32"
8633          rm -f conftest.$ac_objext
8634 if { (eval echo "$as_me:8634: \"$ac_compile\"") >&5
8635   (eval $ac_compile) 2>&5
8636   ac_status=$?
8637   echo "$as_me:8637: \$? = $ac_status" >&5
8638   (exit $ac_status); } &&
8639          { ac_try='test -s conftest.$ac_objext'
8640   { (eval echo "$as_me:8640: \"$ac_try\"") >&5
8641   (eval $ac_try) 2>&5
8642   ac_status=$?
8643   echo "$as_me:8643: \$? = $ac_status" >&5
8644   (exit $ac_status); }; }; then
8645   ac_cv_sys_largefile_CC=' -n32'; break
8646 else
8647   echo "$as_me: failed program was:" >&5
8648 cat conftest.$ac_ext >&5
8649 fi
8650 rm -f conftest.$ac_objext
8651          break
8652        done
8653        CC=$ac_save_CC
8654        rm -f conftest.$ac_ext
8655     fi
8656 fi
8657 echo "$as_me:8657: result: $ac_cv_sys_largefile_CC" >&5
8658 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8659   if test "$ac_cv_sys_largefile_CC" != no; then
8660     CC=$CC$ac_cv_sys_largefile_CC
8661   fi
8662
8663   echo "$as_me:8663: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8664 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8665 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8666   echo $ECHO_N "(cached) $ECHO_C" >&6
8667 else
8668   while :; do
8669   ac_cv_sys_file_offset_bits=no
8670   cat >conftest.$ac_ext <<_ACEOF
8671 #line 8671 "configure"
8672 #include "confdefs.h"
8673 #include <sys/types.h>
8674  /* Check that off_t can represent 2**63 - 1 correctly.
8675     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8676     since some C++ compilers masquerading as C compilers
8677     incorrectly reject 9223372036854775807.  */
8678 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8679   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8680                        && LARGE_OFF_T % 2147483647 == 1)
8681                       ? 1 : -1];
8682 int
8683 main ()
8684 {
8685
8686   ;
8687   return 0;
8688 }
8689 _ACEOF
8690 rm -f conftest.$ac_objext
8691 if { (eval echo "$as_me:8691: \"$ac_compile\"") >&5
8692   (eval $ac_compile) 2>&5
8693   ac_status=$?
8694   echo "$as_me:8694: \$? = $ac_status" >&5
8695   (exit $ac_status); } &&
8696          { ac_try='test -s conftest.$ac_objext'
8697   { (eval echo "$as_me:8697: \"$ac_try\"") >&5
8698   (eval $ac_try) 2>&5
8699   ac_status=$?
8700   echo "$as_me:8700: \$? = $ac_status" >&5
8701   (exit $ac_status); }; }; then
8702   break
8703 else
8704   echo "$as_me: failed program was:" >&5
8705 cat conftest.$ac_ext >&5
8706 fi
8707 rm -f conftest.$ac_objext conftest.$ac_ext
8708   cat >conftest.$ac_ext <<_ACEOF
8709 #line 8709 "configure"
8710 #include "confdefs.h"
8711 #define _FILE_OFFSET_BITS 64
8712 #include <sys/types.h>
8713  /* Check that off_t can represent 2**63 - 1 correctly.
8714     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8715     since some C++ compilers masquerading as C compilers
8716     incorrectly reject 9223372036854775807.  */
8717 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8718   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8719                        && LARGE_OFF_T % 2147483647 == 1)
8720                       ? 1 : -1];
8721 int
8722 main ()
8723 {
8724
8725   ;
8726   return 0;
8727 }
8728 _ACEOF
8729 rm -f conftest.$ac_objext
8730 if { (eval echo "$as_me:8730: \"$ac_compile\"") >&5
8731   (eval $ac_compile) 2>&5
8732   ac_status=$?
8733   echo "$as_me:8733: \$? = $ac_status" >&5
8734   (exit $ac_status); } &&
8735          { ac_try='test -s conftest.$ac_objext'
8736   { (eval echo "$as_me:8736: \"$ac_try\"") >&5
8737   (eval $ac_try) 2>&5
8738   ac_status=$?
8739   echo "$as_me:8739: \$? = $ac_status" >&5
8740   (exit $ac_status); }; }; then
8741   ac_cv_sys_file_offset_bits=64; break
8742 else
8743   echo "$as_me: failed program was:" >&5
8744 cat conftest.$ac_ext >&5
8745 fi
8746 rm -f conftest.$ac_objext conftest.$ac_ext
8747   break
8748 done
8749 fi
8750 echo "$as_me:8750: result: $ac_cv_sys_file_offset_bits" >&5
8751 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8752 if test "$ac_cv_sys_file_offset_bits" != no; then
8753
8754 cat >>confdefs.h <<EOF
8755 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8756 EOF
8757
8758 fi
8759 rm -f conftest*
8760   echo "$as_me:8760: checking for _LARGE_FILES value needed for large files" >&5
8761 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8762 if test "${ac_cv_sys_large_files+set}" = set; then
8763   echo $ECHO_N "(cached) $ECHO_C" >&6
8764 else
8765   while :; do
8766   ac_cv_sys_large_files=no
8767   cat >conftest.$ac_ext <<_ACEOF
8768 #line 8768 "configure"
8769 #include "confdefs.h"
8770 #include <sys/types.h>
8771  /* Check that off_t can represent 2**63 - 1 correctly.
8772     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8773     since some C++ compilers masquerading as C compilers
8774     incorrectly reject 9223372036854775807.  */
8775 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8776   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8777                        && LARGE_OFF_T % 2147483647 == 1)
8778                       ? 1 : -1];
8779 int
8780 main ()
8781 {
8782
8783   ;
8784   return 0;
8785 }
8786 _ACEOF
8787 rm -f conftest.$ac_objext
8788 if { (eval echo "$as_me:8788: \"$ac_compile\"") >&5
8789   (eval $ac_compile) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); } &&
8793          { ac_try='test -s conftest.$ac_objext'
8794   { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795   (eval $ac_try) 2>&5
8796   ac_status=$?
8797   echo "$as_me:8797: \$? = $ac_status" >&5
8798   (exit $ac_status); }; }; then
8799   break
8800 else
8801   echo "$as_me: failed program was:" >&5
8802 cat conftest.$ac_ext >&5
8803 fi
8804 rm -f conftest.$ac_objext conftest.$ac_ext
8805   cat >conftest.$ac_ext <<_ACEOF
8806 #line 8806 "configure"
8807 #include "confdefs.h"
8808 #define _LARGE_FILES 1
8809 #include <sys/types.h>
8810  /* Check that off_t can represent 2**63 - 1 correctly.
8811     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8812     since some C++ compilers masquerading as C compilers
8813     incorrectly reject 9223372036854775807.  */
8814 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8815   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8816                        && LARGE_OFF_T % 2147483647 == 1)
8817                       ? 1 : -1];
8818 int
8819 main ()
8820 {
8821
8822   ;
8823   return 0;
8824 }
8825 _ACEOF
8826 rm -f conftest.$ac_objext
8827 if { (eval echo "$as_me:8827: \"$ac_compile\"") >&5
8828   (eval $ac_compile) 2>&5
8829   ac_status=$?
8830   echo "$as_me:8830: \$? = $ac_status" >&5
8831   (exit $ac_status); } &&
8832          { ac_try='test -s conftest.$ac_objext'
8833   { (eval echo "$as_me:8833: \"$ac_try\"") >&5
8834   (eval $ac_try) 2>&5
8835   ac_status=$?
8836   echo "$as_me:8836: \$? = $ac_status" >&5
8837   (exit $ac_status); }; }; then
8838   ac_cv_sys_large_files=1; break
8839 else
8840   echo "$as_me: failed program was:" >&5
8841 cat conftest.$ac_ext >&5
8842 fi
8843 rm -f conftest.$ac_objext conftest.$ac_ext
8844   break
8845 done
8846 fi
8847 echo "$as_me:8847: result: $ac_cv_sys_large_files" >&5
8848 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8849 if test "$ac_cv_sys_large_files" != no; then
8850
8851 cat >>confdefs.h <<EOF
8852 #define _LARGE_FILES $ac_cv_sys_large_files
8853 EOF
8854
8855 fi
8856 rm -f conftest*
8857 fi
8858
8859     if test "$enable_largefile" != no ; then
8860         echo "$as_me:8860: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8861 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8862 if test "${ac_cv_sys_largefile_source+set}" = set; then
8863   echo $ECHO_N "(cached) $ECHO_C" >&6
8864 else
8865   while :; do
8866   ac_cv_sys_largefile_source=no
8867   cat >conftest.$ac_ext <<_ACEOF
8868 #line 8868 "configure"
8869 #include "confdefs.h"
8870 #include <stdio.h>
8871 int
8872 main ()
8873 {
8874 return !fseeko;
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   break
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 cat conftest.$ac_ext >&5
8895 fi
8896 rm -f conftest.$ac_objext conftest.$ac_ext
8897   cat >conftest.$ac_ext <<_ACEOF
8898 #line 8898 "configure"
8899 #include "confdefs.h"
8900 #define _LARGEFILE_SOURCE 1
8901 #include <stdio.h>
8902 int
8903 main ()
8904 {
8905 return !fseeko;
8906   ;
8907   return 0;
8908 }
8909 _ACEOF
8910 rm -f conftest.$ac_objext
8911 if { (eval echo "$as_me:8911: \"$ac_compile\"") >&5
8912   (eval $ac_compile) 2>&5
8913   ac_status=$?
8914   echo "$as_me:8914: \$? = $ac_status" >&5
8915   (exit $ac_status); } &&
8916          { ac_try='test -s conftest.$ac_objext'
8917   { (eval echo "$as_me:8917: \"$ac_try\"") >&5
8918   (eval $ac_try) 2>&5
8919   ac_status=$?
8920   echo "$as_me:8920: \$? = $ac_status" >&5
8921   (exit $ac_status); }; }; then
8922   ac_cv_sys_largefile_source=1; break
8923 else
8924   echo "$as_me: failed program was:" >&5
8925 cat conftest.$ac_ext >&5
8926 fi
8927 rm -f conftest.$ac_objext conftest.$ac_ext
8928   break
8929 done
8930 fi
8931 echo "$as_me:8931: result: $ac_cv_sys_largefile_source" >&5
8932 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8933 if test "$ac_cv_sys_largefile_source" != no; then
8934
8935 cat >>confdefs.h <<EOF
8936 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8937 EOF
8938
8939 fi
8940 rm -f conftest*
8941
8942 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8943 # in glibc 2.1.3, but that breaks too many other things.
8944 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8945 echo "$as_me:8945: checking for fseeko" >&5
8946 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8947 if test "${ac_cv_func_fseeko+set}" = set; then
8948   echo $ECHO_N "(cached) $ECHO_C" >&6
8949 else
8950   cat >conftest.$ac_ext <<_ACEOF
8951 #line 8951 "configure"
8952 #include "confdefs.h"
8953 #include <stdio.h>
8954 int
8955 main ()
8956 {
8957 return fseeko && fseeko (stdin, 0, 0);
8958   ;
8959   return 0;
8960 }
8961 _ACEOF
8962 rm -f conftest.$ac_objext conftest$ac_exeext
8963 if { (eval echo "$as_me:8963: \"$ac_link\"") >&5
8964   (eval $ac_link) 2>&5
8965   ac_status=$?
8966   echo "$as_me:8966: \$? = $ac_status" >&5
8967   (exit $ac_status); } &&
8968          { ac_try='test -s conftest$ac_exeext'
8969   { (eval echo "$as_me:8969: \"$ac_try\"") >&5
8970   (eval $ac_try) 2>&5
8971   ac_status=$?
8972   echo "$as_me:8972: \$? = $ac_status" >&5
8973   (exit $ac_status); }; }; then
8974   ac_cv_func_fseeko=yes
8975 else
8976   echo "$as_me: failed program was:" >&5
8977 cat conftest.$ac_ext >&5
8978 ac_cv_func_fseeko=no
8979 fi
8980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8981 fi
8982 echo "$as_me:8982: result: $ac_cv_func_fseeko" >&5
8983 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8984 if test $ac_cv_func_fseeko = yes; then
8985
8986 cat >>confdefs.h <<\EOF
8987 #define HAVE_FSEEKO 1
8988 EOF
8989
8990 fi
8991
8992         # Normally we would collect these definitions in the config.h,
8993         # but (like _XOPEN_SOURCE), some environments rely on having these
8994         # defined before any of the system headers are included.  Another
8995         # case comes up with C++, e.g., on AIX the compiler compiles the
8996         # header files by themselves before looking at the body files it is
8997         # told to compile.  For ncurses, those header files do not include
8998         # the config.h
8999         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9000         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9001         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9002
9003         echo "$as_me:9003: checking whether to use struct dirent64" >&5
9004 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9005 if test "${cf_cv_struct_dirent64+set}" = set; then
9006   echo $ECHO_N "(cached) $ECHO_C" >&6
9007 else
9008
9009                 cat >conftest.$ac_ext <<_ACEOF
9010 #line 9010 "configure"
9011 #include "confdefs.h"
9012
9013 #include <sys/types.h>
9014 #include <dirent.h>
9015
9016 int
9017 main ()
9018 {
9019
9020                 /* if transitional largefile support is setup, this is true */
9021                 extern struct dirent64 * readdir(DIR *);
9022                 struct dirent64 *x = readdir((DIR *)0);
9023                 struct dirent *y = readdir((DIR *)0);
9024                 int z = x - y;
9025
9026   ;
9027   return 0;
9028 }
9029 _ACEOF
9030 rm -f conftest.$ac_objext
9031 if { (eval echo "$as_me:9031: \"$ac_compile\"") >&5
9032   (eval $ac_compile) 2>&5
9033   ac_status=$?
9034   echo "$as_me:9034: \$? = $ac_status" >&5
9035   (exit $ac_status); } &&
9036          { ac_try='test -s conftest.$ac_objext'
9037   { (eval echo "$as_me:9037: \"$ac_try\"") >&5
9038   (eval $ac_try) 2>&5
9039   ac_status=$?
9040   echo "$as_me:9040: \$? = $ac_status" >&5
9041   (exit $ac_status); }; }; then
9042   cf_cv_struct_dirent64=yes
9043 else
9044   echo "$as_me: failed program was:" >&5
9045 cat conftest.$ac_ext >&5
9046 cf_cv_struct_dirent64=no
9047 fi
9048 rm -f conftest.$ac_objext conftest.$ac_ext
9049
9050 fi
9051 echo "$as_me:9051: result: $cf_cv_struct_dirent64" >&5
9052 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9053         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9054 #define HAVE_STRUCT_DIRENT64 1
9055 EOF
9056
9057     fi
9058
9059 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9060 echo "$as_me:9060: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9061 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9062
9063 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9064 if test "${enable_tparm_varargs+set}" = set; then
9065   enableval="$enable_tparm_varargs"
9066   with_tparm_varargs=$enableval
9067 else
9068   with_tparm_varargs=yes
9069 fi;
9070 echo "$as_me:9070: result: $with_tparm_varargs" >&5
9071 echo "${ECHO_T}$with_tparm_varargs" >&6
9072 NCURSES_TPARM_VARARGS=0
9073 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9074
9075 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9076 if test "$with_ticlib" != no ; then
9077 echo "$as_me:9077: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9078 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9079
9080 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9081 if test "${enable_tic_depends+set}" = set; then
9082   enableval="$enable_tic_depends"
9083   with_tic_depends=$enableval
9084 else
9085   with_tic_depends=yes
9086 fi;
9087 echo "$as_me:9087: result: $with_tic_depends" >&5
9088 echo "${ECHO_T}$with_tic_depends" >&6
9089 else
9090         with_tic_depends=no
9091 fi
9092
9093 ###   use option --with-bool to override bool's type
9094 echo "$as_me:9094: checking for type of bool" >&5
9095 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9096
9097 # Check whether --with-bool or --without-bool was given.
9098 if test "${with_bool+set}" = set; then
9099   withval="$with_bool"
9100   NCURSES_BOOL="$withval"
9101 else
9102   NCURSES_BOOL=auto
9103 fi;
9104 echo "$as_me:9104: result: $NCURSES_BOOL" >&5
9105 echo "${ECHO_T}$NCURSES_BOOL" >&6
9106
9107 echo "$as_me:9107: checking for alternate terminal capabilities file" >&5
9108 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9109
9110 # Check whether --with-caps or --without-caps was given.
9111 if test "${with_caps+set}" = set; then
9112   withval="$with_caps"
9113   TERMINFO_CAPS=Caps.$withval
9114 else
9115   TERMINFO_CAPS=Caps
9116 fi;
9117 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9118 echo "$as_me:9118: result: $TERMINFO_CAPS" >&5
9119 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9120
9121 ###   use option --with-chtype to override chtype's type
9122 echo "$as_me:9122: checking for type of chtype" >&5
9123 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9124
9125 # Check whether --with-chtype or --without-chtype was given.
9126 if test "${with_chtype+set}" = set; then
9127   withval="$with_chtype"
9128   NCURSES_CHTYPE="$withval"
9129 else
9130   NCURSES_CHTYPE=auto
9131 fi;
9132 echo "$as_me:9132: result: $NCURSES_CHTYPE" >&5
9133 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9134
9135 ###   use option --with-ospeed to override ospeed's type
9136 echo "$as_me:9136: checking for type of ospeed" >&5
9137 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9138
9139 # Check whether --with-ospeed or --without-ospeed was given.
9140 if test "${with_ospeed+set}" = set; then
9141   withval="$with_ospeed"
9142   NCURSES_OSPEED="$withval"
9143 else
9144   NCURSES_OSPEED=short
9145 fi;
9146 echo "$as_me:9146: result: $NCURSES_OSPEED" >&5
9147 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9148
9149 ###   use option --with-mmask-t to override mmask_t's type
9150 echo "$as_me:9150: checking for type of mmask_t" >&5
9151 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9152
9153 # Check whether --with-mmask-t or --without-mmask-t was given.
9154 if test "${with_mmask_t+set}" = set; then
9155   withval="$with_mmask_t"
9156   NCURSES_MMASK_T="$withval"
9157 else
9158   NCURSES_MMASK_T=auto
9159 fi;
9160 echo "$as_me:9160: result: $NCURSES_MMASK_T" >&5
9161 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9162
9163 ###   use option --with-ccharw-max to override CCHARW_MAX size
9164 echo "$as_me:9164: checking for size CCHARW_MAX" >&5
9165 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9166
9167 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9168 if test "${with_ccharw_max+set}" = set; then
9169   withval="$with_ccharw_max"
9170   NCURSES_CCHARW_MAX="$withval"
9171 else
9172   NCURSES_CCHARW_MAX=5
9173 fi;
9174 echo "$as_me:9174: result: $NCURSES_CCHARW_MAX" >&5
9175 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9176
9177 ### Enable compiling-in rcs id's
9178 echo "$as_me:9178: checking if RCS identifiers should be compiled-in" >&5
9179 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9180
9181 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9182 if test "${with_rcs_ids+set}" = set; then
9183   withval="$with_rcs_ids"
9184   with_rcs_ids=$withval
9185 else
9186   with_rcs_ids=no
9187 fi;
9188 echo "$as_me:9188: result: $with_rcs_ids" >&5
9189 echo "${ECHO_T}$with_rcs_ids" >&6
9190 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9191 #define USE_RCS_IDS 1
9192 EOF
9193
9194 ###############################################################################
9195
9196 echo "$as_me:9196: checking format of man-pages" >&5
9197 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9198
9199 # Check whether --with-manpage-format or --without-manpage-format was given.
9200 if test "${with_manpage_format+set}" = set; then
9201   withval="$with_manpage_format"
9202   MANPAGE_FORMAT=$withval
9203 else
9204   MANPAGE_FORMAT=unknown
9205 fi;
9206
9207 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9208 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9209
9210 cf_unknown=
9211
9212 case $MANPAGE_FORMAT in
9213 unknown)
9214   if test -z "$MANPATH" ; then
9215     MANPATH="/usr/man:/usr/share/man"
9216   fi
9217
9218   # look for the 'date' man-page (it's most likely to be installed!)
9219   MANPAGE_FORMAT=
9220   cf_preform=no
9221   cf_catonly=yes
9222   cf_example=date
9223
9224   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9225   for cf_dir in $MANPATH; do
9226     test -z "$cf_dir" && cf_dir=/usr/man
9227     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
9228     do
9229       cf_test=`echo $cf_name | sed -e 's/*//'`
9230       if test "x$cf_test" = "x$cf_name" ; then
9231
9232         case "$cf_name" in
9233         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9234         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9235         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9236         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9237         esac
9238
9239         case "$cf_name" in
9240         $cf_dir/man*)
9241           cf_catonly=no
9242           ;;
9243         $cf_dir/cat*)
9244           cf_preform=yes
9245           ;;
9246         esac
9247         break
9248       fi
9249
9250       # if we found a match in either man* or cat*, stop looking
9251       if test -n "$MANPAGE_FORMAT" ; then
9252         cf_found=no
9253         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9254         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9255         case "$cf_name" in
9256         $cf_dir/cat*)
9257           cf_found=yes
9258           ;;
9259         esac
9260         test $cf_found=yes && break
9261       fi
9262     done
9263     # only check the first directory in $MANPATH where we find manpages
9264     if test -n "$MANPAGE_FORMAT" ; then
9265        break
9266     fi
9267   done
9268   # if we did not find the example, just assume it is normal
9269   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9270   IFS="$ac_save_ifs"
9271   ;;
9272 *)
9273   for cf_option in $MANPAGE_FORMAT; do
9274      case $cf_option in #(vi
9275      gzip|compress|BSDI|normal|formatted|catonly)
9276        ;;
9277      *)
9278        cf_unknown="$cf_unknown $cf_option"
9279        ;;
9280      esac
9281   done
9282   ;;
9283 esac
9284
9285 echo "$as_me:9285: result: $MANPAGE_FORMAT" >&5
9286 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9287 if test -n "$cf_unknown" ; then
9288   { echo "$as_me:9288: WARNING: Unexpected manpage-format $cf_unknown" >&5
9289 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9290 fi
9291
9292 echo "$as_me:9292: checking for manpage renaming" >&5
9293 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9294
9295 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9296 if test "${with_manpage_renames+set}" = set; then
9297   withval="$with_manpage_renames"
9298   MANPAGE_RENAMES=$withval
9299 else
9300   MANPAGE_RENAMES=yes
9301 fi;
9302
9303 case ".$MANPAGE_RENAMES" in #(vi
9304 .no) #(vi
9305   ;;
9306 .|.yes)
9307   # Debian 'man' program?
9308   if test -f /etc/debian_version ; then
9309     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9310   else
9311     MANPAGE_RENAMES=no
9312   fi
9313   ;;
9314 esac
9315
9316 if test "$MANPAGE_RENAMES" != no ; then
9317   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9318     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9319   elif test ! -f $MANPAGE_RENAMES ; then
9320     { { echo "$as_me:9320: error: not a filename: $MANPAGE_RENAMES" >&5
9321 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9322    { (exit 1); exit 1; }; }
9323   fi
9324
9325   test ! -d man && mkdir man
9326
9327   # Construct a sed-script to perform renaming within man-pages
9328   if test -n "$MANPAGE_RENAMES" ; then
9329     test ! -d man && mkdir man
9330     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9331   fi
9332 fi
9333
9334 echo "$as_me:9334: result: $MANPAGE_RENAMES" >&5
9335 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9336
9337 echo "$as_me:9337: checking if manpage aliases will be installed" >&5
9338 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9339
9340 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9341 if test "${with_manpage_aliases+set}" = set; then
9342   withval="$with_manpage_aliases"
9343   MANPAGE_ALIASES=$withval
9344 else
9345   MANPAGE_ALIASES=yes
9346 fi;
9347
9348 echo "$as_me:9348: result: $MANPAGE_ALIASES" >&5
9349 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9350
9351 if test "$LN_S" = "ln -s"; then
9352         cf_use_symlinks=yes
9353 else
9354         cf_use_symlinks=no
9355 fi
9356
9357 MANPAGE_SYMLINKS=no
9358 if test "$MANPAGE_ALIASES" = yes ; then
9359 echo "$as_me:9359: checking if manpage symlinks should be used" >&5
9360 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9361
9362 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9363 if test "${with_manpage_symlinks+set}" = set; then
9364   withval="$with_manpage_symlinks"
9365   MANPAGE_SYMLINKS=$withval
9366 else
9367   MANPAGE_SYMLINKS=$cf_use_symlinks
9368 fi;
9369
9370 if test "$$cf_use_symlinks" = no; then
9371 if test "$MANPAGE_SYMLINKS" = yes ; then
9372         { echo "$as_me:9372: WARNING: cannot make symlinks" >&5
9373 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9374         MANPAGE_SYMLINKS=no
9375 fi
9376 fi
9377
9378 echo "$as_me:9378: result: $MANPAGE_SYMLINKS" >&5
9379 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9380 fi
9381
9382 echo "$as_me:9382: checking for manpage tbl" >&5
9383 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9384
9385 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9386 if test "${with_manpage_tbl+set}" = set; then
9387   withval="$with_manpage_tbl"
9388   MANPAGE_TBL=$withval
9389 else
9390   MANPAGE_TBL=no
9391 fi;
9392
9393 echo "$as_me:9393: result: $MANPAGE_TBL" >&5
9394 echo "${ECHO_T}$MANPAGE_TBL" >&6
9395
9396   if test "$prefix" = "NONE" ; then
9397      cf_prefix="$ac_default_prefix"
9398   else
9399      cf_prefix="$prefix"
9400   fi
9401
9402   case "$MANPAGE_FORMAT" in # (vi
9403   *catonly*) # (vi
9404     cf_format=yes
9405     cf_inboth=no
9406     ;;
9407   *formatted*) # (vi
9408     cf_format=yes
9409     cf_inboth=yes
9410     ;;
9411   *)
9412     cf_format=no
9413     cf_inboth=no
9414     ;;
9415   esac
9416
9417 test ! -d man && mkdir man
9418
9419 cf_so_strip=
9420 cf_compress=
9421 case "$MANPAGE_FORMAT" in #(vi
9422 *compress*) #(vi
9423         cf_so_strip="Z"
9424         cf_compress=compress
9425   ;;
9426 *gzip*) #(vi
9427         cf_so_strip="gz"
9428         cf_compress=gzip
9429   ;;
9430 esac
9431
9432 cf_edit_man=./edit_man.sh
9433 cf_man_alias=`pwd`/man_alias.sed
9434
9435 cat >$cf_edit_man <<CF_EOF
9436 #! /bin/sh
9437 # this script is generated by the configure-script CF_MAN_PAGES macro.
9438
9439 prefix="$cf_prefix"
9440 datadir="$datadir"
9441
9442 NCURSES_MAJOR="$NCURSES_MAJOR"
9443 NCURSES_MINOR="$NCURSES_MINOR"
9444 NCURSES_PATCH="$NCURSES_PATCH"
9445
9446 NCURSES_OSPEED="$NCURSES_OSPEED"
9447 TERMINFO="$TERMINFO"
9448
9449 INSTALL="$INSTALL"
9450 INSTALL_DATA="$INSTALL_DATA"
9451
9452 transform="$program_transform_name"
9453
9454 TMP=\${TMPDIR-/tmp}/man\$\$
9455 trap "rm -f \$TMP" 0 1 2 5 15
9456
9457 form=\$1
9458 shift || exit 1
9459
9460 verb=\$1
9461 shift || exit 1
9462
9463 mandir=\$1
9464 shift || exit 1
9465
9466 srcdir=\$1
9467 top_srcdir=\$srcdir/..
9468 shift || exit 1
9469
9470 if test "\$form" = normal ; then
9471         if test "$cf_format" = yes ; then
9472         if test "$cf_inboth" = no ; then
9473                 sh \$0 format \$verb \$mandir \$srcdir \$*
9474                 exit $?
9475         fi
9476         fi
9477         cf_subdir=\$mandir/man
9478         cf_tables=$MANPAGE_TBL
9479 else
9480         cf_subdir=\$mandir/cat
9481         cf_tables=yes
9482 fi
9483
9484 # process the list of source-files
9485 for i in \$* ; do
9486 case \$i in #(vi
9487 *.orig|*.rej) ;; #(vi
9488 *.[0-9]*)
9489         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9490         if test \$verb = installing ; then
9491         if test ! -d \$cf_subdir\${section} ; then
9492                 mkdir -p \$cf_subdir\$section
9493         fi
9494         fi
9495
9496         # replace variables in man page
9497         if test ! -f $cf_man_alias ; then
9498 cat >>$cf_man_alias <<-CF_EOF2
9499                 s,@DATADIR@,\$datadir,g
9500                 s,@TERMINFO@,\$TERMINFO,g
9501                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9502                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9503                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9504                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9505 CF_EOF
9506
9507         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9508         do
9509                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9510                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9511 cat >>$cf_edit_man <<-CF_EOF
9512                 s,@$cf_NAME@,$cf_name,g
9513 CF_EOF
9514         done
9515
9516 cat >>$cf_edit_man <<CF_EOF
9517 CF_EOF2
9518                 echo "...made $cf_man_alias"
9519         fi
9520
9521         aliases=
9522         cf_source=\`basename \$i\`
9523         inalias=\$cf_source
9524         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9525         if test ! -f \$inalias ; then
9526                 echo .. skipped \$cf_source
9527                 continue
9528         fi
9529 CF_EOF
9530
9531 if test "$MANPAGE_ALIASES" != no ; then
9532 cat >>$cf_edit_man <<CF_EOF
9533         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9534 CF_EOF
9535 fi
9536
9537 if test "$MANPAGE_RENAMES" = no ; then
9538 cat >>$cf_edit_man <<CF_EOF
9539         # perform program transformations for section 1 man pages
9540         if test \$section = 1 ; then
9541                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9542         else
9543                 cf_target=\$cf_subdir\${section}/\$cf_source
9544         fi
9545 CF_EOF
9546 else
9547 cat >>$cf_edit_man <<CF_EOF
9548         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9549         if test -z "\$cf_target" ; then
9550                 echo '? missing rename for '\$cf_source
9551                 cf_target="\$cf_source"
9552         fi
9553         cf_target="\$cf_subdir\${section}/\${cf_target}"
9554
9555 CF_EOF
9556 fi
9557
9558 cat >>$cf_edit_man <<CF_EOF
9559         sed     -f $cf_man_alias \\
9560 CF_EOF
9561
9562 if test -f $MANPAGE_RENAMES ; then
9563 cat >>$cf_edit_man <<CF_EOF
9564                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9565 CF_EOF
9566 else
9567 cat >>$cf_edit_man <<CF_EOF
9568                 < \$i >\$TMP
9569 CF_EOF
9570 fi
9571
9572 cat >>$cf_edit_man <<CF_EOF
9573 if test \$cf_tables = yes ; then
9574         tbl \$TMP >\$TMP.out
9575         mv \$TMP.out \$TMP
9576 fi
9577 CF_EOF
9578
9579 if test $with_curses_h != yes ; then
9580 cat >>$cf_edit_man <<CF_EOF
9581         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9582         mv \$TMP.out \$TMP
9583 CF_EOF
9584 fi
9585
9586 cat >>$cf_edit_man <<CF_EOF
9587         if test \$form = format ; then
9588                 nroff -man \$TMP >\$TMP.out
9589                 mv \$TMP.out \$TMP
9590         fi
9591 CF_EOF
9592
9593 if test -n "$cf_compress" ; then
9594 cat >>$cf_edit_man <<CF_EOF
9595         if test \$verb = installing ; then
9596         if ( $cf_compress -f \$TMP )
9597         then
9598                 mv \$TMP.$cf_so_strip \$TMP
9599         fi
9600         fi
9601         cf_target="\$cf_target.$cf_so_strip"
9602 CF_EOF
9603 fi
9604
9605 case "$MANPAGE_FORMAT" in #(vi
9606 *BSDI*)
9607 cat >>$cf_edit_man <<CF_EOF
9608         if test \$form = format ; then
9609                 # BSDI installs only .0 suffixes in the cat directories
9610                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9611         fi
9612 CF_EOF
9613   ;;
9614 esac
9615
9616 cat >>$cf_edit_man <<CF_EOF
9617         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9618         if test \$verb = installing ; then
9619                 echo \$verb \$cf_target
9620                 \$INSTALL_DATA \$TMP \$cf_target
9621                 test -d \$cf_subdir\${section} &&
9622                 test -n "\$aliases" && (
9623                         cd \$cf_subdir\${section} && (
9624                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9625                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9626                                 cf_target=\`basename \$cf_target\`
9627                                 for cf_alias in \$aliases
9628                                 do
9629                                         if test \$section = 1 ; then
9630                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9631                                         fi
9632
9633                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9634                                                 if test -f \$cf_alias\${suffix} ; then
9635                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9636                                                         then
9637                                                                 continue
9638                                                         fi
9639                                                 fi
9640                                                 echo .. \$verb alias \$cf_alias\${suffix}
9641                                                 rm -f \$cf_alias\${suffix}
9642                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9643                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9644                                                 echo ".so \$cf_source" >\$TMP
9645 CF_EOF
9646 if test -n "$cf_compress" ; then
9647 cat >>$cf_edit_man <<CF_EOF
9648                                                 if test -n "$cf_so_strip" ; then
9649                                                         $cf_compress -f \$TMP
9650                                                         mv \$TMP.$cf_so_strip \$TMP
9651                                                 fi
9652 CF_EOF
9653 fi
9654 cat >>$cf_edit_man <<CF_EOF
9655                                                 echo .. \$verb alias \$cf_alias\${suffix}
9656                                                 rm -f \$cf_alias\${suffix}
9657                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9658                                         fi
9659                                 done
9660                         )
9661                 )
9662         elif test \$verb = removing ; then
9663                 test -f \$cf_target && (
9664                         echo \$verb \$cf_target
9665                         rm -f \$cf_target
9666                 )
9667                 test -d \$cf_subdir\${section} &&
9668                 test -n "\$aliases" && (
9669                         cd \$cf_subdir\${section} && (
9670                                 for cf_alias in \$aliases
9671                                 do
9672                                         if test \$section = 1 ; then
9673                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9674                                         fi
9675
9676                                         echo .. \$verb alias \$cf_alias\${suffix}
9677                                         rm -f \$cf_alias\${suffix}
9678                                 done
9679                         )
9680                 )
9681         else
9682 #               echo ".hy 0"
9683                 cat \$TMP
9684         fi
9685         ;;
9686 esac
9687 done
9688
9689 if test $cf_inboth = yes ; then
9690 if test \$form != format ; then
9691         sh \$0 format \$verb \$mandir \$srcdir \$*
9692 fi
9693 fi
9694
9695 exit 0
9696 CF_EOF
9697 chmod 755 $cf_edit_man
9698
9699 ###############################################################################
9700
9701 ### Note that some functions (such as const) are normally disabled anyway.
9702 echo "$as_me:9702: checking if you want to build with function extensions" >&5
9703 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9704
9705 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9706 if test "${enable_ext_funcs+set}" = set; then
9707   enableval="$enable_ext_funcs"
9708   with_ext_funcs=$enableval
9709 else
9710   with_ext_funcs=yes
9711 fi;
9712 echo "$as_me:9712: result: $with_ext_funcs" >&5
9713 echo "${ECHO_T}$with_ext_funcs" >&6
9714 if test "$with_ext_funcs" = yes ; then
9715         NCURSES_EXT_FUNCS=1
9716         cat >>confdefs.h <<\EOF
9717 #define HAVE_CURSES_VERSION 1
9718 EOF
9719
9720         cat >>confdefs.h <<\EOF
9721 #define HAVE_HAS_KEY 1
9722 EOF
9723
9724         cat >>confdefs.h <<\EOF
9725 #define HAVE_RESIZETERM 1
9726 EOF
9727
9728         cat >>confdefs.h <<\EOF
9729 #define HAVE_RESIZE_TERM 1
9730 EOF
9731
9732         cat >>confdefs.h <<\EOF
9733 #define HAVE_USE_DEFAULT_COLORS 1
9734 EOF
9735
9736         cat >>confdefs.h <<\EOF
9737 #define HAVE_WRESIZE 1
9738 EOF
9739
9740         cat >>confdefs.h <<\EOF
9741 #define NCURSES_EXT_FUNCS 1
9742 EOF
9743
9744         GENERATED_EXT_FUNCS=generated
9745 else
9746         NCURSES_EXT_FUNCS=0
9747         GENERATED_EXT_FUNCS=
9748 fi
9749
9750 echo "$as_me:9750: checking if you want to build with experimental SCREEN extensions" >&5
9751 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9752
9753 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9754 if test "${enable_sp_funcs+set}" = set; then
9755   enableval="$enable_sp_funcs"
9756   with_sp_funcs=$enableval
9757 else
9758   with_sp_funcs=no
9759 fi;
9760 echo "$as_me:9760: result: $with_sp_funcs" >&5
9761 echo "${ECHO_T}$with_sp_funcs" >&6
9762 if test "$with_sp_funcs" = yes ; then
9763         NCURSES_SP_FUNCS=1
9764         cat >>confdefs.h <<\EOF
9765 #define NCURSES_SP_FUNCS 1
9766 EOF
9767
9768         GENERATED_SP_FUNCS=generated
9769 else
9770         NCURSES_SP_FUNCS=0
9771         GENERATED_SP_FUNCS=
9772 fi
9773
9774 echo "$as_me:9774: checking if you want to build with experimental terminal-driver" >&5
9775 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9776
9777 # Check whether --enable-term-driver or --disable-term-driver was given.
9778 if test "${enable_term_driver+set}" = set; then
9779   enableval="$enable_term_driver"
9780   with_term_driver=$enableval
9781 else
9782   with_term_driver=no
9783 fi;
9784 echo "$as_me:9784: result: $with_term_driver" >&5
9785 echo "${ECHO_T}$with_term_driver" >&6
9786 if test "$with_term_driver" = yes ; then
9787         cat >>confdefs.h <<\EOF
9788 #define USE_TERM_DRIVER 1
9789 EOF
9790
9791         if test "$with_sp_funcs" != yes ; then
9792                 { { echo "$as_me:9792: error: The term-driver option relies upon sp-funcs" >&5
9793 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9794    { (exit 1); exit 1; }; }
9795         fi
9796 fi
9797
9798 ###   use option --enable-const to turn on use of const beyond that in XSI.
9799 echo "$as_me:9799: checking for extended use of const keyword" >&5
9800 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9801
9802 # Check whether --enable-const or --disable-const was given.
9803 if test "${enable_const+set}" = set; then
9804   enableval="$enable_const"
9805   with_ext_const=$enableval
9806 else
9807   with_ext_const=no
9808 fi;
9809 echo "$as_me:9809: result: $with_ext_const" >&5
9810 echo "${ECHO_T}$with_ext_const" >&6
9811 NCURSES_CONST='/*nothing*/'
9812 if test "$with_ext_const" = yes ; then
9813         NCURSES_CONST=const
9814 fi
9815
9816 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9817 echo "$as_me:9817: checking if you want to use extended colors" >&5
9818 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9819
9820 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9821 if test "${enable_ext_colors+set}" = set; then
9822   enableval="$enable_ext_colors"
9823   with_ext_colors=$enableval
9824 else
9825   with_ext_colors=no
9826 fi;
9827 echo "$as_me:9827: result: $with_ext_colors" >&5
9828 echo "${ECHO_T}$with_ext_colors" >&6
9829 NCURSES_EXT_COLORS=0
9830 if test "$with_ext_colors" = yes ; then
9831         if test "$with_widec" != yes ; then
9832                 { { echo "$as_me:9832: error: This option applies only to wide-character library" >&5
9833 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9834    { (exit 1); exit 1; }; }
9835         else
9836                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9837
9838 if test "${with_abi_version+set}" != set; then
9839         case $cf_cv_rel_version in
9840         5.*)
9841                 cf_cv_rel_version=6.0
9842                 cf_cv_abi_version=6
9843                 { echo "$as_me:9843: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9844 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9845                 ;;
9846         esac
9847 fi
9848
9849         fi
9850         NCURSES_EXT_COLORS=1
9851         cat >>confdefs.h <<\EOF
9852 #define NCURSES_EXT_COLORS 1
9853 EOF
9854
9855 fi
9856
9857 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9858 echo "$as_me:9858: checking if you want to use extended mouse encoding" >&5
9859 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9860
9861 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9862 if test "${enable_ext_mouse+set}" = set; then
9863   enableval="$enable_ext_mouse"
9864   with_ext_mouse=$enableval
9865 else
9866   with_ext_mouse=no
9867 fi;
9868 echo "$as_me:9868: result: $with_ext_mouse" >&5
9869 echo "${ECHO_T}$with_ext_mouse" >&6
9870 NCURSES_MOUSE_VERSION=1
9871 if test "$with_ext_mouse" = yes ; then
9872         NCURSES_MOUSE_VERSION=2
9873
9874 if test "${with_abi_version+set}" != set; then
9875         case $cf_cv_rel_version in
9876         5.*)
9877                 cf_cv_rel_version=6.0
9878                 cf_cv_abi_version=6
9879                 { echo "$as_me:9879: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9880 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9881                 ;;
9882         esac
9883 fi
9884
9885 fi
9886
9887 echo "$as_me:9887: checking if you want \$NCURSES_NO_PADDING code" >&5
9888 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9889
9890 # Check whether --enable-no-padding or --disable-no-padding was given.
9891 if test "${enable_no_padding+set}" = set; then
9892   enableval="$enable_no_padding"
9893   with_no_padding=$enableval
9894 else
9895   with_no_padding=$with_ext_funcs
9896 fi;
9897 echo "$as_me:9897: result: $with_no_padding" >&5
9898 echo "${ECHO_T}$with_no_padding" >&6
9899 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9900 #define NCURSES_NO_PADDING 1
9901 EOF
9902
9903 echo "$as_me:9903: checking for ANSI C header files" >&5
9904 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9905 if test "${ac_cv_header_stdc+set}" = set; then
9906   echo $ECHO_N "(cached) $ECHO_C" >&6
9907 else
9908   cat >conftest.$ac_ext <<_ACEOF
9909 #line 9909 "configure"
9910 #include "confdefs.h"
9911 #include <stdlib.h>
9912 #include <stdarg.h>
9913 #include <string.h>
9914 #include <float.h>
9915
9916 _ACEOF
9917 if { (eval echo "$as_me:9917: \"$ac_cpp conftest.$ac_ext\"") >&5
9918   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9919   ac_status=$?
9920   egrep -v '^ *\+' conftest.er1 >conftest.err
9921   rm -f conftest.er1
9922   cat conftest.err >&5
9923   echo "$as_me:9923: \$? = $ac_status" >&5
9924   (exit $ac_status); } >/dev/null; then
9925   if test -s conftest.err; then
9926     ac_cpp_err=$ac_c_preproc_warn_flag
9927   else
9928     ac_cpp_err=
9929   fi
9930 else
9931   ac_cpp_err=yes
9932 fi
9933 if test -z "$ac_cpp_err"; then
9934   ac_cv_header_stdc=yes
9935 else
9936   echo "$as_me: failed program was:" >&5
9937   cat conftest.$ac_ext >&5
9938   ac_cv_header_stdc=no
9939 fi
9940 rm -f conftest.err conftest.$ac_ext
9941
9942 if test $ac_cv_header_stdc = yes; then
9943   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9944   cat >conftest.$ac_ext <<_ACEOF
9945 #line 9945 "configure"
9946 #include "confdefs.h"
9947 #include <string.h>
9948
9949 _ACEOF
9950 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9951   egrep "memchr" >/dev/null 2>&1; then
9952   :
9953 else
9954   ac_cv_header_stdc=no
9955 fi
9956 rm -f conftest*
9957
9958 fi
9959
9960 if test $ac_cv_header_stdc = yes; then
9961   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9962   cat >conftest.$ac_ext <<_ACEOF
9963 #line 9963 "configure"
9964 #include "confdefs.h"
9965 #include <stdlib.h>
9966
9967 _ACEOF
9968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9969   egrep "free" >/dev/null 2>&1; then
9970   :
9971 else
9972   ac_cv_header_stdc=no
9973 fi
9974 rm -f conftest*
9975
9976 fi
9977
9978 if test $ac_cv_header_stdc = yes; then
9979   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9980   if test "$cross_compiling" = yes; then
9981   :
9982 else
9983   cat >conftest.$ac_ext <<_ACEOF
9984 #line 9984 "configure"
9985 #include "confdefs.h"
9986 #include <ctype.h>
9987 #if ((' ' & 0x0FF) == 0x020)
9988 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9989 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9990 #else
9991 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9992                      || ('j' <= (c) && (c) <= 'r') \
9993                      || ('s' <= (c) && (c) <= 'z'))
9994 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9995 #endif
9996
9997 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9998 int
9999 main ()
10000 {
10001   int i;
10002   for (i = 0; i < 256; i++)
10003     if (XOR (islower (i), ISLOWER (i))
10004         || toupper (i) != TOUPPER (i))
10005       $ac_main_return(2);
10006   $ac_main_return (0);
10007 }
10008 _ACEOF
10009 rm -f conftest$ac_exeext
10010 if { (eval echo "$as_me:10010: \"$ac_link\"") >&5
10011   (eval $ac_link) 2>&5
10012   ac_status=$?
10013   echo "$as_me:10013: \$? = $ac_status" >&5
10014   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10015   { (eval echo "$as_me:10015: \"$ac_try\"") >&5
10016   (eval $ac_try) 2>&5
10017   ac_status=$?
10018   echo "$as_me:10018: \$? = $ac_status" >&5
10019   (exit $ac_status); }; }; then
10020   :
10021 else
10022   echo "$as_me: program exited with status $ac_status" >&5
10023 echo "$as_me: failed program was:" >&5
10024 cat conftest.$ac_ext >&5
10025 ac_cv_header_stdc=no
10026 fi
10027 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10028 fi
10029 fi
10030 fi
10031 echo "$as_me:10031: result: $ac_cv_header_stdc" >&5
10032 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10033 if test $ac_cv_header_stdc = yes; then
10034
10035 cat >>confdefs.h <<\EOF
10036 #define STDC_HEADERS 1
10037 EOF
10038
10039 fi
10040
10041 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10042
10043 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10044                   inttypes.h stdint.h unistd.h
10045 do
10046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10047 echo "$as_me:10047: checking for $ac_header" >&5
10048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10050   echo $ECHO_N "(cached) $ECHO_C" >&6
10051 else
10052   cat >conftest.$ac_ext <<_ACEOF
10053 #line 10053 "configure"
10054 #include "confdefs.h"
10055 $ac_includes_default
10056 #include <$ac_header>
10057 _ACEOF
10058 rm -f conftest.$ac_objext
10059 if { (eval echo "$as_me:10059: \"$ac_compile\"") >&5
10060   (eval $ac_compile) 2>&5
10061   ac_status=$?
10062   echo "$as_me:10062: \$? = $ac_status" >&5
10063   (exit $ac_status); } &&
10064          { ac_try='test -s conftest.$ac_objext'
10065   { (eval echo "$as_me:10065: \"$ac_try\"") >&5
10066   (eval $ac_try) 2>&5
10067   ac_status=$?
10068   echo "$as_me:10068: \$? = $ac_status" >&5
10069   (exit $ac_status); }; }; then
10070   eval "$as_ac_Header=yes"
10071 else
10072   echo "$as_me: failed program was:" >&5
10073 cat conftest.$ac_ext >&5
10074 eval "$as_ac_Header=no"
10075 fi
10076 rm -f conftest.$ac_objext conftest.$ac_ext
10077 fi
10078 echo "$as_me:10078: result: `eval echo '${'$as_ac_Header'}'`" >&5
10079 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10080 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10081   cat >>confdefs.h <<EOF
10082 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10083 EOF
10084
10085 fi
10086 done
10087
10088 echo "$as_me:10088: checking for signed char" >&5
10089 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10090 if test "${ac_cv_type_signed_char+set}" = set; then
10091   echo $ECHO_N "(cached) $ECHO_C" >&6
10092 else
10093   cat >conftest.$ac_ext <<_ACEOF
10094 #line 10094 "configure"
10095 #include "confdefs.h"
10096 $ac_includes_default
10097 int
10098 main ()
10099 {
10100 if ((signed char *) 0)
10101   return 0;
10102 if (sizeof (signed char))
10103   return 0;
10104   ;
10105   return 0;
10106 }
10107 _ACEOF
10108 rm -f conftest.$ac_objext
10109 if { (eval echo "$as_me:10109: \"$ac_compile\"") >&5
10110   (eval $ac_compile) 2>&5
10111   ac_status=$?
10112   echo "$as_me:10112: \$? = $ac_status" >&5
10113   (exit $ac_status); } &&
10114          { ac_try='test -s conftest.$ac_objext'
10115   { (eval echo "$as_me:10115: \"$ac_try\"") >&5
10116   (eval $ac_try) 2>&5
10117   ac_status=$?
10118   echo "$as_me:10118: \$? = $ac_status" >&5
10119   (exit $ac_status); }; }; then
10120   ac_cv_type_signed_char=yes
10121 else
10122   echo "$as_me: failed program was:" >&5
10123 cat conftest.$ac_ext >&5
10124 ac_cv_type_signed_char=no
10125 fi
10126 rm -f conftest.$ac_objext conftest.$ac_ext
10127 fi
10128 echo "$as_me:10128: result: $ac_cv_type_signed_char" >&5
10129 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10130
10131 echo "$as_me:10131: checking size of signed char" >&5
10132 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10133 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10134   echo $ECHO_N "(cached) $ECHO_C" >&6
10135 else
10136   if test "$ac_cv_type_signed_char" = yes; then
10137   if test "$cross_compiling" = yes; then
10138   # Depending upon the size, compute the lo and hi bounds.
10139 cat >conftest.$ac_ext <<_ACEOF
10140 #line 10140 "configure"
10141 #include "confdefs.h"
10142 $ac_includes_default
10143 int
10144 main ()
10145 {
10146 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10147   ;
10148   return 0;
10149 }
10150 _ACEOF
10151 rm -f conftest.$ac_objext
10152 if { (eval echo "$as_me:10152: \"$ac_compile\"") >&5
10153   (eval $ac_compile) 2>&5
10154   ac_status=$?
10155   echo "$as_me:10155: \$? = $ac_status" >&5
10156   (exit $ac_status); } &&
10157          { ac_try='test -s conftest.$ac_objext'
10158   { (eval echo "$as_me:10158: \"$ac_try\"") >&5
10159   (eval $ac_try) 2>&5
10160   ac_status=$?
10161   echo "$as_me:10161: \$? = $ac_status" >&5
10162   (exit $ac_status); }; }; then
10163   ac_lo=0 ac_mid=0
10164   while :; do
10165     cat >conftest.$ac_ext <<_ACEOF
10166 #line 10166 "configure"
10167 #include "confdefs.h"
10168 $ac_includes_default
10169 int
10170 main ()
10171 {
10172 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10173   ;
10174   return 0;
10175 }
10176 _ACEOF
10177 rm -f conftest.$ac_objext
10178 if { (eval echo "$as_me:10178: \"$ac_compile\"") >&5
10179   (eval $ac_compile) 2>&5
10180   ac_status=$?
10181   echo "$as_me:10181: \$? = $ac_status" >&5
10182   (exit $ac_status); } &&
10183          { ac_try='test -s conftest.$ac_objext'
10184   { (eval echo "$as_me:10184: \"$ac_try\"") >&5
10185   (eval $ac_try) 2>&5
10186   ac_status=$?
10187   echo "$as_me:10187: \$? = $ac_status" >&5
10188   (exit $ac_status); }; }; then
10189   ac_hi=$ac_mid; break
10190 else
10191   echo "$as_me: failed program was:" >&5
10192 cat conftest.$ac_ext >&5
10193 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10194 fi
10195 rm -f conftest.$ac_objext conftest.$ac_ext
10196   done
10197 else
10198   echo "$as_me: failed program was:" >&5
10199 cat conftest.$ac_ext >&5
10200 ac_hi=-1 ac_mid=-1
10201   while :; do
10202     cat >conftest.$ac_ext <<_ACEOF
10203 #line 10203 "configure"
10204 #include "confdefs.h"
10205 $ac_includes_default
10206 int
10207 main ()
10208 {
10209 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10210   ;
10211   return 0;
10212 }
10213 _ACEOF
10214 rm -f conftest.$ac_objext
10215 if { (eval echo "$as_me:10215: \"$ac_compile\"") >&5
10216   (eval $ac_compile) 2>&5
10217   ac_status=$?
10218   echo "$as_me:10218: \$? = $ac_status" >&5
10219   (exit $ac_status); } &&
10220          { ac_try='test -s conftest.$ac_objext'
10221   { (eval echo "$as_me:10221: \"$ac_try\"") >&5
10222   (eval $ac_try) 2>&5
10223   ac_status=$?
10224   echo "$as_me:10224: \$? = $ac_status" >&5
10225   (exit $ac_status); }; }; then
10226   ac_lo=$ac_mid; break
10227 else
10228   echo "$as_me: failed program was:" >&5
10229 cat conftest.$ac_ext >&5
10230 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10231 fi
10232 rm -f conftest.$ac_objext conftest.$ac_ext
10233   done
10234 fi
10235 rm -f conftest.$ac_objext conftest.$ac_ext
10236 # Binary search between lo and hi bounds.
10237 while test "x$ac_lo" != "x$ac_hi"; do
10238   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10239   cat >conftest.$ac_ext <<_ACEOF
10240 #line 10240 "configure"
10241 #include "confdefs.h"
10242 $ac_includes_default
10243 int
10244 main ()
10245 {
10246 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10247   ;
10248   return 0;
10249 }
10250 _ACEOF
10251 rm -f conftest.$ac_objext
10252 if { (eval echo "$as_me:10252: \"$ac_compile\"") >&5
10253   (eval $ac_compile) 2>&5
10254   ac_status=$?
10255   echo "$as_me:10255: \$? = $ac_status" >&5
10256   (exit $ac_status); } &&
10257          { ac_try='test -s conftest.$ac_objext'
10258   { (eval echo "$as_me:10258: \"$ac_try\"") >&5
10259   (eval $ac_try) 2>&5
10260   ac_status=$?
10261   echo "$as_me:10261: \$? = $ac_status" >&5
10262   (exit $ac_status); }; }; then
10263   ac_hi=$ac_mid
10264 else
10265   echo "$as_me: failed program was:" >&5
10266 cat conftest.$ac_ext >&5
10267 ac_lo=`expr $ac_mid + 1`
10268 fi
10269 rm -f conftest.$ac_objext conftest.$ac_ext
10270 done
10271 ac_cv_sizeof_signed_char=$ac_lo
10272 else
10273   if test "$cross_compiling" = yes; then
10274   { { echo "$as_me:10274: error: cannot run test program while cross compiling" >&5
10275 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10276    { (exit 1); exit 1; }; }
10277 else
10278   cat >conftest.$ac_ext <<_ACEOF
10279 #line 10279 "configure"
10280 #include "confdefs.h"
10281 $ac_includes_default
10282 int
10283 main ()
10284 {
10285 FILE *f = fopen ("conftest.val", "w");
10286 if (!f)
10287   $ac_main_return (1);
10288 fprintf (f, "%d", (sizeof (signed char)));
10289 fclose (f);
10290   ;
10291   return 0;
10292 }
10293 _ACEOF
10294 rm -f conftest$ac_exeext
10295 if { (eval echo "$as_me:10295: \"$ac_link\"") >&5
10296   (eval $ac_link) 2>&5
10297   ac_status=$?
10298   echo "$as_me:10298: \$? = $ac_status" >&5
10299   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10300   { (eval echo "$as_me:10300: \"$ac_try\"") >&5
10301   (eval $ac_try) 2>&5
10302   ac_status=$?
10303   echo "$as_me:10303: \$? = $ac_status" >&5
10304   (exit $ac_status); }; }; then
10305   ac_cv_sizeof_signed_char=`cat conftest.val`
10306 else
10307   echo "$as_me: program exited with status $ac_status" >&5
10308 echo "$as_me: failed program was:" >&5
10309 cat conftest.$ac_ext >&5
10310 fi
10311 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10312 fi
10313 fi
10314 rm -f conftest.val
10315 else
10316   ac_cv_sizeof_signed_char=0
10317 fi
10318 fi
10319 echo "$as_me:10319: result: $ac_cv_sizeof_signed_char" >&5
10320 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10321 cat >>confdefs.h <<EOF
10322 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10323 EOF
10324
10325 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10326         NCURSES_SBOOL="signed char"
10327 else
10328         NCURSES_SBOOL="char"
10329 fi
10330 echo "$as_me:10330: checking if you want to use signed Boolean array in term.h" >&5
10331 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10332
10333 # Check whether --enable-signed-char or --disable-signed-char was given.
10334 if test "${enable_signed_char+set}" = set; then
10335   enableval="$enable_signed_char"
10336   with_signed_char=$enableval
10337 else
10338   with_signed_char=no
10339 fi;
10340 echo "$as_me:10340: result: $with_signed_char" >&5
10341 echo "${ECHO_T}$with_signed_char" >&6
10342 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10343
10344 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10345 echo "$as_me:10345: checking if you want SIGWINCH handler" >&5
10346 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10347
10348 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10349 if test "${enable_sigwinch+set}" = set; then
10350   enableval="$enable_sigwinch"
10351   with_sigwinch=$enableval
10352 else
10353   with_sigwinch=$with_ext_funcs
10354 fi;
10355 echo "$as_me:10355: result: $with_sigwinch" >&5
10356 echo "${ECHO_T}$with_sigwinch" >&6
10357 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10358 #define USE_SIGWINCH 1
10359 EOF
10360
10361 ###   use option --enable-tcap-names to allow user to define new capabilities
10362 echo "$as_me:10362: checking if you want user-definable terminal capabilities like termcap" >&5
10363 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10364
10365 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10366 if test "${enable_tcap_names+set}" = set; then
10367   enableval="$enable_tcap_names"
10368   with_tcap_names=$enableval
10369 else
10370   with_tcap_names=$with_ext_funcs
10371 fi;
10372 echo "$as_me:10372: result: $with_tcap_names" >&5
10373 echo "${ECHO_T}$with_tcap_names" >&6
10374 NCURSES_XNAMES=0
10375 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10376
10377 ###############################################################################
10378 # These options are relatively safe to experiment with.
10379
10380 echo "$as_me:10380: checking if you want all development code" >&5
10381 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10382
10383 # Check whether --with-develop or --without-develop was given.
10384 if test "${with_develop+set}" = set; then
10385   withval="$with_develop"
10386   with_develop=$withval
10387 else
10388   with_develop=no
10389 fi;
10390 echo "$as_me:10390: result: $with_develop" >&5
10391 echo "${ECHO_T}$with_develop" >&6
10392
10393 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10394 echo "$as_me:10394: checking if you want hard-tabs code" >&5
10395 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10396
10397 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10398 if test "${enable_hard_tabs+set}" = set; then
10399   enableval="$enable_hard_tabs"
10400
10401 else
10402   enable_hard_tabs=$with_develop
10403 fi;
10404 echo "$as_me:10404: result: $enable_hard_tabs" >&5
10405 echo "${ECHO_T}$enable_hard_tabs" >&6
10406 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10407 #define USE_HARD_TABS 1
10408 EOF
10409
10410 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10411 echo "$as_me:10411: checking if you want limited support for xmc" >&5
10412 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10413
10414 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10415 if test "${enable_xmc_glitch+set}" = set; then
10416   enableval="$enable_xmc_glitch"
10417
10418 else
10419   enable_xmc_glitch=$with_develop
10420 fi;
10421 echo "$as_me:10421: result: $enable_xmc_glitch" >&5
10422 echo "${ECHO_T}$enable_xmc_glitch" >&6
10423 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10424 #define USE_XMC_SUPPORT 1
10425 EOF
10426
10427 ###############################################################################
10428 # These are just experimental, probably should not be in a package:
10429
10430 echo "$as_me:10430: checking if you do not want to assume colors are white-on-black" >&5
10431 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10432
10433 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10434 if test "${enable_assumed_color+set}" = set; then
10435   enableval="$enable_assumed_color"
10436   with_assumed_color=$enableval
10437 else
10438   with_assumed_color=yes
10439 fi;
10440 echo "$as_me:10440: result: $with_assumed_color" >&5
10441 echo "${ECHO_T}$with_assumed_color" >&6
10442 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10443 #define USE_ASSUMED_COLOR 1
10444 EOF
10445
10446 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10447 echo "$as_me:10447: checking if you want hashmap scrolling-optimization code" >&5
10448 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10449
10450 # Check whether --enable-hashmap or --disable-hashmap was given.
10451 if test "${enable_hashmap+set}" = set; then
10452   enableval="$enable_hashmap"
10453   with_hashmap=$enableval
10454 else
10455   with_hashmap=yes
10456 fi;
10457 echo "$as_me:10457: result: $with_hashmap" >&5
10458 echo "${ECHO_T}$with_hashmap" >&6
10459 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10460 #define USE_HASHMAP 1
10461 EOF
10462
10463 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10464 echo "$as_me:10464: checking if you want colorfgbg code" >&5
10465 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10466
10467 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10468 if test "${enable_colorfgbg+set}" = set; then
10469   enableval="$enable_colorfgbg"
10470   with_colorfgbg=$enableval
10471 else
10472   with_colorfgbg=no
10473 fi;
10474 echo "$as_me:10474: result: $with_colorfgbg" >&5
10475 echo "${ECHO_T}$with_colorfgbg" >&6
10476 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10477 #define USE_COLORFGBG 1
10478 EOF
10479
10480 ###   use option --enable-interop to turn on use of bindings used for interop
10481 echo "$as_me:10481: checking if you want interop bindings" >&5
10482 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10483
10484 # Check whether --enable-interop or --disable-interop was given.
10485 if test "${enable_interop+set}" = set; then
10486   enableval="$enable_interop"
10487   with_exp_interop=$enableval
10488 else
10489   with_exp_interop=no
10490 fi;
10491 echo "$as_me:10491: result: $with_exp_interop" >&5
10492 echo "${ECHO_T}$with_exp_interop" >&6
10493
10494 NCURSES_INTEROP_FUNCS=0
10495 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10496
10497 # This is still experimental (20080329), but should ultimately be moved to
10498 # the script-block --with-normal, etc.
10499
10500 echo "$as_me:10500: checking if you want to link with the pthread library" >&5
10501 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10502
10503 # Check whether --with-pthread or --without-pthread was given.
10504 if test "${with_pthread+set}" = set; then
10505   withval="$with_pthread"
10506   with_pthread=$withval
10507 else
10508   with_pthread=no
10509 fi;
10510 echo "$as_me:10510: result: $with_pthread" >&5
10511 echo "${ECHO_T}$with_pthread" >&6
10512
10513 if test "$with_pthread" != no ; then
10514     echo "$as_me:10514: checking for pthread.h" >&5
10515 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10516 if test "${ac_cv_header_pthread_h+set}" = set; then
10517   echo $ECHO_N "(cached) $ECHO_C" >&6
10518 else
10519   cat >conftest.$ac_ext <<_ACEOF
10520 #line 10520 "configure"
10521 #include "confdefs.h"
10522 #include <pthread.h>
10523 _ACEOF
10524 if { (eval echo "$as_me:10524: \"$ac_cpp conftest.$ac_ext\"") >&5
10525   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10526   ac_status=$?
10527   egrep -v '^ *\+' conftest.er1 >conftest.err
10528   rm -f conftest.er1
10529   cat conftest.err >&5
10530   echo "$as_me:10530: \$? = $ac_status" >&5
10531   (exit $ac_status); } >/dev/null; then
10532   if test -s conftest.err; then
10533     ac_cpp_err=$ac_c_preproc_warn_flag
10534   else
10535     ac_cpp_err=
10536   fi
10537 else
10538   ac_cpp_err=yes
10539 fi
10540 if test -z "$ac_cpp_err"; then
10541   ac_cv_header_pthread_h=yes
10542 else
10543   echo "$as_me: failed program was:" >&5
10544   cat conftest.$ac_ext >&5
10545   ac_cv_header_pthread_h=no
10546 fi
10547 rm -f conftest.err conftest.$ac_ext
10548 fi
10549 echo "$as_me:10549: result: $ac_cv_header_pthread_h" >&5
10550 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10551 if test $ac_cv_header_pthread_h = yes; then
10552
10553         cat >>confdefs.h <<\EOF
10554 #define HAVE_PTHREADS_H 1
10555 EOF
10556
10557         echo "$as_me:10557: checking if we can link with the pthread library" >&5
10558 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10559         cf_save_LIBS="$LIBS"
10560         LIBS="-lpthread $LIBS"
10561         cat >conftest.$ac_ext <<_ACEOF
10562 #line 10562 "configure"
10563 #include "confdefs.h"
10564
10565 #include <pthread.h>
10566
10567 int
10568 main ()
10569 {
10570
10571         int rc = pthread_create(0,0,0,0);
10572
10573   ;
10574   return 0;
10575 }
10576 _ACEOF
10577 rm -f conftest.$ac_objext conftest$ac_exeext
10578 if { (eval echo "$as_me:10578: \"$ac_link\"") >&5
10579   (eval $ac_link) 2>&5
10580   ac_status=$?
10581   echo "$as_me:10581: \$? = $ac_status" >&5
10582   (exit $ac_status); } &&
10583          { ac_try='test -s conftest$ac_exeext'
10584   { (eval echo "$as_me:10584: \"$ac_try\"") >&5
10585   (eval $ac_try) 2>&5
10586   ac_status=$?
10587   echo "$as_me:10587: \$? = $ac_status" >&5
10588   (exit $ac_status); }; }; then
10589   with_pthread=yes
10590 else
10591   echo "$as_me: failed program was:" >&5
10592 cat conftest.$ac_ext >&5
10593 with_pthread=no
10594 fi
10595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10596         LIBS="$cf_save_LIBS"
10597         echo "$as_me:10597: result: $with_pthread" >&5
10598 echo "${ECHO_T}$with_pthread" >&6
10599
10600         if test "$with_pthread" = yes ; then
10601             LIBS="-lpthread $LIBS"
10602             cat >>confdefs.h <<\EOF
10603 #define HAVE_LIBPTHREADS 1
10604 EOF
10605
10606         else
10607             { { echo "$as_me:10607: error: Cannot link with pthread library" >&5
10608 echo "$as_me: error: Cannot link with pthread library" >&2;}
10609    { (exit 1); exit 1; }; }
10610         fi
10611
10612 fi
10613
10614 fi
10615
10616 echo "$as_me:10616: checking if you want to allow EINTR in wgetch with pthreads" >&5
10617 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
10618
10619 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
10620 if test "${enable_pthreads_eintr+set}" = set; then
10621   enableval="$enable_pthreads_eintr"
10622   use_pthreads_eintr=$enableval
10623 else
10624   use_pthreads_eintr=no
10625 fi;
10626 echo "$as_me:10626: result: $use_pthreads_eintr" >&5
10627 echo "${ECHO_T}$use_pthreads_eintr" >&6
10628 if test $use_pthreads_eintr = yes ; then
10629     cat >>confdefs.h <<\EOF
10630 #define USE_PTHREADS_EINTR 1
10631 EOF
10632
10633 fi
10634
10635 echo "$as_me:10635: checking if you want to use weak-symbols for pthreads" >&5
10636 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10637
10638 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10639 if test "${enable_weak_symbols+set}" = set; then
10640   enableval="$enable_weak_symbols"
10641   use_weak_symbols=$enableval
10642 else
10643   use_weak_symbols=no
10644 fi;
10645 echo "$as_me:10645: result: $use_weak_symbols" >&5
10646 echo "${ECHO_T}$use_weak_symbols" >&6
10647 if test "$use_weak_symbols" = yes ; then
10648
10649 echo "$as_me:10649: checking if $CC supports weak symbols" >&5
10650 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10651 if test "${cf_cv_weak_symbols+set}" = set; then
10652   echo $ECHO_N "(cached) $ECHO_C" >&6
10653 else
10654
10655 cat >conftest.$ac_ext <<_ACEOF
10656 #line 10656 "configure"
10657 #include "confdefs.h"
10658
10659 #include <stdio.h>
10660 int
10661 main ()
10662 {
10663
10664 #if defined(__GNUC__)
10665 #  if defined __USE_ISOC99
10666 #    define _cat_pragma(exp)    _Pragma(#exp)
10667 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10668 #  else
10669 #    define _weak_pragma(exp)
10670 #  endif
10671 #  define _declare(name)        __extension__ extern __typeof__(name) name
10672 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10673 #endif
10674
10675 weak_symbol(fopen);
10676
10677   ;
10678   return 0;
10679 }
10680 _ACEOF
10681 rm -f conftest.$ac_objext
10682 if { (eval echo "$as_me:10682: \"$ac_compile\"") >&5
10683   (eval $ac_compile) 2>&5
10684   ac_status=$?
10685   echo "$as_me:10685: \$? = $ac_status" >&5
10686   (exit $ac_status); } &&
10687          { ac_try='test -s conftest.$ac_objext'
10688   { (eval echo "$as_me:10688: \"$ac_try\"") >&5
10689   (eval $ac_try) 2>&5
10690   ac_status=$?
10691   echo "$as_me:10691: \$? = $ac_status" >&5
10692   (exit $ac_status); }; }; then
10693   cf_cv_weak_symbols=yes
10694 else
10695   echo "$as_me: failed program was:" >&5
10696 cat conftest.$ac_ext >&5
10697 cf_cv_weak_symbols=no
10698 fi
10699 rm -f conftest.$ac_objext conftest.$ac_ext
10700
10701 fi
10702 echo "$as_me:10702: result: $cf_cv_weak_symbols" >&5
10703 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10704
10705 else
10706     cf_cv_weak_symbols=no
10707 fi
10708
10709 if test $cf_cv_weak_symbols = yes ; then
10710     cat >>confdefs.h <<\EOF
10711 #define USE_WEAK_SYMBOLS 1
10712 EOF
10713
10714 fi
10715
10716 PTHREAD=
10717 if test "$with_pthread" = "yes" ; then
10718     cat >>confdefs.h <<\EOF
10719 #define USE_PTHREADS 1
10720 EOF
10721
10722     enable_reentrant=yes
10723     if test $cf_cv_weak_symbols = yes ; then
10724         PTHREAD=-lpthread
10725     fi
10726 fi
10727
10728 # Reentrant code has to be opaque; there's little advantage to making ncurses
10729 # opaque outside of that, so there is no --enable-opaque option.  We can use
10730 # this option without --with-pthreads, but this will be always set for
10731 # pthreads.
10732 echo "$as_me:10732: checking if you want experimental reentrant code" >&5
10733 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10734
10735 # Check whether --enable-reentrant or --disable-reentrant was given.
10736 if test "${enable_reentrant+set}" = set; then
10737   enableval="$enable_reentrant"
10738   with_reentrant=$enableval
10739 else
10740   with_reentrant=no
10741 fi;
10742 echo "$as_me:10742: result: $with_reentrant" >&5
10743 echo "${ECHO_T}$with_reentrant" >&6
10744 if test "$with_reentrant" = yes ; then
10745         cf_cv_enable_reentrant=1
10746         cf_cv_enable_opaque="NCURSES_INTERNALS"
10747         NCURSES_OPAQUE=1
10748         NCURSES_SIZE_T=int
10749         if test $cf_cv_weak_symbols = yes ; then
10750
10751 # remove pthread library from $LIBS
10752 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10753
10754                 TEST_LIBS="-lpthread $TEST_LIBS"
10755                 TEST_LIBS2="-lpthread $TEST_LIBS2"
10756         fi
10757         LIB_SUFFIX="t${LIB_SUFFIX}"
10758         cat >>confdefs.h <<\EOF
10759 #define USE_REENTRANT 1
10760 EOF
10761
10762 if test "${with_abi_version+set}" != set; then
10763         case $cf_cv_rel_version in
10764         5.*)
10765                 cf_cv_rel_version=6.0
10766                 cf_cv_abi_version=6
10767                 { echo "$as_me:10767: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10768 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10769                 ;;
10770         esac
10771 fi
10772
10773 else
10774         cf_cv_enable_reentrant=0
10775         cf_cv_enable_opaque="NCURSES_OPAQUE"
10776         NCURSES_OPAQUE=0
10777         NCURSES_SIZE_T=short
10778 fi
10779
10780 ### Allow using a different wrap-prefix
10781 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10782         echo "$as_me:10782: checking for prefix used to wrap public variables" >&5
10783 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10784
10785 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10786 if test "${with_wrap_prefix+set}" = set; then
10787   withval="$with_wrap_prefix"
10788   NCURSES_WRAP_PREFIX=$withval
10789 else
10790   NCURSES_WRAP_PREFIX=_nc_
10791 fi;
10792         echo "$as_me:10792: result: $NCURSES_WRAP_PREFIX" >&5
10793 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10794 else
10795         NCURSES_WRAP_PREFIX=_nc_
10796 fi
10797
10798 cat >>confdefs.h <<EOF
10799 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10800 EOF
10801
10802 echo "$as_me:10802: checking if you want experimental safe-sprintf code" >&5
10803 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10804
10805 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10806 if test "${enable_safe_sprintf+set}" = set; then
10807   enableval="$enable_safe_sprintf"
10808   with_safe_sprintf=$enableval
10809 else
10810   with_safe_sprintf=no
10811 fi;
10812 echo "$as_me:10812: result: $with_safe_sprintf" >&5
10813 echo "${ECHO_T}$with_safe_sprintf" >&6
10814 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10815 #define USE_SAFE_SPRINTF 1
10816 EOF
10817
10818 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10819 # when hashmap is used scroll hints are useless
10820 if test "$with_hashmap" = no ; then
10821 echo "$as_me:10821: checking if you want to experiment without scrolling-hints code" >&5
10822 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10823
10824 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10825 if test "${enable_scroll_hints+set}" = set; then
10826   enableval="$enable_scroll_hints"
10827   with_scroll_hints=$enableval
10828 else
10829   with_scroll_hints=yes
10830 fi;
10831 echo "$as_me:10831: result: $with_scroll_hints" >&5
10832 echo "${ECHO_T}$with_scroll_hints" >&6
10833 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10834 #define USE_SCROLL_HINTS 1
10835 EOF
10836
10837 fi
10838
10839 echo "$as_me:10839: checking if you want experimental wgetch-events code" >&5
10840 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10841
10842 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10843 if test "${enable_wgetch_events+set}" = set; then
10844   enableval="$enable_wgetch_events"
10845   with_wgetch_events=$enableval
10846 else
10847   with_wgetch_events=no
10848 fi;
10849 echo "$as_me:10849: result: $with_wgetch_events" >&5
10850 echo "${ECHO_T}$with_wgetch_events" >&6
10851 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10852 #define NCURSES_WGETCH_EVENTS 1
10853 EOF
10854
10855 ###############################################################################
10856
10857 ###     use option --disable-echo to suppress full display compiling commands
10858 echo "$as_me:10858: checking if you want to display full commands during build" >&5
10859 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10860
10861 # Check whether --enable-echo or --disable-echo was given.
10862 if test "${enable_echo+set}" = set; then
10863   enableval="$enable_echo"
10864   with_echo=$enableval
10865 else
10866   with_echo=yes
10867 fi;
10868 if test "$with_echo" = yes; then
10869         ECHO_LINK=
10870 else
10871         ECHO_LINK='@ echo linking $@ ... ;'
10872         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10873         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10874 fi
10875 echo "$as_me:10875: result: $with_echo" >&5
10876 echo "${ECHO_T}$with_echo" >&6
10877
10878 ###     use option --enable-warnings to turn on all gcc warnings
10879 echo "$as_me:10879: checking if you want to see compiler warnings" >&5
10880 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10881
10882 # Check whether --enable-warnings or --disable-warnings was given.
10883 if test "${enable_warnings+set}" = set; then
10884   enableval="$enable_warnings"
10885   with_warnings=$enableval
10886 fi;
10887 echo "$as_me:10887: result: $with_warnings" >&5
10888 echo "${ECHO_T}$with_warnings" >&6
10889
10890 if test "x$with_warnings" = "xyes"; then
10891         ADAFLAGS="$ADAFLAGS -gnatg"
10892
10893 INTEL_COMPILER=no
10894
10895 if test "$GCC" = yes ; then
10896         case $host_os in
10897         linux*|gnu*)
10898                 echo "$as_me:10898: checking if this is really Intel C compiler" >&5
10899 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10900                 cf_save_CFLAGS="$CFLAGS"
10901                 CFLAGS="$CFLAGS -no-gcc"
10902                 cat >conftest.$ac_ext <<_ACEOF
10903 #line 10903 "configure"
10904 #include "confdefs.h"
10905
10906 int
10907 main ()
10908 {
10909
10910 #ifdef __INTEL_COMPILER
10911 #else
10912 make an error
10913 #endif
10914
10915   ;
10916   return 0;
10917 }
10918 _ACEOF
10919 rm -f conftest.$ac_objext
10920 if { (eval echo "$as_me:10920: \"$ac_compile\"") >&5
10921   (eval $ac_compile) 2>&5
10922   ac_status=$?
10923   echo "$as_me:10923: \$? = $ac_status" >&5
10924   (exit $ac_status); } &&
10925          { ac_try='test -s conftest.$ac_objext'
10926   { (eval echo "$as_me:10926: \"$ac_try\"") >&5
10927   (eval $ac_try) 2>&5
10928   ac_status=$?
10929   echo "$as_me:10929: \$? = $ac_status" >&5
10930   (exit $ac_status); }; }; then
10931   INTEL_COMPILER=yes
10932 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10933
10934 else
10935   echo "$as_me: failed program was:" >&5
10936 cat conftest.$ac_ext >&5
10937 fi
10938 rm -f conftest.$ac_objext conftest.$ac_ext
10939                 CFLAGS="$cf_save_CFLAGS"
10940                 echo "$as_me:10940: result: $INTEL_COMPILER" >&5
10941 echo "${ECHO_T}$INTEL_COMPILER" >&6
10942                 ;;
10943         esac
10944 fi
10945
10946 cat > conftest.$ac_ext <<EOF
10947 #line 10947 "${as_me-configure}"
10948 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10949 EOF
10950
10951 if test "$INTEL_COMPILER" = yes
10952 then
10953 # The "-wdXXX" options suppress warnings:
10954 # remark #1419: external declaration in primary source file
10955 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10956 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10957 # remark #193: zero used for undefined preprocessing identifier
10958 # remark #593: variable "curs_sb_left_arrow" was set but never used
10959 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10960 # remark #869: parameter "tw" was never referenced
10961 # remark #981: operands are evaluated in unspecified order
10962 # warning #279: controlling expression is constant
10963
10964         { echo "$as_me:10964: checking for $CC warning options..." >&5
10965 echo "$as_me: checking for $CC warning options..." >&6;}
10966         cf_save_CFLAGS="$CFLAGS"
10967         EXTRA_CFLAGS="-Wall"
10968         for cf_opt in \
10969                 wd1419 \
10970                 wd1683 \
10971                 wd1684 \
10972                 wd193 \
10973                 wd593 \
10974                 wd279 \
10975                 wd810 \
10976                 wd869 \
10977                 wd981
10978         do
10979                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10980                 if { (eval echo "$as_me:10980: \"$ac_compile\"") >&5
10981   (eval $ac_compile) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit $ac_status); }; then
10985                         test -n "$verbose" && echo "$as_me:10985: result: ... -$cf_opt" >&5
10986 echo "${ECHO_T}... -$cf_opt" >&6
10987                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10988                 fi
10989         done
10990         CFLAGS="$cf_save_CFLAGS"
10991
10992 elif test "$GCC" = yes
10993 then
10994         { echo "$as_me:10994: checking for $CC warning options..." >&5
10995 echo "$as_me: checking for $CC warning options..." >&6;}
10996         cf_save_CFLAGS="$CFLAGS"
10997         EXTRA_CFLAGS=
10998         cf_warn_CONST=""
10999         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11000         for cf_opt in W Wall \
11001                 Wbad-function-cast \
11002                 Wcast-align \
11003                 Wcast-qual \
11004                 Winline \
11005                 Wmissing-declarations \
11006                 Wmissing-prototypes \
11007                 Wnested-externs \
11008                 Wpointer-arith \
11009                 Wshadow \
11010                 Wstrict-prototypes \
11011                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11012         do
11013                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11014                 if { (eval echo "$as_me:11014: \"$ac_compile\"") >&5
11015   (eval $ac_compile) 2>&5
11016   ac_status=$?
11017   echo "$as_me:11017: \$? = $ac_status" >&5
11018   (exit $ac_status); }; then
11019                         test -n "$verbose" && echo "$as_me:11019: result: ... -$cf_opt" >&5
11020 echo "${ECHO_T}... -$cf_opt" >&6
11021                         case $cf_opt in #(vi
11022                         Wcast-qual) #(vi
11023                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11024                                 ;;
11025                         Winline) #(vi
11026                                 case $GCC_VERSION in
11027                                 [34].*)
11028                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11029
11030 echo "${as_me-configure}:11030: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11031
11032                                         continue;;
11033                                 esac
11034                                 ;;
11035                         esac
11036                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11037                 fi
11038         done
11039         CFLAGS="$cf_save_CFLAGS"
11040 fi
11041 rm -f conftest*
11042
11043         if test "$cf_with_cxx" = yes ; then
11044
11045 INTEL_CPLUSPLUS=no
11046
11047 if test "$GCC" = yes ; then
11048         case $host_os in
11049         linux*|gnu*)
11050                 echo "$as_me:11050: checking if this is really Intel C++ compiler" >&5
11051 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11052                 cf_save_CFLAGS="$CXXFLAGS"
11053                 CXXFLAGS="$CXXFLAGS -no-gcc"
11054                 cat >conftest.$ac_ext <<_ACEOF
11055 #line 11055 "configure"
11056 #include "confdefs.h"
11057
11058 int
11059 main ()
11060 {
11061
11062 #ifdef __INTEL_COMPILER
11063 #else
11064 make an error
11065 #endif
11066
11067   ;
11068   return 0;
11069 }
11070 _ACEOF
11071 rm -f conftest.$ac_objext
11072 if { (eval echo "$as_me:11072: \"$ac_compile\"") >&5
11073   (eval $ac_compile) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit $ac_status); } &&
11077          { ac_try='test -s conftest.$ac_objext'
11078   { (eval echo "$as_me:11078: \"$ac_try\"") >&5
11079   (eval $ac_try) 2>&5
11080   ac_status=$?
11081   echo "$as_me:11081: \$? = $ac_status" >&5
11082   (exit $ac_status); }; }; then
11083   INTEL_CPLUSPLUS=yes
11084 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11085
11086 else
11087   echo "$as_me: failed program was:" >&5
11088 cat conftest.$ac_ext >&5
11089 fi
11090 rm -f conftest.$ac_objext conftest.$ac_ext
11091                 CXXFLAGS="$cf_save_CFLAGS"
11092                 echo "$as_me:11092: result: $INTEL_CPLUSPLUS" >&5
11093 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11094                 ;;
11095         esac
11096 fi
11097
11098 ac_ext=cc
11099 ac_cpp='$CXXCPP $CPPFLAGS'
11100 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11101 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11102 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11103 ac_main_return=return
11104
11105 cat > conftest.$ac_ext <<EOF
11106 #line 11106 "configure"
11107 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11108 EOF
11109
11110 if test "$INTEL_CPLUSPLUS" = yes
11111 then
11112 # The "-wdXXX" options suppress warnings:
11113 # remark #1419: external declaration in primary source file
11114 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11115 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11116 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11117 # remark #193: zero used for undefined preprocessing identifier
11118 # remark #593: variable "curs_sb_left_arrow" was set but never used
11119 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11120 # remark #869: parameter "tw" was never referenced
11121 # remark #981: operands are evaluated in unspecified order
11122 # warning #269: invalid format string conversion
11123
11124         { echo "$as_me:11124: checking for $CC warning options..." >&5
11125 echo "$as_me: checking for $CC warning options..." >&6;}
11126         cf_save_CXXFLAGS="$CXXFLAGS"
11127         EXTRA_CXXFLAGS="-Wall"
11128         for cf_opt in \
11129                 wd1419 \
11130                 wd1682 \
11131                 wd1683 \
11132                 wd1684 \
11133                 wd193 \
11134                 wd279 \
11135                 wd593 \
11136                 wd810 \
11137                 wd869 \
11138                 wd981
11139         do
11140                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11141                 if { (eval echo "$as_me:11141: \"$ac_compile\"") >&5
11142   (eval $ac_compile) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit $ac_status); }; then
11146                         test -n "$verbose" && echo "$as_me:11146: result: ... -$cf_opt" >&5
11147 echo "${ECHO_T}... -$cf_opt" >&6
11148                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11149                 fi
11150         done
11151         CXXFLAGS="$cf_save_CXXFLAGS"
11152
11153 elif test "$GXX" = yes
11154 then
11155         { echo "$as_me:11155: checking for $CXX warning options..." >&5
11156 echo "$as_me: checking for $CXX warning options..." >&6;}
11157         cf_save_CXXFLAGS="$CXXFLAGS"
11158         EXTRA_CXXFLAGS="-W -Wall"
11159         cf_gxx_extra_warnings=""
11160         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11161         case "$GCC_VERSION" in
11162         [1-2].*)
11163                 ;;
11164         *)
11165                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11166                 ;;
11167         esac
11168         for cf_opt in \
11169                 Wabi \
11170                 fabi-version=0 \
11171                 Woverloaded-virtual \
11172                 Wsign-promo \
11173                 Wsynth \
11174                 Wold-style-cast \
11175                 Wcast-align \
11176                 Wcast-qual \
11177                 Wmissing-prototypes \
11178                 Wpointer-arith \
11179                 Wshadow \
11180                 Wstrict-prototypes \
11181                 Wundef $cf_gxx_extra_warnings Wno-unused
11182         do
11183                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11184                 if { (eval echo "$as_me:11184: \"$ac_compile\"") >&5
11185   (eval $ac_compile) 2>&5
11186   ac_status=$?
11187   echo "$as_me:11187: \$? = $ac_status" >&5
11188   (exit $ac_status); }; then
11189                         test -n "$verbose" && echo "$as_me:11189: result: ... -$cf_opt" >&5
11190 echo "${ECHO_T}... -$cf_opt" >&6
11191                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11192                 else
11193                         test -n "$verbose" && echo "$as_me:11193: result: ... no -$cf_opt" >&5
11194 echo "${ECHO_T}... no -$cf_opt" >&6
11195                 fi
11196         done
11197         CXXFLAGS="$cf_save_CXXFLAGS"
11198 fi
11199
11200 rm -f conftest*
11201 ac_ext=c
11202 ac_cpp='$CPP $CPPFLAGS'
11203 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11204 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11205 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11206 ac_main_return=return
11207
11208         fi
11209 fi
11210
11211 if test "$GCC" = yes
11212 then
11213 cat > conftest.i <<EOF
11214 #ifndef GCC_PRINTF
11215 #define GCC_PRINTF 0
11216 #endif
11217 #ifndef GCC_SCANF
11218 #define GCC_SCANF 0
11219 #endif
11220 #ifndef GCC_NORETURN
11221 #define GCC_NORETURN /* nothing */
11222 #endif
11223 #ifndef GCC_UNUSED
11224 #define GCC_UNUSED /* nothing */
11225 #endif
11226 EOF
11227 if test "$GCC" = yes
11228 then
11229         { echo "$as_me:11229: checking for $CC __attribute__ directives..." >&5
11230 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11231 cat > conftest.$ac_ext <<EOF
11232 #line 11232 "${as_me-configure}"
11233 #include "confdefs.h"
11234 #include "conftest.h"
11235 #include "conftest.i"
11236 #if     GCC_PRINTF
11237 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11238 #else
11239 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11240 #endif
11241 #if     GCC_SCANF
11242 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11243 #else
11244 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11245 #endif
11246 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11247 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11248 extern void foo(void) GCC_NORETURN;
11249 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11250 EOF
11251         cf_printf_attribute=no
11252         cf_scanf_attribute=no
11253         for cf_attribute in scanf printf unused noreturn
11254         do
11255
11256 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11257
11258                 cf_directive="__attribute__(($cf_attribute))"
11259                 echo "checking for $CC $cf_directive" 1>&5
11260
11261                 case $cf_attribute in #(vi
11262                 printf) #(vi
11263                         cf_printf_attribute=yes
11264                         cat >conftest.h <<EOF
11265 #define GCC_$cf_ATTRIBUTE 1
11266 EOF
11267                         ;;
11268                 scanf) #(vi
11269                         cf_scanf_attribute=yes
11270                         cat >conftest.h <<EOF
11271 #define GCC_$cf_ATTRIBUTE 1
11272 EOF
11273                         ;;
11274                 *) #(vi
11275                         cat >conftest.h <<EOF
11276 #define GCC_$cf_ATTRIBUTE $cf_directive
11277 EOF
11278                         ;;
11279                 esac
11280
11281                 if { (eval echo "$as_me:11281: \"$ac_compile\"") >&5
11282   (eval $ac_compile) 2>&5
11283   ac_status=$?
11284   echo "$as_me:11284: \$? = $ac_status" >&5
11285   (exit $ac_status); }; then
11286                         test -n "$verbose" && echo "$as_me:11286: result: ... $cf_attribute" >&5
11287 echo "${ECHO_T}... $cf_attribute" >&6
11288                         cat conftest.h >>confdefs.h
11289                         case $cf_attribute in #(vi
11290                         printf) #(vi
11291                                 if test "$cf_printf_attribute" = no ; then
11292                                         cat >>confdefs.h <<EOF
11293 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11294 EOF
11295                                 else
11296                                         cat >>confdefs.h <<EOF
11297 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11298 EOF
11299                                 fi
11300                                 ;;
11301                         scanf) #(vi
11302                                 if test "$cf_scanf_attribute" = no ; then
11303                                         cat >>confdefs.h <<EOF
11304 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11305 EOF
11306                                 else
11307                                         cat >>confdefs.h <<EOF
11308 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11309 EOF
11310                                 fi
11311                                 ;;
11312                         esac
11313                 fi
11314         done
11315 else
11316         fgrep define conftest.i >>confdefs.h
11317 fi
11318 rm -rf conftest*
11319 fi
11320
11321 ###     use option --enable-assertions to turn on generation of assertion code
11322 echo "$as_me:11322: checking if you want to enable runtime assertions" >&5
11323 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11324
11325 # Check whether --enable-assertions or --disable-assertions was given.
11326 if test "${enable_assertions+set}" = set; then
11327   enableval="$enable_assertions"
11328   with_assertions=$enableval
11329 else
11330   with_assertions=no
11331 fi;
11332 echo "$as_me:11332: result: $with_assertions" >&5
11333 echo "${ECHO_T}$with_assertions" >&6
11334 if test -n "$GCC"
11335 then
11336         if test "$with_assertions" = no
11337         then
11338                 cat >>confdefs.h <<\EOF
11339 #define NDEBUG 1
11340 EOF
11341
11342                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11343         else
11344                 ADAFLAGS="$ADAFLAGS -gnata"
11345         fi
11346 fi
11347
11348 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11349
11350 echo "$as_me:11350: checking if you want to use dmalloc for testing" >&5
11351 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11352
11353 # Check whether --with-dmalloc or --without-dmalloc was given.
11354 if test "${with_dmalloc+set}" = set; then
11355   withval="$with_dmalloc"
11356   cat >>confdefs.h <<\EOF
11357 #define USE_DMALLOC 1
11358 EOF
11359
11360         : ${with_cflags:=-g}
11361         : ${with_no_leaks:=yes}
11362          with_dmalloc=yes
11363 else
11364   with_dmalloc=
11365 fi;
11366 echo "$as_me:11366: result: ${with_dmalloc:-no}" >&5
11367 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11368
11369 case .$with_cflags in #(vi
11370 .*-g*)
11371         case .$CFLAGS in #(vi
11372         .*-g*) #(vi
11373                 ;;
11374         *)
11375
11376 cf_fix_cppflags=no
11377 cf_new_cflags=
11378 cf_new_cppflags=
11379 cf_new_extra_cppflags=
11380
11381 for cf_add_cflags in -g
11382 do
11383 case $cf_fix_cppflags in
11384 no)
11385         case $cf_add_cflags in #(vi
11386         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11387                 case $cf_add_cflags in
11388                 -D*)
11389                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11390
11391                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11392                                 && test -z "${cf_tst_cflags}" \
11393                                 && cf_fix_cppflags=yes
11394
11395                         if test $cf_fix_cppflags = yes ; then
11396                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11397                                 continue
11398                         elif test "${cf_tst_cflags}" = "\"'" ; then
11399                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11400                                 continue
11401                         fi
11402                         ;;
11403                 esac
11404                 case "$CPPFLAGS" in
11405                 *$cf_add_cflags) #(vi
11406                         ;;
11407                 *) #(vi
11408                         case $cf_add_cflags in #(vi
11409                         -D*)
11410                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11411
11412 CPPFLAGS=`echo "$CPPFLAGS" | \
11413         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11414                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11415
11416                                 ;;
11417                         esac
11418                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11419                         ;;
11420                 esac
11421                 ;;
11422         *)
11423                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11424                 ;;
11425         esac
11426         ;;
11427 yes)
11428         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11429
11430         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11431
11432         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11433                 && test -z "${cf_tst_cflags}" \
11434                 && cf_fix_cppflags=no
11435         ;;
11436 esac
11437 done
11438
11439 if test -n "$cf_new_cflags" ; then
11440
11441         CFLAGS="$CFLAGS $cf_new_cflags"
11442 fi
11443
11444 if test -n "$cf_new_cppflags" ; then
11445
11446         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11447 fi
11448
11449 if test -n "$cf_new_extra_cppflags" ; then
11450
11451         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11452 fi
11453
11454                 ;;
11455         esac
11456         ;;
11457 esac
11458
11459 if test "$with_dmalloc" = yes ; then
11460         echo "$as_me:11460: checking for dmalloc.h" >&5
11461 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11462 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11463   echo $ECHO_N "(cached) $ECHO_C" >&6
11464 else
11465   cat >conftest.$ac_ext <<_ACEOF
11466 #line 11466 "configure"
11467 #include "confdefs.h"
11468 #include <dmalloc.h>
11469 _ACEOF
11470 if { (eval echo "$as_me:11470: \"$ac_cpp conftest.$ac_ext\"") >&5
11471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11472   ac_status=$?
11473   egrep -v '^ *\+' conftest.er1 >conftest.err
11474   rm -f conftest.er1
11475   cat conftest.err >&5
11476   echo "$as_me:11476: \$? = $ac_status" >&5
11477   (exit $ac_status); } >/dev/null; then
11478   if test -s conftest.err; then
11479     ac_cpp_err=$ac_c_preproc_warn_flag
11480   else
11481     ac_cpp_err=
11482   fi
11483 else
11484   ac_cpp_err=yes
11485 fi
11486 if test -z "$ac_cpp_err"; then
11487   ac_cv_header_dmalloc_h=yes
11488 else
11489   echo "$as_me: failed program was:" >&5
11490   cat conftest.$ac_ext >&5
11491   ac_cv_header_dmalloc_h=no
11492 fi
11493 rm -f conftest.err conftest.$ac_ext
11494 fi
11495 echo "$as_me:11495: result: $ac_cv_header_dmalloc_h" >&5
11496 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11497 if test $ac_cv_header_dmalloc_h = yes; then
11498
11499 echo "$as_me:11499: checking for dmalloc_debug in -ldmalloc" >&5
11500 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11501 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11502   echo $ECHO_N "(cached) $ECHO_C" >&6
11503 else
11504   ac_check_lib_save_LIBS=$LIBS
11505 LIBS="-ldmalloc  $LIBS"
11506 cat >conftest.$ac_ext <<_ACEOF
11507 #line 11507 "configure"
11508 #include "confdefs.h"
11509
11510 /* Override any gcc2 internal prototype to avoid an error.  */
11511 #ifdef __cplusplus
11512 extern "C"
11513 #endif
11514 /* We use char because int might match the return type of a gcc2
11515    builtin and then its argument prototype would still apply.  */
11516 char dmalloc_debug ();
11517 int
11518 main ()
11519 {
11520 dmalloc_debug ();
11521   ;
11522   return 0;
11523 }
11524 _ACEOF
11525 rm -f conftest.$ac_objext conftest$ac_exeext
11526 if { (eval echo "$as_me:11526: \"$ac_link\"") >&5
11527   (eval $ac_link) 2>&5
11528   ac_status=$?
11529   echo "$as_me:11529: \$? = $ac_status" >&5
11530   (exit $ac_status); } &&
11531          { ac_try='test -s conftest$ac_exeext'
11532   { (eval echo "$as_me:11532: \"$ac_try\"") >&5
11533   (eval $ac_try) 2>&5
11534   ac_status=$?
11535   echo "$as_me:11535: \$? = $ac_status" >&5
11536   (exit $ac_status); }; }; then
11537   ac_cv_lib_dmalloc_dmalloc_debug=yes
11538 else
11539   echo "$as_me: failed program was:" >&5
11540 cat conftest.$ac_ext >&5
11541 ac_cv_lib_dmalloc_dmalloc_debug=no
11542 fi
11543 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11544 LIBS=$ac_check_lib_save_LIBS
11545 fi
11546 echo "$as_me:11546: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11547 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11548 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11549   cat >>confdefs.h <<EOF
11550 #define HAVE_LIBDMALLOC 1
11551 EOF
11552
11553   LIBS="-ldmalloc $LIBS"
11554
11555 fi
11556
11557 fi
11558
11559 fi
11560
11561 echo "$as_me:11561: checking if you want to use dbmalloc for testing" >&5
11562 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11563
11564 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11565 if test "${with_dbmalloc+set}" = set; then
11566   withval="$with_dbmalloc"
11567   cat >>confdefs.h <<\EOF
11568 #define USE_DBMALLOC 1
11569 EOF
11570
11571         : ${with_cflags:=-g}
11572         : ${with_no_leaks:=yes}
11573          with_dbmalloc=yes
11574 else
11575   with_dbmalloc=
11576 fi;
11577 echo "$as_me:11577: result: ${with_dbmalloc:-no}" >&5
11578 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11579
11580 case .$with_cflags in #(vi
11581 .*-g*)
11582         case .$CFLAGS in #(vi
11583         .*-g*) #(vi
11584                 ;;
11585         *)
11586
11587 cf_fix_cppflags=no
11588 cf_new_cflags=
11589 cf_new_cppflags=
11590 cf_new_extra_cppflags=
11591
11592 for cf_add_cflags in -g
11593 do
11594 case $cf_fix_cppflags in
11595 no)
11596         case $cf_add_cflags in #(vi
11597         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11598                 case $cf_add_cflags in
11599                 -D*)
11600                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11601
11602                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11603                                 && test -z "${cf_tst_cflags}" \
11604                                 && cf_fix_cppflags=yes
11605
11606                         if test $cf_fix_cppflags = yes ; then
11607                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11608                                 continue
11609                         elif test "${cf_tst_cflags}" = "\"'" ; then
11610                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11611                                 continue
11612                         fi
11613                         ;;
11614                 esac
11615                 case "$CPPFLAGS" in
11616                 *$cf_add_cflags) #(vi
11617                         ;;
11618                 *) #(vi
11619                         case $cf_add_cflags in #(vi
11620                         -D*)
11621                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11622
11623 CPPFLAGS=`echo "$CPPFLAGS" | \
11624         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11625                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11626
11627                                 ;;
11628                         esac
11629                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11630                         ;;
11631                 esac
11632                 ;;
11633         *)
11634                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11635                 ;;
11636         esac
11637         ;;
11638 yes)
11639         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11640
11641         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11642
11643         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11644                 && test -z "${cf_tst_cflags}" \
11645                 && cf_fix_cppflags=no
11646         ;;
11647 esac
11648 done
11649
11650 if test -n "$cf_new_cflags" ; then
11651
11652         CFLAGS="$CFLAGS $cf_new_cflags"
11653 fi
11654
11655 if test -n "$cf_new_cppflags" ; then
11656
11657         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11658 fi
11659
11660 if test -n "$cf_new_extra_cppflags" ; then
11661
11662         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11663 fi
11664
11665                 ;;
11666         esac
11667         ;;
11668 esac
11669
11670 if test "$with_dbmalloc" = yes ; then
11671         echo "$as_me:11671: checking for dbmalloc.h" >&5
11672 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11673 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11674   echo $ECHO_N "(cached) $ECHO_C" >&6
11675 else
11676   cat >conftest.$ac_ext <<_ACEOF
11677 #line 11677 "configure"
11678 #include "confdefs.h"
11679 #include <dbmalloc.h>
11680 _ACEOF
11681 if { (eval echo "$as_me:11681: \"$ac_cpp conftest.$ac_ext\"") >&5
11682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11683   ac_status=$?
11684   egrep -v '^ *\+' conftest.er1 >conftest.err
11685   rm -f conftest.er1
11686   cat conftest.err >&5
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); } >/dev/null; then
11689   if test -s conftest.err; then
11690     ac_cpp_err=$ac_c_preproc_warn_flag
11691   else
11692     ac_cpp_err=
11693   fi
11694 else
11695   ac_cpp_err=yes
11696 fi
11697 if test -z "$ac_cpp_err"; then
11698   ac_cv_header_dbmalloc_h=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   ac_cv_header_dbmalloc_h=no
11703 fi
11704 rm -f conftest.err conftest.$ac_ext
11705 fi
11706 echo "$as_me:11706: result: $ac_cv_header_dbmalloc_h" >&5
11707 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11708 if test $ac_cv_header_dbmalloc_h = yes; then
11709
11710 echo "$as_me:11710: checking for debug_malloc in -ldbmalloc" >&5
11711 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11712 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11713   echo $ECHO_N "(cached) $ECHO_C" >&6
11714 else
11715   ac_check_lib_save_LIBS=$LIBS
11716 LIBS="-ldbmalloc  $LIBS"
11717 cat >conftest.$ac_ext <<_ACEOF
11718 #line 11718 "configure"
11719 #include "confdefs.h"
11720
11721 /* Override any gcc2 internal prototype to avoid an error.  */
11722 #ifdef __cplusplus
11723 extern "C"
11724 #endif
11725 /* We use char because int might match the return type of a gcc2
11726    builtin and then its argument prototype would still apply.  */
11727 char debug_malloc ();
11728 int
11729 main ()
11730 {
11731 debug_malloc ();
11732   ;
11733   return 0;
11734 }
11735 _ACEOF
11736 rm -f conftest.$ac_objext conftest$ac_exeext
11737 if { (eval echo "$as_me:11737: \"$ac_link\"") >&5
11738   (eval $ac_link) 2>&5
11739   ac_status=$?
11740   echo "$as_me:11740: \$? = $ac_status" >&5
11741   (exit $ac_status); } &&
11742          { ac_try='test -s conftest$ac_exeext'
11743   { (eval echo "$as_me:11743: \"$ac_try\"") >&5
11744   (eval $ac_try) 2>&5
11745   ac_status=$?
11746   echo "$as_me:11746: \$? = $ac_status" >&5
11747   (exit $ac_status); }; }; then
11748   ac_cv_lib_dbmalloc_debug_malloc=yes
11749 else
11750   echo "$as_me: failed program was:" >&5
11751 cat conftest.$ac_ext >&5
11752 ac_cv_lib_dbmalloc_debug_malloc=no
11753 fi
11754 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11755 LIBS=$ac_check_lib_save_LIBS
11756 fi
11757 echo "$as_me:11757: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11758 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11759 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11760   cat >>confdefs.h <<EOF
11761 #define HAVE_LIBDBMALLOC 1
11762 EOF
11763
11764   LIBS="-ldbmalloc $LIBS"
11765
11766 fi
11767
11768 fi
11769
11770 fi
11771
11772 echo "$as_me:11772: checking if you want to use valgrind for testing" >&5
11773 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11774
11775 # Check whether --with-valgrind or --without-valgrind was given.
11776 if test "${with_valgrind+set}" = set; then
11777   withval="$with_valgrind"
11778   cat >>confdefs.h <<\EOF
11779 #define USE_VALGRIND 1
11780 EOF
11781
11782         : ${with_cflags:=-g}
11783         : ${with_no_leaks:=yes}
11784          with_valgrind=yes
11785 else
11786   with_valgrind=
11787 fi;
11788 echo "$as_me:11788: result: ${with_valgrind:-no}" >&5
11789 echo "${ECHO_T}${with_valgrind:-no}" >&6
11790
11791 case .$with_cflags in #(vi
11792 .*-g*)
11793         case .$CFLAGS in #(vi
11794         .*-g*) #(vi
11795                 ;;
11796         *)
11797
11798 cf_fix_cppflags=no
11799 cf_new_cflags=
11800 cf_new_cppflags=
11801 cf_new_extra_cppflags=
11802
11803 for cf_add_cflags in -g
11804 do
11805 case $cf_fix_cppflags in
11806 no)
11807         case $cf_add_cflags in #(vi
11808         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11809                 case $cf_add_cflags in
11810                 -D*)
11811                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11812
11813                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11814                                 && test -z "${cf_tst_cflags}" \
11815                                 && cf_fix_cppflags=yes
11816
11817                         if test $cf_fix_cppflags = yes ; then
11818                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11819                                 continue
11820                         elif test "${cf_tst_cflags}" = "\"'" ; then
11821                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11822                                 continue
11823                         fi
11824                         ;;
11825                 esac
11826                 case "$CPPFLAGS" in
11827                 *$cf_add_cflags) #(vi
11828                         ;;
11829                 *) #(vi
11830                         case $cf_add_cflags in #(vi
11831                         -D*)
11832                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11833
11834 CPPFLAGS=`echo "$CPPFLAGS" | \
11835         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11836                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11837
11838                                 ;;
11839                         esac
11840                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11841                         ;;
11842                 esac
11843                 ;;
11844         *)
11845                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11846                 ;;
11847         esac
11848         ;;
11849 yes)
11850         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11851
11852         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11853
11854         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11855                 && test -z "${cf_tst_cflags}" \
11856                 && cf_fix_cppflags=no
11857         ;;
11858 esac
11859 done
11860
11861 if test -n "$cf_new_cflags" ; then
11862
11863         CFLAGS="$CFLAGS $cf_new_cflags"
11864 fi
11865
11866 if test -n "$cf_new_cppflags" ; then
11867
11868         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11869 fi
11870
11871 if test -n "$cf_new_extra_cppflags" ; then
11872
11873         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11874 fi
11875
11876                 ;;
11877         esac
11878         ;;
11879 esac
11880
11881 echo "$as_me:11881: checking if you want to perform memory-leak testing" >&5
11882 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11883
11884 # Check whether --enable-leaks or --disable-leaks was given.
11885 if test "${enable_leaks+set}" = set; then
11886   enableval="$enable_leaks"
11887   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11888 else
11889   : ${with_no_leaks:=no}
11890 fi;
11891 echo "$as_me:11891: result: $with_no_leaks" >&5
11892 echo "${ECHO_T}$with_no_leaks" >&6
11893
11894 if test "$with_no_leaks" = yes ; then
11895         cat >>confdefs.h <<\EOF
11896 #define NO_LEAKS 1
11897 EOF
11898
11899 fi
11900
11901 cat >>confdefs.h <<\EOF
11902 #define HAVE_NC_ALLOC_H 1
11903 EOF
11904
11905 ###     use option --enable-expanded to generate certain macros as functions
11906
11907 # Check whether --enable-expanded or --disable-expanded was given.
11908 if test "${enable_expanded+set}" = set; then
11909   enableval="$enable_expanded"
11910   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11911 #define NCURSES_EXPANDED 1
11912 EOF
11913
11914 fi;
11915
11916 ###     use option --disable-macros to suppress macros in favor of functions
11917
11918 # Check whether --enable-macros or --disable-macros was given.
11919 if test "${enable_macros+set}" = set; then
11920   enableval="$enable_macros"
11921   test "$enableval" = no && cat >>confdefs.h <<\EOF
11922 #define NCURSES_NOMACROS 1
11923 EOF
11924
11925 fi;
11926
11927 # Normally we only add trace() to the debug-library.  Allow this to be
11928 # extended to all models of the ncurses library:
11929 cf_all_traces=no
11930 case "$CFLAGS $CPPFLAGS" in
11931 *-DTRACE*)
11932         cf_all_traces=yes
11933         ;;
11934 esac
11935
11936 echo "$as_me:11936: checking whether to add trace feature to all models" >&5
11937 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11938
11939 # Check whether --with-trace or --without-trace was given.
11940 if test "${with_trace+set}" = set; then
11941   withval="$with_trace"
11942   cf_with_trace=$withval
11943 else
11944   cf_with_trace=$cf_all_traces
11945 fi;
11946 echo "$as_me:11946: result: $cf_with_trace" >&5
11947 echo "${ECHO_T}$cf_with_trace" >&6
11948
11949 if test "$cf_with_trace" = yes ; then
11950         LIB_TRACING=all
11951         ADA_TRACE=TRUE
11952
11953 cf_fix_cppflags=no
11954 cf_new_cflags=
11955 cf_new_cppflags=
11956 cf_new_extra_cppflags=
11957
11958 for cf_add_cflags in -DTRACE
11959 do
11960 case $cf_fix_cppflags in
11961 no)
11962         case $cf_add_cflags in #(vi
11963         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11964                 case $cf_add_cflags in
11965                 -D*)
11966                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11967
11968                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11969                                 && test -z "${cf_tst_cflags}" \
11970                                 && cf_fix_cppflags=yes
11971
11972                         if test $cf_fix_cppflags = yes ; then
11973                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11974                                 continue
11975                         elif test "${cf_tst_cflags}" = "\"'" ; then
11976                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11977                                 continue
11978                         fi
11979                         ;;
11980                 esac
11981                 case "$CPPFLAGS" in
11982                 *$cf_add_cflags) #(vi
11983                         ;;
11984                 *) #(vi
11985                         case $cf_add_cflags in #(vi
11986                         -D*)
11987                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11988
11989 CPPFLAGS=`echo "$CPPFLAGS" | \
11990         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11991                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11992
11993                                 ;;
11994                         esac
11995                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11996                         ;;
11997                 esac
11998                 ;;
11999         *)
12000                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12001                 ;;
12002         esac
12003         ;;
12004 yes)
12005         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12006
12007         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12008
12009         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12010                 && test -z "${cf_tst_cflags}" \
12011                 && cf_fix_cppflags=no
12012         ;;
12013 esac
12014 done
12015
12016 if test -n "$cf_new_cflags" ; then
12017
12018         CFLAGS="$CFLAGS $cf_new_cflags"
12019 fi
12020
12021 if test -n "$cf_new_cppflags" ; then
12022
12023         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12024 fi
12025
12026 if test -n "$cf_new_extra_cppflags" ; then
12027
12028         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12029 fi
12030
12031 else
12032         LIB_TRACING=DEBUG
12033         ADA_TRACE=FALSE
12034 fi
12035
12036 ###     Checks for libraries.
12037 case $cf_cv_system_name in #(vi
12038 *mingw32*) #(vi
12039         ;;
12040 *)
12041 echo "$as_me:12041: checking for gettimeofday" >&5
12042 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12043 if test "${ac_cv_func_gettimeofday+set}" = set; then
12044   echo $ECHO_N "(cached) $ECHO_C" >&6
12045 else
12046   cat >conftest.$ac_ext <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049 /* System header to define __stub macros and hopefully few prototypes,
12050     which can conflict with char gettimeofday (); below.  */
12051 #include <assert.h>
12052 /* Override any gcc2 internal prototype to avoid an error.  */
12053 #ifdef __cplusplus
12054 extern "C"
12055 #endif
12056 /* We use char because int might match the return type of a gcc2
12057    builtin and then its argument prototype would still apply.  */
12058 char gettimeofday ();
12059 char (*f) ();
12060
12061 int
12062 main ()
12063 {
12064 /* The GNU C library defines this for functions which it implements
12065     to always fail with ENOSYS.  Some functions are actually named
12066     something starting with __ and the normal name is an alias.  */
12067 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12068 choke me
12069 #else
12070 f = gettimeofday;
12071 #endif
12072
12073   ;
12074   return 0;
12075 }
12076 _ACEOF
12077 rm -f conftest.$ac_objext conftest$ac_exeext
12078 if { (eval echo "$as_me:12078: \"$ac_link\"") >&5
12079   (eval $ac_link) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit $ac_status); } &&
12083          { ac_try='test -s conftest$ac_exeext'
12084   { (eval echo "$as_me:12084: \"$ac_try\"") >&5
12085   (eval $ac_try) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit $ac_status); }; }; then
12089   ac_cv_func_gettimeofday=yes
12090 else
12091   echo "$as_me: failed program was:" >&5
12092 cat conftest.$ac_ext >&5
12093 ac_cv_func_gettimeofday=no
12094 fi
12095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12096 fi
12097 echo "$as_me:12097: result: $ac_cv_func_gettimeofday" >&5
12098 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12099 if test $ac_cv_func_gettimeofday = yes; then
12100   cat >>confdefs.h <<\EOF
12101 #define HAVE_GETTIMEOFDAY 1
12102 EOF
12103
12104 else
12105
12106 echo "$as_me:12106: checking for gettimeofday in -lbsd" >&5
12107 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12108 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12109   echo $ECHO_N "(cached) $ECHO_C" >&6
12110 else
12111   ac_check_lib_save_LIBS=$LIBS
12112 LIBS="-lbsd  $LIBS"
12113 cat >conftest.$ac_ext <<_ACEOF
12114 #line 12114 "configure"
12115 #include "confdefs.h"
12116
12117 /* Override any gcc2 internal prototype to avoid an error.  */
12118 #ifdef __cplusplus
12119 extern "C"
12120 #endif
12121 /* We use char because int might match the return type of a gcc2
12122    builtin and then its argument prototype would still apply.  */
12123 char gettimeofday ();
12124 int
12125 main ()
12126 {
12127 gettimeofday ();
12128   ;
12129   return 0;
12130 }
12131 _ACEOF
12132 rm -f conftest.$ac_objext conftest$ac_exeext
12133 if { (eval echo "$as_me:12133: \"$ac_link\"") >&5
12134   (eval $ac_link) 2>&5
12135   ac_status=$?
12136   echo "$as_me:12136: \$? = $ac_status" >&5
12137   (exit $ac_status); } &&
12138          { ac_try='test -s conftest$ac_exeext'
12139   { (eval echo "$as_me:12139: \"$ac_try\"") >&5
12140   (eval $ac_try) 2>&5
12141   ac_status=$?
12142   echo "$as_me:12142: \$? = $ac_status" >&5
12143   (exit $ac_status); }; }; then
12144   ac_cv_lib_bsd_gettimeofday=yes
12145 else
12146   echo "$as_me: failed program was:" >&5
12147 cat conftest.$ac_ext >&5
12148 ac_cv_lib_bsd_gettimeofday=no
12149 fi
12150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12151 LIBS=$ac_check_lib_save_LIBS
12152 fi
12153 echo "$as_me:12153: result: $ac_cv_lib_bsd_gettimeofday" >&5
12154 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12155 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12156   cat >>confdefs.h <<\EOF
12157 #define HAVE_GETTIMEOFDAY 1
12158 EOF
12159
12160         LIBS="-lbsd $LIBS"
12161 fi
12162
12163 fi
12164         ;;
12165 esac
12166
12167 echo "$as_me:12167: checking if -lm needed for math functions" >&5
12168 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12169 if test "${cf_cv_need_libm+set}" = set; then
12170   echo $ECHO_N "(cached) $ECHO_C" >&6
12171 else
12172
12173         cat >conftest.$ac_ext <<_ACEOF
12174 #line 12174 "configure"
12175 #include "confdefs.h"
12176
12177         #include <stdio.h>
12178         #include <math.h>
12179
12180 int
12181 main ()
12182 {
12183 double x = rand(); printf("result = %g\n", sin(x))
12184   ;
12185   return 0;
12186 }
12187 _ACEOF
12188 rm -f conftest.$ac_objext conftest$ac_exeext
12189 if { (eval echo "$as_me:12189: \"$ac_link\"") >&5
12190   (eval $ac_link) 2>&5
12191   ac_status=$?
12192   echo "$as_me:12192: \$? = $ac_status" >&5
12193   (exit $ac_status); } &&
12194          { ac_try='test -s conftest$ac_exeext'
12195   { (eval echo "$as_me:12195: \"$ac_try\"") >&5
12196   (eval $ac_try) 2>&5
12197   ac_status=$?
12198   echo "$as_me:12198: \$? = $ac_status" >&5
12199   (exit $ac_status); }; }; then
12200   cf_cv_need_libm=no
12201 else
12202   echo "$as_me: failed program was:" >&5
12203 cat conftest.$ac_ext >&5
12204 cf_cv_need_libm=yes
12205 fi
12206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12207 fi
12208 echo "$as_me:12208: result: $cf_cv_need_libm" >&5
12209 echo "${ECHO_T}$cf_cv_need_libm" >&6
12210 if test "$cf_cv_need_libm" = yes
12211 then
12212 MATH_LIB=-lm
12213 fi
12214
12215 ###     Checks for header files.
12216 echo "$as_me:12216: checking for ANSI C header files" >&5
12217 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12218 if test "${ac_cv_header_stdc+set}" = set; then
12219   echo $ECHO_N "(cached) $ECHO_C" >&6
12220 else
12221   cat >conftest.$ac_ext <<_ACEOF
12222 #line 12222 "configure"
12223 #include "confdefs.h"
12224 #include <stdlib.h>
12225 #include <stdarg.h>
12226 #include <string.h>
12227 #include <float.h>
12228
12229 _ACEOF
12230 if { (eval echo "$as_me:12230: \"$ac_cpp conftest.$ac_ext\"") >&5
12231   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12232   ac_status=$?
12233   egrep -v '^ *\+' conftest.er1 >conftest.err
12234   rm -f conftest.er1
12235   cat conftest.err >&5
12236   echo "$as_me:12236: \$? = $ac_status" >&5
12237   (exit $ac_status); } >/dev/null; then
12238   if test -s conftest.err; then
12239     ac_cpp_err=$ac_c_preproc_warn_flag
12240   else
12241     ac_cpp_err=
12242   fi
12243 else
12244   ac_cpp_err=yes
12245 fi
12246 if test -z "$ac_cpp_err"; then
12247   ac_cv_header_stdc=yes
12248 else
12249   echo "$as_me: failed program was:" >&5
12250   cat conftest.$ac_ext >&5
12251   ac_cv_header_stdc=no
12252 fi
12253 rm -f conftest.err conftest.$ac_ext
12254
12255 if test $ac_cv_header_stdc = yes; then
12256   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12257   cat >conftest.$ac_ext <<_ACEOF
12258 #line 12258 "configure"
12259 #include "confdefs.h"
12260 #include <string.h>
12261
12262 _ACEOF
12263 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12264   egrep "memchr" >/dev/null 2>&1; then
12265   :
12266 else
12267   ac_cv_header_stdc=no
12268 fi
12269 rm -f conftest*
12270
12271 fi
12272
12273 if test $ac_cv_header_stdc = yes; then
12274   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12275   cat >conftest.$ac_ext <<_ACEOF
12276 #line 12276 "configure"
12277 #include "confdefs.h"
12278 #include <stdlib.h>
12279
12280 _ACEOF
12281 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12282   egrep "free" >/dev/null 2>&1; then
12283   :
12284 else
12285   ac_cv_header_stdc=no
12286 fi
12287 rm -f conftest*
12288
12289 fi
12290
12291 if test $ac_cv_header_stdc = yes; then
12292   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12293   if test "$cross_compiling" = yes; then
12294   :
12295 else
12296   cat >conftest.$ac_ext <<_ACEOF
12297 #line 12297 "configure"
12298 #include "confdefs.h"
12299 #include <ctype.h>
12300 #if ((' ' & 0x0FF) == 0x020)
12301 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12302 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12303 #else
12304 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12305                      || ('j' <= (c) && (c) <= 'r') \
12306                      || ('s' <= (c) && (c) <= 'z'))
12307 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12308 #endif
12309
12310 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12311 int
12312 main ()
12313 {
12314   int i;
12315   for (i = 0; i < 256; i++)
12316     if (XOR (islower (i), ISLOWER (i))
12317         || toupper (i) != TOUPPER (i))
12318       $ac_main_return(2);
12319   $ac_main_return (0);
12320 }
12321 _ACEOF
12322 rm -f conftest$ac_exeext
12323 if { (eval echo "$as_me:12323: \"$ac_link\"") >&5
12324   (eval $ac_link) 2>&5
12325   ac_status=$?
12326   echo "$as_me:12326: \$? = $ac_status" >&5
12327   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12328   { (eval echo "$as_me:12328: \"$ac_try\"") >&5
12329   (eval $ac_try) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); }; }; then
12333   :
12334 else
12335   echo "$as_me: program exited with status $ac_status" >&5
12336 echo "$as_me: failed program was:" >&5
12337 cat conftest.$ac_ext >&5
12338 ac_cv_header_stdc=no
12339 fi
12340 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12341 fi
12342 fi
12343 fi
12344 echo "$as_me:12344: result: $ac_cv_header_stdc" >&5
12345 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12346 if test $ac_cv_header_stdc = yes; then
12347
12348 cat >>confdefs.h <<\EOF
12349 #define STDC_HEADERS 1
12350 EOF
12351
12352 fi
12353
12354 ac_header_dirent=no
12355 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12356   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12357 echo "$as_me:12357: checking for $ac_hdr that defines DIR" >&5
12358 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12359 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12360   echo $ECHO_N "(cached) $ECHO_C" >&6
12361 else
12362   cat >conftest.$ac_ext <<_ACEOF
12363 #line 12363 "configure"
12364 #include "confdefs.h"
12365 #include <sys/types.h>
12366 #include <$ac_hdr>
12367
12368 int
12369 main ()
12370 {
12371 if ((DIR *) 0)
12372 return 0;
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 rm -f conftest.$ac_objext
12378 if { (eval echo "$as_me:12378: \"$ac_compile\"") >&5
12379   (eval $ac_compile) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit $ac_status); } &&
12383          { ac_try='test -s conftest.$ac_objext'
12384   { (eval echo "$as_me:12384: \"$ac_try\"") >&5
12385   (eval $ac_try) 2>&5
12386   ac_status=$?
12387   echo "$as_me:12387: \$? = $ac_status" >&5
12388   (exit $ac_status); }; }; then
12389   eval "$as_ac_Header=yes"
12390 else
12391   echo "$as_me: failed program was:" >&5
12392 cat conftest.$ac_ext >&5
12393 eval "$as_ac_Header=no"
12394 fi
12395 rm -f conftest.$ac_objext conftest.$ac_ext
12396 fi
12397 echo "$as_me:12397: result: `eval echo '${'$as_ac_Header'}'`" >&5
12398 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12399 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12400   cat >>confdefs.h <<EOF
12401 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12402 EOF
12403
12404 ac_header_dirent=$ac_hdr; break
12405 fi
12406
12407 done
12408 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12409 if test $ac_header_dirent = dirent.h; then
12410   echo "$as_me:12410: checking for opendir in -ldir" >&5
12411 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12412 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12413   echo $ECHO_N "(cached) $ECHO_C" >&6
12414 else
12415   ac_check_lib_save_LIBS=$LIBS
12416 LIBS="-ldir  $LIBS"
12417 cat >conftest.$ac_ext <<_ACEOF
12418 #line 12418 "configure"
12419 #include "confdefs.h"
12420
12421 /* Override any gcc2 internal prototype to avoid an error.  */
12422 #ifdef __cplusplus
12423 extern "C"
12424 #endif
12425 /* We use char because int might match the return type of a gcc2
12426    builtin and then its argument prototype would still apply.  */
12427 char opendir ();
12428 int
12429 main ()
12430 {
12431 opendir ();
12432   ;
12433   return 0;
12434 }
12435 _ACEOF
12436 rm -f conftest.$ac_objext conftest$ac_exeext
12437 if { (eval echo "$as_me:12437: \"$ac_link\"") >&5
12438   (eval $ac_link) 2>&5
12439   ac_status=$?
12440   echo "$as_me:12440: \$? = $ac_status" >&5
12441   (exit $ac_status); } &&
12442          { ac_try='test -s conftest$ac_exeext'
12443   { (eval echo "$as_me:12443: \"$ac_try\"") >&5
12444   (eval $ac_try) 2>&5
12445   ac_status=$?
12446   echo "$as_me:12446: \$? = $ac_status" >&5
12447   (exit $ac_status); }; }; then
12448   ac_cv_lib_dir_opendir=yes
12449 else
12450   echo "$as_me: failed program was:" >&5
12451 cat conftest.$ac_ext >&5
12452 ac_cv_lib_dir_opendir=no
12453 fi
12454 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12455 LIBS=$ac_check_lib_save_LIBS
12456 fi
12457 echo "$as_me:12457: result: $ac_cv_lib_dir_opendir" >&5
12458 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12459 if test $ac_cv_lib_dir_opendir = yes; then
12460   LIBS="$LIBS -ldir"
12461 fi
12462
12463 else
12464   echo "$as_me:12464: checking for opendir in -lx" >&5
12465 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12466 if test "${ac_cv_lib_x_opendir+set}" = set; then
12467   echo $ECHO_N "(cached) $ECHO_C" >&6
12468 else
12469   ac_check_lib_save_LIBS=$LIBS
12470 LIBS="-lx  $LIBS"
12471 cat >conftest.$ac_ext <<_ACEOF
12472 #line 12472 "configure"
12473 #include "confdefs.h"
12474
12475 /* Override any gcc2 internal prototype to avoid an error.  */
12476 #ifdef __cplusplus
12477 extern "C"
12478 #endif
12479 /* We use char because int might match the return type of a gcc2
12480    builtin and then its argument prototype would still apply.  */
12481 char opendir ();
12482 int
12483 main ()
12484 {
12485 opendir ();
12486   ;
12487   return 0;
12488 }
12489 _ACEOF
12490 rm -f conftest.$ac_objext conftest$ac_exeext
12491 if { (eval echo "$as_me:12491: \"$ac_link\"") >&5
12492   (eval $ac_link) 2>&5
12493   ac_status=$?
12494   echo "$as_me:12494: \$? = $ac_status" >&5
12495   (exit $ac_status); } &&
12496          { ac_try='test -s conftest$ac_exeext'
12497   { (eval echo "$as_me:12497: \"$ac_try\"") >&5
12498   (eval $ac_try) 2>&5
12499   ac_status=$?
12500   echo "$as_me:12500: \$? = $ac_status" >&5
12501   (exit $ac_status); }; }; then
12502   ac_cv_lib_x_opendir=yes
12503 else
12504   echo "$as_me: failed program was:" >&5
12505 cat conftest.$ac_ext >&5
12506 ac_cv_lib_x_opendir=no
12507 fi
12508 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12509 LIBS=$ac_check_lib_save_LIBS
12510 fi
12511 echo "$as_me:12511: result: $ac_cv_lib_x_opendir" >&5
12512 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12513 if test $ac_cv_lib_x_opendir = yes; then
12514   LIBS="$LIBS -lx"
12515 fi
12516
12517 fi
12518
12519 echo "$as_me:12519: checking whether time.h and sys/time.h may both be included" >&5
12520 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12521 if test "${ac_cv_header_time+set}" = set; then
12522   echo $ECHO_N "(cached) $ECHO_C" >&6
12523 else
12524   cat >conftest.$ac_ext <<_ACEOF
12525 #line 12525 "configure"
12526 #include "confdefs.h"
12527 #include <sys/types.h>
12528 #include <sys/time.h>
12529 #include <time.h>
12530
12531 int
12532 main ()
12533 {
12534 if ((struct tm *) 0)
12535 return 0;
12536   ;
12537   return 0;
12538 }
12539 _ACEOF
12540 rm -f conftest.$ac_objext
12541 if { (eval echo "$as_me:12541: \"$ac_compile\"") >&5
12542   (eval $ac_compile) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); } &&
12546          { ac_try='test -s conftest.$ac_objext'
12547   { (eval echo "$as_me:12547: \"$ac_try\"") >&5
12548   (eval $ac_try) 2>&5
12549   ac_status=$?
12550   echo "$as_me:12550: \$? = $ac_status" >&5
12551   (exit $ac_status); }; }; then
12552   ac_cv_header_time=yes
12553 else
12554   echo "$as_me: failed program was:" >&5
12555 cat conftest.$ac_ext >&5
12556 ac_cv_header_time=no
12557 fi
12558 rm -f conftest.$ac_objext conftest.$ac_ext
12559 fi
12560 echo "$as_me:12560: result: $ac_cv_header_time" >&5
12561 echo "${ECHO_T}$ac_cv_header_time" >&6
12562 if test $ac_cv_header_time = yes; then
12563
12564 cat >>confdefs.h <<\EOF
12565 #define TIME_WITH_SYS_TIME 1
12566 EOF
12567
12568 fi
12569
12570 cf_regex_func=no
12571
12572 echo "$as_me:12572: checking for regcomp" >&5
12573 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12574 if test "${ac_cv_func_regcomp+set}" = set; then
12575   echo $ECHO_N "(cached) $ECHO_C" >&6
12576 else
12577   cat >conftest.$ac_ext <<_ACEOF
12578 #line 12578 "configure"
12579 #include "confdefs.h"
12580 /* System header to define __stub macros and hopefully few prototypes,
12581     which can conflict with char regcomp (); below.  */
12582 #include <assert.h>
12583 /* Override any gcc2 internal prototype to avoid an error.  */
12584 #ifdef __cplusplus
12585 extern "C"
12586 #endif
12587 /* We use char because int might match the return type of a gcc2
12588    builtin and then its argument prototype would still apply.  */
12589 char regcomp ();
12590 char (*f) ();
12591
12592 int
12593 main ()
12594 {
12595 /* The GNU C library defines this for functions which it implements
12596     to always fail with ENOSYS.  Some functions are actually named
12597     something starting with __ and the normal name is an alias.  */
12598 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12599 choke me
12600 #else
12601 f = regcomp;
12602 #endif
12603
12604   ;
12605   return 0;
12606 }
12607 _ACEOF
12608 rm -f conftest.$ac_objext conftest$ac_exeext
12609 if { (eval echo "$as_me:12609: \"$ac_link\"") >&5
12610   (eval $ac_link) 2>&5
12611   ac_status=$?
12612   echo "$as_me:12612: \$? = $ac_status" >&5
12613   (exit $ac_status); } &&
12614          { ac_try='test -s conftest$ac_exeext'
12615   { (eval echo "$as_me:12615: \"$ac_try\"") >&5
12616   (eval $ac_try) 2>&5
12617   ac_status=$?
12618   echo "$as_me:12618: \$? = $ac_status" >&5
12619   (exit $ac_status); }; }; then
12620   ac_cv_func_regcomp=yes
12621 else
12622   echo "$as_me: failed program was:" >&5
12623 cat conftest.$ac_ext >&5
12624 ac_cv_func_regcomp=no
12625 fi
12626 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12627 fi
12628 echo "$as_me:12628: result: $ac_cv_func_regcomp" >&5
12629 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12630 if test $ac_cv_func_regcomp = yes; then
12631   cf_regex_func=regcomp
12632 else
12633
12634         for cf_regex_lib in regex re
12635         do
12636                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12637 echo "$as_me:12637: checking for regcomp in -l$cf_regex_lib" >&5
12638 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12639 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12640   echo $ECHO_N "(cached) $ECHO_C" >&6
12641 else
12642   ac_check_lib_save_LIBS=$LIBS
12643 LIBS="-l$cf_regex_lib  $LIBS"
12644 cat >conftest.$ac_ext <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12647
12648 /* Override any gcc2 internal prototype to avoid an error.  */
12649 #ifdef __cplusplus
12650 extern "C"
12651 #endif
12652 /* We use char because int might match the return type of a gcc2
12653    builtin and then its argument prototype would still apply.  */
12654 char regcomp ();
12655 int
12656 main ()
12657 {
12658 regcomp ();
12659   ;
12660   return 0;
12661 }
12662 _ACEOF
12663 rm -f conftest.$ac_objext conftest$ac_exeext
12664 if { (eval echo "$as_me:12664: \"$ac_link\"") >&5
12665   (eval $ac_link) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit $ac_status); } &&
12669          { ac_try='test -s conftest$ac_exeext'
12670   { (eval echo "$as_me:12670: \"$ac_try\"") >&5
12671   (eval $ac_try) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit $ac_status); }; }; then
12675   eval "$as_ac_Lib=yes"
12676 else
12677   echo "$as_me: failed program was:" >&5
12678 cat conftest.$ac_ext >&5
12679 eval "$as_ac_Lib=no"
12680 fi
12681 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12682 LIBS=$ac_check_lib_save_LIBS
12683 fi
12684 echo "$as_me:12684: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12685 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12686 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12687
12688                                 LIBS="-l$cf_regex_lib $LIBS"
12689                                 cf_regex_func=regcomp
12690                                 break
12691 fi
12692
12693         done
12694
12695 fi
12696
12697 if test "$cf_regex_func" = no ; then
12698         echo "$as_me:12698: checking for compile" >&5
12699 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12700 if test "${ac_cv_func_compile+set}" = set; then
12701   echo $ECHO_N "(cached) $ECHO_C" >&6
12702 else
12703   cat >conftest.$ac_ext <<_ACEOF
12704 #line 12704 "configure"
12705 #include "confdefs.h"
12706 /* System header to define __stub macros and hopefully few prototypes,
12707     which can conflict with char compile (); below.  */
12708 #include <assert.h>
12709 /* Override any gcc2 internal prototype to avoid an error.  */
12710 #ifdef __cplusplus
12711 extern "C"
12712 #endif
12713 /* We use char because int might match the return type of a gcc2
12714    builtin and then its argument prototype would still apply.  */
12715 char compile ();
12716 char (*f) ();
12717
12718 int
12719 main ()
12720 {
12721 /* The GNU C library defines this for functions which it implements
12722     to always fail with ENOSYS.  Some functions are actually named
12723     something starting with __ and the normal name is an alias.  */
12724 #if defined (__stub_compile) || defined (__stub___compile)
12725 choke me
12726 #else
12727 f = compile;
12728 #endif
12729
12730   ;
12731   return 0;
12732 }
12733 _ACEOF
12734 rm -f conftest.$ac_objext conftest$ac_exeext
12735 if { (eval echo "$as_me:12735: \"$ac_link\"") >&5
12736   (eval $ac_link) 2>&5
12737   ac_status=$?
12738   echo "$as_me:12738: \$? = $ac_status" >&5
12739   (exit $ac_status); } &&
12740          { ac_try='test -s conftest$ac_exeext'
12741   { (eval echo "$as_me:12741: \"$ac_try\"") >&5
12742   (eval $ac_try) 2>&5
12743   ac_status=$?
12744   echo "$as_me:12744: \$? = $ac_status" >&5
12745   (exit $ac_status); }; }; then
12746   ac_cv_func_compile=yes
12747 else
12748   echo "$as_me: failed program was:" >&5
12749 cat conftest.$ac_ext >&5
12750 ac_cv_func_compile=no
12751 fi
12752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12753 fi
12754 echo "$as_me:12754: result: $ac_cv_func_compile" >&5
12755 echo "${ECHO_T}$ac_cv_func_compile" >&6
12756 if test $ac_cv_func_compile = yes; then
12757   cf_regex_func=compile
12758 else
12759
12760                 echo "$as_me:12760: checking for compile in -lgen" >&5
12761 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12762 if test "${ac_cv_lib_gen_compile+set}" = set; then
12763   echo $ECHO_N "(cached) $ECHO_C" >&6
12764 else
12765   ac_check_lib_save_LIBS=$LIBS
12766 LIBS="-lgen  $LIBS"
12767 cat >conftest.$ac_ext <<_ACEOF
12768 #line 12768 "configure"
12769 #include "confdefs.h"
12770
12771 /* Override any gcc2 internal prototype to avoid an error.  */
12772 #ifdef __cplusplus
12773 extern "C"
12774 #endif
12775 /* We use char because int might match the return type of a gcc2
12776    builtin and then its argument prototype would still apply.  */
12777 char compile ();
12778 int
12779 main ()
12780 {
12781 compile ();
12782   ;
12783   return 0;
12784 }
12785 _ACEOF
12786 rm -f conftest.$ac_objext conftest$ac_exeext
12787 if { (eval echo "$as_me:12787: \"$ac_link\"") >&5
12788   (eval $ac_link) 2>&5
12789   ac_status=$?
12790   echo "$as_me:12790: \$? = $ac_status" >&5
12791   (exit $ac_status); } &&
12792          { ac_try='test -s conftest$ac_exeext'
12793   { (eval echo "$as_me:12793: \"$ac_try\"") >&5
12794   (eval $ac_try) 2>&5
12795   ac_status=$?
12796   echo "$as_me:12796: \$? = $ac_status" >&5
12797   (exit $ac_status); }; }; then
12798   ac_cv_lib_gen_compile=yes
12799 else
12800   echo "$as_me: failed program was:" >&5
12801 cat conftest.$ac_ext >&5
12802 ac_cv_lib_gen_compile=no
12803 fi
12804 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12805 LIBS=$ac_check_lib_save_LIBS
12806 fi
12807 echo "$as_me:12807: result: $ac_cv_lib_gen_compile" >&5
12808 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12809 if test $ac_cv_lib_gen_compile = yes; then
12810
12811                                 LIBS="-lgen $LIBS"
12812                                 cf_regex_func=compile
12813 fi
12814
12815 fi
12816
12817 fi
12818
12819 if test "$cf_regex_func" = no ; then
12820         { echo "$as_me:12820: WARNING: cannot find regular expression library" >&5
12821 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12822 fi
12823
12824 echo "$as_me:12824: checking for regular-expression headers" >&5
12825 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12826 if test "${cf_cv_regex_hdrs+set}" = set; then
12827   echo $ECHO_N "(cached) $ECHO_C" >&6
12828 else
12829
12830 cf_cv_regex_hdrs=no
12831 case $cf_regex_func in #(vi
12832 compile) #(vi
12833         for cf_regex_hdr in regexp.h regexpr.h
12834         do
12835                 cat >conftest.$ac_ext <<_ACEOF
12836 #line 12836 "configure"
12837 #include "confdefs.h"
12838 #include <$cf_regex_hdr>
12839 int
12840 main ()
12841 {
12842
12843                         char *p = compile("", "", "", 0);
12844                         int x = step("", "");
12845
12846   ;
12847   return 0;
12848 }
12849 _ACEOF
12850 rm -f conftest.$ac_objext conftest$ac_exeext
12851 if { (eval echo "$as_me:12851: \"$ac_link\"") >&5
12852   (eval $ac_link) 2>&5
12853   ac_status=$?
12854   echo "$as_me:12854: \$? = $ac_status" >&5
12855   (exit $ac_status); } &&
12856          { ac_try='test -s conftest$ac_exeext'
12857   { (eval echo "$as_me:12857: \"$ac_try\"") >&5
12858   (eval $ac_try) 2>&5
12859   ac_status=$?
12860   echo "$as_me:12860: \$? = $ac_status" >&5
12861   (exit $ac_status); }; }; then
12862
12863                         cf_cv_regex_hdrs=$cf_regex_hdr
12864                         break
12865
12866 else
12867   echo "$as_me: failed program was:" >&5
12868 cat conftest.$ac_ext >&5
12869 fi
12870 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12871         done
12872         ;;
12873 *)
12874         for cf_regex_hdr in regex.h
12875         do
12876                 cat >conftest.$ac_ext <<_ACEOF
12877 #line 12877 "configure"
12878 #include "confdefs.h"
12879 #include <sys/types.h>
12880 #include <$cf_regex_hdr>
12881 int
12882 main ()
12883 {
12884
12885                         regex_t *p;
12886                         int x = regcomp(p, "", 0);
12887                         int y = regexec(p, "", 0, 0, 0);
12888                         regfree(p);
12889
12890   ;
12891   return 0;
12892 }
12893 _ACEOF
12894 rm -f conftest.$ac_objext conftest$ac_exeext
12895 if { (eval echo "$as_me:12895: \"$ac_link\"") >&5
12896   (eval $ac_link) 2>&5
12897   ac_status=$?
12898   echo "$as_me:12898: \$? = $ac_status" >&5
12899   (exit $ac_status); } &&
12900          { ac_try='test -s conftest$ac_exeext'
12901   { (eval echo "$as_me:12901: \"$ac_try\"") >&5
12902   (eval $ac_try) 2>&5
12903   ac_status=$?
12904   echo "$as_me:12904: \$? = $ac_status" >&5
12905   (exit $ac_status); }; }; then
12906
12907                         cf_cv_regex_hdrs=$cf_regex_hdr
12908                         break
12909
12910 else
12911   echo "$as_me: failed program was:" >&5
12912 cat conftest.$ac_ext >&5
12913 fi
12914 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12915         done
12916         ;;
12917 esac
12918
12919 fi
12920 echo "$as_me:12920: result: $cf_cv_regex_hdrs" >&5
12921 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12922
12923 case $cf_cv_regex_hdrs in #(vi
12924     no)        { echo "$as_me:12924: WARNING: no regular expression header found" >&5
12925 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12926     regex.h)   cat >>confdefs.h <<\EOF
12927 #define HAVE_REGEX_H_FUNCS 1
12928 EOF
12929  ;; #(vi
12930     regexp.h)  cat >>confdefs.h <<\EOF
12931 #define HAVE_REGEXP_H_FUNCS 1
12932 EOF
12933  ;; #(vi
12934     regexpr.h) cat >>confdefs.h <<\EOF
12935 #define HAVE_REGEXPR_H_FUNCS 1
12936 EOF
12937  ;;
12938 esac
12939
12940 for ac_header in \
12941 fcntl.h \
12942 getopt.h \
12943 limits.h \
12944 locale.h \
12945 poll.h \
12946 sys/bsdtypes.h \
12947 sys/ioctl.h \
12948 sys/param.h \
12949 sys/poll.h \
12950 sys/select.h \
12951 sys/time.h \
12952 sys/times.h \
12953 ttyent.h \
12954 unistd.h \
12955 wctype.h \
12956
12957 do
12958 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12959 echo "$as_me:12959: checking for $ac_header" >&5
12960 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12961 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12962   echo $ECHO_N "(cached) $ECHO_C" >&6
12963 else
12964   cat >conftest.$ac_ext <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967 #include <$ac_header>
12968 _ACEOF
12969 if { (eval echo "$as_me:12969: \"$ac_cpp conftest.$ac_ext\"") >&5
12970   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12971   ac_status=$?
12972   egrep -v '^ *\+' conftest.er1 >conftest.err
12973   rm -f conftest.er1
12974   cat conftest.err >&5
12975   echo "$as_me:12975: \$? = $ac_status" >&5
12976   (exit $ac_status); } >/dev/null; then
12977   if test -s conftest.err; then
12978     ac_cpp_err=$ac_c_preproc_warn_flag
12979   else
12980     ac_cpp_err=
12981   fi
12982 else
12983   ac_cpp_err=yes
12984 fi
12985 if test -z "$ac_cpp_err"; then
12986   eval "$as_ac_Header=yes"
12987 else
12988   echo "$as_me: failed program was:" >&5
12989   cat conftest.$ac_ext >&5
12990   eval "$as_ac_Header=no"
12991 fi
12992 rm -f conftest.err conftest.$ac_ext
12993 fi
12994 echo "$as_me:12994: result: `eval echo '${'$as_ac_Header'}'`" >&5
12995 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12996 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12997   cat >>confdefs.h <<EOF
12998 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12999 EOF
13000
13001 fi
13002 done
13003
13004 # check for ISC (this may also define _POSIX_SOURCE)
13005 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13006 if test "$ISC" = yes ; then
13007
13008 echo "$as_me:13008: checking for main in -lcposix" >&5
13009 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13010 if test "${ac_cv_lib_cposix_main+set}" = set; then
13011   echo $ECHO_N "(cached) $ECHO_C" >&6
13012 else
13013   ac_check_lib_save_LIBS=$LIBS
13014 LIBS="-lcposix  $LIBS"
13015 cat >conftest.$ac_ext <<_ACEOF
13016 #line 13016 "configure"
13017 #include "confdefs.h"
13018
13019 int
13020 main ()
13021 {
13022 main ();
13023   ;
13024   return 0;
13025 }
13026 _ACEOF
13027 rm -f conftest.$ac_objext conftest$ac_exeext
13028 if { (eval echo "$as_me:13028: \"$ac_link\"") >&5
13029   (eval $ac_link) 2>&5
13030   ac_status=$?
13031   echo "$as_me:13031: \$? = $ac_status" >&5
13032   (exit $ac_status); } &&
13033          { ac_try='test -s conftest$ac_exeext'
13034   { (eval echo "$as_me:13034: \"$ac_try\"") >&5
13035   (eval $ac_try) 2>&5
13036   ac_status=$?
13037   echo "$as_me:13037: \$? = $ac_status" >&5
13038   (exit $ac_status); }; }; then
13039   ac_cv_lib_cposix_main=yes
13040 else
13041   echo "$as_me: failed program was:" >&5
13042 cat conftest.$ac_ext >&5
13043 ac_cv_lib_cposix_main=no
13044 fi
13045 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13046 LIBS=$ac_check_lib_save_LIBS
13047 fi
13048 echo "$as_me:13048: result: $ac_cv_lib_cposix_main" >&5
13049 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13050 if test $ac_cv_lib_cposix_main = yes; then
13051   cat >>confdefs.h <<EOF
13052 #define HAVE_LIBCPOSIX 1
13053 EOF
13054
13055   LIBS="-lcposix $LIBS"
13056
13057 fi
13058
13059         echo "$as_me:13059: checking for bzero in -linet" >&5
13060 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13061 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13062   echo $ECHO_N "(cached) $ECHO_C" >&6
13063 else
13064   ac_check_lib_save_LIBS=$LIBS
13065 LIBS="-linet  $LIBS"
13066 cat >conftest.$ac_ext <<_ACEOF
13067 #line 13067 "configure"
13068 #include "confdefs.h"
13069
13070 /* Override any gcc2 internal prototype to avoid an error.  */
13071 #ifdef __cplusplus
13072 extern "C"
13073 #endif
13074 /* We use char because int might match the return type of a gcc2
13075    builtin and then its argument prototype would still apply.  */
13076 char bzero ();
13077 int
13078 main ()
13079 {
13080 bzero ();
13081   ;
13082   return 0;
13083 }
13084 _ACEOF
13085 rm -f conftest.$ac_objext conftest$ac_exeext
13086 if { (eval echo "$as_me:13086: \"$ac_link\"") >&5
13087   (eval $ac_link) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); } &&
13091          { ac_try='test -s conftest$ac_exeext'
13092   { (eval echo "$as_me:13092: \"$ac_try\"") >&5
13093   (eval $ac_try) 2>&5
13094   ac_status=$?
13095   echo "$as_me:13095: \$? = $ac_status" >&5
13096   (exit $ac_status); }; }; then
13097   ac_cv_lib_inet_bzero=yes
13098 else
13099   echo "$as_me: failed program was:" >&5
13100 cat conftest.$ac_ext >&5
13101 ac_cv_lib_inet_bzero=no
13102 fi
13103 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13104 LIBS=$ac_check_lib_save_LIBS
13105 fi
13106 echo "$as_me:13106: result: $ac_cv_lib_inet_bzero" >&5
13107 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13108 if test $ac_cv_lib_inet_bzero = yes; then
13109   LIBS="-linet $LIBS"
13110 fi
13111 fi
13112
13113 echo "$as_me:13113: checking if sys/time.h works with sys/select.h" >&5
13114 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13115 if test "${cf_cv_sys_time_select+set}" = set; then
13116   echo $ECHO_N "(cached) $ECHO_C" >&6
13117 else
13118
13119 cat >conftest.$ac_ext <<_ACEOF
13120 #line 13120 "configure"
13121 #include "confdefs.h"
13122
13123 #include <sys/types.h>
13124 #ifdef HAVE_SYS_TIME_H
13125 #include <sys/time.h>
13126 #endif
13127 #ifdef HAVE_SYS_SELECT_H
13128 #include <sys/select.h>
13129 #endif
13130
13131 int
13132 main ()
13133 {
13134
13135   ;
13136   return 0;
13137 }
13138 _ACEOF
13139 rm -f conftest.$ac_objext
13140 if { (eval echo "$as_me:13140: \"$ac_compile\"") >&5
13141   (eval $ac_compile) 2>&5
13142   ac_status=$?
13143   echo "$as_me:13143: \$? = $ac_status" >&5
13144   (exit $ac_status); } &&
13145          { ac_try='test -s conftest.$ac_objext'
13146   { (eval echo "$as_me:13146: \"$ac_try\"") >&5
13147   (eval $ac_try) 2>&5
13148   ac_status=$?
13149   echo "$as_me:13149: \$? = $ac_status" >&5
13150   (exit $ac_status); }; }; then
13151   cf_cv_sys_time_select=yes
13152 else
13153   echo "$as_me: failed program was:" >&5
13154 cat conftest.$ac_ext >&5
13155 cf_cv_sys_time_select=no
13156 fi
13157 rm -f conftest.$ac_objext conftest.$ac_ext
13158
13159 fi
13160
13161 echo "$as_me:13161: result: $cf_cv_sys_time_select" >&5
13162 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13163 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13164 #define HAVE_SYS_TIME_SELECT 1
13165 EOF
13166
13167 ###     checks for compiler characteristics
13168 ac_ext=c
13169 ac_cpp='$CPP $CPPFLAGS'
13170 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13171 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13172 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13173 ac_main_return=return
13174
13175 echo "$as_me:13175: checking for $CC option to accept ANSI C" >&5
13176 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13177 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13178   echo $ECHO_N "(cached) $ECHO_C" >&6
13179 else
13180   ac_cv_prog_cc_stdc=no
13181 ac_save_CC=$CC
13182 cat >conftest.$ac_ext <<_ACEOF
13183 #line 13183 "configure"
13184 #include "confdefs.h"
13185 #include <stdarg.h>
13186 #include <stdio.h>
13187 #include <sys/types.h>
13188 #include <sys/stat.h>
13189 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13190 struct buf { int x; };
13191 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13192 static char *e (p, i)
13193      char **p;
13194      int i;
13195 {
13196   return p[i];
13197 }
13198 static char *f (char * (*g) (char **, int), char **p, ...)
13199 {
13200   char *s;
13201   va_list v;
13202   va_start (v,p);
13203   s = g (p, va_arg (v,int));
13204   va_end (v);
13205   return s;
13206 }
13207 int test (int i, double x);
13208 struct s1 {int (*f) (int a);};
13209 struct s2 {int (*f) (double a);};
13210 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13211 int argc;
13212 char **argv;
13213 int
13214 main ()
13215 {
13216 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 # Don't try gcc -ansi; that turns off useful extensions and
13222 # breaks some systems' header files.
13223 # AIX                   -qlanglvl=ansi
13224 # Ultrix and OSF/1      -std1
13225 # HP-UX 10.20 and later -Ae
13226 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13227 # SVR4                  -Xc -D__EXTENSIONS__
13228 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13229 do
13230   CC="$ac_save_CC $ac_arg"
13231   rm -f conftest.$ac_objext
13232 if { (eval echo "$as_me:13232: \"$ac_compile\"") >&5
13233   (eval $ac_compile) 2>&5
13234   ac_status=$?
13235   echo "$as_me:13235: \$? = $ac_status" >&5
13236   (exit $ac_status); } &&
13237          { ac_try='test -s conftest.$ac_objext'
13238   { (eval echo "$as_me:13238: \"$ac_try\"") >&5
13239   (eval $ac_try) 2>&5
13240   ac_status=$?
13241   echo "$as_me:13241: \$? = $ac_status" >&5
13242   (exit $ac_status); }; }; then
13243   ac_cv_prog_cc_stdc=$ac_arg
13244 break
13245 else
13246   echo "$as_me: failed program was:" >&5
13247 cat conftest.$ac_ext >&5
13248 fi
13249 rm -f conftest.$ac_objext
13250 done
13251 rm -f conftest.$ac_ext conftest.$ac_objext
13252 CC=$ac_save_CC
13253
13254 fi
13255
13256 case "x$ac_cv_prog_cc_stdc" in
13257   x|xno)
13258     echo "$as_me:13258: result: none needed" >&5
13259 echo "${ECHO_T}none needed" >&6 ;;
13260   *)
13261     echo "$as_me:13261: result: $ac_cv_prog_cc_stdc" >&5
13262 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13263     CC="$CC $ac_cv_prog_cc_stdc" ;;
13264 esac
13265
13266 echo "$as_me:13266: checking for an ANSI C-conforming const" >&5
13267 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13268 if test "${ac_cv_c_const+set}" = set; then
13269   echo $ECHO_N "(cached) $ECHO_C" >&6
13270 else
13271   cat >conftest.$ac_ext <<_ACEOF
13272 #line 13272 "configure"
13273 #include "confdefs.h"
13274
13275 int
13276 main ()
13277 {
13278 /* FIXME: Include the comments suggested by Paul. */
13279 #ifndef __cplusplus
13280   /* Ultrix mips cc rejects this.  */
13281   typedef int charset[2];
13282   const charset x;
13283   /* SunOS 4.1.1 cc rejects this.  */
13284   char const *const *ccp;
13285   char **p;
13286   /* NEC SVR4.0.2 mips cc rejects this.  */
13287   struct point {int x, y;};
13288   static struct point const zero = {0,0};
13289   /* AIX XL C 1.02.0.0 rejects this.
13290      It does not let you subtract one const X* pointer from another in
13291      an arm of an if-expression whose if-part is not a constant
13292      expression */
13293   const char *g = "string";
13294   ccp = &g + (g ? g-g : 0);
13295   /* HPUX 7.0 cc rejects these. */
13296   ++ccp;
13297   p = (char**) ccp;
13298   ccp = (char const *const *) p;
13299   { /* SCO 3.2v4 cc rejects this.  */
13300     char *t;
13301     char const *s = 0 ? (char *) 0 : (char const *) 0;
13302
13303     *t++ = 0;
13304   }
13305   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13306     int x[] = {25, 17};
13307     const int *foo = &x[0];
13308     ++foo;
13309   }
13310   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13311     typedef const int *iptr;
13312     iptr p = 0;
13313     ++p;
13314   }
13315   { /* AIX XL C 1.02.0.0 rejects this saying
13316        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13317     struct s { int j; const int *ap[3]; };
13318     struct s *b; b->j = 5;
13319   }
13320   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13321     const int foo = 10;
13322   }
13323 #endif
13324
13325   ;
13326   return 0;
13327 }
13328 _ACEOF
13329 rm -f conftest.$ac_objext
13330 if { (eval echo "$as_me:13330: \"$ac_compile\"") >&5
13331   (eval $ac_compile) 2>&5
13332   ac_status=$?
13333   echo "$as_me:13333: \$? = $ac_status" >&5
13334   (exit $ac_status); } &&
13335          { ac_try='test -s conftest.$ac_objext'
13336   { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337   (eval $ac_try) 2>&5
13338   ac_status=$?
13339   echo "$as_me:13339: \$? = $ac_status" >&5
13340   (exit $ac_status); }; }; then
13341   ac_cv_c_const=yes
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat conftest.$ac_ext >&5
13345 ac_cv_c_const=no
13346 fi
13347 rm -f conftest.$ac_objext conftest.$ac_ext
13348 fi
13349 echo "$as_me:13349: result: $ac_cv_c_const" >&5
13350 echo "${ECHO_T}$ac_cv_c_const" >&6
13351 if test $ac_cv_c_const = no; then
13352
13353 cat >>confdefs.h <<\EOF
13354 #define const
13355 EOF
13356
13357 fi
13358
13359 echo "$as_me:13359: checking for inline" >&5
13360 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13361 if test "${ac_cv_c_inline+set}" = set; then
13362   echo $ECHO_N "(cached) $ECHO_C" >&6
13363 else
13364   ac_cv_c_inline=no
13365 for ac_kw in inline __inline__ __inline; do
13366   cat >conftest.$ac_ext <<_ACEOF
13367 #line 13367 "configure"
13368 #include "confdefs.h"
13369 #ifndef __cplusplus
13370 static $ac_kw int static_foo () {return 0; }
13371 $ac_kw int foo () {return 0; }
13372 #endif
13373
13374 _ACEOF
13375 rm -f conftest.$ac_objext
13376 if { (eval echo "$as_me:13376: \"$ac_compile\"") >&5
13377   (eval $ac_compile) 2>&5
13378   ac_status=$?
13379   echo "$as_me:13379: \$? = $ac_status" >&5
13380   (exit $ac_status); } &&
13381          { ac_try='test -s conftest.$ac_objext'
13382   { (eval echo "$as_me:13382: \"$ac_try\"") >&5
13383   (eval $ac_try) 2>&5
13384   ac_status=$?
13385   echo "$as_me:13385: \$? = $ac_status" >&5
13386   (exit $ac_status); }; }; then
13387   ac_cv_c_inline=$ac_kw; break
13388 else
13389   echo "$as_me: failed program was:" >&5
13390 cat conftest.$ac_ext >&5
13391 fi
13392 rm -f conftest.$ac_objext conftest.$ac_ext
13393 done
13394
13395 fi
13396 echo "$as_me:13396: result: $ac_cv_c_inline" >&5
13397 echo "${ECHO_T}$ac_cv_c_inline" >&6
13398 case $ac_cv_c_inline in
13399   inline | yes) ;;
13400   no)
13401 cat >>confdefs.h <<\EOF
13402 #define inline
13403 EOF
13404  ;;
13405   *)  cat >>confdefs.h <<EOF
13406 #define inline $ac_cv_c_inline
13407 EOF
13408  ;;
13409 esac
13410
13411 NCURSES_INLINE=
13412 if test "$ac_cv_c_inline" != no ; then
13413   NCURSES_INLINE=inline
13414   if test "$INTEL_COMPILER" = yes
13415   then
13416     :
13417   elif test "$GCC" = yes
13418   then
13419     echo "$as_me:13419: checking if $CC supports options to tune inlining" >&5
13420 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
13421 if test "${cf_cv_gcc_inline+set}" = set; then
13422   echo $ECHO_N "(cached) $ECHO_C" >&6
13423 else
13424
13425       cf_save_CFLAGS=$CFLAGS
13426       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13427       cat >conftest.$ac_ext <<_ACEOF
13428 #line 13428 "configure"
13429 #include "confdefs.h"
13430 inline int foo(void) { return 1; }
13431 int
13432 main ()
13433 {
13434 ${cf_cv_main_return:-return} foo()
13435   ;
13436   return 0;
13437 }
13438 _ACEOF
13439 rm -f conftest.$ac_objext
13440 if { (eval echo "$as_me:13440: \"$ac_compile\"") >&5
13441   (eval $ac_compile) 2>&5
13442   ac_status=$?
13443   echo "$as_me:13443: \$? = $ac_status" >&5
13444   (exit $ac_status); } &&
13445          { ac_try='test -s conftest.$ac_objext'
13446   { (eval echo "$as_me:13446: \"$ac_try\"") >&5
13447   (eval $ac_try) 2>&5
13448   ac_status=$?
13449   echo "$as_me:13449: \$? = $ac_status" >&5
13450   (exit $ac_status); }; }; then
13451   cf_cv_gcc_inline=yes
13452 else
13453   echo "$as_me: failed program was:" >&5
13454 cat conftest.$ac_ext >&5
13455 cf_cv_gcc_inline=no
13456 fi
13457 rm -f conftest.$ac_objext conftest.$ac_ext
13458       CFLAGS=$cf_save_CFLAGS
13459
13460 fi
13461 echo "$as_me:13461: result: $cf_cv_gcc_inline" >&5
13462 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13463     if test "$cf_cv_gcc_inline" = yes ; then
13464
13465 cf_fix_cppflags=no
13466 cf_new_cflags=
13467 cf_new_cppflags=
13468 cf_new_extra_cppflags=
13469
13470 for cf_add_cflags in --param max-inline-insns-single=1200
13471 do
13472 case $cf_fix_cppflags in
13473 no)
13474         case $cf_add_cflags in #(vi
13475         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13476                 case $cf_add_cflags in
13477                 -D*)
13478                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13479
13480                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13481                                 && test -z "${cf_tst_cflags}" \
13482                                 && cf_fix_cppflags=yes
13483
13484                         if test $cf_fix_cppflags = yes ; then
13485                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13486                                 continue
13487                         elif test "${cf_tst_cflags}" = "\"'" ; then
13488                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13489                                 continue
13490                         fi
13491                         ;;
13492                 esac
13493                 case "$CPPFLAGS" in
13494                 *$cf_add_cflags) #(vi
13495                         ;;
13496                 *) #(vi
13497                         case $cf_add_cflags in #(vi
13498                         -D*)
13499                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13500
13501 CPPFLAGS=`echo "$CPPFLAGS" | \
13502         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13503                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13504
13505                                 ;;
13506                         esac
13507                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13508                         ;;
13509                 esac
13510                 ;;
13511         *)
13512                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13513                 ;;
13514         esac
13515         ;;
13516 yes)
13517         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13518
13519         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13520
13521         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13522                 && test -z "${cf_tst_cflags}" \
13523                 && cf_fix_cppflags=no
13524         ;;
13525 esac
13526 done
13527
13528 if test -n "$cf_new_cflags" ; then
13529
13530         CFLAGS="$CFLAGS $cf_new_cflags"
13531 fi
13532
13533 if test -n "$cf_new_cppflags" ; then
13534
13535         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13536 fi
13537
13538 if test -n "$cf_new_extra_cppflags" ; then
13539
13540         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13541 fi
13542
13543     fi
13544   fi
13545 fi
13546
13547 echo "$as_me:13547: checking for signal global datatype" >&5
13548 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13549 if test "${cf_cv_sig_atomic_t+set}" = set; then
13550   echo $ECHO_N "(cached) $ECHO_C" >&6
13551 else
13552
13553         for cf_type in \
13554                 "volatile sig_atomic_t" \
13555                 "sig_atomic_t" \
13556                 "int"
13557         do
13558         cat >conftest.$ac_ext <<_ACEOF
13559 #line 13559 "configure"
13560 #include "confdefs.h"
13561
13562 #include <sys/types.h>
13563 #include <signal.h>
13564 #include <stdio.h>
13565
13566 extern $cf_type x;
13567 $cf_type x;
13568 static void handler(int sig)
13569 {
13570         x = 5;
13571 }
13572 int
13573 main ()
13574 {
13575 signal(SIGINT, handler);
13576                  x = 1
13577   ;
13578   return 0;
13579 }
13580 _ACEOF
13581 rm -f conftest.$ac_objext
13582 if { (eval echo "$as_me:13582: \"$ac_compile\"") >&5
13583   (eval $ac_compile) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit $ac_status); } &&
13587          { ac_try='test -s conftest.$ac_objext'
13588   { (eval echo "$as_me:13588: \"$ac_try\"") >&5
13589   (eval $ac_try) 2>&5
13590   ac_status=$?
13591   echo "$as_me:13591: \$? = $ac_status" >&5
13592   (exit $ac_status); }; }; then
13593   cf_cv_sig_atomic_t=$cf_type
13594 else
13595   echo "$as_me: failed program was:" >&5
13596 cat conftest.$ac_ext >&5
13597 cf_cv_sig_atomic_t=no
13598 fi
13599 rm -f conftest.$ac_objext conftest.$ac_ext
13600                 test "$cf_cv_sig_atomic_t" != no && break
13601         done
13602
13603 fi
13604
13605 echo "$as_me:13605: result: $cf_cv_sig_atomic_t" >&5
13606 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13607 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13608 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13609 EOF
13610
13611 if test $NCURSES_CHTYPE = auto ; then
13612
13613 echo "$as_me:13613: checking for type of chtype" >&5
13614 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13615 if test "${cf_cv_typeof_chtype+set}" = set; then
13616   echo $ECHO_N "(cached) $ECHO_C" >&6
13617 else
13618
13619                 if test "$cross_compiling" = yes; then
13620   cf_cv_typeof_chtype=long
13621 else
13622   cat >conftest.$ac_ext <<_ACEOF
13623 #line 13623 "configure"
13624 #include "confdefs.h"
13625
13626 #define WANT_BITS 31
13627 #include <stdio.h>
13628 int main()
13629 {
13630         FILE *fp = fopen("cf_test.out", "w");
13631         if (fp != 0) {
13632                 char *result = "long";
13633                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13634                         int n;
13635                         unsigned int x, y;
13636                         for (n = 0; n < WANT_BITS; n++) {
13637                                 x = (1 << n);
13638                                 y = (x >> n);
13639                                 if (y != 1 || x == 0) {
13640                                         x = 0;
13641                                         break;
13642                                 }
13643                         }
13644                         /*
13645                          * If x is nonzero, an int is big enough for the bits
13646                          * that we want.
13647                          */
13648                         result = (x != 0) ? "int" : "long";
13649                 }
13650                 fputs(result, fp);
13651                 fclose(fp);
13652         }
13653         ${cf_cv_main_return:-return}(0);
13654 }
13655
13656 _ACEOF
13657 rm -f conftest$ac_exeext
13658 if { (eval echo "$as_me:13658: \"$ac_link\"") >&5
13659   (eval $ac_link) 2>&5
13660   ac_status=$?
13661   echo "$as_me:13661: \$? = $ac_status" >&5
13662   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13663   { (eval echo "$as_me:13663: \"$ac_try\"") >&5
13664   (eval $ac_try) 2>&5
13665   ac_status=$?
13666   echo "$as_me:13666: \$? = $ac_status" >&5
13667   (exit $ac_status); }; }; then
13668   cf_cv_typeof_chtype=`cat cf_test.out`
13669 else
13670   echo "$as_me: program exited with status $ac_status" >&5
13671 echo "$as_me: failed program was:" >&5
13672 cat conftest.$ac_ext >&5
13673 cf_cv_typeof_chtype=long
13674 fi
13675 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13676 fi
13677                 rm -f cf_test.out
13678
13679 fi
13680
13681 echo "$as_me:13681: result: $cf_cv_typeof_chtype" >&5
13682 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13683
13684 cat >>confdefs.h <<EOF
13685 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13686 EOF
13687
13688 else
13689         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13690 fi
13691 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13692
13693 echo "$as_me:13693: checking if unsigned literals are legal" >&5
13694 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13695 if test "${cf_cv_unsigned_literals+set}" = set; then
13696   echo $ECHO_N "(cached) $ECHO_C" >&6
13697 else
13698
13699         cat >conftest.$ac_ext <<_ACEOF
13700 #line 13700 "configure"
13701 #include "confdefs.h"
13702
13703 int
13704 main ()
13705 {
13706 long x = 1L + 1UL + 1U + 1
13707   ;
13708   return 0;
13709 }
13710 _ACEOF
13711 rm -f conftest.$ac_objext
13712 if { (eval echo "$as_me:13712: \"$ac_compile\"") >&5
13713   (eval $ac_compile) 2>&5
13714   ac_status=$?
13715   echo "$as_me:13715: \$? = $ac_status" >&5
13716   (exit $ac_status); } &&
13717          { ac_try='test -s conftest.$ac_objext'
13718   { (eval echo "$as_me:13718: \"$ac_try\"") >&5
13719   (eval $ac_try) 2>&5
13720   ac_status=$?
13721   echo "$as_me:13721: \$? = $ac_status" >&5
13722   (exit $ac_status); }; }; then
13723   cf_cv_unsigned_literals=yes
13724 else
13725   echo "$as_me: failed program was:" >&5
13726 cat conftest.$ac_ext >&5
13727 cf_cv_unsigned_literals=no
13728 fi
13729 rm -f conftest.$ac_objext conftest.$ac_ext
13730
13731 fi
13732
13733 echo "$as_me:13733: result: $cf_cv_unsigned_literals" >&5
13734 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13735
13736 cf_cv_1UL="1"
13737 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13738 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13739
13740 if test $NCURSES_MMASK_T = auto ; then
13741         cf_cv_typeof_mmask_t=long
13742 else
13743         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13744 fi
13745 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13746
13747 ###     Checks for external-data
13748
13749 echo "$as_me:13749: checking if external errno is declared" >&5
13750 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13751 if test "${cf_cv_dcl_errno+set}" = set; then
13752   echo $ECHO_N "(cached) $ECHO_C" >&6
13753 else
13754
13755     cat >conftest.$ac_ext <<_ACEOF
13756 #line 13756 "configure"
13757 #include "confdefs.h"
13758
13759 #ifdef HAVE_STDLIB_H
13760 #include <stdlib.h>
13761 #endif
13762 #include <stdio.h>
13763 #include <sys/types.h>
13764 #include <errno.h>
13765 int
13766 main ()
13767 {
13768 int x = (int) errno
13769   ;
13770   return 0;
13771 }
13772 _ACEOF
13773 rm -f conftest.$ac_objext
13774 if { (eval echo "$as_me:13774: \"$ac_compile\"") >&5
13775   (eval $ac_compile) 2>&5
13776   ac_status=$?
13777   echo "$as_me:13777: \$? = $ac_status" >&5
13778   (exit $ac_status); } &&
13779          { ac_try='test -s conftest.$ac_objext'
13780   { (eval echo "$as_me:13780: \"$ac_try\"") >&5
13781   (eval $ac_try) 2>&5
13782   ac_status=$?
13783   echo "$as_me:13783: \$? = $ac_status" >&5
13784   (exit $ac_status); }; }; then
13785   cf_cv_dcl_errno=yes
13786 else
13787   echo "$as_me: failed program was:" >&5
13788 cat conftest.$ac_ext >&5
13789 cf_cv_dcl_errno=no
13790 fi
13791 rm -f conftest.$ac_objext conftest.$ac_ext
13792
13793 fi
13794 echo "$as_me:13794: result: $cf_cv_dcl_errno" >&5
13795 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13796
13797 if test "$cf_cv_dcl_errno" = no ; then
13798
13799 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13800
13801     cat >>confdefs.h <<EOF
13802 #define $cf_result 1
13803 EOF
13804
13805 fi
13806
13807 # It's possible (for near-UNIX clones) that the data doesn't exist
13808
13809 echo "$as_me:13809: checking if external errno exists" >&5
13810 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13811 if test "${cf_cv_have_errno+set}" = set; then
13812   echo $ECHO_N "(cached) $ECHO_C" >&6
13813 else
13814
13815     cat >conftest.$ac_ext <<_ACEOF
13816 #line 13816 "configure"
13817 #include "confdefs.h"
13818
13819 #undef errno
13820 extern int errno;
13821
13822 int
13823 main ()
13824 {
13825 errno = 2
13826   ;
13827   return 0;
13828 }
13829 _ACEOF
13830 rm -f conftest.$ac_objext conftest$ac_exeext
13831 if { (eval echo "$as_me:13831: \"$ac_link\"") >&5
13832   (eval $ac_link) 2>&5
13833   ac_status=$?
13834   echo "$as_me:13834: \$? = $ac_status" >&5
13835   (exit $ac_status); } &&
13836          { ac_try='test -s conftest$ac_exeext'
13837   { (eval echo "$as_me:13837: \"$ac_try\"") >&5
13838   (eval $ac_try) 2>&5
13839   ac_status=$?
13840   echo "$as_me:13840: \$? = $ac_status" >&5
13841   (exit $ac_status); }; }; then
13842   cf_cv_have_errno=yes
13843 else
13844   echo "$as_me: failed program was:" >&5
13845 cat conftest.$ac_ext >&5
13846 cf_cv_have_errno=no
13847 fi
13848 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13849
13850 fi
13851 echo "$as_me:13851: result: $cf_cv_have_errno" >&5
13852 echo "${ECHO_T}$cf_cv_have_errno" >&6
13853
13854 if test "$cf_cv_have_errno" = yes ; then
13855
13856 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13857
13858     cat >>confdefs.h <<EOF
13859 #define $cf_result 1
13860 EOF
13861
13862 fi
13863
13864 echo "$as_me:13864: checking if data-only library module links" >&5
13865 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13866 if test "${cf_cv_link_dataonly+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869
13870         rm -f conftest.a
13871         cat >conftest.$ac_ext <<EOF
13872 #line 13872 "configure"
13873 int     testdata[3] = { 123, 456, 789 };
13874 EOF
13875         if { (eval echo "$as_me:13875: \"$ac_compile\"") >&5
13876   (eval $ac_compile) 2>&5
13877   ac_status=$?
13878   echo "$as_me:13878: \$? = $ac_status" >&5
13879   (exit $ac_status); } ; then
13880                 mv conftest.o data.o && \
13881                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13882         fi
13883         rm -f conftest.$ac_ext data.o
13884         cat >conftest.$ac_ext <<EOF
13885 #line 13885 "configure"
13886 int     testfunc()
13887 {
13888 #if defined(NeXT)
13889         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13890 #else
13891         extern int testdata[3];
13892         return testdata[0] == 123
13893            &&  testdata[1] == 456
13894            &&  testdata[2] == 789;
13895 #endif
13896 }
13897 EOF
13898         if { (eval echo "$as_me:13898: \"$ac_compile\"") >&5
13899   (eval $ac_compile) 2>&5
13900   ac_status=$?
13901   echo "$as_me:13901: \$? = $ac_status" >&5
13902   (exit $ac_status); }; then
13903                 mv conftest.o func.o && \
13904                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13905         fi
13906         rm -f conftest.$ac_ext func.o
13907         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13908         cf_saveLIBS="$LIBS"
13909         LIBS="conftest.a $LIBS"
13910         if test "$cross_compiling" = yes; then
13911   cf_cv_link_dataonly=unknown
13912 else
13913   cat >conftest.$ac_ext <<_ACEOF
13914 #line 13914 "configure"
13915 #include "confdefs.h"
13916
13917         int main()
13918         {
13919                 extern int testfunc();
13920                 ${cf_cv_main_return:-return} (!testfunc());
13921         }
13922
13923 _ACEOF
13924 rm -f conftest$ac_exeext
13925 if { (eval echo "$as_me:13925: \"$ac_link\"") >&5
13926   (eval $ac_link) 2>&5
13927   ac_status=$?
13928   echo "$as_me:13928: \$? = $ac_status" >&5
13929   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13930   { (eval echo "$as_me:13930: \"$ac_try\"") >&5
13931   (eval $ac_try) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); }; }; then
13935   cf_cv_link_dataonly=yes
13936 else
13937   echo "$as_me: program exited with status $ac_status" >&5
13938 echo "$as_me: failed program was:" >&5
13939 cat conftest.$ac_ext >&5
13940 cf_cv_link_dataonly=no
13941 fi
13942 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13943 fi
13944         LIBS="$cf_saveLIBS"
13945
13946 fi
13947
13948 echo "$as_me:13948: result: $cf_cv_link_dataonly" >&5
13949 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13950
13951 if test "$cf_cv_link_dataonly" = no ; then
13952         cat >>confdefs.h <<\EOF
13953 #define BROKEN_LINKER 1
13954 EOF
13955
13956         BROKEN_LINKER=1
13957 fi
13958
13959 ###     Checks for library functions.
13960
13961 for ac_func in \
13962 getcwd \
13963 getegid \
13964 geteuid \
13965 getttynam \
13966 issetugid \
13967 poll \
13968 remove \
13969 select \
13970 setbuf \
13971 setbuffer \
13972 setvbuf \
13973 sigaction \
13974 sigvec \
13975 strdup \
13976 strstr \
13977 tcgetpgrp \
13978 times \
13979 vsnprintf \
13980
13981 do
13982 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13983 echo "$as_me:13983: checking for $ac_func" >&5
13984 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13985 if eval "test \"\${$as_ac_var+set}\" = set"; then
13986   echo $ECHO_N "(cached) $ECHO_C" >&6
13987 else
13988   cat >conftest.$ac_ext <<_ACEOF
13989 #line 13989 "configure"
13990 #include "confdefs.h"
13991 /* System header to define __stub macros and hopefully few prototypes,
13992     which can conflict with char $ac_func (); below.  */
13993 #include <assert.h>
13994 /* Override any gcc2 internal prototype to avoid an error.  */
13995 #ifdef __cplusplus
13996 extern "C"
13997 #endif
13998 /* We use char because int might match the return type of a gcc2
13999    builtin and then its argument prototype would still apply.  */
14000 char $ac_func ();
14001 char (*f) ();
14002
14003 int
14004 main ()
14005 {
14006 /* The GNU C library defines this for functions which it implements
14007     to always fail with ENOSYS.  Some functions are actually named
14008     something starting with __ and the normal name is an alias.  */
14009 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14010 choke me
14011 #else
14012 f = $ac_func;
14013 #endif
14014
14015   ;
14016   return 0;
14017 }
14018 _ACEOF
14019 rm -f conftest.$ac_objext conftest$ac_exeext
14020 if { (eval echo "$as_me:14020: \"$ac_link\"") >&5
14021   (eval $ac_link) 2>&5
14022   ac_status=$?
14023   echo "$as_me:14023: \$? = $ac_status" >&5
14024   (exit $ac_status); } &&
14025          { ac_try='test -s conftest$ac_exeext'
14026   { (eval echo "$as_me:14026: \"$ac_try\"") >&5
14027   (eval $ac_try) 2>&5
14028   ac_status=$?
14029   echo "$as_me:14029: \$? = $ac_status" >&5
14030   (exit $ac_status); }; }; then
14031   eval "$as_ac_var=yes"
14032 else
14033   echo "$as_me: failed program was:" >&5
14034 cat conftest.$ac_ext >&5
14035 eval "$as_ac_var=no"
14036 fi
14037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14038 fi
14039 echo "$as_me:14039: result: `eval echo '${'$as_ac_var'}'`" >&5
14040 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14041 if test `eval echo '${'$as_ac_var'}'` = yes; then
14042   cat >>confdefs.h <<EOF
14043 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14044 EOF
14045
14046 fi
14047 done
14048
14049 if test "$with_getcap" = "yes" ; then
14050
14051 echo "$as_me:14051: checking for terminal-capability database functions" >&5
14052 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14053 if test "${cf_cv_cgetent+set}" = set; then
14054   echo $ECHO_N "(cached) $ECHO_C" >&6
14055 else
14056
14057 cat >conftest.$ac_ext <<_ACEOF
14058 #line 14058 "configure"
14059 #include "confdefs.h"
14060
14061 #include <stdlib.h>
14062 int
14063 main ()
14064 {
14065
14066         char temp[128];
14067         char *buf = temp;
14068         char *db_array = temp;
14069         cgetent(&buf, /* int *, */ &db_array, "vt100");
14070         cgetcap(buf, "tc", '=');
14071         cgetmatch(buf, "tc");
14072
14073   ;
14074   return 0;
14075 }
14076 _ACEOF
14077 rm -f conftest.$ac_objext conftest$ac_exeext
14078 if { (eval echo "$as_me:14078: \"$ac_link\"") >&5
14079   (eval $ac_link) 2>&5
14080   ac_status=$?
14081   echo "$as_me:14081: \$? = $ac_status" >&5
14082   (exit $ac_status); } &&
14083          { ac_try='test -s conftest$ac_exeext'
14084   { (eval echo "$as_me:14084: \"$ac_try\"") >&5
14085   (eval $ac_try) 2>&5
14086   ac_status=$?
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit $ac_status); }; }; then
14089   cf_cv_cgetent=yes
14090 else
14091   echo "$as_me: failed program was:" >&5
14092 cat conftest.$ac_ext >&5
14093 cf_cv_cgetent=no
14094 fi
14095 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14096
14097 fi
14098
14099 echo "$as_me:14099: result: $cf_cv_cgetent" >&5
14100 echo "${ECHO_T}$cf_cv_cgetent" >&6
14101 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14102 #define HAVE_BSD_CGETENT 1
14103 EOF
14104
14105 fi
14106
14107 echo "$as_me:14107: checking for isascii" >&5
14108 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14109 if test "${cf_cv_have_isascii+set}" = set; then
14110   echo $ECHO_N "(cached) $ECHO_C" >&6
14111 else
14112
14113         cat >conftest.$ac_ext <<_ACEOF
14114 #line 14114 "configure"
14115 #include "confdefs.h"
14116 #include <ctype.h>
14117 int
14118 main ()
14119 {
14120 int x = isascii(' ')
14121   ;
14122   return 0;
14123 }
14124 _ACEOF
14125 rm -f conftest.$ac_objext conftest$ac_exeext
14126 if { (eval echo "$as_me:14126: \"$ac_link\"") >&5
14127   (eval $ac_link) 2>&5
14128   ac_status=$?
14129   echo "$as_me:14129: \$? = $ac_status" >&5
14130   (exit $ac_status); } &&
14131          { ac_try='test -s conftest$ac_exeext'
14132   { (eval echo "$as_me:14132: \"$ac_try\"") >&5
14133   (eval $ac_try) 2>&5
14134   ac_status=$?
14135   echo "$as_me:14135: \$? = $ac_status" >&5
14136   (exit $ac_status); }; }; then
14137   cf_cv_have_isascii=yes
14138 else
14139   echo "$as_me: failed program was:" >&5
14140 cat conftest.$ac_ext >&5
14141 cf_cv_have_isascii=no
14142 fi
14143 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14144
14145 fi
14146 echo "$as_me:14146: result: $cf_cv_have_isascii" >&5
14147 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14148 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14149 #define HAVE_ISASCII 1
14150 EOF
14151
14152 if test "$ac_cv_func_sigaction" = yes; then
14153 echo "$as_me:14153: checking whether sigaction needs _POSIX_SOURCE" >&5
14154 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14155 cat >conftest.$ac_ext <<_ACEOF
14156 #line 14156 "configure"
14157 #include "confdefs.h"
14158
14159 #include <sys/types.h>
14160 #include <signal.h>
14161 int
14162 main ()
14163 {
14164 struct sigaction act
14165   ;
14166   return 0;
14167 }
14168 _ACEOF
14169 rm -f conftest.$ac_objext
14170 if { (eval echo "$as_me:14170: \"$ac_compile\"") >&5
14171   (eval $ac_compile) 2>&5
14172   ac_status=$?
14173   echo "$as_me:14173: \$? = $ac_status" >&5
14174   (exit $ac_status); } &&
14175          { ac_try='test -s conftest.$ac_objext'
14176   { (eval echo "$as_me:14176: \"$ac_try\"") >&5
14177   (eval $ac_try) 2>&5
14178   ac_status=$?
14179   echo "$as_me:14179: \$? = $ac_status" >&5
14180   (exit $ac_status); }; }; then
14181   sigact_bad=no
14182 else
14183   echo "$as_me: failed program was:" >&5
14184 cat conftest.$ac_ext >&5
14185
14186 cat >conftest.$ac_ext <<_ACEOF
14187 #line 14187 "configure"
14188 #include "confdefs.h"
14189
14190 #define _POSIX_SOURCE
14191 #include <sys/types.h>
14192 #include <signal.h>
14193 int
14194 main ()
14195 {
14196 struct sigaction act
14197   ;
14198   return 0;
14199 }
14200 _ACEOF
14201 rm -f conftest.$ac_objext
14202 if { (eval echo "$as_me:14202: \"$ac_compile\"") >&5
14203   (eval $ac_compile) 2>&5
14204   ac_status=$?
14205   echo "$as_me:14205: \$? = $ac_status" >&5
14206   (exit $ac_status); } &&
14207          { ac_try='test -s conftest.$ac_objext'
14208   { (eval echo "$as_me:14208: \"$ac_try\"") >&5
14209   (eval $ac_try) 2>&5
14210   ac_status=$?
14211   echo "$as_me:14211: \$? = $ac_status" >&5
14212   (exit $ac_status); }; }; then
14213   sigact_bad=yes
14214          cat >>confdefs.h <<\EOF
14215 #define SVR4_ACTION 1
14216 EOF
14217
14218 else
14219   echo "$as_me: failed program was:" >&5
14220 cat conftest.$ac_ext >&5
14221 sigact_bad=unknown
14222 fi
14223 rm -f conftest.$ac_objext conftest.$ac_ext
14224 fi
14225 rm -f conftest.$ac_objext conftest.$ac_ext
14226 echo "$as_me:14226: result: $sigact_bad" >&5
14227 echo "${ECHO_T}$sigact_bad" >&6
14228 fi
14229
14230 echo "$as_me:14230: checking if nanosleep really works" >&5
14231 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14232 if test "${cf_cv_func_nanosleep+set}" = set; then
14233   echo $ECHO_N "(cached) $ECHO_C" >&6
14234 else
14235
14236 if test "$cross_compiling" = yes; then
14237   cf_cv_func_nanosleep=unknown
14238 else
14239   cat >conftest.$ac_ext <<_ACEOF
14240 #line 14240 "configure"
14241 #include "confdefs.h"
14242
14243 #include <stdio.h>
14244 #include <errno.h>
14245 #include <time.h>
14246
14247 #ifdef HAVE_SYS_TIME_H
14248 #include <sys/time.h>
14249 #endif
14250
14251 int main() {
14252         struct timespec ts1, ts2;
14253         int code;
14254         ts1.tv_sec  = 0;
14255         ts1.tv_nsec = 750000000;
14256         ts2.tv_sec  = 0;
14257         ts2.tv_nsec = 0;
14258         errno = 0;
14259         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14260         ${cf_cv_main_return:-return}(code != 0);
14261 }
14262
14263 _ACEOF
14264 rm -f conftest$ac_exeext
14265 if { (eval echo "$as_me:14265: \"$ac_link\"") >&5
14266   (eval $ac_link) 2>&5
14267   ac_status=$?
14268   echo "$as_me:14268: \$? = $ac_status" >&5
14269   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14270   { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:14273: \$? = $ac_status" >&5
14274   (exit $ac_status); }; }; then
14275   cf_cv_func_nanosleep=yes
14276 else
14277   echo "$as_me: program exited with status $ac_status" >&5
14278 echo "$as_me: failed program was:" >&5
14279 cat conftest.$ac_ext >&5
14280 cf_cv_func_nanosleep=no
14281 fi
14282 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14283 fi
14284 fi
14285 echo "$as_me:14285: result: $cf_cv_func_nanosleep" >&5
14286 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14287
14288 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14289 #define HAVE_NANOSLEEP 1
14290 EOF
14291
14292 for ac_header in \
14293 termio.h \
14294 termios.h \
14295 unistd.h \
14296
14297 do
14298 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14299 echo "$as_me:14299: checking for $ac_header" >&5
14300 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14301 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304   cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307 #include <$ac_header>
14308 _ACEOF
14309 if { (eval echo "$as_me:14309: \"$ac_cpp conftest.$ac_ext\"") >&5
14310   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14311   ac_status=$?
14312   egrep -v '^ *\+' conftest.er1 >conftest.err
14313   rm -f conftest.er1
14314   cat conftest.err >&5
14315   echo "$as_me:14315: \$? = $ac_status" >&5
14316   (exit $ac_status); } >/dev/null; then
14317   if test -s conftest.err; then
14318     ac_cpp_err=$ac_c_preproc_warn_flag
14319   else
14320     ac_cpp_err=
14321   fi
14322 else
14323   ac_cpp_err=yes
14324 fi
14325 if test -z "$ac_cpp_err"; then
14326   eval "$as_ac_Header=yes"
14327 else
14328   echo "$as_me: failed program was:" >&5
14329   cat conftest.$ac_ext >&5
14330   eval "$as_ac_Header=no"
14331 fi
14332 rm -f conftest.err conftest.$ac_ext
14333 fi
14334 echo "$as_me:14334: result: `eval echo '${'$as_ac_Header'}'`" >&5
14335 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14336 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14337   cat >>confdefs.h <<EOF
14338 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14339 EOF
14340
14341 fi
14342 done
14343
14344 if test "$ISC" = yes ; then
14345
14346 for ac_header in sys/termio.h
14347 do
14348 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14349 echo "$as_me:14349: checking for $ac_header" >&5
14350 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14351 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14352   echo $ECHO_N "(cached) $ECHO_C" >&6
14353 else
14354   cat >conftest.$ac_ext <<_ACEOF
14355 #line 14355 "configure"
14356 #include "confdefs.h"
14357 #include <$ac_header>
14358 _ACEOF
14359 if { (eval echo "$as_me:14359: \"$ac_cpp conftest.$ac_ext\"") >&5
14360   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14361   ac_status=$?
14362   egrep -v '^ *\+' conftest.er1 >conftest.err
14363   rm -f conftest.er1
14364   cat conftest.err >&5
14365   echo "$as_me:14365: \$? = $ac_status" >&5
14366   (exit $ac_status); } >/dev/null; then
14367   if test -s conftest.err; then
14368     ac_cpp_err=$ac_c_preproc_warn_flag
14369   else
14370     ac_cpp_err=
14371   fi
14372 else
14373   ac_cpp_err=yes
14374 fi
14375 if test -z "$ac_cpp_err"; then
14376   eval "$as_ac_Header=yes"
14377 else
14378   echo "$as_me: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   eval "$as_ac_Header=no"
14381 fi
14382 rm -f conftest.err conftest.$ac_ext
14383 fi
14384 echo "$as_me:14384: result: `eval echo '${'$as_ac_Header'}'`" >&5
14385 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14386 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14387   cat >>confdefs.h <<EOF
14388 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14389 EOF
14390
14391 fi
14392 done
14393
14394 fi
14395 if test "$ac_cv_header_termios_h" = yes ; then
14396         case "$CFLAGS $CPPFLAGS" in
14397         *-D_POSIX_SOURCE*)
14398                 termios_bad=dunno ;;
14399         *)      termios_bad=maybe ;;
14400         esac
14401         if test "$termios_bad" = maybe ; then
14402         echo "$as_me:14402: checking whether termios.h needs _POSIX_SOURCE" >&5
14403 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14404         cat >conftest.$ac_ext <<_ACEOF
14405 #line 14405 "configure"
14406 #include "confdefs.h"
14407 #include <termios.h>
14408 int
14409 main ()
14410 {
14411 struct termios foo; int x = foo.c_iflag
14412   ;
14413   return 0;
14414 }
14415 _ACEOF
14416 rm -f conftest.$ac_objext
14417 if { (eval echo "$as_me:14417: \"$ac_compile\"") >&5
14418   (eval $ac_compile) 2>&5
14419   ac_status=$?
14420   echo "$as_me:14420: \$? = $ac_status" >&5
14421   (exit $ac_status); } &&
14422          { ac_try='test -s conftest.$ac_objext'
14423   { (eval echo "$as_me:14423: \"$ac_try\"") >&5
14424   (eval $ac_try) 2>&5
14425   ac_status=$?
14426   echo "$as_me:14426: \$? = $ac_status" >&5
14427   (exit $ac_status); }; }; then
14428   termios_bad=no
14429 else
14430   echo "$as_me: failed program was:" >&5
14431 cat conftest.$ac_ext >&5
14432
14433                 cat >conftest.$ac_ext <<_ACEOF
14434 #line 14434 "configure"
14435 #include "confdefs.h"
14436
14437 #define _POSIX_SOURCE
14438 #include <termios.h>
14439 int
14440 main ()
14441 {
14442 struct termios foo; int x = foo.c_iflag
14443   ;
14444   return 0;
14445 }
14446 _ACEOF
14447 rm -f conftest.$ac_objext
14448 if { (eval echo "$as_me:14448: \"$ac_compile\"") >&5
14449   (eval $ac_compile) 2>&5
14450   ac_status=$?
14451   echo "$as_me:14451: \$? = $ac_status" >&5
14452   (exit $ac_status); } &&
14453          { ac_try='test -s conftest.$ac_objext'
14454   { (eval echo "$as_me:14454: \"$ac_try\"") >&5
14455   (eval $ac_try) 2>&5
14456   ac_status=$?
14457   echo "$as_me:14457: \$? = $ac_status" >&5
14458   (exit $ac_status); }; }; then
14459   termios_bad=unknown
14460 else
14461   echo "$as_me: failed program was:" >&5
14462 cat conftest.$ac_ext >&5
14463 termios_bad=yes cat >>confdefs.h <<\EOF
14464 #define SVR4_TERMIO 1
14465 EOF
14466
14467 fi
14468 rm -f conftest.$ac_objext conftest.$ac_ext
14469
14470 fi
14471 rm -f conftest.$ac_objext conftest.$ac_ext
14472         echo "$as_me:14472: result: $termios_bad" >&5
14473 echo "${ECHO_T}$termios_bad" >&6
14474         fi
14475 fi
14476
14477 echo "$as_me:14477: checking for tcgetattr" >&5
14478 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14479 if test "${cf_cv_have_tcgetattr+set}" = set; then
14480   echo $ECHO_N "(cached) $ECHO_C" >&6
14481 else
14482
14483 cat >conftest.$ac_ext <<_ACEOF
14484 #line 14484 "configure"
14485 #include "confdefs.h"
14486
14487 #include <sys/types.h>
14488 #ifdef HAVE_UNISTD_H
14489 #include <unistd.h>
14490 #endif
14491 #ifdef HAVE_TERMIOS_H
14492 #include <termios.h>
14493 #define TTY struct termios
14494 #else
14495 #ifdef HAVE_TERMIO_H
14496 #include <termio.h>
14497 #define TTY struct termio
14498 #endif
14499 #endif
14500
14501 int
14502 main ()
14503 {
14504
14505 TTY foo;
14506 tcgetattr(1, &foo);
14507   ;
14508   return 0;
14509 }
14510 _ACEOF
14511 rm -f conftest.$ac_objext conftest$ac_exeext
14512 if { (eval echo "$as_me:14512: \"$ac_link\"") >&5
14513   (eval $ac_link) 2>&5
14514   ac_status=$?
14515   echo "$as_me:14515: \$? = $ac_status" >&5
14516   (exit $ac_status); } &&
14517          { ac_try='test -s conftest$ac_exeext'
14518   { (eval echo "$as_me:14518: \"$ac_try\"") >&5
14519   (eval $ac_try) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); }; }; then
14523   cf_cv_have_tcgetattr=yes
14524 else
14525   echo "$as_me: failed program was:" >&5
14526 cat conftest.$ac_ext >&5
14527 cf_cv_have_tcgetattr=no
14528 fi
14529 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14530 fi
14531 echo "$as_me:14531: result: $cf_cv_have_tcgetattr" >&5
14532 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14533 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14534 #define HAVE_TCGETATTR 1
14535 EOF
14536
14537 echo "$as_me:14537: checking for vsscanf function or workaround" >&5
14538 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14539 if test "${cf_cv_func_vsscanf+set}" = set; then
14540   echo $ECHO_N "(cached) $ECHO_C" >&6
14541 else
14542
14543 cat >conftest.$ac_ext <<_ACEOF
14544 #line 14544 "configure"
14545 #include "confdefs.h"
14546
14547 #include <stdarg.h>
14548 #include <stdio.h>
14549 int
14550 main ()
14551 {
14552
14553         va_list ap;
14554         vsscanf("from", "%d", ap)
14555   ;
14556   return 0;
14557 }
14558 _ACEOF
14559 rm -f conftest.$ac_objext conftest$ac_exeext
14560 if { (eval echo "$as_me:14560: \"$ac_link\"") >&5
14561   (eval $ac_link) 2>&5
14562   ac_status=$?
14563   echo "$as_me:14563: \$? = $ac_status" >&5
14564   (exit $ac_status); } &&
14565          { ac_try='test -s conftest$ac_exeext'
14566   { (eval echo "$as_me:14566: \"$ac_try\"") >&5
14567   (eval $ac_try) 2>&5
14568   ac_status=$?
14569   echo "$as_me:14569: \$? = $ac_status" >&5
14570   (exit $ac_status); }; }; then
14571   cf_cv_func_vsscanf=vsscanf
14572 else
14573   echo "$as_me: failed program was:" >&5
14574 cat conftest.$ac_ext >&5
14575
14576 cat >conftest.$ac_ext <<_ACEOF
14577 #line 14577 "configure"
14578 #include "confdefs.h"
14579
14580 #include <stdarg.h>
14581 #include <stdio.h>
14582 int
14583 main ()
14584 {
14585
14586     FILE strbuf;
14587     char *str = "from";
14588
14589     strbuf._flag = _IOREAD;
14590     strbuf._ptr = strbuf._base = (unsigned char *) str;
14591     strbuf._cnt = strlen(str);
14592     strbuf._file = _NFILE;
14593     return (vfscanf(&strbuf, "%d", ap))
14594   ;
14595   return 0;
14596 }
14597 _ACEOF
14598 rm -f conftest.$ac_objext conftest$ac_exeext
14599 if { (eval echo "$as_me:14599: \"$ac_link\"") >&5
14600   (eval $ac_link) 2>&5
14601   ac_status=$?
14602   echo "$as_me:14602: \$? = $ac_status" >&5
14603   (exit $ac_status); } &&
14604          { ac_try='test -s conftest$ac_exeext'
14605   { (eval echo "$as_me:14605: \"$ac_try\"") >&5
14606   (eval $ac_try) 2>&5
14607   ac_status=$?
14608   echo "$as_me:14608: \$? = $ac_status" >&5
14609   (exit $ac_status); }; }; then
14610   cf_cv_func_vsscanf=vfscanf
14611 else
14612   echo "$as_me: failed program was:" >&5
14613 cat conftest.$ac_ext >&5
14614
14615 cat >conftest.$ac_ext <<_ACEOF
14616 #line 14616 "configure"
14617 #include "confdefs.h"
14618
14619 #include <stdarg.h>
14620 #include <stdio.h>
14621 int
14622 main ()
14623 {
14624
14625     FILE strbuf;
14626     char *str = "from";
14627
14628     strbuf._flag = _IOREAD;
14629     strbuf._ptr = strbuf._base = (unsigned char *) str;
14630     strbuf._cnt = strlen(str);
14631     strbuf._file = _NFILE;
14632     return (_doscan(&strbuf, "%d", ap))
14633   ;
14634   return 0;
14635 }
14636 _ACEOF
14637 rm -f conftest.$ac_objext conftest$ac_exeext
14638 if { (eval echo "$as_me:14638: \"$ac_link\"") >&5
14639   (eval $ac_link) 2>&5
14640   ac_status=$?
14641   echo "$as_me:14641: \$? = $ac_status" >&5
14642   (exit $ac_status); } &&
14643          { ac_try='test -s conftest$ac_exeext'
14644   { (eval echo "$as_me:14644: \"$ac_try\"") >&5
14645   (eval $ac_try) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit $ac_status); }; }; then
14649   cf_cv_func_vsscanf=_doscan
14650 else
14651   echo "$as_me: failed program was:" >&5
14652 cat conftest.$ac_ext >&5
14653
14654 cf_cv_func_vsscanf=no
14655 fi
14656 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14657 fi
14658 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14659 fi
14660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14661 fi
14662 echo "$as_me:14662: result: $cf_cv_func_vsscanf" >&5
14663 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14664
14665 case $cf_cv_func_vsscanf in #(vi
14666 vsscanf) cat >>confdefs.h <<\EOF
14667 #define HAVE_VSSCANF 1
14668 EOF
14669 ;; #(vi
14670 vfscanf) cat >>confdefs.h <<\EOF
14671 #define HAVE_VFSCANF 1
14672 EOF
14673 ;; #(vi
14674 _doscan) cat >>confdefs.h <<\EOF
14675 #define HAVE__DOSCAN 1
14676 EOF
14677 ;;
14678 esac
14679
14680 echo "$as_me:14680: checking for working mkstemp" >&5
14681 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14682 if test "${cf_cv_func_mkstemp+set}" = set; then
14683   echo $ECHO_N "(cached) $ECHO_C" >&6
14684 else
14685
14686 rm -f conftest*
14687 if test "$cross_compiling" = yes; then
14688   echo "$as_me:14688: checking for mkstemp" >&5
14689 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14690 if test "${ac_cv_func_mkstemp+set}" = set; then
14691   echo $ECHO_N "(cached) $ECHO_C" >&6
14692 else
14693   cat >conftest.$ac_ext <<_ACEOF
14694 #line 14694 "configure"
14695 #include "confdefs.h"
14696 /* System header to define __stub macros and hopefully few prototypes,
14697     which can conflict with char mkstemp (); below.  */
14698 #include <assert.h>
14699 /* Override any gcc2 internal prototype to avoid an error.  */
14700 #ifdef __cplusplus
14701 extern "C"
14702 #endif
14703 /* We use char because int might match the return type of a gcc2
14704    builtin and then its argument prototype would still apply.  */
14705 char mkstemp ();
14706 char (*f) ();
14707
14708 int
14709 main ()
14710 {
14711 /* The GNU C library defines this for functions which it implements
14712     to always fail with ENOSYS.  Some functions are actually named
14713     something starting with __ and the normal name is an alias.  */
14714 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14715 choke me
14716 #else
14717 f = mkstemp;
14718 #endif
14719
14720   ;
14721   return 0;
14722 }
14723 _ACEOF
14724 rm -f conftest.$ac_objext conftest$ac_exeext
14725 if { (eval echo "$as_me:14725: \"$ac_link\"") >&5
14726   (eval $ac_link) 2>&5
14727   ac_status=$?
14728   echo "$as_me:14728: \$? = $ac_status" >&5
14729   (exit $ac_status); } &&
14730          { ac_try='test -s conftest$ac_exeext'
14731   { (eval echo "$as_me:14731: \"$ac_try\"") >&5
14732   (eval $ac_try) 2>&5
14733   ac_status=$?
14734   echo "$as_me:14734: \$? = $ac_status" >&5
14735   (exit $ac_status); }; }; then
14736   ac_cv_func_mkstemp=yes
14737 else
14738   echo "$as_me: failed program was:" >&5
14739 cat conftest.$ac_ext >&5
14740 ac_cv_func_mkstemp=no
14741 fi
14742 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14743 fi
14744 echo "$as_me:14744: result: $ac_cv_func_mkstemp" >&5
14745 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14746
14747 else
14748   cat >conftest.$ac_ext <<_ACEOF
14749 #line 14749 "configure"
14750 #include "confdefs.h"
14751
14752 #include <sys/types.h>
14753 #include <stdlib.h>
14754 #include <stdio.h>
14755 #include <string.h>
14756 #include <sys/stat.h>
14757 int main()
14758 {
14759         char *tmpl = "conftestXXXXXX";
14760         char name[2][80];
14761         int n;
14762         int result = 0;
14763         int fd;
14764         struct stat sb;
14765
14766         umask(077);
14767         for (n = 0; n < 2; ++n) {
14768                 strcpy(name[n], tmpl);
14769                 if ((fd = mkstemp(name[n])) >= 0) {
14770                         if (!strcmp(name[n], tmpl)
14771                          || stat(name[n], &sb) != 0
14772                          || (sb.st_mode & S_IFMT) != S_IFREG
14773                          || (sb.st_mode & 077) != 0) {
14774                                 result = 1;
14775                         }
14776                         close(fd);
14777                 }
14778         }
14779         if (result == 0
14780          && !strcmp(name[0], name[1]))
14781                 result = 1;
14782         ${cf_cv_main_return:-return}(result);
14783 }
14784
14785 _ACEOF
14786 rm -f conftest$ac_exeext
14787 if { (eval echo "$as_me:14787: \"$ac_link\"") >&5
14788   (eval $ac_link) 2>&5
14789   ac_status=$?
14790   echo "$as_me:14790: \$? = $ac_status" >&5
14791   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14792   { (eval echo "$as_me:14792: \"$ac_try\"") >&5
14793   (eval $ac_try) 2>&5
14794   ac_status=$?
14795   echo "$as_me:14795: \$? = $ac_status" >&5
14796   (exit $ac_status); }; }; then
14797   cf_cv_func_mkstemp=yes
14798
14799 else
14800   echo "$as_me: program exited with status $ac_status" >&5
14801 echo "$as_me: failed program was:" >&5
14802 cat conftest.$ac_ext >&5
14803 cf_cv_func_mkstemp=no
14804
14805 fi
14806 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14807 fi
14808
14809 fi
14810 echo "$as_me:14810: result: $cf_cv_func_mkstemp" >&5
14811 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14812 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
14813         cat >>confdefs.h <<\EOF
14814 #define HAVE_MKSTEMP 1
14815 EOF
14816
14817 fi
14818
14819 # setup for prototype of fallback for vsscanf()
14820
14821 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14822         HAVE_VSSCANF=1
14823 else
14824         HAVE_VSSCANF=0
14825 fi
14826
14827 if test "$cross_compiling" = yes ; then
14828         { echo "$as_me:14828: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14829 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14830 else
14831         echo "$as_me:14831: checking whether setvbuf arguments are reversed" >&5
14832 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14833 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14834   echo $ECHO_N "(cached) $ECHO_C" >&6
14835 else
14836   if test "$cross_compiling" = yes; then
14837   { { echo "$as_me:14837: error: cannot run test program while cross compiling" >&5
14838 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14839    { (exit 1); exit 1; }; }
14840 else
14841   cat >conftest.$ac_ext <<_ACEOF
14842 #line 14842 "configure"
14843 #include "confdefs.h"
14844 #include <stdio.h>
14845 /* If setvbuf has the reversed format, exit 0. */
14846 int
14847 main ()
14848 {
14849   /* This call has the arguments reversed.
14850      A reversed system may check and see that the address of main
14851      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14852   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14853     $ac_main_return(1);
14854   putc('\r', stdout);
14855   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14856 }
14857 _ACEOF
14858 rm -f conftest$ac_exeext
14859 if { (eval echo "$as_me:14859: \"$ac_link\"") >&5
14860   (eval $ac_link) 2>&5
14861   ac_status=$?
14862   echo "$as_me:14862: \$? = $ac_status" >&5
14863   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14864   { (eval echo "$as_me:14864: \"$ac_try\"") >&5
14865   (eval $ac_try) 2>&5
14866   ac_status=$?
14867   echo "$as_me:14867: \$? = $ac_status" >&5
14868   (exit $ac_status); }; }; then
14869   ac_cv_func_setvbuf_reversed=yes
14870 else
14871   echo "$as_me: program exited with status $ac_status" >&5
14872 echo "$as_me: failed program was:" >&5
14873 cat conftest.$ac_ext >&5
14874 ac_cv_func_setvbuf_reversed=no
14875 fi
14876 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14877 fi
14878 rm -f core core.* *.core
14879 fi
14880 echo "$as_me:14880: result: $ac_cv_func_setvbuf_reversed" >&5
14881 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14882 if test $ac_cv_func_setvbuf_reversed = yes; then
14883
14884 cat >>confdefs.h <<\EOF
14885 #define SETVBUF_REVERSED 1
14886 EOF
14887
14888 fi
14889
14890 fi
14891 echo "$as_me:14891: checking return type of signal handlers" >&5
14892 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14893 if test "${ac_cv_type_signal+set}" = set; then
14894   echo $ECHO_N "(cached) $ECHO_C" >&6
14895 else
14896   cat >conftest.$ac_ext <<_ACEOF
14897 #line 14897 "configure"
14898 #include "confdefs.h"
14899 #include <sys/types.h>
14900 #include <signal.h>
14901 #ifdef signal
14902 # undef signal
14903 #endif
14904 #ifdef __cplusplus
14905 extern "C" void (*signal (int, void (*)(int)))(int);
14906 #else
14907 void (*signal ()) ();
14908 #endif
14909
14910 int
14911 main ()
14912 {
14913 int i;
14914   ;
14915   return 0;
14916 }
14917 _ACEOF
14918 rm -f conftest.$ac_objext
14919 if { (eval echo "$as_me:14919: \"$ac_compile\"") >&5
14920   (eval $ac_compile) 2>&5
14921   ac_status=$?
14922   echo "$as_me:14922: \$? = $ac_status" >&5
14923   (exit $ac_status); } &&
14924          { ac_try='test -s conftest.$ac_objext'
14925   { (eval echo "$as_me:14925: \"$ac_try\"") >&5
14926   (eval $ac_try) 2>&5
14927   ac_status=$?
14928   echo "$as_me:14928: \$? = $ac_status" >&5
14929   (exit $ac_status); }; }; then
14930   ac_cv_type_signal=void
14931 else
14932   echo "$as_me: failed program was:" >&5
14933 cat conftest.$ac_ext >&5
14934 ac_cv_type_signal=int
14935 fi
14936 rm -f conftest.$ac_objext conftest.$ac_ext
14937 fi
14938 echo "$as_me:14938: result: $ac_cv_type_signal" >&5
14939 echo "${ECHO_T}$ac_cv_type_signal" >&6
14940
14941 cat >>confdefs.h <<EOF
14942 #define RETSIGTYPE $ac_cv_type_signal
14943 EOF
14944
14945 echo "$as_me:14945: checking for type sigaction_t" >&5
14946 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14947 if test "${cf_cv_type_sigaction+set}" = set; then
14948   echo $ECHO_N "(cached) $ECHO_C" >&6
14949 else
14950
14951         cat >conftest.$ac_ext <<_ACEOF
14952 #line 14952 "configure"
14953 #include "confdefs.h"
14954
14955 #include <signal.h>
14956 int
14957 main ()
14958 {
14959 sigaction_t x
14960   ;
14961   return 0;
14962 }
14963 _ACEOF
14964 rm -f conftest.$ac_objext
14965 if { (eval echo "$as_me:14965: \"$ac_compile\"") >&5
14966   (eval $ac_compile) 2>&5
14967   ac_status=$?
14968   echo "$as_me:14968: \$? = $ac_status" >&5
14969   (exit $ac_status); } &&
14970          { ac_try='test -s conftest.$ac_objext'
14971   { (eval echo "$as_me:14971: \"$ac_try\"") >&5
14972   (eval $ac_try) 2>&5
14973   ac_status=$?
14974   echo "$as_me:14974: \$? = $ac_status" >&5
14975   (exit $ac_status); }; }; then
14976   cf_cv_type_sigaction=yes
14977 else
14978   echo "$as_me: failed program was:" >&5
14979 cat conftest.$ac_ext >&5
14980 cf_cv_type_sigaction=no
14981 fi
14982 rm -f conftest.$ac_objext conftest.$ac_ext
14983 fi
14984
14985 echo "$as_me:14985: result: $cf_cv_type_sigaction" >&5
14986 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14987 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14988 #define HAVE_TYPE_SIGACTION 1
14989 EOF
14990
14991 echo "$as_me:14991: checking declaration of size-change" >&5
14992 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14993 if test "${cf_cv_sizechange+set}" = set; then
14994   echo $ECHO_N "(cached) $ECHO_C" >&6
14995 else
14996
14997     cf_cv_sizechange=unknown
14998     cf_save_CPPFLAGS="$CPPFLAGS"
14999
15000 for cf_opts in "" "NEED_PTEM_H"
15001 do
15002
15003     CPPFLAGS="$cf_save_CPPFLAGS"
15004     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15005     cat >conftest.$ac_ext <<_ACEOF
15006 #line 15006 "configure"
15007 #include "confdefs.h"
15008 #include <sys/types.h>
15009 #ifdef HAVE_TERMIOS_H
15010 #include <termios.h>
15011 #else
15012 #ifdef HAVE_TERMIO_H
15013 #include <termio.h>
15014 #endif
15015 #endif
15016 #ifdef NEED_PTEM_H
15017 /* This is a workaround for SCO:  they neglected to define struct winsize in
15018  * termios.h -- it's only in termio.h and ptem.h
15019  */
15020 #include        <sys/stream.h>
15021 #include        <sys/ptem.h>
15022 #endif
15023 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15024 #include <sys/ioctl.h>
15025 #endif
15026
15027 int
15028 main ()
15029 {
15030
15031 #ifdef TIOCGSIZE
15032         struct ttysize win;     /* FIXME: what system is this? */
15033         int y = win.ts_lines;
15034         int x = win.ts_cols;
15035 #else
15036 #ifdef TIOCGWINSZ
15037         struct winsize win;
15038         int y = win.ws_row;
15039         int x = win.ws_col;
15040 #else
15041         no TIOCGSIZE or TIOCGWINSZ
15042 #endif /* TIOCGWINSZ */
15043 #endif /* TIOCGSIZE */
15044
15045   ;
15046   return 0;
15047 }
15048 _ACEOF
15049 rm -f conftest.$ac_objext
15050 if { (eval echo "$as_me:15050: \"$ac_compile\"") >&5
15051   (eval $ac_compile) 2>&5
15052   ac_status=$?
15053   echo "$as_me:15053: \$? = $ac_status" >&5
15054   (exit $ac_status); } &&
15055          { ac_try='test -s conftest.$ac_objext'
15056   { (eval echo "$as_me:15056: \"$ac_try\"") >&5
15057   (eval $ac_try) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); }; }; then
15061   cf_cv_sizechange=yes
15062 else
15063   echo "$as_me: failed program was:" >&5
15064 cat conftest.$ac_ext >&5
15065 cf_cv_sizechange=no
15066 fi
15067 rm -f conftest.$ac_objext conftest.$ac_ext
15068
15069         CPPFLAGS="$cf_save_CPPFLAGS"
15070         if test "$cf_cv_sizechange" = yes ; then
15071                 echo "size-change succeeded ($cf_opts)" >&5
15072                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15073                 break
15074         fi
15075 done
15076
15077 fi
15078 echo "$as_me:15078: result: $cf_cv_sizechange" >&5
15079 echo "${ECHO_T}$cf_cv_sizechange" >&6
15080 if test "$cf_cv_sizechange" != no ; then
15081         cat >>confdefs.h <<\EOF
15082 #define HAVE_SIZECHANGE 1
15083 EOF
15084
15085         case $cf_cv_sizechange in #(vi
15086         NEED*)
15087                 cat >>confdefs.h <<EOF
15088 #define $cf_cv_sizechange  1
15089 EOF
15090
15091                 ;;
15092         esac
15093 fi
15094
15095 echo "$as_me:15095: checking for memmove" >&5
15096 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15097 if test "${ac_cv_func_memmove+set}" = set; then
15098   echo $ECHO_N "(cached) $ECHO_C" >&6
15099 else
15100   cat >conftest.$ac_ext <<_ACEOF
15101 #line 15101 "configure"
15102 #include "confdefs.h"
15103 /* System header to define __stub macros and hopefully few prototypes,
15104     which can conflict with char memmove (); below.  */
15105 #include <assert.h>
15106 /* Override any gcc2 internal prototype to avoid an error.  */
15107 #ifdef __cplusplus
15108 extern "C"
15109 #endif
15110 /* We use char because int might match the return type of a gcc2
15111    builtin and then its argument prototype would still apply.  */
15112 char memmove ();
15113 char (*f) ();
15114
15115 int
15116 main ()
15117 {
15118 /* The GNU C library defines this for functions which it implements
15119     to always fail with ENOSYS.  Some functions are actually named
15120     something starting with __ and the normal name is an alias.  */
15121 #if defined (__stub_memmove) || defined (__stub___memmove)
15122 choke me
15123 #else
15124 f = memmove;
15125 #endif
15126
15127   ;
15128   return 0;
15129 }
15130 _ACEOF
15131 rm -f conftest.$ac_objext conftest$ac_exeext
15132 if { (eval echo "$as_me:15132: \"$ac_link\"") >&5
15133   (eval $ac_link) 2>&5
15134   ac_status=$?
15135   echo "$as_me:15135: \$? = $ac_status" >&5
15136   (exit $ac_status); } &&
15137          { ac_try='test -s conftest$ac_exeext'
15138   { (eval echo "$as_me:15138: \"$ac_try\"") >&5
15139   (eval $ac_try) 2>&5
15140   ac_status=$?
15141   echo "$as_me:15141: \$? = $ac_status" >&5
15142   (exit $ac_status); }; }; then
15143   ac_cv_func_memmove=yes
15144 else
15145   echo "$as_me: failed program was:" >&5
15146 cat conftest.$ac_ext >&5
15147 ac_cv_func_memmove=no
15148 fi
15149 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15150 fi
15151 echo "$as_me:15151: result: $ac_cv_func_memmove" >&5
15152 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15153 if test $ac_cv_func_memmove = yes; then
15154   :
15155 else
15156
15157 echo "$as_me:15157: checking for bcopy" >&5
15158 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15159 if test "${ac_cv_func_bcopy+set}" = set; then
15160   echo $ECHO_N "(cached) $ECHO_C" >&6
15161 else
15162   cat >conftest.$ac_ext <<_ACEOF
15163 #line 15163 "configure"
15164 #include "confdefs.h"
15165 /* System header to define __stub macros and hopefully few prototypes,
15166     which can conflict with char bcopy (); below.  */
15167 #include <assert.h>
15168 /* Override any gcc2 internal prototype to avoid an error.  */
15169 #ifdef __cplusplus
15170 extern "C"
15171 #endif
15172 /* We use char because int might match the return type of a gcc2
15173    builtin and then its argument prototype would still apply.  */
15174 char bcopy ();
15175 char (*f) ();
15176
15177 int
15178 main ()
15179 {
15180 /* The GNU C library defines this for functions which it implements
15181     to always fail with ENOSYS.  Some functions are actually named
15182     something starting with __ and the normal name is an alias.  */
15183 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15184 choke me
15185 #else
15186 f = bcopy;
15187 #endif
15188
15189   ;
15190   return 0;
15191 }
15192 _ACEOF
15193 rm -f conftest.$ac_objext conftest$ac_exeext
15194 if { (eval echo "$as_me:15194: \"$ac_link\"") >&5
15195   (eval $ac_link) 2>&5
15196   ac_status=$?
15197   echo "$as_me:15197: \$? = $ac_status" >&5
15198   (exit $ac_status); } &&
15199          { ac_try='test -s conftest$ac_exeext'
15200   { (eval echo "$as_me:15200: \"$ac_try\"") >&5
15201   (eval $ac_try) 2>&5
15202   ac_status=$?
15203   echo "$as_me:15203: \$? = $ac_status" >&5
15204   (exit $ac_status); }; }; then
15205   ac_cv_func_bcopy=yes
15206 else
15207   echo "$as_me: failed program was:" >&5
15208 cat conftest.$ac_ext >&5
15209 ac_cv_func_bcopy=no
15210 fi
15211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15212 fi
15213 echo "$as_me:15213: result: $ac_cv_func_bcopy" >&5
15214 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15215 if test $ac_cv_func_bcopy = yes; then
15216
15217         echo "$as_me:15217: checking if bcopy does overlapping moves" >&5
15218 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15219 if test "${cf_cv_good_bcopy+set}" = set; then
15220   echo $ECHO_N "(cached) $ECHO_C" >&6
15221 else
15222
15223                 if test "$cross_compiling" = yes; then
15224   cf_cv_good_bcopy=unknown
15225 else
15226   cat >conftest.$ac_ext <<_ACEOF
15227 #line 15227 "configure"
15228 #include "confdefs.h"
15229
15230 int main() {
15231         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15232         char temp[40];
15233         bcopy(data, temp, sizeof(data));
15234         bcopy(temp+10, temp, 15);
15235         bcopy(temp+5, temp+15, 10);
15236         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15237 }
15238
15239 _ACEOF
15240 rm -f conftest$ac_exeext
15241 if { (eval echo "$as_me:15241: \"$ac_link\"") >&5
15242   (eval $ac_link) 2>&5
15243   ac_status=$?
15244   echo "$as_me:15244: \$? = $ac_status" >&5
15245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15246   { (eval echo "$as_me:15246: \"$ac_try\"") >&5
15247   (eval $ac_try) 2>&5
15248   ac_status=$?
15249   echo "$as_me:15249: \$? = $ac_status" >&5
15250   (exit $ac_status); }; }; then
15251   cf_cv_good_bcopy=yes
15252 else
15253   echo "$as_me: program exited with status $ac_status" >&5
15254 echo "$as_me: failed program was:" >&5
15255 cat conftest.$ac_ext >&5
15256 cf_cv_good_bcopy=no
15257 fi
15258 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15259 fi
15260
15261 fi
15262 echo "$as_me:15262: result: $cf_cv_good_bcopy" >&5
15263 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15264
15265 else
15266   cf_cv_good_bcopy=no
15267 fi
15268
15269         if test "$cf_cv_good_bcopy" = yes ; then
15270                 cat >>confdefs.h <<\EOF
15271 #define USE_OK_BCOPY 1
15272 EOF
15273
15274         else
15275                 cat >>confdefs.h <<\EOF
15276 #define USE_MY_MEMMOVE 1
15277 EOF
15278
15279         fi
15280
15281 fi
15282
15283 echo "$as_me:15283: checking if poll really works" >&5
15284 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15285 if test "${cf_cv_working_poll+set}" = set; then
15286   echo $ECHO_N "(cached) $ECHO_C" >&6
15287 else
15288
15289 if test "$cross_compiling" = yes; then
15290   cf_cv_working_poll=unknown
15291 else
15292   cat >conftest.$ac_ext <<_ACEOF
15293 #line 15293 "configure"
15294 #include "confdefs.h"
15295
15296 #include <stdio.h>
15297 #ifdef HAVE_POLL_H
15298 #include <poll.h>
15299 #else
15300 #include <sys/poll.h>
15301 #endif
15302 int main() {
15303         struct pollfd myfds;
15304         int ret;
15305
15306         myfds.fd = 0;
15307         myfds.events = POLLIN;
15308
15309         ret = poll(&myfds, 1, 100);
15310         ${cf_cv_main_return:-return}(ret != 0);
15311 }
15312 _ACEOF
15313 rm -f conftest$ac_exeext
15314 if { (eval echo "$as_me:15314: \"$ac_link\"") >&5
15315   (eval $ac_link) 2>&5
15316   ac_status=$?
15317   echo "$as_me:15317: \$? = $ac_status" >&5
15318   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15319   { (eval echo "$as_me:15319: \"$ac_try\"") >&5
15320   (eval $ac_try) 2>&5
15321   ac_status=$?
15322   echo "$as_me:15322: \$? = $ac_status" >&5
15323   (exit $ac_status); }; }; then
15324   cf_cv_working_poll=yes
15325 else
15326   echo "$as_me: program exited with status $ac_status" >&5
15327 echo "$as_me: failed program was:" >&5
15328 cat conftest.$ac_ext >&5
15329 cf_cv_working_poll=no
15330 fi
15331 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15332 fi
15333 fi
15334 echo "$as_me:15334: result: $cf_cv_working_poll" >&5
15335 echo "${ECHO_T}$cf_cv_working_poll" >&6
15336 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15337 #define HAVE_WORKING_POLL 1
15338 EOF
15339
15340 echo "$as_me:15340: checking for va_copy" >&5
15341 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15342 if test "${cf_cv_have_va_copy+set}" = set; then
15343   echo $ECHO_N "(cached) $ECHO_C" >&6
15344 else
15345
15346 cat >conftest.$ac_ext <<_ACEOF
15347 #line 15347 "configure"
15348 #include "confdefs.h"
15349
15350 #include <stdarg.h>
15351
15352 int
15353 main ()
15354 {
15355
15356         static va_list dst;
15357         static va_list src;
15358         va_copy(dst, src)
15359   ;
15360   return 0;
15361 }
15362 _ACEOF
15363 rm -f conftest.$ac_objext conftest$ac_exeext
15364 if { (eval echo "$as_me:15364: \"$ac_link\"") >&5
15365   (eval $ac_link) 2>&5
15366   ac_status=$?
15367   echo "$as_me:15367: \$? = $ac_status" >&5
15368   (exit $ac_status); } &&
15369          { ac_try='test -s conftest$ac_exeext'
15370   { (eval echo "$as_me:15370: \"$ac_try\"") >&5
15371   (eval $ac_try) 2>&5
15372   ac_status=$?
15373   echo "$as_me:15373: \$? = $ac_status" >&5
15374   (exit $ac_status); }; }; then
15375   cf_cv_have_va_copy=yes
15376 else
15377   echo "$as_me: failed program was:" >&5
15378 cat conftest.$ac_ext >&5
15379 cf_cv_have_va_copy=no
15380 fi
15381 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15382 fi
15383 echo "$as_me:15383: result: $cf_cv_have_va_copy" >&5
15384 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15385
15386 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15387 #define HAVE_VA_COPY 1
15388 EOF
15389
15390 echo "$as_me:15390: checking for __va_copy" >&5
15391 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15392 if test "${cf_cv_have___va_copy+set}" = set; then
15393   echo $ECHO_N "(cached) $ECHO_C" >&6
15394 else
15395
15396 cat >conftest.$ac_ext <<_ACEOF
15397 #line 15397 "configure"
15398 #include "confdefs.h"
15399
15400 #include <stdarg.h>
15401
15402 int
15403 main ()
15404 {
15405
15406         static va_list dst;
15407         static va_list src;
15408         __va_copy(dst, src)
15409   ;
15410   return 0;
15411 }
15412 _ACEOF
15413 rm -f conftest.$ac_objext conftest$ac_exeext
15414 if { (eval echo "$as_me:15414: \"$ac_link\"") >&5
15415   (eval $ac_link) 2>&5
15416   ac_status=$?
15417   echo "$as_me:15417: \$? = $ac_status" >&5
15418   (exit $ac_status); } &&
15419          { ac_try='test -s conftest$ac_exeext'
15420   { (eval echo "$as_me:15420: \"$ac_try\"") >&5
15421   (eval $ac_try) 2>&5
15422   ac_status=$?
15423   echo "$as_me:15423: \$? = $ac_status" >&5
15424   (exit $ac_status); }; }; then
15425   cf_cv_have___va_copy=yes
15426 else
15427   echo "$as_me: failed program was:" >&5
15428 cat conftest.$ac_ext >&5
15429 cf_cv_have___va_copy=no
15430 fi
15431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15432 fi
15433 echo "$as_me:15433: result: $cf_cv_have___va_copy" >&5
15434 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15435
15436 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15437 #define HAVE___VA_COPY 1
15438 EOF
15439
15440 echo "$as_me:15440: checking for pid_t" >&5
15441 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15442 if test "${ac_cv_type_pid_t+set}" = set; then
15443   echo $ECHO_N "(cached) $ECHO_C" >&6
15444 else
15445   cat >conftest.$ac_ext <<_ACEOF
15446 #line 15446 "configure"
15447 #include "confdefs.h"
15448 $ac_includes_default
15449 int
15450 main ()
15451 {
15452 if ((pid_t *) 0)
15453   return 0;
15454 if (sizeof (pid_t))
15455   return 0;
15456   ;
15457   return 0;
15458 }
15459 _ACEOF
15460 rm -f conftest.$ac_objext
15461 if { (eval echo "$as_me:15461: \"$ac_compile\"") >&5
15462   (eval $ac_compile) 2>&5
15463   ac_status=$?
15464   echo "$as_me:15464: \$? = $ac_status" >&5
15465   (exit $ac_status); } &&
15466          { ac_try='test -s conftest.$ac_objext'
15467   { (eval echo "$as_me:15467: \"$ac_try\"") >&5
15468   (eval $ac_try) 2>&5
15469   ac_status=$?
15470   echo "$as_me:15470: \$? = $ac_status" >&5
15471   (exit $ac_status); }; }; then
15472   ac_cv_type_pid_t=yes
15473 else
15474   echo "$as_me: failed program was:" >&5
15475 cat conftest.$ac_ext >&5
15476 ac_cv_type_pid_t=no
15477 fi
15478 rm -f conftest.$ac_objext conftest.$ac_ext
15479 fi
15480 echo "$as_me:15480: result: $ac_cv_type_pid_t" >&5
15481 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15482 if test $ac_cv_type_pid_t = yes; then
15483   :
15484 else
15485
15486 cat >>confdefs.h <<EOF
15487 #define pid_t int
15488 EOF
15489
15490 fi
15491
15492 for ac_header in unistd.h vfork.h
15493 do
15494 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15495 echo "$as_me:15495: checking for $ac_header" >&5
15496 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15497 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15498   echo $ECHO_N "(cached) $ECHO_C" >&6
15499 else
15500   cat >conftest.$ac_ext <<_ACEOF
15501 #line 15501 "configure"
15502 #include "confdefs.h"
15503 #include <$ac_header>
15504 _ACEOF
15505 if { (eval echo "$as_me:15505: \"$ac_cpp conftest.$ac_ext\"") >&5
15506   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15507   ac_status=$?
15508   egrep -v '^ *\+' conftest.er1 >conftest.err
15509   rm -f conftest.er1
15510   cat conftest.err >&5
15511   echo "$as_me:15511: \$? = $ac_status" >&5
15512   (exit $ac_status); } >/dev/null; then
15513   if test -s conftest.err; then
15514     ac_cpp_err=$ac_c_preproc_warn_flag
15515   else
15516     ac_cpp_err=
15517   fi
15518 else
15519   ac_cpp_err=yes
15520 fi
15521 if test -z "$ac_cpp_err"; then
15522   eval "$as_ac_Header=yes"
15523 else
15524   echo "$as_me: failed program was:" >&5
15525   cat conftest.$ac_ext >&5
15526   eval "$as_ac_Header=no"
15527 fi
15528 rm -f conftest.err conftest.$ac_ext
15529 fi
15530 echo "$as_me:15530: result: `eval echo '${'$as_ac_Header'}'`" >&5
15531 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15532 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15533   cat >>confdefs.h <<EOF
15534 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15535 EOF
15536
15537 fi
15538 done
15539
15540 for ac_func in fork vfork
15541 do
15542 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15543 echo "$as_me:15543: checking for $ac_func" >&5
15544 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15545 if eval "test \"\${$as_ac_var+set}\" = set"; then
15546   echo $ECHO_N "(cached) $ECHO_C" >&6
15547 else
15548   cat >conftest.$ac_ext <<_ACEOF
15549 #line 15549 "configure"
15550 #include "confdefs.h"
15551 /* System header to define __stub macros and hopefully few prototypes,
15552     which can conflict with char $ac_func (); below.  */
15553 #include <assert.h>
15554 /* Override any gcc2 internal prototype to avoid an error.  */
15555 #ifdef __cplusplus
15556 extern "C"
15557 #endif
15558 /* We use char because int might match the return type of a gcc2
15559    builtin and then its argument prototype would still apply.  */
15560 char $ac_func ();
15561 char (*f) ();
15562
15563 int
15564 main ()
15565 {
15566 /* The GNU C library defines this for functions which it implements
15567     to always fail with ENOSYS.  Some functions are actually named
15568     something starting with __ and the normal name is an alias.  */
15569 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15570 choke me
15571 #else
15572 f = $ac_func;
15573 #endif
15574
15575   ;
15576   return 0;
15577 }
15578 _ACEOF
15579 rm -f conftest.$ac_objext conftest$ac_exeext
15580 if { (eval echo "$as_me:15580: \"$ac_link\"") >&5
15581   (eval $ac_link) 2>&5
15582   ac_status=$?
15583   echo "$as_me:15583: \$? = $ac_status" >&5
15584   (exit $ac_status); } &&
15585          { ac_try='test -s conftest$ac_exeext'
15586   { (eval echo "$as_me:15586: \"$ac_try\"") >&5
15587   (eval $ac_try) 2>&5
15588   ac_status=$?
15589   echo "$as_me:15589: \$? = $ac_status" >&5
15590   (exit $ac_status); }; }; then
15591   eval "$as_ac_var=yes"
15592 else
15593   echo "$as_me: failed program was:" >&5
15594 cat conftest.$ac_ext >&5
15595 eval "$as_ac_var=no"
15596 fi
15597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15598 fi
15599 echo "$as_me:15599: result: `eval echo '${'$as_ac_var'}'`" >&5
15600 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15601 if test `eval echo '${'$as_ac_var'}'` = yes; then
15602   cat >>confdefs.h <<EOF
15603 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15604 EOF
15605
15606 fi
15607 done
15608
15609 ac_cv_func_fork_works=$ac_cv_func_fork
15610 if test "x$ac_cv_func_fork" = xyes; then
15611   echo "$as_me:15611: checking for working fork" >&5
15612 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15613 if test "${ac_cv_func_fork_works+set}" = set; then
15614   echo $ECHO_N "(cached) $ECHO_C" >&6
15615 else
15616   if test "$cross_compiling" = yes; then
15617   ac_cv_func_fork_works=cross
15618 else
15619   cat >conftest.$ac_ext <<_ACEOF
15620 /* By Rüdiger Kuhlmann. */
15621       #include <sys/types.h>
15622       #if HAVE_UNISTD_H
15623       # include <unistd.h>
15624       #endif
15625       /* Some systems only have a dummy stub for fork() */
15626       int main ()
15627       {
15628         if (fork() < 0)
15629           $ac_main_return (1);
15630         $ac_main_return (0);
15631       }
15632 _ACEOF
15633 rm -f conftest$ac_exeext
15634 if { (eval echo "$as_me:15634: \"$ac_link\"") >&5
15635   (eval $ac_link) 2>&5
15636   ac_status=$?
15637   echo "$as_me:15637: \$? = $ac_status" >&5
15638   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15639   { (eval echo "$as_me:15639: \"$ac_try\"") >&5
15640   (eval $ac_try) 2>&5
15641   ac_status=$?
15642   echo "$as_me:15642: \$? = $ac_status" >&5
15643   (exit $ac_status); }; }; then
15644   ac_cv_func_fork_works=yes
15645 else
15646   echo "$as_me: program exited with status $ac_status" >&5
15647 echo "$as_me: failed program was:" >&5
15648 cat conftest.$ac_ext >&5
15649 ac_cv_func_fork_works=no
15650 fi
15651 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15652 fi
15653 fi
15654 echo "$as_me:15654: result: $ac_cv_func_fork_works" >&5
15655 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15656
15657 fi
15658 if test "x$ac_cv_func_fork_works" = xcross; then
15659   case $host in
15660     *-*-amigaos* | *-*-msdosdjgpp*)
15661       # Override, as these systems have only a dummy fork() stub
15662       ac_cv_func_fork_works=no
15663       ;;
15664     *)
15665       ac_cv_func_fork_works=yes
15666       ;;
15667   esac
15668   { echo "$as_me:15668: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15669 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15670 fi
15671 ac_cv_func_vfork_works=$ac_cv_func_vfork
15672 if test "x$ac_cv_func_vfork" = xyes; then
15673   echo "$as_me:15673: checking for working vfork" >&5
15674 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15675 if test "${ac_cv_func_vfork_works+set}" = set; then
15676   echo $ECHO_N "(cached) $ECHO_C" >&6
15677 else
15678   if test "$cross_compiling" = yes; then
15679   ac_cv_func_vfork_works=cross
15680 else
15681   cat >conftest.$ac_ext <<_ACEOF
15682 #line 15682 "configure"
15683 #include "confdefs.h"
15684 /* Thanks to Paul Eggert for this test.  */
15685 #include <stdio.h>
15686 #include <sys/types.h>
15687 #include <sys/stat.h>
15688 #if HAVE_UNISTD_H
15689 # include <unistd.h>
15690 #endif
15691 #if HAVE_VFORK_H
15692 # include <vfork.h>
15693 #endif
15694 /* On some sparc systems, changes by the child to local and incoming
15695    argument registers are propagated back to the parent.  The compiler
15696    is told about this with #include <vfork.h>, but some compilers
15697    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15698    static variable whose address is put into a register that is
15699    clobbered by the vfork.  */
15700 static
15701 #ifdef __cplusplus
15702 sparc_address_test (int arg)
15703 # else
15704 sparc_address_test (arg) int arg;
15705 #endif
15706 {
15707   static pid_t child;
15708   if (!child) {
15709     child = vfork ();
15710     if (child < 0) {
15711       perror ("vfork");
15712       _exit(2);
15713     }
15714     if (!child) {
15715       arg = getpid();
15716       write(-1, "", 0);
15717       _exit (arg);
15718     }
15719   }
15720 }
15721
15722 int
15723 main ()
15724 {
15725   pid_t parent = getpid ();
15726   pid_t child;
15727
15728   sparc_address_test ();
15729
15730   child = vfork ();
15731
15732   if (child == 0) {
15733     /* Here is another test for sparc vfork register problems.  This
15734        test uses lots of local variables, at least as many local
15735        variables as main has allocated so far including compiler
15736        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15737        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15738        reuse the register of parent for one of the local variables,
15739        since it will think that parent can't possibly be used any more
15740        in this routine.  Assigning to the local variable will thus
15741        munge parent in the parent process.  */
15742     pid_t
15743       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15744       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15745     /* Convince the compiler that p..p7 are live; otherwise, it might
15746        use the same hardware register for all 8 local variables.  */
15747     if (p != p1 || p != p2 || p != p3 || p != p4
15748         || p != p5 || p != p6 || p != p7)
15749       _exit(1);
15750
15751     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15752        from child file descriptors.  If the child closes a descriptor
15753        before it execs or exits, this munges the parent's descriptor
15754        as well.  Test for this by closing stdout in the child.  */
15755     _exit(close(fileno(stdout)) != 0);
15756   } else {
15757     int status;
15758     struct stat st;
15759
15760     while (wait(&status) != child)
15761       ;
15762     $ac_main_return(
15763          /* Was there some problem with vforking?  */
15764          child < 0
15765
15766          /* Did the child fail?  (This shouldn't happen.)  */
15767          || status
15768
15769          /* Did the vfork/compiler bug occur?  */
15770          || parent != getpid()
15771
15772          /* Did the file descriptor bug occur?  */
15773          || fstat(fileno(stdout), &st) != 0
15774          );
15775   }
15776 }
15777 _ACEOF
15778 rm -f conftest$ac_exeext
15779 if { (eval echo "$as_me:15779: \"$ac_link\"") >&5
15780   (eval $ac_link) 2>&5
15781   ac_status=$?
15782   echo "$as_me:15782: \$? = $ac_status" >&5
15783   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15784   { (eval echo "$as_me:15784: \"$ac_try\"") >&5
15785   (eval $ac_try) 2>&5
15786   ac_status=$?
15787   echo "$as_me:15787: \$? = $ac_status" >&5
15788   (exit $ac_status); }; }; then
15789   ac_cv_func_vfork_works=yes
15790 else
15791   echo "$as_me: program exited with status $ac_status" >&5
15792 echo "$as_me: failed program was:" >&5
15793 cat conftest.$ac_ext >&5
15794 ac_cv_func_vfork_works=no
15795 fi
15796 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15797 fi
15798 fi
15799 echo "$as_me:15799: result: $ac_cv_func_vfork_works" >&5
15800 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15801
15802 fi;
15803 if test "x$ac_cv_func_fork_works" = xcross; then
15804   ac_cv_func_vfork_works=ac_cv_func_vfork
15805   { echo "$as_me:15805: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15806 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15807 fi
15808
15809 if test "x$ac_cv_func_vfork_works" = xyes; then
15810
15811 cat >>confdefs.h <<\EOF
15812 #define HAVE_WORKING_VFORK 1
15813 EOF
15814
15815 else
15816
15817 cat >>confdefs.h <<\EOF
15818 #define vfork fork
15819 EOF
15820
15821 fi
15822 if test "x$ac_cv_func_fork_works" = xyes; then
15823
15824 cat >>confdefs.h <<\EOF
15825 #define HAVE_WORKING_FORK 1
15826 EOF
15827
15828 fi
15829
15830 # special check for test/ditto.c
15831
15832 echo "$as_me:15832: checking for openpty in -lutil" >&5
15833 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15834 if test "${ac_cv_lib_util_openpty+set}" = set; then
15835   echo $ECHO_N "(cached) $ECHO_C" >&6
15836 else
15837   ac_check_lib_save_LIBS=$LIBS
15838 LIBS="-lutil  $LIBS"
15839 cat >conftest.$ac_ext <<_ACEOF
15840 #line 15840 "configure"
15841 #include "confdefs.h"
15842
15843 /* Override any gcc2 internal prototype to avoid an error.  */
15844 #ifdef __cplusplus
15845 extern "C"
15846 #endif
15847 /* We use char because int might match the return type of a gcc2
15848    builtin and then its argument prototype would still apply.  */
15849 char openpty ();
15850 int
15851 main ()
15852 {
15853 openpty ();
15854   ;
15855   return 0;
15856 }
15857 _ACEOF
15858 rm -f conftest.$ac_objext conftest$ac_exeext
15859 if { (eval echo "$as_me:15859: \"$ac_link\"") >&5
15860   (eval $ac_link) 2>&5
15861   ac_status=$?
15862   echo "$as_me:15862: \$? = $ac_status" >&5
15863   (exit $ac_status); } &&
15864          { ac_try='test -s conftest$ac_exeext'
15865   { (eval echo "$as_me:15865: \"$ac_try\"") >&5
15866   (eval $ac_try) 2>&5
15867   ac_status=$?
15868   echo "$as_me:15868: \$? = $ac_status" >&5
15869   (exit $ac_status); }; }; then
15870   ac_cv_lib_util_openpty=yes
15871 else
15872   echo "$as_me: failed program was:" >&5
15873 cat conftest.$ac_ext >&5
15874 ac_cv_lib_util_openpty=no
15875 fi
15876 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15877 LIBS=$ac_check_lib_save_LIBS
15878 fi
15879 echo "$as_me:15879: result: $ac_cv_lib_util_openpty" >&5
15880 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15881 if test $ac_cv_lib_util_openpty = yes; then
15882   cf_cv_lib_util=yes
15883 else
15884   cf_cv_lib_util=no
15885 fi
15886
15887 echo "$as_me:15887: checking for openpty header" >&5
15888 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15889 if test "${cf_cv_func_openpty+set}" = set; then
15890   echo $ECHO_N "(cached) $ECHO_C" >&6
15891 else
15892
15893     cf_save_LIBS="$LIBS"
15894     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15895     for cf_header in pty.h libutil.h util.h
15896     do
15897     cat >conftest.$ac_ext <<_ACEOF
15898 #line 15898 "configure"
15899 #include "confdefs.h"
15900
15901 #include <$cf_header>
15902
15903 int
15904 main ()
15905 {
15906
15907     int x = openpty((int *)0, (int *)0, (char *)0,
15908                    (struct termios *)0, (struct winsize *)0);
15909
15910   ;
15911   return 0;
15912 }
15913 _ACEOF
15914 rm -f conftest.$ac_objext conftest$ac_exeext
15915 if { (eval echo "$as_me:15915: \"$ac_link\"") >&5
15916   (eval $ac_link) 2>&5
15917   ac_status=$?
15918   echo "$as_me:15918: \$? = $ac_status" >&5
15919   (exit $ac_status); } &&
15920          { ac_try='test -s conftest$ac_exeext'
15921   { (eval echo "$as_me:15921: \"$ac_try\"") >&5
15922   (eval $ac_try) 2>&5
15923   ac_status=$?
15924   echo "$as_me:15924: \$? = $ac_status" >&5
15925   (exit $ac_status); }; }; then
15926
15927         cf_cv_func_openpty=$cf_header
15928         break
15929
15930 else
15931   echo "$as_me: failed program was:" >&5
15932 cat conftest.$ac_ext >&5
15933
15934         cf_cv_func_openpty=no
15935
15936 fi
15937 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15938     done
15939     LIBS="$cf_save_LIBS"
15940
15941 fi
15942 echo "$as_me:15942: result: $cf_cv_func_openpty" >&5
15943 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15944
15945 if test "$cf_cv_func_openpty" != no ; then
15946     cat >>confdefs.h <<EOF
15947 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15948 EOF
15949
15950     cat >>confdefs.h <<\EOF
15951 #define USE_XTERM_PTY 1
15952 EOF
15953
15954     if test "$cf_cv_lib_util" = yes ; then
15955         TEST_LIBS="-lutil $TEST_LIBS"
15956     fi
15957 fi
15958
15959 if test "$with_hashed_db" != no ; then
15960         cat >>confdefs.h <<\EOF
15961 #define USE_HASHED_DB 1
15962 EOF
15963
15964 case $with_hashed_db in #(vi
15965 yes|*able*) #(vi
15966     ;;
15967 *)
15968     if test -d "$with_hashed_db" ; then
15969
15970 if test -n "$with_hashed_db/include" ; then
15971   for cf_add_incdir in $with_hashed_db/include
15972   do
15973         while test $cf_add_incdir != /usr/include
15974         do
15975           if test -d $cf_add_incdir
15976           then
15977                 cf_have_incdir=no
15978                 if test -n "$CFLAGS$CPPFLAGS" ; then
15979                   # a loop is needed to ensure we can add subdirs of existing dirs
15980                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15981                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15982                           cf_have_incdir=yes; break
15983                         fi
15984                   done
15985                 fi
15986
15987                 if test "$cf_have_incdir" = no ; then
15988                   if test "$cf_add_incdir" = /usr/local/include ; then
15989                         if test "$GCC" = yes
15990                         then
15991                           cf_save_CPPFLAGS=$CPPFLAGS
15992                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15993                           cat >conftest.$ac_ext <<_ACEOF
15994 #line 15994 "configure"
15995 #include "confdefs.h"
15996 #include <stdio.h>
15997 int
15998 main ()
15999 {
16000 printf("Hello")
16001   ;
16002   return 0;
16003 }
16004 _ACEOF
16005 rm -f conftest.$ac_objext
16006 if { (eval echo "$as_me:16006: \"$ac_compile\"") >&5
16007   (eval $ac_compile) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); } &&
16011          { ac_try='test -s conftest.$ac_objext'
16012   { (eval echo "$as_me:16012: \"$ac_try\"") >&5
16013   (eval $ac_try) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit $ac_status); }; }; then
16017   :
16018 else
16019   echo "$as_me: failed program was:" >&5
16020 cat conftest.$ac_ext >&5
16021 cf_have_incdir=yes
16022 fi
16023 rm -f conftest.$ac_objext conftest.$ac_ext
16024                           CPPFLAGS=$cf_save_CPPFLAGS
16025                         fi
16026                   fi
16027                 fi
16028
16029                 if test "$cf_have_incdir" = no ; then
16030                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16031
16032 echo "${as_me-configure}:16032: testing adding $cf_add_incdir to include-path ..." 1>&5
16033
16034                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16035
16036                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16037                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16038                   cf_add_incdir="$cf_top_incdir"
16039                 else
16040                   break
16041                 fi
16042           fi
16043         done
16044   done
16045 fi
16046
16047 if test -n "$with_hashed_db/lib" ; then
16048   for cf_add_libdir in $with_hashed_db/lib
16049   do
16050     if test $cf_add_libdir = /usr/lib ; then
16051       :
16052     elif test -d $cf_add_libdir
16053     then
16054       cf_have_libdir=no
16055       if test -n "$LDFLAGS$LIBS" ; then
16056         # a loop is needed to ensure we can add subdirs of existing dirs
16057         for cf_test_libdir in $LDFLAGS $LIBS ; do
16058           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16059             cf_have_libdir=yes; break
16060           fi
16061         done
16062       fi
16063       if test "$cf_have_libdir" = no ; then
16064         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16065
16066 echo "${as_me-configure}:16066: testing adding $cf_add_libdir to library-path ..." 1>&5
16067
16068         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16069       fi
16070     fi
16071   done
16072 fi
16073
16074     fi
16075 esac
16076
16077 echo "$as_me:16077: checking for db.h" >&5
16078 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16079 if test "${ac_cv_header_db_h+set}" = set; then
16080   echo $ECHO_N "(cached) $ECHO_C" >&6
16081 else
16082   cat >conftest.$ac_ext <<_ACEOF
16083 #line 16083 "configure"
16084 #include "confdefs.h"
16085 #include <db.h>
16086 _ACEOF
16087 if { (eval echo "$as_me:16087: \"$ac_cpp conftest.$ac_ext\"") >&5
16088   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16089   ac_status=$?
16090   egrep -v '^ *\+' conftest.er1 >conftest.err
16091   rm -f conftest.er1
16092   cat conftest.err >&5
16093   echo "$as_me:16093: \$? = $ac_status" >&5
16094   (exit $ac_status); } >/dev/null; then
16095   if test -s conftest.err; then
16096     ac_cpp_err=$ac_c_preproc_warn_flag
16097   else
16098     ac_cpp_err=
16099   fi
16100 else
16101   ac_cpp_err=yes
16102 fi
16103 if test -z "$ac_cpp_err"; then
16104   ac_cv_header_db_h=yes
16105 else
16106   echo "$as_me: failed program was:" >&5
16107   cat conftest.$ac_ext >&5
16108   ac_cv_header_db_h=no
16109 fi
16110 rm -f conftest.err conftest.$ac_ext
16111 fi
16112 echo "$as_me:16112: result: $ac_cv_header_db_h" >&5
16113 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16114 if test $ac_cv_header_db_h = yes; then
16115
16116 echo "$as_me:16116: checking for version of db" >&5
16117 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16118 if test "${cf_cv_hashed_db_version+set}" = set; then
16119   echo $ECHO_N "(cached) $ECHO_C" >&6
16120 else
16121
16122 cf_cv_hashed_db_version=unknown
16123
16124 for cf_db_version in 1 2 3 4 5
16125 do
16126
16127 echo "${as_me-configure}:16127: testing checking for db version $cf_db_version ..." 1>&5
16128
16129         cat >conftest.$ac_ext <<_ACEOF
16130 #line 16130 "configure"
16131 #include "confdefs.h"
16132
16133 $ac_includes_default
16134 #include <db.h>
16135
16136 #ifdef DB_VERSION_MAJOR
16137         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16138 #if $cf_db_version == DB_VERSION_MAJOR
16139         /* ok */
16140 #else
16141         make an error
16142 #endif
16143 #else
16144 #if $cf_db_version == 1
16145         /* ok: assuming this is DB 1.8.5 */
16146 #else
16147         make an error
16148 #endif
16149 #endif
16150
16151 int
16152 main ()
16153 {
16154 DBT *foo = 0
16155   ;
16156   return 0;
16157 }
16158 _ACEOF
16159 rm -f conftest.$ac_objext
16160 if { (eval echo "$as_me:16160: \"$ac_compile\"") >&5
16161   (eval $ac_compile) 2>&5
16162   ac_status=$?
16163   echo "$as_me:16163: \$? = $ac_status" >&5
16164   (exit $ac_status); } &&
16165          { ac_try='test -s conftest.$ac_objext'
16166   { (eval echo "$as_me:16166: \"$ac_try\"") >&5
16167   (eval $ac_try) 2>&5
16168   ac_status=$?
16169   echo "$as_me:16169: \$? = $ac_status" >&5
16170   (exit $ac_status); }; }; then
16171
16172         cf_cv_hashed_db_version=$cf_db_version
16173         break
16174
16175 else
16176   echo "$as_me: failed program was:" >&5
16177 cat conftest.$ac_ext >&5
16178 fi
16179 rm -f conftest.$ac_objext conftest.$ac_ext
16180 done
16181
16182 fi
16183 echo "$as_me:16183: result: $cf_cv_hashed_db_version" >&5
16184 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16185
16186 if test "$cf_cv_hashed_db_version" = unknown ; then
16187         { { echo "$as_me:16187: error: Cannot determine version of db" >&5
16188 echo "$as_me: error: Cannot determine version of db" >&2;}
16189    { (exit 1); exit 1; }; }
16190 else
16191
16192 echo "$as_me:16192: checking for db libraries" >&5
16193 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16194 if test "${cf_cv_hashed_db_libs+set}" = set; then
16195   echo $ECHO_N "(cached) $ECHO_C" >&6
16196 else
16197
16198 cf_cv_hashed_db_libs=unknown
16199 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16200 do
16201         cf_save_libs="$LIBS"
16202         if test -n "$cf_db_libs"; then
16203                 LIBS="-l$cf_db_libs $LIBS"
16204         fi
16205
16206 echo "${as_me-configure}:16206: testing checking for library "$cf_db_libs" ..." 1>&5
16207
16208         cat >conftest.$ac_ext <<_ACEOF
16209 #line 16209 "configure"
16210 #include "confdefs.h"
16211
16212 $ac_includes_default
16213 #include <db.h>
16214
16215 int
16216 main ()
16217 {
16218
16219         char *path = "/tmp/foo";
16220 #ifdef DB_VERSION_MAJOR
16221 #if DB_VERSION_MAJOR >= 4
16222         DB *result = 0;
16223         db_create(&result, NULL, 0);
16224         result->open(result,
16225                 NULL,
16226                 path,
16227                 path,
16228                 DB_HASH,
16229                 DB_CREATE,
16230                 0644);
16231 #elif DB_VERSION_MAJOR >= 3
16232         DB *result = 0;
16233         db_create(&result, NULL, 0);
16234         result->open(result,
16235                 path,
16236                 path,
16237                 DB_HASH,
16238                 DB_CREATE,
16239                 0644);
16240 #elif DB_VERSION_MAJOR >= 2
16241         DB *result = 0;
16242         db_open(path,
16243                 DB_HASH,
16244                 DB_CREATE,
16245                 0644,
16246                 (DB_ENV *) 0,
16247                 (DB_INFO *) 0,
16248                 &result);
16249 #endif /* DB_VERSION_MAJOR */
16250 #else
16251         DB *result = dbopen(path,
16252                      2,
16253                      0644,
16254                      DB_HASH,
16255                      0);
16256 #endif
16257         ${cf_cv_main_return:-return}(result != 0)
16258
16259   ;
16260   return 0;
16261 }
16262 _ACEOF
16263 rm -f conftest.$ac_objext conftest$ac_exeext
16264 if { (eval echo "$as_me:16264: \"$ac_link\"") >&5
16265   (eval $ac_link) 2>&5
16266   ac_status=$?
16267   echo "$as_me:16267: \$? = $ac_status" >&5
16268   (exit $ac_status); } &&
16269          { ac_try='test -s conftest$ac_exeext'
16270   { (eval echo "$as_me:16270: \"$ac_try\"") >&5
16271   (eval $ac_try) 2>&5
16272   ac_status=$?
16273   echo "$as_me:16273: \$? = $ac_status" >&5
16274   (exit $ac_status); }; }; then
16275
16276         if test -n "$cf_db_libs" ; then
16277                 cf_cv_hashed_db_libs=$cf_db_libs
16278         else
16279                 cf_cv_hashed_db_libs=default
16280         fi
16281         LIBS="$cf_save_libs"
16282         break
16283
16284 else
16285   echo "$as_me: failed program was:" >&5
16286 cat conftest.$ac_ext >&5
16287 fi
16288 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16289         LIBS="$cf_save_libs"
16290 done
16291
16292 fi
16293 echo "$as_me:16293: result: $cf_cv_hashed_db_libs" >&5
16294 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16295
16296         if test "$cf_cv_hashed_db_libs" = unknown ; then
16297                 { { echo "$as_me:16297: error: Cannot determine library for db" >&5
16298 echo "$as_me: error: Cannot determine library for db" >&2;}
16299    { (exit 1); exit 1; }; }
16300         elif test "$cf_cv_hashed_db_libs" != default ; then
16301                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16302         fi
16303 fi
16304
16305 else
16306
16307         { { echo "$as_me:16307: error: Cannot find db.h" >&5
16308 echo "$as_me: error: Cannot find db.h" >&2;}
16309    { (exit 1); exit 1; }; }
16310
16311 fi
16312
16313 fi
16314
16315 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16316         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16317         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16318 fi
16319
16320 # Just in case, check if the C compiler has a bool type.
16321
16322 echo "$as_me:16322: checking if we should include stdbool.h" >&5
16323 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16324
16325 if test "${cf_cv_header_stdbool_h+set}" = set; then
16326   echo $ECHO_N "(cached) $ECHO_C" >&6
16327 else
16328
16329         cat >conftest.$ac_ext <<_ACEOF
16330 #line 16330 "configure"
16331 #include "confdefs.h"
16332
16333 int
16334 main ()
16335 {
16336 bool foo = false
16337   ;
16338   return 0;
16339 }
16340 _ACEOF
16341 rm -f conftest.$ac_objext
16342 if { (eval echo "$as_me:16342: \"$ac_compile\"") >&5
16343   (eval $ac_compile) 2>&5
16344   ac_status=$?
16345   echo "$as_me:16345: \$? = $ac_status" >&5
16346   (exit $ac_status); } &&
16347          { ac_try='test -s conftest.$ac_objext'
16348   { (eval echo "$as_me:16348: \"$ac_try\"") >&5
16349   (eval $ac_try) 2>&5
16350   ac_status=$?
16351   echo "$as_me:16351: \$? = $ac_status" >&5
16352   (exit $ac_status); }; }; then
16353   cf_cv_header_stdbool_h=0
16354 else
16355   echo "$as_me: failed program was:" >&5
16356 cat conftest.$ac_ext >&5
16357 cat >conftest.$ac_ext <<_ACEOF
16358 #line 16358 "configure"
16359 #include "confdefs.h"
16360
16361 #ifndef __BEOS__
16362 #include <stdbool.h>
16363 #endif
16364
16365 int
16366 main ()
16367 {
16368 bool foo = false
16369   ;
16370   return 0;
16371 }
16372 _ACEOF
16373 rm -f conftest.$ac_objext
16374 if { (eval echo "$as_me:16374: \"$ac_compile\"") >&5
16375   (eval $ac_compile) 2>&5
16376   ac_status=$?
16377   echo "$as_me:16377: \$? = $ac_status" >&5
16378   (exit $ac_status); } &&
16379          { ac_try='test -s conftest.$ac_objext'
16380   { (eval echo "$as_me:16380: \"$ac_try\"") >&5
16381   (eval $ac_try) 2>&5
16382   ac_status=$?
16383   echo "$as_me:16383: \$? = $ac_status" >&5
16384   (exit $ac_status); }; }; then
16385   cf_cv_header_stdbool_h=1
16386 else
16387   echo "$as_me: failed program was:" >&5
16388 cat conftest.$ac_ext >&5
16389 cf_cv_header_stdbool_h=0
16390 fi
16391 rm -f conftest.$ac_objext conftest.$ac_ext
16392 fi
16393 rm -f conftest.$ac_objext conftest.$ac_ext
16394 fi
16395
16396 if test "$cf_cv_header_stdbool_h" = 1
16397 then    echo "$as_me:16397: result: yes" >&5
16398 echo "${ECHO_T}yes" >&6
16399 else    echo "$as_me:16399: result: no" >&5
16400 echo "${ECHO_T}no" >&6
16401 fi
16402
16403 echo "$as_me:16403: checking for builtin bool type" >&5
16404 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16405
16406 if test "${cf_cv_cc_bool_type+set}" = set; then
16407   echo $ECHO_N "(cached) $ECHO_C" >&6
16408 else
16409
16410         cat >conftest.$ac_ext <<_ACEOF
16411 #line 16411 "configure"
16412 #include "confdefs.h"
16413
16414 #include <stdio.h>
16415 #include <sys/types.h>
16416
16417 int
16418 main ()
16419 {
16420 bool x = false
16421   ;
16422   return 0;
16423 }
16424 _ACEOF
16425 rm -f conftest.$ac_objext
16426 if { (eval echo "$as_me:16426: \"$ac_compile\"") >&5
16427   (eval $ac_compile) 2>&5
16428   ac_status=$?
16429   echo "$as_me:16429: \$? = $ac_status" >&5
16430   (exit $ac_status); } &&
16431          { ac_try='test -s conftest.$ac_objext'
16432   { (eval echo "$as_me:16432: \"$ac_try\"") >&5
16433   (eval $ac_try) 2>&5
16434   ac_status=$?
16435   echo "$as_me:16435: \$? = $ac_status" >&5
16436   (exit $ac_status); }; }; then
16437   cf_cv_cc_bool_type=1
16438 else
16439   echo "$as_me: failed program was:" >&5
16440 cat conftest.$ac_ext >&5
16441 cf_cv_cc_bool_type=0
16442 fi
16443 rm -f conftest.$ac_objext conftest.$ac_ext
16444
16445 fi
16446
16447 if test "$cf_cv_cc_bool_type" = 1
16448 then    echo "$as_me:16448: result: yes" >&5
16449 echo "${ECHO_T}yes" >&6
16450 else    echo "$as_me:16450: result: no" >&5
16451 echo "${ECHO_T}no" >&6
16452 fi
16453
16454 # Check for C++ compiler characteristics (and ensure that it's there!)
16455 if test -n "$CXX" ; then
16456         ac_ext=cc
16457 ac_cpp='$CXXCPP $CPPFLAGS'
16458 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16459 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16460 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16461 ac_main_return=return
16462
16463 if test -n "$GXX" ; then
16464 case $cf_cv_system_name in #(vi
16465 os2*) #(vi
16466         cf_stdcpp_libname=stdcpp
16467         ;;
16468 *)
16469         cf_stdcpp_libname=stdc++
16470         ;;
16471 esac
16472 echo "$as_me:16472: checking for library $cf_stdcpp_libname" >&5
16473 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16474 if test "${cf_cv_libstdcpp+set}" = set; then
16475   echo $ECHO_N "(cached) $ECHO_C" >&6
16476 else
16477
16478         cf_save="$LIBS"
16479         LIBS="-l$cf_stdcpp_libname $LIBS"
16480 cat >conftest.$ac_ext <<_ACEOF
16481 #line 16481 "configure"
16482 #include "confdefs.h"
16483
16484 #include <strstream.h>
16485 int
16486 main ()
16487 {
16488
16489 char buf[80];
16490 strstreambuf foo(buf, sizeof(buf))
16491
16492   ;
16493   return 0;
16494 }
16495 _ACEOF
16496 rm -f conftest.$ac_objext conftest$ac_exeext
16497 if { (eval echo "$as_me:16497: \"$ac_link\"") >&5
16498   (eval $ac_link) 2>&5
16499   ac_status=$?
16500   echo "$as_me:16500: \$? = $ac_status" >&5
16501   (exit $ac_status); } &&
16502          { ac_try='test -s conftest$ac_exeext'
16503   { (eval echo "$as_me:16503: \"$ac_try\"") >&5
16504   (eval $ac_try) 2>&5
16505   ac_status=$?
16506   echo "$as_me:16506: \$? = $ac_status" >&5
16507   (exit $ac_status); }; }; then
16508   cf_cv_libstdcpp=yes
16509 else
16510   echo "$as_me: failed program was:" >&5
16511 cat conftest.$ac_ext >&5
16512 cf_cv_libstdcpp=no
16513 fi
16514 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16515         LIBS="$cf_save"
16516
16517 fi
16518 echo "$as_me:16518: result: $cf_cv_libstdcpp" >&5
16519 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16520 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
16521 fi
16522
16523         echo "$as_me:16523: checking whether $CXX understands -c and -o together" >&5
16524 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16525 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16526   echo $ECHO_N "(cached) $ECHO_C" >&6
16527 else
16528
16529 cat > conftest.$ac_ext <<CF_EOF
16530 #include <stdio.h>
16531 int main()
16532 {
16533         ${cf_cv_main_return:-return}(0);
16534 }
16535 CF_EOF
16536 # We do the test twice because some compilers refuse to overwrite an
16537 # existing .o file with -o, though they will create one.
16538 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16539 if { (eval echo "$as_me:16539: \"$ac_try\"") >&5
16540   (eval $ac_try) 2>&5
16541   ac_status=$?
16542   echo "$as_me:16542: \$? = $ac_status" >&5
16543   (exit $ac_status); } &&
16544   test -f conftest2.$ac_objext && { (eval echo "$as_me:16544: \"$ac_try\"") >&5
16545   (eval $ac_try) 2>&5
16546   ac_status=$?
16547   echo "$as_me:16547: \$? = $ac_status" >&5
16548   (exit $ac_status); };
16549 then
16550   eval cf_cv_prog_CXX_c_o=yes
16551 else
16552   eval cf_cv_prog_CXX_c_o=no
16553 fi
16554 rm -f conftest*
16555
16556 fi
16557 if test $cf_cv_prog_CXX_c_o = yes; then
16558   echo "$as_me:16558: result: yes" >&5
16559 echo "${ECHO_T}yes" >&6
16560 else
16561   echo "$as_me:16561: result: no" >&5
16562 echo "${ECHO_T}no" >&6
16563 fi
16564
16565         case $GXX_VERSION in
16566         1*|2.0-6*)
16567                 cf_cxx_library=yes
16568                 ;;
16569         *-2.7*|2.7*)
16570
16571 cf_cxx_library=unknown
16572 case $cf_cv_system_name in #(vi
16573 os2*) #(vi
16574         cf_gpp_libname=gpp
16575         ;;
16576 *)
16577         cf_gpp_libname=g++
16578         ;;
16579 esac
16580 if test "$GXX" = yes; then
16581         echo "$as_me:16581: checking for lib$cf_gpp_libname" >&5
16582 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16583         cf_save="$LIBS"
16584         LIBS="-l$cf_gpp_libname $LIBS"
16585         cat >conftest.$ac_ext <<_ACEOF
16586 #line 16586 "configure"
16587 #include "confdefs.h"
16588
16589 #include <$cf_gpp_libname/builtin.h>
16590
16591 int
16592 main ()
16593 {
16594 two_arg_error_handler_t foo2 = lib_error_handler
16595   ;
16596   return 0;
16597 }
16598 _ACEOF
16599 rm -f conftest.$ac_objext conftest$ac_exeext
16600 if { (eval echo "$as_me:16600: \"$ac_link\"") >&5
16601   (eval $ac_link) 2>&5
16602   ac_status=$?
16603   echo "$as_me:16603: \$? = $ac_status" >&5
16604   (exit $ac_status); } &&
16605          { ac_try='test -s conftest$ac_exeext'
16606   { (eval echo "$as_me:16606: \"$ac_try\"") >&5
16607   (eval $ac_try) 2>&5
16608   ac_status=$?
16609   echo "$as_me:16609: \$? = $ac_status" >&5
16610   (exit $ac_status); }; }; then
16611   cf_cxx_library=yes
16612          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16613          if test "$cf_gpp_libname" = cpp ; then
16614             cat >>confdefs.h <<\EOF
16615 #define HAVE_GPP_BUILTIN_H 1
16616 EOF
16617
16618          else
16619             cat >>confdefs.h <<\EOF
16620 #define HAVE_GXX_BUILTIN_H 1
16621 EOF
16622
16623          fi
16624 else
16625   echo "$as_me: failed program was:" >&5
16626 cat conftest.$ac_ext >&5
16627 cat >conftest.$ac_ext <<_ACEOF
16628 #line 16628 "configure"
16629 #include "confdefs.h"
16630
16631 #include <builtin.h>
16632
16633 int
16634 main ()
16635 {
16636 two_arg_error_handler_t foo2 = lib_error_handler
16637   ;
16638   return 0;
16639 }
16640 _ACEOF
16641 rm -f conftest.$ac_objext conftest$ac_exeext
16642 if { (eval echo "$as_me:16642: \"$ac_link\"") >&5
16643   (eval $ac_link) 2>&5
16644   ac_status=$?
16645   echo "$as_me:16645: \$? = $ac_status" >&5
16646   (exit $ac_status); } &&
16647          { ac_try='test -s conftest$ac_exeext'
16648   { (eval echo "$as_me:16648: \"$ac_try\"") >&5
16649   (eval $ac_try) 2>&5
16650   ac_status=$?
16651   echo "$as_me:16651: \$? = $ac_status" >&5
16652   (exit $ac_status); }; }; then
16653   cf_cxx_library=yes
16654          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
16655          cat >>confdefs.h <<\EOF
16656 #define HAVE_BUILTIN_H 1
16657 EOF
16658
16659 else
16660   echo "$as_me: failed program was:" >&5
16661 cat conftest.$ac_ext >&5
16662 cf_cxx_library=no
16663 fi
16664 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16665 fi
16666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16667         LIBS="$cf_save"
16668         echo "$as_me:16668: result: $cf_cxx_library" >&5
16669 echo "${ECHO_T}$cf_cxx_library" >&6
16670 fi
16671
16672                 ;;
16673         *)
16674                 cf_cxx_library=no
16675                 ;;
16676         esac
16677
16678         ac_ext=cc
16679 ac_cpp='$CXXCPP $CPPFLAGS'
16680 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16681 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16682 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16683 ac_main_return=return
16684 echo "$as_me:16684: checking how to run the C++ preprocessor" >&5
16685 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16686 if test -z "$CXXCPP"; then
16687   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16688   echo $ECHO_N "(cached) $ECHO_C" >&6
16689 else
16690       # Double quotes because CXXCPP needs to be expanded
16691     for CXXCPP in "$CXX -E" "/lib/cpp"
16692     do
16693       ac_preproc_ok=false
16694 for ac_cxx_preproc_warn_flag in '' yes
16695 do
16696   # Use a header file that comes with gcc, so configuring glibc
16697   # with a fresh cross-compiler works.
16698   # On the NeXT, cc -E runs the code through the compiler's parser,
16699   # not just through cpp. "Syntax error" is here to catch this case.
16700   cat >conftest.$ac_ext <<_ACEOF
16701 #line 16701 "configure"
16702 #include "confdefs.h"
16703 #include <assert.h>
16704                      Syntax error
16705 _ACEOF
16706 if { (eval echo "$as_me:16706: \"$ac_cpp conftest.$ac_ext\"") >&5
16707   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16708   ac_status=$?
16709   egrep -v '^ *\+' conftest.er1 >conftest.err
16710   rm -f conftest.er1
16711   cat conftest.err >&5
16712   echo "$as_me:16712: \$? = $ac_status" >&5
16713   (exit $ac_status); } >/dev/null; then
16714   if test -s conftest.err; then
16715     ac_cpp_err=$ac_cxx_preproc_warn_flag
16716   else
16717     ac_cpp_err=
16718   fi
16719 else
16720   ac_cpp_err=yes
16721 fi
16722 if test -z "$ac_cpp_err"; then
16723   :
16724 else
16725   echo "$as_me: failed program was:" >&5
16726   cat conftest.$ac_ext >&5
16727   # Broken: fails on valid input.
16728 continue
16729 fi
16730 rm -f conftest.err conftest.$ac_ext
16731
16732   # OK, works on sane cases.  Now check whether non-existent headers
16733   # can be detected and how.
16734   cat >conftest.$ac_ext <<_ACEOF
16735 #line 16735 "configure"
16736 #include "confdefs.h"
16737 #include <ac_nonexistent.h>
16738 _ACEOF
16739 if { (eval echo "$as_me:16739: \"$ac_cpp conftest.$ac_ext\"") >&5
16740   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16741   ac_status=$?
16742   egrep -v '^ *\+' conftest.er1 >conftest.err
16743   rm -f conftest.er1
16744   cat conftest.err >&5
16745   echo "$as_me:16745: \$? = $ac_status" >&5
16746   (exit $ac_status); } >/dev/null; then
16747   if test -s conftest.err; then
16748     ac_cpp_err=$ac_cxx_preproc_warn_flag
16749   else
16750     ac_cpp_err=
16751   fi
16752 else
16753   ac_cpp_err=yes
16754 fi
16755 if test -z "$ac_cpp_err"; then
16756   # Broken: success on invalid input.
16757 continue
16758 else
16759   echo "$as_me: failed program was:" >&5
16760   cat conftest.$ac_ext >&5
16761   # Passes both tests.
16762 ac_preproc_ok=:
16763 break
16764 fi
16765 rm -f conftest.err conftest.$ac_ext
16766
16767 done
16768 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16769 rm -f conftest.err conftest.$ac_ext
16770 if $ac_preproc_ok; then
16771   break
16772 fi
16773
16774     done
16775     ac_cv_prog_CXXCPP=$CXXCPP
16776
16777 fi
16778   CXXCPP=$ac_cv_prog_CXXCPP
16779 else
16780   ac_cv_prog_CXXCPP=$CXXCPP
16781 fi
16782 echo "$as_me:16782: result: $CXXCPP" >&5
16783 echo "${ECHO_T}$CXXCPP" >&6
16784 ac_preproc_ok=false
16785 for ac_cxx_preproc_warn_flag in '' yes
16786 do
16787   # Use a header file that comes with gcc, so configuring glibc
16788   # with a fresh cross-compiler works.
16789   # On the NeXT, cc -E runs the code through the compiler's parser,
16790   # not just through cpp. "Syntax error" is here to catch this case.
16791   cat >conftest.$ac_ext <<_ACEOF
16792 #line 16792 "configure"
16793 #include "confdefs.h"
16794 #include <assert.h>
16795                      Syntax error
16796 _ACEOF
16797 if { (eval echo "$as_me:16797: \"$ac_cpp conftest.$ac_ext\"") >&5
16798   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16799   ac_status=$?
16800   egrep -v '^ *\+' conftest.er1 >conftest.err
16801   rm -f conftest.er1
16802   cat conftest.err >&5
16803   echo "$as_me:16803: \$? = $ac_status" >&5
16804   (exit $ac_status); } >/dev/null; then
16805   if test -s conftest.err; then
16806     ac_cpp_err=$ac_cxx_preproc_warn_flag
16807   else
16808     ac_cpp_err=
16809   fi
16810 else
16811   ac_cpp_err=yes
16812 fi
16813 if test -z "$ac_cpp_err"; then
16814   :
16815 else
16816   echo "$as_me: failed program was:" >&5
16817   cat conftest.$ac_ext >&5
16818   # Broken: fails on valid input.
16819 continue
16820 fi
16821 rm -f conftest.err conftest.$ac_ext
16822
16823   # OK, works on sane cases.  Now check whether non-existent headers
16824   # can be detected and how.
16825   cat >conftest.$ac_ext <<_ACEOF
16826 #line 16826 "configure"
16827 #include "confdefs.h"
16828 #include <ac_nonexistent.h>
16829 _ACEOF
16830 if { (eval echo "$as_me:16830: \"$ac_cpp conftest.$ac_ext\"") >&5
16831   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16832   ac_status=$?
16833   egrep -v '^ *\+' conftest.er1 >conftest.err
16834   rm -f conftest.er1
16835   cat conftest.err >&5
16836   echo "$as_me:16836: \$? = $ac_status" >&5
16837   (exit $ac_status); } >/dev/null; then
16838   if test -s conftest.err; then
16839     ac_cpp_err=$ac_cxx_preproc_warn_flag
16840   else
16841     ac_cpp_err=
16842   fi
16843 else
16844   ac_cpp_err=yes
16845 fi
16846 if test -z "$ac_cpp_err"; then
16847   # Broken: success on invalid input.
16848 continue
16849 else
16850   echo "$as_me: failed program was:" >&5
16851   cat conftest.$ac_ext >&5
16852   # Passes both tests.
16853 ac_preproc_ok=:
16854 break
16855 fi
16856 rm -f conftest.err conftest.$ac_ext
16857
16858 done
16859 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16860 rm -f conftest.err conftest.$ac_ext
16861 if $ac_preproc_ok; then
16862   :
16863 else
16864   { { echo "$as_me:16864: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16865 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16866    { (exit 1); exit 1; }; }
16867 fi
16868
16869 ac_ext=cc
16870 ac_cpp='$CXXCPP $CPPFLAGS'
16871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16874 ac_main_return=return
16875
16876 for ac_header in iostream typeinfo
16877 do
16878 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16879 echo "$as_me:16879: checking for $ac_header" >&5
16880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16882   echo $ECHO_N "(cached) $ECHO_C" >&6
16883 else
16884   cat >conftest.$ac_ext <<_ACEOF
16885 #line 16885 "configure"
16886 #include "confdefs.h"
16887 #include <$ac_header>
16888 _ACEOF
16889 if { (eval echo "$as_me:16889: \"$ac_cpp conftest.$ac_ext\"") >&5
16890   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16891   ac_status=$?
16892   egrep -v '^ *\+' conftest.er1 >conftest.err
16893   rm -f conftest.er1
16894   cat conftest.err >&5
16895   echo "$as_me:16895: \$? = $ac_status" >&5
16896   (exit $ac_status); } >/dev/null; then
16897   if test -s conftest.err; then
16898     ac_cpp_err=$ac_cxx_preproc_warn_flag
16899   else
16900     ac_cpp_err=
16901   fi
16902 else
16903   ac_cpp_err=yes
16904 fi
16905 if test -z "$ac_cpp_err"; then
16906   eval "$as_ac_Header=yes"
16907 else
16908   echo "$as_me: failed program was:" >&5
16909   cat conftest.$ac_ext >&5
16910   eval "$as_ac_Header=no"
16911 fi
16912 rm -f conftest.err conftest.$ac_ext
16913 fi
16914 echo "$as_me:16914: result: `eval echo '${'$as_ac_Header'}'`" >&5
16915 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16916 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16917   cat >>confdefs.h <<EOF
16918 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16919 EOF
16920
16921 fi
16922 done
16923
16924     if test x"$ac_cv_header_iostream" = xyes ; then
16925         echo "$as_me:16925: checking if iostream uses std-namespace" >&5
16926 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16927         cat >conftest.$ac_ext <<_ACEOF
16928 #line 16928 "configure"
16929 #include "confdefs.h"
16930
16931 #include <iostream>
16932 using std::endl;
16933 using std::cerr;
16934 int
16935 main ()
16936 {
16937
16938 cerr << "testing" << endl;
16939
16940   ;
16941   return 0;
16942 }
16943 _ACEOF
16944 rm -f conftest.$ac_objext
16945 if { (eval echo "$as_me:16945: \"$ac_compile\"") >&5
16946   (eval $ac_compile) 2>&5
16947   ac_status=$?
16948   echo "$as_me:16948: \$? = $ac_status" >&5
16949   (exit $ac_status); } &&
16950          { ac_try='test -s conftest.$ac_objext'
16951   { (eval echo "$as_me:16951: \"$ac_try\"") >&5
16952   (eval $ac_try) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); }; }; then
16956   cf_iostream_namespace=yes
16957 else
16958   echo "$as_me: failed program was:" >&5
16959 cat conftest.$ac_ext >&5
16960 cf_iostream_namespace=no
16961 fi
16962 rm -f conftest.$ac_objext conftest.$ac_ext
16963         echo "$as_me:16963: result: $cf_iostream_namespace" >&5
16964 echo "${ECHO_T}$cf_iostream_namespace" >&6
16965         if test "$cf_iostream_namespace" = yes ; then
16966             cat >>confdefs.h <<\EOF
16967 #define IOSTREAM_NAMESPACE 1
16968 EOF
16969
16970         fi
16971     fi
16972
16973 echo "$as_me:16973: checking if we should include stdbool.h" >&5
16974 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16975
16976 if test "${cf_cv_header_stdbool_h+set}" = set; then
16977   echo $ECHO_N "(cached) $ECHO_C" >&6
16978 else
16979
16980         cat >conftest.$ac_ext <<_ACEOF
16981 #line 16981 "configure"
16982 #include "confdefs.h"
16983
16984 int
16985 main ()
16986 {
16987 bool foo = false
16988   ;
16989   return 0;
16990 }
16991 _ACEOF
16992 rm -f conftest.$ac_objext
16993 if { (eval echo "$as_me:16993: \"$ac_compile\"") >&5
16994   (eval $ac_compile) 2>&5
16995   ac_status=$?
16996   echo "$as_me:16996: \$? = $ac_status" >&5
16997   (exit $ac_status); } &&
16998          { ac_try='test -s conftest.$ac_objext'
16999   { (eval echo "$as_me:16999: \"$ac_try\"") >&5
17000   (eval $ac_try) 2>&5
17001   ac_status=$?
17002   echo "$as_me:17002: \$? = $ac_status" >&5
17003   (exit $ac_status); }; }; then
17004   cf_cv_header_stdbool_h=0
17005 else
17006   echo "$as_me: failed program was:" >&5
17007 cat conftest.$ac_ext >&5
17008 cat >conftest.$ac_ext <<_ACEOF
17009 #line 17009 "configure"
17010 #include "confdefs.h"
17011
17012 #ifndef __BEOS__
17013 #include <stdbool.h>
17014 #endif
17015
17016 int
17017 main ()
17018 {
17019 bool foo = false
17020   ;
17021   return 0;
17022 }
17023 _ACEOF
17024 rm -f conftest.$ac_objext
17025 if { (eval echo "$as_me:17025: \"$ac_compile\"") >&5
17026   (eval $ac_compile) 2>&5
17027   ac_status=$?
17028   echo "$as_me:17028: \$? = $ac_status" >&5
17029   (exit $ac_status); } &&
17030          { ac_try='test -s conftest.$ac_objext'
17031   { (eval echo "$as_me:17031: \"$ac_try\"") >&5
17032   (eval $ac_try) 2>&5
17033   ac_status=$?
17034   echo "$as_me:17034: \$? = $ac_status" >&5
17035   (exit $ac_status); }; }; then
17036   cf_cv_header_stdbool_h=1
17037 else
17038   echo "$as_me: failed program was:" >&5
17039 cat conftest.$ac_ext >&5
17040 cf_cv_header_stdbool_h=0
17041 fi
17042 rm -f conftest.$ac_objext conftest.$ac_ext
17043 fi
17044 rm -f conftest.$ac_objext conftest.$ac_ext
17045 fi
17046
17047 if test "$cf_cv_header_stdbool_h" = 1
17048 then    echo "$as_me:17048: result: yes" >&5
17049 echo "${ECHO_T}yes" >&6
17050 else    echo "$as_me:17050: result: no" >&5
17051 echo "${ECHO_T}no" >&6
17052 fi
17053
17054 echo "$as_me:17054: checking for builtin bool type" >&5
17055 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17056
17057 if test "${cf_cv_builtin_bool+set}" = set; then
17058   echo $ECHO_N "(cached) $ECHO_C" >&6
17059 else
17060
17061         cat >conftest.$ac_ext <<_ACEOF
17062 #line 17062 "configure"
17063 #include "confdefs.h"
17064
17065 #include <stdio.h>
17066 #include <sys/types.h>
17067
17068 int
17069 main ()
17070 {
17071 bool x = false
17072   ;
17073   return 0;
17074 }
17075 _ACEOF
17076 rm -f conftest.$ac_objext
17077 if { (eval echo "$as_me:17077: \"$ac_compile\"") >&5
17078   (eval $ac_compile) 2>&5
17079   ac_status=$?
17080   echo "$as_me:17080: \$? = $ac_status" >&5
17081   (exit $ac_status); } &&
17082          { ac_try='test -s conftest.$ac_objext'
17083   { (eval echo "$as_me:17083: \"$ac_try\"") >&5
17084   (eval $ac_try) 2>&5
17085   ac_status=$?
17086   echo "$as_me:17086: \$? = $ac_status" >&5
17087   (exit $ac_status); }; }; then
17088   cf_cv_builtin_bool=1
17089 else
17090   echo "$as_me: failed program was:" >&5
17091 cat conftest.$ac_ext >&5
17092 cf_cv_builtin_bool=0
17093 fi
17094 rm -f conftest.$ac_objext conftest.$ac_ext
17095
17096 fi
17097
17098 if test "$cf_cv_builtin_bool" = 1
17099 then    echo "$as_me:17099: result: yes" >&5
17100 echo "${ECHO_T}yes" >&6
17101 else    echo "$as_me:17101: result: no" >&5
17102 echo "${ECHO_T}no" >&6
17103 fi
17104
17105 echo "$as_me:17105: checking for size of bool" >&5
17106 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17107 if test "${cf_cv_type_of_bool+set}" = set; then
17108   echo $ECHO_N "(cached) $ECHO_C" >&6
17109 else
17110
17111         rm -f cf_test.out
17112         if test "$cross_compiling" = yes; then
17113   cf_cv_type_of_bool=unknown
17114 else
17115   cat >conftest.$ac_ext <<_ACEOF
17116 #line 17116 "configure"
17117 #include "confdefs.h"
17118
17119 #include <stdlib.h>
17120 #include <stdio.h>
17121
17122 #if defined(__cplusplus)
17123
17124 #ifdef HAVE_GXX_BUILTIN_H
17125 #include <g++/builtin.h>
17126 #elif HAVE_GPP_BUILTIN_H
17127 #include <gpp/builtin.h>
17128 #elif HAVE_BUILTIN_H
17129 #include <builtin.h>
17130 #endif
17131
17132 #else
17133
17134 #if $cf_cv_header_stdbool_h
17135 #include <stdbool.h>
17136 #endif
17137
17138 #endif
17139
17140 main()
17141 {
17142         FILE *fp = fopen("cf_test.out", "w");
17143         if (fp != 0) {
17144                 bool x = true;
17145                 if ((bool)(-x) >= 0)
17146                         fputs("unsigned ", fp);
17147                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17148                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17149                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17150                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17151                 fclose(fp);
17152         }
17153         ${cf_cv_main_return:-return}(0);
17154 }
17155
17156 _ACEOF
17157 rm -f conftest$ac_exeext
17158 if { (eval echo "$as_me:17158: \"$ac_link\"") >&5
17159   (eval $ac_link) 2>&5
17160   ac_status=$?
17161   echo "$as_me:17161: \$? = $ac_status" >&5
17162   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17163   { (eval echo "$as_me:17163: \"$ac_try\"") >&5
17164   (eval $ac_try) 2>&5
17165   ac_status=$?
17166   echo "$as_me:17166: \$? = $ac_status" >&5
17167   (exit $ac_status); }; }; then
17168   cf_cv_type_of_bool=`cat cf_test.out`
17169                  if test -z "$cf_cv_type_of_bool"; then
17170                    cf_cv_type_of_bool=unknown
17171                  fi
17172 else
17173   echo "$as_me: program exited with status $ac_status" >&5
17174 echo "$as_me: failed program was:" >&5
17175 cat conftest.$ac_ext >&5
17176 cf_cv_type_of_bool=unknown
17177 fi
17178 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17179 fi
17180
17181 fi
17182
17183         rm -f cf_test.out
17184 echo "$as_me:17184: result: $cf_cv_type_of_bool" >&5
17185 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17186 if test "$cf_cv_type_of_bool" = unknown ; then
17187         case .$NCURSES_BOOL in #(vi
17188         .auto|.) NCURSES_BOOL=unsigned;;
17189         esac
17190         { echo "$as_me:17190: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17191 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17192         cf_cv_type_of_bool=$NCURSES_BOOL
17193 fi
17194
17195 echo "$as_me:17195: checking for special defines needed for etip.h" >&5
17196 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17197 cf_save_CXXFLAGS="$CXXFLAGS"
17198 cf_result="none"
17199 for cf_math in "" MATH_H
17200 do
17201 for cf_excp in "" MATH_EXCEPTION
17202 do
17203         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17204         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17205         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17206 cat >conftest.$ac_ext <<_ACEOF
17207 #line 17207 "configure"
17208 #include "confdefs.h"
17209
17210 #include <etip.h.in>
17211
17212 int
17213 main ()
17214 {
17215
17216   ;
17217   return 0;
17218 }
17219 _ACEOF
17220 rm -f conftest.$ac_objext
17221 if { (eval echo "$as_me:17221: \"$ac_compile\"") >&5
17222   (eval $ac_compile) 2>&5
17223   ac_status=$?
17224   echo "$as_me:17224: \$? = $ac_status" >&5
17225   (exit $ac_status); } &&
17226          { ac_try='test -s conftest.$ac_objext'
17227   { (eval echo "$as_me:17227: \"$ac_try\"") >&5
17228   (eval $ac_try) 2>&5
17229   ac_status=$?
17230   echo "$as_me:17230: \$? = $ac_status" >&5
17231   (exit $ac_status); }; }; then
17232
17233         test -n "$cf_math" && cat >>confdefs.h <<EOF
17234 #define ETIP_NEEDS_${cf_math} 1
17235 EOF
17236
17237         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17238 #define ETIP_NEEDS_${cf_excp} 1
17239 EOF
17240
17241         cf_result="$cf_math $cf_excp"
17242         break
17243
17244 else
17245   echo "$as_me: failed program was:" >&5
17246 cat conftest.$ac_ext >&5
17247 fi
17248 rm -f conftest.$ac_objext conftest.$ac_ext
17249 done
17250 done
17251 echo "$as_me:17251: result: $cf_result" >&5
17252 echo "${ECHO_T}$cf_result" >&6
17253 CXXFLAGS="$cf_save_CXXFLAGS"
17254
17255 if test -n "$CXX"; then
17256 echo "$as_me:17256: checking if $CXX accepts parameter initialization" >&5
17257 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17258 if test "${cf_cv_cpp_param_init+set}" = set; then
17259   echo $ECHO_N "(cached) $ECHO_C" >&6
17260 else
17261
17262         ac_ext=cc
17263 ac_cpp='$CXXCPP $CPPFLAGS'
17264 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17265 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17266 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17267 ac_main_return=return
17268
17269         if test "$cross_compiling" = yes; then
17270   cf_cv_cpp_param_init=unknown
17271 else
17272   cat >conftest.$ac_ext <<_ACEOF
17273 #line 17273 "configure"
17274 #include "confdefs.h"
17275
17276 class TEST {
17277 private:
17278         int value;
17279 public:
17280         TEST(int x = 1);
17281         ~TEST();
17282 };
17283
17284 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17285 {
17286         value = x;
17287 }
17288 void main() { }
17289
17290 _ACEOF
17291 rm -f conftest$ac_exeext
17292 if { (eval echo "$as_me:17292: \"$ac_link\"") >&5
17293   (eval $ac_link) 2>&5
17294   ac_status=$?
17295   echo "$as_me:17295: \$? = $ac_status" >&5
17296   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17297   { (eval echo "$as_me:17297: \"$ac_try\"") >&5
17298   (eval $ac_try) 2>&5
17299   ac_status=$?
17300   echo "$as_me:17300: \$? = $ac_status" >&5
17301   (exit $ac_status); }; }; then
17302   cf_cv_cpp_param_init=yes
17303 else
17304   echo "$as_me: program exited with status $ac_status" >&5
17305 echo "$as_me: failed program was:" >&5
17306 cat conftest.$ac_ext >&5
17307 cf_cv_cpp_param_init=no
17308 fi
17309 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17310 fi
17311         ac_ext=cc
17312 ac_cpp='$CXXCPP $CPPFLAGS'
17313 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17314 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17315 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17316 ac_main_return=return
17317
17318 fi
17319 echo "$as_me:17319: result: $cf_cv_cpp_param_init" >&5
17320 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17321 fi
17322 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17323 #define CPP_HAS_PARAM_INIT 1
17324 EOF
17325
17326 if test -n "$CXX"; then
17327
17328 echo "$as_me:17328: checking if $CXX accepts static_cast" >&5
17329 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17330 if test "${cf_cv_cpp_static_cast+set}" = set; then
17331   echo $ECHO_N "(cached) $ECHO_C" >&6
17332 else
17333
17334         ac_ext=cc
17335 ac_cpp='$CXXCPP $CPPFLAGS'
17336 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17337 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17338 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17339 ac_main_return=return
17340
17341         cat >conftest.$ac_ext <<_ACEOF
17342 #line 17342 "configure"
17343 #include "confdefs.h"
17344
17345 class NCursesPanel
17346 {
17347 public:
17348   NCursesPanel(int nlines,
17349                int ncols,
17350                int begin_y = 0,
17351                int begin_x = 0)
17352   {
17353   }
17354
17355   ~NCursesPanel();
17356 };
17357
17358 template<class T> class NCursesUserPanel : public NCursesPanel
17359 {
17360 public:
17361   NCursesUserPanel (int nlines,
17362                     int ncols,
17363                     int begin_y = 0,
17364                     int begin_x = 0,
17365                     const T* p_UserData = static_cast<T*>(0))
17366     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17367   {
17368   };
17369   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17370   {
17371   };
17372
17373   virtual ~NCursesUserPanel() {};
17374 };
17375
17376 int
17377 main ()
17378 {
17379
17380         const char* p_UserData = static_cast<char*>(0)
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 rm -f conftest.$ac_objext
17386 if { (eval echo "$as_me:17386: \"$ac_compile\"") >&5
17387   (eval $ac_compile) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit $ac_status); } &&
17391          { ac_try='test -s conftest.$ac_objext'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit $ac_status); }; }; then
17397   cf_cv_cpp_static_cast=yes
17398 else
17399   echo "$as_me: failed program was:" >&5
17400 cat conftest.$ac_ext >&5
17401 cf_cv_cpp_static_cast=no
17402 fi
17403 rm -f conftest.$ac_objext conftest.$ac_ext
17404
17405         ac_ext=cc
17406 ac_cpp='$CXXCPP $CPPFLAGS'
17407 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17408 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17409 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17410 ac_main_return=return
17411
17412 fi
17413 echo "$as_me:17413: result: $cf_cv_cpp_static_cast" >&5
17414 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17415
17416 fi
17417
17418 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17419 #define CPP_HAS_STATIC_CAST 1
17420 EOF
17421
17422         CXX_AR='$(AR)'
17423         CXX_ARFLAGS='$(ARFLAGS)'
17424         case $cf_cv_system_name in #(vi
17425         irix*) #(vi
17426             if test "$GXX" != yes ; then
17427                 CXX_AR='$(CXX)'
17428                 CXX_ARFLAGS='-ar -o'
17429             fi
17430             ;;
17431         sco3.2v5*) #(vi
17432             CXXLDFLAGS="-u main"
17433             ;;
17434         solaris2*)
17435             if test "$GXX" != yes ; then
17436                 CXX_AR='$(CXX)'
17437                 CXX_ARFLAGS='-xar -o'
17438             fi
17439             ;;
17440         esac
17441
17442 else
17443         cf_cxx_library=no
17444         cf_cv_builtin_bool=1
17445
17446         # Just because we are not configuring against C++ right now does not
17447         # mean that a user will not want to use C++.  Some distributors disable
17448         # the C++ portion of this configuration as a shortcut (or just to avoid
17449         # compiling the demo in the c++ directory).  So we need a reasonable
17450         # default for the 'bool' type.
17451         #
17452         # Caveat: since the storage of the bool type is not standardized, it
17453         # may change.
17454
17455         if test "$NCURSES_BOOL" != auto ; then
17456                 cf_cv_type_of_bool=$NCURSES_BOOL
17457                 cf_cv_header_stdbool_h=0
17458         else
17459                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17460
17461 echo "$as_me:17461: checking for size of bool" >&5
17462 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17463 if test "${cf_cv_type_of_bool+set}" = set; then
17464   echo $ECHO_N "(cached) $ECHO_C" >&6
17465 else
17466
17467         rm -f cf_test.out
17468         if test "$cross_compiling" = yes; then
17469   cf_cv_type_of_bool=unknown
17470 else
17471   cat >conftest.$ac_ext <<_ACEOF
17472 #line 17472 "configure"
17473 #include "confdefs.h"
17474
17475 #include <stdlib.h>
17476 #include <stdio.h>
17477
17478 #if defined(__cplusplus)
17479
17480 #ifdef HAVE_GXX_BUILTIN_H
17481 #include <g++/builtin.h>
17482 #elif HAVE_GPP_BUILTIN_H
17483 #include <gpp/builtin.h>
17484 #elif HAVE_BUILTIN_H
17485 #include <builtin.h>
17486 #endif
17487
17488 #else
17489
17490 #if $cf_cv_header_stdbool_h
17491 #include <stdbool.h>
17492 #endif
17493
17494 #endif
17495
17496 main()
17497 {
17498         FILE *fp = fopen("cf_test.out", "w");
17499         if (fp != 0) {
17500                 bool x = true;
17501                 if ((bool)(-x) >= 0)
17502                         fputs("unsigned ", fp);
17503                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17504                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17505                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17506                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17507                 fclose(fp);
17508         }
17509         ${cf_cv_main_return:-return}(0);
17510 }
17511
17512 _ACEOF
17513 rm -f conftest$ac_exeext
17514 if { (eval echo "$as_me:17514: \"$ac_link\"") >&5
17515   (eval $ac_link) 2>&5
17516   ac_status=$?
17517   echo "$as_me:17517: \$? = $ac_status" >&5
17518   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17519   { (eval echo "$as_me:17519: \"$ac_try\"") >&5
17520   (eval $ac_try) 2>&5
17521   ac_status=$?
17522   echo "$as_me:17522: \$? = $ac_status" >&5
17523   (exit $ac_status); }; }; then
17524   cf_cv_type_of_bool=`cat cf_test.out`
17525                  if test -z "$cf_cv_type_of_bool"; then
17526                    cf_cv_type_of_bool=unknown
17527                  fi
17528 else
17529   echo "$as_me: program exited with status $ac_status" >&5
17530 echo "$as_me: failed program was:" >&5
17531 cat conftest.$ac_ext >&5
17532 cf_cv_type_of_bool=unknown
17533 fi
17534 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17535 fi
17536
17537 fi
17538
17539         rm -f cf_test.out
17540 echo "$as_me:17540: result: $cf_cv_type_of_bool" >&5
17541 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17542 if test "$cf_cv_type_of_bool" = unknown ; then
17543         case .$NCURSES_BOOL in #(vi
17544         .auto|.) NCURSES_BOOL=unsigned;;
17545         esac
17546         { echo "$as_me:17546: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17547 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17548         cf_cv_type_of_bool=$NCURSES_BOOL
17549 fi
17550
17551                 else
17552                         echo "$as_me:17552: checking for fallback type of bool" >&5
17553 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17554                         case "$host_cpu" in #(vi
17555                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17556                         *)      cf_cv_type_of_bool=int  ;;
17557                         esac
17558                         echo "$as_me:17558: result: $cf_cv_type_of_bool" >&5
17559 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17560                 fi
17561         fi
17562 fi
17563
17564 # If the C compiler did not declare bool, and we did not determine that the C++
17565 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17566 # ncurses library use the same type as C++ bool.  Note that this allows one to
17567 # specify the type of bool in a configure-script option and postpone
17568 # integration with the C++ compiler provided that the types are compatible.
17569 USE_CXX_BOOL=1
17570 if test $cf_cv_cc_bool_type = 1
17571 then
17572         # oops: C has a bool.  Unlikely, but C++ could differ.
17573         USE_CXX_BOOL=0
17574 elif test $cf_cv_builtin_bool = 0
17575 then
17576         # C++ has no bool
17577         USE_CXX_BOOL=0
17578 else
17579         # this is the normal case
17580         USE_CXX_BOOL='defined(__cplusplus)'
17581 fi
17582
17583 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17584
17585 if test "$cf_with_ada" != "no" ; then
17586     if test "$with_libtool" != "no"; then
17587         { echo "$as_me:17587: WARNING: libtool does not support Ada - disabling feature" >&5
17588 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17589         cf_with_ada=no
17590     fi
17591 fi
17592
17593 if test "$cf_with_ada" != "no" ; then
17594 cf_ada_make=gnatmake
17595 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17596 set dummy $cf_ada_make; ac_word=$2
17597 echo "$as_me:17597: checking for $ac_word" >&5
17598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17599 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17600   echo $ECHO_N "(cached) $ECHO_C" >&6
17601 else
17602   if test -n "$gnat_exists"; then
17603   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17604 else
17605   ac_save_IFS=$IFS; IFS=$ac_path_separator
17606 ac_dummy="$PATH"
17607 for ac_dir in $ac_dummy; do
17608   IFS=$ac_save_IFS
17609   test -z "$ac_dir" && ac_dir=.
17610   $as_executable_p "$ac_dir/$ac_word" || continue
17611 ac_cv_prog_gnat_exists="yes"
17612 echo "$as_me:17612: found $ac_dir/$ac_word" >&5
17613 break
17614 done
17615
17616   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17617 fi
17618 fi
17619 gnat_exists=$ac_cv_prog_gnat_exists
17620 if test -n "$gnat_exists"; then
17621   echo "$as_me:17621: result: $gnat_exists" >&5
17622 echo "${ECHO_T}$gnat_exists" >&6
17623 else
17624   echo "$as_me:17624: result: no" >&5
17625 echo "${ECHO_T}no" >&6
17626 fi
17627
17628 if test "$ac_cv_prog_gnat_exists" = no; then
17629    cf_ada_make=
17630 else
17631
17632 echo "$as_me:17632: checking for gnat version" >&5
17633 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17634 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17635   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17636 echo "$as_me:17636: result: $cf_gnat_version" >&5
17637 echo "${ECHO_T}$cf_gnat_version" >&6
17638
17639 case $cf_gnat_version in
17640   3.1[1-9]*|3.[2-9]*|[4-9].*)
17641     cf_cv_prog_gnat_correct=yes
17642     ;;
17643   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17644      cf_cv_prog_gnat_correct=no
17645      ;;
17646 esac
17647 case $cf_gnat_version in
17648   3.[1-9]*|[4-9].*)
17649       cf_compile_generics=generics
17650       cf_generic_objects="\${GENOBJS}"
17651       ;;
17652   *)  cf_compile_generics=
17653       cf_generic_objects=
17654       ;;
17655 esac
17656
17657    # Extract the first word of "m4", so it can be a program name with args.
17658 set dummy m4; ac_word=$2
17659 echo "$as_me:17659: checking for $ac_word" >&5
17660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17661 if test "${ac_cv_prog_M4_exists+set}" = set; then
17662   echo $ECHO_N "(cached) $ECHO_C" >&6
17663 else
17664   if test -n "$M4_exists"; then
17665   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17666 else
17667   ac_save_IFS=$IFS; IFS=$ac_path_separator
17668 ac_dummy="$PATH"
17669 for ac_dir in $ac_dummy; do
17670   IFS=$ac_save_IFS
17671   test -z "$ac_dir" && ac_dir=.
17672   $as_executable_p "$ac_dir/$ac_word" || continue
17673 ac_cv_prog_M4_exists="yes"
17674 echo "$as_me:17674: found $ac_dir/$ac_word" >&5
17675 break
17676 done
17677
17678   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17679 fi
17680 fi
17681 M4_exists=$ac_cv_prog_M4_exists
17682 if test -n "$M4_exists"; then
17683   echo "$as_me:17683: result: $M4_exists" >&5
17684 echo "${ECHO_T}$M4_exists" >&6
17685 else
17686   echo "$as_me:17686: result: no" >&5
17687 echo "${ECHO_T}no" >&6
17688 fi
17689
17690    if test "$ac_cv_prog_M4_exists" = no; then
17691       cf_cv_prog_gnat_correct=no
17692       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17693    fi
17694    if test "$cf_cv_prog_gnat_correct" = yes; then
17695       echo "$as_me:17695: checking if GNAT works" >&5
17696 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17697
17698 rm -f conftest*
17699 cat >>conftest.ads <<CF_EOF
17700 procedure conftest;
17701 CF_EOF
17702 cat >>conftest.adb <<CF_EOF
17703 with Text_IO;
17704 with GNAT.OS_Lib;
17705 procedure conftest is
17706 begin
17707    Text_IO.Put ("Hello World");
17708    Text_IO.New_Line;
17709    GNAT.OS_Lib.OS_Exit (0);
17710 end conftest;
17711 CF_EOF
17712 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17713    if ( ./conftest 1>&5 2>&1 ) ; then
17714       cf_cv_prog_gnat_correct=yes
17715    else
17716       cf_cv_prog_gnat_correct=no
17717    fi
17718 else
17719    cf_cv_prog_gnat_correct=no
17720 fi
17721 rm -f conftest*
17722
17723       echo "$as_me:17723: result: $cf_cv_prog_gnat_correct" >&5
17724 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17725    fi
17726 fi
17727 if test "$cf_cv_prog_gnat_correct" = yes; then
17728    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17729
17730    echo "$as_me:17730: checking if GNAT pragma Unreferenced works" >&5
17731 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17732
17733 rm -f conftest*
17734 cat >>conftest.ads <<CF_EOF
17735 procedure conftest;
17736 CF_EOF
17737 cat >>conftest.adb <<CF_EOF
17738 with Text_IO;
17739 with GNAT.OS_Lib;
17740 procedure conftest is
17741    test : Integer;
17742    pragma Unreferenced (test);
17743 begin
17744    test := 1;
17745    Text_IO.Put ("Hello World");
17746    Text_IO.New_Line;
17747    GNAT.OS_Lib.OS_Exit (0);
17748 end conftest;
17749 CF_EOF
17750 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17751       cf_cv_pragma_unreferenced=yes
17752 else
17753    cf_cv_pragma_unreferenced=no
17754 fi
17755 rm -f conftest*
17756
17757    echo "$as_me:17757: result: $cf_cv_pragma_unreferenced" >&5
17758 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17759
17760    # if the pragma is supported, use it (needed in the Trace code).
17761    if test $cf_cv_pragma_unreferenced = yes ; then
17762       PRAGMA_UNREF=TRUE
17763    else
17764       PRAGMA_UNREF=FALSE
17765    fi
17766
17767 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17768 if test "${with_ada_compiler+set}" = set; then
17769   withval="$with_ada_compiler"
17770   cf_ada_compiler=$withval
17771 else
17772   cf_ada_compiler=gnatmake
17773 fi;
17774
17775    cf_ada_package=terminal_interface
17776
17777 # Check whether --with-ada-include or --without-ada-include was given.
17778 if test "${with_ada_include+set}" = set; then
17779   withval="$with_ada_include"
17780
17781 else
17782   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17783 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17784
17785 if test "x$prefix" != xNONE; then
17786   cf_path_syntax="$prefix"
17787 else
17788   cf_path_syntax="$ac_default_prefix"
17789 fi
17790
17791 case ".$withval" in #(vi
17792 .\$\(*\)*|.\'*\'*) #(vi
17793   ;;
17794 ..|./*|.\\*) #(vi
17795   ;;
17796 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17797   ;;
17798 .\${*prefix}*) #(vi
17799   eval withval="$withval"
17800   case ".$withval" in #(vi
17801   .NONE/*)
17802     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17803     ;;
17804   esac
17805   ;; #(vi
17806 .no|.NONE/*)
17807   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17808   ;;
17809 *)
17810   { { echo "$as_me:17810: error: expected a pathname, not \"$withval\"" >&5
17811 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17812    { (exit 1); exit 1; }; }
17813   ;;
17814 esac
17815
17816 fi
17817 ADA_INCLUDE="$withval"
17818
17819 # Check whether --with-ada-objects or --without-ada-objects was given.
17820 if test "${with_ada_objects+set}" = set; then
17821   withval="$with_ada_objects"
17822
17823 else
17824   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17825 fi; if test -n "$prefix/lib/ada/adalib" ; then
17826
17827 if test "x$prefix" != xNONE; then
17828   cf_path_syntax="$prefix"
17829 else
17830   cf_path_syntax="$ac_default_prefix"
17831 fi
17832
17833 case ".$withval" in #(vi
17834 .\$\(*\)*|.\'*\'*) #(vi
17835   ;;
17836 ..|./*|.\\*) #(vi
17837   ;;
17838 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17839   ;;
17840 .\${*prefix}*) #(vi
17841   eval withval="$withval"
17842   case ".$withval" in #(vi
17843   .NONE/*)
17844     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17845     ;;
17846   esac
17847   ;; #(vi
17848 .no|.NONE/*)
17849   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17850   ;;
17851 *)
17852   { { echo "$as_me:17852: error: expected a pathname, not \"$withval\"" >&5
17853 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17854    { (exit 1); exit 1; }; }
17855   ;;
17856 esac
17857
17858 fi
17859 ADA_OBJECTS="$withval"
17860
17861 fi
17862 fi
17863 else
17864    cf_with_ada=no
17865 fi
17866
17867 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17868 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17869 ###
17870 ### ticlib modules may be a separate library, otherwise contained in termlib.
17871 ### termlib modules may be a separate library, otherwise contained in ncurses.
17872 ###
17873 ### The of "+" or " " between the tokens controls the way the script
17874 ### chooses to split module lists into libraries.
17875 ###
17876 ### (see CF_LIB_RULES).
17877 echo "$as_me:17877: checking for library subsets" >&5
17878 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17879 LIB_SUBSETS=
17880
17881 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17882         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17883         if test "$with_ticlib" != no ; then
17884                 LIB_SUBSETS="${LIB_SUBSETS} "
17885         else
17886                 LIB_SUBSETS="${LIB_SUBSETS}+"
17887         fi
17888 fi
17889
17890 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17891 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17892
17893 if test "$with_termlib" != no ; then
17894         LIB_SUBSETS="${LIB_SUBSETS} "
17895 else
17896         LIB_SUBSETS="${LIB_SUBSETS}+"
17897 fi
17898
17899 LIB_SUBSETS="${LIB_SUBSETS}base"
17900
17901 # Most term-driver calls are to tinfo, but some like init_pair are to the
17902 # base library (so it resides in base).
17903 if test "$with_term_driver" != no ; then
17904         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17905         case $cf_cv_system_name in #(vi
17906         *mingw32*) #(vi
17907                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17908                 ;;
17909         *) #(vi
17910                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17911                 ;;
17912         esac
17913 fi
17914
17915 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17916 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17917
17918 echo "$as_me:17918: result: $LIB_SUBSETS" >&5
17919 echo "${ECHO_T}$LIB_SUBSETS" >&6
17920
17921 ### Construct the list of include-directories to be generated
17922
17923 CPPFLAGS="$CPPFLAGS -I. -I../include"
17924 if test "$srcdir" != "."; then
17925         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17926 fi
17927 if test "$GCC" != yes; then
17928         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17929 elif test "$includedir" != "/usr/include"; then
17930         if test "$includedir" = '${prefix}/include' ; then
17931                 if test $prefix != /usr ; then
17932                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17933                 fi
17934         else
17935                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17936         fi
17937 fi
17938
17939 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17940 if test "$srcdir" != "."; then
17941         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17942 fi
17943 if test "$GCC" != yes; then
17944         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17945 elif test "$includedir" != "/usr/include"; then
17946         if test "$includedir" = '${prefix}/include' ; then
17947                 if test $prefix != /usr ; then
17948                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17949                 fi
17950         else
17951                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17952         fi
17953 fi
17954
17955 ### Build up pieces for makefile rules
17956 echo "$as_me:17956: checking default library suffix" >&5
17957 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17958
17959         case $DFT_LWR_MODEL in
17960         libtool) DFT_ARG_SUFFIX=''   ;;
17961         normal)  DFT_ARG_SUFFIX=''   ;;
17962         debug)   DFT_ARG_SUFFIX='_g' ;;
17963         profile) DFT_ARG_SUFFIX='_p' ;;
17964         shared)  DFT_ARG_SUFFIX=''   ;;
17965         esac
17966         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17967 echo "$as_me:17967: result: $DFT_ARG_SUFFIX" >&5
17968 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17969
17970 echo "$as_me:17970: checking default library-dependency suffix" >&5
17971 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17972
17973         case $DFT_LWR_MODEL in #(vi
17974         libtool) #(vi
17975                 DFT_LIB_SUFFIX='.la'
17976                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17977                 ;;
17978         normal) #(vi
17979                 DFT_LIB_SUFFIX='.a'
17980                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17981                 ;;
17982         debug) #(vi
17983                 DFT_LIB_SUFFIX='_g.a'
17984                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17985                 ;;
17986         profile) #(vi
17987                 DFT_LIB_SUFFIX='_p.a'
17988                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17989                 ;;
17990         shared) #(vi
17991                 case $cf_cv_system_name in
17992                 aix[56]*) #(vi
17993                         DFT_LIB_SUFFIX='.a'
17994                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17995                         ;;
17996                 cygwin*) #(vi
17997                         DFT_LIB_SUFFIX='.dll'
17998                         DFT_DEP_SUFFIX='.dll.a'
17999                         ;;
18000                 darwin*) #(vi
18001                         DFT_LIB_SUFFIX='.dylib'
18002                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18003                         ;;
18004                 hpux*) #(vi
18005                         case $target in
18006                         ia64*) #(vi
18007                                 DFT_LIB_SUFFIX='.so'
18008                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18009                                 ;;
18010                         *) #(vi
18011                                 DFT_LIB_SUFFIX='.sl'
18012                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18013                                 ;;
18014                         esac
18015                         ;;
18016                 *)      DFT_LIB_SUFFIX='.so'
18017                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18018                         ;;
18019                 esac
18020         esac
18021         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18022         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18023 echo "$as_me:18023: result: $DFT_DEP_SUFFIX" >&5
18024 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18025
18026 echo "$as_me:18026: checking default object directory" >&5
18027 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18028
18029         case $DFT_LWR_MODEL in
18030         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18031         normal)  DFT_OBJ_SUBDIR='objects' ;;
18032         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18033         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18034         shared)
18035                 case $cf_cv_system_name in #(vi
18036                 cygwin) #(vi
18037                         DFT_OBJ_SUBDIR='objects' ;;
18038                 *)
18039                         DFT_OBJ_SUBDIR='obj_s' ;;
18040                 esac
18041         esac
18042 echo "$as_me:18042: result: $DFT_OBJ_SUBDIR" >&5
18043 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18044
18045 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18046 if test "$cf_with_cxx" = yes ; then
18047 echo "$as_me:18047: checking c++ library-dependency suffix" >&5
18048 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18049 if test "$with_libtool" != "no"; then
18050         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18051 else
18052
18053         case normal in #(vi
18054         libtool) #(vi
18055                 CXX_LIB_SUFFIX='.la'
18056                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18057                 ;;
18058         normal) #(vi
18059                 CXX_LIB_SUFFIX='.a'
18060                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18061                 ;;
18062         debug) #(vi
18063                 CXX_LIB_SUFFIX='_g.a'
18064                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18065                 ;;
18066         profile) #(vi
18067                 CXX_LIB_SUFFIX='_p.a'
18068                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18069                 ;;
18070         shared) #(vi
18071                 case $cf_cv_system_name in
18072                 aix[56]*) #(vi
18073                         CXX_LIB_SUFFIX='.a'
18074                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18075                         ;;
18076                 cygwin*) #(vi
18077                         CXX_LIB_SUFFIX='.dll'
18078                         CXX_DEP_SUFFIX='.dll.a'
18079                         ;;
18080                 darwin*) #(vi
18081                         CXX_LIB_SUFFIX='.dylib'
18082                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18083                         ;;
18084                 hpux*) #(vi
18085                         case $target in
18086                         ia64*) #(vi
18087                                 CXX_LIB_SUFFIX='.so'
18088                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18089                                 ;;
18090                         *) #(vi
18091                                 CXX_LIB_SUFFIX='.sl'
18092                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18093                                 ;;
18094                         esac
18095                         ;;
18096                 *)      CXX_LIB_SUFFIX='.so'
18097                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18098                         ;;
18099                 esac
18100         esac
18101         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18102         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18103 fi
18104 echo "$as_me:18104: result: $CXX_LIB_SUFFIX" >&5
18105 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18106
18107 fi
18108
18109 # do not want -ldl in build except as needed for -lncurses dependency
18110 if test "$with_dlsym" = yes ; then
18111 if test $DFT_LWR_MODEL = shared || \
18112    test $DFT_LWR_MODEL = libtool ; then
18113
18114 # remove dl library from $LIBS
18115 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18116
18117 fi
18118 fi
18119 ### Set up low-level terminfo dependencies for makefiles.
18120
18121 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18122 # do not need libdl
18123 TICS_LIST=
18124 if test "$with_dlsym" = yes ; then
18125
18126 # remove dl library from $SHLIB_LIST
18127 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18128
18129 fi
18130
18131 if test "$with_ticlib" != no ; then
18132
18133         if test "$with_ticlib" != yes ; then
18134                 TICS_NAME=$with_ticlib
18135                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18136                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18137                 TICS_LIB_SUFFIX="${with_ticlib}"
18138         else
18139                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18140                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18141                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18142         fi
18143         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18144 else
18145         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18146 fi
18147
18148 if test "$with_termlib" != no ; then
18149
18150         if test "$with_termlib" != yes ; then
18151                 TINFO_NAME=$with_termlib
18152                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18153                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18154                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18155                 TINFO_LIB_SUFFIX="${with_termlib}"
18156         else
18157                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18158                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18159                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18160                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18161         fi
18162
18163         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18164         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18165         if test "$DFT_LWR_MODEL" = "libtool"; then
18166                 TEST_ARGS="${TEST_DEPS}"
18167                 TEST_ARG2="${TEST_DEP2}"
18168                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18169                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18170                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18171         else
18172                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18173                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18174                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18175                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18176                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18177         fi
18178 else
18179         # the next lines are needed for linking libtic over libncurses
18180         TINFO_NAME=${LIB_NAME}
18181         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18182         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18183         if test "$with_tic_depends" = yes ; then
18184                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18185         else
18186                 TICS_LIST="$SHLIB_LIST"
18187         fi
18188
18189         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18190 fi
18191
18192 if test "$DFT_LWR_MODEL" = shared ; then
18193         case $cf_cv_system_name in #(vi
18194         cygwin*)
18195                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18196                 TINFO_SUFFIX=.dll
18197                 ;;
18198         esac
18199 fi
18200
18201 if test "$with_dlsym" = yes ; then
18202
18203 # remove dl library from $TICS_LIST
18204 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18205
18206 fi
18207
18208 if test "$DFT_LWR_MODEL" = "libtool"; then
18209     OBJEXT=lo
18210 fi
18211
18212 # needed for Ada95
18213 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18214
18215 case $DFT_LWR_MODEL in
18216 normal|debug|profile)
18217
18218 if test "$GCC" = yes ; then
18219         case $cf_cv_system_name in #(
18220         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18221                 LDFLAGS_STATIC=
18222                 LDFLAGS_SHARED=
18223                 ;;
18224     *)  #( normally, except when broken
18225         LDFLAGS_STATIC=-static
18226         LDFLAGS_SHARED=-dynamic
18227         ;;
18228     esac
18229 else
18230         case $cf_cv_system_name in #(
18231         aix[456]*)      #( from ld manpage
18232                 LDFLAGS_STATIC=-bstatic
18233                 LDFLAGS_SHARED=-bdynamic
18234                 ;;
18235         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18236                 # We could also use just "archive" and "shared".
18237                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18238                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18239                 ;;
18240         irix*)          #( from ld manpage IRIX64
18241                 LDFLAGS_STATIC=-Bstatic
18242                 LDFLAGS_SHARED=-Bdynamic
18243                 ;;
18244         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18245                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18246                 LDFLAGS_STATIC=-noso
18247                 LDFLAGS_SHARED=-so_archive
18248                 ;;
18249         solaris2*)
18250                 LDFLAGS_STATIC=-Bstatic
18251                 LDFLAGS_SHARED=-Bdynamic
18252                 ;;
18253         esac
18254 fi
18255
18256         ;;
18257 esac
18258
18259 echo "$as_me:18259: checking where we will install curses.h" >&5
18260 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18261 test "$with_overwrite" = no && \
18262 test "x$includedir" = 'x${prefix}/include' && \
18263         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18264 echo "$as_me:18264: result: $includedir" >&5
18265 echo "${ECHO_T}$includedir" >&6
18266
18267 ### Resolve a conflict between normal and wide-curses by forcing applications
18268 ### that will need libutf8 to add it to their configure script.
18269 if test "$with_overwrite" != no ; then
18270 if test "$NCURSES_LIBUTF8" = 1 ; then
18271         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18272         { echo "$as_me:18272: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18273 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18274 fi
18275 fi
18276 WITH_OVERWRITE=$with_overwrite
18277
18278 # used to separate tack out of the tree
18279 NCURSES_TREE=
18280
18281 ### predefined stuff for the test programs
18282 cat >>confdefs.h <<\EOF
18283 #define HAVE_SLK_COLOR 1
18284 EOF
18285
18286 ### Construct the list of subdirectories for which we'll customize makefiles
18287 ### with the appropriate compile-rules.
18288
18289 echo "$as_me:18289: checking for src modules" >&5
18290 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18291
18292 # dependencies and linker-arguments for test-programs
18293 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18294 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18295 if test "$DFT_LWR_MODEL" = "libtool"; then
18296         TEST_ARGS="${TEST_DEPS}"
18297         TEST_ARG2="${TEST_DEP2}"
18298 else
18299         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18300         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18301 fi
18302
18303 cf_cv_src_modules=
18304 for cf_dir in $modules_to_build
18305 do
18306         if test -f $srcdir/$cf_dir/modules; then
18307
18308                 # We may/may not have tack in the distribution, though the
18309                 # makefile is.
18310                 if test $cf_dir = tack ; then
18311                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18312                                 continue
18313                         fi
18314                 fi
18315
18316                 if test -z "$cf_cv_src_modules"; then
18317                         cf_cv_src_modules=$cf_dir
18318                 else
18319                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18320                 fi
18321
18322                 # Make the ncurses_cfg.h file record the library interface files as
18323                 # well.  These are header files that are the same name as their
18324                 # directory.  Ncurses is the only library that does not follow
18325                 # that pattern.
18326                 if test $cf_dir = tack ; then
18327                         continue
18328                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18329
18330 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18331
18332                         cat >>confdefs.h <<EOF
18333 #define HAVE_${cf_have_include}_H 1
18334 EOF
18335
18336                         cat >>confdefs.h <<EOF
18337 #define HAVE_LIB${cf_have_include} 1
18338 EOF
18339
18340                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18341                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18342                         if test "$DFT_LWR_MODEL" = "libtool"; then
18343                                 TEST_ARGS="${TEST_DEPS}"
18344                                 TEST_ARG2="${TEST_DEP2}"
18345                         else
18346                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18347                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18348                         fi
18349                 fi
18350         fi
18351 done
18352 echo "$as_me:18352: result: $cf_cv_src_modules" >&5
18353 echo "${ECHO_T}$cf_cv_src_modules" >&6
18354
18355 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18356 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18357
18358 SRC_SUBDIRS=
18359 if test "x$cf_with_manpages" != xno ; then
18360         SRC_SUBDIRS="$SRC_SUBDIRS man"
18361 fi
18362 SRC_SUBDIRS="$SRC_SUBDIRS include"
18363 for cf_dir in $cf_cv_src_modules
18364 do
18365         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18366 done
18367 SRC_SUBDIRS="$SRC_SUBDIRS test"
18368 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18369 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18370
18371 ADA_SUBDIRS=
18372 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18373         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18374         ADA_SUBDIRS="gen src samples"
18375 fi
18376
18377 SUB_MAKEFILES=
18378 for cf_dir in $SRC_SUBDIRS
18379 do
18380         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18381 done
18382
18383 if test -n "$ADA_SUBDIRS"; then
18384         for cf_dir in $ADA_SUBDIRS
18385         do
18386                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18387         done
18388
18389 fi
18390
18391 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18392    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18393    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18394 fi
18395
18396 DIRS_TO_MAKE="lib"
18397 for cf_item in $cf_list_models
18398 do
18399
18400         case $cf_item in
18401         libtool) cf_subdir='obj_lo'  ;;
18402         normal)  cf_subdir='objects' ;;
18403         debug)   cf_subdir='obj_g' ;;
18404         profile) cf_subdir='obj_p' ;;
18405         shared)
18406                 case $cf_cv_system_name in #(vi
18407                 cygwin) #(vi
18408                         cf_subdir='objects' ;;
18409                 *)
18410                         cf_subdir='obj_s' ;;
18411                 esac
18412         esac
18413
18414         for cf_item2 in $DIRS_TO_MAKE
18415         do
18416                 test $cf_item2 = $cf_subdir && break
18417         done
18418         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18419 done
18420 for cf_dir in $DIRS_TO_MAKE
18421 do
18422         test ! -d $cf_dir && mkdir $cf_dir
18423 done
18424
18425 # symbols that differ when compiling Ada95 by itself.
18426 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18427
18428 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18429
18430 # values to use as strings
18431 cat >>confdefs.h <<EOF
18432 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18433 EOF
18434
18435 cat >>confdefs.h <<EOF
18436 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18437 EOF
18438
18439 ### Now that we're done running tests, add the compiler-warnings, if any
18440
18441 cf_fix_cppflags=no
18442 cf_new_cflags=
18443 cf_new_cppflags=
18444 cf_new_extra_cppflags=
18445
18446 for cf_add_cflags in $EXTRA_CFLAGS
18447 do
18448 case $cf_fix_cppflags in
18449 no)
18450         case $cf_add_cflags in #(vi
18451         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18452                 case $cf_add_cflags in
18453                 -D*)
18454                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18455
18456                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18457                                 && test -z "${cf_tst_cflags}" \
18458                                 && cf_fix_cppflags=yes
18459
18460                         if test $cf_fix_cppflags = yes ; then
18461                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18462                                 continue
18463                         elif test "${cf_tst_cflags}" = "\"'" ; then
18464                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18465                                 continue
18466                         fi
18467                         ;;
18468                 esac
18469                 case "$CPPFLAGS" in
18470                 *$cf_add_cflags) #(vi
18471                         ;;
18472                 *) #(vi
18473                         case $cf_add_cflags in #(vi
18474                         -D*)
18475                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18476
18477 CPPFLAGS=`echo "$CPPFLAGS" | \
18478         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18479                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18480
18481                                 ;;
18482                         esac
18483                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18484                         ;;
18485                 esac
18486                 ;;
18487         *)
18488                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18489                 ;;
18490         esac
18491         ;;
18492 yes)
18493         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18494
18495         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18496
18497         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18498                 && test -z "${cf_tst_cflags}" \
18499                 && cf_fix_cppflags=no
18500         ;;
18501 esac
18502 done
18503
18504 if test -n "$cf_new_cflags" ; then
18505
18506         CFLAGS="$CFLAGS $cf_new_cflags"
18507 fi
18508
18509 if test -n "$cf_new_cppflags" ; then
18510
18511         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18512 fi
18513
18514 if test -n "$cf_new_extra_cppflags" ; then
18515
18516         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18517 fi
18518
18519 ### If we're building with rpath, try to link non-standard libs that way too.
18520 if test "$DFT_LWR_MODEL" = "shared"; then
18521
18522 echo "$as_me:18522: checking if rpath should be not be set" >&5
18523 echo $ECHO_N "checking if rpath should be not be set... $ECHO_C" >&6
18524
18525 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
18526 if test "${enable_rpath_hack+set}" = set; then
18527   enableval="$enable_rpath_hack"
18528   test "$enableval" != no && enableval=yes
18529   if test "$enableval" != "yes" ; then
18530     cf_disable_rpath_hack=yes
18531   else
18532     cf_disable_rpath_hack=no
18533   fi
18534 else
18535   enableval=yes
18536   cf_disable_rpath_hack=no
18537
18538 fi;
18539 echo "$as_me:18539: result: $cf_disable_rpath_hack" >&5
18540 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
18541 if test "$cf_disable_rpath_hack" = no ; then
18542
18543 echo "$as_me:18543: checking for updated LDFLAGS" >&5
18544 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18545 if test -n "$LD_RPATH_OPT" ; then
18546         echo "$as_me:18546: result: maybe" >&5
18547 echo "${ECHO_T}maybe" >&6
18548
18549         for ac_prog in ldd
18550 do
18551   # Extract the first word of "$ac_prog", so it can be a program name with args.
18552 set dummy $ac_prog; ac_word=$2
18553 echo "$as_me:18553: checking for $ac_word" >&5
18554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18555 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
18556   echo $ECHO_N "(cached) $ECHO_C" >&6
18557 else
18558   if test -n "$cf_ldd_prog"; then
18559   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
18560 else
18561   ac_save_IFS=$IFS; IFS=$ac_path_separator
18562 ac_dummy="$PATH"
18563 for ac_dir in $ac_dummy; do
18564   IFS=$ac_save_IFS
18565   test -z "$ac_dir" && ac_dir=.
18566   $as_executable_p "$ac_dir/$ac_word" || continue
18567 ac_cv_prog_cf_ldd_prog="$ac_prog"
18568 echo "$as_me:18568: found $ac_dir/$ac_word" >&5
18569 break
18570 done
18571
18572 fi
18573 fi
18574 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
18575 if test -n "$cf_ldd_prog"; then
18576   echo "$as_me:18576: result: $cf_ldd_prog" >&5
18577 echo "${ECHO_T}$cf_ldd_prog" >&6
18578 else
18579   echo "$as_me:18579: result: no" >&5
18580 echo "${ECHO_T}no" >&6
18581 fi
18582
18583   test -n "$cf_ldd_prog" && break
18584 done
18585 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
18586
18587         cf_rpath_list="/usr/lib /lib"
18588         if test "$cf_ldd_prog" != no
18589         then
18590 cat >conftest.$ac_ext <<_ACEOF
18591 #line 18591 "configure"
18592 #include "confdefs.h"
18593 #include <stdio.h>
18594 int
18595 main ()
18596 {
18597 printf("Hello");
18598   ;
18599   return 0;
18600 }
18601 _ACEOF
18602 rm -f conftest.$ac_objext conftest$ac_exeext
18603 if { (eval echo "$as_me:18603: \"$ac_link\"") >&5
18604   (eval $ac_link) 2>&5
18605   ac_status=$?
18606   echo "$as_me:18606: \$? = $ac_status" >&5
18607   (exit $ac_status); } &&
18608          { ac_try='test -s conftest$ac_exeext'
18609   { (eval echo "$as_me:18609: \"$ac_try\"") >&5
18610   (eval $ac_try) 2>&5
18611   ac_status=$?
18612   echo "$as_me:18612: \$? = $ac_status" >&5
18613   (exit $ac_status); }; }; then
18614   cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[     ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
18615 else
18616   echo "$as_me: failed program was:" >&5
18617 cat conftest.$ac_ext >&5
18618 fi
18619 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18620         fi
18621
18622         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18623
18624 echo "${as_me-configure}:18624: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18625
18626 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18627
18628 echo "${as_me-configure}:18628: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18629
18630 cf_rpath_dst=
18631 for cf_rpath_src in $LDFLAGS
18632 do
18633         case $cf_rpath_src in #(vi
18634         -L*) #(vi
18635
18636                 # check if this refers to a directory which we will ignore
18637                 cf_rpath_skip=no
18638                 if test -n "$cf_rpath_list"
18639                 then
18640                         for cf_rpath_item in $cf_rpath_list
18641                         do
18642                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18643                                 then
18644                                         cf_rpath_skip=yes
18645                                         break
18646                                 fi
18647                         done
18648                 fi
18649
18650                 if test "$cf_rpath_skip" = no
18651                 then
18652                         # transform the option
18653                         if test "$LD_RPATH_OPT" = "-R " ; then
18654                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18655                         else
18656                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18657                         fi
18658
18659                         # if we have not already added this, add it now
18660                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18661                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18662                         then
18663                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18664
18665 echo "${as_me-configure}:18665: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18666
18667                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18668                         fi
18669                 fi
18670                 ;;
18671         esac
18672         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18673 done
18674 LDFLAGS=$cf_rpath_dst
18675
18676 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18677
18678 echo "${as_me-configure}:18678: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18679
18680 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18681
18682 echo "${as_me-configure}:18682: testing ...checking LIBS $LIBS ..." 1>&5
18683
18684 cf_rpath_dst=
18685 for cf_rpath_src in $LIBS
18686 do
18687         case $cf_rpath_src in #(vi
18688         -L*) #(vi
18689
18690                 # check if this refers to a directory which we will ignore
18691                 cf_rpath_skip=no
18692                 if test -n "$cf_rpath_list"
18693                 then
18694                         for cf_rpath_item in $cf_rpath_list
18695                         do
18696                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
18697                                 then
18698                                         cf_rpath_skip=yes
18699                                         break
18700                                 fi
18701                         done
18702                 fi
18703
18704                 if test "$cf_rpath_skip" = no
18705                 then
18706                         # transform the option
18707                         if test "$LD_RPATH_OPT" = "-R " ; then
18708                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18709                         else
18710                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18711                         fi
18712
18713                         # if we have not already added this, add it now
18714                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
18715                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
18716                         then
18717                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18718
18719 echo "${as_me-configure}:18719: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18720
18721                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18722                         fi
18723                 fi
18724                 ;;
18725         esac
18726         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18727 done
18728 LIBS=$cf_rpath_dst
18729
18730 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18731
18732 echo "${as_me-configure}:18732: testing ...checked LIBS $LIBS ..." 1>&5
18733
18734         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18735
18736 echo "${as_me-configure}:18736: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18737
18738 fi
18739
18740 fi
18741
18742 fi
18743
18744 ### Define substitutions for header files to avoid name-pollution
18745
18746 if test "$cf_cv_have_tcgetattr" = yes ; then
18747         HAVE_TCGETATTR=1
18748 else
18749         HAVE_TCGETATTR=0
18750 fi
18751
18752 if test "$ac_cv_header_termio_h" = yes ; then
18753         HAVE_TERMIO_H=1
18754 else
18755         HAVE_TERMIO_H=0
18756 fi
18757
18758 if test "$ac_cv_header_termios_h" = yes ; then
18759         HAVE_TERMIOS_H=1
18760 else
18761         HAVE_TERMIOS_H=0
18762 fi
18763
18764 ################################################################################
18765 test "$use_database" = yes && \
18766 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18767
18768 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18769 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18770
18771 if test x"$enable_pc_files" = xyes ; then \
18772 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18773 MAKE_PC_FILES=
18774 else
18775 MAKE_PC_FILES="#"
18776 fi
18777
18778 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"
18779 ac_config_commands="$ac_config_commands default"
18780 cat >confcache <<\_ACEOF
18781 # This file is a shell script that caches the results of configure
18782 # tests run on this system so they can be shared between configure
18783 # scripts and configure runs, see configure's option --config-cache.
18784 # It is not useful on other systems.  If it contains results you don't
18785 # want to keep, you may remove or edit it.
18786 #
18787 # config.status only pays attention to the cache file if you give it
18788 # the --recheck option to rerun configure.
18789 #
18790 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18791 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18792 # following values.
18793
18794 _ACEOF
18795
18796 # The following way of writing the cache mishandles newlines in values,
18797 # but we know of no workaround that is simple, portable, and efficient.
18798 # So, don't put newlines in cache variables' values.
18799 # Ultrix sh set writes to stderr and can't be redirected directly,
18800 # and sets the high bit in the cache file unless we assign to the vars.
18801 {
18802   (set) 2>&1 |
18803     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18804     *ac_space=\ *)
18805       # `set' does not quote correctly, so add quotes (double-quote
18806       # substitution turns \\\\ into \\, and sed turns \\ into \).
18807       sed -n \
18808         "s/'/'\\\\''/g;
18809           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18810       ;;
18811     *)
18812       # `set' quotes correctly as required by POSIX, so do not add quotes.
18813       sed -n \
18814         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18815       ;;
18816     esac;
18817 } |
18818   sed '
18819      t clear
18820      : clear
18821      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18822      t end
18823      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18824      : end' >>confcache
18825 if cmp -s $cache_file confcache; then :; else
18826   if test -w $cache_file; then
18827     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18828     cat confcache >$cache_file
18829   else
18830     echo "not updating unwritable cache $cache_file"
18831   fi
18832 fi
18833 rm -f confcache
18834
18835 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18836 # Let make expand exec_prefix.
18837 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18838
18839 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18840 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18841 # trailing colons and then remove the whole line if VPATH becomes empty
18842 # (actually we leave an empty line to preserve line numbers).
18843 if test "x$srcdir" = x.; then
18844   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18845 s/:*\$(srcdir):*/:/;
18846 s/:*\${srcdir}:*/:/;
18847 s/:*@srcdir@:*/:/;
18848 s/^\([^=]*=[    ]*\):*/\1/;
18849 s/:*$//;
18850 s/^[^=]*=[      ]*$//;
18851 }'
18852 fi
18853
18854 DEFS=-DHAVE_CONFIG_H
18855
18856 : ${CONFIG_STATUS=./config.status}
18857 ac_clean_files_save=$ac_clean_files
18858 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18859 { echo "$as_me:18859: creating $CONFIG_STATUS" >&5
18860 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18861 cat >$CONFIG_STATUS <<_ACEOF
18862 #! $SHELL
18863 # Generated automatically by configure.
18864 # Run this file to recreate the current configuration.
18865 # Compiler output produced by configure, useful for debugging
18866 # configure, is in config.log if it exists.
18867
18868 debug=false
18869 SHELL=\${CONFIG_SHELL-$SHELL}
18870 ac_cs_invocation="\$0 \$@"
18871
18872 _ACEOF
18873
18874 cat >>$CONFIG_STATUS <<\_ACEOF
18875 # Be Bourne compatible
18876 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18877   emulate sh
18878   NULLCMD=:
18879 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18880   set -o posix
18881 fi
18882
18883 # Name of the executable.
18884 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18885
18886 if expr a : '\(a\)' >/dev/null 2>&1; then
18887   as_expr=expr
18888 else
18889   as_expr=false
18890 fi
18891
18892 rm -f conf$$ conf$$.exe conf$$.file
18893 echo >conf$$.file
18894 if ln -s conf$$.file conf$$ 2>/dev/null; then
18895   # We could just check for DJGPP; but this test a) works b) is more generic
18896   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18897   if test -f conf$$.exe; then
18898     # Don't use ln at all; we don't have any links
18899     as_ln_s='cp -p'
18900   else
18901     as_ln_s='ln -s'
18902   fi
18903 elif ln conf$$.file conf$$ 2>/dev/null; then
18904   as_ln_s=ln
18905 else
18906   as_ln_s='cp -p'
18907 fi
18908 rm -f conf$$ conf$$.exe conf$$.file
18909
18910 as_executable_p="test -f"
18911
18912 # Support unset when possible.
18913 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18914   as_unset=unset
18915 else
18916   as_unset=false
18917 fi
18918
18919 # NLS nuisances.
18920 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18921 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18922 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18923 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18924 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18925 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18926 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18927 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18928
18929 # IFS
18930 # We need space, tab and new line, in precisely that order.
18931 as_nl='
18932 '
18933 IFS="   $as_nl"
18934
18935 # CDPATH.
18936 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18937
18938 exec 6>&1
18939
18940 _ACEOF
18941
18942 # Files that config.status was made for.
18943 if test -n "$ac_config_files"; then
18944   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18945 fi
18946
18947 if test -n "$ac_config_headers"; then
18948   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18949 fi
18950
18951 if test -n "$ac_config_links"; then
18952   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18953 fi
18954
18955 if test -n "$ac_config_commands"; then
18956   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18957 fi
18958
18959 cat >>$CONFIG_STATUS <<\EOF
18960
18961 ac_cs_usage="\
18962 \`$as_me' instantiates files from templates according to the
18963 current configuration.
18964
18965 Usage: $0 [OPTIONS] [FILE]...
18966
18967   -h, --help       print this help, then exit
18968   -V, --version    print version number, then exit
18969   -d, --debug      don't remove temporary files
18970       --recheck    update $as_me by reconfiguring in the same conditions
18971   --file=FILE[:TEMPLATE]
18972                    instantiate the configuration file FILE
18973   --header=FILE[:TEMPLATE]
18974                    instantiate the configuration header FILE
18975
18976 Configuration files:
18977 $config_files
18978
18979 Configuration headers:
18980 $config_headers
18981
18982 Configuration commands:
18983 $config_commands
18984
18985 Report bugs to <bug-autoconf@gnu.org>."
18986 EOF
18987
18988 cat >>$CONFIG_STATUS <<EOF
18989 ac_cs_version="\\
18990 config.status
18991 configured by $0, generated by GNU Autoconf 2.52.20100320,
18992   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18993
18994 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18995 Free Software Foundation, Inc.
18996 This config.status script is free software; the Free Software Foundation
18997 gives unlimited permission to copy, distribute and modify it."
18998 srcdir=$srcdir
18999 INSTALL="$INSTALL"
19000 EOF
19001
19002 cat >>$CONFIG_STATUS <<\EOF
19003 # If no file are specified by the user, then we need to provide default
19004 # value.  By we need to know if files were specified by the user.
19005 ac_need_defaults=:
19006 while test $# != 0
19007 do
19008   case $1 in
19009   --*=*)
19010     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19011     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19012     shift
19013     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19014     shift
19015     ;;
19016   -*);;
19017   *) # This is not an option, so the user has probably given explicit
19018      # arguments.
19019      ac_need_defaults=false;;
19020   esac
19021
19022   case $1 in
19023   # Handling of the options.
19024 EOF
19025 cat >>$CONFIG_STATUS <<EOF
19026   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19027     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19028     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19029 EOF
19030 cat >>$CONFIG_STATUS <<\EOF
19031   --version | --vers* | -V )
19032     echo "$ac_cs_version"; exit 0 ;;
19033   --he | --h)
19034     # Conflict between --help and --header
19035     { { echo "$as_me:19035: error: ambiguous option: $1
19036 Try \`$0 --help' for more information." >&5
19037 echo "$as_me: error: ambiguous option: $1
19038 Try \`$0 --help' for more information." >&2;}
19039    { (exit 1); exit 1; }; };;
19040   --help | --hel | -h )
19041     echo "$ac_cs_usage"; exit 0 ;;
19042   --debug | --d* | -d )
19043     debug=: ;;
19044   --file | --fil | --fi | --f )
19045     shift
19046     CONFIG_FILES="$CONFIG_FILES $1"
19047     ac_need_defaults=false;;
19048   --header | --heade | --head | --hea )
19049     shift
19050     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19051     ac_need_defaults=false;;
19052
19053   # This is an error.
19054   -*) { { echo "$as_me:19054: error: unrecognized option: $1
19055 Try \`$0 --help' for more information." >&5
19056 echo "$as_me: error: unrecognized option: $1
19057 Try \`$0 --help' for more information." >&2;}
19058    { (exit 1); exit 1; }; } ;;
19059
19060   *) ac_config_targets="$ac_config_targets $1" ;;
19061
19062   esac
19063   shift
19064 done
19065
19066 exec 5>>config.log
19067 cat >&5 << _ACEOF
19068
19069 ## ----------------------- ##
19070 ## Running config.status.  ##
19071 ## ----------------------- ##
19072
19073 This file was extended by $as_me 2.52.20100320, executed with
19074   CONFIG_FILES    = $CONFIG_FILES
19075   CONFIG_HEADERS  = $CONFIG_HEADERS
19076   CONFIG_LINKS    = $CONFIG_LINKS
19077   CONFIG_COMMANDS = $CONFIG_COMMANDS
19078   > $ac_cs_invocation
19079 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19080
19081 _ACEOF
19082 EOF
19083
19084 cat >>$CONFIG_STATUS <<EOF
19085 #
19086 # INIT-COMMANDS section.
19087 #
19088
19089 ### Special initialization commands, used to pass information from the
19090 ### configuration-run into config.status
19091
19092 AWK="$AWK"
19093 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19094 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19095 ECHO_LINK="$ECHO_LINK"
19096 LDCONFIG="$LDCONFIG"
19097 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19098 LIB_NAME="$LIB_NAME"
19099 LIB_SUBSETS="$LIB_SUBSETS"
19100 LIB_SUFFIX="$LIB_SUFFIX"
19101 LIB_TRACING="$LIB_TRACING"
19102 MAKE_TERMINFO="$MAKE_TERMINFO"
19103 NCURSES_MAJOR="$NCURSES_MAJOR"
19104 NCURSES_MINOR="$NCURSES_MINOR"
19105 NCURSES_OSPEED="$NCURSES_OSPEED"
19106 NCURSES_PATCH="$NCURSES_PATCH"
19107 SRC_SUBDIRS="$SRC_SUBDIRS"
19108 TERMINFO="$TERMINFO"
19109 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19110 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19111 TICS_NAME="$TICS_NAME"
19112 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19113 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19114 TINFO_NAME="$TINFO_NAME"
19115 TINFO_SUFFIX="$TINFO_SUFFIX"
19116 WITH_CURSES_H="$with_curses_h"
19117 WITH_ECHO="$with_echo"
19118 WITH_OVERWRITE="$with_overwrite"
19119 cf_LIST_MODELS="$cf_list_models"
19120 cf_cv_abi_version="$cf_cv_abi_version"
19121 cf_cv_do_relink="$cf_cv_do_relink"
19122 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19123 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19124 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19125 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19126 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19127 cf_cv_rel_version="$cf_cv_rel_version"
19128 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19129 cf_cv_shared_soname='$cf_cv_shared_soname'
19130 cf_cv_shlib_version="$cf_cv_shlib_version"
19131 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19132 cf_cv_system_name="$cf_cv_system_name"
19133 cf_with_cxx_binding="$cf_with_cxx_binding"
19134 cf_with_manpages="$cf_with_manpages"
19135 host="$host"
19136 target="$target"
19137
19138 EOF
19139
19140 cat >>$CONFIG_STATUS <<\EOF
19141 for ac_config_target in $ac_config_targets
19142 do
19143   case "$ac_config_target" in
19144   # Handling of arguments.
19145   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
19146   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
19147   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
19148   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
19149   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
19150   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
19151   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19152   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
19153   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
19154   *) { { echo "$as_me:19154: error: invalid argument: $ac_config_target" >&5
19155 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
19156    { (exit 1); exit 1; }; };;
19157   esac
19158 done
19159
19160 # If the user did not use the arguments to specify the items to instantiate,
19161 # then the envvar interface is used.  Set only those that are not.
19162 # We use the long form for the default assignment because of an extremely
19163 # bizarre bug on SunOS 4.1.3.
19164 if $ac_need_defaults; then
19165   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19166   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19167   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19168 fi
19169
19170 # Create a temporary directory, and hook for its removal unless debugging.
19171 $debug ||
19172 {
19173   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
19174   trap '{ (exit 1); exit 1; }' 1 2 13 15
19175 }
19176
19177 # Create a (secure) tmp directory for tmp files.
19178 : ${TMPDIR=/tmp}
19179 {
19180   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
19181   test -n "$tmp" && test -d "$tmp"
19182 }  ||
19183 {
19184   tmp=$TMPDIR/cs$$-$RANDOM
19185   (umask 077 && mkdir $tmp)
19186 } ||
19187 {
19188    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
19189    { (exit 1); exit 1; }
19190 }
19191
19192 EOF
19193
19194 cat >>$CONFIG_STATUS <<EOF
19195
19196 #
19197 # CONFIG_FILES section.
19198 #
19199
19200 # No need to generate the scripts if there are no CONFIG_FILES.
19201 # This happens for instance when ./config.status config.h
19202 if test -n "\$CONFIG_FILES"; then
19203   # Protect against being on the right side of a sed subst in config.status.
19204   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
19205    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
19206 s,@SHELL@,$SHELL,;t t
19207 s,@exec_prefix@,$exec_prefix,;t t
19208 s,@prefix@,$prefix,;t t
19209 s,@program_transform_name@,$program_transform_name,;t t
19210 s,@bindir@,$bindir,;t t
19211 s,@sbindir@,$sbindir,;t t
19212 s,@libexecdir@,$libexecdir,;t t
19213 s,@datadir@,$datadir,;t t
19214 s,@sysconfdir@,$sysconfdir,;t t
19215 s,@sharedstatedir@,$sharedstatedir,;t t
19216 s,@localstatedir@,$localstatedir,;t t
19217 s,@libdir@,$libdir,;t t
19218 s,@includedir@,$includedir,;t t
19219 s,@oldincludedir@,$oldincludedir,;t t
19220 s,@infodir@,$infodir,;t t
19221 s,@mandir@,$mandir,;t t
19222 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19223 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19224 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19225 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19226 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19227 s,@build_alias@,$build_alias,;t t
19228 s,@host_alias@,$host_alias,;t t
19229 s,@target_alias@,$target_alias,;t t
19230 s,@ECHO_C@,$ECHO_C,;t t
19231 s,@ECHO_N@,$ECHO_N,;t t
19232 s,@ECHO_T@,$ECHO_T,;t t
19233 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19234 s,@DEFS@,$DEFS,;t t
19235 s,@LIBS@,$LIBS,;t t
19236 s,@top_builddir@,$top_builddir,;t t
19237 s,@EGREP@,$EGREP,;t t
19238 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19239 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19240 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19241 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19242 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19243 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19244 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19245 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19246 s,@build@,$build,;t t
19247 s,@build_cpu@,$build_cpu,;t t
19248 s,@build_vendor@,$build_vendor,;t t
19249 s,@build_os@,$build_os,;t t
19250 s,@host@,$host,;t t
19251 s,@host_cpu@,$host_cpu,;t t
19252 s,@host_vendor@,$host_vendor,;t t
19253 s,@host_os@,$host_os,;t t
19254 s,@target@,$target,;t t
19255 s,@target_cpu@,$target_cpu,;t t
19256 s,@target_vendor@,$target_vendor,;t t
19257 s,@target_os@,$target_os,;t t
19258 s,@CC@,$CC,;t t
19259 s,@CFLAGS@,$CFLAGS,;t t
19260 s,@LDFLAGS@,$LDFLAGS,;t t
19261 s,@CPPFLAGS@,$CPPFLAGS,;t t
19262 s,@ac_ct_CC@,$ac_ct_CC,;t t
19263 s,@EXEEXT@,$EXEEXT,;t t
19264 s,@OBJEXT@,$OBJEXT,;t t
19265 s,@CPP@,$CPP,;t t
19266 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19267 s,@PROG_EXT@,$PROG_EXT,;t t
19268 s,@LDCONFIG@,$LDCONFIG,;t t
19269 s,@CXX@,$CXX,;t t
19270 s,@CXXFLAGS@,$CXXFLAGS,;t t
19271 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19272 s,@AWK@,$AWK,;t t
19273 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19274 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19275 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19276 s,@LINT@,$LINT,;t t
19277 s,@LINT_OPTS@,$LINT_OPTS,;t t
19278 s,@LN_S@,$LN_S,;t t
19279 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19280 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19281 s,@SET_MAKE@,$SET_MAKE,;t t
19282 s,@CTAGS@,$CTAGS,;t t
19283 s,@ETAGS@,$ETAGS,;t t
19284 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19285 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19286 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19287 s,@RANLIB@,$RANLIB,;t t
19288 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19289 s,@LD@,$LD,;t t
19290 s,@ac_ct_LD@,$ac_ct_LD,;t t
19291 s,@AR@,$AR,;t t
19292 s,@ac_ct_AR@,$ac_ct_AR,;t t
19293 s,@ARFLAGS@,$ARFLAGS,;t t
19294 s,@DESTDIR@,$DESTDIR,;t t
19295 s,@BUILD_CC@,$BUILD_CC,;t t
19296 s,@BUILD_CPP@,$BUILD_CPP,;t t
19297 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19298 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19299 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19300 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19301 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19302 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19303 s,@cf_list_models@,$cf_list_models,;t t
19304 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
19305 s,@LIBTOOL@,$LIBTOOL,;t t
19306 s,@LT_UNDEF@,$LT_UNDEF,;t t
19307 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19308 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19309 s,@LIB_CREATE@,$LIB_CREATE,;t t
19310 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19311 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19312 s,@LIB_PREP@,$LIB_PREP,;t t
19313 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19314 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19315 s,@LIB_LINK@,$LIB_LINK,;t t
19316 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19317 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19318 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19319 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19320 s,@TICS_NAME@,$TICS_NAME,;t t
19321 s,@TINFO_NAME@,$TINFO_NAME,;t t
19322 s,@LIB_NAME@,$LIB_NAME,;t t
19323 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19324 s,@CC_G_OPT@,$CC_G_OPT,;t t
19325 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19326 s,@LD_MODEL@,$LD_MODEL,;t t
19327 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19328 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19329 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19330 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19331 s,@LINK_PROGS@,$LINK_PROGS,;t t
19332 s,@LINK_TESTS@,$LINK_TESTS,;t t
19333 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19334 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19335 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19336 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19337 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19338 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19339 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19340 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19341 s,@TERMINFO@,$TERMINFO,;t t
19342 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19343 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19344 s,@TERMPATH@,$TERMPATH,;t t
19345 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19346 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19347 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19348 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19349 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19350 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19351 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19352 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19353 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19354 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19355 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19356 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19357 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19358 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19359 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19360 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19361 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19362 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19363 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19364 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19365 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19366 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19367 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19368 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19369 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19370 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19371 s,@PTHREAD@,$PTHREAD,;t t
19372 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19373 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19374 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19375 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19376 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19377 s,@ECHO_LINK@,$ECHO_LINK,;t t
19378 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19379 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19380 s,@ADA_TRACE@,$ADA_TRACE,;t t
19381 s,@MATH_LIB@,$MATH_LIB,;t t
19382 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19383 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19384 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19385 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19386 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19387 s,@TEST_LIBS@,$TEST_LIBS,;t t
19388 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
19389 s,@CXXCPP@,$CXXCPP,;t t
19390 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19391 s,@CXX_AR@,$CXX_AR,;t t
19392 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19393 s,@CXXLIBS@,$CXXLIBS,;t t
19394 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19395 s,@gnat_exists@,$gnat_exists,;t t
19396 s,@M4_exists@,$M4_exists,;t t
19397 s,@cf_ada_make@,$cf_ada_make,;t t
19398 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19399 s,@cf_ada_package@,$cf_ada_package,;t t
19400 s,@ADAFLAGS@,$ADAFLAGS,;t t
19401 s,@cf_compile_generics@,$cf_compile_generics,;t t
19402 s,@cf_generic_objects@,$cf_generic_objects,;t t
19403 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19404 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19405 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19406 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19407 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19408 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19409 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19410 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19411 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19412 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19413 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19414 s,@TICS_ARGS@,$TICS_ARGS,;t t
19415 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19416 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19417 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19418 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19419 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19420 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19421 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19422 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19423 s,@TICS_LIST@,$TICS_LIST,;t t
19424 s,@TINFO_LIST@,$TINFO_LIST,;t t
19425 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19426 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19427 s,@TEST_ARGS@,$TEST_ARGS,;t t
19428 s,@TEST_DEPS@,$TEST_DEPS,;t t
19429 s,@TEST_ARG2@,$TEST_ARG2,;t t
19430 s,@TEST_DEP2@,$TEST_DEP2,;t t
19431 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19432 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19433 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19434 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19435 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
19436 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19437 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19438 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19439 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19440 s,@cross_compiling@,$cross_compiling,;t t
19441 CEOF
19442
19443 EOF
19444
19445   cat >>$CONFIG_STATUS <<\EOF
19446   # Split the substitutions into bite-sized pieces for seds with
19447   # small command number limits, like on Digital OSF/1 and HP-UX.
19448   ac_max_sed_lines=48
19449   ac_sed_frag=1 # Number of current file.
19450   ac_beg=1 # First line for current file.
19451   ac_end=$ac_max_sed_lines # Line after last line for current file.
19452   ac_more_lines=:
19453   ac_sed_cmds=
19454   while $ac_more_lines; do
19455     if test $ac_beg -gt 1; then
19456       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19457     else
19458       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19459     fi
19460     if test ! -s $tmp/subs.frag; then
19461       ac_more_lines=false
19462     else
19463       # The purpose of the label and of the branching condition is to
19464       # speed up the sed processing (if there are no `@' at all, there
19465       # is no need to browse any of the substitutions).
19466       # These are the two extra sed commands mentioned above.
19467       (echo ':t
19468   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19469       if test -z "$ac_sed_cmds"; then
19470         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19471       else
19472         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19473       fi
19474       ac_sed_frag=`expr $ac_sed_frag + 1`
19475       ac_beg=$ac_end
19476       ac_end=`expr $ac_end + $ac_max_sed_lines`
19477     fi
19478   done
19479   if test -z "$ac_sed_cmds"; then
19480     ac_sed_cmds=cat
19481   fi
19482 fi # test -n "$CONFIG_FILES"
19483
19484 EOF
19485 cat >>$CONFIG_STATUS <<\EOF
19486 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19487   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19488   case $ac_file in
19489   - | *:- | *:-:* ) # input from stdin
19490         cat >$tmp/stdin
19491         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19492         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19493   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19494         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19495   * )   ac_file_in=$ac_file.in ;;
19496   esac
19497
19498   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19499   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19500          X"$ac_file" : 'X\(//\)[^/]' \| \
19501          X"$ac_file" : 'X\(//\)$' \| \
19502          X"$ac_file" : 'X\(/\)' \| \
19503          .     : '\(.\)' 2>/dev/null ||
19504 echo X"$ac_file" |
19505     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19506           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19507           /^X\(\/\/\)$/{ s//\1/; q; }
19508           /^X\(\/\).*/{ s//\1/; q; }
19509           s/.*/./; q'`
19510   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19511     { case "$ac_dir" in
19512   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19513   *)                      as_incr_dir=.;;
19514 esac
19515 as_dummy="$ac_dir"
19516 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19517   case $as_mkdir_dir in
19518     # Skip DOS drivespec
19519     ?:) as_incr_dir=$as_mkdir_dir ;;
19520     *)
19521       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19522       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19523     ;;
19524   esac
19525 done; }
19526
19527     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19528     # A "../" for each directory in $ac_dir_suffix.
19529     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19530   else
19531     ac_dir_suffix= ac_dots=
19532   fi
19533
19534   case $srcdir in
19535   .)  ac_srcdir=.
19536       if test -z "$ac_dots"; then
19537          ac_top_srcdir=.
19538       else
19539          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19540       fi ;;
19541   [\\/]* | ?:[\\/]* )
19542       ac_srcdir=$srcdir$ac_dir_suffix;
19543       ac_top_srcdir=$srcdir ;;
19544   *) # Relative path.
19545     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19546     ac_top_srcdir=$ac_dots$srcdir ;;
19547   esac
19548
19549   case $INSTALL in
19550   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19551   *) ac_INSTALL=$ac_dots$INSTALL ;;
19552   esac
19553
19554   if test x"$ac_file" != x-; then
19555     { echo "$as_me:19555: creating $ac_file" >&5
19556 echo "$as_me: creating $ac_file" >&6;}
19557     rm -f "$ac_file"
19558   fi
19559   # Let's still pretend it is `configure' which instantiates (i.e., don't
19560   # use $as_me), people would be surprised to read:
19561   #    /* config.h.  Generated automatically by config.status.  */
19562   configure_input="Generated automatically from `echo $ac_file_in |
19563                                                  sed 's,.*/,,'` by configure."
19564
19565   # First look for the input files in the build tree, otherwise in the
19566   # src tree.
19567   ac_file_inputs=`IFS=:
19568     for f in $ac_file_in; do
19569       case $f in
19570       -) echo $tmp/stdin ;;
19571       [\\/$]*)
19572          # Absolute (can't be DOS-style, as IFS=:)
19573          test -f "$f" || { { echo "$as_me:19573: error: cannot find input file: $f" >&5
19574 echo "$as_me: error: cannot find input file: $f" >&2;}
19575    { (exit 1); exit 1; }; }
19576          echo $f;;
19577       *) # Relative
19578          if test -f "$f"; then
19579            # Build tree
19580            echo $f
19581          elif test -f "$srcdir/$f"; then
19582            # Source tree
19583            echo $srcdir/$f
19584          else
19585            # /dev/null tree
19586            { { echo "$as_me:19586: error: cannot find input file: $f" >&5
19587 echo "$as_me: error: cannot find input file: $f" >&2;}
19588    { (exit 1); exit 1; }; }
19589          fi;;
19590       esac
19591     done` || { (exit 1); exit 1; }
19592 EOF
19593 cat >>$CONFIG_STATUS <<EOF
19594   sed "$ac_vpsub
19595 $extrasub
19596 EOF
19597 cat >>$CONFIG_STATUS <<\EOF
19598 :t
19599 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19600 s,@configure_input@,$configure_input,;t t
19601 s,@srcdir@,$ac_srcdir,;t t
19602 s,@top_srcdir@,$ac_top_srcdir,;t t
19603 s,@INSTALL@,$ac_INSTALL,;t t
19604 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19605   rm -f $tmp/stdin
19606   if test x"$ac_file" != x-; then
19607     mv $tmp/out $ac_file
19608   else
19609     cat $tmp/out
19610     rm -f $tmp/out
19611   fi
19612
19613 done
19614 EOF
19615 cat >>$CONFIG_STATUS <<\EOF
19616
19617 #
19618 # CONFIG_HEADER section.
19619 #
19620
19621 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19622 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19623 #
19624 # ac_d sets the value in "#define NAME VALUE" lines.
19625 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19626 ac_dB='[        ].*$,\1#\2'
19627 ac_dC=' '
19628 ac_dD=',;t'
19629 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19630 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19631 ac_iB='\([      ]\),\1#\2define\3'
19632 ac_iC=' '
19633 ac_iD='\4,;t'
19634 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19635 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19636 ac_uB='$,\1#\2define\3'
19637 ac_uC=' '
19638 ac_uD=',;t'
19639
19640 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19641   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19642   case $ac_file in
19643   - | *:- | *:-:* ) # input from stdin
19644         cat >$tmp/stdin
19645         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19646         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19647   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19648         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19649   * )   ac_file_in=$ac_file.in ;;
19650   esac
19651
19652   test x"$ac_file" != x- && { echo "$as_me:19652: creating $ac_file" >&5
19653 echo "$as_me: creating $ac_file" >&6;}
19654
19655   # First look for the input files in the build tree, otherwise in the
19656   # src tree.
19657   ac_file_inputs=`IFS=:
19658     for f in $ac_file_in; do
19659       case $f in
19660       -) echo $tmp/stdin ;;
19661       [\\/$]*)
19662          # Absolute (can't be DOS-style, as IFS=:)
19663          test -f "$f" || { { echo "$as_me:19663: error: cannot find input file: $f" >&5
19664 echo "$as_me: error: cannot find input file: $f" >&2;}
19665    { (exit 1); exit 1; }; }
19666          echo $f;;
19667       *) # Relative
19668          if test -f "$f"; then
19669            # Build tree
19670            echo $f
19671          elif test -f "$srcdir/$f"; then
19672            # Source tree
19673            echo $srcdir/$f
19674          else
19675            # /dev/null tree
19676            { { echo "$as_me:19676: error: cannot find input file: $f" >&5
19677 echo "$as_me: error: cannot find input file: $f" >&2;}
19678    { (exit 1); exit 1; }; }
19679          fi;;
19680       esac
19681     done` || { (exit 1); exit 1; }
19682   # Remove the trailing spaces.
19683   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19684
19685 EOF
19686
19687 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19688 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19689 # be either 'cat' or 'sort'.
19690 cat confdefs.h | uniq >conftest.vals
19691
19692 # Break up conftest.vals because some shells have a limit on
19693 # the size of here documents, and old seds have small limits too.
19694
19695 rm -f conftest.tail
19696 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19697 while grep . conftest.vals >/dev/null
19698 do
19699   # Write chunks of a limited-size here document to conftest.frag.
19700   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19701   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19702   echo 'CEOF' >> $CONFIG_STATUS
19703   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19704   rm -f conftest.vals
19705   mv conftest.tail conftest.vals
19706 done
19707 rm -f conftest.vals
19708
19709 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19710 # marker @DEFS@.
19711 echo '  cat >> conftest.edit <<CEOF
19712 /@DEFS@/r conftest.frag
19713 /@DEFS@/d
19714 CEOF
19715 sed -f conftest.edit $tmp/in > $tmp/out
19716 rm -f $tmp/in
19717 mv $tmp/out $tmp/in
19718 rm -f conftest.edit conftest.frag
19719 ' >> $CONFIG_STATUS
19720
19721 cat >>$CONFIG_STATUS <<\EOF
19722   # Let's still pretend it is `configure' which instantiates (i.e., don't
19723   # use $as_me), people would be surprised to read:
19724   #    /* config.h.  Generated automatically by config.status.  */
19725   if test x"$ac_file" = x-; then
19726     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19727   else
19728     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19729   fi
19730   cat $tmp/in >>$tmp/config.h
19731   rm -f $tmp/in
19732   if test x"$ac_file" != x-; then
19733     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19734       { echo "$as_me:19734: $ac_file is unchanged" >&5
19735 echo "$as_me: $ac_file is unchanged" >&6;}
19736     else
19737       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19738          X"$ac_file" : 'X\(//\)[^/]' \| \
19739          X"$ac_file" : 'X\(//\)$' \| \
19740          X"$ac_file" : 'X\(/\)' \| \
19741          .     : '\(.\)' 2>/dev/null ||
19742 echo X"$ac_file" |
19743     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19744           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19745           /^X\(\/\/\)$/{ s//\1/; q; }
19746           /^X\(\/\).*/{ s//\1/; q; }
19747           s/.*/./; q'`
19748       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19749         { case "$ac_dir" in
19750   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19751   *)                      as_incr_dir=.;;
19752 esac
19753 as_dummy="$ac_dir"
19754 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19755   case $as_mkdir_dir in
19756     # Skip DOS drivespec
19757     ?:) as_incr_dir=$as_mkdir_dir ;;
19758     *)
19759       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19760       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19761     ;;
19762   esac
19763 done; }
19764
19765       fi
19766       rm -f $ac_file
19767       mv $tmp/config.h $ac_file
19768     fi
19769   else
19770     cat $tmp/config.h
19771     rm -f $tmp/config.h
19772   fi
19773 done
19774 EOF
19775 cat >>$CONFIG_STATUS <<\EOF
19776
19777 #
19778 # CONFIG_COMMANDS section.
19779 #
19780 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19781   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19782   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19783
19784   case $ac_dest in
19785     default )
19786
19787 for cf_dir in test
19788 do
19789         if test ! -d $srcdir/$cf_dir; then
19790                 continue
19791         elif test -f $srcdir/$cf_dir/programs; then
19792                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19793         fi
19794 done
19795
19796         case $cf_cv_system_name in #(vi
19797         OS/2*|os2*) #(vi
19798         LIB_PREFIX=''
19799         ;;
19800         *)      LIB_PREFIX='lib'
19801         ;;
19802         esac
19803 cf_prefix=$LIB_PREFIX
19804
19805 if test $cf_cv_shlib_version = cygdll ; then
19806         TINFO_NAME=$TINFO_ARG_SUFFIX
19807         TINFO_SUFFIX=.dll
19808 fi
19809
19810 for cf_dir in $SRC_SUBDIRS
19811 do
19812         if test ! -d $srcdir/$cf_dir ; then
19813                 continue
19814         elif test -f $srcdir/$cf_dir/modules; then
19815
19816                 SHARED_LIB=
19817                 LIBS_TO_MAKE=
19818                 for cf_item in $cf_LIST_MODELS
19819                 do
19820
19821         case $cf_item in #(vi
19822         libtool) #(vi
19823                 cf_suffix='.la'
19824                 cf_depsuf=$cf_suffix
19825                 ;;
19826         normal) #(vi
19827                 cf_suffix='.a'
19828                 cf_depsuf=$cf_suffix
19829                 ;;
19830         debug) #(vi
19831                 cf_suffix='_g.a'
19832                 cf_depsuf=$cf_suffix
19833                 ;;
19834         profile) #(vi
19835                 cf_suffix='_p.a'
19836                 cf_depsuf=$cf_suffix
19837                 ;;
19838         shared) #(vi
19839                 case $cf_cv_system_name in
19840                 aix[56]*) #(vi
19841                         cf_suffix='.a'
19842                         cf_depsuf=$cf_suffix
19843                         ;;
19844                 cygwin*) #(vi
19845                         cf_suffix='.dll'
19846                         cf_depsuf='.dll.a'
19847                         ;;
19848                 darwin*) #(vi
19849                         cf_suffix='.dylib'
19850                         cf_depsuf=$cf_suffix
19851                         ;;
19852                 hpux*) #(vi
19853                         case $target in
19854                         ia64*) #(vi
19855                                 cf_suffix='.so'
19856                                 cf_depsuf=$cf_suffix
19857                                 ;;
19858                         *) #(vi
19859                                 cf_suffix='.sl'
19860                                 cf_depsuf=$cf_suffix
19861                                 ;;
19862                         esac
19863                         ;;
19864                 *)      cf_suffix='.so'
19865                         cf_depsuf=$cf_suffix
19866                         ;;
19867                 esac
19868         esac
19869         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19870         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19871
19872                         if test $cf_item = shared ; then
19873                         if test "$cf_cv_do_symlinks" = yes ; then
19874                                 case "$cf_cv_shlib_version" in #(vi
19875                                 rel) #(vi
19876                                         case "$cf_cv_system_name" in #(vi
19877                                         darwin*)
19878                                         case .${LIB_SUFFIX} in
19879                                         .w*)
19880                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19881                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19882                                                 ;;
19883                                         *)
19884                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19885                                                 ;;
19886                                         esac
19887                                         ;; #(vi
19888                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19889                                         esac
19890                                         ;;
19891                                 abi)
19892                                         case "$cf_cv_system_name" in #(vi
19893                                         darwin*)
19894                                         case .${LIB_SUFFIX} in
19895                                         .w*)
19896                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19897                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19898                                                 ;;
19899                                         *)
19900                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19901                                                 ;;
19902                                         esac
19903                                         ;; #(vi
19904                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19905                                         esac
19906                                         ;;
19907                                 esac
19908                         fi
19909                         # cygwin needs import library, and has unique naming convention
19910                         # use autodetected ${cf_prefix} for import lib and static lib, but
19911                         # use 'cyg' prefix for shared lib.
19912                         if test $cf_cv_shlib_version = cygdll ; then
19913                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19914                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19915                                 continue
19916                         fi
19917                         fi
19918                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19919                 done
19920
19921                 if test $cf_dir = ncurses ; then
19922                         cf_subsets="$LIB_SUBSETS"
19923                         cf_r_parts="$cf_subsets"
19924                         cf_liblist="$LIBS_TO_MAKE"
19925
19926                         while test -n "$cf_r_parts"
19927                         do
19928                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19929                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19930                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19931                                         cf_item=
19932                                         case $cf_l_parts in #(vi
19933                                         *termlib*) #(vi
19934                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19935                                                 ;;
19936                                         *ticlib*)
19937                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19938                                                 ;;
19939                                         *)
19940                                                 break
19941                                                 ;;
19942                                         esac
19943                                         if test -n "$cf_item"; then
19944                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19945                                         fi
19946                                 else
19947                                         break
19948                                 fi
19949                         done
19950                 else
19951                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19952                 fi
19953
19954                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19955                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19956                         $cf_dir/Makefile >$cf_dir/Makefile.out
19957                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19958
19959                 $AWK -f $srcdir/mk-0th.awk \
19960                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19961                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19962
19963                 for cf_subset in $cf_subsets
19964                 do
19965                         cf_subdirs=
19966                         for cf_item in $cf_LIST_MODELS
19967                         do
19968                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19969
19970 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19971
19972         case $cf_item in #(vi
19973         libtool) #(vi
19974                 cf_suffix='.la'
19975                 cf_depsuf=$cf_suffix
19976                 ;;
19977         normal) #(vi
19978                 cf_suffix='.a'
19979                 cf_depsuf=$cf_suffix
19980                 ;;
19981         debug) #(vi
19982                 cf_suffix='_g.a'
19983                 cf_depsuf=$cf_suffix
19984                 ;;
19985         profile) #(vi
19986                 cf_suffix='_p.a'
19987                 cf_depsuf=$cf_suffix
19988                 ;;
19989         shared) #(vi
19990                 case $cf_cv_system_name in
19991                 aix[56]*) #(vi
19992                         cf_suffix='.a'
19993                         cf_depsuf=$cf_suffix
19994                         ;;
19995                 cygwin*) #(vi
19996                         cf_suffix='.dll'
19997                         cf_depsuf='.dll.a'
19998                         ;;
19999                 darwin*) #(vi
20000                         cf_suffix='.dylib'
20001                         cf_depsuf=$cf_suffix
20002                         ;;
20003                 hpux*) #(vi
20004                         case $target in
20005                         ia64*) #(vi
20006                                 cf_suffix='.so'
20007                                 cf_depsuf=$cf_suffix
20008                                 ;;
20009                         *) #(vi
20010                                 cf_suffix='.sl'
20011                                 cf_depsuf=$cf_suffix
20012                                 ;;
20013                         esac
20014                         ;;
20015                 *)      cf_suffix='.so'
20016                         cf_depsuf=$cf_suffix
20017                         ;;
20018                 esac
20019         esac
20020         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20021         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20022
20023         case $cf_item in
20024         libtool) cf_subdir='obj_lo'  ;;
20025         normal)  cf_subdir='objects' ;;
20026         debug)   cf_subdir='obj_g' ;;
20027         profile) cf_subdir='obj_p' ;;
20028         shared)
20029                 case $cf_cv_system_name in #(vi
20030                 cygwin) #(vi
20031                         cf_subdir='objects' ;;
20032                 *)
20033                         cf_subdir='obj_s' ;;
20034                 esac
20035         esac
20036
20037                         # Test for case where we build libtinfo with a different name.
20038                         cf_libname=$cf_dir
20039                         if test $cf_dir = ncurses ; then
20040                                 case $cf_subset in
20041                                 *base*)
20042                                         cf_libname=${cf_libname}$LIB_SUFFIX
20043                                         ;;
20044                                 *termlib*)
20045                                         cf_libname=$TINFO_LIB_SUFFIX
20046                                         ;;
20047                                 ticlib*)
20048                                         cf_libname=$TICS_LIB_SUFFIX
20049                                         ;;
20050                                 esac
20051                         else
20052                                 cf_libname=${cf_libname}$LIB_SUFFIX
20053                         fi
20054                         if test -n "${DFT_ARG_SUFFIX}" ; then
20055                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20056                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20057                         fi
20058
20059                         # These dependencies really are for development, not
20060                         # builds, but they are useful in porting, too.
20061                         cf_depend="../include/ncurses_cfg.h"
20062                         if test "$srcdir" = "."; then
20063                                 cf_reldir="."
20064                         else
20065                                 cf_reldir="\${srcdir}"
20066                         fi
20067
20068                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20069                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20070                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20071                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20072                         fi
20073
20074                         cf_dir_suffix=
20075                         old_cf_suffix="$cf_suffix"
20076                         if test "$cf_cv_shlib_version_infix" = yes ; then
20077                         if test -n "$LIB_SUFFIX" ; then
20078                                 case $LIB_SUFFIX in
20079                                 w*)
20080                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20081                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20082                                         cf_dir_suffix=w
20083                                         ;;
20084                                 esac
20085                         fi
20086                         fi
20087
20088                         $AWK -f $srcdir/mk-1st.awk \
20089                                 name=${cf_libname}${cf_dir_suffix} \
20090                                 traces=$LIB_TRACING \
20091                                 MODEL=$cf_ITEM \
20092                                 model=$cf_subdir \
20093                                 prefix=$cf_prefix \
20094                                 suffix=$cf_suffix \
20095                                 subset=$cf_subset \
20096                                 TermlibRoot=$TINFO_NAME \
20097                                 TermlibSuffix=$TINFO_SUFFIX \
20098                                 ShlibVer=$cf_cv_shlib_version \
20099                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
20100                                 ReLink=${cf_cv_do_relink-no} \
20101                                 DoLinks=$cf_cv_do_symlinks \
20102                                 rmSoLocs=$cf_cv_rm_so_locs \
20103                                 ldconfig="$LDCONFIG" \
20104                                 overwrite=$WITH_OVERWRITE \
20105                                 depend="$cf_depend" \
20106                                 host="$host" \
20107                                 libtool_version="$LIBTOOL_VERSION" \
20108                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20109
20110                         cf_suffix="$old_cf_suffix"
20111
20112                         for cf_subdir2 in $cf_subdirs lib
20113                         do
20114                                 test $cf_subdir = $cf_subdir2 && break
20115                         done
20116                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
20117                         $AWK -f $srcdir/mk-2nd.awk \
20118                                 name=$cf_dir \
20119                                 traces=$LIB_TRACING \
20120                                 MODEL=$cf_ITEM \
20121                                 model=$cf_subdir \
20122                                 subset=$cf_subset \
20123                                 srcdir=$srcdir \
20124                                 echo=$WITH_ECHO \
20125                                 crenames=$cf_cv_prog_CC_c_o \
20126                                 cxxrenames=$cf_cv_prog_CXX_c_o \
20127                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20128                         cf_subdirs="$cf_subdirs $cf_subdir"
20129                         done
20130                 done
20131         fi
20132
20133         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
20134 done
20135
20136 for cf_dir in $SRC_SUBDIRS
20137 do
20138         if test ! -d $srcdir/$cf_dir ; then
20139                 continue
20140         fi
20141
20142         if test -f $cf_dir/Makefile ; then
20143                 case "$cf_dir" in
20144                 Ada95) #(vi
20145                         echo 'libs \' >> Makefile
20146                         echo 'install.libs \' >> Makefile
20147                         echo 'uninstall.libs ::' >> Makefile
20148                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
20149                         ;;
20150                 esac
20151         fi
20152
20153         if test -f $srcdir/$cf_dir/modules; then
20154                 echo >> Makefile
20155                 if test -f $srcdir/$cf_dir/headers; then
20156 cat >> Makefile <<CF_EOF
20157 install.includes \\
20158 uninstall.includes \\
20159 CF_EOF
20160                 fi
20161 if test "$cf_dir" != "c++" ; then
20162 echo 'lint \' >> Makefile
20163 fi
20164 cat >> Makefile <<CF_EOF
20165 libs \\
20166 lintlib \\
20167 install.libs \\
20168 uninstall.libs \\
20169 install.$cf_dir \\
20170 uninstall.$cf_dir ::
20171         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20172 CF_EOF
20173         elif test -f $srcdir/$cf_dir/headers; then
20174 cat >> Makefile <<CF_EOF
20175
20176 libs \\
20177 install.libs \\
20178 uninstall.libs \\
20179 install.includes \\
20180 uninstall.includes ::
20181         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
20182 CF_EOF
20183 fi
20184 done
20185
20186 cat >> Makefile <<CF_EOF
20187
20188 install.libs uninstall.libs \\
20189 install.data uninstall.data ::
20190 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
20191 CF_EOF
20192
20193 if test "x$cf_with_manpages" = xyes; then
20194 cat >> Makefile <<CF_EOF
20195
20196 install.man \\
20197 uninstall.man ::
20198         cd man && \${MAKE} \${CF_MFLAGS} \$@
20199 CF_EOF
20200 fi
20201
20202 cat >> Makefile <<CF_EOF
20203
20204 distclean ::
20205         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
20206         rm -f headers.sh headers.sed mk_shared_lib.sh
20207         rm -f edit_man.* man_alias.*
20208         rm -rf \${DIRS_TO_MAKE}
20209 CF_EOF
20210
20211 # Special case: tack's manpage lives in its own directory.
20212 if test "x$cf_with_manpages" = xyes; then
20213 if test -d tack ; then
20214 if test -f $srcdir/$tack.h; then
20215 cat >> Makefile <<CF_EOF
20216
20217 install.man \\
20218 uninstall.man ::
20219         cd tack && \${MAKE} \${CF_MFLAGS} \$@
20220 CF_EOF
20221 fi
20222 fi
20223 fi
20224
20225 rm -f headers.sed headers.sh
20226
20227 echo creating headers.sh
20228 cat >headers.sh <<CF_EOF
20229 #! /bin/sh
20230 # This shell script is generated by the 'configure' script.  It is invoked in a
20231 # subdirectory of the build tree.  It generates a sed-script in the parent
20232 # directory that is used to adjust includes for header files that reside in a
20233 # subdirectory of /usr/include, etc.
20234 PRG=""
20235 while test \$# != 3
20236 do
20237 PRG="\$PRG \$1"; shift
20238 done
20239 DST=\$1
20240 REF=\$2
20241 SRC=\$3
20242 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20243 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20244 echo installing \$SRC in \$DST
20245 CF_EOF
20246
20247 if test $WITH_CURSES_H = yes; then
20248         cat >>headers.sh <<CF_EOF
20249 case \$DST in
20250 /*/include/*)
20251         END=\`basename \$DST\`
20252         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20253         do
20254                 NAME=\`basename \$i\`
20255                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20256         done
20257         ;;
20258 *)
20259         echo "" >> \$TMPSED
20260         ;;
20261 esac
20262 CF_EOF
20263
20264 else
20265         cat >>headers.sh <<CF_EOF
20266 case \$DST in
20267 /*/include/*)
20268         END=\`basename \$DST\`
20269         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20270         do
20271                 NAME=\`basename \$i\`
20272                 if test "\$NAME" = "curses.h"
20273                 then
20274                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20275                         NAME=ncurses.h
20276                 fi
20277                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20278         done
20279         ;;
20280 *)
20281         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20282         ;;
20283 esac
20284 CF_EOF
20285 fi
20286 cat >>headers.sh <<CF_EOF
20287 rm -f \$TMPSRC
20288 sed -f \$TMPSED \$SRC > \$TMPSRC
20289 NAME=\`basename \$SRC\`
20290 CF_EOF
20291 if test $WITH_CURSES_H != yes; then
20292         cat >>headers.sh <<CF_EOF
20293 test "\$NAME" = "curses.h" && NAME=ncurses.h
20294 CF_EOF
20295 fi
20296 cat >>headers.sh <<CF_EOF
20297 # Just in case someone gzip'd manpages, remove the conflicting copy.
20298 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20299
20300 eval \$PRG \$TMPSRC \$DST/\$NAME
20301 rm -f \$TMPSRC \$TMPSED
20302 CF_EOF
20303
20304 chmod 0755 headers.sh
20305
20306 for cf_dir in $SRC_SUBDIRS
20307 do
20308         if test ! -d $srcdir/$cf_dir ; then
20309                 continue
20310         fi
20311
20312         if test -f $srcdir/$cf_dir/headers; then
20313                 $AWK -f $srcdir/mk-hdr.awk \
20314                         subset="$LIB_SUBSETS" \
20315                         compat="$WITH_CURSES_H" \
20316                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20317         fi
20318
20319         if test -f $srcdir/$cf_dir/modules; then
20320                 if test "$cf_dir" != "c++" ; then
20321                         cat >>$cf_dir/Makefile <<"CF_EOF"
20322 depend : ${AUTO_SRC}
20323         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20324
20325 # DO NOT DELETE THIS LINE -- make depend depends on it.
20326 CF_EOF
20327                 fi
20328         fi
20329 done
20330
20331  ;;
20332   esac
20333 done
20334 EOF
20335
20336 cat >>$CONFIG_STATUS <<\EOF
20337
20338 { (exit 0); exit 0; }
20339 EOF
20340 chmod +x $CONFIG_STATUS
20341 ac_clean_files=$ac_clean_files_save
20342
20343 # configure is writing to config.log, and then calls config.status.
20344 # config.status does its own redirection, appending to config.log.
20345 # Unfortunately, on DOS this fails, as config.log is still kept open
20346 # by configure, so config.status won't be able to write to it; its
20347 # output is simply discarded.  So we exec the FD to /dev/null,
20348 # effectively closing config.log, so it can be properly (re)opened and
20349 # appended to by config.status.  When coming back to configure, we
20350 # need to make the FD available again.
20351 if test "$no_create" != yes; then
20352   ac_cs_success=:
20353   exec 5>/dev/null
20354   $SHELL $CONFIG_STATUS || ac_cs_success=false
20355   exec 5>>config.log
20356   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20357   # would make configure fail if this is the last instruction.
20358   $ac_cs_success || { (exit 1); exit 1; }
20359 fi
20360 ${MAKE-make} preinstall