]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20091128
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.479 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809
810 Some influential environment variables:
811   CC          C compiler command
812   CFLAGS      C compiler flags
813   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
814               nonstandard directory <lib dir>
815   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
816               headers in a nonstandard directory <include dir>
817   CPP         C preprocessor
818   CXX         C++ compiler command
819   CXXFLAGS    C++ compiler flags
820   CXXCPP      C++ preprocessor
821
822 Use these variables to override the choices made by `configure' or to help
823 it to find libraries and programs with nonstandard names/locations.
824
825 EOF
826 fi
827
828 if test "$ac_init_help" = "recursive"; then
829   # If there are subdirs, report their specific --help.
830   ac_popdir=`pwd`
831   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
832     cd $ac_subdir
833     # A "../" for each directory in /$ac_subdir.
834     ac_dots=`echo $ac_subdir |
835              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
836
837     case $srcdir in
838     .) # No --srcdir option.  We are building in place.
839       ac_sub_srcdir=$srcdir ;;
840     [\\/]* | ?:[\\/]* ) # Absolute path.
841       ac_sub_srcdir=$srcdir/$ac_subdir ;;
842     *) # Relative path.
843       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
844     esac
845
846     # Check for guested configure; otherwise get Cygnus style configure.
847     if test -f $ac_sub_srcdir/configure.gnu; then
848       echo
849       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
850     elif test -f $ac_sub_srcdir/configure; then
851       echo
852       $SHELL $ac_sub_srcdir/configure  --help=recursive
853     elif test -f $ac_sub_srcdir/configure.ac ||
854            test -f $ac_sub_srcdir/configure.in; then
855       echo
856       $ac_configure --help
857     else
858       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
859     fi
860     cd $ac_popdir
861   done
862 fi
863
864 test -n "$ac_init_help" && exit 0
865 if $ac_init_version; then
866   cat <<\EOF
867
868 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
869 Free Software Foundation, Inc.
870 This configure script is free software; the Free Software Foundation
871 gives unlimited permission to copy, distribute and modify it.
872 EOF
873   exit 0
874 fi
875 exec 5>config.log
876 cat >&5 <<EOF
877 This file contains any messages produced by compilers while
878 running configure, to aid debugging if configure makes a mistake.
879
880 It was created by $as_me, which was
881 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
882
883   $ $0 $@
884
885 EOF
886 {
887 cat <<_ASUNAME
888 ## ---------- ##
889 ## Platform.  ##
890 ## ---------- ##
891
892 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
893 uname -m = `(uname -m) 2>/dev/null || echo unknown`
894 uname -r = `(uname -r) 2>/dev/null || echo unknown`
895 uname -s = `(uname -s) 2>/dev/null || echo unknown`
896 uname -v = `(uname -v) 2>/dev/null || echo unknown`
897
898 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
899 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
900
901 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
902 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
903 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
904 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
905 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
906 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
907 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
908
909 PATH = $PATH
910
911 _ASUNAME
912 } >&5
913
914 cat >&5 <<EOF
915 ## ------------ ##
916 ## Core tests.  ##
917 ## ------------ ##
918
919 EOF
920
921 # Keep a trace of the command line.
922 # Strip out --no-create and --no-recursion so they do not pile up.
923 # Also quote any args containing shell meta-characters.
924 ac_configure_args=
925 ac_sep=
926 for ac_arg
927 do
928   case $ac_arg in
929   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
930   | --no-cr | --no-c) ;;
931   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
932   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
933   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
935     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
936     ac_sep=" " ;;
937   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
938      ac_sep=" " ;;
939   esac
940   # Get rid of the leading space.
941 done
942
943 # When interrupted or exit'd, cleanup temporary files, and complete
944 # config.log.  We remove comments because anyway the quotes in there
945 # would cause problems or look ugly.
946 trap 'exit_status=$?
947   # Save into config.log some information that might help in debugging.
948   echo >&5
949   echo "## ----------------- ##" >&5
950   echo "## Cache variables.  ##" >&5
951   echo "## ----------------- ##" >&5
952   echo >&5
953   # The following way of writing the cache mishandles newlines in values,
954 {
955   (set) 2>&1 |
956     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
957     *ac_space=\ *)
958       sed -n \
959         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
960           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
961       ;;
962     *)
963       sed -n \
964         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
965       ;;
966     esac;
967 } >&5
968   sed "/^$/d" confdefs.h >conftest.log
969   if test -s conftest.log; then
970     echo >&5
971     echo "## ------------ ##" >&5
972     echo "## confdefs.h.  ##" >&5
973     echo "## ------------ ##" >&5
974     echo >&5
975     cat conftest.log >&5
976   fi
977   (echo; echo) >&5
978   test "$ac_signal" != 0 &&
979     echo "$as_me: caught signal $ac_signal" >&5
980   echo "$as_me: exit $exit_status" >&5
981   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
982     exit $exit_status
983      ' 0
984 for ac_signal in 1 2 13 15; do
985   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
986 done
987 ac_signal=0
988
989 # confdefs.h avoids OS command line length limits that DEFS can exceed.
990 rm -rf conftest* confdefs.h
991 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
992 echo >confdefs.h
993
994 # Let the site file select an alternate cache file if it wants to.
995 # Prefer explicitly selected file to automatically selected ones.
996 if test -z "$CONFIG_SITE"; then
997   if test "x$prefix" != xNONE; then
998     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
999   else
1000     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1001   fi
1002 fi
1003 for ac_site_file in $CONFIG_SITE; do
1004   if test -r "$ac_site_file"; then
1005     { echo "$as_me:1005: loading site script $ac_site_file" >&5
1006 echo "$as_me: loading site script $ac_site_file" >&6;}
1007     cat "$ac_site_file" >&5
1008     . "$ac_site_file"
1009   fi
1010 done
1011
1012 if test -r "$cache_file"; then
1013   # Some versions of bash will fail to source /dev/null (special
1014   # files actually), so we avoid doing that.
1015   if test -f "$cache_file"; then
1016     { echo "$as_me:1016: loading cache $cache_file" >&5
1017 echo "$as_me: loading cache $cache_file" >&6;}
1018     case $cache_file in
1019       [\\/]* | ?:[\\/]* ) . $cache_file;;
1020       *)                      . ./$cache_file;;
1021     esac
1022   fi
1023 else
1024   { echo "$as_me:1024: creating cache $cache_file" >&5
1025 echo "$as_me: creating cache $cache_file" >&6;}
1026   >$cache_file
1027 fi
1028
1029 # Check that the precious variables saved in the cache have kept the same
1030 # value.
1031 ac_cache_corrupted=false
1032 for ac_var in `(set) 2>&1 |
1033                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1034   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1035   eval ac_new_set=\$ac_env_${ac_var}_set
1036   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1037   eval ac_new_val="\$ac_env_${ac_var}_value"
1038   case $ac_old_set,$ac_new_set in
1039     set,)
1040       { echo "$as_me:1040: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1041 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1042       ac_cache_corrupted=: ;;
1043     ,set)
1044       { echo "$as_me:1044: error: \`$ac_var' was not set in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,);;
1048     *)
1049       if test "x$ac_old_val" != "x$ac_new_val"; then
1050         { echo "$as_me:1050: error: \`$ac_var' has changed since the previous run:" >&5
1051 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1052         { echo "$as_me:1052:   former value:  $ac_old_val" >&5
1053 echo "$as_me:   former value:  $ac_old_val" >&2;}
1054         { echo "$as_me:1054:   current value: $ac_new_val" >&5
1055 echo "$as_me:   current value: $ac_new_val" >&2;}
1056         ac_cache_corrupted=:
1057       fi;;
1058   esac
1059   # Pass precious variables to config.status.  It doesn't matter if
1060   # we pass some twice (in addition to the command line arguments).
1061   if test "$ac_new_set" = set; then
1062     case $ac_new_val in
1063     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1065       ac_configure_args="$ac_configure_args '$ac_arg'"
1066       ;;
1067     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1068        ;;
1069     esac
1070   fi
1071 done
1072 if $ac_cache_corrupted; then
1073   { echo "$as_me:1073: error: changes in the environment can compromise the build" >&5
1074 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1075   { { echo "$as_me:1075: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1076 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1077    { (exit 1); exit 1; }; }
1078 fi
1079
1080 ac_ext=c
1081 ac_cpp='$CPP $CPPFLAGS'
1082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1085 ac_main_return=return
1086
1087 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1088   *c*,-n*) ECHO_N= ECHO_C='
1089 ' ECHO_T='      ' ;;
1090   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1091   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1092 esac
1093 echo "#! $SHELL" >conftest.sh
1094 echo  "exit 0"   >>conftest.sh
1095 chmod +x conftest.sh
1096 if { (echo "$as_me:1096: PATH=\".;.\"; conftest.sh") >&5
1097   (PATH=".;."; conftest.sh) 2>&5
1098   ac_status=$?
1099   echo "$as_me:1099: \$? = $ac_status" >&5
1100   (exit $ac_status); }; then
1101   ac_path_separator=';'
1102 else
1103   ac_path_separator=:
1104 fi
1105 PATH_SEPARATOR="$ac_path_separator"
1106 rm -f conftest.sh
1107
1108 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1109
1110 top_builddir=`pwd`
1111
1112 echo "$as_me:1112: checking for egrep" >&5
1113 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1114 if test "${ac_cv_prog_egrep+set}" = set; then
1115   echo $ECHO_N "(cached) $ECHO_C" >&6
1116 else
1117   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1118     then ac_cv_prog_egrep='grep -E'
1119     else ac_cv_prog_egrep='egrep'
1120     fi
1121 fi
1122 echo "$as_me:1122: result: $ac_cv_prog_egrep" >&5
1123 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1124  EGREP=$ac_cv_prog_egrep
1125
1126 test -z "$EGREP" && { { echo "$as_me:1126: error: No egrep program found" >&5
1127 echo "$as_me: error: No egrep program found" >&2;}
1128    { (exit 1); exit 1; }; }
1129
1130 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 cf_cv_abi_version=${NCURSES_MAJOR}
1134 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1135 cf_cv_timestamp=`date`
1136 echo "$as_me:1136: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1137 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1138
1139 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1140
1141 # Check whether --with-rel-version or --without-rel-version was given.
1142 if test "${with_rel_version+set}" = set; then
1143   withval="$with_rel_version"
1144   { echo "$as_me:1144: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1145 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1146  cf_cv_rel_version=$withval
1147 fi;
1148
1149  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1150  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1151
1152 if test -n "$NCURSES_MAJOR" ; then
1153   case $NCURSES_MAJOR in #(vi
1154   [0-9]*) #(vi
1155         ;;
1156   *)
1157         { { echo "$as_me:1157: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1158 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1159    { (exit 1); exit 1; }; }
1160         ;;
1161   esac
1162 else
1163   { { echo "$as_me:1163: error: Release major-version value is empty" >&5
1164 echo "$as_me: error: Release major-version value is empty" >&2;}
1165    { (exit 1); exit 1; }; }
1166 fi
1167
1168 if test -n "$NCURSES_MINOR" ; then
1169   case $NCURSES_MINOR in #(vi
1170   [0-9]*) #(vi
1171         ;;
1172   *)
1173         { { echo "$as_me:1173: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1174 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1175    { (exit 1); exit 1; }; }
1176         ;;
1177   esac
1178 else
1179   { { echo "$as_me:1179: error: Release minor-version value is empty" >&5
1180 echo "$as_me: error: Release minor-version value is empty" >&2;}
1181    { (exit 1); exit 1; }; }
1182 fi
1183
1184 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1185
1186 # Check whether --with-abi-version or --without-abi-version was given.
1187 if test "${with_abi_version+set}" = set; then
1188   withval="$with_abi_version"
1189   { echo "$as_me:1189: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1190 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1191  cf_cv_abi_version=$withval
1192 fi;
1193
1194 if test -n "$cf_cv_abi_version" ; then
1195   case $cf_cv_abi_version in #(vi
1196   [0-9]*) #(vi
1197         ;;
1198   *)
1199         { { echo "$as_me:1199: error: ABI version is not a number: $cf_cv_abi_version" >&5
1200 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1201    { (exit 1); exit 1; }; }
1202         ;;
1203   esac
1204 else
1205   { { echo "$as_me:1205: error: ABI version value is empty" >&5
1206 echo "$as_me: error: ABI version value is empty" >&2;}
1207    { (exit 1); exit 1; }; }
1208 fi
1209
1210 ac_aux_dir=
1211 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1212   if test -f $ac_dir/install-sh; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/install-sh -c"
1215     break
1216   elif test -f $ac_dir/install.sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install.sh -c"
1219     break
1220   elif test -f $ac_dir/shtool; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/shtool install -c"
1223     break
1224   fi
1225 done
1226 if test -z "$ac_aux_dir"; then
1227   { { echo "$as_me:1227: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1228 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1229    { (exit 1); exit 1; }; }
1230 fi
1231 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1232 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1233 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1234
1235 # Make sure we can run config.sub.
1236 $ac_config_sub sun4 >/dev/null 2>&1 ||
1237   { { echo "$as_me:1237: error: cannot run $ac_config_sub" >&5
1238 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1239    { (exit 1); exit 1; }; }
1240
1241 echo "$as_me:1241: checking build system type" >&5
1242 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1243 if test "${ac_cv_build+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   ac_cv_build_alias=$build_alias
1247 test -z "$ac_cv_build_alias" &&
1248   ac_cv_build_alias=`$ac_config_guess`
1249 test -z "$ac_cv_build_alias" &&
1250   { { echo "$as_me:1250: error: cannot guess build type; you must specify one" >&5
1251 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1252    { (exit 1); exit 1; }; }
1253 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1254   { { echo "$as_me:1254: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1255 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1256    { (exit 1); exit 1; }; }
1257
1258 fi
1259 echo "$as_me:1259: result: $ac_cv_build" >&5
1260 echo "${ECHO_T}$ac_cv_build" >&6
1261 build=$ac_cv_build
1262 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1263 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1264 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1265
1266 echo "$as_me:1266: checking host system type" >&5
1267 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1268 if test "${ac_cv_host+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   ac_cv_host_alias=$host_alias
1272 test -z "$ac_cv_host_alias" &&
1273   ac_cv_host_alias=$ac_cv_build_alias
1274 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_host" >&5
1281 echo "${ECHO_T}$ac_cv_host" >&6
1282 host=$ac_cv_host
1283 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1288         echo "$as_me:1288: checking target system type" >&5
1289 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1290 if test "${ac_cv_target+set}" = set; then
1291   echo $ECHO_N "(cached) $ECHO_C" >&6
1292 else
1293   ac_cv_target_alias=$target_alias
1294 test "x$ac_cv_target_alias" = "x" &&
1295   ac_cv_target_alias=$ac_cv_host_alias
1296 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1297   { { echo "$as_me:1297: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1298 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1299    { (exit 1); exit 1; }; }
1300
1301 fi
1302 echo "$as_me:1302: result: $ac_cv_target" >&5
1303 echo "${ECHO_T}$ac_cv_target" >&6
1304 target=$ac_cv_target
1305 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1306 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1307 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1308
1309 # The aliases save the names the user supplied, while $host etc.
1310 # will get canonicalized.
1311 test -n "$target_alias" &&
1312   test "$program_prefix$program_suffix$program_transform_name" = \
1313     NONENONEs,x,x, &&
1314   program_prefix=${target_alias}-
1315         system_name="$host_os"
1316 else
1317         system_name="`(uname -s -r) 2>/dev/null`"
1318         if test -z "$system_name" ; then
1319                 system_name="`(hostname) 2>/dev/null`"
1320         fi
1321 fi
1322 test -n "$system_name" && cat >>confdefs.h <<EOF
1323 #define SYSTEM_NAME "$system_name"
1324 EOF
1325
1326 if test "${cf_cv_system_name+set}" = set; then
1327   echo $ECHO_N "(cached) $ECHO_C" >&6
1328 else
1329   cf_cv_system_name="$system_name"
1330 fi
1331
1332 test -z "$system_name" && system_name="$cf_cv_system_name"
1333 test -n "$cf_cv_system_name" && echo "$as_me:1333: result: Configuring for $cf_cv_system_name" >&5
1334 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1335
1336 if test ".$system_name" != ".$cf_cv_system_name" ; then
1337         echo "$as_me:1337: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1338 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1339         { { echo "$as_me:1339: error: \"Please remove config.cache and try again.\"" >&5
1340 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 # Check whether --with-system-type or --without-system-type was given.
1345 if test "${with_system_type+set}" = set; then
1346   withval="$with_system_type"
1347   { echo "$as_me:1347: WARNING: overriding system type to $withval" >&5
1348 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1349  cf_cv_system_name=$withval
1350 fi;
1351
1352 ###     Save the given $CFLAGS to allow user-override.
1353 cf_user_CFLAGS="$CFLAGS"
1354
1355 ###     Default install-location
1356
1357 echo "$as_me:1357: checking for prefix" >&5
1358 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1359 if test "x$prefix" = "xNONE" ; then
1360         case "$cf_cv_system_name" in
1361                 # non-vendor systems don't have a conflict
1362         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1363                 prefix=/usr
1364                 ;;
1365         *)      prefix=$ac_default_prefix
1366                 ;;
1367         esac
1368 fi
1369 echo "$as_me:1369: result: $prefix" >&5
1370 echo "${ECHO_T}$prefix" >&6
1371
1372 if test "x$prefix" = "xNONE" ; then
1373 echo "$as_me:1373: checking for default include-directory" >&5
1374 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1375 test -n "$verbose" && echo 1>&6
1376 for cf_symbol in \
1377         $includedir \
1378         $includedir/ncurses \
1379         $prefix/include \
1380         $prefix/include/ncurses \
1381         /usr/local/include \
1382         /usr/local/include/ncurses \
1383         /usr/include \
1384         /usr/include/ncurses
1385 do
1386         cf_dir=`eval echo $cf_symbol`
1387         if test -f $cf_dir/curses.h ; then
1388         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1389                 includedir="$cf_symbol"
1390                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1391                 break
1392         fi
1393         fi
1394         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1395 done
1396 echo "$as_me:1396: result: $includedir" >&5
1397 echo "${ECHO_T}$includedir" >&6
1398 fi
1399
1400 ###     Checks for programs.
1401 ac_ext=c
1402 ac_cpp='$CPP $CPPFLAGS'
1403 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1404 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1405 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1406 ac_main_return=return
1407 if test -n "$ac_tool_prefix"; then
1408   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1409 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1410 echo "$as_me:1410: checking for $ac_word" >&5
1411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1412 if test "${ac_cv_prog_CC+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   if test -n "$CC"; then
1416   ac_cv_prog_CC="$CC" # Let the user override the test.
1417 else
1418   ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421   IFS=$ac_save_IFS
1422   test -z "$ac_dir" && ac_dir=.
1423   $as_executable_p "$ac_dir/$ac_word" || continue
1424 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1425 echo "$as_me:1425: found $ac_dir/$ac_word" >&5
1426 break
1427 done
1428
1429 fi
1430 fi
1431 CC=$ac_cv_prog_CC
1432 if test -n "$CC"; then
1433   echo "$as_me:1433: result: $CC" >&5
1434 echo "${ECHO_T}$CC" >&6
1435 else
1436   echo "$as_me:1436: result: no" >&5
1437 echo "${ECHO_T}no" >&6
1438 fi
1439
1440 fi
1441 if test -z "$ac_cv_prog_CC"; then
1442   ac_ct_CC=$CC
1443   # Extract the first word of "gcc", so it can be a program name with args.
1444 set dummy gcc; ac_word=$2
1445 echo "$as_me:1445: checking for $ac_word" >&5
1446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1447 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1448   echo $ECHO_N "(cached) $ECHO_C" >&6
1449 else
1450   if test -n "$ac_ct_CC"; then
1451   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1452 else
1453   ac_save_IFS=$IFS; IFS=$ac_path_separator
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
1456   IFS=$ac_save_IFS
1457   test -z "$ac_dir" && ac_dir=.
1458   $as_executable_p "$ac_dir/$ac_word" || continue
1459 ac_cv_prog_ac_ct_CC="gcc"
1460 echo "$as_me:1460: found $ac_dir/$ac_word" >&5
1461 break
1462 done
1463
1464 fi
1465 fi
1466 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1467 if test -n "$ac_ct_CC"; then
1468   echo "$as_me:1468: result: $ac_ct_CC" >&5
1469 echo "${ECHO_T}$ac_ct_CC" >&6
1470 else
1471   echo "$as_me:1471: result: no" >&5
1472 echo "${ECHO_T}no" >&6
1473 fi
1474
1475   CC=$ac_ct_CC
1476 else
1477   CC="$ac_cv_prog_CC"
1478 fi
1479
1480 if test -z "$CC"; then
1481   if test -n "$ac_tool_prefix"; then
1482   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1483 set dummy ${ac_tool_prefix}cc; ac_word=$2
1484 echo "$as_me:1484: checking for $ac_word" >&5
1485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486 if test "${ac_cv_prog_CC+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   if test -n "$CC"; then
1490   ac_cv_prog_CC="$CC" # Let the user override the test.
1491 else
1492   ac_save_IFS=$IFS; IFS=$ac_path_separator
1493 ac_dummy="$PATH"
1494 for ac_dir in $ac_dummy; do
1495   IFS=$ac_save_IFS
1496   test -z "$ac_dir" && ac_dir=.
1497   $as_executable_p "$ac_dir/$ac_word" || continue
1498 ac_cv_prog_CC="${ac_tool_prefix}cc"
1499 echo "$as_me:1499: found $ac_dir/$ac_word" >&5
1500 break
1501 done
1502
1503 fi
1504 fi
1505 CC=$ac_cv_prog_CC
1506 if test -n "$CC"; then
1507   echo "$as_me:1507: result: $CC" >&5
1508 echo "${ECHO_T}$CC" >&6
1509 else
1510   echo "$as_me:1510: result: no" >&5
1511 echo "${ECHO_T}no" >&6
1512 fi
1513
1514 fi
1515 if test -z "$ac_cv_prog_CC"; then
1516   ac_ct_CC=$CC
1517   # Extract the first word of "cc", so it can be a program name with args.
1518 set dummy cc; ac_word=$2
1519 echo "$as_me:1519: checking for $ac_word" >&5
1520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1522   echo $ECHO_N "(cached) $ECHO_C" >&6
1523 else
1524   if test -n "$ac_ct_CC"; then
1525   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1526 else
1527   ac_save_IFS=$IFS; IFS=$ac_path_separator
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530   IFS=$ac_save_IFS
1531   test -z "$ac_dir" && ac_dir=.
1532   $as_executable_p "$ac_dir/$ac_word" || continue
1533 ac_cv_prog_ac_ct_CC="cc"
1534 echo "$as_me:1534: found $ac_dir/$ac_word" >&5
1535 break
1536 done
1537
1538 fi
1539 fi
1540 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1541 if test -n "$ac_ct_CC"; then
1542   echo "$as_me:1542: result: $ac_ct_CC" >&5
1543 echo "${ECHO_T}$ac_ct_CC" >&6
1544 else
1545   echo "$as_me:1545: result: no" >&5
1546 echo "${ECHO_T}no" >&6
1547 fi
1548
1549   CC=$ac_ct_CC
1550 else
1551   CC="$ac_cv_prog_CC"
1552 fi
1553
1554 fi
1555 if test -z "$CC"; then
1556   # Extract the first word of "cc", so it can be a program name with args.
1557 set dummy cc; ac_word=$2
1558 echo "$as_me:1558: checking for $ac_word" >&5
1559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1560 if test "${ac_cv_prog_CC+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   if test -n "$CC"; then
1564   ac_cv_prog_CC="$CC" # Let the user override the test.
1565 else
1566   ac_prog_rejected=no
1567   ac_save_IFS=$IFS; IFS=$ac_path_separator
1568 ac_dummy="$PATH"
1569 for ac_dir in $ac_dummy; do
1570   IFS=$ac_save_IFS
1571   test -z "$ac_dir" && ac_dir=.
1572   $as_executable_p "$ac_dir/$ac_word" || continue
1573 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1574   ac_prog_rejected=yes
1575   continue
1576 fi
1577 ac_cv_prog_CC="cc"
1578 echo "$as_me:1578: found $ac_dir/$ac_word" >&5
1579 break
1580 done
1581
1582 if test $ac_prog_rejected = yes; then
1583   # We found a bogon in the path, so make sure we never use it.
1584   set dummy $ac_cv_prog_CC
1585   shift
1586   if test $# != 0; then
1587     # We chose a different compiler from the bogus one.
1588     # However, it has the same basename, so the bogon will be chosen
1589     # first if we set CC to just the basename; use the full file name.
1590     shift
1591     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1592     shift
1593     ac_cv_prog_CC="$@"
1594   fi
1595 fi
1596 fi
1597 fi
1598 CC=$ac_cv_prog_CC
1599 if test -n "$CC"; then
1600   echo "$as_me:1600: result: $CC" >&5
1601 echo "${ECHO_T}$CC" >&6
1602 else
1603   echo "$as_me:1603: result: no" >&5
1604 echo "${ECHO_T}no" >&6
1605 fi
1606
1607 fi
1608 if test -z "$CC"; then
1609   if test -n "$ac_tool_prefix"; then
1610   for ac_prog in cl
1611   do
1612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1614 echo "$as_me:1614: checking for $ac_word" >&5
1615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1616 if test "${ac_cv_prog_CC+set}" = set; then
1617   echo $ECHO_N "(cached) $ECHO_C" >&6
1618 else
1619   if test -n "$CC"; then
1620   ac_cv_prog_CC="$CC" # Let the user override the test.
1621 else
1622   ac_save_IFS=$IFS; IFS=$ac_path_separator
1623 ac_dummy="$PATH"
1624 for ac_dir in $ac_dummy; do
1625   IFS=$ac_save_IFS
1626   test -z "$ac_dir" && ac_dir=.
1627   $as_executable_p "$ac_dir/$ac_word" || continue
1628 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1629 echo "$as_me:1629: found $ac_dir/$ac_word" >&5
1630 break
1631 done
1632
1633 fi
1634 fi
1635 CC=$ac_cv_prog_CC
1636 if test -n "$CC"; then
1637   echo "$as_me:1637: result: $CC" >&5
1638 echo "${ECHO_T}$CC" >&6
1639 else
1640   echo "$as_me:1640: result: no" >&5
1641 echo "${ECHO_T}no" >&6
1642 fi
1643
1644     test -n "$CC" && break
1645   done
1646 fi
1647 if test -z "$CC"; then
1648   ac_ct_CC=$CC
1649   for ac_prog in cl
1650 do
1651   # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo "$as_me:1653: checking for $ac_word" >&5
1654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1655 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1656   echo $ECHO_N "(cached) $ECHO_C" >&6
1657 else
1658   if test -n "$ac_ct_CC"; then
1659   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1660 else
1661   ac_save_IFS=$IFS; IFS=$ac_path_separator
1662 ac_dummy="$PATH"
1663 for ac_dir in $ac_dummy; do
1664   IFS=$ac_save_IFS
1665   test -z "$ac_dir" && ac_dir=.
1666   $as_executable_p "$ac_dir/$ac_word" || continue
1667 ac_cv_prog_ac_ct_CC="$ac_prog"
1668 echo "$as_me:1668: found $ac_dir/$ac_word" >&5
1669 break
1670 done
1671
1672 fi
1673 fi
1674 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1675 if test -n "$ac_ct_CC"; then
1676   echo "$as_me:1676: result: $ac_ct_CC" >&5
1677 echo "${ECHO_T}$ac_ct_CC" >&6
1678 else
1679   echo "$as_me:1679: result: no" >&5
1680 echo "${ECHO_T}no" >&6
1681 fi
1682
1683   test -n "$ac_ct_CC" && break
1684 done
1685
1686   CC=$ac_ct_CC
1687 fi
1688
1689 fi
1690
1691 test -z "$CC" && { { echo "$as_me:1691: error: no acceptable cc found in \$PATH" >&5
1692 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1693    { (exit 1); exit 1; }; }
1694
1695 # Provide some information about the compiler.
1696 echo "$as_me:1696:" \
1697      "checking for C compiler version" >&5
1698 ac_compiler=`set X $ac_compile; echo $2`
1699 { (eval echo "$as_me:1699: \"$ac_compiler --version </dev/null >&5\"") >&5
1700   (eval $ac_compiler --version </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704 { (eval echo "$as_me:1704: \"$ac_compiler -v </dev/null >&5\"") >&5
1705   (eval $ac_compiler -v </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -V </dev/null >&5\"") >&5
1710   (eval $ac_compiler -V </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714
1715 cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 ac_clean_files_save=$ac_clean_files
1728 ac_clean_files="$ac_clean_files a.out a.exe"
1729 # Try to create an executable without -o first, disregard a.out.
1730 # It will help us diagnose broken compilers, and finding out an intuition
1731 # of exeext.
1732 echo "$as_me:1732: checking for C compiler default output" >&5
1733 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1734 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1735 if { (eval echo "$as_me:1735: \"$ac_link_default\"") >&5
1736   (eval $ac_link_default) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # Find the output, starting from the most likely.  This scheme is
1741 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1742 # resort.
1743 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1744                 ls a.out conftest 2>/dev/null;
1745                 ls a.* conftest.* 2>/dev/null`; do
1746   case $ac_file in
1747     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1748     a.out ) # We found the default executable, but exeext='' is most
1749             # certainly right.
1750             break;;
1751     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1752           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1753           export ac_cv_exeext
1754           break;;
1755     * ) break;;
1756   esac
1757 done
1758 else
1759   echo "$as_me: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1761 { { echo "$as_me:1761: error: C compiler cannot create executables" >&5
1762 echo "$as_me: error: C compiler cannot create executables" >&2;}
1763    { (exit 77); exit 77; }; }
1764 fi
1765
1766 ac_exeext=$ac_cv_exeext
1767 echo "$as_me:1767: result: $ac_file" >&5
1768 echo "${ECHO_T}$ac_file" >&6
1769
1770 # Check the compiler produces executables we can run.  If not, either
1771 # the compiler is broken, or we cross compile.
1772 echo "$as_me:1772: checking whether the C compiler works" >&5
1773 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1774 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1775 # If not cross compiling, check that we can run a simple program.
1776 if test "$cross_compiling" != yes; then
1777   if { ac_try='./$ac_file'
1778   { (eval echo "$as_me:1778: \"$ac_try\"") >&5
1779   (eval $ac_try) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); }; }; then
1783     cross_compiling=no
1784   else
1785     if test "$cross_compiling" = maybe; then
1786         cross_compiling=yes
1787     else
1788         { { echo "$as_me:1788: error: cannot run C compiled programs.
1789 If you meant to cross compile, use \`--host'." >&5
1790 echo "$as_me: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&2;}
1792    { (exit 1); exit 1; }; }
1793     fi
1794   fi
1795 fi
1796 echo "$as_me:1796: result: yes" >&5
1797 echo "${ECHO_T}yes" >&6
1798
1799 rm -f a.out a.exe conftest$ac_cv_exeext
1800 ac_clean_files=$ac_clean_files_save
1801 # Check the compiler produces executables we can run.  If not, either
1802 # the compiler is broken, or we cross compile.
1803 echo "$as_me:1803: checking whether we are cross compiling" >&5
1804 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1805 echo "$as_me:1805: result: $cross_compiling" >&5
1806 echo "${ECHO_T}$cross_compiling" >&6
1807
1808 echo "$as_me:1808: checking for executable suffix" >&5
1809 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1810 if { (eval echo "$as_me:1810: \"$ac_link\"") >&5
1811   (eval $ac_link) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); }; then
1815   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1816 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1817 # work properly (i.e., refer to `conftest.exe'), while it won't with
1818 # `rm'.
1819 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1820   case $ac_file in
1821     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1822     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1823           export ac_cv_exeext
1824           break;;
1825     * ) break;;
1826   esac
1827 done
1828 else
1829   { { echo "$as_me:1829: error: cannot compute EXEEXT: cannot compile and link" >&5
1830 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1831    { (exit 1); exit 1; }; }
1832 fi
1833
1834 rm -f conftest$ac_cv_exeext
1835 echo "$as_me:1835: result: $ac_cv_exeext" >&5
1836 echo "${ECHO_T}$ac_cv_exeext" >&6
1837
1838 rm -f conftest.$ac_ext
1839 EXEEXT=$ac_cv_exeext
1840 ac_exeext=$EXEEXT
1841 echo "$as_me:1841: checking for object suffix" >&5
1842 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1843 if test "${ac_cv_objext+set}" = set; then
1844   echo $ECHO_N "(cached) $ECHO_C" >&6
1845 else
1846   cat >conftest.$ac_ext <<_ACEOF
1847 #line 1847 "configure"
1848 #include "confdefs.h"
1849
1850 int
1851 main ()
1852 {
1853
1854   ;
1855   return 0;
1856 }
1857 _ACEOF
1858 rm -f conftest.o conftest.obj
1859 if { (eval echo "$as_me:1859: \"$ac_compile\"") >&5
1860   (eval $ac_compile) 2>&5
1861   ac_status=$?
1862   echo "$as_me:1862: \$? = $ac_status" >&5
1863   (exit $ac_status); }; then
1864   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1865   case $ac_file in
1866     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1867     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1868        break;;
1869   esac
1870 done
1871 else
1872   echo "$as_me: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 { { echo "$as_me:1874: error: cannot compute OBJEXT: cannot compile" >&5
1875 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1876    { (exit 1); exit 1; }; }
1877 fi
1878
1879 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_objext" >&5
1882 echo "${ECHO_T}$ac_cv_objext" >&6
1883 OBJEXT=$ac_cv_objext
1884 ac_objext=$OBJEXT
1885 echo "$as_me:1885: checking whether we are using the GNU C compiler" >&5
1886 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1887 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1888   echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890   cat >conftest.$ac_ext <<_ACEOF
1891 #line 1891 "configure"
1892 #include "confdefs.h"
1893
1894 int
1895 main ()
1896 {
1897 #ifndef __GNUC__
1898        choke me
1899 #endif
1900
1901   ;
1902   return 0;
1903 }
1904 _ACEOF
1905 rm -f conftest.$ac_objext
1906 if { (eval echo "$as_me:1906: \"$ac_compile\"") >&5
1907   (eval $ac_compile) 2>&5
1908   ac_status=$?
1909   echo "$as_me:1909: \$? = $ac_status" >&5
1910   (exit $ac_status); } &&
1911          { ac_try='test -s conftest.$ac_objext'
1912   { (eval echo "$as_me:1912: \"$ac_try\"") >&5
1913   (eval $ac_try) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); }; }; then
1917   ac_compiler_gnu=yes
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 ac_compiler_gnu=no
1922 fi
1923 rm -f conftest.$ac_objext conftest.$ac_ext
1924 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1925
1926 fi
1927 echo "$as_me:1927: result: $ac_cv_c_compiler_gnu" >&5
1928 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1929 GCC=`test $ac_compiler_gnu = yes && echo yes`
1930 ac_test_CFLAGS=${CFLAGS+set}
1931 ac_save_CFLAGS=$CFLAGS
1932 CFLAGS="-g"
1933 echo "$as_me:1933: checking whether $CC accepts -g" >&5
1934 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1935 if test "${ac_cv_prog_cc_g+set}" = set; then
1936   echo $ECHO_N "(cached) $ECHO_C" >&6
1937 else
1938   cat >conftest.$ac_ext <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main ()
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   ac_cv_prog_cc_g=yes
1963 else
1964   echo "$as_me: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 ac_cv_prog_cc_g=no
1967 fi
1968 rm -f conftest.$ac_objext conftest.$ac_ext
1969 fi
1970 echo "$as_me:1970: result: $ac_cv_prog_cc_g" >&5
1971 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1972 if test "$ac_test_CFLAGS" = set; then
1973   CFLAGS=$ac_save_CFLAGS
1974 elif test $ac_cv_prog_cc_g = yes; then
1975   if test "$GCC" = yes; then
1976     CFLAGS="-g -O2"
1977   else
1978     CFLAGS="-g"
1979   fi
1980 else
1981   if test "$GCC" = yes; then
1982     CFLAGS="-O2"
1983   else
1984     CFLAGS=
1985   fi
1986 fi
1987 # Some people use a C++ compiler to compile C.  Since we use `exit',
1988 # in C++ we need to declare it.  In case someone uses the same compiler
1989 # for both compiling C and C++ we need to have the C++ compiler decide
1990 # the declaration of exit, since it's the most demanding environment.
1991 cat >conftest.$ac_ext <<_ACEOF
1992 #ifndef __cplusplus
1993   choke me
1994 #endif
1995 _ACEOF
1996 rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   for ac_declaration in \
2009    ''\
2010    '#include <stdlib.h>' \
2011    'extern "C" void std::exit (int) throw (); using std::exit;' \
2012    'extern "C" void std::exit (int); using std::exit;' \
2013    'extern "C" void exit (int) throw ();' \
2014    'extern "C" void exit (int);' \
2015    'void exit (int);'
2016 do
2017   cat >conftest.$ac_ext <<_ACEOF
2018 #line 2018 "configure"
2019 #include "confdefs.h"
2020 #include <stdlib.h>
2021 $ac_declaration
2022 int
2023 main ()
2024 {
2025 exit (42);
2026   ;
2027   return 0;
2028 }
2029 _ACEOF
2030 rm -f conftest.$ac_objext
2031 if { (eval echo "$as_me:2031: \"$ac_compile\"") >&5
2032   (eval $ac_compile) 2>&5
2033   ac_status=$?
2034   echo "$as_me:2034: \$? = $ac_status" >&5
2035   (exit $ac_status); } &&
2036          { ac_try='test -s conftest.$ac_objext'
2037   { (eval echo "$as_me:2037: \"$ac_try\"") >&5
2038   (eval $ac_try) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); }; }; then
2042   :
2043 else
2044   echo "$as_me: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 continue
2047 fi
2048 rm -f conftest.$ac_objext conftest.$ac_ext
2049   cat >conftest.$ac_ext <<_ACEOF
2050 #line 2050 "configure"
2051 #include "confdefs.h"
2052 $ac_declaration
2053 int
2054 main ()
2055 {
2056 exit (42);
2057   ;
2058   return 0;
2059 }
2060 _ACEOF
2061 rm -f conftest.$ac_objext
2062 if { (eval echo "$as_me:2062: \"$ac_compile\"") >&5
2063   (eval $ac_compile) 2>&5
2064   ac_status=$?
2065   echo "$as_me:2065: \$? = $ac_status" >&5
2066   (exit $ac_status); } &&
2067          { ac_try='test -s conftest.$ac_objext'
2068   { (eval echo "$as_me:2068: \"$ac_try\"") >&5
2069   (eval $ac_try) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); }; }; then
2073   break
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 done
2080 rm -f conftest*
2081 if test -n "$ac_declaration"; then
2082   echo '#ifdef __cplusplus' >>confdefs.h
2083   echo $ac_declaration      >>confdefs.h
2084   echo '#endif'             >>confdefs.h
2085 fi
2086
2087 else
2088   echo "$as_me: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 fi
2091 rm -f conftest.$ac_objext conftest.$ac_ext
2092 ac_ext=c
2093 ac_cpp='$CPP $CPPFLAGS'
2094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2097 ac_main_return=return
2098
2099 GCC_VERSION=none
2100 if test "$GCC" = yes ; then
2101         echo "$as_me:2101: checking version of $CC" >&5
2102 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2103         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2104         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2105         echo "$as_me:2105: result: $GCC_VERSION" >&5
2106 echo "${ECHO_T}$GCC_VERSION" >&6
2107 fi
2108
2109 ac_ext=c
2110 ac_cpp='$CPP $CPPFLAGS'
2111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2114 ac_main_return=return
2115 echo "$as_me:2115: checking how to run the C preprocessor" >&5
2116 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2117 # On Suns, sometimes $CPP names a directory.
2118 if test -n "$CPP" && test -d "$CPP"; then
2119   CPP=
2120 fi
2121 if test -z "$CPP"; then
2122   if test "${ac_cv_prog_CPP+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125       # Double quotes because CPP needs to be expanded
2126     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2127     do
2128       ac_preproc_ok=false
2129 for ac_c_preproc_warn_flag in '' yes
2130 do
2131   # Use a header file that comes with gcc, so configuring glibc
2132   # with a fresh cross-compiler works.
2133   # On the NeXT, cc -E runs the code through the compiler's parser,
2134   # not just through cpp. "Syntax error" is here to catch this case.
2135   cat >conftest.$ac_ext <<_ACEOF
2136 #line 2136 "configure"
2137 #include "confdefs.h"
2138 #include <assert.h>
2139                      Syntax error
2140 _ACEOF
2141 if { (eval echo "$as_me:2141: \"$ac_cpp conftest.$ac_ext\"") >&5
2142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2143   ac_status=$?
2144   egrep -v '^ *\+' conftest.er1 >conftest.err
2145   rm -f conftest.er1
2146   cat conftest.err >&5
2147   echo "$as_me:2147: \$? = $ac_status" >&5
2148   (exit $ac_status); } >/dev/null; then
2149   if test -s conftest.err; then
2150     ac_cpp_err=$ac_c_preproc_warn_flag
2151   else
2152     ac_cpp_err=
2153   fi
2154 else
2155   ac_cpp_err=yes
2156 fi
2157 if test -z "$ac_cpp_err"; then
2158   :
2159 else
2160   echo "$as_me: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   # Broken: fails on valid input.
2163 continue
2164 fi
2165 rm -f conftest.err conftest.$ac_ext
2166
2167   # OK, works on sane cases.  Now check whether non-existent headers
2168   # can be detected and how.
2169   cat >conftest.$ac_ext <<_ACEOF
2170 #line 2170 "configure"
2171 #include "confdefs.h"
2172 #include <ac_nonexistent.h>
2173 _ACEOF
2174 if { (eval echo "$as_me:2174: \"$ac_cpp conftest.$ac_ext\"") >&5
2175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2176   ac_status=$?
2177   egrep -v '^ *\+' conftest.er1 >conftest.err
2178   rm -f conftest.er1
2179   cat conftest.err >&5
2180   echo "$as_me:2180: \$? = $ac_status" >&5
2181   (exit $ac_status); } >/dev/null; then
2182   if test -s conftest.err; then
2183     ac_cpp_err=$ac_c_preproc_warn_flag
2184   else
2185     ac_cpp_err=
2186   fi
2187 else
2188   ac_cpp_err=yes
2189 fi
2190 if test -z "$ac_cpp_err"; then
2191   # Broken: success on invalid input.
2192 continue
2193 else
2194   echo "$as_me: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   # Passes both tests.
2197 ac_preproc_ok=:
2198 break
2199 fi
2200 rm -f conftest.err conftest.$ac_ext
2201
2202 done
2203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2204 rm -f conftest.err conftest.$ac_ext
2205 if $ac_preproc_ok; then
2206   break
2207 fi
2208
2209     done
2210     ac_cv_prog_CPP=$CPP
2211
2212 fi
2213   CPP=$ac_cv_prog_CPP
2214 else
2215   ac_cv_prog_CPP=$CPP
2216 fi
2217 echo "$as_me:2217: result: $CPP" >&5
2218 echo "${ECHO_T}$CPP" >&6
2219 ac_preproc_ok=false
2220 for ac_c_preproc_warn_flag in '' yes
2221 do
2222   # Use a header file that comes with gcc, so configuring glibc
2223   # with a fresh cross-compiler works.
2224   # On the NeXT, cc -E runs the code through the compiler's parser,
2225   # not just through cpp. "Syntax error" is here to catch this case.
2226   cat >conftest.$ac_ext <<_ACEOF
2227 #line 2227 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230                      Syntax error
2231 _ACEOF
2232 if { (eval echo "$as_me:2232: \"$ac_cpp conftest.$ac_ext\"") >&5
2233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2234   ac_status=$?
2235   egrep -v '^ *\+' conftest.er1 >conftest.err
2236   rm -f conftest.er1
2237   cat conftest.err >&5
2238   echo "$as_me:2238: \$? = $ac_status" >&5
2239   (exit $ac_status); } >/dev/null; then
2240   if test -s conftest.err; then
2241     ac_cpp_err=$ac_c_preproc_warn_flag
2242   else
2243     ac_cpp_err=
2244   fi
2245 else
2246   ac_cpp_err=yes
2247 fi
2248 if test -z "$ac_cpp_err"; then
2249   :
2250 else
2251   echo "$as_me: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   # Broken: fails on valid input.
2254 continue
2255 fi
2256 rm -f conftest.err conftest.$ac_ext
2257
2258   # OK, works on sane cases.  Now check whether non-existent headers
2259   # can be detected and how.
2260   cat >conftest.$ac_ext <<_ACEOF
2261 #line 2261 "configure"
2262 #include "confdefs.h"
2263 #include <ac_nonexistent.h>
2264 _ACEOF
2265 if { (eval echo "$as_me:2265: \"$ac_cpp conftest.$ac_ext\"") >&5
2266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2267   ac_status=$?
2268   egrep -v '^ *\+' conftest.er1 >conftest.err
2269   rm -f conftest.er1
2270   cat conftest.err >&5
2271   echo "$as_me:2271: \$? = $ac_status" >&5
2272   (exit $ac_status); } >/dev/null; then
2273   if test -s conftest.err; then
2274     ac_cpp_err=$ac_c_preproc_warn_flag
2275   else
2276     ac_cpp_err=
2277   fi
2278 else
2279   ac_cpp_err=yes
2280 fi
2281 if test -z "$ac_cpp_err"; then
2282   # Broken: success on invalid input.
2283 continue
2284 else
2285   echo "$as_me: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   # Passes both tests.
2288 ac_preproc_ok=:
2289 break
2290 fi
2291 rm -f conftest.err conftest.$ac_ext
2292
2293 done
2294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2295 rm -f conftest.err conftest.$ac_ext
2296 if $ac_preproc_ok; then
2297   :
2298 else
2299   { { echo "$as_me:2299: error: C preprocessor \"$CPP\" fails sanity check" >&5
2300 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2301    { (exit 1); exit 1; }; }
2302 fi
2303
2304 ac_ext=c
2305 ac_cpp='$CPP $CPPFLAGS'
2306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2309 ac_main_return=return
2310
2311 if test $ac_cv_c_compiler_gnu = yes; then
2312     echo "$as_me:2312: checking whether $CC needs -traditional" >&5
2313 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2314 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2315   echo $ECHO_N "(cached) $ECHO_C" >&6
2316 else
2317     ac_pattern="Autoconf.*'x'"
2318   cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <sgtty.h>
2322 int Autoconf = TIOCGETP;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 else
2328   ac_cv_prog_gcc_traditional=no
2329 fi
2330 rm -f conftest*
2331
2332   if test $ac_cv_prog_gcc_traditional = no; then
2333     cat >conftest.$ac_ext <<_ACEOF
2334 #line 2334 "configure"
2335 #include "confdefs.h"
2336 #include <termio.h>
2337 int Autoconf = TCGETA;
2338 _ACEOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "$ac_pattern" >/dev/null 2>&1; then
2341   ac_cv_prog_gcc_traditional=yes
2342 fi
2343 rm -f conftest*
2344
2345   fi
2346 fi
2347 echo "$as_me:2347: result: $ac_cv_prog_gcc_traditional" >&5
2348 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2349   if test $ac_cv_prog_gcc_traditional = yes; then
2350     CC="$CC -traditional"
2351   fi
2352 fi
2353
2354 echo "$as_me:2354: checking whether $CC understands -c and -o together" >&5
2355 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2356 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2357   echo $ECHO_N "(cached) $ECHO_C" >&6
2358 else
2359
2360 cat > conftest.$ac_ext <<CF_EOF
2361 #include <stdio.h>
2362 int main()
2363 {
2364         ${cf_cv_main_return:-return}(0);
2365 }
2366 CF_EOF
2367 # We do the test twice because some compilers refuse to overwrite an
2368 # existing .o file with -o, though they will create one.
2369 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2370 if { (eval echo "$as_me:2370: \"$ac_try\"") >&5
2371   (eval $ac_try) 2>&5
2372   ac_status=$?
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } &&
2375   test -f conftest2.$ac_objext && { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); };
2380 then
2381   eval cf_cv_prog_CC_c_o=yes
2382 else
2383   eval cf_cv_prog_CC_c_o=no
2384 fi
2385 rm -f conftest*
2386
2387 fi
2388 if test $cf_cv_prog_CC_c_o = yes; then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391 else
2392   echo "$as_me:2392: result: no" >&5
2393 echo "${ECHO_T}no" >&6
2394 fi
2395
2396 echo "$as_me:2396: checking for POSIXized ISC" >&5
2397 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2398 if test -d /etc/conf/kconfig.d &&
2399    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2400 then
2401   echo "$as_me:2401: result: yes" >&5
2402 echo "${ECHO_T}yes" >&6
2403   ISC=yes # If later tests want to check for ISC.
2404
2405 cat >>confdefs.h <<\EOF
2406 #define _POSIX_SOURCE 1
2407 EOF
2408
2409   if test "$GCC" = yes; then
2410     CC="$CC -posix"
2411   else
2412     CC="$CC -Xp"
2413   fi
2414 else
2415   echo "$as_me:2415: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2417   ISC=
2418 fi
2419
2420 echo "$as_me:2420: checking for ${CC-cc} option to accept ANSI C" >&5
2421 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2422 if test "${cf_cv_ansi_cc+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425
2426 cf_cv_ansi_cc=no
2427 cf_save_CFLAGS="$CFLAGS"
2428 cf_save_CPPFLAGS="$CPPFLAGS"
2429 # Don't try gcc -ansi; that turns off useful extensions and
2430 # breaks some systems' header files.
2431 # AIX                   -qlanglvl=ansi
2432 # Ultrix and OSF/1      -std1
2433 # HP-UX                 -Aa -D_HPUX_SOURCE
2434 # SVR4                  -Xc
2435 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2436 for cf_arg in "-DCC_HAS_PROTOS" \
2437         "" \
2438         -qlanglvl=ansi \
2439         -std1 \
2440         -Ae \
2441         "-Aa -D_HPUX_SOURCE" \
2442         -Xc
2443 do
2444
2445 cf_fix_cppflags=no
2446 cf_new_cflags=
2447 cf_new_cppflags=
2448 cf_new_extra_cppflags=
2449
2450 for cf_add_cflags in $cf_arg
2451 do
2452 case $cf_fix_cppflags in
2453 no)
2454         case $cf_add_cflags in #(vi
2455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2456                 case $cf_add_cflags in
2457                 -D*)
2458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2459
2460                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2461                         && test -z "${cf_tst_cflags}" \
2462                         && cf_fix_cppflags=yes
2463
2464                         if test $cf_fix_cppflags = yes ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         elif test "${cf_tst_cflags}" = "\"'" ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         fi
2471                         ;;
2472                 esac
2473                 case "$CPPFLAGS" in
2474                 *$cf_add_cflags) #(vi
2475                         ;;
2476                 *) #(vi
2477                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2478                         ;;
2479                 esac
2480                 ;;
2481         *)
2482                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2483                 ;;
2484         esac
2485         ;;
2486 yes)
2487         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2488
2489         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2490
2491         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2492         && test -z "${cf_tst_cflags}" \
2493         && cf_fix_cppflags=no
2494         ;;
2495 esac
2496 done
2497
2498 if test -n "$cf_new_cflags" ; then
2499
2500         CFLAGS="$CFLAGS $cf_new_cflags"
2501 fi
2502
2503 if test -n "$cf_new_cppflags" ; then
2504
2505         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2506 fi
2507
2508 if test -n "$cf_new_extra_cppflags" ; then
2509
2510         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2511 fi
2512
2513         cat >conftest.$ac_ext <<_ACEOF
2514 #line 2514 "configure"
2515 #include "confdefs.h"
2516
2517 #ifndef CC_HAS_PROTOS
2518 #if !defined(__STDC__) || (__STDC__ != 1)
2519 choke me
2520 #endif
2521 #endif
2522
2523 int
2524 main ()
2525 {
2526
2527         int test (int i, double x);
2528         struct s1 {int (*f) (int a);};
2529         struct s2 {int (*f) (double a);};
2530   ;
2531   return 0;
2532 }
2533 _ACEOF
2534 rm -f conftest.$ac_objext
2535 if { (eval echo "$as_me:2535: \"$ac_compile\"") >&5
2536   (eval $ac_compile) 2>&5
2537   ac_status=$?
2538   echo "$as_me:2538: \$? = $ac_status" >&5
2539   (exit $ac_status); } &&
2540          { ac_try='test -s conftest.$ac_objext'
2541   { (eval echo "$as_me:2541: \"$ac_try\"") >&5
2542   (eval $ac_try) 2>&5
2543   ac_status=$?
2544   echo "$as_me:2544: \$? = $ac_status" >&5
2545   (exit $ac_status); }; }; then
2546   cf_cv_ansi_cc="$cf_arg"; break
2547 else
2548   echo "$as_me: failed program was:" >&5
2549 cat conftest.$ac_ext >&5
2550 fi
2551 rm -f conftest.$ac_objext conftest.$ac_ext
2552 done
2553 CFLAGS="$cf_save_CFLAGS"
2554 CPPFLAGS="$cf_save_CPPFLAGS"
2555
2556 fi
2557 echo "$as_me:2557: result: $cf_cv_ansi_cc" >&5
2558 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2559
2560 if test "$cf_cv_ansi_cc" != "no"; then
2561 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2562
2563 cf_fix_cppflags=no
2564 cf_new_cflags=
2565 cf_new_cppflags=
2566 cf_new_extra_cppflags=
2567
2568 for cf_add_cflags in $cf_cv_ansi_cc
2569 do
2570 case $cf_fix_cppflags in
2571 no)
2572         case $cf_add_cflags in #(vi
2573         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2574                 case $cf_add_cflags in
2575                 -D*)
2576                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2577
2578                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2579                         && test -z "${cf_tst_cflags}" \
2580                         && cf_fix_cppflags=yes
2581
2582                         if test $cf_fix_cppflags = yes ; then
2583                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2584                                 continue
2585                         elif test "${cf_tst_cflags}" = "\"'" ; then
2586                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 *$cf_add_cflags) #(vi
2593                         ;;
2594                 *) #(vi
2595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2596                         ;;
2597                 esac
2598                 ;;
2599         *)
2600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2601                 ;;
2602         esac
2603         ;;
2604 yes)
2605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2606
2607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2608
2609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2610         && test -z "${cf_tst_cflags}" \
2611         && cf_fix_cppflags=no
2612         ;;
2613 esac
2614 done
2615
2616 if test -n "$cf_new_cflags" ; then
2617
2618         CFLAGS="$CFLAGS $cf_new_cflags"
2619 fi
2620
2621 if test -n "$cf_new_cppflags" ; then
2622
2623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2624 fi
2625
2626 if test -n "$cf_new_extra_cppflags" ; then
2627
2628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2629 fi
2630
2631 else
2632         cat >>confdefs.h <<\EOF
2633 #define CC_HAS_PROTOS 1
2634 EOF
2635
2636 fi
2637 fi
2638
2639 if test "$cf_cv_ansi_cc" = "no"; then
2640         { { echo "$as_me:2640: error: Your compiler does not appear to recognize prototypes.
2641 You have the following choices:
2642         a. adjust your compiler options
2643         b. get an up-to-date compiler
2644         c. use a wrapper such as unproto" >&5
2645 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2646 You have the following choices:
2647         a. adjust your compiler options
2648         b. get an up-to-date compiler
2649         c. use a wrapper such as unproto" >&2;}
2650    { (exit 1); exit 1; }; }
2651 fi
2652
2653 case $cf_cv_system_name in
2654 os2*)
2655     CFLAGS="$CFLAGS -Zmt"
2656     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2657     CXXFLAGS="$CXXFLAGS -Zmt"
2658     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2659     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2660     ac_cv_exeext=.exe
2661     ;;
2662 esac
2663
2664 PROG_EXT="$EXEEXT"
2665
2666 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2667 #define PROG_EXT "$PROG_EXT"
2668 EOF
2669
2670 if test "$cross_compiling" = yes ; then
2671   LDCONFIG=:
2672 else
2673 case "$cf_cv_system_name" in #(vi
2674 dragonfly*|freebsd*) #(vi
2675   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2676   ;;
2677 *) LDPATH=$PATH:/sbin:/usr/sbin
2678   # Extract the first word of "ldconfig", so it can be a program name with args.
2679 set dummy ldconfig; ac_word=$2
2680 echo "$as_me:2680: checking for $ac_word" >&5
2681 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2682 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2683   echo $ECHO_N "(cached) $ECHO_C" >&6
2684 else
2685   case $LDCONFIG in
2686   [\\/]* | ?:[\\/]*)
2687   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2688   ;;
2689   *)
2690   ac_save_IFS=$IFS; IFS=$ac_path_separator
2691 ac_dummy="$LDPATH"
2692 for ac_dir in $ac_dummy; do
2693   IFS=$ac_save_IFS
2694   test -z "$ac_dir" && ac_dir=.
2695   if $as_executable_p "$ac_dir/$ac_word"; then
2696    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2697    echo "$as_me:2697: found $ac_dir/$ac_word" >&5
2698    break
2699 fi
2700 done
2701
2702   ;;
2703 esac
2704 fi
2705 LDCONFIG=$ac_cv_path_LDCONFIG
2706
2707 if test -n "$LDCONFIG"; then
2708   echo "$as_me:2708: result: $LDCONFIG" >&5
2709 echo "${ECHO_T}$LDCONFIG" >&6
2710 else
2711   echo "$as_me:2711: result: no" >&5
2712 echo "${ECHO_T}no" >&6
2713 fi
2714
2715   ;;
2716 esac
2717 fi
2718
2719 echo "$as_me:2719: checking if you want to ensure bool is consistent with C++" >&5
2720 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2721
2722 # Check whether --with-cxx or --without-cxx was given.
2723 if test "${with_cxx+set}" = set; then
2724   withval="$with_cxx"
2725   cf_with_cxx=$withval
2726 else
2727   cf_with_cxx=yes
2728 fi;
2729 echo "$as_me:2729: result: $cf_with_cxx" >&5
2730 echo "${ECHO_T}$cf_with_cxx" >&6
2731 if test "X$cf_with_cxx" = Xno ; then
2732         CXX=""
2733         GXX=""
2734 else
2735         # with autoconf 2.13, we can change the error to a warning:
2736                 ac_ext=cc
2737 ac_cpp='$CXXCPP $CPPFLAGS'
2738 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2739 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2740 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2741 ac_main_return=return
2742 if test -n "$ac_tool_prefix"; then
2743   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2744   do
2745     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2746 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2747 echo "$as_me:2747: checking for $ac_word" >&5
2748 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2749 if test "${ac_cv_prog_CXX+set}" = set; then
2750   echo $ECHO_N "(cached) $ECHO_C" >&6
2751 else
2752   if test -n "$CXX"; then
2753   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2754 else
2755   ac_save_IFS=$IFS; IFS=$ac_path_separator
2756 ac_dummy="$PATH"
2757 for ac_dir in $ac_dummy; do
2758   IFS=$ac_save_IFS
2759   test -z "$ac_dir" && ac_dir=.
2760   $as_executable_p "$ac_dir/$ac_word" || continue
2761 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2762 echo "$as_me:2762: found $ac_dir/$ac_word" >&5
2763 break
2764 done
2765
2766 fi
2767 fi
2768 CXX=$ac_cv_prog_CXX
2769 if test -n "$CXX"; then
2770   echo "$as_me:2770: result: $CXX" >&5
2771 echo "${ECHO_T}$CXX" >&6
2772 else
2773   echo "$as_me:2773: result: no" >&5
2774 echo "${ECHO_T}no" >&6
2775 fi
2776
2777     test -n "$CXX" && break
2778   done
2779 fi
2780 if test -z "$CXX"; then
2781   ac_ct_CXX=$CXX
2782   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2783 do
2784   # Extract the first word of "$ac_prog", so it can be a program name with args.
2785 set dummy $ac_prog; ac_word=$2
2786 echo "$as_me:2786: checking for $ac_word" >&5
2787 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2788 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2789   echo $ECHO_N "(cached) $ECHO_C" >&6
2790 else
2791   if test -n "$ac_ct_CXX"; then
2792   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2793 else
2794   ac_save_IFS=$IFS; IFS=$ac_path_separator
2795 ac_dummy="$PATH"
2796 for ac_dir in $ac_dummy; do
2797   IFS=$ac_save_IFS
2798   test -z "$ac_dir" && ac_dir=.
2799   $as_executable_p "$ac_dir/$ac_word" || continue
2800 ac_cv_prog_ac_ct_CXX="$ac_prog"
2801 echo "$as_me:2801: found $ac_dir/$ac_word" >&5
2802 break
2803 done
2804
2805 fi
2806 fi
2807 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2808 if test -n "$ac_ct_CXX"; then
2809   echo "$as_me:2809: result: $ac_ct_CXX" >&5
2810 echo "${ECHO_T}$ac_ct_CXX" >&6
2811 else
2812   echo "$as_me:2812: result: no" >&5
2813 echo "${ECHO_T}no" >&6
2814 fi
2815
2816   test -n "$ac_ct_CXX" && break
2817 done
2818 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2819
2820   CXX=$ac_ct_CXX
2821 fi
2822
2823 # Provide some information about the compiler.
2824 echo "$as_me:2824:" \
2825      "checking for C++ compiler version" >&5
2826 ac_compiler=`set X $ac_compile; echo $2`
2827 { (eval echo "$as_me:2827: \"$ac_compiler --version </dev/null >&5\"") >&5
2828   (eval $ac_compiler --version </dev/null >&5) 2>&5
2829   ac_status=$?
2830   echo "$as_me:2830: \$? = $ac_status" >&5
2831   (exit $ac_status); }
2832 { (eval echo "$as_me:2832: \"$ac_compiler -v </dev/null >&5\"") >&5
2833   (eval $ac_compiler -v </dev/null >&5) 2>&5
2834   ac_status=$?
2835   echo "$as_me:2835: \$? = $ac_status" >&5
2836   (exit $ac_status); }
2837 { (eval echo "$as_me:2837: \"$ac_compiler -V </dev/null >&5\"") >&5
2838   (eval $ac_compiler -V </dev/null >&5) 2>&5
2839   ac_status=$?
2840   echo "$as_me:2840: \$? = $ac_status" >&5
2841   (exit $ac_status); }
2842
2843 echo "$as_me:2843: checking whether we are using the GNU C++ compiler" >&5
2844 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2845 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2846   echo $ECHO_N "(cached) $ECHO_C" >&6
2847 else
2848   cat >conftest.$ac_ext <<_ACEOF
2849 #line 2849 "configure"
2850 #include "confdefs.h"
2851
2852 int
2853 main ()
2854 {
2855 #ifndef __GNUC__
2856        choke me
2857 #endif
2858
2859   ;
2860   return 0;
2861 }
2862 _ACEOF
2863 rm -f conftest.$ac_objext
2864 if { (eval echo "$as_me:2864: \"$ac_compile\"") >&5
2865   (eval $ac_compile) 2>&5
2866   ac_status=$?
2867   echo "$as_me:2867: \$? = $ac_status" >&5
2868   (exit $ac_status); } &&
2869          { ac_try='test -s conftest.$ac_objext'
2870   { (eval echo "$as_me:2870: \"$ac_try\"") >&5
2871   (eval $ac_try) 2>&5
2872   ac_status=$?
2873   echo "$as_me:2873: \$? = $ac_status" >&5
2874   (exit $ac_status); }; }; then
2875   ac_compiler_gnu=yes
2876 else
2877   echo "$as_me: failed program was:" >&5
2878 cat conftest.$ac_ext >&5
2879 ac_compiler_gnu=no
2880 fi
2881 rm -f conftest.$ac_objext conftest.$ac_ext
2882 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2883
2884 fi
2885 echo "$as_me:2885: result: $ac_cv_cxx_compiler_gnu" >&5
2886 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2887 GXX=`test $ac_compiler_gnu = yes && echo yes`
2888 ac_test_CXXFLAGS=${CXXFLAGS+set}
2889 ac_save_CXXFLAGS=$CXXFLAGS
2890 CXXFLAGS="-g"
2891 echo "$as_me:2891: checking whether $CXX accepts -g" >&5
2892 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2893 if test "${ac_cv_prog_cxx_g+set}" = set; then
2894   echo $ECHO_N "(cached) $ECHO_C" >&6
2895 else
2896   cat >conftest.$ac_ext <<_ACEOF
2897 #line 2897 "configure"
2898 #include "confdefs.h"
2899
2900 int
2901 main ()
2902 {
2903
2904   ;
2905   return 0;
2906 }
2907 _ACEOF
2908 rm -f conftest.$ac_objext
2909 if { (eval echo "$as_me:2909: \"$ac_compile\"") >&5
2910   (eval $ac_compile) 2>&5
2911   ac_status=$?
2912   echo "$as_me:2912: \$? = $ac_status" >&5
2913   (exit $ac_status); } &&
2914          { ac_try='test -s conftest.$ac_objext'
2915   { (eval echo "$as_me:2915: \"$ac_try\"") >&5
2916   (eval $ac_try) 2>&5
2917   ac_status=$?
2918   echo "$as_me:2918: \$? = $ac_status" >&5
2919   (exit $ac_status); }; }; then
2920   ac_cv_prog_cxx_g=yes
2921 else
2922   echo "$as_me: failed program was:" >&5
2923 cat conftest.$ac_ext >&5
2924 ac_cv_prog_cxx_g=no
2925 fi
2926 rm -f conftest.$ac_objext conftest.$ac_ext
2927 fi
2928 echo "$as_me:2928: result: $ac_cv_prog_cxx_g" >&5
2929 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2930 if test "$ac_test_CXXFLAGS" = set; then
2931   CXXFLAGS=$ac_save_CXXFLAGS
2932 elif test $ac_cv_prog_cxx_g = yes; then
2933   if test "$GXX" = yes; then
2934     CXXFLAGS="-g -O2"
2935   else
2936     CXXFLAGS="-g"
2937   fi
2938 else
2939   if test "$GXX" = yes; then
2940     CXXFLAGS="-O2"
2941   else
2942     CXXFLAGS=
2943   fi
2944 fi
2945 for ac_declaration in \
2946    ''\
2947    '#include <stdlib.h>' \
2948    'extern "C" void std::exit (int) throw (); using std::exit;' \
2949    'extern "C" void std::exit (int); using std::exit;' \
2950    'extern "C" void exit (int) throw ();' \
2951    'extern "C" void exit (int);' \
2952    'void exit (int);'
2953 do
2954   cat >conftest.$ac_ext <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <stdlib.h>
2958 $ac_declaration
2959 int
2960 main ()
2961 {
2962 exit (42);
2963   ;
2964   return 0;
2965 }
2966 _ACEOF
2967 rm -f conftest.$ac_objext
2968 if { (eval echo "$as_me:2968: \"$ac_compile\"") >&5
2969   (eval $ac_compile) 2>&5
2970   ac_status=$?
2971   echo "$as_me:2971: \$? = $ac_status" >&5
2972   (exit $ac_status); } &&
2973          { ac_try='test -s conftest.$ac_objext'
2974   { (eval echo "$as_me:2974: \"$ac_try\"") >&5
2975   (eval $ac_try) 2>&5
2976   ac_status=$?
2977   echo "$as_me:2977: \$? = $ac_status" >&5
2978   (exit $ac_status); }; }; then
2979   :
2980 else
2981   echo "$as_me: failed program was:" >&5
2982 cat conftest.$ac_ext >&5
2983 continue
2984 fi
2985 rm -f conftest.$ac_objext conftest.$ac_ext
2986   cat >conftest.$ac_ext <<_ACEOF
2987 #line 2987 "configure"
2988 #include "confdefs.h"
2989 $ac_declaration
2990 int
2991 main ()
2992 {
2993 exit (42);
2994   ;
2995   return 0;
2996 }
2997 _ACEOF
2998 rm -f conftest.$ac_objext
2999 if { (eval echo "$as_me:2999: \"$ac_compile\"") >&5
3000   (eval $ac_compile) 2>&5
3001   ac_status=$?
3002   echo "$as_me:3002: \$? = $ac_status" >&5
3003   (exit $ac_status); } &&
3004          { ac_try='test -s conftest.$ac_objext'
3005   { (eval echo "$as_me:3005: \"$ac_try\"") >&5
3006   (eval $ac_try) 2>&5
3007   ac_status=$?
3008   echo "$as_me:3008: \$? = $ac_status" >&5
3009   (exit $ac_status); }; }; then
3010   break
3011 else
3012   echo "$as_me: failed program was:" >&5
3013 cat conftest.$ac_ext >&5
3014 fi
3015 rm -f conftest.$ac_objext conftest.$ac_ext
3016 done
3017 rm -f conftest*
3018 if test -n "$ac_declaration"; then
3019   echo '#ifdef __cplusplus' >>confdefs.h
3020   echo $ac_declaration      >>confdefs.h
3021   echo '#endif'             >>confdefs.h
3022 fi
3023
3024 ac_ext=c
3025 ac_cpp='$CPP $CPPFLAGS'
3026 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3027 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3028 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3029 ac_main_return=return
3030
3031                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3032         if test "$CXX" = "g++" ; then
3033                 # Extract the first word of "g++", so it can be a program name with args.
3034 set dummy g++; ac_word=$2
3035 echo "$as_me:3035: checking for $ac_word" >&5
3036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3037 if test "${ac_cv_path_CXX+set}" = set; then
3038   echo $ECHO_N "(cached) $ECHO_C" >&6
3039 else
3040   case $CXX in
3041   [\\/]* | ?:[\\/]*)
3042   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3043   ;;
3044   *)
3045   ac_save_IFS=$IFS; IFS=$ac_path_separator
3046 ac_dummy="$PATH"
3047 for ac_dir in $ac_dummy; do
3048   IFS=$ac_save_IFS
3049   test -z "$ac_dir" && ac_dir=.
3050   if $as_executable_p "$ac_dir/$ac_word"; then
3051    ac_cv_path_CXX="$ac_dir/$ac_word"
3052    echo "$as_me:3052: found $ac_dir/$ac_word" >&5
3053    break
3054 fi
3055 done
3056
3057   ;;
3058 esac
3059 fi
3060 CXX=$ac_cv_path_CXX
3061
3062 if test -n "$CXX"; then
3063   echo "$as_me:3063: result: $CXX" >&5
3064 echo "${ECHO_T}$CXX" >&6
3065 else
3066   echo "$as_me:3066: result: no" >&5
3067 echo "${ECHO_T}no" >&6
3068 fi
3069
3070         fi
3071         if test "$CXX" = "g++" ; then
3072                 { echo "$as_me:3072: WARNING: ignoring hardcoded g++" >&5
3073 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3074                 cf_with_cxx=no; CXX=""; GXX="";
3075         fi
3076 fi
3077
3078 GXX_VERSION=none
3079 if test "$GXX" = yes; then
3080         echo "$as_me:3080: checking version of g++" >&5
3081 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3082         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3083         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3084         echo "$as_me:3084: result: $GXX_VERSION" >&5
3085 echo "${ECHO_T}$GXX_VERSION" >&6
3086 fi
3087
3088 case $GXX_VERSION in
3089 1*|2.[0-6]*)
3090         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3091         # cf_cxx_library=no
3092         { echo "$as_me:3092: WARNING: templates do not work" >&5
3093 echo "$as_me: WARNING: templates do not work" >&2;}
3094         ;;
3095 esac
3096
3097 echo "$as_me:3097: checking if you want to build C++ binding and demo" >&5
3098 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3099
3100 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3101 if test "${with_cxx_binding+set}" = set; then
3102   withval="$with_cxx_binding"
3103   cf_with_cxx_binding=$withval
3104 else
3105   cf_with_cxx_binding=$cf_with_cxx
3106 fi;
3107 echo "$as_me:3107: result: $cf_with_cxx_binding" >&5
3108 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3109
3110 echo "$as_me:3110: checking if you want to build with Ada95" >&5
3111 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3112
3113 # Check whether --with-ada or --without-ada was given.
3114 if test "${with_ada+set}" = set; then
3115   withval="$with_ada"
3116   cf_with_ada=$withval
3117 else
3118   cf_with_ada=yes
3119 fi;
3120 echo "$as_me:3120: result: $cf_with_ada" >&5
3121 echo "${ECHO_T}$cf_with_ada" >&6
3122
3123 echo "$as_me:3123: checking if you want to install manpages" >&5
3124 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3125
3126 # Check whether --with-manpages or --without-manpages was given.
3127 if test "${with_manpages+set}" = set; then
3128   withval="$with_manpages"
3129   cf_with_manpages=$withval
3130 else
3131   cf_with_manpages=yes
3132 fi;
3133 echo "$as_me:3133: result: $cf_with_manpages" >&5
3134 echo "${ECHO_T}$cf_with_manpages" >&6
3135
3136 echo "$as_me:3136: checking if you want to build programs such as tic" >&5
3137 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3138
3139 # Check whether --with-progs or --without-progs was given.
3140 if test "${with_progs+set}" = set; then
3141   withval="$with_progs"
3142   cf_with_progs=$withval
3143 else
3144   cf_with_progs=yes
3145 fi;
3146 echo "$as_me:3146: result: $cf_with_progs" >&5
3147 echo "${ECHO_T}$cf_with_progs" >&6
3148
3149 echo "$as_me:3149: checking if you wish to install curses.h" >&5
3150 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3151
3152 # Check whether --with-curses-h or --without-curses-h was given.
3153 if test "${with_curses_h+set}" = set; then
3154   withval="$with_curses_h"
3155   with_curses_h=$withval
3156 else
3157   with_curses_h=yes
3158 fi;
3159 echo "$as_me:3159: result: $with_curses_h" >&5
3160 echo "${ECHO_T}$with_curses_h" >&6
3161
3162 modules_to_build="ncurses"
3163 if test "X$cf_with_progs" != Xno ; then
3164 modules_to_build="$modules_to_build progs tack"
3165 fi
3166 modules_to_build="$modules_to_build panel menu form"
3167
3168 test "$program_prefix" != NONE &&
3169   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3170 # Use a double $ so make ignores it.
3171 test "$program_suffix" != NONE &&
3172   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3173 # Double any \ or $.  echo might interpret backslashes.
3174 # By default was `s,x,x', remove it if useless.
3175 cat <<\_ACEOF >conftest.sed
3176 s/[\\$]/&&/g;s/;s,x,x,$//
3177 _ACEOF
3178 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3179 rm conftest.sed
3180
3181 for ac_prog in mawk gawk nawk awk
3182 do
3183   # Extract the first word of "$ac_prog", so it can be a program name with args.
3184 set dummy $ac_prog; ac_word=$2
3185 echo "$as_me:3185: checking for $ac_word" >&5
3186 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3187 if test "${ac_cv_prog_AWK+set}" = set; then
3188   echo $ECHO_N "(cached) $ECHO_C" >&6
3189 else
3190   if test -n "$AWK"; then
3191   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3192 else
3193   ac_save_IFS=$IFS; IFS=$ac_path_separator
3194 ac_dummy="$PATH"
3195 for ac_dir in $ac_dummy; do
3196   IFS=$ac_save_IFS
3197   test -z "$ac_dir" && ac_dir=.
3198   $as_executable_p "$ac_dir/$ac_word" || continue
3199 ac_cv_prog_AWK="$ac_prog"
3200 echo "$as_me:3200: found $ac_dir/$ac_word" >&5
3201 break
3202 done
3203
3204 fi
3205 fi
3206 AWK=$ac_cv_prog_AWK
3207 if test -n "$AWK"; then
3208   echo "$as_me:3208: result: $AWK" >&5
3209 echo "${ECHO_T}$AWK" >&6
3210 else
3211   echo "$as_me:3211: result: no" >&5
3212 echo "${ECHO_T}no" >&6
3213 fi
3214
3215   test -n "$AWK" && break
3216 done
3217
3218 test -z "$AWK" && { { echo "$as_me:3218: error: No awk program found" >&5
3219 echo "$as_me: error: No awk program found" >&2;}
3220    { (exit 1); exit 1; }; }
3221
3222 echo "$as_me:3222: checking for egrep" >&5
3223 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3224 if test "${ac_cv_prog_egrep+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3228     then ac_cv_prog_egrep='grep -E'
3229     else ac_cv_prog_egrep='egrep'
3230     fi
3231 fi
3232 echo "$as_me:3232: result: $ac_cv_prog_egrep" >&5
3233 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3234  EGREP=$ac_cv_prog_egrep
3235
3236 test -z "$EGREP" && { { echo "$as_me:3236: error: No egrep program found" >&5
3237 echo "$as_me: error: No egrep program found" >&2;}
3238    { (exit 1); exit 1; }; }
3239
3240 # Find a good install program.  We prefer a C program (faster),
3241 # so one script is as good as another.  But avoid the broken or
3242 # incompatible versions:
3243 # SysV /etc/install, /usr/sbin/install
3244 # SunOS /usr/etc/install
3245 # IRIX /sbin/install
3246 # AIX /bin/install
3247 # AmigaOS /C/install, which installs bootblocks on floppy discs
3248 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3249 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3250 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3251 # ./install, which can be erroneously created by make from ./install.sh.
3252 echo "$as_me:3252: checking for a BSD compatible install" >&5
3253 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3254 if test -z "$INSTALL"; then
3255 if test "${ac_cv_path_install+set}" = set; then
3256   echo $ECHO_N "(cached) $ECHO_C" >&6
3257 else
3258     ac_save_IFS=$IFS; IFS=$ac_path_separator
3259   for ac_dir in $PATH; do
3260     IFS=$ac_save_IFS
3261     # Account for people who put trailing slashes in PATH elements.
3262     case $ac_dir/ in
3263     / | ./ | .// | /cC/* \
3264     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3265     | /usr/ucb/* ) ;;
3266     *)
3267       # OSF1 and SCO ODT 3.0 have their own names for install.
3268       # Don't use installbsd from OSF since it installs stuff as root
3269       # by default.
3270       for ac_prog in ginstall scoinst install; do
3271         if $as_executable_p "$ac_dir/$ac_prog"; then
3272           if test $ac_prog = install &&
3273             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3274             # AIX install.  It has an incompatible calling convention.
3275             :
3276           elif test $ac_prog = install &&
3277             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3278             # program-specific install script used by HP pwplus--don't use.
3279             :
3280           else
3281             ac_cv_path_install="$ac_dir/$ac_prog -c"
3282             break 2
3283           fi
3284         fi
3285       done
3286       ;;
3287     esac
3288   done
3289
3290 fi
3291   if test "${ac_cv_path_install+set}" = set; then
3292     INSTALL=$ac_cv_path_install
3293   else
3294     # As a last resort, use the slow shell script.  We don't cache a
3295     # path for INSTALL within a source directory, because that will
3296     # break other packages using the cache if that directory is
3297     # removed, or if the path is relative.
3298     INSTALL=$ac_install_sh
3299   fi
3300 fi
3301 echo "$as_me:3301: result: $INSTALL" >&5
3302 echo "${ECHO_T}$INSTALL" >&6
3303
3304 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3305 # It thinks the first close brace ends the variable substitution.
3306 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3307
3308 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3309
3310 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3311
3312 case $INSTALL in
3313 /*)
3314   ;;
3315 *)
3316   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3317   test -z "$cf_dir" && cf_dir=.
3318   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3319   ;;
3320 esac
3321
3322 for ac_prog in tdlint lint alint splint lclint
3323 do
3324   # Extract the first word of "$ac_prog", so it can be a program name with args.
3325 set dummy $ac_prog; ac_word=$2
3326 echo "$as_me:3326: checking for $ac_word" >&5
3327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328 if test "${ac_cv_prog_LINT+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331   if test -n "$LINT"; then
3332   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3333 else
3334   ac_save_IFS=$IFS; IFS=$ac_path_separator
3335 ac_dummy="$PATH"
3336 for ac_dir in $ac_dummy; do
3337   IFS=$ac_save_IFS
3338   test -z "$ac_dir" && ac_dir=.
3339   $as_executable_p "$ac_dir/$ac_word" || continue
3340 ac_cv_prog_LINT="$ac_prog"
3341 echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342 break
3343 done
3344
3345 fi
3346 fi
3347 LINT=$ac_cv_prog_LINT
3348 if test -n "$LINT"; then
3349   echo "$as_me:3349: result: $LINT" >&5
3350 echo "${ECHO_T}$LINT" >&6
3351 else
3352   echo "$as_me:3352: result: no" >&5
3353 echo "${ECHO_T}no" >&6
3354 fi
3355
3356   test -n "$LINT" && break
3357 done
3358
3359 echo "$as_me:3359: checking whether ln -s works" >&5
3360 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3361 LN_S=$as_ln_s
3362 if test "$LN_S" = "ln -s"; then
3363   echo "$as_me:3363: result: yes" >&5
3364 echo "${ECHO_T}yes" >&6
3365 else
3366   echo "$as_me:3366: result: no, using $LN_S" >&5
3367 echo "${ECHO_T}no, using $LN_S" >&6
3368 fi
3369
3370 echo "$as_me:3370: checking for long file names" >&5
3371 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3372 if test "${ac_cv_sys_long_file_names+set}" = set; then
3373   echo $ECHO_N "(cached) $ECHO_C" >&6
3374 else
3375   ac_cv_sys_long_file_names=yes
3376 # Test for long file names in all the places we know might matter:
3377 #      .                the current directory, where building will happen
3378 #      $prefix/lib      where we will be installing things
3379 #      $exec_prefix/lib likewise
3380 # eval it to expand exec_prefix.
3381 #      $TMPDIR          if set, where it might want to write temporary files
3382 # if $TMPDIR is not set:
3383 #      /tmp             where it might want to write temporary files
3384 #      /var/tmp         likewise
3385 #      /usr/tmp         likewise
3386 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3387   ac_tmpdirs=$TMPDIR
3388 else
3389   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3390 fi
3391 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3392   test -d $ac_dir || continue
3393   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3394   ac_xdir=$ac_dir/cf$$
3395   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3396   ac_tf1=$ac_xdir/conftest9012345
3397   ac_tf2=$ac_xdir/conftest9012346
3398   (echo 1 >$ac_tf1) 2>/dev/null
3399   (echo 2 >$ac_tf2) 2>/dev/null
3400   ac_val=`cat $ac_tf1 2>/dev/null`
3401   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3402     ac_cv_sys_long_file_names=no
3403     rm -rf $ac_xdir 2>/dev/null
3404     break
3405   fi
3406   rm -rf $ac_xdir 2>/dev/null
3407 done
3408 fi
3409 echo "$as_me:3409: result: $ac_cv_sys_long_file_names" >&5
3410 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3411 if test $ac_cv_sys_long_file_names = yes; then
3412
3413 cat >>confdefs.h <<\EOF
3414 #define HAVE_LONG_FILE_NAMES 1
3415 EOF
3416
3417 fi
3418
3419 # if we find pkg-config, check if we should install the ".pc" files.
3420
3421 echo "$as_me:3421: checking if you want to use pkg-config" >&5
3422 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3423
3424 # Check whether --with-pkg-config or --without-pkg-config was given.
3425 if test "${with_pkg_config+set}" = set; then
3426   withval="$with_pkg_config"
3427   cf_pkg_config=$withval
3428 else
3429   cf_pkg_config=yes
3430 fi;
3431 echo "$as_me:3431: result: $cf_pkg_config" >&5
3432 echo "${ECHO_T}$cf_pkg_config" >&6
3433
3434 case $cf_pkg_config in #(vi
3435 no) #(vi
3436         PKG_CONFIG=none
3437         ;;
3438 yes) #(vi
3439         # Extract the first word of "pkg-config", so it can be a program name with args.
3440 set dummy pkg-config; ac_word=$2
3441 echo "$as_me:3441: checking for $ac_word" >&5
3442 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3443 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3444   echo $ECHO_N "(cached) $ECHO_C" >&6
3445 else
3446   case $PKG_CONFIG in
3447   [\\/]* | ?:[\\/]*)
3448   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3449   ;;
3450   *)
3451   ac_save_IFS=$IFS; IFS=$ac_path_separator
3452 ac_dummy="$PATH"
3453 for ac_dir in $ac_dummy; do
3454   IFS=$ac_save_IFS
3455   test -z "$ac_dir" && ac_dir=.
3456   if $as_executable_p "$ac_dir/$ac_word"; then
3457    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3458    echo "$as_me:3458: found $ac_dir/$ac_word" >&5
3459    break
3460 fi
3461 done
3462
3463   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3464   ;;
3465 esac
3466 fi
3467 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3468
3469 if test -n "$PKG_CONFIG"; then
3470   echo "$as_me:3470: result: $PKG_CONFIG" >&5
3471 echo "${ECHO_T}$PKG_CONFIG" >&6
3472 else
3473   echo "$as_me:3473: result: no" >&5
3474 echo "${ECHO_T}no" >&6
3475 fi
3476
3477         ;;
3478 *)
3479         PKG_CONFIG=$withval
3480         ;;
3481 esac
3482
3483 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3484 if test "$PKG_CONFIG" != none ; then
3485
3486 if test "x$prefix" != xNONE; then
3487   cf_path_syntax="$prefix"
3488 else
3489   cf_path_syntax="$ac_default_prefix"
3490 fi
3491
3492 case ".$PKG_CONFIG" in #(vi
3493 .\$\(*\)*|.\'*\'*) #(vi
3494   ;;
3495 ..|./*|.\\*) #(vi
3496   ;;
3497 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3498   ;;
3499 .\${*prefix}*) #(vi
3500   eval PKG_CONFIG="$PKG_CONFIG"
3501   case ".$PKG_CONFIG" in #(vi
3502   .NONE/*)
3503     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3504     ;;
3505   esac
3506   ;; #(vi
3507 .no|.NONE/*)
3508   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3509   ;;
3510 *)
3511   { { echo "$as_me:3511: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3512 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3513    { (exit 1); exit 1; }; }
3514   ;;
3515 esac
3516
3517 fi
3518
3519 if test "$PKG_CONFIG" != no ; then
3520         echo "$as_me:3520: checking if we should install .pc files for $PKG_CONFIG" >&5
3521 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3522
3523         # Leave this as something that can be overridden in the environment.
3524         if test -z "$PKG_CONFIG_LIBDIR" ; then
3525                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3526         fi
3527         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3528         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3529
3530 # Check whether --enable-pc-files or --disable-pc-files was given.
3531 if test "${enable_pc_files+set}" = set; then
3532   enableval="$enable_pc_files"
3533   enable_pc_files=$enableval
3534 else
3535   enable_pc_files=no
3536 fi;
3537                 echo "$as_me:3537: result: $enable_pc_files" >&5
3538 echo "${ECHO_T}$enable_pc_files" >&6
3539         else
3540                 echo "$as_me:3540: result: no" >&5
3541 echo "${ECHO_T}no" >&6
3542                 { echo "$as_me:3542: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3543 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3544                 enable_pc_files=no
3545         fi
3546 fi
3547
3548 echo "$as_me:3548: checking if we should assume mixed-case filenames" >&5
3549 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3550
3551 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3552 if test "${enable_mixed_case+set}" = set; then
3553   enableval="$enable_mixed_case"
3554   enable_mixedcase=$enableval
3555 else
3556   enable_mixedcase=auto
3557 fi;
3558 echo "$as_me:3558: result: $enable_mixedcase" >&5
3559 echo "${ECHO_T}$enable_mixedcase" >&6
3560 if test "$enable_mixedcase" = "auto" ; then
3561
3562 echo "$as_me:3562: checking if filesystem supports mixed-case filenames" >&5
3563 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3564 if test "${cf_cv_mixedcase+set}" = set; then
3565   echo $ECHO_N "(cached) $ECHO_C" >&6
3566 else
3567
3568 if test "$cross_compiling" = yes ; then
3569         case $target_alias in #(vi
3570         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3571                 cf_cv_mixedcase=no
3572                 ;;
3573         *)
3574                 cf_cv_mixedcase=yes
3575                 ;;
3576         esac
3577 else
3578         rm -f conftest CONFTEST
3579         echo test >conftest
3580         if test -f CONFTEST ; then
3581                 cf_cv_mixedcase=no
3582         else
3583                 cf_cv_mixedcase=yes
3584         fi
3585         rm -f conftest CONFTEST
3586 fi
3587
3588 fi
3589 echo "$as_me:3589: result: $cf_cv_mixedcase" >&5
3590 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3591 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3592 #define MIXEDCASE_FILENAMES 1
3593 EOF
3594
3595 else
3596     cf_cv_mixedcase=$enable_mixedcase
3597     if test "$enable_mixedcase" = "yes" ; then
3598         cat >>confdefs.h <<\EOF
3599 #define MIXEDCASE_FILENAMES 1
3600 EOF
3601
3602     fi
3603 fi
3604
3605 # do this after mixed-case option (tags/TAGS is not as important as tic).
3606 echo "$as_me:3606: checking whether ${MAKE-make} sets \${MAKE}" >&5
3607 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3608 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3609 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3610   echo $ECHO_N "(cached) $ECHO_C" >&6
3611 else
3612   cat >conftest.make <<\EOF
3613 all:
3614         @echo 'ac_maketemp="${MAKE}"'
3615 EOF
3616 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3617 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3618 if test -n "$ac_maketemp"; then
3619   eval ac_cv_prog_make_${ac_make}_set=yes
3620 else
3621   eval ac_cv_prog_make_${ac_make}_set=no
3622 fi
3623 rm -f conftest.make
3624 fi
3625 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3626   echo "$as_me:3626: result: yes" >&5
3627 echo "${ECHO_T}yes" >&6
3628   SET_MAKE=
3629 else
3630   echo "$as_me:3630: result: no" >&5
3631 echo "${ECHO_T}no" >&6
3632   SET_MAKE="MAKE=${MAKE-make}"
3633 fi
3634
3635 # Extract the first word of "ctags", so it can be a program name with args.
3636 set dummy ctags; ac_word=$2
3637 echo "$as_me:3637: checking for $ac_word" >&5
3638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3639 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3640   echo $ECHO_N "(cached) $ECHO_C" >&6
3641 else
3642   if test -n "$MAKE_LOWER_TAGS"; then
3643   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3644 else
3645   ac_save_IFS=$IFS; IFS=$ac_path_separator
3646 ac_dummy="$PATH"
3647 for ac_dir in $ac_dummy; do
3648   IFS=$ac_save_IFS
3649   test -z "$ac_dir" && ac_dir=.
3650   $as_executable_p "$ac_dir/$ac_word" || continue
3651 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3652 echo "$as_me:3652: found $ac_dir/$ac_word" >&5
3653 break
3654 done
3655
3656   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3657 fi
3658 fi
3659 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3660 if test -n "$MAKE_LOWER_TAGS"; then
3661   echo "$as_me:3661: result: $MAKE_LOWER_TAGS" >&5
3662 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3663 else
3664   echo "$as_me:3664: result: no" >&5
3665 echo "${ECHO_T}no" >&6
3666 fi
3667
3668 if test "$cf_cv_mixedcase" = yes ; then
3669         # Extract the first word of "etags", so it can be a program name with args.
3670 set dummy etags; ac_word=$2
3671 echo "$as_me:3671: checking for $ac_word" >&5
3672 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3673 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3674   echo $ECHO_N "(cached) $ECHO_C" >&6
3675 else
3676   if test -n "$MAKE_UPPER_TAGS"; then
3677   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3678 else
3679   ac_save_IFS=$IFS; IFS=$ac_path_separator
3680 ac_dummy="$PATH"
3681 for ac_dir in $ac_dummy; do
3682   IFS=$ac_save_IFS
3683   test -z "$ac_dir" && ac_dir=.
3684   $as_executable_p "$ac_dir/$ac_word" || continue
3685 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3686 echo "$as_me:3686: found $ac_dir/$ac_word" >&5
3687 break
3688 done
3689
3690   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3691 fi
3692 fi
3693 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3694 if test -n "$MAKE_UPPER_TAGS"; then
3695   echo "$as_me:3695: result: $MAKE_UPPER_TAGS" >&5
3696 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3697 else
3698   echo "$as_me:3698: result: no" >&5
3699 echo "${ECHO_T}no" >&6
3700 fi
3701
3702 else
3703         MAKE_UPPER_TAGS=no
3704 fi
3705
3706 if test "$MAKE_UPPER_TAGS" = yes ; then
3707         MAKE_UPPER_TAGS=
3708 else
3709         MAKE_UPPER_TAGS="#"
3710 fi
3711
3712 if test "$MAKE_LOWER_TAGS" = yes ; then
3713         MAKE_LOWER_TAGS=
3714 else
3715         MAKE_LOWER_TAGS="#"
3716 fi
3717
3718 echo "$as_me:3718: checking for makeflags variable" >&5
3719 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3720 if test "${cf_cv_makeflags+set}" = set; then
3721   echo $ECHO_N "(cached) $ECHO_C" >&6
3722 else
3723
3724         cf_cv_makeflags=''
3725         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3726         do
3727                 cat >cf_makeflags.tmp <<CF_EOF
3728 SHELL = /bin/sh
3729 all :
3730         @ echo '.$cf_option'
3731 CF_EOF
3732                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3733                 case "$cf_result" in
3734                 .*k)
3735                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3736                         case "$cf_result" in
3737                         .*CC=*) cf_cv_makeflags=
3738                                 ;;
3739                         *)      cf_cv_makeflags=$cf_option
3740                                 ;;
3741                         esac
3742                         break
3743                         ;;
3744                 .-)     ;;
3745                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3746                         ;;
3747                 esac
3748         done
3749         rm -f cf_makeflags.tmp
3750
3751 fi
3752 echo "$as_me:3752: result: $cf_cv_makeflags" >&5
3753 echo "${ECHO_T}$cf_cv_makeflags" >&6
3754
3755 if test -n "$ac_tool_prefix"; then
3756   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3757 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3758 echo "$as_me:3758: checking for $ac_word" >&5
3759 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3760 if test "${ac_cv_prog_RANLIB+set}" = set; then
3761   echo $ECHO_N "(cached) $ECHO_C" >&6
3762 else
3763   if test -n "$RANLIB"; then
3764   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3765 else
3766   ac_save_IFS=$IFS; IFS=$ac_path_separator
3767 ac_dummy="$PATH"
3768 for ac_dir in $ac_dummy; do
3769   IFS=$ac_save_IFS
3770   test -z "$ac_dir" && ac_dir=.
3771   $as_executable_p "$ac_dir/$ac_word" || continue
3772 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3773 echo "$as_me:3773: found $ac_dir/$ac_word" >&5
3774 break
3775 done
3776
3777 fi
3778 fi
3779 RANLIB=$ac_cv_prog_RANLIB
3780 if test -n "$RANLIB"; then
3781   echo "$as_me:3781: result: $RANLIB" >&5
3782 echo "${ECHO_T}$RANLIB" >&6
3783 else
3784   echo "$as_me:3784: result: no" >&5
3785 echo "${ECHO_T}no" >&6
3786 fi
3787
3788 fi
3789 if test -z "$ac_cv_prog_RANLIB"; then
3790   ac_ct_RANLIB=$RANLIB
3791   # Extract the first word of "ranlib", so it can be a program name with args.
3792 set dummy ranlib; ac_word=$2
3793 echo "$as_me:3793: checking for $ac_word" >&5
3794 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3795 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3796   echo $ECHO_N "(cached) $ECHO_C" >&6
3797 else
3798   if test -n "$ac_ct_RANLIB"; then
3799   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3800 else
3801   ac_save_IFS=$IFS; IFS=$ac_path_separator
3802 ac_dummy="$PATH"
3803 for ac_dir in $ac_dummy; do
3804   IFS=$ac_save_IFS
3805   test -z "$ac_dir" && ac_dir=.
3806   $as_executable_p "$ac_dir/$ac_word" || continue
3807 ac_cv_prog_ac_ct_RANLIB="ranlib"
3808 echo "$as_me:3808: found $ac_dir/$ac_word" >&5
3809 break
3810 done
3811
3812   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3813 fi
3814 fi
3815 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3816 if test -n "$ac_ct_RANLIB"; then
3817   echo "$as_me:3817: result: $ac_ct_RANLIB" >&5
3818 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3819 else
3820   echo "$as_me:3820: result: no" >&5
3821 echo "${ECHO_T}no" >&6
3822 fi
3823
3824   RANLIB=$ac_ct_RANLIB
3825 else
3826   RANLIB="$ac_cv_prog_RANLIB"
3827 fi
3828
3829 if test -n "$ac_tool_prefix"; then
3830   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3831 set dummy ${ac_tool_prefix}ld; ac_word=$2
3832 echo "$as_me:3832: checking for $ac_word" >&5
3833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3834 if test "${ac_cv_prog_LD+set}" = set; then
3835   echo $ECHO_N "(cached) $ECHO_C" >&6
3836 else
3837   if test -n "$LD"; then
3838   ac_cv_prog_LD="$LD" # Let the user override the test.
3839 else
3840   ac_save_IFS=$IFS; IFS=$ac_path_separator
3841 ac_dummy="$PATH"
3842 for ac_dir in $ac_dummy; do
3843   IFS=$ac_save_IFS
3844   test -z "$ac_dir" && ac_dir=.
3845   $as_executable_p "$ac_dir/$ac_word" || continue
3846 ac_cv_prog_LD="${ac_tool_prefix}ld"
3847 echo "$as_me:3847: found $ac_dir/$ac_word" >&5
3848 break
3849 done
3850
3851 fi
3852 fi
3853 LD=$ac_cv_prog_LD
3854 if test -n "$LD"; then
3855   echo "$as_me:3855: result: $LD" >&5
3856 echo "${ECHO_T}$LD" >&6
3857 else
3858   echo "$as_me:3858: result: no" >&5
3859 echo "${ECHO_T}no" >&6
3860 fi
3861
3862 fi
3863 if test -z "$ac_cv_prog_LD"; then
3864   ac_ct_LD=$LD
3865   # Extract the first word of "ld", so it can be a program name with args.
3866 set dummy ld; ac_word=$2
3867 echo "$as_me:3867: checking for $ac_word" >&5
3868 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3869 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3870   echo $ECHO_N "(cached) $ECHO_C" >&6
3871 else
3872   if test -n "$ac_ct_LD"; then
3873   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3874 else
3875   ac_save_IFS=$IFS; IFS=$ac_path_separator
3876 ac_dummy="$PATH"
3877 for ac_dir in $ac_dummy; do
3878   IFS=$ac_save_IFS
3879   test -z "$ac_dir" && ac_dir=.
3880   $as_executable_p "$ac_dir/$ac_word" || continue
3881 ac_cv_prog_ac_ct_LD="ld"
3882 echo "$as_me:3882: found $ac_dir/$ac_word" >&5
3883 break
3884 done
3885
3886   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3887 fi
3888 fi
3889 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3890 if test -n "$ac_ct_LD"; then
3891   echo "$as_me:3891: result: $ac_ct_LD" >&5
3892 echo "${ECHO_T}$ac_ct_LD" >&6
3893 else
3894   echo "$as_me:3894: result: no" >&5
3895 echo "${ECHO_T}no" >&6
3896 fi
3897
3898   LD=$ac_ct_LD
3899 else
3900   LD="$ac_cv_prog_LD"
3901 fi
3902
3903 if test -n "$ac_tool_prefix"; then
3904   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3905 set dummy ${ac_tool_prefix}ar; ac_word=$2
3906 echo "$as_me:3906: checking for $ac_word" >&5
3907 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3908 if test "${ac_cv_prog_AR+set}" = set; then
3909   echo $ECHO_N "(cached) $ECHO_C" >&6
3910 else
3911   if test -n "$AR"; then
3912   ac_cv_prog_AR="$AR" # Let the user override the test.
3913 else
3914   ac_save_IFS=$IFS; IFS=$ac_path_separator
3915 ac_dummy="$PATH"
3916 for ac_dir in $ac_dummy; do
3917   IFS=$ac_save_IFS
3918   test -z "$ac_dir" && ac_dir=.
3919   $as_executable_p "$ac_dir/$ac_word" || continue
3920 ac_cv_prog_AR="${ac_tool_prefix}ar"
3921 echo "$as_me:3921: found $ac_dir/$ac_word" >&5
3922 break
3923 done
3924
3925 fi
3926 fi
3927 AR=$ac_cv_prog_AR
3928 if test -n "$AR"; then
3929   echo "$as_me:3929: result: $AR" >&5
3930 echo "${ECHO_T}$AR" >&6
3931 else
3932   echo "$as_me:3932: result: no" >&5
3933 echo "${ECHO_T}no" >&6
3934 fi
3935
3936 fi
3937 if test -z "$ac_cv_prog_AR"; then
3938   ac_ct_AR=$AR
3939   # Extract the first word of "ar", so it can be a program name with args.
3940 set dummy ar; ac_word=$2
3941 echo "$as_me:3941: checking for $ac_word" >&5
3942 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3943 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3944   echo $ECHO_N "(cached) $ECHO_C" >&6
3945 else
3946   if test -n "$ac_ct_AR"; then
3947   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3948 else
3949   ac_save_IFS=$IFS; IFS=$ac_path_separator
3950 ac_dummy="$PATH"
3951 for ac_dir in $ac_dummy; do
3952   IFS=$ac_save_IFS
3953   test -z "$ac_dir" && ac_dir=.
3954   $as_executable_p "$ac_dir/$ac_word" || continue
3955 ac_cv_prog_ac_ct_AR="ar"
3956 echo "$as_me:3956: found $ac_dir/$ac_word" >&5
3957 break
3958 done
3959
3960   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3961 fi
3962 fi
3963 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3964 if test -n "$ac_ct_AR"; then
3965   echo "$as_me:3965: result: $ac_ct_AR" >&5
3966 echo "${ECHO_T}$ac_ct_AR" >&6
3967 else
3968   echo "$as_me:3968: result: no" >&5
3969 echo "${ECHO_T}no" >&6
3970 fi
3971
3972   AR=$ac_ct_AR
3973 else
3974   AR="$ac_cv_prog_AR"
3975 fi
3976
3977 if test -n "$ac_tool_prefix"; then
3978   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3979 set dummy ${ac_tool_prefix}ar; ac_word=$2
3980 echo "$as_me:3980: checking for $ac_word" >&5
3981 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3982 if test "${ac_cv_prog_AR+set}" = set; then
3983   echo $ECHO_N "(cached) $ECHO_C" >&6
3984 else
3985   if test -n "$AR"; then
3986   ac_cv_prog_AR="$AR" # Let the user override the test.
3987 else
3988   ac_save_IFS=$IFS; IFS=$ac_path_separator
3989 ac_dummy="$PATH"
3990 for ac_dir in $ac_dummy; do
3991   IFS=$ac_save_IFS
3992   test -z "$ac_dir" && ac_dir=.
3993   $as_executable_p "$ac_dir/$ac_word" || continue
3994 ac_cv_prog_AR="${ac_tool_prefix}ar"
3995 echo "$as_me:3995: found $ac_dir/$ac_word" >&5
3996 break
3997 done
3998
3999 fi
4000 fi
4001 AR=$ac_cv_prog_AR
4002 if test -n "$AR"; then
4003   echo "$as_me:4003: result: $AR" >&5
4004 echo "${ECHO_T}$AR" >&6
4005 else
4006   echo "$as_me:4006: result: no" >&5
4007 echo "${ECHO_T}no" >&6
4008 fi
4009
4010 fi
4011 if test -z "$ac_cv_prog_AR"; then
4012   ac_ct_AR=$AR
4013   # Extract the first word of "ar", so it can be a program name with args.
4014 set dummy ar; ac_word=$2
4015 echo "$as_me:4015: checking for $ac_word" >&5
4016 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4017 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4018   echo $ECHO_N "(cached) $ECHO_C" >&6
4019 else
4020   if test -n "$ac_ct_AR"; then
4021   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4022 else
4023   ac_save_IFS=$IFS; IFS=$ac_path_separator
4024 ac_dummy="$PATH"
4025 for ac_dir in $ac_dummy; do
4026   IFS=$ac_save_IFS
4027   test -z "$ac_dir" && ac_dir=.
4028   $as_executable_p "$ac_dir/$ac_word" || continue
4029 ac_cv_prog_ac_ct_AR="ar"
4030 echo "$as_me:4030: found $ac_dir/$ac_word" >&5
4031 break
4032 done
4033
4034   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4035 fi
4036 fi
4037 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4038 if test -n "$ac_ct_AR"; then
4039   echo "$as_me:4039: result: $ac_ct_AR" >&5
4040 echo "${ECHO_T}$ac_ct_AR" >&6
4041 else
4042   echo "$as_me:4042: result: no" >&5
4043 echo "${ECHO_T}no" >&6
4044 fi
4045
4046   AR=$ac_ct_AR
4047 else
4048   AR="$ac_cv_prog_AR"
4049 fi
4050
4051 echo "$as_me:4051: checking for options to update archives" >&5
4052 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4053 if test "${cf_cv_ar_flags+set}" = set; then
4054   echo $ECHO_N "(cached) $ECHO_C" >&6
4055 else
4056
4057         cf_cv_ar_flags=unknown
4058         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4059         do
4060                 rm -f conftest.$ac_cv_objext
4061                 rm -f conftest.a
4062
4063                 cat >conftest.$ac_ext <<EOF
4064 #line 4064 "configure"
4065 int     testdata[3] = { 123, 456, 789 };
4066 EOF
4067                 if { (eval echo "$as_me:4067: \"$ac_compile\"") >&5
4068   (eval $ac_compile) 2>&5
4069   ac_status=$?
4070   echo "$as_me:4070: \$? = $ac_status" >&5
4071   (exit $ac_status); } ; then
4072                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4073                         if test -f conftest.a ; then
4074                                 cf_cv_ar_flags=$cf_ar_flags
4075                                 break
4076                         fi
4077                 else
4078                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4079
4080 echo "${as_me-configure}:4080: testing cannot compile test-program ..." 1>&5
4081
4082                         break
4083                 fi
4084         done
4085         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4086
4087 fi
4088 echo "$as_me:4088: result: $cf_cv_ar_flags" >&5
4089 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4090 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4091 ARFLAGS=$cf_cv_ar_flags
4092
4093 echo "$as_me:4093: checking if you have specified an install-prefix" >&5
4094 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4095
4096 # Check whether --with-install-prefix or --without-install-prefix was given.
4097 if test "${with_install_prefix+set}" = set; then
4098   withval="$with_install_prefix"
4099   case "$withval" in #(vi
4100         yes|no) #(vi
4101                 ;;
4102         *)      DESTDIR="$withval"
4103                 ;;
4104         esac
4105 fi;
4106 echo "$as_me:4106: result: $DESTDIR" >&5
4107 echo "${ECHO_T}$DESTDIR" >&6
4108
4109 ###############################################################################
4110
4111 # If we're cross-compiling, allow the user to override the tools and their
4112 # options.  The configure script is oriented toward identifying the host
4113 # compiler, etc., but we need a build compiler to generate parts of the source.
4114
4115 if test "$cross_compiling" = yes ; then
4116
4117         # defaults that we might want to override
4118         : ${BUILD_CFLAGS:=''}
4119         : ${BUILD_CPPFLAGS:=''}
4120         : ${BUILD_LDFLAGS:=''}
4121         : ${BUILD_LIBS:=''}
4122         : ${BUILD_EXEEXT:='$x'}
4123         : ${BUILD_OBJEXT:='o'}
4124
4125 # Check whether --with-build-cc or --without-build-cc was given.
4126 if test "${with_build_cc+set}" = set; then
4127   withval="$with_build_cc"
4128   BUILD_CC="$withval"
4129 else
4130   for ac_prog in gcc cc cl
4131 do
4132   # Extract the first word of "$ac_prog", so it can be a program name with args.
4133 set dummy $ac_prog; ac_word=$2
4134 echo "$as_me:4134: checking for $ac_word" >&5
4135 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4136 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4137   echo $ECHO_N "(cached) $ECHO_C" >&6
4138 else
4139   if test -n "$BUILD_CC"; then
4140   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4141 else
4142   ac_save_IFS=$IFS; IFS=$ac_path_separator
4143 ac_dummy="$PATH"
4144 for ac_dir in $ac_dummy; do
4145   IFS=$ac_save_IFS
4146   test -z "$ac_dir" && ac_dir=.
4147   $as_executable_p "$ac_dir/$ac_word" || continue
4148 ac_cv_prog_BUILD_CC="$ac_prog"
4149 echo "$as_me:4149: found $ac_dir/$ac_word" >&5
4150 break
4151 done
4152
4153 fi
4154 fi
4155 BUILD_CC=$ac_cv_prog_BUILD_CC
4156 if test -n "$BUILD_CC"; then
4157   echo "$as_me:4157: result: $BUILD_CC" >&5
4158 echo "${ECHO_T}$BUILD_CC" >&6
4159 else
4160   echo "$as_me:4160: result: no" >&5
4161 echo "${ECHO_T}no" >&6
4162 fi
4163
4164   test -n "$BUILD_CC" && break
4165 done
4166
4167 fi;
4168         echo "$as_me:4168: checking for native build C compiler" >&5
4169 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4170         echo "$as_me:4170: result: $BUILD_CC" >&5
4171 echo "${ECHO_T}$BUILD_CC" >&6
4172
4173         echo "$as_me:4173: checking for native build C preprocessor" >&5
4174 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4175
4176 # Check whether --with-build-cpp or --without-build-cpp was given.
4177 if test "${with_build_cpp+set}" = set; then
4178   withval="$with_build_cpp"
4179   BUILD_CPP="$withval"
4180 else
4181   BUILD_CPP='${BUILD_CC} -E'
4182 fi;
4183         echo "$as_me:4183: result: $BUILD_CPP" >&5
4184 echo "${ECHO_T}$BUILD_CPP" >&6
4185
4186         echo "$as_me:4186: checking for native build C flags" >&5
4187 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4188
4189 # Check whether --with-build-cflags or --without-build-cflags was given.
4190 if test "${with_build_cflags+set}" = set; then
4191   withval="$with_build_cflags"
4192   BUILD_CFLAGS="$withval"
4193 fi;
4194         echo "$as_me:4194: result: $BUILD_CFLAGS" >&5
4195 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4196
4197         echo "$as_me:4197: checking for native build C preprocessor-flags" >&5
4198 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4199
4200 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4201 if test "${with_build_cppflags+set}" = set; then
4202   withval="$with_build_cppflags"
4203   BUILD_CPPFLAGS="$withval"
4204 fi;
4205         echo "$as_me:4205: result: $BUILD_CPPFLAGS" >&5
4206 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4207
4208         echo "$as_me:4208: checking for native build linker-flags" >&5
4209 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4210
4211 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4212 if test "${with_build_ldflags+set}" = set; then
4213   withval="$with_build_ldflags"
4214   BUILD_LDFLAGS="$withval"
4215 fi;
4216         echo "$as_me:4216: result: $BUILD_LDFLAGS" >&5
4217 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4218
4219         echo "$as_me:4219: checking for native build linker-libraries" >&5
4220 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4221
4222 # Check whether --with-build-libs or --without-build-libs was given.
4223 if test "${with_build_libs+set}" = set; then
4224   withval="$with_build_libs"
4225   BUILD_LIBS="$withval"
4226 fi;
4227         echo "$as_me:4227: result: $BUILD_LIBS" >&5
4228 echo "${ECHO_T}$BUILD_LIBS" >&6
4229
4230         # this assumes we're on Unix.
4231         BUILD_EXEEXT=
4232         BUILD_OBJEXT=o
4233
4234         : ${BUILD_CC:='${CC}'}
4235
4236         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4237                 { { echo "$as_me:4237: error: Cross-build requires two compilers.
4238 Use --with-build-cc to specify the native compiler." >&5
4239 echo "$as_me: error: Cross-build requires two compilers.
4240 Use --with-build-cc to specify the native compiler." >&2;}
4241    { (exit 1); exit 1; }; }
4242         fi
4243
4244 else
4245         : ${BUILD_CC:='${CC}'}
4246         : ${BUILD_CPP:='${CPP}'}
4247         : ${BUILD_CFLAGS:='${CFLAGS}'}
4248         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4249         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4250         : ${BUILD_LIBS:='${LIBS}'}
4251         : ${BUILD_EXEEXT:='$x'}
4252         : ${BUILD_OBJEXT:='o'}
4253 fi
4254
4255 ###############################################################################
4256
4257 ### Options to allow the user to specify the set of libraries which are used.
4258 ### Use "--without-normal --with-shared" to allow the default model to be
4259 ### shared, for example.
4260 cf_list_models=""
4261
4262 LIBTOOL=
4263
4264 # common library maintenance symbols that are convenient for libtool scripts:
4265 LIB_CREATE='${AR} -cr'
4266 LIB_OBJECT='${OBJECTS}'
4267 LIB_SUFFIX=.a
4268 LIB_PREP="$RANLIB"
4269
4270 # symbols used to prop libtool up to enable it to determine what it should be
4271 # doing:
4272 LIB_CLEAN=
4273 LIB_COMPILE=
4274 LIB_LINK='${CC}'
4275 LIB_INSTALL=
4276 LIB_UNINSTALL=
4277
4278 echo "$as_me:4278: checking if you want to build libraries with libtool" >&5
4279 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4280
4281 # Check whether --with-libtool or --without-libtool was given.
4282 if test "${with_libtool+set}" = set; then
4283   withval="$with_libtool"
4284   with_libtool=$withval
4285 else
4286   with_libtool=no
4287 fi;
4288 echo "$as_me:4288: result: $with_libtool" >&5
4289 echo "${ECHO_T}$with_libtool" >&6
4290 if test "$with_libtool" != "no"; then
4291
4292         if test "$with_libtool" != "yes" ; then
4293
4294 if test "x$prefix" != xNONE; then
4295   cf_path_syntax="$prefix"
4296 else
4297   cf_path_syntax="$ac_default_prefix"
4298 fi
4299
4300 case ".$with_libtool" in #(vi
4301 .\$\(*\)*|.\'*\'*) #(vi
4302   ;;
4303 ..|./*|.\\*) #(vi
4304   ;;
4305 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4306   ;;
4307 .\${*prefix}*) #(vi
4308   eval with_libtool="$with_libtool"
4309   case ".$with_libtool" in #(vi
4310   .NONE/*)
4311     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4312     ;;
4313   esac
4314   ;; #(vi
4315 .no|.NONE/*)
4316   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4317   ;;
4318 *)
4319   { { echo "$as_me:4319: error: expected a pathname, not \"$with_libtool\"" >&5
4320 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4321    { (exit 1); exit 1; }; }
4322   ;;
4323 esac
4324
4325                 LIBTOOL=$with_libtool
4326         else
4327                 # Extract the first word of "libtool", so it can be a program name with args.
4328 set dummy libtool; ac_word=$2
4329 echo "$as_me:4329: checking for $ac_word" >&5
4330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4331 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4332   echo $ECHO_N "(cached) $ECHO_C" >&6
4333 else
4334   case $LIBTOOL in
4335   [\\/]* | ?:[\\/]*)
4336   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4337   ;;
4338   *)
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   if $as_executable_p "$ac_dir/$ac_word"; then
4345    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4346    echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347    break
4348 fi
4349 done
4350
4351   ;;
4352 esac
4353 fi
4354 LIBTOOL=$ac_cv_path_LIBTOOL
4355
4356 if test -n "$LIBTOOL"; then
4357   echo "$as_me:4357: result: $LIBTOOL" >&5
4358 echo "${ECHO_T}$LIBTOOL" >&6
4359 else
4360   echo "$as_me:4360: result: no" >&5
4361 echo "${ECHO_T}no" >&6
4362 fi
4363
4364         fi
4365         if test -z "$LIBTOOL" ; then
4366                 { { echo "$as_me:4366: error: Cannot find libtool" >&5
4367 echo "$as_me: error: Cannot find libtool" >&2;}
4368    { (exit 1); exit 1; }; }
4369         fi
4370         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4371         LIB_OBJECT='${OBJECTS:.o=.lo}'
4372         LIB_SUFFIX=.la
4373         LIB_CLEAN='${LIBTOOL} --mode=clean'
4374         LIB_COMPILE='${LIBTOOL} --mode=compile'
4375         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4376         LIB_INSTALL='${LIBTOOL} --mode=install'
4377         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4378         LIB_PREP=:
4379
4380         # Show the version of libtool
4381         echo "$as_me:4381: checking version of libtool" >&5
4382 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4383
4384         # Save the version in a cache variable - this is not entirely a good
4385         # thing, but the version string from libtool is very ugly, and for
4386         # bug reports it might be useful to have the original string. "("
4387         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.].*//'`
4388         echo "$as_me:4388: result: $cf_cv_libtool_version" >&5
4389 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4390         if test -z "$cf_cv_libtool_version" ; then
4391                 { { echo "$as_me:4391: error: This is not GNU libtool" >&5
4392 echo "$as_me: error: This is not GNU libtool" >&2;}
4393    { (exit 1); exit 1; }; }
4394         fi
4395
4396         # special hack to add -no-undefined (which libtool should do for itself)
4397         LT_UNDEF=
4398         case "$cf_cv_system_name" in #(vi
4399         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4400                 LT_UNDEF=-no-undefined
4401                 ;;
4402         esac
4403
4404         # special hack to add --tag option for C++ compiler
4405         case $cf_cv_libtool_version in #(vi
4406         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4407                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4408                 LIBTOOL="$LIBTOOL --tag=CC"
4409                 ;;
4410         *)
4411                 LIBTOOL_CXX="$LIBTOOL"
4412                 ;;
4413         esac
4414 else
4415         LIBTOOL=""
4416         LIBTOOL_CXX=""
4417 fi
4418
4419 test -z "$LIBTOOL" && ECHO_LT=
4420
4421 if test "$with_libtool" != "no" ; then
4422
4423 cf_list_models="$cf_list_models libtool"
4424
4425 else
4426
4427 echo "$as_me:4427: checking if you want to build shared libraries" >&5
4428 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4429
4430 # Check whether --with-shared or --without-shared was given.
4431 if test "${with_shared+set}" = set; then
4432   withval="$with_shared"
4433   with_shared=$withval
4434 else
4435   with_shared=no
4436 fi;
4437 echo "$as_me:4437: result: $with_shared" >&5
4438 echo "${ECHO_T}$with_shared" >&6
4439 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4440
4441 echo "$as_me:4441: checking if you want to build static libraries" >&5
4442 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4443
4444 # Check whether --with-normal or --without-normal was given.
4445 if test "${with_normal+set}" = set; then
4446   withval="$with_normal"
4447   with_normal=$withval
4448 else
4449   with_normal=yes
4450 fi;
4451 echo "$as_me:4451: result: $with_normal" >&5
4452 echo "${ECHO_T}$with_normal" >&6
4453 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4454
4455 echo "$as_me:4455: checking if you want to build debug libraries" >&5
4456 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4457
4458 # Check whether --with-debug or --without-debug was given.
4459 if test "${with_debug+set}" = set; then
4460   withval="$with_debug"
4461   with_debug=$withval
4462 else
4463   with_debug=yes
4464 fi;
4465 echo "$as_me:4465: result: $with_debug" >&5
4466 echo "${ECHO_T}$with_debug" >&6
4467 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4468
4469 echo "$as_me:4469: checking if you want to build profiling libraries" >&5
4470 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4471
4472 # Check whether --with-profile or --without-profile was given.
4473 if test "${with_profile+set}" = set; then
4474   withval="$with_profile"
4475   with_profile=$withval
4476 else
4477   with_profile=no
4478 fi;
4479 echo "$as_me:4479: result: $with_profile" >&5
4480 echo "${ECHO_T}$with_profile" >&6
4481 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4482
4483 fi
4484
4485 ###############################################################################
4486
4487 echo "$as_me:4487: checking for specified models" >&5
4488 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4489 test -z "$cf_list_models" && cf_list_models=normal
4490 test "$with_libtool" != "no" && cf_list_models=libtool
4491 echo "$as_me:4491: result: $cf_list_models" >&5
4492 echo "${ECHO_T}$cf_list_models" >&6
4493
4494 ### Use the first model as the default, and save its suffix for use in building
4495 ### up test-applications.
4496 echo "$as_me:4496: checking for default model" >&5
4497 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4498 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4499 echo "$as_me:4499: result: $DFT_LWR_MODEL" >&5
4500 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4501
4502 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4503
4504 TICS_NAME=tic
4505
4506 TINFO_NAME=tinfo
4507
4508 LIB_NAME=ncurses
4509
4510 LIB_DIR=../lib
4511 LIB_2ND=../../lib
4512
4513         case $cf_cv_system_name in #(vi
4514         OS/2*|os2*) #(vi
4515         LIB_PREFIX=''
4516         ;;
4517         *)      LIB_PREFIX='lib'
4518         ;;
4519         esac
4520 cf_prefix=$LIB_PREFIX
4521
4522 LIB_PREFIX=$cf_prefix
4523
4524 LIB_SUFFIX=
4525
4526 ###############################################################################
4527
4528 echo "$as_me:4528: checking if you want to build a separate terminfo library" >&5
4529 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4530
4531 # Check whether --with-termlib or --without-termlib was given.
4532 if test "${with_termlib+set}" = set; then
4533   withval="$with_termlib"
4534   with_termlib=$withval
4535 else
4536   with_termlib=no
4537 fi;
4538 echo "$as_me:4538: result: $with_termlib" >&5
4539 echo "${ECHO_T}$with_termlib" >&6
4540
4541 echo "$as_me:4541: checking if you want to build a separate tic library" >&5
4542 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4543
4544 # Check whether --with-ticlib or --without-ticlib was given.
4545 if test "${with_ticlib+set}" = set; then
4546   withval="$with_ticlib"
4547   with_ticlib=$withval
4548 else
4549   with_ticlib=no
4550 fi;
4551 echo "$as_me:4551: result: $with_ticlib" >&5
4552 echo "${ECHO_T}$with_ticlib" >&6
4553
4554 ### Checks for special libraries, must be done up-front.
4555 SHLIB_LIST=""
4556
4557 echo "$as_me:4557: checking if you want to link with the GPM mouse library" >&5
4558 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4559
4560 # Check whether --with-gpm or --without-gpm was given.
4561 if test "${with_gpm+set}" = set; then
4562   withval="$with_gpm"
4563   with_gpm=$withval
4564 else
4565   with_gpm=maybe
4566 fi;
4567 echo "$as_me:4567: result: $with_gpm" >&5
4568 echo "${ECHO_T}$with_gpm" >&6
4569
4570 if test "$with_gpm" != no ; then
4571         echo "$as_me:4571: checking for gpm.h" >&5
4572 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4573 if test "${ac_cv_header_gpm_h+set}" = set; then
4574   echo $ECHO_N "(cached) $ECHO_C" >&6
4575 else
4576   cat >conftest.$ac_ext <<_ACEOF
4577 #line 4577 "configure"
4578 #include "confdefs.h"
4579 #include <gpm.h>
4580 _ACEOF
4581 if { (eval echo "$as_me:4581: \"$ac_cpp conftest.$ac_ext\"") >&5
4582   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4583   ac_status=$?
4584   egrep -v '^ *\+' conftest.er1 >conftest.err
4585   rm -f conftest.er1
4586   cat conftest.err >&5
4587   echo "$as_me:4587: \$? = $ac_status" >&5
4588   (exit $ac_status); } >/dev/null; then
4589   if test -s conftest.err; then
4590     ac_cpp_err=$ac_c_preproc_warn_flag
4591   else
4592     ac_cpp_err=
4593   fi
4594 else
4595   ac_cpp_err=yes
4596 fi
4597 if test -z "$ac_cpp_err"; then
4598   ac_cv_header_gpm_h=yes
4599 else
4600   echo "$as_me: failed program was:" >&5
4601   cat conftest.$ac_ext >&5
4602   ac_cv_header_gpm_h=no
4603 fi
4604 rm -f conftest.err conftest.$ac_ext
4605 fi
4606 echo "$as_me:4606: result: $ac_cv_header_gpm_h" >&5
4607 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4608 if test $ac_cv_header_gpm_h = yes; then
4609
4610                 cat >>confdefs.h <<\EOF
4611 #define HAVE_GPM_H 1
4612 EOF
4613
4614                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4615                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4616
4617 echo "${as_me-configure}:4617: testing assuming we really have GPM library ..." 1>&5
4618
4619                         cat >>confdefs.h <<\EOF
4620 #define HAVE_LIBGPM 1
4621 EOF
4622
4623                 else
4624                         echo "$as_me:4624: checking for Gpm_Open in -lgpm" >&5
4625 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4626 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4627   echo $ECHO_N "(cached) $ECHO_C" >&6
4628 else
4629   ac_check_lib_save_LIBS=$LIBS
4630 LIBS="-lgpm  $LIBS"
4631 cat >conftest.$ac_ext <<_ACEOF
4632 #line 4632 "configure"
4633 #include "confdefs.h"
4634
4635 /* Override any gcc2 internal prototype to avoid an error.  */
4636 #ifdef __cplusplus
4637 extern "C"
4638 #endif
4639 /* We use char because int might match the return type of a gcc2
4640    builtin and then its argument prototype would still apply.  */
4641 char Gpm_Open ();
4642 int
4643 main ()
4644 {
4645 Gpm_Open ();
4646   ;
4647   return 0;
4648 }
4649 _ACEOF
4650 rm -f conftest.$ac_objext conftest$ac_exeext
4651 if { (eval echo "$as_me:4651: \"$ac_link\"") >&5
4652   (eval $ac_link) 2>&5
4653   ac_status=$?
4654   echo "$as_me:4654: \$? = $ac_status" >&5
4655   (exit $ac_status); } &&
4656          { ac_try='test -s conftest$ac_exeext'
4657   { (eval echo "$as_me:4657: \"$ac_try\"") >&5
4658   (eval $ac_try) 2>&5
4659   ac_status=$?
4660   echo "$as_me:4660: \$? = $ac_status" >&5
4661   (exit $ac_status); }; }; then
4662   ac_cv_lib_gpm_Gpm_Open=yes
4663 else
4664   echo "$as_me: failed program was:" >&5
4665 cat conftest.$ac_ext >&5
4666 ac_cv_lib_gpm_Gpm_Open=no
4667 fi
4668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4669 LIBS=$ac_check_lib_save_LIBS
4670 fi
4671 echo "$as_me:4671: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4672 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4673 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4674   :
4675 else
4676
4677                                 { { echo "$as_me:4677: error: Cannot link with GPM library" >&5
4678 echo "$as_me: error: Cannot link with GPM library" >&2;}
4679    { (exit 1); exit 1; }; }
4680                 fi
4681                 with_gpm=yes
4682
4683 fi
4684
4685 else
4686
4687                 test "$with_gpm" != maybe && { echo "$as_me:4687: WARNING: Cannot find GPM header" >&5
4688 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4689                 with_gpm=no
4690
4691 fi
4692
4693 fi
4694
4695 if test "$with_gpm" != no ; then
4696         echo "$as_me:4696: checking if you want to load GPM dynamically" >&5
4697 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4698
4699 # Check whether --with-dlsym or --without-dlsym was given.
4700 if test "${with_dlsym+set}" = set; then
4701   withval="$with_dlsym"
4702   with_dlsym=$withval
4703 else
4704   with_dlsym=yes
4705 fi;
4706         echo "$as_me:4706: result: $with_dlsym" >&5
4707 echo "${ECHO_T}$with_dlsym" >&6
4708         if test "$with_dlsym" = yes ; then
4709
4710 cf_have_dlsym=no
4711 echo "$as_me:4711: checking for dlsym" >&5
4712 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4713 if test "${ac_cv_func_dlsym+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 /* System header to define __stub macros and hopefully few prototypes,
4720     which can conflict with char dlsym (); below.  */
4721 #include <assert.h>
4722 /* Override any gcc2 internal prototype to avoid an error.  */
4723 #ifdef __cplusplus
4724 extern "C"
4725 #endif
4726 /* We use char because int might match the return type of a gcc2
4727    builtin and then its argument prototype would still apply.  */
4728 char dlsym ();
4729 char (*f) ();
4730
4731 int
4732 main ()
4733 {
4734 /* The GNU C library defines this for functions which it implements
4735     to always fail with ENOSYS.  Some functions are actually named
4736     something starting with __ and the normal name is an alias.  */
4737 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4738 choke me
4739 #else
4740 f = dlsym;
4741 #endif
4742
4743   ;
4744   return 0;
4745 }
4746 _ACEOF
4747 rm -f conftest.$ac_objext conftest$ac_exeext
4748 if { (eval echo "$as_me:4748: \"$ac_link\"") >&5
4749   (eval $ac_link) 2>&5
4750   ac_status=$?
4751   echo "$as_me:4751: \$? = $ac_status" >&5
4752   (exit $ac_status); } &&
4753          { ac_try='test -s conftest$ac_exeext'
4754   { (eval echo "$as_me:4754: \"$ac_try\"") >&5
4755   (eval $ac_try) 2>&5
4756   ac_status=$?
4757   echo "$as_me:4757: \$? = $ac_status" >&5
4758   (exit $ac_status); }; }; then
4759   ac_cv_func_dlsym=yes
4760 else
4761   echo "$as_me: failed program was:" >&5
4762 cat conftest.$ac_ext >&5
4763 ac_cv_func_dlsym=no
4764 fi
4765 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4766 fi
4767 echo "$as_me:4767: result: $ac_cv_func_dlsym" >&5
4768 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4769 if test $ac_cv_func_dlsym = yes; then
4770   cf_have_dlsym=yes
4771 else
4772
4773 cf_have_libdl=no
4774 echo "$as_me:4774: checking for dlsym in -ldl" >&5
4775 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4776 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4777   echo $ECHO_N "(cached) $ECHO_C" >&6
4778 else
4779   ac_check_lib_save_LIBS=$LIBS
4780 LIBS="-ldl  $LIBS"
4781 cat >conftest.$ac_ext <<_ACEOF
4782 #line 4782 "configure"
4783 #include "confdefs.h"
4784
4785 /* Override any gcc2 internal prototype to avoid an error.  */
4786 #ifdef __cplusplus
4787 extern "C"
4788 #endif
4789 /* We use char because int might match the return type of a gcc2
4790    builtin and then its argument prototype would still apply.  */
4791 char dlsym ();
4792 int
4793 main ()
4794 {
4795 dlsym ();
4796   ;
4797   return 0;
4798 }
4799 _ACEOF
4800 rm -f conftest.$ac_objext conftest$ac_exeext
4801 if { (eval echo "$as_me:4801: \"$ac_link\"") >&5
4802   (eval $ac_link) 2>&5
4803   ac_status=$?
4804   echo "$as_me:4804: \$? = $ac_status" >&5
4805   (exit $ac_status); } &&
4806          { ac_try='test -s conftest$ac_exeext'
4807   { (eval echo "$as_me:4807: \"$ac_try\"") >&5
4808   (eval $ac_try) 2>&5
4809   ac_status=$?
4810   echo "$as_me:4810: \$? = $ac_status" >&5
4811   (exit $ac_status); }; }; then
4812   ac_cv_lib_dl_dlsym=yes
4813 else
4814   echo "$as_me: failed program was:" >&5
4815 cat conftest.$ac_ext >&5
4816 ac_cv_lib_dl_dlsym=no
4817 fi
4818 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4819 LIBS=$ac_check_lib_save_LIBS
4820 fi
4821 echo "$as_me:4821: result: $ac_cv_lib_dl_dlsym" >&5
4822 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4823 if test $ac_cv_lib_dl_dlsym = yes; then
4824
4825         cf_have_dlsym=yes
4826         cf_have_libdl=yes
4827 fi
4828
4829 fi
4830
4831 if test "$cf_have_dlsym" = yes ; then
4832         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4833
4834         echo "$as_me:4834: checking whether able to link to dl*() functions" >&5
4835 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4836         cat >conftest.$ac_ext <<_ACEOF
4837 #line 4837 "configure"
4838 #include "confdefs.h"
4839 #include <dlfcn.h>
4840 int
4841 main ()
4842 {
4843
4844                 void *obj;
4845                 if ((obj = dlopen("filename", 0)) != 0) {
4846                         if (dlsym(obj, "symbolname") == 0) {
4847                         dlclose(obj);
4848                         }
4849                 }
4850   ;
4851   return 0;
4852 }
4853 _ACEOF
4854 rm -f conftest.$ac_objext conftest$ac_exeext
4855 if { (eval echo "$as_me:4855: \"$ac_link\"") >&5
4856   (eval $ac_link) 2>&5
4857   ac_status=$?
4858   echo "$as_me:4858: \$? = $ac_status" >&5
4859   (exit $ac_status); } &&
4860          { ac_try='test -s conftest$ac_exeext'
4861   { (eval echo "$as_me:4861: \"$ac_try\"") >&5
4862   (eval $ac_try) 2>&5
4863   ac_status=$?
4864   echo "$as_me:4864: \$? = $ac_status" >&5
4865   (exit $ac_status); }; }; then
4866
4867                 cat >>confdefs.h <<\EOF
4868 #define HAVE_LIBDL 1
4869 EOF
4870
4871 else
4872   echo "$as_me: failed program was:" >&5
4873 cat conftest.$ac_ext >&5
4874
4875                 { { echo "$as_me:4875: error: Cannot link test program for libdl" >&5
4876 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4877    { (exit 1); exit 1; }; }
4878 fi
4879 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4880         echo "$as_me:4880: result: ok" >&5
4881 echo "${ECHO_T}ok" >&6
4882 else
4883         { { echo "$as_me:4883: error: Cannot find dlsym function" >&5
4884 echo "$as_me: error: Cannot find dlsym function" >&2;}
4885    { (exit 1); exit 1; }; }
4886 fi
4887
4888                 if test "$with_gpm" != yes ; then
4889                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4890
4891 echo "${as_me-configure}:4891: testing assuming soname for gpm is $with_gpm ..." 1>&5
4892
4893                         cf_cv_gpm_soname="$with_gpm"
4894                 else
4895
4896 echo "$as_me:4896: checking for soname of gpm library" >&5
4897 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4898 if test "${cf_cv_gpm_soname+set}" = set; then
4899   echo $ECHO_N "(cached) $ECHO_C" >&6
4900 else
4901
4902 cf_cv_gpm_soname=unknown
4903 if test "$cross_compiling" != yes ; then
4904 cat >conftest.$ac_ext <<CF_EOF
4905 #include <gpm.h>
4906 int main()
4907 {
4908 if (Gpm_Open(0,0)) Gpm_Close();
4909         ${cf_cv_main_return:-return}(0);
4910 }
4911 CF_EOF
4912 cf_save_LIBS="$LIBS"
4913         LIBS="-lgpm $LIBS"
4914         if { (eval echo "$as_me:4914: \"$ac_compile\"") >&5
4915   (eval $ac_compile) 2>&5
4916   ac_status=$?
4917   echo "$as_me:4917: \$? = $ac_status" >&5
4918   (exit $ac_status); } ; then
4919                 if { (eval echo "$as_me:4919: \"$ac_link\"") >&5
4920   (eval $ac_link) 2>&5
4921   ac_status=$?
4922   echo "$as_me:4922: \$? = $ac_status" >&5
4923   (exit $ac_status); } ; then
4924                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4925                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4926                 fi
4927         fi
4928 rm -f conftest*
4929 LIBS="$cf_save_LIBS"
4930 fi
4931
4932 fi
4933 echo "$as_me:4933: result: $cf_cv_gpm_soname" >&5
4934 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4935
4936                 fi
4937                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4938 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4939 EOF
4940
4941                 SHLIB_LIST="-ldl $SHLIB_LIST"
4942         else
4943                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4944         fi
4945         cat >>confdefs.h <<\EOF
4946 #define HAVE_LIBGPM 1
4947 EOF
4948
4949 echo "$as_me:4949: checking for Gpm_Wgetch in -lgpm" >&5
4950 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4951 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4952   echo $ECHO_N "(cached) $ECHO_C" >&6
4953 else
4954   ac_check_lib_save_LIBS=$LIBS
4955 LIBS="-lgpm  $LIBS"
4956 cat >conftest.$ac_ext <<_ACEOF
4957 #line 4957 "configure"
4958 #include "confdefs.h"
4959
4960 /* Override any gcc2 internal prototype to avoid an error.  */
4961 #ifdef __cplusplus
4962 extern "C"
4963 #endif
4964 /* We use char because int might match the return type of a gcc2
4965    builtin and then its argument prototype would still apply.  */
4966 char Gpm_Wgetch ();
4967 int
4968 main ()
4969 {
4970 Gpm_Wgetch ();
4971   ;
4972   return 0;
4973 }
4974 _ACEOF
4975 rm -f conftest.$ac_objext conftest$ac_exeext
4976 if { (eval echo "$as_me:4976: \"$ac_link\"") >&5
4977   (eval $ac_link) 2>&5
4978   ac_status=$?
4979   echo "$as_me:4979: \$? = $ac_status" >&5
4980   (exit $ac_status); } &&
4981          { ac_try='test -s conftest$ac_exeext'
4982   { (eval echo "$as_me:4982: \"$ac_try\"") >&5
4983   (eval $ac_try) 2>&5
4984   ac_status=$?
4985   echo "$as_me:4985: \$? = $ac_status" >&5
4986   (exit $ac_status); }; }; then
4987   ac_cv_lib_gpm_Gpm_Wgetch=yes
4988 else
4989   echo "$as_me: failed program was:" >&5
4990 cat conftest.$ac_ext >&5
4991 ac_cv_lib_gpm_Gpm_Wgetch=no
4992 fi
4993 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4994 LIBS=$ac_check_lib_save_LIBS
4995 fi
4996 echo "$as_me:4996: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4997 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4998 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4999
5000 echo "$as_me:5000: checking if GPM is weakly bound to curses library" >&5
5001 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5002 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5003   echo $ECHO_N "(cached) $ECHO_C" >&6
5004 else
5005
5006 cf_cv_check_gpm_wgetch=unknown
5007 if test "$cross_compiling" != yes ; then
5008
5009 cat >conftest.$ac_ext <<CF_EOF
5010 #include <gpm.h>
5011 int main()
5012 {
5013         Gpm_Wgetch();
5014         ${cf_cv_main_return:-return}(0);
5015 }
5016 CF_EOF
5017
5018         cf_save_LIBS="$LIBS"
5019         # This only works if we can look at the symbol table.  If a shared
5020         # library is stripped for install, we cannot use that.  So we're forced
5021         # to rely on the static library, noting that some packagers may not
5022         # include it.
5023         LIBS="-static -lgpm -dynamic $LIBS"
5024         if { (eval echo "$as_me:5024: \"$ac_compile\"") >&5
5025   (eval $ac_compile) 2>&5
5026   ac_status=$?
5027   echo "$as_me:5027: \$? = $ac_status" >&5
5028   (exit $ac_status); } ; then
5029                 if { (eval echo "$as_me:5029: \"$ac_link\"") >&5
5030   (eval $ac_link) 2>&5
5031   ac_status=$?
5032   echo "$as_me:5032: \$? = $ac_status" >&5
5033   (exit $ac_status); } ; then
5034                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5035                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5036                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5037                 fi
5038         fi
5039         rm -f conftest*
5040         LIBS="$cf_save_LIBS"
5041 fi
5042
5043 fi
5044 echo "$as_me:5044: result: $cf_cv_check_gpm_wgetch" >&5
5045 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5046
5047 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5048         { echo "$as_me:5048: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5049 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5050 fi
5051
5052 fi
5053
5054 fi
5055
5056 # not everyone has "test -c"
5057 if test -c /dev/sysmouse 2>/dev/null ; then
5058 echo "$as_me:5058: checking if you want to use sysmouse" >&5
5059 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5060
5061 # Check whether --with-sysmouse or --without-sysmouse was given.
5062 if test "${with_sysmouse+set}" = set; then
5063   withval="$with_sysmouse"
5064   cf_with_sysmouse=$withval
5065 else
5066   cf_with_sysmouse=maybe
5067 fi;
5068         if test "$cf_with_sysmouse" != no ; then
5069         cat >conftest.$ac_ext <<_ACEOF
5070 #line 5070 "configure"
5071 #include "confdefs.h"
5072
5073 #include <osreldate.h>
5074 #if (__FreeBSD_version >= 400017)
5075 #include <sys/consio.h>
5076 #include <sys/fbio.h>
5077 #else
5078 #include <machine/console.h>
5079 #endif
5080
5081 int
5082 main ()
5083 {
5084
5085         struct mouse_info the_mouse;
5086         ioctl(0, CONS_MOUSECTL, &the_mouse);
5087
5088   ;
5089   return 0;
5090 }
5091 _ACEOF
5092 rm -f conftest.$ac_objext
5093 if { (eval echo "$as_me:5093: \"$ac_compile\"") >&5
5094   (eval $ac_compile) 2>&5
5095   ac_status=$?
5096   echo "$as_me:5096: \$? = $ac_status" >&5
5097   (exit $ac_status); } &&
5098          { ac_try='test -s conftest.$ac_objext'
5099   { (eval echo "$as_me:5099: \"$ac_try\"") >&5
5100   (eval $ac_try) 2>&5
5101   ac_status=$?
5102   echo "$as_me:5102: \$? = $ac_status" >&5
5103   (exit $ac_status); }; }; then
5104   cf_with_sysmouse=yes
5105 else
5106   echo "$as_me: failed program was:" >&5
5107 cat conftest.$ac_ext >&5
5108 cf_with_sysmouse=no
5109 fi
5110 rm -f conftest.$ac_objext conftest.$ac_ext
5111         fi
5112 echo "$as_me:5112: result: $cf_with_sysmouse" >&5
5113 echo "${ECHO_T}$cf_with_sysmouse" >&6
5114 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5115 #define USE_SYSMOUSE 1
5116 EOF
5117
5118 fi
5119
5120 if test X"$CC_G_OPT" = X"" ; then
5121         CC_G_OPT='-g'
5122         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5123 fi
5124
5125 if test X"$CXX_G_OPT" = X"" ; then
5126         CXX_G_OPT='-g'
5127         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5128 fi
5129
5130 echo "$as_me:5130: checking for default loader flags" >&5
5131 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5132 case $DFT_LWR_MODEL in
5133 libtool) LD_MODEL=''   ;;
5134 normal)  LD_MODEL=''   ;;
5135 debug)   LD_MODEL=$CC_G_OPT ;;
5136 profile) LD_MODEL='-pg';;
5137 shared)  LD_MODEL=''   ;;
5138 esac
5139 echo "$as_me:5139: result: $LD_MODEL" >&5
5140 echo "${ECHO_T}$LD_MODEL" >&6
5141
5142 case $DFT_LWR_MODEL in
5143 shared)
5144
5145 echo "$as_me:5145: checking if rpath option should be used" >&5
5146 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5147
5148 # Check whether --enable-rpath or --disable-rpath was given.
5149 if test "${enable_rpath+set}" = set; then
5150   enableval="$enable_rpath"
5151   cf_cv_ld_rpath=$enableval
5152 else
5153   cf_cv_ld_rpath=no
5154 fi;
5155 echo "$as_me:5155: result: $cf_cv_ld_rpath" >&5
5156 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5157
5158 echo "$as_me:5158: checking if shared libraries should be relinked during install" >&5
5159 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5160
5161 # Check whether --enable-relink or --disable-relink was given.
5162 if test "${enable_relink+set}" = set; then
5163   enableval="$enable_relink"
5164   cf_cv_do_relink=$enableval
5165 else
5166   cf_cv_do_relink=yes
5167 fi;
5168 echo "$as_me:5168: result: $cf_cv_do_relink" >&5
5169 echo "${ECHO_T}$cf_cv_do_relink" >&6
5170         ;;
5171 esac
5172
5173         LOCAL_LDFLAGS=
5174         LOCAL_LDFLAGS2=
5175         LD_RPATH_OPT=
5176         LD_SHARED_OPTS=
5177         INSTALL_LIB="-m 644"
5178
5179         cf_cv_do_symlinks=no
5180
5181         echo "$as_me:5181: checking if release/abi version should be used for shared libs" >&5
5182 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5183
5184 # Check whether --with-shlib-version or --without-shlib-version was given.
5185 if test "${with_shlib_version+set}" = set; then
5186   withval="$with_shlib_version"
5187   test -z "$withval" && withval=auto
5188         case $withval in #(vi
5189         yes) #(vi
5190                 cf_cv_shlib_version=auto
5191                 ;;
5192         rel|abi|auto|no) #(vi
5193                 cf_cv_shlib_version=$withval
5194                 ;;
5195         *)
5196                 { { echo "$as_me:5196: error: option value must be one of: rel, abi, auto or no" >&5
5197 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5198    { (exit 1); exit 1; }; }
5199                 ;;
5200         esac
5201
5202 else
5203   cf_cv_shlib_version=auto
5204 fi;
5205         echo "$as_me:5205: result: $cf_cv_shlib_version" >&5
5206 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5207
5208         cf_cv_rm_so_locs=no
5209
5210         # Some less-capable ports of gcc support only -fpic
5211         CC_SHARED_OPTS=
5212         if test "$GCC" = yes
5213         then
5214                 echo "$as_me:5214: checking which $CC option to use" >&5
5215 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5216                 cf_save_CFLAGS="$CFLAGS"
5217                 for CC_SHARED_OPTS in -fPIC -fpic ''
5218                 do
5219                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5220                         cat >conftest.$ac_ext <<_ACEOF
5221 #line 5221 "configure"
5222 #include "confdefs.h"
5223 #include <stdio.h>
5224 int
5225 main ()
5226 {
5227 int x = 1
5228   ;
5229   return 0;
5230 }
5231 _ACEOF
5232 rm -f conftest.$ac_objext
5233 if { (eval echo "$as_me:5233: \"$ac_compile\"") >&5
5234   (eval $ac_compile) 2>&5
5235   ac_status=$?
5236   echo "$as_me:5236: \$? = $ac_status" >&5
5237   (exit $ac_status); } &&
5238          { ac_try='test -s conftest.$ac_objext'
5239   { (eval echo "$as_me:5239: \"$ac_try\"") >&5
5240   (eval $ac_try) 2>&5
5241   ac_status=$?
5242   echo "$as_me:5242: \$? = $ac_status" >&5
5243   (exit $ac_status); }; }; then
5244   break
5245 else
5246   echo "$as_me: failed program was:" >&5
5247 cat conftest.$ac_ext >&5
5248 fi
5249 rm -f conftest.$ac_objext conftest.$ac_ext
5250                 done
5251                 echo "$as_me:5251: result: $CC_SHARED_OPTS" >&5
5252 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5253                 CFLAGS="$cf_save_CFLAGS"
5254         fi
5255
5256         cf_cv_shlib_version_infix=no
5257
5258         case $cf_cv_system_name in
5259         aix[56]*)
5260                 if test "$GCC" = yes; then
5261                         CC_SHARED_OPTS=
5262                         MK_SHARED_LIB="$(CC) -shared"
5263                 fi
5264                 ;;
5265         beos*)
5266                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5267                 ;;
5268         cygwin*)
5269                 CC_SHARED_OPTS=
5270                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5271                 cf_cv_shlib_version=cygdll
5272                 cf_cv_shlib_version_infix=cygdll
5273                 cat >mk_shared_lib.sh <<-CF_EOF
5274                 #!/bin/sh
5275                 SHARED_LIB=\$1
5276                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5277                 shift
5278                 cat <<-EOF
5279                 Linking shared library
5280                 ** SHARED_LIB \$SHARED_LIB
5281                 ** IMPORT_LIB \$IMPORT_LIB
5282 EOF
5283                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5284 CF_EOF
5285                 chmod +x mk_shared_lib.sh
5286                 ;;
5287         darwin*)
5288                 EXTRA_CFLAGS="-no-cpp-precomp"
5289                 CC_SHARED_OPTS="-dynamic"
5290                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5291                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5292                 cf_cv_shlib_version_infix=yes
5293                 echo "$as_me:5293: checking if ld -search_paths_first works" >&5
5294 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5295 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5296   echo $ECHO_N "(cached) $ECHO_C" >&6
5297 else
5298
5299                         cf_save_LDFLAGS=$LDFLAGS
5300                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5301                         cat >conftest.$ac_ext <<_ACEOF
5302 #line 5302 "configure"
5303 #include "confdefs.h"
5304
5305 int
5306 main ()
5307 {
5308 int i;
5309   ;
5310   return 0;
5311 }
5312 _ACEOF
5313 rm -f conftest.$ac_objext conftest$ac_exeext
5314 if { (eval echo "$as_me:5314: \"$ac_link\"") >&5
5315   (eval $ac_link) 2>&5
5316   ac_status=$?
5317   echo "$as_me:5317: \$? = $ac_status" >&5
5318   (exit $ac_status); } &&
5319          { ac_try='test -s conftest$ac_exeext'
5320   { (eval echo "$as_me:5320: \"$ac_try\"") >&5
5321   (eval $ac_try) 2>&5
5322   ac_status=$?
5323   echo "$as_me:5323: \$? = $ac_status" >&5
5324   (exit $ac_status); }; }; then
5325   cf_cv_ldflags_search_paths_first=yes
5326 else
5327   echo "$as_me: failed program was:" >&5
5328 cat conftest.$ac_ext >&5
5329 cf_cv_ldflags_search_paths_first=no
5330 fi
5331 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5332                                 LDFLAGS=$cf_save_LDFLAGS
5333 fi
5334 echo "$as_me:5334: result: $cf_cv_ldflags_search_paths_first" >&5
5335 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5336                 if test $cf_cv_ldflags_search_paths_first = yes; then
5337                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5338                 fi
5339                 ;;
5340         hpux*)
5341                 # (tested with gcc 2.7.2 -- I don't have c89)
5342                 if test "$GCC" = yes; then
5343                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5344                 else
5345                         CC_SHARED_OPTS='+Z'
5346                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5347                 fi
5348                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5349                 # HP-UX shared libraries must be executable, and should be
5350                 # readonly to exploit a quirk in the memory manager.
5351                 INSTALL_LIB="-m 555"
5352                 ;;
5353         irix*)
5354                 if test "$cf_cv_ld_rpath" = yes ; then
5355                         if test "$GCC" = yes; then
5356                                 LD_RPATH_OPT="-Wl,-rpath,"
5357                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5358                         else
5359                                 LD_RPATH_OPT="-rpath "
5360                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5361                         fi
5362                 fi
5363                 # tested with IRIX 5.2 and 'cc'.
5364                 if test "$GCC" != yes; then
5365                         CC_SHARED_OPTS='-KPIC'
5366                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5367                 else
5368                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5369                 fi
5370                 cf_cv_rm_so_locs=yes
5371                 ;;
5372         linux*|gnu*|k*bsd*-gnu)
5373                 if test "$DFT_LWR_MODEL" = "shared" ; then
5374                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5375                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5376                 fi
5377                 if test "$cf_cv_ld_rpath" = yes ; then
5378                         LD_RPATH_OPT="-Wl,-rpath,"
5379                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5380                 fi
5381
5382         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5383         if test "$cf_cv_shlib_version" = rel; then
5384                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5385         else
5386                 cf_cv_shared_soname='`basename $@`'
5387         fi
5388
5389                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5390                 ;;
5391         openbsd[2-9].*)
5392                 if test "$DFT_LWR_MODEL" = "shared" ; then
5393                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5394                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5395                 fi
5396                 if test "$cf_cv_ld_rpath" = yes ; then
5397                         LD_RPATH_OPT="-Wl,-rpath,"
5398                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5399                 fi
5400                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5401
5402         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5403         if test "$cf_cv_shlib_version" = rel; then
5404                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5405         else
5406                 cf_cv_shared_soname='`basename $@`'
5407         fi
5408
5409                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5410                 ;;
5411         nto-qnx*|openbsd*|freebsd[12].*)
5412                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5413                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5414                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5415                 ;;
5416         freebsd*)
5417                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5418                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5419                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5420                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5421                         LD_RPATH_OPT="-rpath "
5422                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5423                 fi
5424
5425         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5426         if test "$cf_cv_shlib_version" = rel; then
5427                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5428         else
5429                 cf_cv_shared_soname='`basename $@`'
5430         fi
5431
5432                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5433                 ;;
5434         netbsd*)
5435                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5436                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5437                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5438                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5439                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5440                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5441                         if test "$cf_cv_shlib_version" = auto; then
5442                         if test -f /usr/libexec/ld.elf_so; then
5443                                 cf_cv_shlib_version=abi
5444                         else
5445                                 cf_cv_shlib_version=rel
5446                         fi
5447                         fi
5448
5449         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5450         if test "$cf_cv_shlib_version" = rel; then
5451                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5452         else
5453                 cf_cv_shared_soname='`basename $@`'
5454         fi
5455
5456                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5457                 else
5458                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5459                 fi
5460                 ;;
5461         osf*|mls+*)
5462                 # tested with OSF/1 V3.2 and 'cc'
5463                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5464                 # link with shared libs).
5465                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5466                 case $host_os in
5467                 osf4*)
5468                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5469                         ;;
5470                 esac
5471                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5472                 if test "$DFT_LWR_MODEL" = "shared" ; then
5473                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5474                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5475                 fi
5476                 if test "$cf_cv_ld_rpath" = yes ; then
5477                         LD_RPATH_OPT="-rpath"
5478                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5479                 fi
5480                 cf_cv_rm_so_locs=yes
5481                 ;;
5482         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5483                 # tested with osr5.0.5
5484                 if test "$GCC" != yes; then
5485                         CC_SHARED_OPTS='-belf -KPIC'
5486                 fi
5487                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5488                 if test "$cf_cv_ld_rpath" = yes ; then
5489                         # only way is to set LD_RUN_PATH but no switch for it
5490                         RUN_PATH=$libdir
5491                 fi
5492                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5493                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5494                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5495                 ;;
5496         sunos4*)
5497                 # tested with SunOS 4.1.1 and gcc 2.7.0
5498                 if test "$GCC" != yes; then
5499                         CC_SHARED_OPTS='-KPIC'
5500                 fi
5501                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5502                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5503                 ;;
5504         solaris2*)
5505                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5506                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5507                 if test "$DFT_LWR_MODEL" = "shared" ; then
5508                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5509                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5510                 fi
5511                 if test "$cf_cv_ld_rpath" = yes ; then
5512                         LD_RPATH_OPT="-R"
5513                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5514                 fi
5515
5516         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5517         if test "$cf_cv_shlib_version" = rel; then
5518                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5519         else
5520                 cf_cv_shared_soname='`basename $@`'
5521         fi
5522
5523                 if test "$GCC" != yes; then
5524                         cf_save_CFLAGS="$CFLAGS"
5525                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5526                         do
5527                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5528                                 cat >conftest.$ac_ext <<_ACEOF
5529 #line 5529 "configure"
5530 #include "confdefs.h"
5531 #include <stdio.h>
5532 int
5533 main ()
5534 {
5535 printf("Hello\n");
5536   ;
5537   return 0;
5538 }
5539 _ACEOF
5540 rm -f conftest.$ac_objext
5541 if { (eval echo "$as_me:5541: \"$ac_compile\"") >&5
5542   (eval $ac_compile) 2>&5
5543   ac_status=$?
5544   echo "$as_me:5544: \$? = $ac_status" >&5
5545   (exit $ac_status); } &&
5546          { ac_try='test -s conftest.$ac_objext'
5547   { (eval echo "$as_me:5547: \"$ac_try\"") >&5
5548   (eval $ac_try) 2>&5
5549   ac_status=$?
5550   echo "$as_me:5550: \$? = $ac_status" >&5
5551   (exit $ac_status); }; }; then
5552   break
5553 else
5554   echo "$as_me: failed program was:" >&5
5555 cat conftest.$ac_ext >&5
5556 fi
5557 rm -f conftest.$ac_objext conftest.$ac_ext
5558                         done
5559                         CFLAGS="$cf_save_CFLAGS"
5560                         CC_SHARED_OPTS=$cf_shared_opts
5561                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5562                 else
5563                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5564                 fi
5565                 ;;
5566         sysv5uw7*|unix_sv*)
5567                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5568                 if test "$GCC" != yes; then
5569                         CC_SHARED_OPTS='-KPIC'
5570                 fi
5571                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5572                 ;;
5573         *)
5574                 CC_SHARED_OPTS='unknown'
5575                 MK_SHARED_LIB='echo unknown'
5576                 ;;
5577         esac
5578
5579         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5580         case "$cf_cv_shlib_version" in #(vi
5581         rel|abi)
5582                 case "$MK_SHARED_LIB" in #(vi
5583                 *'-o $@')
5584                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5585                         ;;
5586                 *)
5587                         { echo "$as_me:5587: WARNING: ignored --with-shlib-version" >&5
5588 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5589                         ;;
5590                 esac
5591                 ;;
5592         esac
5593
5594         if test -n "$LD_RPATH_OPT" ; then
5595                 echo "$as_me:5595: checking if we need a space after rpath option" >&5
5596 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5597                 cf_save_LIBS="$LIBS"
5598                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5599                 cat >conftest.$ac_ext <<_ACEOF
5600 #line 5600 "configure"
5601 #include "confdefs.h"
5602
5603 int
5604 main ()
5605 {
5606
5607   ;
5608   return 0;
5609 }
5610 _ACEOF
5611 rm -f conftest.$ac_objext conftest$ac_exeext
5612 if { (eval echo "$as_me:5612: \"$ac_link\"") >&5
5613   (eval $ac_link) 2>&5
5614   ac_status=$?
5615   echo "$as_me:5615: \$? = $ac_status" >&5
5616   (exit $ac_status); } &&
5617          { ac_try='test -s conftest$ac_exeext'
5618   { (eval echo "$as_me:5618: \"$ac_try\"") >&5
5619   (eval $ac_try) 2>&5
5620   ac_status=$?
5621   echo "$as_me:5621: \$? = $ac_status" >&5
5622   (exit $ac_status); }; }; then
5623   cf_rpath_space=no
5624 else
5625   echo "$as_me: failed program was:" >&5
5626 cat conftest.$ac_ext >&5
5627 cf_rpath_space=yes
5628 fi
5629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5630                 LIBS="$cf_save_LIBS"
5631                 echo "$as_me:5631: result: $cf_rpath_space" >&5
5632 echo "${ECHO_T}$cf_rpath_space" >&6
5633                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5634                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5635         fi
5636
5637 if test "$CC_SHARED_OPTS" = "unknown"; then
5638         for model in $cf_list_models; do
5639                 if test "$model" = "shared"; then
5640                         { { echo "$as_me:5640: error: Shared libraries are not supported in this version" >&5
5641 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5642    { (exit 1); exit 1; }; }
5643                 fi
5644         done
5645 fi
5646
5647 ###############################################################################
5648
5649 ###     use option --disable-overwrite to leave out the link to -lcurses
5650 echo "$as_me:5650: checking if you wish to install ncurses overwriting curses" >&5
5651 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5652
5653 # Check whether --enable-overwrite or --disable-overwrite was given.
5654 if test "${enable_overwrite+set}" = set; then
5655   enableval="$enable_overwrite"
5656   with_overwrite=$enableval
5657 else
5658   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5659 fi;
5660 echo "$as_me:5660: result: $with_overwrite" >&5
5661 echo "${ECHO_T}$with_overwrite" >&6
5662
5663 echo "$as_me:5663: checking if external terminfo-database is used" >&5
5664 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5665
5666 # Check whether --enable-database or --disable-database was given.
5667 if test "${enable_database+set}" = set; then
5668   enableval="$enable_database"
5669   use_database=$enableval
5670 else
5671   use_database=yes
5672 fi;
5673 echo "$as_me:5673: result: $use_database" >&5
5674 echo "${ECHO_T}$use_database" >&6
5675
5676 case $host_os in #(vi
5677 os2*) #(vi
5678         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5679         ;;
5680 *) #(vi
5681         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5682         ;;
5683 esac
5684
5685         case $cf_cv_system_name in
5686         os2*)   PATH_SEPARATOR=';'  ;;
5687         *)      PATH_SEPARATOR=':'  ;;
5688         esac
5689
5690 if test "$use_database" != no ; then
5691         cat >>confdefs.h <<\EOF
5692 #define USE_DATABASE 1
5693 EOF
5694
5695         echo "$as_me:5695: checking which terminfo source-file will be installed" >&5
5696 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5697
5698 # Check whether --with-database or --without-database was given.
5699 if test "${with_database+set}" = set; then
5700   withval="$with_database"
5701   TERMINFO_SRC=$withval
5702 fi;
5703         echo "$as_me:5703: result: $TERMINFO_SRC" >&5
5704 echo "${ECHO_T}$TERMINFO_SRC" >&6
5705
5706         echo "$as_me:5706: checking whether to use hashed database instead of directory/tree" >&5
5707 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5708
5709 # Check whether --with-hashed-db or --without-hashed-db was given.
5710 if test "${with_hashed_db+set}" = set; then
5711   withval="$with_hashed_db"
5712
5713 else
5714   with_hashed_db=no
5715 fi;
5716         echo "$as_me:5716: result: $with_hashed_db" >&5
5717 echo "${ECHO_T}$with_hashed_db" >&6
5718 else
5719         with_hashed_db=no
5720 fi
5721
5722 echo "$as_me:5722: checking for list of fallback descriptions" >&5
5723 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5724
5725 # Check whether --with-fallbacks or --without-fallbacks was given.
5726 if test "${with_fallbacks+set}" = set; then
5727   withval="$with_fallbacks"
5728   with_fallback=$withval
5729 else
5730   with_fallback=
5731 fi;
5732 echo "$as_me:5732: result: $with_fallback" >&5
5733 echo "${ECHO_T}$with_fallback" >&6
5734 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5735
5736 echo "$as_me:5736: checking if you want modern xterm or antique" >&5
5737 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5738
5739 # Check whether --with-xterm-new or --without-xterm-new was given.
5740 if test "${with_xterm_new+set}" = set; then
5741   withval="$with_xterm_new"
5742   with_xterm_new=$withval
5743 else
5744   with_xterm_new=yes
5745 fi;
5746 case $with_xterm_new in
5747 no)     with_xterm_new=xterm-old;;
5748 *)      with_xterm_new=xterm-new;;
5749 esac
5750 echo "$as_me:5750: result: $with_xterm_new" >&5
5751 echo "${ECHO_T}$with_xterm_new" >&6
5752 WHICH_XTERM=$with_xterm_new
5753
5754 MAKE_TERMINFO=
5755 if test "$use_database" = no ; then
5756         TERMINFO="${datadir}/terminfo"
5757         MAKE_TERMINFO="#"
5758 else
5759
5760 echo "$as_me:5760: checking for list of terminfo directories" >&5
5761 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5762
5763 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5764 if test "${with_terminfo_dirs+set}" = set; then
5765   withval="$with_terminfo_dirs"
5766
5767 else
5768   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5769 fi;
5770 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5771 cf_dst_path=
5772 for cf_src_path in $withval
5773 do
5774
5775 if test "x$prefix" != xNONE; then
5776   cf_path_syntax="$prefix"
5777 else
5778   cf_path_syntax="$ac_default_prefix"
5779 fi
5780
5781 case ".$cf_src_path" in #(vi
5782 .\$\(*\)*|.\'*\'*) #(vi
5783   ;;
5784 ..|./*|.\\*) #(vi
5785   ;;
5786 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5787   ;;
5788 .\${*prefix}*) #(vi
5789   eval cf_src_path="$cf_src_path"
5790   case ".$cf_src_path" in #(vi
5791   .NONE/*)
5792     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5793     ;;
5794   esac
5795   ;; #(vi
5796 .no|.NONE/*)
5797   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5798   ;;
5799 *)
5800   { { echo "$as_me:5800: error: expected a pathname, not \"$cf_src_path\"" >&5
5801 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5802    { (exit 1); exit 1; }; }
5803   ;;
5804 esac
5805
5806   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5807   cf_dst_path="${cf_dst_path}${cf_src_path}"
5808 done
5809 IFS="$ac_save_ifs"
5810
5811 eval 'TERMINFO_DIRS="$cf_dst_path"'
5812
5813 echo "$as_me:5813: result: $TERMINFO_DIRS" >&5
5814 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5815 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5816 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5817 EOF
5818
5819 echo "$as_me:5819: checking for default terminfo directory" >&5
5820 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5821
5822 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5823 if test "${with_default_terminfo_dir+set}" = set; then
5824   withval="$with_default_terminfo_dir"
5825
5826 else
5827   withval="${TERMINFO-${datadir}/terminfo}"
5828 fi; if test -n "${datadir}/terminfo" ; then
5829
5830 if test "x$prefix" != xNONE; then
5831   cf_path_syntax="$prefix"
5832 else
5833   cf_path_syntax="$ac_default_prefix"
5834 fi
5835
5836 case ".$withval" in #(vi
5837 .\$\(*\)*|.\'*\'*) #(vi
5838   ;;
5839 ..|./*|.\\*) #(vi
5840   ;;
5841 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5842   ;;
5843 .\${*prefix}*) #(vi
5844   eval withval="$withval"
5845   case ".$withval" in #(vi
5846   .NONE/*)
5847     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5848     ;;
5849   esac
5850   ;; #(vi
5851 .no|.NONE/*)
5852   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5853   ;;
5854 *)
5855   { { echo "$as_me:5855: error: expected a pathname, not \"$withval\"" >&5
5856 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5857    { (exit 1); exit 1; }; }
5858   ;;
5859 esac
5860
5861 fi
5862 TERMINFO="$withval"
5863
5864 echo "$as_me:5864: result: $TERMINFO" >&5
5865 echo "${ECHO_T}$TERMINFO" >&6
5866 cat >>confdefs.h <<EOF
5867 #define TERMINFO "$TERMINFO"
5868 EOF
5869
5870 fi
5871
5872 ###     use option --disable-big-core to make tic run on small machines
5873 ###     We need 4Mb, check if we can allocate 50% more than that.
5874 echo "$as_me:5874: checking if big-core option selected" >&5
5875 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5876
5877 # Check whether --enable-big-core or --disable-big-core was given.
5878 if test "${enable_big_core+set}" = set; then
5879   enableval="$enable_big_core"
5880   with_big_core=$enableval
5881 else
5882   if test "$cross_compiling" = yes; then
5883   with_big_core=no
5884 else
5885   cat >conftest.$ac_ext <<_ACEOF
5886 #line 5886 "configure"
5887 #include "confdefs.h"
5888
5889 #include <stdlib.h>
5890 #include <string.h>
5891 int main() {
5892         unsigned long n = 6000000L;
5893         char *s = malloc(n);
5894         if (s != 0)
5895                 s[0] = s[n-1] = 0;
5896         ${cf_cv_main_return:-return}(s == 0);
5897 }
5898 _ACEOF
5899 rm -f conftest$ac_exeext
5900 if { (eval echo "$as_me:5900: \"$ac_link\"") >&5
5901   (eval $ac_link) 2>&5
5902   ac_status=$?
5903   echo "$as_me:5903: \$? = $ac_status" >&5
5904   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5905   { (eval echo "$as_me:5905: \"$ac_try\"") >&5
5906   (eval $ac_try) 2>&5
5907   ac_status=$?
5908   echo "$as_me:5908: \$? = $ac_status" >&5
5909   (exit $ac_status); }; }; then
5910   with_big_core=yes
5911 else
5912   echo "$as_me: program exited with status $ac_status" >&5
5913 echo "$as_me: failed program was:" >&5
5914 cat conftest.$ac_ext >&5
5915 with_big_core=no
5916 fi
5917 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5918 fi
5919 fi;
5920 echo "$as_me:5920: result: $with_big_core" >&5
5921 echo "${ECHO_T}$with_big_core" >&6
5922 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5923 #define HAVE_BIG_CORE 1
5924 EOF
5925
5926 ### ISO C only guarantees 512-char strings, we have tables which load faster
5927 ### when constructed using "big" strings.  More than the C compiler, the awk
5928 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5929 echo "$as_me:5929: checking if big-strings option selected" >&5
5930 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5931
5932 # Check whether --enable-big-strings or --disable-big-strings was given.
5933 if test "${enable_big_strings+set}" = set; then
5934   enableval="$enable_big_strings"
5935   with_big_strings=$enableval
5936 else
5937
5938         case x$AWK in #(vi
5939         x)
5940                 eval with_big_strings=no
5941                 ;;
5942         *) #(vi
5943                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5944                         | $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
5945                         eval with_big_strings=yes
5946                 else
5947                         eval with_big_strings=no
5948                 fi
5949                 ;;
5950         esac
5951
5952 fi;
5953 echo "$as_me:5953: result: $with_big_strings" >&5
5954 echo "${ECHO_T}$with_big_strings" >&6
5955
5956 USE_BIG_STRINGS=0
5957 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5958
5959 ###     use option --enable-termcap to compile in the termcap fallback support
5960 echo "$as_me:5960: checking if you want termcap-fallback support" >&5
5961 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5962
5963 # Check whether --enable-termcap or --disable-termcap was given.
5964 if test "${enable_termcap+set}" = set; then
5965   enableval="$enable_termcap"
5966   with_termcap=$enableval
5967 else
5968   with_termcap=no
5969 fi;
5970 echo "$as_me:5970: result: $with_termcap" >&5
5971 echo "${ECHO_T}$with_termcap" >&6
5972
5973 if test "$with_termcap" != "yes" ; then
5974         if test "$use_database" = no ; then
5975                 if test -z "$with_fallback" ; then
5976                         { { echo "$as_me:5976: error: You have disabled the database w/o specifying fallbacks" >&5
5977 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5978    { (exit 1); exit 1; }; }
5979                 fi
5980         fi
5981         cat >>confdefs.h <<\EOF
5982 #define PURE_TERMINFO 1
5983 EOF
5984
5985 else
5986
5987 if test "$with_ticlib" != no ; then
5988         { { echo "$as_me:5988: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5989 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5990    { (exit 1); exit 1; }; }
5991 fi
5992
5993 cat >>confdefs.h <<\EOF
5994 #define USE_TERMCAP 1
5995 EOF
5996
5997 echo "$as_me:5997: checking for list of termcap files" >&5
5998 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5999
6000 # Check whether --with-termpath or --without-termpath was given.
6001 if test "${with_termpath+set}" = set; then
6002   withval="$with_termpath"
6003
6004 else
6005   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6006 fi;
6007 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6008 cf_dst_path=
6009 for cf_src_path in $withval
6010 do
6011
6012 if test "x$prefix" != xNONE; then
6013   cf_path_syntax="$prefix"
6014 else
6015   cf_path_syntax="$ac_default_prefix"
6016 fi
6017
6018 case ".$cf_src_path" in #(vi
6019 .\$\(*\)*|.\'*\'*) #(vi
6020   ;;
6021 ..|./*|.\\*) #(vi
6022   ;;
6023 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6024   ;;
6025 .\${*prefix}*) #(vi
6026   eval cf_src_path="$cf_src_path"
6027   case ".$cf_src_path" in #(vi
6028   .NONE/*)
6029     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6030     ;;
6031   esac
6032   ;; #(vi
6033 .no|.NONE/*)
6034   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6035   ;;
6036 *)
6037   { { echo "$as_me:6037: error: expected a pathname, not \"$cf_src_path\"" >&5
6038 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6039    { (exit 1); exit 1; }; }
6040   ;;
6041 esac
6042
6043   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6044   cf_dst_path="${cf_dst_path}${cf_src_path}"
6045 done
6046 IFS="$ac_save_ifs"
6047
6048 eval 'TERMPATH="$cf_dst_path"'
6049
6050 echo "$as_me:6050: result: $TERMPATH" >&5
6051 echo "${ECHO_T}$TERMPATH" >&6
6052 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6053 #define TERMPATH "$TERMPATH"
6054 EOF
6055
6056 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6057 echo "$as_me:6057: checking if fast termcap-loader is needed" >&5
6058 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6059
6060 # Check whether --enable-getcap or --disable-getcap was given.
6061 if test "${enable_getcap+set}" = set; then
6062   enableval="$enable_getcap"
6063   with_getcap=$enableval
6064 else
6065   with_getcap=no
6066 fi;
6067 echo "$as_me:6067: result: $with_getcap" >&5
6068 echo "${ECHO_T}$with_getcap" >&6
6069 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6070 #define USE_GETCAP 1
6071 EOF
6072
6073 echo "$as_me:6073: checking if translated termcaps will be cached in ~/.terminfo" >&5
6074 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6075
6076 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6077 if test "${enable_getcap_cache+set}" = set; then
6078   enableval="$enable_getcap_cache"
6079   with_getcap_cache=$enableval
6080 else
6081   with_getcap_cache=no
6082 fi;
6083 echo "$as_me:6083: result: $with_getcap_cache" >&5
6084 echo "${ECHO_T}$with_getcap_cache" >&6
6085 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6086 #define USE_GETCAP_CACHE 1
6087 EOF
6088
6089 fi
6090
6091 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6092 echo "$as_me:6092: checking if ~/.terminfo is wanted" >&5
6093 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6094
6095 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6096 if test "${enable_home_terminfo+set}" = set; then
6097   enableval="$enable_home_terminfo"
6098   with_home_terminfo=$enableval
6099 else
6100   with_home_terminfo=yes
6101 fi;
6102 echo "$as_me:6102: result: $with_home_terminfo" >&5
6103 echo "${ECHO_T}$with_home_terminfo" >&6
6104 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6105 #define USE_HOME_TERMINFO 1
6106 EOF
6107
6108 echo "$as_me:6108: checking if you want to use restricted environment when running as root" >&5
6109 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6110
6111 # Check whether --enable-root-environ or --disable-root-environ was given.
6112 if test "${enable_root_environ+set}" = set; then
6113   enableval="$enable_root_environ"
6114   with_root_environ=$enableval
6115 else
6116   with_root_environ=yes
6117 fi;
6118 echo "$as_me:6118: result: $with_root_environ" >&5
6119 echo "${ECHO_T}$with_root_environ" >&6
6120 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6121 #define USE_ROOT_ENVIRON 1
6122 EOF
6123
6124 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6125 ###   to reduce storage requirements for the terminfo database.
6126
6127 for ac_func in \
6128         remove \
6129         unlink
6130 do
6131 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6132 echo "$as_me:6132: checking for $ac_func" >&5
6133 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6134 if eval "test \"\${$as_ac_var+set}\" = set"; then
6135   echo $ECHO_N "(cached) $ECHO_C" >&6
6136 else
6137   cat >conftest.$ac_ext <<_ACEOF
6138 #line 6138 "configure"
6139 #include "confdefs.h"
6140 /* System header to define __stub macros and hopefully few prototypes,
6141     which can conflict with char $ac_func (); below.  */
6142 #include <assert.h>
6143 /* Override any gcc2 internal prototype to avoid an error.  */
6144 #ifdef __cplusplus
6145 extern "C"
6146 #endif
6147 /* We use char because int might match the return type of a gcc2
6148    builtin and then its argument prototype would still apply.  */
6149 char $ac_func ();
6150 char (*f) ();
6151
6152 int
6153 main ()
6154 {
6155 /* The GNU C library defines this for functions which it implements
6156     to always fail with ENOSYS.  Some functions are actually named
6157     something starting with __ and the normal name is an alias.  */
6158 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6159 choke me
6160 #else
6161 f = $ac_func;
6162 #endif
6163
6164   ;
6165   return 0;
6166 }
6167 _ACEOF
6168 rm -f conftest.$ac_objext conftest$ac_exeext
6169 if { (eval echo "$as_me:6169: \"$ac_link\"") >&5
6170   (eval $ac_link) 2>&5
6171   ac_status=$?
6172   echo "$as_me:6172: \$? = $ac_status" >&5
6173   (exit $ac_status); } &&
6174          { ac_try='test -s conftest$ac_exeext'
6175   { (eval echo "$as_me:6175: \"$ac_try\"") >&5
6176   (eval $ac_try) 2>&5
6177   ac_status=$?
6178   echo "$as_me:6178: \$? = $ac_status" >&5
6179   (exit $ac_status); }; }; then
6180   eval "$as_ac_var=yes"
6181 else
6182   echo "$as_me: failed program was:" >&5
6183 cat conftest.$ac_ext >&5
6184 eval "$as_ac_var=no"
6185 fi
6186 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6187 fi
6188 echo "$as_me:6188: result: `eval echo '${'$as_ac_var'}'`" >&5
6189 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6190 if test `eval echo '${'$as_ac_var'}'` = yes; then
6191   cat >>confdefs.h <<EOF
6192 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6193 EOF
6194
6195 fi
6196 done
6197
6198 if test "$cross_compiling" = yes ; then
6199
6200 for ac_func in \
6201                 link \
6202                 symlink
6203 do
6204 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6205 echo "$as_me:6205: checking for $ac_func" >&5
6206 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6207 if eval "test \"\${$as_ac_var+set}\" = set"; then
6208   echo $ECHO_N "(cached) $ECHO_C" >&6
6209 else
6210   cat >conftest.$ac_ext <<_ACEOF
6211 #line 6211 "configure"
6212 #include "confdefs.h"
6213 /* System header to define __stub macros and hopefully few prototypes,
6214     which can conflict with char $ac_func (); below.  */
6215 #include <assert.h>
6216 /* Override any gcc2 internal prototype to avoid an error.  */
6217 #ifdef __cplusplus
6218 extern "C"
6219 #endif
6220 /* We use char because int might match the return type of a gcc2
6221    builtin and then its argument prototype would still apply.  */
6222 char $ac_func ();
6223 char (*f) ();
6224
6225 int
6226 main ()
6227 {
6228 /* The GNU C library defines this for functions which it implements
6229     to always fail with ENOSYS.  Some functions are actually named
6230     something starting with __ and the normal name is an alias.  */
6231 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6232 choke me
6233 #else
6234 f = $ac_func;
6235 #endif
6236
6237   ;
6238   return 0;
6239 }
6240 _ACEOF
6241 rm -f conftest.$ac_objext conftest$ac_exeext
6242 if { (eval echo "$as_me:6242: \"$ac_link\"") >&5
6243   (eval $ac_link) 2>&5
6244   ac_status=$?
6245   echo "$as_me:6245: \$? = $ac_status" >&5
6246   (exit $ac_status); } &&
6247          { ac_try='test -s conftest$ac_exeext'
6248   { (eval echo "$as_me:6248: \"$ac_try\"") >&5
6249   (eval $ac_try) 2>&5
6250   ac_status=$?
6251   echo "$as_me:6251: \$? = $ac_status" >&5
6252   (exit $ac_status); }; }; then
6253   eval "$as_ac_var=yes"
6254 else
6255   echo "$as_me: failed program was:" >&5
6256 cat conftest.$ac_ext >&5
6257 eval "$as_ac_var=no"
6258 fi
6259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6260 fi
6261 echo "$as_me:6261: result: `eval echo '${'$as_ac_var'}'`" >&5
6262 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6263 if test `eval echo '${'$as_ac_var'}'` = yes; then
6264   cat >>confdefs.h <<EOF
6265 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6266 EOF
6267
6268 fi
6269 done
6270
6271 else
6272         echo "$as_me:6272: checking if link/symlink functions work" >&5
6273 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6274 if test "${cf_cv_link_funcs+set}" = set; then
6275   echo $ECHO_N "(cached) $ECHO_C" >&6
6276 else
6277
6278                 cf_cv_link_funcs=
6279                 for cf_func in link symlink ; do
6280                         if test "$cross_compiling" = yes; then
6281
6282                         eval 'ac_cv_func_'$cf_func'=error'
6283 else
6284   cat >conftest.$ac_ext <<_ACEOF
6285 #line 6285 "configure"
6286 #include "confdefs.h"
6287
6288 #include <sys/types.h>
6289 #include <sys/stat.h>
6290 #ifdef HAVE_UNISTD_H
6291 #include <unistd.h>
6292 #endif
6293 int main()
6294 {
6295         int fail = 0;
6296         char *src = "config.log";
6297         char *dst = "conftest.chk";
6298         struct stat src_sb;
6299         struct stat dst_sb;
6300
6301         stat(src, &src_sb);
6302         fail = ($cf_func("config.log", "conftest.chk") < 0)
6303             || (stat(dst, &dst_sb) < 0)
6304             || (dst_sb.st_mtime != src_sb.st_mtime);
6305 #ifdef HAVE_UNLINK
6306         unlink(dst);
6307 #else
6308         remove(dst);
6309 #endif
6310         ${cf_cv_main_return:-return} (fail);
6311 }
6312
6313 _ACEOF
6314 rm -f conftest$ac_exeext
6315 if { (eval echo "$as_me:6315: \"$ac_link\"") >&5
6316   (eval $ac_link) 2>&5
6317   ac_status=$?
6318   echo "$as_me:6318: \$? = $ac_status" >&5
6319   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6320   { (eval echo "$as_me:6320: \"$ac_try\"") >&5
6321   (eval $ac_try) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit $ac_status); }; }; then
6325
6326                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6327                         eval 'ac_cv_func_'$cf_func'=yes'
6328 else
6329   echo "$as_me: program exited with status $ac_status" >&5
6330 echo "$as_me: failed program was:" >&5
6331 cat conftest.$ac_ext >&5
6332
6333                         eval 'ac_cv_func_'$cf_func'=no'
6334 fi
6335 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6336 fi
6337                 done
6338                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6339
6340 fi
6341 echo "$as_me:6341: result: $cf_cv_link_funcs" >&5
6342 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6343         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6344 #define HAVE_LINK 1
6345 EOF
6346
6347         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6348 #define HAVE_SYMLINK 1
6349 EOF
6350
6351 fi
6352
6353 with_links=no
6354 with_symlinks=no
6355
6356 # soft links (symbolic links) are useful for some systems where hard links do
6357 # not work, or to make it simpler to copy terminfo trees around.
6358 if test "$ac_cv_func_symlink" = yes ; then
6359     echo "$as_me:6359: checking if tic should use symbolic links" >&5
6360 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6361
6362 # Check whether --enable-symlinks or --disable-symlinks was given.
6363 if test "${enable_symlinks+set}" = set; then
6364   enableval="$enable_symlinks"
6365   with_symlinks=$enableval
6366 else
6367   with_symlinks=no
6368 fi;
6369     echo "$as_me:6369: result: $with_symlinks" >&5
6370 echo "${ECHO_T}$with_symlinks" >&6
6371 fi
6372
6373 # If we have hard links and did not choose to use soft links instead, there is
6374 # no reason to make this choice optional - use the hard links.
6375 if test "$with_symlinks" = no ; then
6376     echo "$as_me:6376: checking if tic should use hard links" >&5
6377 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6378     if test "$ac_cv_func_link" = yes ; then
6379         with_links=yes
6380     else
6381         with_links=no
6382     fi
6383     echo "$as_me:6383: result: $with_links" >&5
6384 echo "${ECHO_T}$with_links" >&6
6385 fi
6386
6387 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6388 #define USE_LINKS 1
6389 EOF
6390
6391 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6392 #define USE_SYMLINKS 1
6393 EOF
6394
6395 ###   use option --enable-broken-linker to force on use of broken-linker support
6396 echo "$as_me:6396: checking if you want broken-linker support code" >&5
6397 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6398
6399 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6400 if test "${enable_broken_linker+set}" = set; then
6401   enableval="$enable_broken_linker"
6402   with_broken_linker=$enableval
6403 else
6404   with_broken_linker=${BROKEN_LINKER-no}
6405 fi;
6406 echo "$as_me:6406: result: $with_broken_linker" >&5
6407 echo "${ECHO_T}$with_broken_linker" >&6
6408
6409 BROKEN_LINKER=0
6410 if test "$with_broken_linker" = yes ; then
6411         cat >>confdefs.h <<\EOF
6412 #define BROKEN_LINKER 1
6413 EOF
6414
6415         BROKEN_LINKER=1
6416 elif test "$DFT_LWR_MODEL" = shared ; then
6417         case $cf_cv_system_name in #(vi
6418         cygwin*)
6419                 cat >>confdefs.h <<\EOF
6420 #define BROKEN_LINKER 1
6421 EOF
6422
6423                 BROKEN_LINKER=1
6424                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6425
6426 echo "${as_me-configure}:6426: testing cygwin linker is broken anyway ..." 1>&5
6427
6428                 ;;
6429         esac
6430 fi
6431
6432 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6433 echo "$as_me:6433: checking if tputs should process BSD-style prefix padding" >&5
6434 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6435
6436 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6437 if test "${enable_bsdpad+set}" = set; then
6438   enableval="$enable_bsdpad"
6439   with_bsdpad=$enableval
6440 else
6441   with_bsdpad=no
6442 fi;
6443 echo "$as_me:6443: result: $with_bsdpad" >&5
6444 echo "${ECHO_T}$with_bsdpad" >&6
6445 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6446 #define BSD_TPUTS 1
6447 EOF
6448
6449 ###   use option --enable-widec to turn on use of wide-character support
6450 NCURSES_CH_T=chtype
6451 NCURSES_LIBUTF8=0
6452
6453 NEED_WCHAR_H=0
6454 NCURSES_MBSTATE_T=0
6455 NCURSES_WCHAR_T=0
6456 NCURSES_WINT_T=0
6457
6458 # Check to define _XOPEN_SOURCE "automatically"
6459
6460 echo "$as_me:6460: checking if $CC -U and -D options work together" >&5
6461 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6462 if test "${cf_cv_cc_u_d_options+set}" = set; then
6463   echo $ECHO_N "(cached) $ECHO_C" >&6
6464 else
6465
6466         cf_save_CPPFLAGS="$CPPFLAGS"
6467         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6468         cat >conftest.$ac_ext <<_ACEOF
6469 #line 6469 "configure"
6470 #include "confdefs.h"
6471
6472 int
6473 main ()
6474 {
6475
6476 #ifndef U_D_OPTIONS
6477 make an undefined-error
6478 #endif
6479 #ifdef  D_U_OPTIONS
6480 make a defined-error
6481 #endif
6482
6483   ;
6484   return 0;
6485 }
6486 _ACEOF
6487 rm -f conftest.$ac_objext
6488 if { (eval echo "$as_me:6488: \"$ac_compile\"") >&5
6489   (eval $ac_compile) 2>&5
6490   ac_status=$?
6491   echo "$as_me:6491: \$? = $ac_status" >&5
6492   (exit $ac_status); } &&
6493          { ac_try='test -s conftest.$ac_objext'
6494   { (eval echo "$as_me:6494: \"$ac_try\"") >&5
6495   (eval $ac_try) 2>&5
6496   ac_status=$?
6497   echo "$as_me:6497: \$? = $ac_status" >&5
6498   (exit $ac_status); }; }; then
6499
6500         cf_cv_cc_u_d_options=yes
6501 else
6502   echo "$as_me: failed program was:" >&5
6503 cat conftest.$ac_ext >&5
6504
6505         cf_cv_cc_u_d_options=no
6506 fi
6507 rm -f conftest.$ac_objext conftest.$ac_ext
6508         CPPFLAGS="$cf_save_CPPFLAGS"
6509
6510 fi
6511 echo "$as_me:6511: result: $cf_cv_cc_u_d_options" >&5
6512 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6513
6514 cf_XOPEN_SOURCE=500
6515 cf_POSIX_C_SOURCE=199506L
6516
6517 case $host_os in #(vi
6518 aix[456]*) #(vi
6519         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6520         ;;
6521 freebsd*|dragonfly*) #(vi
6522         # 5.x headers associate
6523         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6524         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6525         cf_POSIX_C_SOURCE=200112L
6526         cf_XOPEN_SOURCE=600
6527         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6528         ;;
6529 hpux11*) #(vi
6530         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6531         ;;
6532 hpux*) #(vi
6533         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6534         ;;
6535 irix[56].*) #(vi
6536         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6537         ;;
6538 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6539
6540 echo "$as_me:6540: checking if we must define _GNU_SOURCE" >&5
6541 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6542 if test "${cf_cv_gnu_source+set}" = set; then
6543   echo $ECHO_N "(cached) $ECHO_C" >&6
6544 else
6545
6546 cat >conftest.$ac_ext <<_ACEOF
6547 #line 6547 "configure"
6548 #include "confdefs.h"
6549 #include <sys/types.h>
6550 int
6551 main ()
6552 {
6553
6554 #ifndef _XOPEN_SOURCE
6555 make an error
6556 #endif
6557   ;
6558   return 0;
6559 }
6560 _ACEOF
6561 rm -f conftest.$ac_objext
6562 if { (eval echo "$as_me:6562: \"$ac_compile\"") >&5
6563   (eval $ac_compile) 2>&5
6564   ac_status=$?
6565   echo "$as_me:6565: \$? = $ac_status" >&5
6566   (exit $ac_status); } &&
6567          { ac_try='test -s conftest.$ac_objext'
6568   { (eval echo "$as_me:6568: \"$ac_try\"") >&5
6569   (eval $ac_try) 2>&5
6570   ac_status=$?
6571   echo "$as_me:6571: \$? = $ac_status" >&5
6572   (exit $ac_status); }; }; then
6573   cf_cv_gnu_source=no
6574 else
6575   echo "$as_me: failed program was:" >&5
6576 cat conftest.$ac_ext >&5
6577 cf_save="$CPPFLAGS"
6578          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6579          cat >conftest.$ac_ext <<_ACEOF
6580 #line 6580 "configure"
6581 #include "confdefs.h"
6582 #include <sys/types.h>
6583 int
6584 main ()
6585 {
6586
6587 #ifdef _XOPEN_SOURCE
6588 make an error
6589 #endif
6590   ;
6591   return 0;
6592 }
6593 _ACEOF
6594 rm -f conftest.$ac_objext
6595 if { (eval echo "$as_me:6595: \"$ac_compile\"") >&5
6596   (eval $ac_compile) 2>&5
6597   ac_status=$?
6598   echo "$as_me:6598: \$? = $ac_status" >&5
6599   (exit $ac_status); } &&
6600          { ac_try='test -s conftest.$ac_objext'
6601   { (eval echo "$as_me:6601: \"$ac_try\"") >&5
6602   (eval $ac_try) 2>&5
6603   ac_status=$?
6604   echo "$as_me:6604: \$? = $ac_status" >&5
6605   (exit $ac_status); }; }; then
6606   cf_cv_gnu_source=no
6607 else
6608   echo "$as_me: failed program was:" >&5
6609 cat conftest.$ac_ext >&5
6610 cf_cv_gnu_source=yes
6611 fi
6612 rm -f conftest.$ac_objext conftest.$ac_ext
6613         CPPFLAGS="$cf_save"
6614
6615 fi
6616 rm -f conftest.$ac_objext conftest.$ac_ext
6617
6618 fi
6619 echo "$as_me:6619: result: $cf_cv_gnu_source" >&5
6620 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6621 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6622
6623         ;;
6624 mirbsd*) #(vi
6625         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6626         ;;
6627 netbsd*) #(vi
6628         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6629         ;;
6630 openbsd*) #(vi
6631         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6632         ;;
6633 osf[45]*) #(vi
6634         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6635         ;;
6636 nto-qnx*) #(vi
6637         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6638         ;;
6639 sco*) #(vi
6640         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6641         ;;
6642 solaris*) #(vi
6643         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6644         ;;
6645 *)
6646         echo "$as_me:6646: checking if we should define _XOPEN_SOURCE" >&5
6647 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6648 if test "${cf_cv_xopen_source+set}" = set; then
6649   echo $ECHO_N "(cached) $ECHO_C" >&6
6650 else
6651
6652         cat >conftest.$ac_ext <<_ACEOF
6653 #line 6653 "configure"
6654 #include "confdefs.h"
6655 #include <sys/types.h>
6656 int
6657 main ()
6658 {
6659
6660 #ifndef _XOPEN_SOURCE
6661 make an error
6662 #endif
6663   ;
6664   return 0;
6665 }
6666 _ACEOF
6667 rm -f conftest.$ac_objext
6668 if { (eval echo "$as_me:6668: \"$ac_compile\"") >&5
6669   (eval $ac_compile) 2>&5
6670   ac_status=$?
6671   echo "$as_me:6671: \$? = $ac_status" >&5
6672   (exit $ac_status); } &&
6673          { ac_try='test -s conftest.$ac_objext'
6674   { (eval echo "$as_me:6674: \"$ac_try\"") >&5
6675   (eval $ac_try) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); }; }; then
6679   cf_cv_xopen_source=no
6680 else
6681   echo "$as_me: failed program was:" >&5
6682 cat conftest.$ac_ext >&5
6683 cf_save="$CPPFLAGS"
6684          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6685          cat >conftest.$ac_ext <<_ACEOF
6686 #line 6686 "configure"
6687 #include "confdefs.h"
6688 #include <sys/types.h>
6689 int
6690 main ()
6691 {
6692
6693 #ifdef _XOPEN_SOURCE
6694 make an error
6695 #endif
6696   ;
6697   return 0;
6698 }
6699 _ACEOF
6700 rm -f conftest.$ac_objext
6701 if { (eval echo "$as_me:6701: \"$ac_compile\"") >&5
6702   (eval $ac_compile) 2>&5
6703   ac_status=$?
6704   echo "$as_me:6704: \$? = $ac_status" >&5
6705   (exit $ac_status); } &&
6706          { ac_try='test -s conftest.$ac_objext'
6707   { (eval echo "$as_me:6707: \"$ac_try\"") >&5
6708   (eval $ac_try) 2>&5
6709   ac_status=$?
6710   echo "$as_me:6710: \$? = $ac_status" >&5
6711   (exit $ac_status); }; }; then
6712   cf_cv_xopen_source=no
6713 else
6714   echo "$as_me: failed program was:" >&5
6715 cat conftest.$ac_ext >&5
6716 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6717 fi
6718 rm -f conftest.$ac_objext conftest.$ac_ext
6719         CPPFLAGS="$cf_save"
6720
6721 fi
6722 rm -f conftest.$ac_objext conftest.$ac_ext
6723
6724 fi
6725 echo "$as_me:6725: result: $cf_cv_xopen_source" >&5
6726 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6727         if test "$cf_cv_xopen_source" != no ; then
6728
6729 # remove _XOPEN_SOURCE symbol from $CFLAGS
6730 CFLAGS=`echo "$CFLAGS" | \
6731         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6732                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6733
6734 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6735 CPPFLAGS=`echo "$CPPFLAGS" | \
6736         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6737                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6738
6739                 test "$cf_cv_cc_u_d_options" = yes && \
6740                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6741                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6742         fi
6743
6744 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6745
6746 cf_save_CFLAGS="$CFLAGS"
6747 cf_save_CPPFLAGS="$CPPFLAGS"
6748
6749 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6750 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6751         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6752                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6753
6754 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6755 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6756         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6757                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6758
6759 echo "$as_me:6759: checking if we should define _POSIX_C_SOURCE" >&5
6760 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6761 if test "${cf_cv_posix_c_source+set}" = set; then
6762   echo $ECHO_N "(cached) $ECHO_C" >&6
6763 else
6764
6765 echo "${as_me-configure}:6765: testing if the symbol is already defined go no further ..." 1>&5
6766
6767         cat >conftest.$ac_ext <<_ACEOF
6768 #line 6768 "configure"
6769 #include "confdefs.h"
6770 #include <sys/types.h>
6771 int
6772 main ()
6773 {
6774
6775 #ifndef _POSIX_C_SOURCE
6776 make an error
6777 #endif
6778   ;
6779   return 0;
6780 }
6781 _ACEOF
6782 rm -f conftest.$ac_objext
6783 if { (eval echo "$as_me:6783: \"$ac_compile\"") >&5
6784   (eval $ac_compile) 2>&5
6785   ac_status=$?
6786   echo "$as_me:6786: \$? = $ac_status" >&5
6787   (exit $ac_status); } &&
6788          { ac_try='test -s conftest.$ac_objext'
6789   { (eval echo "$as_me:6789: \"$ac_try\"") >&5
6790   (eval $ac_try) 2>&5
6791   ac_status=$?
6792   echo "$as_me:6792: \$? = $ac_status" >&5
6793   (exit $ac_status); }; }; then
6794   cf_cv_posix_c_source=no
6795 else
6796   echo "$as_me: failed program was:" >&5
6797 cat conftest.$ac_ext >&5
6798 cf_want_posix_source=no
6799          case .$cf_POSIX_C_SOURCE in #(vi
6800          .[12]??*) #(vi
6801                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6802                 ;;
6803          .2) #(vi
6804                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6805                 cf_want_posix_source=yes
6806                 ;;
6807          .*)
6808                 cf_want_posix_source=yes
6809                 ;;
6810          esac
6811          if test "$cf_want_posix_source" = yes ; then
6812                 cat >conftest.$ac_ext <<_ACEOF
6813 #line 6813 "configure"
6814 #include "confdefs.h"
6815 #include <sys/types.h>
6816 int
6817 main ()
6818 {
6819
6820 #ifdef _POSIX_SOURCE
6821 make an error
6822 #endif
6823   ;
6824   return 0;
6825 }
6826 _ACEOF
6827 rm -f conftest.$ac_objext
6828 if { (eval echo "$as_me:6828: \"$ac_compile\"") >&5
6829   (eval $ac_compile) 2>&5
6830   ac_status=$?
6831   echo "$as_me:6831: \$? = $ac_status" >&5
6832   (exit $ac_status); } &&
6833          { ac_try='test -s conftest.$ac_objext'
6834   { (eval echo "$as_me:6834: \"$ac_try\"") >&5
6835   (eval $ac_try) 2>&5
6836   ac_status=$?
6837   echo "$as_me:6837: \$? = $ac_status" >&5
6838   (exit $ac_status); }; }; then
6839   :
6840 else
6841   echo "$as_me: failed program was:" >&5
6842 cat conftest.$ac_ext >&5
6843 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6844 fi
6845 rm -f conftest.$ac_objext conftest.$ac_ext
6846          fi
6847
6848 echo "${as_me-configure}:6848: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6849
6850          CFLAGS="$cf_trim_CFLAGS"
6851          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6852
6853 echo "${as_me-configure}:6853: testing if the second compile does not leave our definition intact error ..." 1>&5
6854
6855          cat >conftest.$ac_ext <<_ACEOF
6856 #line 6856 "configure"
6857 #include "confdefs.h"
6858 #include <sys/types.h>
6859 int
6860 main ()
6861 {
6862
6863 #ifndef _POSIX_C_SOURCE
6864 make an error
6865 #endif
6866   ;
6867   return 0;
6868 }
6869 _ACEOF
6870 rm -f conftest.$ac_objext
6871 if { (eval echo "$as_me:6871: \"$ac_compile\"") >&5
6872   (eval $ac_compile) 2>&5
6873   ac_status=$?
6874   echo "$as_me:6874: \$? = $ac_status" >&5
6875   (exit $ac_status); } &&
6876          { ac_try='test -s conftest.$ac_objext'
6877   { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6878   (eval $ac_try) 2>&5
6879   ac_status=$?
6880   echo "$as_me:6880: \$? = $ac_status" >&5
6881   (exit $ac_status); }; }; then
6882   :
6883 else
6884   echo "$as_me: failed program was:" >&5
6885 cat conftest.$ac_ext >&5
6886 cf_cv_posix_c_source=no
6887 fi
6888 rm -f conftest.$ac_objext conftest.$ac_ext
6889          CFLAGS="$cf_save_CFLAGS"
6890          CPPFLAGS="$cf_save_CPPFLAGS"
6891
6892 fi
6893 rm -f conftest.$ac_objext conftest.$ac_ext
6894
6895 fi
6896 echo "$as_me:6896: result: $cf_cv_posix_c_source" >&5
6897 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6898
6899 if test "$cf_cv_posix_c_source" != no ; then
6900         CFLAGS="$cf_trim_CFLAGS"
6901         CPPFLAGS="$cf_trim_CPPFLAGS"
6902         if test "$cf_cv_cc_u_d_options" = yes ; then
6903                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6904                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6905                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6906         fi
6907         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6908 fi
6909
6910         ;;
6911 esac
6912
6913 # Work around breakage on OS X
6914
6915 echo "$as_me:6915: checking if SIGWINCH is defined" >&5
6916 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6917 if test "${cf_cv_define_sigwinch+set}" = set; then
6918   echo $ECHO_N "(cached) $ECHO_C" >&6
6919 else
6920
6921         cat >conftest.$ac_ext <<_ACEOF
6922 #line 6922 "configure"
6923 #include "confdefs.h"
6924
6925 #include <sys/types.h>
6926 #include <sys/signal.h>
6927
6928 int
6929 main ()
6930 {
6931 int x = SIGWINCH
6932   ;
6933   return 0;
6934 }
6935 _ACEOF
6936 rm -f conftest.$ac_objext
6937 if { (eval echo "$as_me:6937: \"$ac_compile\"") >&5
6938   (eval $ac_compile) 2>&5
6939   ac_status=$?
6940   echo "$as_me:6940: \$? = $ac_status" >&5
6941   (exit $ac_status); } &&
6942          { ac_try='test -s conftest.$ac_objext'
6943   { (eval echo "$as_me:6943: \"$ac_try\"") >&5
6944   (eval $ac_try) 2>&5
6945   ac_status=$?
6946   echo "$as_me:6946: \$? = $ac_status" >&5
6947   (exit $ac_status); }; }; then
6948   cf_cv_define_sigwinch=yes
6949 else
6950   echo "$as_me: failed program was:" >&5
6951 cat conftest.$ac_ext >&5
6952 cat >conftest.$ac_ext <<_ACEOF
6953 #line 6953 "configure"
6954 #include "confdefs.h"
6955
6956 #undef _XOPEN_SOURCE
6957 #undef _POSIX_SOURCE
6958 #undef _POSIX_C_SOURCE
6959 #include <sys/types.h>
6960 #include <sys/signal.h>
6961
6962 int
6963 main ()
6964 {
6965 int x = SIGWINCH
6966   ;
6967   return 0;
6968 }
6969 _ACEOF
6970 rm -f conftest.$ac_objext
6971 if { (eval echo "$as_me:6971: \"$ac_compile\"") >&5
6972   (eval $ac_compile) 2>&5
6973   ac_status=$?
6974   echo "$as_me:6974: \$? = $ac_status" >&5
6975   (exit $ac_status); } &&
6976          { ac_try='test -s conftest.$ac_objext'
6977   { (eval echo "$as_me:6977: \"$ac_try\"") >&5
6978   (eval $ac_try) 2>&5
6979   ac_status=$?
6980   echo "$as_me:6980: \$? = $ac_status" >&5
6981   (exit $ac_status); }; }; then
6982   cf_cv_define_sigwinch=maybe
6983 else
6984   echo "$as_me: failed program was:" >&5
6985 cat conftest.$ac_ext >&5
6986 cf_cv_define_sigwinch=no
6987 fi
6988 rm -f conftest.$ac_objext conftest.$ac_ext
6989
6990 fi
6991 rm -f conftest.$ac_objext conftest.$ac_ext
6992
6993 fi
6994 echo "$as_me:6994: result: $cf_cv_define_sigwinch" >&5
6995 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6996
6997 if test "$cf_cv_define_sigwinch" = maybe ; then
6998 echo "$as_me:6998: checking for actual SIGWINCH definition" >&5
6999 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7000 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7001   echo $ECHO_N "(cached) $ECHO_C" >&6
7002 else
7003
7004 cf_cv_fixup_sigwinch=unknown
7005 cf_sigwinch=32
7006 while test $cf_sigwinch != 1
7007 do
7008         cat >conftest.$ac_ext <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7011
7012 #undef _XOPEN_SOURCE
7013 #undef _POSIX_SOURCE
7014 #undef _POSIX_C_SOURCE
7015 #include <sys/types.h>
7016 #include <sys/signal.h>
7017
7018 int
7019 main ()
7020 {
7021
7022 #if SIGWINCH != $cf_sigwinch
7023 make an error
7024 #endif
7025 int x = SIGWINCH
7026   ;
7027   return 0;
7028 }
7029 _ACEOF
7030 rm -f conftest.$ac_objext
7031 if { (eval echo "$as_me:7031: \"$ac_compile\"") >&5
7032   (eval $ac_compile) 2>&5
7033   ac_status=$?
7034   echo "$as_me:7034: \$? = $ac_status" >&5
7035   (exit $ac_status); } &&
7036          { ac_try='test -s conftest.$ac_objext'
7037   { (eval echo "$as_me:7037: \"$ac_try\"") >&5
7038   (eval $ac_try) 2>&5
7039   ac_status=$?
7040   echo "$as_me:7040: \$? = $ac_status" >&5
7041   (exit $ac_status); }; }; then
7042   cf_cv_fixup_sigwinch=$cf_sigwinch
7043          break
7044 else
7045   echo "$as_me: failed program was:" >&5
7046 cat conftest.$ac_ext >&5
7047 fi
7048 rm -f conftest.$ac_objext conftest.$ac_ext
7049
7050 cf_sigwinch=`expr $cf_sigwinch - 1`
7051 done
7052
7053 fi
7054 echo "$as_me:7054: result: $cf_cv_fixup_sigwinch" >&5
7055 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7056
7057         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7058                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7059         fi
7060 fi
7061
7062 # Checks for CODESET support.
7063
7064   echo "$as_me:7064: checking for nl_langinfo and CODESET" >&5
7065 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7066 if test "${am_cv_langinfo_codeset+set}" = set; then
7067   echo $ECHO_N "(cached) $ECHO_C" >&6
7068 else
7069   cat >conftest.$ac_ext <<_ACEOF
7070 #line 7070 "configure"
7071 #include "confdefs.h"
7072 #include <langinfo.h>
7073 int
7074 main ()
7075 {
7076 char* cs = nl_langinfo(CODESET);
7077   ;
7078   return 0;
7079 }
7080 _ACEOF
7081 rm -f conftest.$ac_objext conftest$ac_exeext
7082 if { (eval echo "$as_me:7082: \"$ac_link\"") >&5
7083   (eval $ac_link) 2>&5
7084   ac_status=$?
7085   echo "$as_me:7085: \$? = $ac_status" >&5
7086   (exit $ac_status); } &&
7087          { ac_try='test -s conftest$ac_exeext'
7088   { (eval echo "$as_me:7088: \"$ac_try\"") >&5
7089   (eval $ac_try) 2>&5
7090   ac_status=$?
7091   echo "$as_me:7091: \$? = $ac_status" >&5
7092   (exit $ac_status); }; }; then
7093   am_cv_langinfo_codeset=yes
7094 else
7095   echo "$as_me: failed program was:" >&5
7096 cat conftest.$ac_ext >&5
7097 am_cv_langinfo_codeset=no
7098 fi
7099 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7100
7101 fi
7102 echo "$as_me:7102: result: $am_cv_langinfo_codeset" >&5
7103 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7104   if test $am_cv_langinfo_codeset = yes; then
7105
7106 cat >>confdefs.h <<\EOF
7107 #define HAVE_LANGINFO_CODESET 1
7108 EOF
7109
7110   fi
7111
7112 # use these variables to work around a defect in gcc's fixincludes.
7113 NCURSES_OK_WCHAR_T=
7114 NCURSES_OK_WINT_T=
7115
7116 echo "$as_me:7116: checking if you want wide-character code" >&5
7117 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7118
7119 # Check whether --enable-widec or --disable-widec was given.
7120 if test "${enable_widec+set}" = set; then
7121   enableval="$enable_widec"
7122   with_widec=$enableval
7123 else
7124   with_widec=no
7125 fi;
7126 echo "$as_me:7126: result: $with_widec" >&5
7127 echo "${ECHO_T}$with_widec" >&6
7128 if test "$with_widec" = yes ; then
7129         LIB_SUFFIX="w${LIB_SUFFIX}"
7130         cat >>confdefs.h <<\EOF
7131 #define USE_WIDEC_SUPPORT 1
7132 EOF
7133
7134 echo "$as_me:7134: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7135 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7136 cat >conftest.$ac_ext <<_ACEOF
7137 #line 7137 "configure"
7138 #include "confdefs.h"
7139 #include <sys/types.h>
7140
7141 int
7142 main ()
7143 {
7144
7145 #ifndef _XOPEN_SOURCE_EXTENDED
7146 make an error
7147 #endif
7148   ;
7149   return 0;
7150 }
7151 _ACEOF
7152 rm -f conftest.$ac_objext
7153 if { (eval echo "$as_me:7153: \"$ac_compile\"") >&5
7154   (eval $ac_compile) 2>&5
7155   ac_status=$?
7156   echo "$as_me:7156: \$? = $ac_status" >&5
7157   (exit $ac_status); } &&
7158          { ac_try='test -s conftest.$ac_objext'
7159   { (eval echo "$as_me:7159: \"$ac_try\"") >&5
7160   (eval $ac_try) 2>&5
7161   ac_status=$?
7162   echo "$as_me:7162: \$? = $ac_status" >&5
7163   (exit $ac_status); }; }; then
7164   cf_result=no
7165 else
7166   echo "$as_me: failed program was:" >&5
7167 cat conftest.$ac_ext >&5
7168 cf_result=yes
7169 fi
7170 rm -f conftest.$ac_objext conftest.$ac_ext
7171 echo "$as_me:7171: result: $cf_result" >&5
7172 echo "${ECHO_T}$cf_result" >&6
7173
7174 if test "$cf_result" = yes ; then
7175         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7176 elif test "x" != "x" ; then
7177         echo "$as_me:7177: checking checking for compatible value versus " >&5
7178 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7179         cat >conftest.$ac_ext <<_ACEOF
7180 #line 7180 "configure"
7181 #include "confdefs.h"
7182 #include <sys/types.h>
7183
7184 int
7185 main ()
7186 {
7187
7188 #if _XOPEN_SOURCE_EXTENDED- < 0
7189 make an error
7190 #endif
7191   ;
7192   return 0;
7193 }
7194 _ACEOF
7195 rm -f conftest.$ac_objext
7196 if { (eval echo "$as_me:7196: \"$ac_compile\"") >&5
7197   (eval $ac_compile) 2>&5
7198   ac_status=$?
7199   echo "$as_me:7199: \$? = $ac_status" >&5
7200   (exit $ac_status); } &&
7201          { ac_try='test -s conftest.$ac_objext'
7202   { (eval echo "$as_me:7202: \"$ac_try\"") >&5
7203   (eval $ac_try) 2>&5
7204   ac_status=$?
7205   echo "$as_me:7205: \$? = $ac_status" >&5
7206   (exit $ac_status); }; }; then
7207   cf_result=yes
7208 else
7209   echo "$as_me: failed program was:" >&5
7210 cat conftest.$ac_ext >&5
7211 cf_result=no
7212 fi
7213 rm -f conftest.$ac_objext conftest.$ac_ext
7214         echo "$as_me:7214: result: $cf_result" >&5
7215 echo "${ECHO_T}$cf_result" >&6
7216         if test "$cf_result" = no ; then
7217                 # perhaps we can override it - try...
7218                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7219         fi
7220 fi
7221
7222         # with_overwrite=no
7223         NCURSES_CH_T=cchar_t
7224
7225 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7226 do
7227 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7228 echo "$as_me:7228: checking for $ac_func" >&5
7229 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7230 if eval "test \"\${$as_ac_var+set}\" = set"; then
7231   echo $ECHO_N "(cached) $ECHO_C" >&6
7232 else
7233   cat >conftest.$ac_ext <<_ACEOF
7234 #line 7234 "configure"
7235 #include "confdefs.h"
7236 /* System header to define __stub macros and hopefully few prototypes,
7237     which can conflict with char $ac_func (); below.  */
7238 #include <assert.h>
7239 /* Override any gcc2 internal prototype to avoid an error.  */
7240 #ifdef __cplusplus
7241 extern "C"
7242 #endif
7243 /* We use char because int might match the return type of a gcc2
7244    builtin and then its argument prototype would still apply.  */
7245 char $ac_func ();
7246 char (*f) ();
7247
7248 int
7249 main ()
7250 {
7251 /* The GNU C library defines this for functions which it implements
7252     to always fail with ENOSYS.  Some functions are actually named
7253     something starting with __ and the normal name is an alias.  */
7254 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7255 choke me
7256 #else
7257 f = $ac_func;
7258 #endif
7259
7260   ;
7261   return 0;
7262 }
7263 _ACEOF
7264 rm -f conftest.$ac_objext conftest$ac_exeext
7265 if { (eval echo "$as_me:7265: \"$ac_link\"") >&5
7266   (eval $ac_link) 2>&5
7267   ac_status=$?
7268   echo "$as_me:7268: \$? = $ac_status" >&5
7269   (exit $ac_status); } &&
7270          { ac_try='test -s conftest$ac_exeext'
7271   { (eval echo "$as_me:7271: \"$ac_try\"") >&5
7272   (eval $ac_try) 2>&5
7273   ac_status=$?
7274   echo "$as_me:7274: \$? = $ac_status" >&5
7275   (exit $ac_status); }; }; then
7276   eval "$as_ac_var=yes"
7277 else
7278   echo "$as_me: failed program was:" >&5
7279 cat conftest.$ac_ext >&5
7280 eval "$as_ac_var=no"
7281 fi
7282 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7283 fi
7284 echo "$as_me:7284: result: `eval echo '${'$as_ac_var'}'`" >&5
7285 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7286 if test `eval echo '${'$as_ac_var'}'` = yes; then
7287   cat >>confdefs.h <<EOF
7288 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7289 EOF
7290
7291 fi
7292 done
7293
7294         if test "$ac_cv_func_putwc" != yes ; then
7295
7296 echo "$as_me:7296: checking for multibyte character support" >&5
7297 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7298 if test "${cf_cv_utf8_lib+set}" = set; then
7299   echo $ECHO_N "(cached) $ECHO_C" >&6
7300 else
7301
7302         cf_save_LIBS="$LIBS"
7303         cat >conftest.$ac_ext <<_ACEOF
7304 #line 7304 "configure"
7305 #include "confdefs.h"
7306
7307 #include <stdlib.h>
7308 int
7309 main ()
7310 {
7311 putwc(0,0);
7312   ;
7313   return 0;
7314 }
7315 _ACEOF
7316 rm -f conftest.$ac_objext conftest$ac_exeext
7317 if { (eval echo "$as_me:7317: \"$ac_link\"") >&5
7318   (eval $ac_link) 2>&5
7319   ac_status=$?
7320   echo "$as_me:7320: \$? = $ac_status" >&5
7321   (exit $ac_status); } &&
7322          { ac_try='test -s conftest$ac_exeext'
7323   { (eval echo "$as_me:7323: \"$ac_try\"") >&5
7324   (eval $ac_try) 2>&5
7325   ac_status=$?
7326   echo "$as_me:7326: \$? = $ac_status" >&5
7327   (exit $ac_status); }; }; then
7328   cf_cv_utf8_lib=yes
7329 else
7330   echo "$as_me: failed program was:" >&5
7331 cat conftest.$ac_ext >&5
7332
7333 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7334 # will be set on completion of the AC_TRY_LINK below.
7335 cf_cv_header_path_utf8=
7336 cf_cv_library_path_utf8=
7337
7338 echo "${as_me-configure}:7338: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7339
7340 cat >conftest.$ac_ext <<_ACEOF
7341 #line 7341 "configure"
7342 #include "confdefs.h"
7343
7344 #include <libutf8.h>
7345 int
7346 main ()
7347 {
7348 putwc(0,0);
7349   ;
7350   return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext conftest$ac_exeext
7354 if { (eval echo "$as_me:7354: \"$ac_link\"") >&5
7355   (eval $ac_link) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); } &&
7359          { ac_try='test -s conftest$ac_exeext'
7360   { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7361   (eval $ac_try) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit $ac_status); }; }; then
7365   cf_cv_find_linkage_utf8=yes
7366 else
7367   echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369
7370     cf_cv_find_linkage_utf8=no
7371
7372     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7373
7374 echo "${as_me-configure}:7374: testing find linkage for utf8 library ..." 1>&5
7375
7376 echo "${as_me-configure}:7376: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7377
7378     cf_save_CPPFLAGS="$CPPFLAGS"
7379     cf_test_CPPFLAGS="$CPPFLAGS"
7380
7381 cf_header_path_list=""
7382 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7383         for cf_header_path in $CPPFLAGS $CFLAGS
7384         do
7385                 case $cf_header_path in #(vi
7386                 -I*)
7387                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7388
7389 test "$cf_header_path" != "NONE" && \
7390 test -d "$cf_header_path" && \
7391  {
7392         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7393         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7394         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7395         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7396         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7397         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7398 }
7399
7400                         cf_header_path_list="$cf_header_path_list $cf_search"
7401                         ;;
7402                 esac
7403         done
7404 fi
7405
7406 cf_search=""
7407
7408 test "/usr" != "$prefix" && \
7409 test -d "/usr" && \
7410 (test $prefix = NONE || test -d $prefix) && {
7411         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7412         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7413         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7414         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7415         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7416         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7417 }
7418
7419 test "$prefix" != "NONE" && \
7420 test -d "$prefix" && \
7421  {
7422         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7423         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7424         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7425         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7426         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7427         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7428 }
7429
7430 test "/usr/local" != "$prefix" && \
7431 test -d "/usr/local" && \
7432 (test $prefix = NONE || test -d $prefix) && {
7433         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7434         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7435         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7436         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7437         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7438         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7439 }
7440
7441 test "/opt" != "$prefix" && \
7442 test -d "/opt" && \
7443 (test $prefix = NONE || test -d $prefix) && {
7444         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7445         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7446         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7447         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7448         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7449         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7450 }
7451
7452 test "$HOME" != "$prefix" && \
7453 test -d "$HOME" && \
7454 (test $prefix = NONE || test -d $prefix) && {
7455         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7456         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7457         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7458         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7459         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7460         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7461 }
7462
7463 test "$includedir" != NONE && \
7464 test "$includedir" != "/usr/include" && \
7465 test -d "$includedir" && {
7466         test -d $includedir &&    cf_search="$cf_search $includedir"
7467         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7468 }
7469
7470 test "$oldincludedir" != NONE && \
7471 test "$oldincludedir" != "/usr/include" && \
7472 test -d "$oldincludedir" && {
7473         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7474         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7475 }
7476
7477 cf_search="$cf_header_path_list $cf_search"
7478
7479     for cf_cv_header_path_utf8 in $cf_search
7480     do
7481       if test -d $cf_cv_header_path_utf8 ; then
7482         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7483
7484 echo "${as_me-configure}:7484: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7485
7486         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7487         cat >conftest.$ac_ext <<_ACEOF
7488 #line 7488 "configure"
7489 #include "confdefs.h"
7490
7491 #include <libutf8.h>
7492 int
7493 main ()
7494 {
7495 putwc(0,0);
7496   ;
7497   return 0;
7498 }
7499 _ACEOF
7500 rm -f conftest.$ac_objext
7501 if { (eval echo "$as_me:7501: \"$ac_compile\"") >&5
7502   (eval $ac_compile) 2>&5
7503   ac_status=$?
7504   echo "$as_me:7504: \$? = $ac_status" >&5
7505   (exit $ac_status); } &&
7506          { ac_try='test -s conftest.$ac_objext'
7507   { (eval echo "$as_me:7507: \"$ac_try\"") >&5
7508   (eval $ac_try) 2>&5
7509   ac_status=$?
7510   echo "$as_me:7510: \$? = $ac_status" >&5
7511   (exit $ac_status); }; }; then
7512
7513             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7514
7515 echo "${as_me-configure}:7515: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7516
7517             cf_cv_find_linkage_utf8=maybe
7518             cf_test_CPPFLAGS="$CPPFLAGS"
7519             break
7520 else
7521   echo "$as_me: failed program was:" >&5
7522 cat conftest.$ac_ext >&5
7523
7524             CPPFLAGS="$cf_save_CPPFLAGS"
7525
7526 fi
7527 rm -f conftest.$ac_objext conftest.$ac_ext
7528       fi
7529     done
7530
7531     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7532
7533 echo "${as_me-configure}:7533: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7534
7535       cf_save_LIBS="$LIBS"
7536       cf_save_LDFLAGS="$LDFLAGS"
7537
7538       if test "$cf_cv_find_linkage_utf8" != yes ; then
7539
7540 cf_library_path_list=""
7541 if test -n "${LDFLAGS}${LIBS}" ; then
7542         for cf_library_path in $LDFLAGS $LIBS
7543         do
7544                 case $cf_library_path in #(vi
7545                 -L*)
7546                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7547
7548 test "$cf_library_path" != "NONE" && \
7549 test -d "$cf_library_path" && \
7550  {
7551         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7552         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7553         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7554         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7555         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7556         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7557 }
7558
7559                         cf_library_path_list="$cf_library_path_list $cf_search"
7560                         ;;
7561                 esac
7562         done
7563 fi
7564
7565 cf_search=""
7566
7567 test "/usr" != "$prefix" && \
7568 test -d "/usr" && \
7569 (test $prefix = NONE || test -d $prefix) && {
7570         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7571         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7572         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7573         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7574         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7575         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7576 }
7577
7578 test "$prefix" != "NONE" && \
7579 test -d "$prefix" && \
7580  {
7581         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7582         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7583         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7584         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7585         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7586         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7587 }
7588
7589 test "/usr/local" != "$prefix" && \
7590 test -d "/usr/local" && \
7591 (test $prefix = NONE || test -d $prefix) && {
7592         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7593         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7594         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7595         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7596         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7597         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7598 }
7599
7600 test "/opt" != "$prefix" && \
7601 test -d "/opt" && \
7602 (test $prefix = NONE || test -d $prefix) && {
7603         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7604         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7605         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7606         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7607         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7608         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7609 }
7610
7611 test "$HOME" != "$prefix" && \
7612 test -d "$HOME" && \
7613 (test $prefix = NONE || test -d $prefix) && {
7614         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7615         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7616         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7617         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7618         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7619         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7620 }
7621
7622 cf_search="$cf_library_path_list $cf_search"
7623
7624         for cf_cv_library_path_utf8 in $cf_search
7625         do
7626           if test -d $cf_cv_library_path_utf8 ; then
7627             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7628
7629 echo "${as_me-configure}:7629: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7630
7631             CPPFLAGS="$cf_test_CPPFLAGS"
7632             LIBS="-lutf8  $cf_save_LIBS"
7633             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7634             cat >conftest.$ac_ext <<_ACEOF
7635 #line 7635 "configure"
7636 #include "confdefs.h"
7637
7638 #include <libutf8.h>
7639 int
7640 main ()
7641 {
7642 putwc(0,0);
7643   ;
7644   return 0;
7645 }
7646 _ACEOF
7647 rm -f conftest.$ac_objext conftest$ac_exeext
7648 if { (eval echo "$as_me:7648: \"$ac_link\"") >&5
7649   (eval $ac_link) 2>&5
7650   ac_status=$?
7651   echo "$as_me:7651: \$? = $ac_status" >&5
7652   (exit $ac_status); } &&
7653          { ac_try='test -s conftest$ac_exeext'
7654   { (eval echo "$as_me:7654: \"$ac_try\"") >&5
7655   (eval $ac_try) 2>&5
7656   ac_status=$?
7657   echo "$as_me:7657: \$? = $ac_status" >&5
7658   (exit $ac_status); }; }; then
7659
7660                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7661
7662 echo "${as_me-configure}:7662: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7663
7664                 cf_cv_find_linkage_utf8=yes
7665                 cf_cv_library_file_utf8="-lutf8"
7666                 break
7667 else
7668   echo "$as_me: failed program was:" >&5
7669 cat conftest.$ac_ext >&5
7670
7671                 CPPFLAGS="$cf_save_CPPFLAGS"
7672                 LIBS="$cf_save_LIBS"
7673                 LDFLAGS="$cf_save_LDFLAGS"
7674
7675 fi
7676 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7677           fi
7678         done
7679         LIBS="$cf_save_LIBS"
7680         CPPFLAGS="$cf_save_CPPFLAGS"
7681         LDFLAGS="$cf_save_LDFLAGS"
7682       fi
7683
7684     else
7685       cf_cv_find_linkage_utf8=no
7686     fi
7687
7688 fi
7689 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7690
7691 if test "$cf_cv_find_linkage_utf8" = yes ; then
7692 cf_cv_utf8_lib=add-on
7693 else
7694 cf_cv_utf8_lib=no
7695 fi
7696
7697 fi
7698 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7699 fi
7700 echo "$as_me:7700: result: $cf_cv_utf8_lib" >&5
7701 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7702
7703 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7704 # ncurses/ncursesw:
7705 if test "$cf_cv_utf8_lib" = "add-on" ; then
7706         cat >>confdefs.h <<\EOF
7707 #define HAVE_LIBUTF8_H 1
7708 EOF
7709
7710 if test -n "$cf_cv_header_path_utf8" ; then
7711   for cf_add_incdir in $cf_cv_header_path_utf8
7712   do
7713         while test $cf_add_incdir != /usr/include
7714         do
7715           if test -d $cf_add_incdir
7716           then
7717                 cf_have_incdir=no
7718                 if test -n "$CFLAGS$CPPFLAGS" ; then
7719                   # a loop is needed to ensure we can add subdirs of existing dirs
7720                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7721                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7722                           cf_have_incdir=yes; break
7723                         fi
7724                   done
7725                 fi
7726
7727                 if test "$cf_have_incdir" = no ; then
7728                   if test "$cf_add_incdir" = /usr/local/include ; then
7729                         if test "$GCC" = yes
7730                         then
7731                           cf_save_CPPFLAGS=$CPPFLAGS
7732                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7733                           cat >conftest.$ac_ext <<_ACEOF
7734 #line 7734 "configure"
7735 #include "confdefs.h"
7736 #include <stdio.h>
7737 int
7738 main ()
7739 {
7740 printf("Hello")
7741   ;
7742   return 0;
7743 }
7744 _ACEOF
7745 rm -f conftest.$ac_objext
7746 if { (eval echo "$as_me:7746: \"$ac_compile\"") >&5
7747   (eval $ac_compile) 2>&5
7748   ac_status=$?
7749   echo "$as_me:7749: \$? = $ac_status" >&5
7750   (exit $ac_status); } &&
7751          { ac_try='test -s conftest.$ac_objext'
7752   { (eval echo "$as_me:7752: \"$ac_try\"") >&5
7753   (eval $ac_try) 2>&5
7754   ac_status=$?
7755   echo "$as_me:7755: \$? = $ac_status" >&5
7756   (exit $ac_status); }; }; then
7757   :
7758 else
7759   echo "$as_me: failed program was:" >&5
7760 cat conftest.$ac_ext >&5
7761 cf_have_incdir=yes
7762 fi
7763 rm -f conftest.$ac_objext conftest.$ac_ext
7764                           CPPFLAGS=$cf_save_CPPFLAGS
7765                         fi
7766                   fi
7767                 fi
7768
7769                 if test "$cf_have_incdir" = no ; then
7770                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7771
7772 echo "${as_me-configure}:7772: testing adding $cf_add_incdir to include-path ..." 1>&5
7773
7774                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7775
7776                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7777                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7778                   cf_add_incdir="$cf_top_incdir"
7779                 else
7780                   break
7781                 fi
7782           fi
7783         done
7784   done
7785 fi
7786
7787 if test -n "$cf_cv_library_path_utf8" ; then
7788   for cf_add_libdir in $cf_cv_library_path_utf8
7789   do
7790     if test $cf_add_libdir = /usr/lib ; then
7791       :
7792     elif test -d $cf_add_libdir
7793     then
7794       cf_have_libdir=no
7795       if test -n "$LDFLAGS$LIBS" ; then
7796         # a loop is needed to ensure we can add subdirs of existing dirs
7797         for cf_test_libdir in $LDFLAGS $LIBS ; do
7798           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7799             cf_have_libdir=yes; break
7800           fi
7801         done
7802       fi
7803       if test "$cf_have_libdir" = no ; then
7804         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7805
7806 echo "${as_me-configure}:7806: testing adding $cf_add_libdir to library-path ..." 1>&5
7807
7808         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7809       fi
7810     fi
7811   done
7812 fi
7813
7814         LIBS="-lutf8 $LIBS"
7815 fi
7816
7817                 if test "$cf_cv_utf8_lib" != no ; then
7818                         NCURSES_LIBUTF8=1
7819                 fi
7820         fi
7821
7822 # This is needed on Tru64 5.0 to declare mbstate_t
7823 echo "$as_me:7823: checking if we must include wchar.h to declare mbstate_t" >&5
7824 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7825 if test "${cf_cv_mbstate_t+set}" = set; then
7826   echo $ECHO_N "(cached) $ECHO_C" >&6
7827 else
7828
7829 cat >conftest.$ac_ext <<_ACEOF
7830 #line 7830 "configure"
7831 #include "confdefs.h"
7832
7833 #include <stdlib.h>
7834 #include <stdarg.h>
7835 #include <stdio.h>
7836 #ifdef HAVE_LIBUTF8_H
7837 #include <libutf8.h>
7838 #endif
7839 int
7840 main ()
7841 {
7842 mbstate_t state
7843   ;
7844   return 0;
7845 }
7846 _ACEOF
7847 rm -f conftest.$ac_objext
7848 if { (eval echo "$as_me:7848: \"$ac_compile\"") >&5
7849   (eval $ac_compile) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit $ac_status); } &&
7853          { ac_try='test -s conftest.$ac_objext'
7854   { (eval echo "$as_me:7854: \"$ac_try\"") >&5
7855   (eval $ac_try) 2>&5
7856   ac_status=$?
7857   echo "$as_me:7857: \$? = $ac_status" >&5
7858   (exit $ac_status); }; }; then
7859   cf_cv_mbstate_t=no
7860 else
7861   echo "$as_me: failed program was:" >&5
7862 cat conftest.$ac_ext >&5
7863 cat >conftest.$ac_ext <<_ACEOF
7864 #line 7864 "configure"
7865 #include "confdefs.h"
7866
7867 #include <stdlib.h>
7868 #include <stdarg.h>
7869 #include <stdio.h>
7870 #include <wchar.h>
7871 #ifdef HAVE_LIBUTF8_H
7872 #include <libutf8.h>
7873 #endif
7874 int
7875 main ()
7876 {
7877 mbstate_t value
7878   ;
7879   return 0;
7880 }
7881 _ACEOF
7882 rm -f conftest.$ac_objext
7883 if { (eval echo "$as_me:7883: \"$ac_compile\"") >&5
7884   (eval $ac_compile) 2>&5
7885   ac_status=$?
7886   echo "$as_me:7886: \$? = $ac_status" >&5
7887   (exit $ac_status); } &&
7888          { ac_try='test -s conftest.$ac_objext'
7889   { (eval echo "$as_me:7889: \"$ac_try\"") >&5
7890   (eval $ac_try) 2>&5
7891   ac_status=$?
7892   echo "$as_me:7892: \$? = $ac_status" >&5
7893   (exit $ac_status); }; }; then
7894   cf_cv_mbstate_t=yes
7895 else
7896   echo "$as_me: failed program was:" >&5
7897 cat conftest.$ac_ext >&5
7898 cf_cv_mbstate_t=unknown
7899 fi
7900 rm -f conftest.$ac_objext conftest.$ac_ext
7901 fi
7902 rm -f conftest.$ac_objext conftest.$ac_ext
7903 fi
7904 echo "$as_me:7904: result: $cf_cv_mbstate_t" >&5
7905 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7906
7907 if test "$cf_cv_mbstate_t" = yes ; then
7908         cat >>confdefs.h <<\EOF
7909 #define NEED_WCHAR_H 1
7910 EOF
7911
7912         NEED_WCHAR_H=1
7913 fi
7914
7915 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7916 if test "$cf_cv_mbstate_t" = unknown ; then
7917         NCURSES_MBSTATE_T=1
7918 fi
7919
7920 # This is needed on Tru64 5.0 to declare wchar_t
7921 echo "$as_me:7921: checking if we must include wchar.h to declare wchar_t" >&5
7922 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7923 if test "${cf_cv_wchar_t+set}" = set; then
7924   echo $ECHO_N "(cached) $ECHO_C" >&6
7925 else
7926
7927 cat >conftest.$ac_ext <<_ACEOF
7928 #line 7928 "configure"
7929 #include "confdefs.h"
7930
7931 #include <stdlib.h>
7932 #include <stdarg.h>
7933 #include <stdio.h>
7934 #ifdef HAVE_LIBUTF8_H
7935 #include <libutf8.h>
7936 #endif
7937 int
7938 main ()
7939 {
7940 wchar_t state
7941   ;
7942   return 0;
7943 }
7944 _ACEOF
7945 rm -f conftest.$ac_objext
7946 if { (eval echo "$as_me:7946: \"$ac_compile\"") >&5
7947   (eval $ac_compile) 2>&5
7948   ac_status=$?
7949   echo "$as_me:7949: \$? = $ac_status" >&5
7950   (exit $ac_status); } &&
7951          { ac_try='test -s conftest.$ac_objext'
7952   { (eval echo "$as_me:7952: \"$ac_try\"") >&5
7953   (eval $ac_try) 2>&5
7954   ac_status=$?
7955   echo "$as_me:7955: \$? = $ac_status" >&5
7956   (exit $ac_status); }; }; then
7957   cf_cv_wchar_t=no
7958 else
7959   echo "$as_me: failed program was:" >&5
7960 cat conftest.$ac_ext >&5
7961 cat >conftest.$ac_ext <<_ACEOF
7962 #line 7962 "configure"
7963 #include "confdefs.h"
7964
7965 #include <stdlib.h>
7966 #include <stdarg.h>
7967 #include <stdio.h>
7968 #include <wchar.h>
7969 #ifdef HAVE_LIBUTF8_H
7970 #include <libutf8.h>
7971 #endif
7972 int
7973 main ()
7974 {
7975 wchar_t value
7976   ;
7977   return 0;
7978 }
7979 _ACEOF
7980 rm -f conftest.$ac_objext
7981 if { (eval echo "$as_me:7981: \"$ac_compile\"") >&5
7982   (eval $ac_compile) 2>&5
7983   ac_status=$?
7984   echo "$as_me:7984: \$? = $ac_status" >&5
7985   (exit $ac_status); } &&
7986          { ac_try='test -s conftest.$ac_objext'
7987   { (eval echo "$as_me:7987: \"$ac_try\"") >&5
7988   (eval $ac_try) 2>&5
7989   ac_status=$?
7990   echo "$as_me:7990: \$? = $ac_status" >&5
7991   (exit $ac_status); }; }; then
7992   cf_cv_wchar_t=yes
7993 else
7994   echo "$as_me: failed program was:" >&5
7995 cat conftest.$ac_ext >&5
7996 cf_cv_wchar_t=unknown
7997 fi
7998 rm -f conftest.$ac_objext conftest.$ac_ext
7999 fi
8000 rm -f conftest.$ac_objext conftest.$ac_ext
8001 fi
8002 echo "$as_me:8002: result: $cf_cv_wchar_t" >&5
8003 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8004
8005 if test "$cf_cv_wchar_t" = yes ; then
8006         cat >>confdefs.h <<\EOF
8007 #define NEED_WCHAR_H 1
8008 EOF
8009
8010         NEED_WCHAR_H=1
8011 fi
8012
8013 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8014 if test "$cf_cv_wchar_t" = unknown ; then
8015         NCURSES_WCHAR_T=1
8016 fi
8017
8018 # if we find wchar_t in either place, use substitution to provide a fallback.
8019 if test "$cf_cv_wchar_t" != unknown ; then
8020         NCURSES_OK_WCHAR_T=1
8021 fi
8022
8023 # This is needed on Tru64 5.0 to declare wint_t
8024 echo "$as_me:8024: checking if we must include wchar.h to declare wint_t" >&5
8025 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8026 if test "${cf_cv_wint_t+set}" = set; then
8027   echo $ECHO_N "(cached) $ECHO_C" >&6
8028 else
8029
8030 cat >conftest.$ac_ext <<_ACEOF
8031 #line 8031 "configure"
8032 #include "confdefs.h"
8033
8034 #include <stdlib.h>
8035 #include <stdarg.h>
8036 #include <stdio.h>
8037 #ifdef HAVE_LIBUTF8_H
8038 #include <libutf8.h>
8039 #endif
8040 int
8041 main ()
8042 {
8043 wint_t state
8044   ;
8045   return 0;
8046 }
8047 _ACEOF
8048 rm -f conftest.$ac_objext
8049 if { (eval echo "$as_me:8049: \"$ac_compile\"") >&5
8050   (eval $ac_compile) 2>&5
8051   ac_status=$?
8052   echo "$as_me:8052: \$? = $ac_status" >&5
8053   (exit $ac_status); } &&
8054          { ac_try='test -s conftest.$ac_objext'
8055   { (eval echo "$as_me:8055: \"$ac_try\"") >&5
8056   (eval $ac_try) 2>&5
8057   ac_status=$?
8058   echo "$as_me:8058: \$? = $ac_status" >&5
8059   (exit $ac_status); }; }; then
8060   cf_cv_wint_t=no
8061 else
8062   echo "$as_me: failed program was:" >&5
8063 cat conftest.$ac_ext >&5
8064 cat >conftest.$ac_ext <<_ACEOF
8065 #line 8065 "configure"
8066 #include "confdefs.h"
8067
8068 #include <stdlib.h>
8069 #include <stdarg.h>
8070 #include <stdio.h>
8071 #include <wchar.h>
8072 #ifdef HAVE_LIBUTF8_H
8073 #include <libutf8.h>
8074 #endif
8075 int
8076 main ()
8077 {
8078 wint_t value
8079   ;
8080   return 0;
8081 }
8082 _ACEOF
8083 rm -f conftest.$ac_objext
8084 if { (eval echo "$as_me:8084: \"$ac_compile\"") >&5
8085   (eval $ac_compile) 2>&5
8086   ac_status=$?
8087   echo "$as_me:8087: \$? = $ac_status" >&5
8088   (exit $ac_status); } &&
8089          { ac_try='test -s conftest.$ac_objext'
8090   { (eval echo "$as_me:8090: \"$ac_try\"") >&5
8091   (eval $ac_try) 2>&5
8092   ac_status=$?
8093   echo "$as_me:8093: \$? = $ac_status" >&5
8094   (exit $ac_status); }; }; then
8095   cf_cv_wint_t=yes
8096 else
8097   echo "$as_me: failed program was:" >&5
8098 cat conftest.$ac_ext >&5
8099 cf_cv_wint_t=unknown
8100 fi
8101 rm -f conftest.$ac_objext conftest.$ac_ext
8102 fi
8103 rm -f conftest.$ac_objext conftest.$ac_ext
8104 fi
8105 echo "$as_me:8105: result: $cf_cv_wint_t" >&5
8106 echo "${ECHO_T}$cf_cv_wint_t" >&6
8107
8108 if test "$cf_cv_wint_t" = yes ; then
8109         cat >>confdefs.h <<\EOF
8110 #define NEED_WCHAR_H 1
8111 EOF
8112
8113         NEED_WCHAR_H=1
8114 fi
8115
8116 # if we do not find wint_t in either place, use substitution to provide a fallback.
8117 if test "$cf_cv_wint_t" = unknown ; then
8118         NCURSES_WINT_T=1
8119 fi
8120
8121 # if we find wint_t in either place, use substitution to provide a fallback.
8122 if test "$cf_cv_wint_t" != unknown ; then
8123         NCURSES_OK_WINT_T=1
8124 fi
8125
8126         if test "$NCURSES_MBSTATE_T" != 0; then
8127                 cat >>confdefs.h <<\EOF
8128 #define NEED_MBSTATE_T_DEF 1
8129 EOF
8130
8131         fi
8132 fi
8133
8134 ###   use option --disable-lp64 to allow long chtype
8135 case $cf_cv_abi_version in
8136 [345]*)
8137         default_with_lp64=no
8138         ;;
8139 *)
8140         default_with_lp64=yes
8141         ;;
8142 esac
8143
8144 echo "$as_me:8144: checking whether to enable _LP64 definition in curses.h" >&5
8145 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8146
8147 # Check whether --enable-lp64 or --disable-lp64 was given.
8148 if test "${enable_lp64+set}" = set; then
8149   enableval="$enable_lp64"
8150   with_lp64=$enableval
8151 else
8152   with_lp64=$default_with_lp64
8153 fi;
8154 echo "$as_me:8154: result: $with_lp64" >&5
8155 echo "${ECHO_T}$with_lp64" >&6
8156
8157 if test "$with_lp64" = yes ; then
8158         cf_cv_enable_lp64=1
8159 else
8160         cf_cv_enable_lp64=0
8161 fi
8162
8163 # Check whether --enable-largefile or --disable-largefile was given.
8164 if test "${enable_largefile+set}" = set; then
8165   enableval="$enable_largefile"
8166
8167 fi;
8168 if test "$enable_largefile" != no; then
8169
8170   echo "$as_me:8170: checking for special C compiler options needed for large files" >&5
8171 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8172 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8173   echo $ECHO_N "(cached) $ECHO_C" >&6
8174 else
8175   ac_cv_sys_largefile_CC=no
8176      if test "$GCC" != yes; then
8177        ac_save_CC=$CC
8178        while :; do
8179          # IRIX 6.2 and later do not support large files by default,
8180          # so use the C compiler's -n32 option if that helps.
8181          cat >conftest.$ac_ext <<_ACEOF
8182 #line 8182 "configure"
8183 #include "confdefs.h"
8184 #include <sys/types.h>
8185  /* Check that off_t can represent 2**63 - 1 correctly.
8186     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8187     since some C++ compilers masquerading as C compilers
8188     incorrectly reject 9223372036854775807.  */
8189 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8190   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8191                        && LARGE_OFF_T % 2147483647 == 1)
8192                       ? 1 : -1];
8193 int
8194 main ()
8195 {
8196
8197   ;
8198   return 0;
8199 }
8200 _ACEOF
8201          rm -f conftest.$ac_objext
8202 if { (eval echo "$as_me:8202: \"$ac_compile\"") >&5
8203   (eval $ac_compile) 2>&5
8204   ac_status=$?
8205   echo "$as_me:8205: \$? = $ac_status" >&5
8206   (exit $ac_status); } &&
8207          { ac_try='test -s conftest.$ac_objext'
8208   { (eval echo "$as_me:8208: \"$ac_try\"") >&5
8209   (eval $ac_try) 2>&5
8210   ac_status=$?
8211   echo "$as_me:8211: \$? = $ac_status" >&5
8212   (exit $ac_status); }; }; then
8213   break
8214 else
8215   echo "$as_me: failed program was:" >&5
8216 cat conftest.$ac_ext >&5
8217 fi
8218 rm -f conftest.$ac_objext
8219          CC="$CC -n32"
8220          rm -f conftest.$ac_objext
8221 if { (eval echo "$as_me:8221: \"$ac_compile\"") >&5
8222   (eval $ac_compile) 2>&5
8223   ac_status=$?
8224   echo "$as_me:8224: \$? = $ac_status" >&5
8225   (exit $ac_status); } &&
8226          { ac_try='test -s conftest.$ac_objext'
8227   { (eval echo "$as_me:8227: \"$ac_try\"") >&5
8228   (eval $ac_try) 2>&5
8229   ac_status=$?
8230   echo "$as_me:8230: \$? = $ac_status" >&5
8231   (exit $ac_status); }; }; then
8232   ac_cv_sys_largefile_CC=' -n32'; break
8233 else
8234   echo "$as_me: failed program was:" >&5
8235 cat conftest.$ac_ext >&5
8236 fi
8237 rm -f conftest.$ac_objext
8238          break
8239        done
8240        CC=$ac_save_CC
8241        rm -f conftest.$ac_ext
8242     fi
8243 fi
8244 echo "$as_me:8244: result: $ac_cv_sys_largefile_CC" >&5
8245 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8246   if test "$ac_cv_sys_largefile_CC" != no; then
8247     CC=$CC$ac_cv_sys_largefile_CC
8248   fi
8249
8250   echo "$as_me:8250: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8251 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8252 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8253   echo $ECHO_N "(cached) $ECHO_C" >&6
8254 else
8255   while :; do
8256   ac_cv_sys_file_offset_bits=no
8257   cat >conftest.$ac_ext <<_ACEOF
8258 #line 8258 "configure"
8259 #include "confdefs.h"
8260 #include <sys/types.h>
8261  /* Check that off_t can represent 2**63 - 1 correctly.
8262     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8263     since some C++ compilers masquerading as C compilers
8264     incorrectly reject 9223372036854775807.  */
8265 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8266   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8267                        && LARGE_OFF_T % 2147483647 == 1)
8268                       ? 1 : -1];
8269 int
8270 main ()
8271 {
8272
8273   ;
8274   return 0;
8275 }
8276 _ACEOF
8277 rm -f conftest.$ac_objext
8278 if { (eval echo "$as_me:8278: \"$ac_compile\"") >&5
8279   (eval $ac_compile) 2>&5
8280   ac_status=$?
8281   echo "$as_me:8281: \$? = $ac_status" >&5
8282   (exit $ac_status); } &&
8283          { ac_try='test -s conftest.$ac_objext'
8284   { (eval echo "$as_me:8284: \"$ac_try\"") >&5
8285   (eval $ac_try) 2>&5
8286   ac_status=$?
8287   echo "$as_me:8287: \$? = $ac_status" >&5
8288   (exit $ac_status); }; }; then
8289   break
8290 else
8291   echo "$as_me: failed program was:" >&5
8292 cat conftest.$ac_ext >&5
8293 fi
8294 rm -f conftest.$ac_objext conftest.$ac_ext
8295   cat >conftest.$ac_ext <<_ACEOF
8296 #line 8296 "configure"
8297 #include "confdefs.h"
8298 #define _FILE_OFFSET_BITS 64
8299 #include <sys/types.h>
8300  /* Check that off_t can represent 2**63 - 1 correctly.
8301     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8302     since some C++ compilers masquerading as C compilers
8303     incorrectly reject 9223372036854775807.  */
8304 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8305   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8306                        && LARGE_OFF_T % 2147483647 == 1)
8307                       ? 1 : -1];
8308 int
8309 main ()
8310 {
8311
8312   ;
8313   return 0;
8314 }
8315 _ACEOF
8316 rm -f conftest.$ac_objext
8317 if { (eval echo "$as_me:8317: \"$ac_compile\"") >&5
8318   (eval $ac_compile) 2>&5
8319   ac_status=$?
8320   echo "$as_me:8320: \$? = $ac_status" >&5
8321   (exit $ac_status); } &&
8322          { ac_try='test -s conftest.$ac_objext'
8323   { (eval echo "$as_me:8323: \"$ac_try\"") >&5
8324   (eval $ac_try) 2>&5
8325   ac_status=$?
8326   echo "$as_me:8326: \$? = $ac_status" >&5
8327   (exit $ac_status); }; }; then
8328   ac_cv_sys_file_offset_bits=64; break
8329 else
8330   echo "$as_me: failed program was:" >&5
8331 cat conftest.$ac_ext >&5
8332 fi
8333 rm -f conftest.$ac_objext conftest.$ac_ext
8334   break
8335 done
8336 fi
8337 echo "$as_me:8337: result: $ac_cv_sys_file_offset_bits" >&5
8338 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8339 if test "$ac_cv_sys_file_offset_bits" != no; then
8340
8341 cat >>confdefs.h <<EOF
8342 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8343 EOF
8344
8345 fi
8346 rm -f conftest*
8347   echo "$as_me:8347: checking for _LARGE_FILES value needed for large files" >&5
8348 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8349 if test "${ac_cv_sys_large_files+set}" = set; then
8350   echo $ECHO_N "(cached) $ECHO_C" >&6
8351 else
8352   while :; do
8353   ac_cv_sys_large_files=no
8354   cat >conftest.$ac_ext <<_ACEOF
8355 #line 8355 "configure"
8356 #include "confdefs.h"
8357 #include <sys/types.h>
8358  /* Check that off_t can represent 2**63 - 1 correctly.
8359     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8360     since some C++ compilers masquerading as C compilers
8361     incorrectly reject 9223372036854775807.  */
8362 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8363   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8364                        && LARGE_OFF_T % 2147483647 == 1)
8365                       ? 1 : -1];
8366 int
8367 main ()
8368 {
8369
8370   ;
8371   return 0;
8372 }
8373 _ACEOF
8374 rm -f conftest.$ac_objext
8375 if { (eval echo "$as_me:8375: \"$ac_compile\"") >&5
8376   (eval $ac_compile) 2>&5
8377   ac_status=$?
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit $ac_status); } &&
8380          { ac_try='test -s conftest.$ac_objext'
8381   { (eval echo "$as_me:8381: \"$ac_try\"") >&5
8382   (eval $ac_try) 2>&5
8383   ac_status=$?
8384   echo "$as_me:8384: \$? = $ac_status" >&5
8385   (exit $ac_status); }; }; then
8386   break
8387 else
8388   echo "$as_me: failed program was:" >&5
8389 cat conftest.$ac_ext >&5
8390 fi
8391 rm -f conftest.$ac_objext conftest.$ac_ext
8392   cat >conftest.$ac_ext <<_ACEOF
8393 #line 8393 "configure"
8394 #include "confdefs.h"
8395 #define _LARGE_FILES 1
8396 #include <sys/types.h>
8397  /* Check that off_t can represent 2**63 - 1 correctly.
8398     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8399     since some C++ compilers masquerading as C compilers
8400     incorrectly reject 9223372036854775807.  */
8401 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8402   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8403                        && LARGE_OFF_T % 2147483647 == 1)
8404                       ? 1 : -1];
8405 int
8406 main ()
8407 {
8408
8409   ;
8410   return 0;
8411 }
8412 _ACEOF
8413 rm -f conftest.$ac_objext
8414 if { (eval echo "$as_me:8414: \"$ac_compile\"") >&5
8415   (eval $ac_compile) 2>&5
8416   ac_status=$?
8417   echo "$as_me:8417: \$? = $ac_status" >&5
8418   (exit $ac_status); } &&
8419          { ac_try='test -s conftest.$ac_objext'
8420   { (eval echo "$as_me:8420: \"$ac_try\"") >&5
8421   (eval $ac_try) 2>&5
8422   ac_status=$?
8423   echo "$as_me:8423: \$? = $ac_status" >&5
8424   (exit $ac_status); }; }; then
8425   ac_cv_sys_large_files=1; break
8426 else
8427   echo "$as_me: failed program was:" >&5
8428 cat conftest.$ac_ext >&5
8429 fi
8430 rm -f conftest.$ac_objext conftest.$ac_ext
8431   break
8432 done
8433 fi
8434 echo "$as_me:8434: result: $ac_cv_sys_large_files" >&5
8435 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8436 if test "$ac_cv_sys_large_files" != no; then
8437
8438 cat >>confdefs.h <<EOF
8439 #define _LARGE_FILES $ac_cv_sys_large_files
8440 EOF
8441
8442 fi
8443 rm -f conftest*
8444 fi
8445
8446     if test "$enable_largefile" != no ; then
8447         echo "$as_me:8447: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8448 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8449 if test "${ac_cv_sys_largefile_source+set}" = set; then
8450   echo $ECHO_N "(cached) $ECHO_C" >&6
8451 else
8452   while :; do
8453   ac_cv_sys_largefile_source=no
8454   cat >conftest.$ac_ext <<_ACEOF
8455 #line 8455 "configure"
8456 #include "confdefs.h"
8457 #include <stdio.h>
8458 int
8459 main ()
8460 {
8461 return !fseeko;
8462   ;
8463   return 0;
8464 }
8465 _ACEOF
8466 rm -f conftest.$ac_objext
8467 if { (eval echo "$as_me:8467: \"$ac_compile\"") >&5
8468   (eval $ac_compile) 2>&5
8469   ac_status=$?
8470   echo "$as_me:8470: \$? = $ac_status" >&5
8471   (exit $ac_status); } &&
8472          { ac_try='test -s conftest.$ac_objext'
8473   { (eval echo "$as_me:8473: \"$ac_try\"") >&5
8474   (eval $ac_try) 2>&5
8475   ac_status=$?
8476   echo "$as_me:8476: \$? = $ac_status" >&5
8477   (exit $ac_status); }; }; then
8478   break
8479 else
8480   echo "$as_me: failed program was:" >&5
8481 cat conftest.$ac_ext >&5
8482 fi
8483 rm -f conftest.$ac_objext conftest.$ac_ext
8484   cat >conftest.$ac_ext <<_ACEOF
8485 #line 8485 "configure"
8486 #include "confdefs.h"
8487 #define _LARGEFILE_SOURCE 1
8488 #include <stdio.h>
8489 int
8490 main ()
8491 {
8492 return !fseeko;
8493   ;
8494   return 0;
8495 }
8496 _ACEOF
8497 rm -f conftest.$ac_objext
8498 if { (eval echo "$as_me:8498: \"$ac_compile\"") >&5
8499   (eval $ac_compile) 2>&5
8500   ac_status=$?
8501   echo "$as_me:8501: \$? = $ac_status" >&5
8502   (exit $ac_status); } &&
8503          { ac_try='test -s conftest.$ac_objext'
8504   { (eval echo "$as_me:8504: \"$ac_try\"") >&5
8505   (eval $ac_try) 2>&5
8506   ac_status=$?
8507   echo "$as_me:8507: \$? = $ac_status" >&5
8508   (exit $ac_status); }; }; then
8509   ac_cv_sys_largefile_source=1; break
8510 else
8511   echo "$as_me: failed program was:" >&5
8512 cat conftest.$ac_ext >&5
8513 fi
8514 rm -f conftest.$ac_objext conftest.$ac_ext
8515   break
8516 done
8517 fi
8518 echo "$as_me:8518: result: $ac_cv_sys_largefile_source" >&5
8519 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8520 if test "$ac_cv_sys_largefile_source" != no; then
8521
8522 cat >>confdefs.h <<EOF
8523 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8524 EOF
8525
8526 fi
8527 rm -f conftest*
8528
8529 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8530 # in glibc 2.1.3, but that breaks too many other things.
8531 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8532 echo "$as_me:8532: checking for fseeko" >&5
8533 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8534 if test "${ac_cv_func_fseeko+set}" = set; then
8535   echo $ECHO_N "(cached) $ECHO_C" >&6
8536 else
8537   cat >conftest.$ac_ext <<_ACEOF
8538 #line 8538 "configure"
8539 #include "confdefs.h"
8540 #include <stdio.h>
8541 int
8542 main ()
8543 {
8544 return fseeko && fseeko (stdin, 0, 0);
8545   ;
8546   return 0;
8547 }
8548 _ACEOF
8549 rm -f conftest.$ac_objext conftest$ac_exeext
8550 if { (eval echo "$as_me:8550: \"$ac_link\"") >&5
8551   (eval $ac_link) 2>&5
8552   ac_status=$?
8553   echo "$as_me:8553: \$? = $ac_status" >&5
8554   (exit $ac_status); } &&
8555          { ac_try='test -s conftest$ac_exeext'
8556   { (eval echo "$as_me:8556: \"$ac_try\"") >&5
8557   (eval $ac_try) 2>&5
8558   ac_status=$?
8559   echo "$as_me:8559: \$? = $ac_status" >&5
8560   (exit $ac_status); }; }; then
8561   ac_cv_func_fseeko=yes
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565 ac_cv_func_fseeko=no
8566 fi
8567 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8568 fi
8569 echo "$as_me:8569: result: $ac_cv_func_fseeko" >&5
8570 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8571 if test $ac_cv_func_fseeko = yes; then
8572
8573 cat >>confdefs.h <<\EOF
8574 #define HAVE_FSEEKO 1
8575 EOF
8576
8577 fi
8578
8579         # Normally we would collect these definitions in the config.h,
8580         # but (like _XOPEN_SOURCE), some environments rely on having these
8581         # defined before any of the system headers are included.  Another
8582         # case comes up with C++, e.g., on AIX the compiler compiles the
8583         # header files by themselves before looking at the body files it is
8584         # told to compile.  For ncurses, those header files do not include
8585         # the config.h
8586         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8587         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8588         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8589
8590         echo "$as_me:8590: checking whether to use struct dirent64" >&5
8591 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8592 if test "${cf_cv_struct_dirent64+set}" = set; then
8593   echo $ECHO_N "(cached) $ECHO_C" >&6
8594 else
8595
8596                 cat >conftest.$ac_ext <<_ACEOF
8597 #line 8597 "configure"
8598 #include "confdefs.h"
8599
8600 #include <sys/types.h>
8601 #include <dirent.h>
8602
8603 int
8604 main ()
8605 {
8606
8607                 /* if transitional largefile support is setup, this is true */
8608                 extern struct dirent64 * readdir(DIR *);
8609                 struct dirent64 *x = readdir((DIR *)0);
8610                 struct dirent *y = readdir((DIR *)0);
8611                 int z = x - y;
8612
8613   ;
8614   return 0;
8615 }
8616 _ACEOF
8617 rm -f conftest.$ac_objext
8618 if { (eval echo "$as_me:8618: \"$ac_compile\"") >&5
8619   (eval $ac_compile) 2>&5
8620   ac_status=$?
8621   echo "$as_me:8621: \$? = $ac_status" >&5
8622   (exit $ac_status); } &&
8623          { ac_try='test -s conftest.$ac_objext'
8624   { (eval echo "$as_me:8624: \"$ac_try\"") >&5
8625   (eval $ac_try) 2>&5
8626   ac_status=$?
8627   echo "$as_me:8627: \$? = $ac_status" >&5
8628   (exit $ac_status); }; }; then
8629   cf_cv_struct_dirent64=yes
8630 else
8631   echo "$as_me: failed program was:" >&5
8632 cat conftest.$ac_ext >&5
8633 cf_cv_struct_dirent64=no
8634 fi
8635 rm -f conftest.$ac_objext conftest.$ac_ext
8636
8637 fi
8638 echo "$as_me:8638: result: $cf_cv_struct_dirent64" >&5
8639 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8640         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8641 #define HAVE_STRUCT_DIRENT64 1
8642 EOF
8643
8644     fi
8645
8646 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8647 echo "$as_me:8647: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8648 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8649
8650 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8651 if test "${enable_tparm_varargs+set}" = set; then
8652   enableval="$enable_tparm_varargs"
8653   with_tparm_varargs=$enableval
8654 else
8655   with_tparm_varargs=yes
8656 fi;
8657 echo "$as_me:8657: result: $with_tparm_varargs" >&5
8658 echo "${ECHO_T}$with_tparm_varargs" >&6
8659 NCURSES_TPARM_VARARGS=0
8660 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8661
8662 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8663 if test "$with_ticlib" != no ; then
8664 echo "$as_me:8664: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8665 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8666
8667 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8668 if test "${enable_tic_depends+set}" = set; then
8669   enableval="$enable_tic_depends"
8670   with_tic_depends=$enableval
8671 else
8672   with_tic_depends=yes
8673 fi;
8674 echo "$as_me:8674: result: $with_tic_depends" >&5
8675 echo "${ECHO_T}$with_tic_depends" >&6
8676 else
8677         with_tic_depends=no
8678 fi
8679
8680 ###   use option --with-bool to override bool's type
8681 echo "$as_me:8681: checking for type of bool" >&5
8682 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8683
8684 # Check whether --with-bool or --without-bool was given.
8685 if test "${with_bool+set}" = set; then
8686   withval="$with_bool"
8687   NCURSES_BOOL="$withval"
8688 else
8689   NCURSES_BOOL=auto
8690 fi;
8691 echo "$as_me:8691: result: $NCURSES_BOOL" >&5
8692 echo "${ECHO_T}$NCURSES_BOOL" >&6
8693
8694 echo "$as_me:8694: checking for alternate terminal capabilities file" >&5
8695 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8696
8697 # Check whether --with-caps or --without-caps was given.
8698 if test "${with_caps+set}" = set; then
8699   withval="$with_caps"
8700   TERMINFO_CAPS=Caps.$withval
8701 else
8702   TERMINFO_CAPS=Caps
8703 fi;
8704 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8705 echo "$as_me:8705: result: $TERMINFO_CAPS" >&5
8706 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8707
8708 ###   use option --with-chtype to override chtype's type
8709 echo "$as_me:8709: checking for type of chtype" >&5
8710 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8711
8712 # Check whether --with-chtype or --without-chtype was given.
8713 if test "${with_chtype+set}" = set; then
8714   withval="$with_chtype"
8715   NCURSES_CHTYPE="$withval"
8716 else
8717   NCURSES_CHTYPE=auto
8718 fi;
8719 echo "$as_me:8719: result: $NCURSES_CHTYPE" >&5
8720 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8721
8722 ###   use option --with-ospeed to override ospeed's type
8723 echo "$as_me:8723: checking for type of ospeed" >&5
8724 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8725
8726 # Check whether --with-ospeed or --without-ospeed was given.
8727 if test "${with_ospeed+set}" = set; then
8728   withval="$with_ospeed"
8729   NCURSES_OSPEED="$withval"
8730 else
8731   NCURSES_OSPEED=short
8732 fi;
8733 echo "$as_me:8733: result: $NCURSES_OSPEED" >&5
8734 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8735
8736 ###   use option --with-mmask-t to override mmask_t's type
8737 echo "$as_me:8737: checking for type of mmask_t" >&5
8738 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8739
8740 # Check whether --with-mmask-t or --without-mmask-t was given.
8741 if test "${with_mmask_t+set}" = set; then
8742   withval="$with_mmask_t"
8743   NCURSES_MMASK_T="$withval"
8744 else
8745   NCURSES_MMASK_T=auto
8746 fi;
8747 echo "$as_me:8747: result: $NCURSES_MMASK_T" >&5
8748 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8749
8750 ###   use option --with-ccharw-max to override CCHARW_MAX size
8751 echo "$as_me:8751: checking for size CCHARW_MAX" >&5
8752 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
8753
8754 # Check whether --with-ccharw-max or --without-ccharw-max was given.
8755 if test "${with_ccharw_max+set}" = set; then
8756   withval="$with_ccharw_max"
8757   NCURSES_CCHARW_MAX="$withval"
8758 else
8759   NCURSES_CCHARW_MAX=5
8760 fi;
8761 echo "$as_me:8761: result: $NCURSES_CCHARW_MAX" >&5
8762 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
8763
8764 ### Enable compiling-in rcs id's
8765 echo "$as_me:8765: checking if RCS identifiers should be compiled-in" >&5
8766 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8767
8768 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8769 if test "${with_rcs_ids+set}" = set; then
8770   withval="$with_rcs_ids"
8771   with_rcs_ids=$withval
8772 else
8773   with_rcs_ids=no
8774 fi;
8775 echo "$as_me:8775: result: $with_rcs_ids" >&5
8776 echo "${ECHO_T}$with_rcs_ids" >&6
8777 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8778 #define USE_RCS_IDS 1
8779 EOF
8780
8781 ###############################################################################
8782
8783 echo "$as_me:8783: checking format of man-pages" >&5
8784 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8785
8786 # Check whether --with-manpage-format or --without-manpage-format was given.
8787 if test "${with_manpage_format+set}" = set; then
8788   withval="$with_manpage_format"
8789   MANPAGE_FORMAT=$withval
8790 else
8791   MANPAGE_FORMAT=unknown
8792 fi;
8793
8794 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8795 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8796
8797 cf_unknown=
8798
8799 case $MANPAGE_FORMAT in
8800 unknown)
8801   if test -z "$MANPATH" ; then
8802     MANPATH="/usr/man:/usr/share/man"
8803   fi
8804
8805   # look for the 'date' man-page (it's most likely to be installed!)
8806   MANPAGE_FORMAT=
8807   cf_preform=no
8808   cf_catonly=yes
8809   cf_example=date
8810
8811   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8812   for cf_dir in $MANPATH; do
8813     test -z "$cf_dir" && cf_dir=/usr/man
8814     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
8815     do
8816       cf_test=`echo $cf_name | sed -e 's/*//'`
8817       if test "x$cf_test" = "x$cf_name" ; then
8818
8819         case "$cf_name" in
8820         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8821         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8822         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8823         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8824         esac
8825
8826         case "$cf_name" in
8827         $cf_dir/man*)
8828           cf_catonly=no
8829           ;;
8830         $cf_dir/cat*)
8831           cf_preform=yes
8832           ;;
8833         esac
8834         break
8835       fi
8836
8837       # if we found a match in either man* or cat*, stop looking
8838       if test -n "$MANPAGE_FORMAT" ; then
8839         cf_found=no
8840         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8841         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8842         case "$cf_name" in
8843         $cf_dir/cat*)
8844           cf_found=yes
8845           ;;
8846         esac
8847         test $cf_found=yes && break
8848       fi
8849     done
8850     # only check the first directory in $MANPATH where we find manpages
8851     if test -n "$MANPAGE_FORMAT" ; then
8852        break
8853     fi
8854   done
8855   # if we did not find the example, just assume it is normal
8856   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8857   IFS="$ac_save_ifs"
8858   ;;
8859 *)
8860   for cf_option in $MANPAGE_FORMAT; do
8861      case $cf_option in #(vi
8862      gzip|compress|BSDI|normal|formatted|catonly)
8863        ;;
8864      *)
8865        cf_unknown="$cf_unknown $cf_option"
8866        ;;
8867      esac
8868   done
8869   ;;
8870 esac
8871
8872 echo "$as_me:8872: result: $MANPAGE_FORMAT" >&5
8873 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8874 if test -n "$cf_unknown" ; then
8875   { echo "$as_me:8875: WARNING: Unexpected manpage-format $cf_unknown" >&5
8876 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8877 fi
8878
8879 echo "$as_me:8879: checking for manpage renaming" >&5
8880 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8881
8882 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8883 if test "${with_manpage_renames+set}" = set; then
8884   withval="$with_manpage_renames"
8885   MANPAGE_RENAMES=$withval
8886 else
8887   MANPAGE_RENAMES=yes
8888 fi;
8889
8890 case ".$MANPAGE_RENAMES" in #(vi
8891 .no) #(vi
8892   ;;
8893 .|.yes)
8894   # Debian 'man' program?
8895   if test -f /etc/debian_version ; then
8896     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8897   else
8898     MANPAGE_RENAMES=no
8899   fi
8900   ;;
8901 esac
8902
8903 if test "$MANPAGE_RENAMES" != no ; then
8904   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8905     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8906   elif test ! -f $MANPAGE_RENAMES ; then
8907     { { echo "$as_me:8907: error: not a filename: $MANPAGE_RENAMES" >&5
8908 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8909    { (exit 1); exit 1; }; }
8910   fi
8911
8912   test ! -d man && mkdir man
8913
8914   # Construct a sed-script to perform renaming within man-pages
8915   if test -n "$MANPAGE_RENAMES" ; then
8916     test ! -d man && mkdir man
8917     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8918   fi
8919 fi
8920
8921 echo "$as_me:8921: result: $MANPAGE_RENAMES" >&5
8922 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8923
8924 echo "$as_me:8924: checking if manpage aliases will be installed" >&5
8925 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8926
8927 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8928 if test "${with_manpage_aliases+set}" = set; then
8929   withval="$with_manpage_aliases"
8930   MANPAGE_ALIASES=$withval
8931 else
8932   MANPAGE_ALIASES=yes
8933 fi;
8934
8935 echo "$as_me:8935: result: $MANPAGE_ALIASES" >&5
8936 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8937
8938 if test "$LN_S" = "ln -s"; then
8939         cf_use_symlinks=yes
8940 else
8941         cf_use_symlinks=no
8942 fi
8943
8944 MANPAGE_SYMLINKS=no
8945 if test "$MANPAGE_ALIASES" = yes ; then
8946 echo "$as_me:8946: checking if manpage symlinks should be used" >&5
8947 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8948
8949 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8950 if test "${with_manpage_symlinks+set}" = set; then
8951   withval="$with_manpage_symlinks"
8952   MANPAGE_SYMLINKS=$withval
8953 else
8954   MANPAGE_SYMLINKS=$cf_use_symlinks
8955 fi;
8956
8957 if test "$$cf_use_symlinks" = no; then
8958 if test "$MANPAGE_SYMLINKS" = yes ; then
8959         { echo "$as_me:8959: WARNING: cannot make symlinks" >&5
8960 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8961         MANPAGE_SYMLINKS=no
8962 fi
8963 fi
8964
8965 echo "$as_me:8965: result: $MANPAGE_SYMLINKS" >&5
8966 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8967 fi
8968
8969 echo "$as_me:8969: checking for manpage tbl" >&5
8970 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8971
8972 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8973 if test "${with_manpage_tbl+set}" = set; then
8974   withval="$with_manpage_tbl"
8975   MANPAGE_TBL=$withval
8976 else
8977   MANPAGE_TBL=no
8978 fi;
8979
8980 echo "$as_me:8980: result: $MANPAGE_TBL" >&5
8981 echo "${ECHO_T}$MANPAGE_TBL" >&6
8982
8983   if test "$prefix" = "NONE" ; then
8984      cf_prefix="$ac_default_prefix"
8985   else
8986      cf_prefix="$prefix"
8987   fi
8988
8989   case "$MANPAGE_FORMAT" in # (vi
8990   *catonly*) # (vi
8991     cf_format=yes
8992     cf_inboth=no
8993     ;;
8994   *formatted*) # (vi
8995     cf_format=yes
8996     cf_inboth=yes
8997     ;;
8998   *)
8999     cf_format=no
9000     cf_inboth=no
9001     ;;
9002   esac
9003
9004 test ! -d man && mkdir man
9005
9006 cf_so_strip=
9007 cf_compress=
9008 case "$MANPAGE_FORMAT" in #(vi
9009 *compress*) #(vi
9010         cf_so_strip="Z"
9011         cf_compress=compress
9012   ;;
9013 *gzip*) #(vi
9014         cf_so_strip="gz"
9015         cf_compress=gzip
9016   ;;
9017 esac
9018
9019 cf_edit_man=./edit_man.sh
9020 cf_man_alias=`pwd`/man_alias.sed
9021
9022 cat >$cf_edit_man <<CF_EOF
9023 #! /bin/sh
9024 # this script is generated by the configure-script CF_MAN_PAGES macro.
9025
9026 prefix="$cf_prefix"
9027 datadir="$datadir"
9028
9029 NCURSES_MAJOR="$NCURSES_MAJOR"
9030 NCURSES_MINOR="$NCURSES_MINOR"
9031 NCURSES_PATCH="$NCURSES_PATCH"
9032
9033 NCURSES_OSPEED="$NCURSES_OSPEED"
9034 TERMINFO="$TERMINFO"
9035
9036 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9037
9038 INSTALL="$INSTALL"
9039 INSTALL_DATA="$INSTALL_DATA"
9040
9041 transform="$program_transform_name"
9042
9043 TMP=\${TMPDIR-/tmp}/man\$\$
9044 trap "rm -f \$TMP" 0 1 2 5 15
9045
9046 form=\$1
9047 shift || exit 1
9048
9049 verb=\$1
9050 shift || exit 1
9051
9052 mandir=\$1
9053 shift || exit 1
9054
9055 srcdir=\$1
9056 top_srcdir=\$srcdir/..
9057 shift || exit 1
9058
9059 if test "\$form" = normal ; then
9060         if test "$cf_format" = yes ; then
9061         if test "$cf_inboth" = no ; then
9062                 sh \$0 format \$verb \$mandir \$srcdir \$*
9063                 exit $?
9064         fi
9065         fi
9066         cf_subdir=\$mandir/man
9067         cf_tables=$MANPAGE_TBL
9068 else
9069         cf_subdir=\$mandir/cat
9070         cf_tables=yes
9071 fi
9072
9073 # process the list of source-files
9074 for i in \$* ; do
9075 case \$i in #(vi
9076 *.orig|*.rej) ;; #(vi
9077 *.[0-9]*)
9078         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9079         if test \$verb = installing ; then
9080         if test ! -d \$cf_subdir\${section} ; then
9081                 \$MKDIRS \$cf_subdir\$section
9082         fi
9083         fi
9084
9085         # replace variables in man page
9086         if test ! -f $cf_man_alias ; then
9087 cat >>$cf_man_alias <<-CF_EOF2
9088                 s,@DATADIR@,\$datadir,g
9089                 s,@TERMINFO@,\$TERMINFO,g
9090                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9091                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9092                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9093                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9094 CF_EOF
9095
9096         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9097         do
9098                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9099                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9100 cat >>$cf_edit_man <<-CF_EOF
9101                 s,@$cf_NAME@,$cf_name,
9102 CF_EOF
9103         done
9104
9105 cat >>$cf_edit_man <<CF_EOF
9106 CF_EOF2
9107                 echo "...made $cf_man_alias"
9108         fi
9109
9110         aliases=
9111         cf_source=\`basename \$i\`
9112         inalias=\$cf_source
9113         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9114         if test ! -f \$inalias ; then
9115                 echo .. skipped \$cf_source
9116                 continue
9117         fi
9118 CF_EOF
9119
9120 if test "$MANPAGE_ALIASES" != no ; then
9121 cat >>$cf_edit_man <<CF_EOF
9122         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9123 CF_EOF
9124 fi
9125
9126 if test "$MANPAGE_RENAMES" = no ; then
9127 cat >>$cf_edit_man <<CF_EOF
9128         # perform program transformations for section 1 man pages
9129         if test \$section = 1 ; then
9130                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9131         else
9132                 cf_target=\$cf_subdir\${section}/\$cf_source
9133         fi
9134 CF_EOF
9135 else
9136 cat >>$cf_edit_man <<CF_EOF
9137         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9138         if test -z "\$cf_target" ; then
9139                 echo '? missing rename for '\$cf_source
9140                 cf_target="\$cf_source"
9141         fi
9142         cf_target="\$cf_subdir\${section}/\${cf_target}"
9143
9144 CF_EOF
9145 fi
9146
9147 cat >>$cf_edit_man <<CF_EOF
9148         sed     -f $cf_man_alias \\
9149 CF_EOF
9150
9151 if test -f $MANPAGE_RENAMES ; then
9152 cat >>$cf_edit_man <<CF_EOF
9153                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9154 CF_EOF
9155 else
9156 cat >>$cf_edit_man <<CF_EOF
9157                 < \$i >\$TMP
9158 CF_EOF
9159 fi
9160
9161 cat >>$cf_edit_man <<CF_EOF
9162 if test \$cf_tables = yes ; then
9163         tbl \$TMP >\$TMP.out
9164         mv \$TMP.out \$TMP
9165 fi
9166 CF_EOF
9167
9168 if test $with_curses_h != yes ; then
9169 cat >>$cf_edit_man <<CF_EOF
9170         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9171         mv \$TMP.out \$TMP
9172 CF_EOF
9173 fi
9174
9175 cat >>$cf_edit_man <<CF_EOF
9176         if test \$form = format ; then
9177                 nroff -man \$TMP >\$TMP.out
9178                 mv \$TMP.out \$TMP
9179         fi
9180 CF_EOF
9181
9182 if test -n "$cf_compress" ; then
9183 cat >>$cf_edit_man <<CF_EOF
9184         if test \$verb = installing ; then
9185         if ( $cf_compress -f \$TMP )
9186         then
9187                 mv \$TMP.$cf_so_strip \$TMP
9188         fi
9189         fi
9190         cf_target="\$cf_target.$cf_so_strip"
9191 CF_EOF
9192 fi
9193
9194 case "$MANPAGE_FORMAT" in #(vi
9195 *BSDI*)
9196 cat >>$cf_edit_man <<CF_EOF
9197         if test \$form = format ; then
9198                 # BSDI installs only .0 suffixes in the cat directories
9199                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9200         fi
9201 CF_EOF
9202   ;;
9203 esac
9204
9205 cat >>$cf_edit_man <<CF_EOF
9206         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9207         if test \$verb = installing ; then
9208                 echo \$verb \$cf_target
9209                 \$INSTALL_DATA \$TMP \$cf_target
9210                 test -d \$cf_subdir\${section} &&
9211                 test -n "\$aliases" && (
9212                         cd \$cf_subdir\${section} && (
9213                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9214                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9215                                 cf_target=\`basename \$cf_target\`
9216                                 for cf_alias in \$aliases
9217                                 do
9218                                         if test \$section = 1 ; then
9219                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9220                                         fi
9221
9222                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9223                                                 if test -f \$cf_alias\${suffix} ; then
9224                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9225                                                         then
9226                                                                 continue
9227                                                         fi
9228                                                 fi
9229                                                 echo .. \$verb alias \$cf_alias\${suffix}
9230                                                 rm -f \$cf_alias\${suffix}
9231                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9232                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9233                                                 echo ".so \$cf_source" >\$TMP
9234 CF_EOF
9235 if test -n "$cf_compress" ; then
9236 cat >>$cf_edit_man <<CF_EOF
9237                                                 if test -n "$cf_so_strip" ; then
9238                                                         $cf_compress -f \$TMP
9239                                                         mv \$TMP.$cf_so_strip \$TMP
9240                                                 fi
9241 CF_EOF
9242 fi
9243 cat >>$cf_edit_man <<CF_EOF
9244                                                 echo .. \$verb alias \$cf_alias\${suffix}
9245                                                 rm -f \$cf_alias\${suffix}
9246                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9247                                         fi
9248                                 done
9249                         )
9250                 )
9251         elif test \$verb = removing ; then
9252                 test -f \$cf_target && (
9253                         echo \$verb \$cf_target
9254                         rm -f \$cf_target
9255                 )
9256                 test -d \$cf_subdir\${section} &&
9257                 test -n "\$aliases" && (
9258                         cd \$cf_subdir\${section} && (
9259                                 for cf_alias in \$aliases
9260                                 do
9261                                         if test \$section = 1 ; then
9262                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9263                                         fi
9264
9265                                         echo .. \$verb alias \$cf_alias\${suffix}
9266                                         rm -f \$cf_alias\${suffix}
9267                                 done
9268                         )
9269                 )
9270         else
9271 #               echo ".hy 0"
9272                 cat \$TMP
9273         fi
9274         ;;
9275 esac
9276 done
9277
9278 if test $cf_inboth = yes ; then
9279 if test \$form != format ; then
9280         sh \$0 format \$verb \$mandir \$srcdir \$*
9281 fi
9282 fi
9283
9284 exit 0
9285 CF_EOF
9286 chmod 755 $cf_edit_man
9287
9288 ###############################################################################
9289
9290 ### Note that some functions (such as const) are normally disabled anyway.
9291 echo "$as_me:9291: checking if you want to build with function extensions" >&5
9292 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9293
9294 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9295 if test "${enable_ext_funcs+set}" = set; then
9296   enableval="$enable_ext_funcs"
9297   with_ext_funcs=$enableval
9298 else
9299   with_ext_funcs=yes
9300 fi;
9301 echo "$as_me:9301: result: $with_ext_funcs" >&5
9302 echo "${ECHO_T}$with_ext_funcs" >&6
9303 if test "$with_ext_funcs" = yes ; then
9304         NCURSES_EXT_FUNCS=1
9305         cat >>confdefs.h <<\EOF
9306 #define HAVE_CURSES_VERSION 1
9307 EOF
9308
9309         cat >>confdefs.h <<\EOF
9310 #define HAVE_HAS_KEY 1
9311 EOF
9312
9313         cat >>confdefs.h <<\EOF
9314 #define HAVE_RESIZETERM 1
9315 EOF
9316
9317         cat >>confdefs.h <<\EOF
9318 #define HAVE_RESIZE_TERM 1
9319 EOF
9320
9321         cat >>confdefs.h <<\EOF
9322 #define HAVE_USE_DEFAULT_COLORS 1
9323 EOF
9324
9325         cat >>confdefs.h <<\EOF
9326 #define HAVE_WRESIZE 1
9327 EOF
9328
9329         cat >>confdefs.h <<\EOF
9330 #define NCURSES_EXT_FUNCS 1
9331 EOF
9332
9333         GENERATED_EXT_FUNCS=generated
9334 else
9335         NCURSES_EXT_FUNCS=0
9336         GENERATED_EXT_FUNCS=
9337 fi
9338
9339 echo "$as_me:9339: checking if you want to build with experimental SCREEN extensions" >&5
9340 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9341
9342 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9343 if test "${enable_sp_funcs+set}" = set; then
9344   enableval="$enable_sp_funcs"
9345   with_sp_funcs=$enableval
9346 else
9347   with_sp_funcs=no
9348 fi;
9349 echo "$as_me:9349: result: $with_sp_funcs" >&5
9350 echo "${ECHO_T}$with_sp_funcs" >&6
9351 if test "$with_sp_funcs" = yes ; then
9352         NCURSES_SP_FUNCS=1
9353         cat >>confdefs.h <<\EOF
9354 #define NCURSES_SP_FUNCS 1
9355 EOF
9356
9357         GENERATED_SP_FUNCS=generated
9358 else
9359         NCURSES_SP_FUNCS=0
9360         GENERATED_SP_FUNCS=
9361 fi
9362
9363 echo "$as_me:9363: checking if you want to build with experimental terminal-driver" >&5
9364 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9365
9366 # Check whether --enable-term-driver or --disable-term-driver was given.
9367 if test "${enable_term_driver+set}" = set; then
9368   enableval="$enable_term_driver"
9369   with_term_driver=$enableval
9370 else
9371   with_term_driver=no
9372 fi;
9373 echo "$as_me:9373: result: $with_term_driver" >&5
9374 echo "${ECHO_T}$with_term_driver" >&6
9375 if test "$with_term_driver" = yes ; then
9376         cat >>confdefs.h <<\EOF
9377 #define USE_TERM_DRIVER 1
9378 EOF
9379
9380         if test "$with_sp_funcs" != yes ; then
9381                 { { echo "$as_me:9381: error: The term-driver option relies upon sp-funcs" >&5
9382 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9383    { (exit 1); exit 1; }; }
9384         fi
9385 fi
9386
9387 ###   use option --enable-const to turn on use of const beyond that in XSI.
9388 echo "$as_me:9388: checking for extended use of const keyword" >&5
9389 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9390
9391 # Check whether --enable-const or --disable-const was given.
9392 if test "${enable_const+set}" = set; then
9393   enableval="$enable_const"
9394   with_ext_const=$enableval
9395 else
9396   with_ext_const=no
9397 fi;
9398 echo "$as_me:9398: result: $with_ext_const" >&5
9399 echo "${ECHO_T}$with_ext_const" >&6
9400 NCURSES_CONST='/*nothing*/'
9401 if test "$with_ext_const" = yes ; then
9402         NCURSES_CONST=const
9403 fi
9404
9405 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9406 echo "$as_me:9406: checking if you want to use extended colors" >&5
9407 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9408
9409 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9410 if test "${enable_ext_colors+set}" = set; then
9411   enableval="$enable_ext_colors"
9412   with_ext_colors=$enableval
9413 else
9414   with_ext_colors=no
9415 fi;
9416 echo "$as_me:9416: result: $with_ext_colors" >&5
9417 echo "${ECHO_T}$with_ext_colors" >&6
9418 NCURSES_EXT_COLORS=0
9419 if test "$with_ext_colors" = yes ; then
9420         if test "$with_widec" != yes ; then
9421                 { { echo "$as_me:9421: error: This option applies only to wide-character library" >&5
9422 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9423    { (exit 1); exit 1; }; }
9424         else
9425                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9426
9427 if test "${with_abi_version+set}" != set; then
9428         case $cf_cv_rel_version in
9429         5.*)
9430                 cf_cv_rel_version=6.0
9431                 cf_cv_abi_version=6
9432                 { echo "$as_me:9432: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9433 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9434                 ;;
9435         esac
9436 fi
9437
9438         fi
9439         NCURSES_EXT_COLORS=1
9440         cat >>confdefs.h <<\EOF
9441 #define NCURSES_EXT_COLORS 1
9442 EOF
9443
9444 fi
9445
9446 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9447 echo "$as_me:9447: checking if you want to use extended mouse encoding" >&5
9448 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9449
9450 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9451 if test "${enable_ext_mouse+set}" = set; then
9452   enableval="$enable_ext_mouse"
9453   with_ext_mouse=$enableval
9454 else
9455   with_ext_mouse=no
9456 fi;
9457 echo "$as_me:9457: result: $with_ext_mouse" >&5
9458 echo "${ECHO_T}$with_ext_mouse" >&6
9459 NCURSES_MOUSE_VERSION=1
9460 if test "$with_ext_mouse" = yes ; then
9461         NCURSES_MOUSE_VERSION=2
9462
9463 if test "${with_abi_version+set}" != set; then
9464         case $cf_cv_rel_version in
9465         5.*)
9466                 cf_cv_rel_version=6.0
9467                 cf_cv_abi_version=6
9468                 { echo "$as_me:9468: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9469 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9470                 ;;
9471         esac
9472 fi
9473
9474 fi
9475
9476 echo "$as_me:9476: checking if you want \$NCURSES_NO_PADDING code" >&5
9477 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9478
9479 # Check whether --enable-no-padding or --disable-no-padding was given.
9480 if test "${enable_no_padding+set}" = set; then
9481   enableval="$enable_no_padding"
9482   with_no_padding=$enableval
9483 else
9484   with_no_padding=$with_ext_funcs
9485 fi;
9486 echo "$as_me:9486: result: $with_no_padding" >&5
9487 echo "${ECHO_T}$with_no_padding" >&6
9488 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9489 #define NCURSES_NO_PADDING 1
9490 EOF
9491
9492 echo "$as_me:9492: checking for ANSI C header files" >&5
9493 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9494 if test "${ac_cv_header_stdc+set}" = set; then
9495   echo $ECHO_N "(cached) $ECHO_C" >&6
9496 else
9497   cat >conftest.$ac_ext <<_ACEOF
9498 #line 9498 "configure"
9499 #include "confdefs.h"
9500 #include <stdlib.h>
9501 #include <stdarg.h>
9502 #include <string.h>
9503 #include <float.h>
9504
9505 _ACEOF
9506 if { (eval echo "$as_me:9506: \"$ac_cpp conftest.$ac_ext\"") >&5
9507   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9508   ac_status=$?
9509   egrep -v '^ *\+' conftest.er1 >conftest.err
9510   rm -f conftest.er1
9511   cat conftest.err >&5
9512   echo "$as_me:9512: \$? = $ac_status" >&5
9513   (exit $ac_status); } >/dev/null; then
9514   if test -s conftest.err; then
9515     ac_cpp_err=$ac_c_preproc_warn_flag
9516   else
9517     ac_cpp_err=
9518   fi
9519 else
9520   ac_cpp_err=yes
9521 fi
9522 if test -z "$ac_cpp_err"; then
9523   ac_cv_header_stdc=yes
9524 else
9525   echo "$as_me: failed program was:" >&5
9526   cat conftest.$ac_ext >&5
9527   ac_cv_header_stdc=no
9528 fi
9529 rm -f conftest.err conftest.$ac_ext
9530
9531 if test $ac_cv_header_stdc = yes; then
9532   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9533   cat >conftest.$ac_ext <<_ACEOF
9534 #line 9534 "configure"
9535 #include "confdefs.h"
9536 #include <string.h>
9537
9538 _ACEOF
9539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9540   egrep "memchr" >/dev/null 2>&1; then
9541   :
9542 else
9543   ac_cv_header_stdc=no
9544 fi
9545 rm -f conftest*
9546
9547 fi
9548
9549 if test $ac_cv_header_stdc = yes; then
9550   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9551   cat >conftest.$ac_ext <<_ACEOF
9552 #line 9552 "configure"
9553 #include "confdefs.h"
9554 #include <stdlib.h>
9555
9556 _ACEOF
9557 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9558   egrep "free" >/dev/null 2>&1; then
9559   :
9560 else
9561   ac_cv_header_stdc=no
9562 fi
9563 rm -f conftest*
9564
9565 fi
9566
9567 if test $ac_cv_header_stdc = yes; then
9568   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9569   if test "$cross_compiling" = yes; then
9570   :
9571 else
9572   cat >conftest.$ac_ext <<_ACEOF
9573 #line 9573 "configure"
9574 #include "confdefs.h"
9575 #include <ctype.h>
9576 #if ((' ' & 0x0FF) == 0x020)
9577 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9578 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9579 #else
9580 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9581                      || ('j' <= (c) && (c) <= 'r') \
9582                      || ('s' <= (c) && (c) <= 'z'))
9583 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9584 #endif
9585
9586 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9587 int
9588 main ()
9589 {
9590   int i;
9591   for (i = 0; i < 256; i++)
9592     if (XOR (islower (i), ISLOWER (i))
9593         || toupper (i) != TOUPPER (i))
9594       $ac_main_return(2);
9595   $ac_main_return (0);
9596 }
9597 _ACEOF
9598 rm -f conftest$ac_exeext
9599 if { (eval echo "$as_me:9599: \"$ac_link\"") >&5
9600   (eval $ac_link) 2>&5
9601   ac_status=$?
9602   echo "$as_me:9602: \$? = $ac_status" >&5
9603   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9604   { (eval echo "$as_me:9604: \"$ac_try\"") >&5
9605   (eval $ac_try) 2>&5
9606   ac_status=$?
9607   echo "$as_me:9607: \$? = $ac_status" >&5
9608   (exit $ac_status); }; }; then
9609   :
9610 else
9611   echo "$as_me: program exited with status $ac_status" >&5
9612 echo "$as_me: failed program was:" >&5
9613 cat conftest.$ac_ext >&5
9614 ac_cv_header_stdc=no
9615 fi
9616 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9617 fi
9618 fi
9619 fi
9620 echo "$as_me:9620: result: $ac_cv_header_stdc" >&5
9621 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9622 if test $ac_cv_header_stdc = yes; then
9623
9624 cat >>confdefs.h <<\EOF
9625 #define STDC_HEADERS 1
9626 EOF
9627
9628 fi
9629
9630 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9631
9632 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9633                   inttypes.h stdint.h unistd.h
9634 do
9635 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9636 echo "$as_me:9636: checking for $ac_header" >&5
9637 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9638 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9639   echo $ECHO_N "(cached) $ECHO_C" >&6
9640 else
9641   cat >conftest.$ac_ext <<_ACEOF
9642 #line 9642 "configure"
9643 #include "confdefs.h"
9644 $ac_includes_default
9645 #include <$ac_header>
9646 _ACEOF
9647 rm -f conftest.$ac_objext
9648 if { (eval echo "$as_me:9648: \"$ac_compile\"") >&5
9649   (eval $ac_compile) 2>&5
9650   ac_status=$?
9651   echo "$as_me:9651: \$? = $ac_status" >&5
9652   (exit $ac_status); } &&
9653          { ac_try='test -s conftest.$ac_objext'
9654   { (eval echo "$as_me:9654: \"$ac_try\"") >&5
9655   (eval $ac_try) 2>&5
9656   ac_status=$?
9657   echo "$as_me:9657: \$? = $ac_status" >&5
9658   (exit $ac_status); }; }; then
9659   eval "$as_ac_Header=yes"
9660 else
9661   echo "$as_me: failed program was:" >&5
9662 cat conftest.$ac_ext >&5
9663 eval "$as_ac_Header=no"
9664 fi
9665 rm -f conftest.$ac_objext conftest.$ac_ext
9666 fi
9667 echo "$as_me:9667: result: `eval echo '${'$as_ac_Header'}'`" >&5
9668 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9669 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9670   cat >>confdefs.h <<EOF
9671 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9672 EOF
9673
9674 fi
9675 done
9676
9677 echo "$as_me:9677: checking for signed char" >&5
9678 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9679 if test "${ac_cv_type_signed_char+set}" = set; then
9680   echo $ECHO_N "(cached) $ECHO_C" >&6
9681 else
9682   cat >conftest.$ac_ext <<_ACEOF
9683 #line 9683 "configure"
9684 #include "confdefs.h"
9685 $ac_includes_default
9686 int
9687 main ()
9688 {
9689 if ((signed char *) 0)
9690   return 0;
9691 if (sizeof (signed char))
9692   return 0;
9693   ;
9694   return 0;
9695 }
9696 _ACEOF
9697 rm -f conftest.$ac_objext
9698 if { (eval echo "$as_me:9698: \"$ac_compile\"") >&5
9699   (eval $ac_compile) 2>&5
9700   ac_status=$?
9701   echo "$as_me:9701: \$? = $ac_status" >&5
9702   (exit $ac_status); } &&
9703          { ac_try='test -s conftest.$ac_objext'
9704   { (eval echo "$as_me:9704: \"$ac_try\"") >&5
9705   (eval $ac_try) 2>&5
9706   ac_status=$?
9707   echo "$as_me:9707: \$? = $ac_status" >&5
9708   (exit $ac_status); }; }; then
9709   ac_cv_type_signed_char=yes
9710 else
9711   echo "$as_me: failed program was:" >&5
9712 cat conftest.$ac_ext >&5
9713 ac_cv_type_signed_char=no
9714 fi
9715 rm -f conftest.$ac_objext conftest.$ac_ext
9716 fi
9717 echo "$as_me:9717: result: $ac_cv_type_signed_char" >&5
9718 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9719
9720 echo "$as_me:9720: checking size of signed char" >&5
9721 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9722 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9723   echo $ECHO_N "(cached) $ECHO_C" >&6
9724 else
9725   if test "$ac_cv_type_signed_char" = yes; then
9726   if test "$cross_compiling" = yes; then
9727   # Depending upon the size, compute the lo and hi bounds.
9728 cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731 $ac_includes_default
9732 int
9733 main ()
9734 {
9735 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 rm -f conftest.$ac_objext
9741 if { (eval echo "$as_me:9741: \"$ac_compile\"") >&5
9742   (eval $ac_compile) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -s conftest.$ac_objext'
9747   { (eval echo "$as_me:9747: \"$ac_try\"") >&5
9748   (eval $ac_try) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); }; }; then
9752   ac_lo=0 ac_mid=0
9753   while :; do
9754     cat >conftest.$ac_ext <<_ACEOF
9755 #line 9755 "configure"
9756 #include "confdefs.h"
9757 $ac_includes_default
9758 int
9759 main ()
9760 {
9761 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9762   ;
9763   return 0;
9764 }
9765 _ACEOF
9766 rm -f conftest.$ac_objext
9767 if { (eval echo "$as_me:9767: \"$ac_compile\"") >&5
9768   (eval $ac_compile) 2>&5
9769   ac_status=$?
9770   echo "$as_me:9770: \$? = $ac_status" >&5
9771   (exit $ac_status); } &&
9772          { ac_try='test -s conftest.$ac_objext'
9773   { (eval echo "$as_me:9773: \"$ac_try\"") >&5
9774   (eval $ac_try) 2>&5
9775   ac_status=$?
9776   echo "$as_me:9776: \$? = $ac_status" >&5
9777   (exit $ac_status); }; }; then
9778   ac_hi=$ac_mid; break
9779 else
9780   echo "$as_me: failed program was:" >&5
9781 cat conftest.$ac_ext >&5
9782 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9783 fi
9784 rm -f conftest.$ac_objext conftest.$ac_ext
9785   done
9786 else
9787   echo "$as_me: failed program was:" >&5
9788 cat conftest.$ac_ext >&5
9789 ac_hi=-1 ac_mid=-1
9790   while :; do
9791     cat >conftest.$ac_ext <<_ACEOF
9792 #line 9792 "configure"
9793 #include "confdefs.h"
9794 $ac_includes_default
9795 int
9796 main ()
9797 {
9798 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9799   ;
9800   return 0;
9801 }
9802 _ACEOF
9803 rm -f conftest.$ac_objext
9804 if { (eval echo "$as_me:9804: \"$ac_compile\"") >&5
9805   (eval $ac_compile) 2>&5
9806   ac_status=$?
9807   echo "$as_me:9807: \$? = $ac_status" >&5
9808   (exit $ac_status); } &&
9809          { ac_try='test -s conftest.$ac_objext'
9810   { (eval echo "$as_me:9810: \"$ac_try\"") >&5
9811   (eval $ac_try) 2>&5
9812   ac_status=$?
9813   echo "$as_me:9813: \$? = $ac_status" >&5
9814   (exit $ac_status); }; }; then
9815   ac_lo=$ac_mid; break
9816 else
9817   echo "$as_me: failed program was:" >&5
9818 cat conftest.$ac_ext >&5
9819 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9820 fi
9821 rm -f conftest.$ac_objext conftest.$ac_ext
9822   done
9823 fi
9824 rm -f conftest.$ac_objext conftest.$ac_ext
9825 # Binary search between lo and hi bounds.
9826 while test "x$ac_lo" != "x$ac_hi"; do
9827   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9828   cat >conftest.$ac_ext <<_ACEOF
9829 #line 9829 "configure"
9830 #include "confdefs.h"
9831 $ac_includes_default
9832 int
9833 main ()
9834 {
9835 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9836   ;
9837   return 0;
9838 }
9839 _ACEOF
9840 rm -f conftest.$ac_objext
9841 if { (eval echo "$as_me:9841: \"$ac_compile\"") >&5
9842   (eval $ac_compile) 2>&5
9843   ac_status=$?
9844   echo "$as_me:9844: \$? = $ac_status" >&5
9845   (exit $ac_status); } &&
9846          { ac_try='test -s conftest.$ac_objext'
9847   { (eval echo "$as_me:9847: \"$ac_try\"") >&5
9848   (eval $ac_try) 2>&5
9849   ac_status=$?
9850   echo "$as_me:9850: \$? = $ac_status" >&5
9851   (exit $ac_status); }; }; then
9852   ac_hi=$ac_mid
9853 else
9854   echo "$as_me: failed program was:" >&5
9855 cat conftest.$ac_ext >&5
9856 ac_lo=`expr $ac_mid + 1`
9857 fi
9858 rm -f conftest.$ac_objext conftest.$ac_ext
9859 done
9860 ac_cv_sizeof_signed_char=$ac_lo
9861 else
9862   if test "$cross_compiling" = yes; then
9863   { { echo "$as_me:9863: error: cannot run test program while cross compiling" >&5
9864 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9865    { (exit 1); exit 1; }; }
9866 else
9867   cat >conftest.$ac_ext <<_ACEOF
9868 #line 9868 "configure"
9869 #include "confdefs.h"
9870 $ac_includes_default
9871 int
9872 main ()
9873 {
9874 FILE *f = fopen ("conftest.val", "w");
9875 if (!f)
9876   $ac_main_return (1);
9877 fprintf (f, "%d", (sizeof (signed char)));
9878 fclose (f);
9879   ;
9880   return 0;
9881 }
9882 _ACEOF
9883 rm -f conftest$ac_exeext
9884 if { (eval echo "$as_me:9884: \"$ac_link\"") >&5
9885   (eval $ac_link) 2>&5
9886   ac_status=$?
9887   echo "$as_me:9887: \$? = $ac_status" >&5
9888   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9889   { (eval echo "$as_me:9889: \"$ac_try\"") >&5
9890   (eval $ac_try) 2>&5
9891   ac_status=$?
9892   echo "$as_me:9892: \$? = $ac_status" >&5
9893   (exit $ac_status); }; }; then
9894   ac_cv_sizeof_signed_char=`cat conftest.val`
9895 else
9896   echo "$as_me: program exited with status $ac_status" >&5
9897 echo "$as_me: failed program was:" >&5
9898 cat conftest.$ac_ext >&5
9899 fi
9900 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9901 fi
9902 fi
9903 rm -f conftest.val
9904 else
9905   ac_cv_sizeof_signed_char=0
9906 fi
9907 fi
9908 echo "$as_me:9908: result: $ac_cv_sizeof_signed_char" >&5
9909 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9910 cat >>confdefs.h <<EOF
9911 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9912 EOF
9913
9914 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9915         NCURSES_SBOOL="signed char"
9916 else
9917         NCURSES_SBOOL="char"
9918 fi
9919 echo "$as_me:9919: checking if you want to use signed Boolean array in term.h" >&5
9920 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9921
9922 # Check whether --enable-signed-char or --disable-signed-char was given.
9923 if test "${enable_signed_char+set}" = set; then
9924   enableval="$enable_signed_char"
9925   with_signed_char=$enableval
9926 else
9927   with_signed_char=no
9928 fi;
9929 echo "$as_me:9929: result: $with_signed_char" >&5
9930 echo "${ECHO_T}$with_signed_char" >&6
9931 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9932
9933 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9934 echo "$as_me:9934: checking if you want SIGWINCH handler" >&5
9935 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9936
9937 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9938 if test "${enable_sigwinch+set}" = set; then
9939   enableval="$enable_sigwinch"
9940   with_sigwinch=$enableval
9941 else
9942   with_sigwinch=$with_ext_funcs
9943 fi;
9944 echo "$as_me:9944: result: $with_sigwinch" >&5
9945 echo "${ECHO_T}$with_sigwinch" >&6
9946 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9947 #define USE_SIGWINCH 1
9948 EOF
9949
9950 ###   use option --enable-tcap-names to allow user to define new capabilities
9951 echo "$as_me:9951: checking if you want user-definable terminal capabilities like termcap" >&5
9952 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9953
9954 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9955 if test "${enable_tcap_names+set}" = set; then
9956   enableval="$enable_tcap_names"
9957   with_tcap_names=$enableval
9958 else
9959   with_tcap_names=$with_ext_funcs
9960 fi;
9961 echo "$as_me:9961: result: $with_tcap_names" >&5
9962 echo "${ECHO_T}$with_tcap_names" >&6
9963 NCURSES_XNAMES=0
9964 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9965
9966 ###############################################################################
9967 # These options are relatively safe to experiment with.
9968
9969 echo "$as_me:9969: checking if you want all development code" >&5
9970 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9971
9972 # Check whether --with-develop or --without-develop was given.
9973 if test "${with_develop+set}" = set; then
9974   withval="$with_develop"
9975   with_develop=$withval
9976 else
9977   with_develop=no
9978 fi;
9979 echo "$as_me:9979: result: $with_develop" >&5
9980 echo "${ECHO_T}$with_develop" >&6
9981
9982 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9983 echo "$as_me:9983: checking if you want hard-tabs code" >&5
9984 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9985
9986 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9987 if test "${enable_hard_tabs+set}" = set; then
9988   enableval="$enable_hard_tabs"
9989
9990 else
9991   enable_hard_tabs=$with_develop
9992 fi;
9993 echo "$as_me:9993: result: $enable_hard_tabs" >&5
9994 echo "${ECHO_T}$enable_hard_tabs" >&6
9995 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9996 #define USE_HARD_TABS 1
9997 EOF
9998
9999 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10000 echo "$as_me:10000: checking if you want limited support for xmc" >&5
10001 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10002
10003 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10004 if test "${enable_xmc_glitch+set}" = set; then
10005   enableval="$enable_xmc_glitch"
10006
10007 else
10008   enable_xmc_glitch=$with_develop
10009 fi;
10010 echo "$as_me:10010: result: $enable_xmc_glitch" >&5
10011 echo "${ECHO_T}$enable_xmc_glitch" >&6
10012 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10013 #define USE_XMC_SUPPORT 1
10014 EOF
10015
10016 ###############################################################################
10017 # These are just experimental, probably should not be in a package:
10018
10019 echo "$as_me:10019: checking if you do not want to assume colors are white-on-black" >&5
10020 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10021
10022 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10023 if test "${enable_assumed_color+set}" = set; then
10024   enableval="$enable_assumed_color"
10025   with_assumed_color=$enableval
10026 else
10027   with_assumed_color=yes
10028 fi;
10029 echo "$as_me:10029: result: $with_assumed_color" >&5
10030 echo "${ECHO_T}$with_assumed_color" >&6
10031 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10032 #define USE_ASSUMED_COLOR 1
10033 EOF
10034
10035 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10036 echo "$as_me:10036: checking if you want hashmap scrolling-optimization code" >&5
10037 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10038
10039 # Check whether --enable-hashmap or --disable-hashmap was given.
10040 if test "${enable_hashmap+set}" = set; then
10041   enableval="$enable_hashmap"
10042   with_hashmap=$enableval
10043 else
10044   with_hashmap=yes
10045 fi;
10046 echo "$as_me:10046: result: $with_hashmap" >&5
10047 echo "${ECHO_T}$with_hashmap" >&6
10048 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10049 #define USE_HASHMAP 1
10050 EOF
10051
10052 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10053 echo "$as_me:10053: checking if you want colorfgbg code" >&5
10054 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10055
10056 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10057 if test "${enable_colorfgbg+set}" = set; then
10058   enableval="$enable_colorfgbg"
10059   with_colorfgbg=$enableval
10060 else
10061   with_colorfgbg=no
10062 fi;
10063 echo "$as_me:10063: result: $with_colorfgbg" >&5
10064 echo "${ECHO_T}$with_colorfgbg" >&6
10065 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10066 #define USE_COLORFGBG 1
10067 EOF
10068
10069 ###   use option --enable-interop to turn on use of bindings used for interop
10070 echo "$as_me:10070: checking if you want interop bindings" >&5
10071 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10072
10073 # Check whether --enable-interop or --disable-interop was given.
10074 if test "${enable_interop+set}" = set; then
10075   enableval="$enable_interop"
10076   with_exp_interop=$enableval
10077 else
10078   with_exp_interop=no
10079 fi;
10080 echo "$as_me:10080: result: $with_exp_interop" >&5
10081 echo "${ECHO_T}$with_exp_interop" >&6
10082
10083 NCURSES_INTEROP_FUNCS=0
10084 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10085
10086 # This is still experimental (20080329), but should ultimately be moved to
10087 # the script-block --with-normal, etc.
10088
10089 echo "$as_me:10089: checking if you want to link with the pthread library" >&5
10090 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10091
10092 # Check whether --with-pthread or --without-pthread was given.
10093 if test "${with_pthread+set}" = set; then
10094   withval="$with_pthread"
10095   with_pthread=$withval
10096 else
10097   with_pthread=no
10098 fi;
10099 echo "$as_me:10099: result: $with_pthread" >&5
10100 echo "${ECHO_T}$with_pthread" >&6
10101
10102 if test "$with_pthread" != no ; then
10103     echo "$as_me:10103: checking for pthread.h" >&5
10104 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10105 if test "${ac_cv_header_pthread_h+set}" = set; then
10106   echo $ECHO_N "(cached) $ECHO_C" >&6
10107 else
10108   cat >conftest.$ac_ext <<_ACEOF
10109 #line 10109 "configure"
10110 #include "confdefs.h"
10111 #include <pthread.h>
10112 _ACEOF
10113 if { (eval echo "$as_me:10113: \"$ac_cpp conftest.$ac_ext\"") >&5
10114   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10115   ac_status=$?
10116   egrep -v '^ *\+' conftest.er1 >conftest.err
10117   rm -f conftest.er1
10118   cat conftest.err >&5
10119   echo "$as_me:10119: \$? = $ac_status" >&5
10120   (exit $ac_status); } >/dev/null; then
10121   if test -s conftest.err; then
10122     ac_cpp_err=$ac_c_preproc_warn_flag
10123   else
10124     ac_cpp_err=
10125   fi
10126 else
10127   ac_cpp_err=yes
10128 fi
10129 if test -z "$ac_cpp_err"; then
10130   ac_cv_header_pthread_h=yes
10131 else
10132   echo "$as_me: failed program was:" >&5
10133   cat conftest.$ac_ext >&5
10134   ac_cv_header_pthread_h=no
10135 fi
10136 rm -f conftest.err conftest.$ac_ext
10137 fi
10138 echo "$as_me:10138: result: $ac_cv_header_pthread_h" >&5
10139 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10140 if test $ac_cv_header_pthread_h = yes; then
10141
10142         cat >>confdefs.h <<\EOF
10143 #define HAVE_PTHREADS_H 1
10144 EOF
10145
10146         echo "$as_me:10146: checking if we can link with the pthread library" >&5
10147 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10148         cf_save_LIBS="$LIBS"
10149         LIBS="-lpthread $LIBS"
10150         cat >conftest.$ac_ext <<_ACEOF
10151 #line 10151 "configure"
10152 #include "confdefs.h"
10153
10154 #include <pthread.h>
10155
10156 int
10157 main ()
10158 {
10159
10160         int rc = pthread_create(0,0,0,0);
10161
10162   ;
10163   return 0;
10164 }
10165 _ACEOF
10166 rm -f conftest.$ac_objext conftest$ac_exeext
10167 if { (eval echo "$as_me:10167: \"$ac_link\"") >&5
10168   (eval $ac_link) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); } &&
10172          { ac_try='test -s conftest$ac_exeext'
10173   { (eval echo "$as_me:10173: \"$ac_try\"") >&5
10174   (eval $ac_try) 2>&5
10175   ac_status=$?
10176   echo "$as_me:10176: \$? = $ac_status" >&5
10177   (exit $ac_status); }; }; then
10178   with_pthread=yes
10179 else
10180   echo "$as_me: failed program was:" >&5
10181 cat conftest.$ac_ext >&5
10182 with_pthread=no
10183 fi
10184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10185         LIBS="$cf_save_LIBS"
10186         echo "$as_me:10186: result: $with_pthread" >&5
10187 echo "${ECHO_T}$with_pthread" >&6
10188
10189         if test "$with_pthread" = yes ; then
10190             LIBS="-lpthread $LIBS"
10191             cat >>confdefs.h <<\EOF
10192 #define HAVE_LIBPTHREADS 1
10193 EOF
10194
10195         else
10196             { { echo "$as_me:10196: error: Cannot link with pthread library" >&5
10197 echo "$as_me: error: Cannot link with pthread library" >&2;}
10198    { (exit 1); exit 1; }; }
10199         fi
10200
10201 fi
10202
10203 fi
10204
10205 echo "$as_me:10205: checking if you want to use weak-symbols for pthreads" >&5
10206 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10207
10208 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10209 if test "${enable_weak_symbols+set}" = set; then
10210   enableval="$enable_weak_symbols"
10211   use_weak_symbols=$withval
10212 else
10213   use_weak_symbols=no
10214 fi;
10215 echo "$as_me:10215: result: $use_weak_symbols" >&5
10216 echo "${ECHO_T}$use_weak_symbols" >&6
10217 if test "$use_weak_symbols" = yes ; then
10218
10219 echo "$as_me:10219: checking if $CC supports weak symbols" >&5
10220 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10221 if test "${cf_cv_weak_symbols+set}" = set; then
10222   echo $ECHO_N "(cached) $ECHO_C" >&6
10223 else
10224
10225 cat >conftest.$ac_ext <<_ACEOF
10226 #line 10226 "configure"
10227 #include "confdefs.h"
10228
10229 #include <stdio.h>
10230 int
10231 main ()
10232 {
10233
10234 #if defined(__GNUC__)
10235 #  if defined __USE_ISOC99
10236 #    define _cat_pragma(exp)    _Pragma(#exp)
10237 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10238 #  else
10239 #    define _weak_pragma(exp)
10240 #  endif
10241 #  define _declare(name)        __extension__ extern __typeof__(name) name
10242 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10243 #endif
10244
10245 weak_symbol(fopen);
10246
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   cf_cv_weak_symbols=yes
10264 else
10265   echo "$as_me: failed program was:" >&5
10266 cat conftest.$ac_ext >&5
10267 cf_cv_weak_symbols=no
10268 fi
10269 rm -f conftest.$ac_objext conftest.$ac_ext
10270
10271 fi
10272 echo "$as_me:10272: result: $cf_cv_weak_symbols" >&5
10273 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10274
10275 else
10276     cf_cv_weak_symbols=no
10277 fi
10278
10279 if test $cf_cv_weak_symbols = yes ; then
10280     cat >>confdefs.h <<\EOF
10281 #define USE_WEAK_SYMBOLS 1
10282 EOF
10283
10284 fi
10285
10286 PTHREAD=
10287 if test "$with_pthread" = "yes" ; then
10288     cat >>confdefs.h <<\EOF
10289 #define USE_PTHREADS 1
10290 EOF
10291
10292     enable_reentrant=yes
10293     if test $cf_cv_weak_symbols = yes ; then
10294         PTHREAD=-lpthread
10295     fi
10296 fi
10297
10298 # Reentrant code has to be opaque; there's little advantage to making ncurses
10299 # opaque outside of that, so there is no --enable-opaque option.  We can use
10300 # this option without --with-pthreads, but this will be always set for
10301 # pthreads.
10302 echo "$as_me:10302: checking if you want experimental reentrant code" >&5
10303 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10304
10305 # Check whether --enable-reentrant or --disable-reentrant was given.
10306 if test "${enable_reentrant+set}" = set; then
10307   enableval="$enable_reentrant"
10308   with_reentrant=$enableval
10309 else
10310   with_reentrant=no
10311 fi;
10312 echo "$as_me:10312: result: $with_reentrant" >&5
10313 echo "${ECHO_T}$with_reentrant" >&6
10314 if test "$with_reentrant" = yes ; then
10315         cf_cv_enable_reentrant=1
10316         cf_cv_enable_opaque="NCURSES_INTERNALS"
10317         NCURSES_OPAQUE=1
10318         NCURSES_SIZE_T=int
10319         if test $cf_cv_weak_symbols = yes ; then
10320
10321 # remove pthread library from $LIBS
10322 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10323
10324         else
10325                 LIB_SUFFIX="t${LIB_SUFFIX}"
10326         fi
10327         cat >>confdefs.h <<\EOF
10328 #define USE_REENTRANT 1
10329 EOF
10330
10331 if test "${with_abi_version+set}" != set; then
10332         case $cf_cv_rel_version in
10333         5.*)
10334                 cf_cv_rel_version=6.0
10335                 cf_cv_abi_version=6
10336                 { echo "$as_me:10336: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10337 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10338                 ;;
10339         esac
10340 fi
10341
10342 else
10343         cf_cv_enable_reentrant=0
10344         cf_cv_enable_opaque="NCURSES_OPAQUE"
10345         NCURSES_OPAQUE=0
10346         NCURSES_SIZE_T=short
10347 fi
10348
10349 ### Allow using a different wrap-prefix
10350 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10351         echo "$as_me:10351: checking for prefix used to wrap public variables" >&5
10352 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10353
10354 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10355 if test "${with_wrap_prefix+set}" = set; then
10356   withval="$with_wrap_prefix"
10357   NCURSES_WRAP_PREFIX=$withval
10358 else
10359   NCURSES_WRAP_PREFIX=_nc_
10360 fi;
10361         echo "$as_me:10361: result: $NCURSES_WRAP_PREFIX" >&5
10362 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10363 else
10364         NCURSES_WRAP_PREFIX=_nc_
10365 fi
10366
10367 cat >>confdefs.h <<EOF
10368 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10369 EOF
10370
10371 echo "$as_me:10371: checking if you want experimental safe-sprintf code" >&5
10372 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10373
10374 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10375 if test "${enable_safe_sprintf+set}" = set; then
10376   enableval="$enable_safe_sprintf"
10377   with_safe_sprintf=$enableval
10378 else
10379   with_safe_sprintf=no
10380 fi;
10381 echo "$as_me:10381: result: $with_safe_sprintf" >&5
10382 echo "${ECHO_T}$with_safe_sprintf" >&6
10383 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10384 #define USE_SAFE_SPRINTF 1
10385 EOF
10386
10387 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10388 # when hashmap is used scroll hints are useless
10389 if test "$with_hashmap" = no ; then
10390 echo "$as_me:10390: checking if you want to experiment without scrolling-hints code" >&5
10391 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10392
10393 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10394 if test "${enable_scroll_hints+set}" = set; then
10395   enableval="$enable_scroll_hints"
10396   with_scroll_hints=$enableval
10397 else
10398   with_scroll_hints=yes
10399 fi;
10400 echo "$as_me:10400: result: $with_scroll_hints" >&5
10401 echo "${ECHO_T}$with_scroll_hints" >&6
10402 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10403 #define USE_SCROLL_HINTS 1
10404 EOF
10405
10406 fi
10407
10408 echo "$as_me:10408: checking if you want experimental wgetch-events code" >&5
10409 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10410
10411 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10412 if test "${enable_wgetch_events+set}" = set; then
10413   enableval="$enable_wgetch_events"
10414   with_wgetch_events=$enableval
10415 else
10416   with_wgetch_events=no
10417 fi;
10418 echo "$as_me:10418: result: $with_wgetch_events" >&5
10419 echo "${ECHO_T}$with_wgetch_events" >&6
10420 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10421 #define NCURSES_WGETCH_EVENTS 1
10422 EOF
10423
10424 ###############################################################################
10425
10426 ###     use option --disable-echo to suppress full display compiling commands
10427 echo "$as_me:10427: checking if you want to display full commands during build" >&5
10428 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10429
10430 # Check whether --enable-echo or --disable-echo was given.
10431 if test "${enable_echo+set}" = set; then
10432   enableval="$enable_echo"
10433   with_echo=$enableval
10434 else
10435   with_echo=yes
10436 fi;
10437 if test "$with_echo" = yes; then
10438         ECHO_LINK=
10439 else
10440         ECHO_LINK='@ echo linking $@ ... ;'
10441         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10442         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10443 fi
10444 echo "$as_me:10444: result: $with_echo" >&5
10445 echo "${ECHO_T}$with_echo" >&6
10446
10447 ###     use option --enable-warnings to turn on all gcc warnings
10448 echo "$as_me:10448: checking if you want to see compiler warnings" >&5
10449 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10450
10451 # Check whether --enable-warnings or --disable-warnings was given.
10452 if test "${enable_warnings+set}" = set; then
10453   enableval="$enable_warnings"
10454   with_warnings=$enableval
10455 fi;
10456 echo "$as_me:10456: result: $with_warnings" >&5
10457 echo "${ECHO_T}$with_warnings" >&6
10458
10459 if test "x$with_warnings" = "xyes"; then
10460         ADAFLAGS="$ADAFLAGS -gnatg"
10461
10462 INTEL_COMPILER=no
10463
10464 if test "$GCC" = yes ; then
10465         case $host_os in
10466         linux*|gnu*)
10467                 echo "$as_me:10467: checking if this is really Intel C compiler" >&5
10468 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10469                 cf_save_CFLAGS="$CFLAGS"
10470                 CFLAGS="$CFLAGS -no-gcc"
10471                 cat >conftest.$ac_ext <<_ACEOF
10472 #line 10472 "configure"
10473 #include "confdefs.h"
10474
10475 int
10476 main ()
10477 {
10478
10479 #ifdef __INTEL_COMPILER
10480 #else
10481 make an error
10482 #endif
10483
10484   ;
10485   return 0;
10486 }
10487 _ACEOF
10488 rm -f conftest.$ac_objext
10489 if { (eval echo "$as_me:10489: \"$ac_compile\"") >&5
10490   (eval $ac_compile) 2>&5
10491   ac_status=$?
10492   echo "$as_me:10492: \$? = $ac_status" >&5
10493   (exit $ac_status); } &&
10494          { ac_try='test -s conftest.$ac_objext'
10495   { (eval echo "$as_me:10495: \"$ac_try\"") >&5
10496   (eval $ac_try) 2>&5
10497   ac_status=$?
10498   echo "$as_me:10498: \$? = $ac_status" >&5
10499   (exit $ac_status); }; }; then
10500   INTEL_COMPILER=yes
10501 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10502
10503 else
10504   echo "$as_me: failed program was:" >&5
10505 cat conftest.$ac_ext >&5
10506 fi
10507 rm -f conftest.$ac_objext conftest.$ac_ext
10508                 CFLAGS="$cf_save_CFLAGS"
10509                 echo "$as_me:10509: result: $INTEL_COMPILER" >&5
10510 echo "${ECHO_T}$INTEL_COMPILER" >&6
10511                 ;;
10512         esac
10513 fi
10514
10515 cat > conftest.$ac_ext <<EOF
10516 #line 10516 "${as_me-configure}"
10517 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10518 EOF
10519
10520 if test "$INTEL_COMPILER" = yes
10521 then
10522 # The "-wdXXX" options suppress warnings:
10523 # remark #1419: external declaration in primary source file
10524 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10525 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10526 # remark #193: zero used for undefined preprocessing identifier
10527 # remark #593: variable "curs_sb_left_arrow" was set but never used
10528 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10529 # remark #869: parameter "tw" was never referenced
10530 # remark #981: operands are evaluated in unspecified order
10531 # warning #279: controlling expression is constant
10532
10533         { echo "$as_me:10533: checking for $CC warning options..." >&5
10534 echo "$as_me: checking for $CC warning options..." >&6;}
10535         cf_save_CFLAGS="$CFLAGS"
10536         EXTRA_CFLAGS="-Wall"
10537         for cf_opt in \
10538                 wd1419 \
10539                 wd1683 \
10540                 wd1684 \
10541                 wd193 \
10542                 wd593 \
10543                 wd279 \
10544                 wd810 \
10545                 wd869 \
10546                 wd981
10547         do
10548                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10549                 if { (eval echo "$as_me:10549: \"$ac_compile\"") >&5
10550   (eval $ac_compile) 2>&5
10551   ac_status=$?
10552   echo "$as_me:10552: \$? = $ac_status" >&5
10553   (exit $ac_status); }; then
10554                         test -n "$verbose" && echo "$as_me:10554: result: ... -$cf_opt" >&5
10555 echo "${ECHO_T}... -$cf_opt" >&6
10556                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10557                 fi
10558         done
10559         CFLAGS="$cf_save_CFLAGS"
10560
10561 elif test "$GCC" = yes
10562 then
10563         { echo "$as_me:10563: checking for $CC warning options..." >&5
10564 echo "$as_me: checking for $CC warning options..." >&6;}
10565         cf_save_CFLAGS="$CFLAGS"
10566         EXTRA_CFLAGS="-W -Wall"
10567         cf_warn_CONST=""
10568         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10569         for cf_opt in \
10570                 Wbad-function-cast \
10571                 Wcast-align \
10572                 Wcast-qual \
10573                 Winline \
10574                 Wmissing-declarations \
10575                 Wmissing-prototypes \
10576                 Wnested-externs \
10577                 Wpointer-arith \
10578                 Wshadow \
10579                 Wstrict-prototypes \
10580                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10581         do
10582                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10583                 if { (eval echo "$as_me:10583: \"$ac_compile\"") >&5
10584   (eval $ac_compile) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); }; then
10588                         test -n "$verbose" && echo "$as_me:10588: result: ... -$cf_opt" >&5
10589 echo "${ECHO_T}... -$cf_opt" >&6
10590                         case $cf_opt in #(vi
10591                         Wcast-qual) #(vi
10592                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10593                                 ;;
10594                         Winline) #(vi
10595                                 case $GCC_VERSION in
10596                                 [34].*)
10597                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10598
10599 echo "${as_me-configure}:10599: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10600
10601                                         continue;;
10602                                 esac
10603                                 ;;
10604                         esac
10605                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10606                 fi
10607         done
10608         CFLAGS="$cf_save_CFLAGS"
10609 fi
10610 rm -f conftest*
10611
10612         if test "$cf_with_cxx" = yes ; then
10613
10614 INTEL_CPLUSPLUS=no
10615
10616 if test "$GCC" = yes ; then
10617         case $host_os in
10618         linux*|gnu*)
10619                 echo "$as_me:10619: checking if this is really Intel C++ compiler" >&5
10620 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10621                 cf_save_CFLAGS="$CXXFLAGS"
10622                 CXXFLAGS="$CXXFLAGS -no-gcc"
10623                 cat >conftest.$ac_ext <<_ACEOF
10624 #line 10624 "configure"
10625 #include "confdefs.h"
10626
10627 int
10628 main ()
10629 {
10630
10631 #ifdef __INTEL_COMPILER
10632 #else
10633 make an error
10634 #endif
10635
10636   ;
10637   return 0;
10638 }
10639 _ACEOF
10640 rm -f conftest.$ac_objext
10641 if { (eval echo "$as_me:10641: \"$ac_compile\"") >&5
10642   (eval $ac_compile) 2>&5
10643   ac_status=$?
10644   echo "$as_me:10644: \$? = $ac_status" >&5
10645   (exit $ac_status); } &&
10646          { ac_try='test -s conftest.$ac_objext'
10647   { (eval echo "$as_me:10647: \"$ac_try\"") >&5
10648   (eval $ac_try) 2>&5
10649   ac_status=$?
10650   echo "$as_me:10650: \$? = $ac_status" >&5
10651   (exit $ac_status); }; }; then
10652   INTEL_CPLUSPLUS=yes
10653 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10654
10655 else
10656   echo "$as_me: failed program was:" >&5
10657 cat conftest.$ac_ext >&5
10658 fi
10659 rm -f conftest.$ac_objext conftest.$ac_ext
10660                 CXXFLAGS="$cf_save_CFLAGS"
10661                 echo "$as_me:10661: result: $INTEL_CPLUSPLUS" >&5
10662 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10663                 ;;
10664         esac
10665 fi
10666
10667 ac_ext=cc
10668 ac_cpp='$CXXCPP $CPPFLAGS'
10669 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10670 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10671 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10672 ac_main_return=return
10673
10674 cat > conftest.$ac_ext <<EOF
10675 #line 10675 "configure"
10676 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10677 EOF
10678
10679 if test "$INTEL_CPLUSPLUS" = yes
10680 then
10681 # The "-wdXXX" options suppress warnings:
10682 # remark #1419: external declaration in primary source file
10683 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10684 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10685 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10686 # remark #193: zero used for undefined preprocessing identifier
10687 # remark #593: variable "curs_sb_left_arrow" was set but never used
10688 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10689 # remark #869: parameter "tw" was never referenced
10690 # remark #981: operands are evaluated in unspecified order
10691 # warning #269: invalid format string conversion
10692
10693         { echo "$as_me:10693: checking for $CC warning options..." >&5
10694 echo "$as_me: checking for $CC warning options..." >&6;}
10695         cf_save_CXXFLAGS="$CXXFLAGS"
10696         EXTRA_CXXFLAGS="-Wall"
10697         for cf_opt in \
10698                 wd1419 \
10699                 wd1682 \
10700                 wd1683 \
10701                 wd1684 \
10702                 wd193 \
10703                 wd279 \
10704                 wd593 \
10705                 wd810 \
10706                 wd869 \
10707                 wd981
10708         do
10709                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10710                 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); }; then
10715                         test -n "$verbose" && echo "$as_me:10715: result: ... -$cf_opt" >&5
10716 echo "${ECHO_T}... -$cf_opt" >&6
10717                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10718                 fi
10719         done
10720         CXXFLAGS="$cf_save_CXXFLAGS"
10721
10722 elif test "$GXX" = yes
10723 then
10724         { echo "$as_me:10724: checking for $CXX warning options..." >&5
10725 echo "$as_me: checking for $CXX warning options..." >&6;}
10726         cf_save_CXXFLAGS="$CXXFLAGS"
10727         EXTRA_CXXFLAGS="-W -Wall"
10728         cf_gxx_extra_warnings=""
10729         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10730         case "$GCC_VERSION" in
10731         [1-2].*)
10732                 ;;
10733         *)
10734                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10735                 ;;
10736         esac
10737         for cf_opt in \
10738                 Wabi \
10739                 fabi-version=0 \
10740                 Woverloaded-virtual \
10741                 Wsign-promo \
10742                 Wsynth \
10743                 Wold-style-cast \
10744                 Wcast-align \
10745                 Wcast-qual \
10746                 Wmissing-prototypes \
10747                 Wpointer-arith \
10748                 Wshadow \
10749                 Wstrict-prototypes \
10750                 Wundef $cf_gxx_extra_warnings Wno-unused
10751         do
10752                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10753                 if { (eval echo "$as_me:10753: \"$ac_compile\"") >&5
10754   (eval $ac_compile) 2>&5
10755   ac_status=$?
10756   echo "$as_me:10756: \$? = $ac_status" >&5
10757   (exit $ac_status); }; then
10758                         test -n "$verbose" && echo "$as_me:10758: result: ... -$cf_opt" >&5
10759 echo "${ECHO_T}... -$cf_opt" >&6
10760                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10761                 else
10762                         test -n "$verbose" && echo "$as_me:10762: result: ... no -$cf_opt" >&5
10763 echo "${ECHO_T}... no -$cf_opt" >&6
10764                 fi
10765         done
10766         CXXFLAGS="$cf_save_CXXFLAGS"
10767 fi
10768
10769 rm -f conftest*
10770 ac_ext=c
10771 ac_cpp='$CPP $CPPFLAGS'
10772 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10773 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10774 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10775 ac_main_return=return
10776
10777         fi
10778 fi
10779
10780 if test "$GCC" = yes
10781 then
10782 cat > conftest.i <<EOF
10783 #ifndef GCC_PRINTF
10784 #define GCC_PRINTF 0
10785 #endif
10786 #ifndef GCC_SCANF
10787 #define GCC_SCANF 0
10788 #endif
10789 #ifndef GCC_NORETURN
10790 #define GCC_NORETURN /* nothing */
10791 #endif
10792 #ifndef GCC_UNUSED
10793 #define GCC_UNUSED /* nothing */
10794 #endif
10795 EOF
10796 if test "$GCC" = yes
10797 then
10798         { echo "$as_me:10798: checking for $CC __attribute__ directives..." >&5
10799 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10800 cat > conftest.$ac_ext <<EOF
10801 #line 10801 "${as_me-configure}"
10802 #include "confdefs.h"
10803 #include "conftest.h"
10804 #include "conftest.i"
10805 #if     GCC_PRINTF
10806 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10807 #else
10808 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10809 #endif
10810 #if     GCC_SCANF
10811 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10812 #else
10813 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10814 #endif
10815 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10816 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10817 extern void foo(void) GCC_NORETURN;
10818 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10819 EOF
10820         cf_printf_attribute=no
10821         cf_scanf_attribute=no
10822         for cf_attribute in scanf printf unused noreturn
10823         do
10824
10825 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10826
10827                 cf_directive="__attribute__(($cf_attribute))"
10828                 echo "checking for $CC $cf_directive" 1>&5
10829
10830                 case $cf_attribute in #(vi
10831                 printf) #(vi
10832                         cf_printf_attribute=yes
10833                         cat >conftest.h <<EOF
10834 #define GCC_$cf_ATTRIBUTE 1
10835 EOF
10836                         ;;
10837                 scanf) #(vi
10838                         cf_scanf_attribute=yes
10839                         cat >conftest.h <<EOF
10840 #define GCC_$cf_ATTRIBUTE 1
10841 EOF
10842                         ;;
10843                 *) #(vi
10844                         cat >conftest.h <<EOF
10845 #define GCC_$cf_ATTRIBUTE $cf_directive
10846 EOF
10847                         ;;
10848                 esac
10849
10850                 if { (eval echo "$as_me:10850: \"$ac_compile\"") >&5
10851   (eval $ac_compile) 2>&5
10852   ac_status=$?
10853   echo "$as_me:10853: \$? = $ac_status" >&5
10854   (exit $ac_status); }; then
10855                         test -n "$verbose" && echo "$as_me:10855: result: ... $cf_attribute" >&5
10856 echo "${ECHO_T}... $cf_attribute" >&6
10857                         cat conftest.h >>confdefs.h
10858                         case $cf_attribute in #(vi
10859                         printf) #(vi
10860                                 if test "$cf_printf_attribute" = no ; then
10861                                         cat >>confdefs.h <<EOF
10862 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
10863 EOF
10864                                 else
10865                                         cat >>confdefs.h <<EOF
10866 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10867 EOF
10868                                 fi
10869                                 ;;
10870                         scanf) #(vi
10871                                 if test "$cf_scanf_attribute" = no ; then
10872                                         cat >>confdefs.h <<EOF
10873 #define GCC_SCANFLIKE(fmt,var) /* nothing */
10874 EOF
10875                                 else
10876                                         cat >>confdefs.h <<EOF
10877 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10878 EOF
10879                                 fi
10880                                 ;;
10881                         esac
10882                 fi
10883         done
10884 else
10885         fgrep define conftest.i >>confdefs.h
10886 fi
10887 rm -rf conftest*
10888 fi
10889
10890 ###     use option --enable-assertions to turn on generation of assertion code
10891 echo "$as_me:10891: checking if you want to enable runtime assertions" >&5
10892 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10893
10894 # Check whether --enable-assertions or --disable-assertions was given.
10895 if test "${enable_assertions+set}" = set; then
10896   enableval="$enable_assertions"
10897   with_assertions=$enableval
10898 else
10899   with_assertions=no
10900 fi;
10901 echo "$as_me:10901: result: $with_assertions" >&5
10902 echo "${ECHO_T}$with_assertions" >&6
10903 if test -n "$GCC"
10904 then
10905         if test "$with_assertions" = no
10906         then
10907                 cat >>confdefs.h <<\EOF
10908 #define NDEBUG 1
10909 EOF
10910
10911                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10912         else
10913                 ADAFLAGS="$ADAFLAGS -gnata"
10914         fi
10915 fi
10916
10917 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10918
10919 echo "$as_me:10919: checking if you want to use dmalloc for testing" >&5
10920 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10921
10922 # Check whether --with-dmalloc or --without-dmalloc was given.
10923 if test "${with_dmalloc+set}" = set; then
10924   withval="$with_dmalloc"
10925   cat >>confdefs.h <<\EOF
10926 #define USE_DMALLOC 1
10927 EOF
10928
10929         : ${with_cflags:=-g}
10930         : ${with_no_leaks:=yes}
10931          with_dmalloc=yes
10932 else
10933   with_dmalloc=
10934 fi;
10935 echo "$as_me:10935: result: ${with_dmalloc:-no}" >&5
10936 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10937
10938 case .$with_cflags in #(vi
10939 .*-g*)
10940         case .$CFLAGS in #(vi
10941         .*-g*) #(vi
10942                 ;;
10943         *)
10944
10945 cf_fix_cppflags=no
10946 cf_new_cflags=
10947 cf_new_cppflags=
10948 cf_new_extra_cppflags=
10949
10950 for cf_add_cflags in -g
10951 do
10952 case $cf_fix_cppflags in
10953 no)
10954         case $cf_add_cflags in #(vi
10955         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10956                 case $cf_add_cflags in
10957                 -D*)
10958                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10959
10960                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10961                         && test -z "${cf_tst_cflags}" \
10962                         && cf_fix_cppflags=yes
10963
10964                         if test $cf_fix_cppflags = yes ; then
10965                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10966                                 continue
10967                         elif test "${cf_tst_cflags}" = "\"'" ; then
10968                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10969                                 continue
10970                         fi
10971                         ;;
10972                 esac
10973                 case "$CPPFLAGS" in
10974                 *$cf_add_cflags) #(vi
10975                         ;;
10976                 *) #(vi
10977                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10978                         ;;
10979                 esac
10980                 ;;
10981         *)
10982                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10983                 ;;
10984         esac
10985         ;;
10986 yes)
10987         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10988
10989         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10990
10991         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10992         && test -z "${cf_tst_cflags}" \
10993         && cf_fix_cppflags=no
10994         ;;
10995 esac
10996 done
10997
10998 if test -n "$cf_new_cflags" ; then
10999
11000         CFLAGS="$CFLAGS $cf_new_cflags"
11001 fi
11002
11003 if test -n "$cf_new_cppflags" ; then
11004
11005         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11006 fi
11007
11008 if test -n "$cf_new_extra_cppflags" ; then
11009
11010         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11011 fi
11012
11013                 ;;
11014         esac
11015         ;;
11016 esac
11017
11018 if test "$with_dmalloc" = yes ; then
11019         echo "$as_me:11019: checking for dmalloc.h" >&5
11020 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11021 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11022   echo $ECHO_N "(cached) $ECHO_C" >&6
11023 else
11024   cat >conftest.$ac_ext <<_ACEOF
11025 #line 11025 "configure"
11026 #include "confdefs.h"
11027 #include <dmalloc.h>
11028 _ACEOF
11029 if { (eval echo "$as_me:11029: \"$ac_cpp conftest.$ac_ext\"") >&5
11030   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11031   ac_status=$?
11032   egrep -v '^ *\+' conftest.er1 >conftest.err
11033   rm -f conftest.er1
11034   cat conftest.err >&5
11035   echo "$as_me:11035: \$? = $ac_status" >&5
11036   (exit $ac_status); } >/dev/null; then
11037   if test -s conftest.err; then
11038     ac_cpp_err=$ac_c_preproc_warn_flag
11039   else
11040     ac_cpp_err=
11041   fi
11042 else
11043   ac_cpp_err=yes
11044 fi
11045 if test -z "$ac_cpp_err"; then
11046   ac_cv_header_dmalloc_h=yes
11047 else
11048   echo "$as_me: failed program was:" >&5
11049   cat conftest.$ac_ext >&5
11050   ac_cv_header_dmalloc_h=no
11051 fi
11052 rm -f conftest.err conftest.$ac_ext
11053 fi
11054 echo "$as_me:11054: result: $ac_cv_header_dmalloc_h" >&5
11055 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11056 if test $ac_cv_header_dmalloc_h = yes; then
11057
11058 echo "$as_me:11058: checking for dmalloc_debug in -ldmalloc" >&5
11059 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11060 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11061   echo $ECHO_N "(cached) $ECHO_C" >&6
11062 else
11063   ac_check_lib_save_LIBS=$LIBS
11064 LIBS="-ldmalloc  $LIBS"
11065 cat >conftest.$ac_ext <<_ACEOF
11066 #line 11066 "configure"
11067 #include "confdefs.h"
11068
11069 /* Override any gcc2 internal prototype to avoid an error.  */
11070 #ifdef __cplusplus
11071 extern "C"
11072 #endif
11073 /* We use char because int might match the return type of a gcc2
11074    builtin and then its argument prototype would still apply.  */
11075 char dmalloc_debug ();
11076 int
11077 main ()
11078 {
11079 dmalloc_debug ();
11080   ;
11081   return 0;
11082 }
11083 _ACEOF
11084 rm -f conftest.$ac_objext conftest$ac_exeext
11085 if { (eval echo "$as_me:11085: \"$ac_link\"") >&5
11086   (eval $ac_link) 2>&5
11087   ac_status=$?
11088   echo "$as_me:11088: \$? = $ac_status" >&5
11089   (exit $ac_status); } &&
11090          { ac_try='test -s conftest$ac_exeext'
11091   { (eval echo "$as_me:11091: \"$ac_try\"") >&5
11092   (eval $ac_try) 2>&5
11093   ac_status=$?
11094   echo "$as_me:11094: \$? = $ac_status" >&5
11095   (exit $ac_status); }; }; then
11096   ac_cv_lib_dmalloc_dmalloc_debug=yes
11097 else
11098   echo "$as_me: failed program was:" >&5
11099 cat conftest.$ac_ext >&5
11100 ac_cv_lib_dmalloc_dmalloc_debug=no
11101 fi
11102 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11103 LIBS=$ac_check_lib_save_LIBS
11104 fi
11105 echo "$as_me:11105: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11106 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11107 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11108   cat >>confdefs.h <<EOF
11109 #define HAVE_LIBDMALLOC 1
11110 EOF
11111
11112   LIBS="-ldmalloc $LIBS"
11113
11114 fi
11115
11116 fi
11117
11118 fi
11119
11120 echo "$as_me:11120: checking if you want to use dbmalloc for testing" >&5
11121 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11122
11123 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11124 if test "${with_dbmalloc+set}" = set; then
11125   withval="$with_dbmalloc"
11126   cat >>confdefs.h <<\EOF
11127 #define USE_DBMALLOC 1
11128 EOF
11129
11130         : ${with_cflags:=-g}
11131         : ${with_no_leaks:=yes}
11132          with_dbmalloc=yes
11133 else
11134   with_dbmalloc=
11135 fi;
11136 echo "$as_me:11136: result: ${with_dbmalloc:-no}" >&5
11137 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11138
11139 case .$with_cflags in #(vi
11140 .*-g*)
11141         case .$CFLAGS in #(vi
11142         .*-g*) #(vi
11143                 ;;
11144         *)
11145
11146 cf_fix_cppflags=no
11147 cf_new_cflags=
11148 cf_new_cppflags=
11149 cf_new_extra_cppflags=
11150
11151 for cf_add_cflags in -g
11152 do
11153 case $cf_fix_cppflags in
11154 no)
11155         case $cf_add_cflags in #(vi
11156         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11157                 case $cf_add_cflags in
11158                 -D*)
11159                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11160
11161                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11162                         && test -z "${cf_tst_cflags}" \
11163                         && cf_fix_cppflags=yes
11164
11165                         if test $cf_fix_cppflags = yes ; then
11166                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11167                                 continue
11168                         elif test "${cf_tst_cflags}" = "\"'" ; then
11169                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11170                                 continue
11171                         fi
11172                         ;;
11173                 esac
11174                 case "$CPPFLAGS" in
11175                 *$cf_add_cflags) #(vi
11176                         ;;
11177                 *) #(vi
11178                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11179                         ;;
11180                 esac
11181                 ;;
11182         *)
11183                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11184                 ;;
11185         esac
11186         ;;
11187 yes)
11188         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11189
11190         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11191
11192         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11193         && test -z "${cf_tst_cflags}" \
11194         && cf_fix_cppflags=no
11195         ;;
11196 esac
11197 done
11198
11199 if test -n "$cf_new_cflags" ; then
11200
11201         CFLAGS="$CFLAGS $cf_new_cflags"
11202 fi
11203
11204 if test -n "$cf_new_cppflags" ; then
11205
11206         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11207 fi
11208
11209 if test -n "$cf_new_extra_cppflags" ; then
11210
11211         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11212 fi
11213
11214                 ;;
11215         esac
11216         ;;
11217 esac
11218
11219 if test "$with_dbmalloc" = yes ; then
11220         echo "$as_me:11220: checking for dbmalloc.h" >&5
11221 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11222 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11223   echo $ECHO_N "(cached) $ECHO_C" >&6
11224 else
11225   cat >conftest.$ac_ext <<_ACEOF
11226 #line 11226 "configure"
11227 #include "confdefs.h"
11228 #include <dbmalloc.h>
11229 _ACEOF
11230 if { (eval echo "$as_me:11230: \"$ac_cpp conftest.$ac_ext\"") >&5
11231   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11232   ac_status=$?
11233   egrep -v '^ *\+' conftest.er1 >conftest.err
11234   rm -f conftest.er1
11235   cat conftest.err >&5
11236   echo "$as_me:11236: \$? = $ac_status" >&5
11237   (exit $ac_status); } >/dev/null; then
11238   if test -s conftest.err; then
11239     ac_cpp_err=$ac_c_preproc_warn_flag
11240   else
11241     ac_cpp_err=
11242   fi
11243 else
11244   ac_cpp_err=yes
11245 fi
11246 if test -z "$ac_cpp_err"; then
11247   ac_cv_header_dbmalloc_h=yes
11248 else
11249   echo "$as_me: failed program was:" >&5
11250   cat conftest.$ac_ext >&5
11251   ac_cv_header_dbmalloc_h=no
11252 fi
11253 rm -f conftest.err conftest.$ac_ext
11254 fi
11255 echo "$as_me:11255: result: $ac_cv_header_dbmalloc_h" >&5
11256 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11257 if test $ac_cv_header_dbmalloc_h = yes; then
11258
11259 echo "$as_me:11259: checking for debug_malloc in -ldbmalloc" >&5
11260 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11261 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11262   echo $ECHO_N "(cached) $ECHO_C" >&6
11263 else
11264   ac_check_lib_save_LIBS=$LIBS
11265 LIBS="-ldbmalloc  $LIBS"
11266 cat >conftest.$ac_ext <<_ACEOF
11267 #line 11267 "configure"
11268 #include "confdefs.h"
11269
11270 /* Override any gcc2 internal prototype to avoid an error.  */
11271 #ifdef __cplusplus
11272 extern "C"
11273 #endif
11274 /* We use char because int might match the return type of a gcc2
11275    builtin and then its argument prototype would still apply.  */
11276 char debug_malloc ();
11277 int
11278 main ()
11279 {
11280 debug_malloc ();
11281   ;
11282   return 0;
11283 }
11284 _ACEOF
11285 rm -f conftest.$ac_objext conftest$ac_exeext
11286 if { (eval echo "$as_me:11286: \"$ac_link\"") >&5
11287   (eval $ac_link) 2>&5
11288   ac_status=$?
11289   echo "$as_me:11289: \$? = $ac_status" >&5
11290   (exit $ac_status); } &&
11291          { ac_try='test -s conftest$ac_exeext'
11292   { (eval echo "$as_me:11292: \"$ac_try\"") >&5
11293   (eval $ac_try) 2>&5
11294   ac_status=$?
11295   echo "$as_me:11295: \$? = $ac_status" >&5
11296   (exit $ac_status); }; }; then
11297   ac_cv_lib_dbmalloc_debug_malloc=yes
11298 else
11299   echo "$as_me: failed program was:" >&5
11300 cat conftest.$ac_ext >&5
11301 ac_cv_lib_dbmalloc_debug_malloc=no
11302 fi
11303 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11304 LIBS=$ac_check_lib_save_LIBS
11305 fi
11306 echo "$as_me:11306: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11307 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11308 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11309   cat >>confdefs.h <<EOF
11310 #define HAVE_LIBDBMALLOC 1
11311 EOF
11312
11313   LIBS="-ldbmalloc $LIBS"
11314
11315 fi
11316
11317 fi
11318
11319 fi
11320
11321 echo "$as_me:11321: checking if you want to use valgrind for testing" >&5
11322 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11323
11324 # Check whether --with-valgrind or --without-valgrind was given.
11325 if test "${with_valgrind+set}" = set; then
11326   withval="$with_valgrind"
11327   cat >>confdefs.h <<\EOF
11328 #define USE_VALGRIND 1
11329 EOF
11330
11331         : ${with_cflags:=-g}
11332         : ${with_no_leaks:=yes}
11333          with_valgrind=yes
11334 else
11335   with_valgrind=
11336 fi;
11337 echo "$as_me:11337: result: ${with_valgrind:-no}" >&5
11338 echo "${ECHO_T}${with_valgrind:-no}" >&6
11339
11340 case .$with_cflags in #(vi
11341 .*-g*)
11342         case .$CFLAGS in #(vi
11343         .*-g*) #(vi
11344                 ;;
11345         *)
11346
11347 cf_fix_cppflags=no
11348 cf_new_cflags=
11349 cf_new_cppflags=
11350 cf_new_extra_cppflags=
11351
11352 for cf_add_cflags in -g
11353 do
11354 case $cf_fix_cppflags in
11355 no)
11356         case $cf_add_cflags in #(vi
11357         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11358                 case $cf_add_cflags in
11359                 -D*)
11360                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11361
11362                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11363                         && test -z "${cf_tst_cflags}" \
11364                         && cf_fix_cppflags=yes
11365
11366                         if test $cf_fix_cppflags = yes ; then
11367                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11368                                 continue
11369                         elif test "${cf_tst_cflags}" = "\"'" ; then
11370                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11371                                 continue
11372                         fi
11373                         ;;
11374                 esac
11375                 case "$CPPFLAGS" in
11376                 *$cf_add_cflags) #(vi
11377                         ;;
11378                 *) #(vi
11379                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11380                         ;;
11381                 esac
11382                 ;;
11383         *)
11384                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11385                 ;;
11386         esac
11387         ;;
11388 yes)
11389         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11390
11391         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11392
11393         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11394         && test -z "${cf_tst_cflags}" \
11395         && cf_fix_cppflags=no
11396         ;;
11397 esac
11398 done
11399
11400 if test -n "$cf_new_cflags" ; then
11401
11402         CFLAGS="$CFLAGS $cf_new_cflags"
11403 fi
11404
11405 if test -n "$cf_new_cppflags" ; then
11406
11407         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11408 fi
11409
11410 if test -n "$cf_new_extra_cppflags" ; then
11411
11412         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11413 fi
11414
11415                 ;;
11416         esac
11417         ;;
11418 esac
11419
11420 echo "$as_me:11420: checking if you want to perform memory-leak testing" >&5
11421 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11422
11423 # Check whether --enable-leaks or --disable-leaks was given.
11424 if test "${enable_leaks+set}" = set; then
11425   enableval="$enable_leaks"
11426   with_no_leaks=yes
11427 else
11428   : ${with_no_leaks:=no}
11429 fi;
11430 echo "$as_me:11430: result: $with_no_leaks" >&5
11431 echo "${ECHO_T}$with_no_leaks" >&6
11432
11433 if test "$with_no_leaks" = yes ; then
11434         cat >>confdefs.h <<\EOF
11435 #define NO_LEAKS 1
11436 EOF
11437
11438 fi
11439
11440 cat >>confdefs.h <<\EOF
11441 #define HAVE_NC_ALLOC_H 1
11442 EOF
11443
11444 ###     use option --enable-expanded to generate certain macros as functions
11445
11446 # Check whether --enable-expanded or --disable-expanded was given.
11447 if test "${enable_expanded+set}" = set; then
11448   enableval="$enable_expanded"
11449   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11450 #define NCURSES_EXPANDED 1
11451 EOF
11452
11453 fi;
11454
11455 ###     use option --disable-macros to suppress macros in favor of functions
11456
11457 # Check whether --enable-macros or --disable-macros was given.
11458 if test "${enable_macros+set}" = set; then
11459   enableval="$enable_macros"
11460   test "$enableval" = no && cat >>confdefs.h <<\EOF
11461 #define NCURSES_NOMACROS 1
11462 EOF
11463
11464 fi;
11465
11466 # Normally we only add trace() to the debug-library.  Allow this to be
11467 # extended to all models of the ncurses library:
11468 cf_all_traces=no
11469 case "$CFLAGS $CPPFLAGS" in
11470 *-DTRACE*)
11471         cf_all_traces=yes
11472         ;;
11473 esac
11474
11475 echo "$as_me:11475: checking whether to add trace feature to all models" >&5
11476 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11477
11478 # Check whether --with-trace or --without-trace was given.
11479 if test "${with_trace+set}" = set; then
11480   withval="$with_trace"
11481   cf_with_trace=$withval
11482 else
11483   cf_with_trace=$cf_all_traces
11484 fi;
11485 echo "$as_me:11485: result: $cf_with_trace" >&5
11486 echo "${ECHO_T}$cf_with_trace" >&6
11487
11488 if test "$cf_with_trace" = yes ; then
11489         LIB_TRACING=all
11490         ADA_TRACE=TRUE
11491
11492 cf_fix_cppflags=no
11493 cf_new_cflags=
11494 cf_new_cppflags=
11495 cf_new_extra_cppflags=
11496
11497 for cf_add_cflags in -DTRACE
11498 do
11499 case $cf_fix_cppflags in
11500 no)
11501         case $cf_add_cflags in #(vi
11502         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11503                 case $cf_add_cflags in
11504                 -D*)
11505                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11506
11507                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11508                         && test -z "${cf_tst_cflags}" \
11509                         && cf_fix_cppflags=yes
11510
11511                         if test $cf_fix_cppflags = yes ; then
11512                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11513                                 continue
11514                         elif test "${cf_tst_cflags}" = "\"'" ; then
11515                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11516                                 continue
11517                         fi
11518                         ;;
11519                 esac
11520                 case "$CPPFLAGS" in
11521                 *$cf_add_cflags) #(vi
11522                         ;;
11523                 *) #(vi
11524                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11525                         ;;
11526                 esac
11527                 ;;
11528         *)
11529                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11530                 ;;
11531         esac
11532         ;;
11533 yes)
11534         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11535
11536         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11537
11538         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11539         && test -z "${cf_tst_cflags}" \
11540         && cf_fix_cppflags=no
11541         ;;
11542 esac
11543 done
11544
11545 if test -n "$cf_new_cflags" ; then
11546
11547         CFLAGS="$CFLAGS $cf_new_cflags"
11548 fi
11549
11550 if test -n "$cf_new_cppflags" ; then
11551
11552         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11553 fi
11554
11555 if test -n "$cf_new_extra_cppflags" ; then
11556
11557         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11558 fi
11559
11560 else
11561         LIB_TRACING=DEBUG
11562         ADA_TRACE=FALSE
11563 fi
11564
11565 ###     Checks for libraries.
11566 case $cf_cv_system_name in #(vi
11567 *mingw32*) #(vi
11568         ;;
11569 *)
11570 echo "$as_me:11570: checking for gettimeofday" >&5
11571 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11572 if test "${ac_cv_func_gettimeofday+set}" = set; then
11573   echo $ECHO_N "(cached) $ECHO_C" >&6
11574 else
11575   cat >conftest.$ac_ext <<_ACEOF
11576 #line 11576 "configure"
11577 #include "confdefs.h"
11578 /* System header to define __stub macros and hopefully few prototypes,
11579     which can conflict with char gettimeofday (); below.  */
11580 #include <assert.h>
11581 /* Override any gcc2 internal prototype to avoid an error.  */
11582 #ifdef __cplusplus
11583 extern "C"
11584 #endif
11585 /* We use char because int might match the return type of a gcc2
11586    builtin and then its argument prototype would still apply.  */
11587 char gettimeofday ();
11588 char (*f) ();
11589
11590 int
11591 main ()
11592 {
11593 /* The GNU C library defines this for functions which it implements
11594     to always fail with ENOSYS.  Some functions are actually named
11595     something starting with __ and the normal name is an alias.  */
11596 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11597 choke me
11598 #else
11599 f = gettimeofday;
11600 #endif
11601
11602   ;
11603   return 0;
11604 }
11605 _ACEOF
11606 rm -f conftest.$ac_objext conftest$ac_exeext
11607 if { (eval echo "$as_me:11607: \"$ac_link\"") >&5
11608   (eval $ac_link) 2>&5
11609   ac_status=$?
11610   echo "$as_me:11610: \$? = $ac_status" >&5
11611   (exit $ac_status); } &&
11612          { ac_try='test -s conftest$ac_exeext'
11613   { (eval echo "$as_me:11613: \"$ac_try\"") >&5
11614   (eval $ac_try) 2>&5
11615   ac_status=$?
11616   echo "$as_me:11616: \$? = $ac_status" >&5
11617   (exit $ac_status); }; }; then
11618   ac_cv_func_gettimeofday=yes
11619 else
11620   echo "$as_me: failed program was:" >&5
11621 cat conftest.$ac_ext >&5
11622 ac_cv_func_gettimeofday=no
11623 fi
11624 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11625 fi
11626 echo "$as_me:11626: result: $ac_cv_func_gettimeofday" >&5
11627 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11628 if test $ac_cv_func_gettimeofday = yes; then
11629   cat >>confdefs.h <<\EOF
11630 #define HAVE_GETTIMEOFDAY 1
11631 EOF
11632
11633 else
11634
11635 echo "$as_me:11635: checking for gettimeofday in -lbsd" >&5
11636 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11637 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11638   echo $ECHO_N "(cached) $ECHO_C" >&6
11639 else
11640   ac_check_lib_save_LIBS=$LIBS
11641 LIBS="-lbsd  $LIBS"
11642 cat >conftest.$ac_ext <<_ACEOF
11643 #line 11643 "configure"
11644 #include "confdefs.h"
11645
11646 /* Override any gcc2 internal prototype to avoid an error.  */
11647 #ifdef __cplusplus
11648 extern "C"
11649 #endif
11650 /* We use char because int might match the return type of a gcc2
11651    builtin and then its argument prototype would still apply.  */
11652 char gettimeofday ();
11653 int
11654 main ()
11655 {
11656 gettimeofday ();
11657   ;
11658   return 0;
11659 }
11660 _ACEOF
11661 rm -f conftest.$ac_objext conftest$ac_exeext
11662 if { (eval echo "$as_me:11662: \"$ac_link\"") >&5
11663   (eval $ac_link) 2>&5
11664   ac_status=$?
11665   echo "$as_me:11665: \$? = $ac_status" >&5
11666   (exit $ac_status); } &&
11667          { ac_try='test -s conftest$ac_exeext'
11668   { (eval echo "$as_me:11668: \"$ac_try\"") >&5
11669   (eval $ac_try) 2>&5
11670   ac_status=$?
11671   echo "$as_me:11671: \$? = $ac_status" >&5
11672   (exit $ac_status); }; }; then
11673   ac_cv_lib_bsd_gettimeofday=yes
11674 else
11675   echo "$as_me: failed program was:" >&5
11676 cat conftest.$ac_ext >&5
11677 ac_cv_lib_bsd_gettimeofday=no
11678 fi
11679 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11680 LIBS=$ac_check_lib_save_LIBS
11681 fi
11682 echo "$as_me:11682: result: $ac_cv_lib_bsd_gettimeofday" >&5
11683 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11684 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11685   cat >>confdefs.h <<\EOF
11686 #define HAVE_GETTIMEOFDAY 1
11687 EOF
11688
11689         LIBS="$LIBS -lbsd"
11690 fi
11691
11692 fi
11693         ;;
11694 esac
11695
11696 echo "$as_me:11696: checking if -lm needed for math functions" >&5
11697 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11698 if test "${cf_cv_need_libm+set}" = set; then
11699   echo $ECHO_N "(cached) $ECHO_C" >&6
11700 else
11701
11702         cat >conftest.$ac_ext <<_ACEOF
11703 #line 11703 "configure"
11704 #include "confdefs.h"
11705
11706         #include <stdio.h>
11707         #include <math.h>
11708
11709 int
11710 main ()
11711 {
11712 double x = rand(); printf("result = %g\n", sin(x))
11713   ;
11714   return 0;
11715 }
11716 _ACEOF
11717 rm -f conftest.$ac_objext conftest$ac_exeext
11718 if { (eval echo "$as_me:11718: \"$ac_link\"") >&5
11719   (eval $ac_link) 2>&5
11720   ac_status=$?
11721   echo "$as_me:11721: \$? = $ac_status" >&5
11722   (exit $ac_status); } &&
11723          { ac_try='test -s conftest$ac_exeext'
11724   { (eval echo "$as_me:11724: \"$ac_try\"") >&5
11725   (eval $ac_try) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); }; }; then
11729   cf_cv_need_libm=no
11730 else
11731   echo "$as_me: failed program was:" >&5
11732 cat conftest.$ac_ext >&5
11733 cf_cv_need_libm=yes
11734 fi
11735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11736 fi
11737 echo "$as_me:11737: result: $cf_cv_need_libm" >&5
11738 echo "${ECHO_T}$cf_cv_need_libm" >&6
11739 if test "$cf_cv_need_libm" = yes
11740 then
11741 MATH_LIB=-lm
11742 fi
11743
11744 ###     Checks for header files.
11745 echo "$as_me:11745: checking for ANSI C header files" >&5
11746 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11747 if test "${ac_cv_header_stdc+set}" = set; then
11748   echo $ECHO_N "(cached) $ECHO_C" >&6
11749 else
11750   cat >conftest.$ac_ext <<_ACEOF
11751 #line 11751 "configure"
11752 #include "confdefs.h"
11753 #include <stdlib.h>
11754 #include <stdarg.h>
11755 #include <string.h>
11756 #include <float.h>
11757
11758 _ACEOF
11759 if { (eval echo "$as_me:11759: \"$ac_cpp conftest.$ac_ext\"") >&5
11760   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11761   ac_status=$?
11762   egrep -v '^ *\+' conftest.er1 >conftest.err
11763   rm -f conftest.er1
11764   cat conftest.err >&5
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit $ac_status); } >/dev/null; then
11767   if test -s conftest.err; then
11768     ac_cpp_err=$ac_c_preproc_warn_flag
11769   else
11770     ac_cpp_err=
11771   fi
11772 else
11773   ac_cpp_err=yes
11774 fi
11775 if test -z "$ac_cpp_err"; then
11776   ac_cv_header_stdc=yes
11777 else
11778   echo "$as_me: failed program was:" >&5
11779   cat conftest.$ac_ext >&5
11780   ac_cv_header_stdc=no
11781 fi
11782 rm -f conftest.err conftest.$ac_ext
11783
11784 if test $ac_cv_header_stdc = yes; then
11785   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11786   cat >conftest.$ac_ext <<_ACEOF
11787 #line 11787 "configure"
11788 #include "confdefs.h"
11789 #include <string.h>
11790
11791 _ACEOF
11792 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11793   egrep "memchr" >/dev/null 2>&1; then
11794   :
11795 else
11796   ac_cv_header_stdc=no
11797 fi
11798 rm -f conftest*
11799
11800 fi
11801
11802 if test $ac_cv_header_stdc = yes; then
11803   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11804   cat >conftest.$ac_ext <<_ACEOF
11805 #line 11805 "configure"
11806 #include "confdefs.h"
11807 #include <stdlib.h>
11808
11809 _ACEOF
11810 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11811   egrep "free" >/dev/null 2>&1; then
11812   :
11813 else
11814   ac_cv_header_stdc=no
11815 fi
11816 rm -f conftest*
11817
11818 fi
11819
11820 if test $ac_cv_header_stdc = yes; then
11821   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11822   if test "$cross_compiling" = yes; then
11823   :
11824 else
11825   cat >conftest.$ac_ext <<_ACEOF
11826 #line 11826 "configure"
11827 #include "confdefs.h"
11828 #include <ctype.h>
11829 #if ((' ' & 0x0FF) == 0x020)
11830 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11831 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11832 #else
11833 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11834                      || ('j' <= (c) && (c) <= 'r') \
11835                      || ('s' <= (c) && (c) <= 'z'))
11836 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11837 #endif
11838
11839 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11840 int
11841 main ()
11842 {
11843   int i;
11844   for (i = 0; i < 256; i++)
11845     if (XOR (islower (i), ISLOWER (i))
11846         || toupper (i) != TOUPPER (i))
11847       $ac_main_return(2);
11848   $ac_main_return (0);
11849 }
11850 _ACEOF
11851 rm -f conftest$ac_exeext
11852 if { (eval echo "$as_me:11852: \"$ac_link\"") >&5
11853   (eval $ac_link) 2>&5
11854   ac_status=$?
11855   echo "$as_me:11855: \$? = $ac_status" >&5
11856   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11857   { (eval echo "$as_me:11857: \"$ac_try\"") >&5
11858   (eval $ac_try) 2>&5
11859   ac_status=$?
11860   echo "$as_me:11860: \$? = $ac_status" >&5
11861   (exit $ac_status); }; }; then
11862   :
11863 else
11864   echo "$as_me: program exited with status $ac_status" >&5
11865 echo "$as_me: failed program was:" >&5
11866 cat conftest.$ac_ext >&5
11867 ac_cv_header_stdc=no
11868 fi
11869 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11870 fi
11871 fi
11872 fi
11873 echo "$as_me:11873: result: $ac_cv_header_stdc" >&5
11874 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11875 if test $ac_cv_header_stdc = yes; then
11876
11877 cat >>confdefs.h <<\EOF
11878 #define STDC_HEADERS 1
11879 EOF
11880
11881 fi
11882
11883 ac_header_dirent=no
11884 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11885   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11886 echo "$as_me:11886: checking for $ac_hdr that defines DIR" >&5
11887 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11888 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11889   echo $ECHO_N "(cached) $ECHO_C" >&6
11890 else
11891   cat >conftest.$ac_ext <<_ACEOF
11892 #line 11892 "configure"
11893 #include "confdefs.h"
11894 #include <sys/types.h>
11895 #include <$ac_hdr>
11896
11897 int
11898 main ()
11899 {
11900 if ((DIR *) 0)
11901 return 0;
11902   ;
11903   return 0;
11904 }
11905 _ACEOF
11906 rm -f conftest.$ac_objext
11907 if { (eval echo "$as_me:11907: \"$ac_compile\"") >&5
11908   (eval $ac_compile) 2>&5
11909   ac_status=$?
11910   echo "$as_me:11910: \$? = $ac_status" >&5
11911   (exit $ac_status); } &&
11912          { ac_try='test -s conftest.$ac_objext'
11913   { (eval echo "$as_me:11913: \"$ac_try\"") >&5
11914   (eval $ac_try) 2>&5
11915   ac_status=$?
11916   echo "$as_me:11916: \$? = $ac_status" >&5
11917   (exit $ac_status); }; }; then
11918   eval "$as_ac_Header=yes"
11919 else
11920   echo "$as_me: failed program was:" >&5
11921 cat conftest.$ac_ext >&5
11922 eval "$as_ac_Header=no"
11923 fi
11924 rm -f conftest.$ac_objext conftest.$ac_ext
11925 fi
11926 echo "$as_me:11926: result: `eval echo '${'$as_ac_Header'}'`" >&5
11927 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11928 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11929   cat >>confdefs.h <<EOF
11930 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11931 EOF
11932
11933 ac_header_dirent=$ac_hdr; break
11934 fi
11935
11936 done
11937 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11938 if test $ac_header_dirent = dirent.h; then
11939   echo "$as_me:11939: checking for opendir in -ldir" >&5
11940 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11941 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11942   echo $ECHO_N "(cached) $ECHO_C" >&6
11943 else
11944   ac_check_lib_save_LIBS=$LIBS
11945 LIBS="-ldir  $LIBS"
11946 cat >conftest.$ac_ext <<_ACEOF
11947 #line 11947 "configure"
11948 #include "confdefs.h"
11949
11950 /* Override any gcc2 internal prototype to avoid an error.  */
11951 #ifdef __cplusplus
11952 extern "C"
11953 #endif
11954 /* We use char because int might match the return type of a gcc2
11955    builtin and then its argument prototype would still apply.  */
11956 char opendir ();
11957 int
11958 main ()
11959 {
11960 opendir ();
11961   ;
11962   return 0;
11963 }
11964 _ACEOF
11965 rm -f conftest.$ac_objext conftest$ac_exeext
11966 if { (eval echo "$as_me:11966: \"$ac_link\"") >&5
11967   (eval $ac_link) 2>&5
11968   ac_status=$?
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit $ac_status); } &&
11971          { ac_try='test -s conftest$ac_exeext'
11972   { (eval echo "$as_me:11972: \"$ac_try\"") >&5
11973   (eval $ac_try) 2>&5
11974   ac_status=$?
11975   echo "$as_me:11975: \$? = $ac_status" >&5
11976   (exit $ac_status); }; }; then
11977   ac_cv_lib_dir_opendir=yes
11978 else
11979   echo "$as_me: failed program was:" >&5
11980 cat conftest.$ac_ext >&5
11981 ac_cv_lib_dir_opendir=no
11982 fi
11983 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11984 LIBS=$ac_check_lib_save_LIBS
11985 fi
11986 echo "$as_me:11986: result: $ac_cv_lib_dir_opendir" >&5
11987 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11988 if test $ac_cv_lib_dir_opendir = yes; then
11989   LIBS="$LIBS -ldir"
11990 fi
11991
11992 else
11993   echo "$as_me:11993: checking for opendir in -lx" >&5
11994 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11995 if test "${ac_cv_lib_x_opendir+set}" = set; then
11996   echo $ECHO_N "(cached) $ECHO_C" >&6
11997 else
11998   ac_check_lib_save_LIBS=$LIBS
11999 LIBS="-lx  $LIBS"
12000 cat >conftest.$ac_ext <<_ACEOF
12001 #line 12001 "configure"
12002 #include "confdefs.h"
12003
12004 /* Override any gcc2 internal prototype to avoid an error.  */
12005 #ifdef __cplusplus
12006 extern "C"
12007 #endif
12008 /* We use char because int might match the return type of a gcc2
12009    builtin and then its argument prototype would still apply.  */
12010 char opendir ();
12011 int
12012 main ()
12013 {
12014 opendir ();
12015   ;
12016   return 0;
12017 }
12018 _ACEOF
12019 rm -f conftest.$ac_objext conftest$ac_exeext
12020 if { (eval echo "$as_me:12020: \"$ac_link\"") >&5
12021   (eval $ac_link) 2>&5
12022   ac_status=$?
12023   echo "$as_me:12023: \$? = $ac_status" >&5
12024   (exit $ac_status); } &&
12025          { ac_try='test -s conftest$ac_exeext'
12026   { (eval echo "$as_me:12026: \"$ac_try\"") >&5
12027   (eval $ac_try) 2>&5
12028   ac_status=$?
12029   echo "$as_me:12029: \$? = $ac_status" >&5
12030   (exit $ac_status); }; }; then
12031   ac_cv_lib_x_opendir=yes
12032 else
12033   echo "$as_me: failed program was:" >&5
12034 cat conftest.$ac_ext >&5
12035 ac_cv_lib_x_opendir=no
12036 fi
12037 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12038 LIBS=$ac_check_lib_save_LIBS
12039 fi
12040 echo "$as_me:12040: result: $ac_cv_lib_x_opendir" >&5
12041 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12042 if test $ac_cv_lib_x_opendir = yes; then
12043   LIBS="$LIBS -lx"
12044 fi
12045
12046 fi
12047
12048 echo "$as_me:12048: checking whether time.h and sys/time.h may both be included" >&5
12049 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12050 if test "${ac_cv_header_time+set}" = set; then
12051   echo $ECHO_N "(cached) $ECHO_C" >&6
12052 else
12053   cat >conftest.$ac_ext <<_ACEOF
12054 #line 12054 "configure"
12055 #include "confdefs.h"
12056 #include <sys/types.h>
12057 #include <sys/time.h>
12058 #include <time.h>
12059
12060 int
12061 main ()
12062 {
12063 if ((struct tm *) 0)
12064 return 0;
12065   ;
12066   return 0;
12067 }
12068 _ACEOF
12069 rm -f conftest.$ac_objext
12070 if { (eval echo "$as_me:12070: \"$ac_compile\"") >&5
12071   (eval $ac_compile) 2>&5
12072   ac_status=$?
12073   echo "$as_me:12073: \$? = $ac_status" >&5
12074   (exit $ac_status); } &&
12075          { ac_try='test -s conftest.$ac_objext'
12076   { (eval echo "$as_me:12076: \"$ac_try\"") >&5
12077   (eval $ac_try) 2>&5
12078   ac_status=$?
12079   echo "$as_me:12079: \$? = $ac_status" >&5
12080   (exit $ac_status); }; }; then
12081   ac_cv_header_time=yes
12082 else
12083   echo "$as_me: failed program was:" >&5
12084 cat conftest.$ac_ext >&5
12085 ac_cv_header_time=no
12086 fi
12087 rm -f conftest.$ac_objext conftest.$ac_ext
12088 fi
12089 echo "$as_me:12089: result: $ac_cv_header_time" >&5
12090 echo "${ECHO_T}$ac_cv_header_time" >&6
12091 if test $ac_cv_header_time = yes; then
12092
12093 cat >>confdefs.h <<\EOF
12094 #define TIME_WITH_SYS_TIME 1
12095 EOF
12096
12097 fi
12098
12099 echo "$as_me:12099: checking for regular-expression headers" >&5
12100 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12101 if test "${cf_cv_regex+set}" = set; then
12102   echo $ECHO_N "(cached) $ECHO_C" >&6
12103 else
12104
12105 cat >conftest.$ac_ext <<_ACEOF
12106 #line 12106 "configure"
12107 #include "confdefs.h"
12108 #include <sys/types.h>
12109 #include <regex.h>
12110 int
12111 main ()
12112 {
12113
12114         regex_t *p;
12115         int x = regcomp(p, "", 0);
12116         int y = regexec(p, "", 0, 0, 0);
12117         regfree(p);
12118
12119   ;
12120   return 0;
12121 }
12122 _ACEOF
12123 rm -f conftest.$ac_objext conftest$ac_exeext
12124 if { (eval echo "$as_me:12124: \"$ac_link\"") >&5
12125   (eval $ac_link) 2>&5
12126   ac_status=$?
12127   echo "$as_me:12127: \$? = $ac_status" >&5
12128   (exit $ac_status); } &&
12129          { ac_try='test -s conftest$ac_exeext'
12130   { (eval echo "$as_me:12130: \"$ac_try\"") >&5
12131   (eval $ac_try) 2>&5
12132   ac_status=$?
12133   echo "$as_me:12133: \$? = $ac_status" >&5
12134   (exit $ac_status); }; }; then
12135   cf_cv_regex="regex.h"
12136 else
12137   echo "$as_me: failed program was:" >&5
12138 cat conftest.$ac_ext >&5
12139
12140         cat >conftest.$ac_ext <<_ACEOF
12141 #line 12141 "configure"
12142 #include "confdefs.h"
12143 #include <regexp.h>
12144 int
12145 main ()
12146 {
12147
12148                 char *p = compile("", "", "", 0);
12149                 int x = step("", "");
12150
12151   ;
12152   return 0;
12153 }
12154 _ACEOF
12155 rm -f conftest.$ac_objext conftest$ac_exeext
12156 if { (eval echo "$as_me:12156: \"$ac_link\"") >&5
12157   (eval $ac_link) 2>&5
12158   ac_status=$?
12159   echo "$as_me:12159: \$? = $ac_status" >&5
12160   (exit $ac_status); } &&
12161          { ac_try='test -s conftest$ac_exeext'
12162   { (eval echo "$as_me:12162: \"$ac_try\"") >&5
12163   (eval $ac_try) 2>&5
12164   ac_status=$?
12165   echo "$as_me:12165: \$? = $ac_status" >&5
12166   (exit $ac_status); }; }; then
12167   cf_cv_regex="regexp.h"
12168 else
12169   echo "$as_me: failed program was:" >&5
12170 cat conftest.$ac_ext >&5
12171
12172                 cf_save_LIBS="$LIBS"
12173                 LIBS="-lgen $LIBS"
12174                 cat >conftest.$ac_ext <<_ACEOF
12175 #line 12175 "configure"
12176 #include "confdefs.h"
12177 #include <regexpr.h>
12178 int
12179 main ()
12180 {
12181
12182                         char *p = compile("", "", "");
12183                         int x = step("", "");
12184
12185   ;
12186   return 0;
12187 }
12188 _ACEOF
12189 rm -f conftest.$ac_objext conftest$ac_exeext
12190 if { (eval echo "$as_me:12190: \"$ac_link\"") >&5
12191   (eval $ac_link) 2>&5
12192   ac_status=$?
12193   echo "$as_me:12193: \$? = $ac_status" >&5
12194   (exit $ac_status); } &&
12195          { ac_try='test -s conftest$ac_exeext'
12196   { (eval echo "$as_me:12196: \"$ac_try\"") >&5
12197   (eval $ac_try) 2>&5
12198   ac_status=$?
12199   echo "$as_me:12199: \$? = $ac_status" >&5
12200   (exit $ac_status); }; }; then
12201   cf_cv_regex="regexpr.h"
12202 else
12203   echo "$as_me: failed program was:" >&5
12204 cat conftest.$ac_ext >&5
12205 LIBS="$cf_save_LIBS"
12206 fi
12207 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12208 fi
12209 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12210 fi
12211 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12212
12213 fi
12214
12215 echo "$as_me:12215: result: $cf_cv_regex" >&5
12216 echo "${ECHO_T}$cf_cv_regex" >&6
12217 case $cf_cv_regex in
12218         regex.h)   cat >>confdefs.h <<\EOF
12219 #define HAVE_REGEX_H_FUNCS 1
12220 EOF
12221  ;;
12222         regexp.h)  cat >>confdefs.h <<\EOF
12223 #define HAVE_REGEXP_H_FUNCS 1
12224 EOF
12225  ;;
12226         regexpr.h) cat >>confdefs.h <<\EOF
12227 #define HAVE_REGEXPR_H_FUNCS 1
12228 EOF
12229  ;;
12230 esac
12231
12232 for ac_header in \
12233 fcntl.h \
12234 getopt.h \
12235 limits.h \
12236 locale.h \
12237 poll.h \
12238 sys/bsdtypes.h \
12239 sys/ioctl.h \
12240 sys/param.h \
12241 sys/poll.h \
12242 sys/select.h \
12243 sys/time.h \
12244 sys/times.h \
12245 ttyent.h \
12246 unistd.h \
12247 wctype.h \
12248
12249 do
12250 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12251 echo "$as_me:12251: checking for $ac_header" >&5
12252 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12253 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12254   echo $ECHO_N "(cached) $ECHO_C" >&6
12255 else
12256   cat >conftest.$ac_ext <<_ACEOF
12257 #line 12257 "configure"
12258 #include "confdefs.h"
12259 #include <$ac_header>
12260 _ACEOF
12261 if { (eval echo "$as_me:12261: \"$ac_cpp conftest.$ac_ext\"") >&5
12262   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12263   ac_status=$?
12264   egrep -v '^ *\+' conftest.er1 >conftest.err
12265   rm -f conftest.er1
12266   cat conftest.err >&5
12267   echo "$as_me:12267: \$? = $ac_status" >&5
12268   (exit $ac_status); } >/dev/null; then
12269   if test -s conftest.err; then
12270     ac_cpp_err=$ac_c_preproc_warn_flag
12271   else
12272     ac_cpp_err=
12273   fi
12274 else
12275   ac_cpp_err=yes
12276 fi
12277 if test -z "$ac_cpp_err"; then
12278   eval "$as_ac_Header=yes"
12279 else
12280   echo "$as_me: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   eval "$as_ac_Header=no"
12283 fi
12284 rm -f conftest.err conftest.$ac_ext
12285 fi
12286 echo "$as_me:12286: result: `eval echo '${'$as_ac_Header'}'`" >&5
12287 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12288 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12289   cat >>confdefs.h <<EOF
12290 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12291 EOF
12292
12293 fi
12294 done
12295
12296 # check for ISC (this may also define _POSIX_SOURCE)
12297 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12298 if test "$ISC" = yes ; then
12299
12300 echo "$as_me:12300: checking for main in -lcposix" >&5
12301 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12302 if test "${ac_cv_lib_cposix_main+set}" = set; then
12303   echo $ECHO_N "(cached) $ECHO_C" >&6
12304 else
12305   ac_check_lib_save_LIBS=$LIBS
12306 LIBS="-lcposix  $LIBS"
12307 cat >conftest.$ac_ext <<_ACEOF
12308 #line 12308 "configure"
12309 #include "confdefs.h"
12310
12311 int
12312 main ()
12313 {
12314 main ();
12315   ;
12316   return 0;
12317 }
12318 _ACEOF
12319 rm -f conftest.$ac_objext conftest$ac_exeext
12320 if { (eval echo "$as_me:12320: \"$ac_link\"") >&5
12321   (eval $ac_link) 2>&5
12322   ac_status=$?
12323   echo "$as_me:12323: \$? = $ac_status" >&5
12324   (exit $ac_status); } &&
12325          { ac_try='test -s conftest$ac_exeext'
12326   { (eval echo "$as_me:12326: \"$ac_try\"") >&5
12327   (eval $ac_try) 2>&5
12328   ac_status=$?
12329   echo "$as_me:12329: \$? = $ac_status" >&5
12330   (exit $ac_status); }; }; then
12331   ac_cv_lib_cposix_main=yes
12332 else
12333   echo "$as_me: failed program was:" >&5
12334 cat conftest.$ac_ext >&5
12335 ac_cv_lib_cposix_main=no
12336 fi
12337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12338 LIBS=$ac_check_lib_save_LIBS
12339 fi
12340 echo "$as_me:12340: result: $ac_cv_lib_cposix_main" >&5
12341 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12342 if test $ac_cv_lib_cposix_main = yes; then
12343   cat >>confdefs.h <<EOF
12344 #define HAVE_LIBCPOSIX 1
12345 EOF
12346
12347   LIBS="-lcposix $LIBS"
12348
12349 fi
12350
12351         echo "$as_me:12351: checking for bzero in -linet" >&5
12352 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12353 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12354   echo $ECHO_N "(cached) $ECHO_C" >&6
12355 else
12356   ac_check_lib_save_LIBS=$LIBS
12357 LIBS="-linet  $LIBS"
12358 cat >conftest.$ac_ext <<_ACEOF
12359 #line 12359 "configure"
12360 #include "confdefs.h"
12361
12362 /* Override any gcc2 internal prototype to avoid an error.  */
12363 #ifdef __cplusplus
12364 extern "C"
12365 #endif
12366 /* We use char because int might match the return type of a gcc2
12367    builtin and then its argument prototype would still apply.  */
12368 char bzero ();
12369 int
12370 main ()
12371 {
12372 bzero ();
12373   ;
12374   return 0;
12375 }
12376 _ACEOF
12377 rm -f conftest.$ac_objext conftest$ac_exeext
12378 if { (eval echo "$as_me:12378: \"$ac_link\"") >&5
12379   (eval $ac_link) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit $ac_status); } &&
12383          { ac_try='test -s conftest$ac_exeext'
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   ac_cv_lib_inet_bzero=yes
12390 else
12391   echo "$as_me: failed program was:" >&5
12392 cat conftest.$ac_ext >&5
12393 ac_cv_lib_inet_bzero=no
12394 fi
12395 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12396 LIBS=$ac_check_lib_save_LIBS
12397 fi
12398 echo "$as_me:12398: result: $ac_cv_lib_inet_bzero" >&5
12399 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12400 if test $ac_cv_lib_inet_bzero = yes; then
12401   LIBS="$LIBS -linet"
12402 fi
12403 fi
12404
12405 echo "$as_me:12405: checking if sys/time.h works with sys/select.h" >&5
12406 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12407 if test "${cf_cv_sys_time_select+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410
12411 cat >conftest.$ac_ext <<_ACEOF
12412 #line 12412 "configure"
12413 #include "confdefs.h"
12414
12415 #include <sys/types.h>
12416 #ifdef HAVE_SYS_TIME_H
12417 #include <sys/time.h>
12418 #endif
12419 #ifdef HAVE_SYS_SELECT_H
12420 #include <sys/select.h>
12421 #endif
12422
12423 int
12424 main ()
12425 {
12426
12427   ;
12428   return 0;
12429 }
12430 _ACEOF
12431 rm -f conftest.$ac_objext
12432 if { (eval echo "$as_me:12432: \"$ac_compile\"") >&5
12433   (eval $ac_compile) 2>&5
12434   ac_status=$?
12435   echo "$as_me:12435: \$? = $ac_status" >&5
12436   (exit $ac_status); } &&
12437          { ac_try='test -s conftest.$ac_objext'
12438   { (eval echo "$as_me:12438: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:12441: \$? = $ac_status" >&5
12442   (exit $ac_status); }; }; then
12443   cf_cv_sys_time_select=yes
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 cat conftest.$ac_ext >&5
12447 cf_cv_sys_time_select=no
12448 fi
12449 rm -f conftest.$ac_objext conftest.$ac_ext
12450
12451 fi
12452
12453 echo "$as_me:12453: result: $cf_cv_sys_time_select" >&5
12454 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12455 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12456 #define HAVE_SYS_TIME_SELECT 1
12457 EOF
12458
12459 ###     checks for compiler characteristics
12460 ac_ext=c
12461 ac_cpp='$CPP $CPPFLAGS'
12462 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12463 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12464 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12465 ac_main_return=return
12466
12467 echo "$as_me:12467: checking for $CC option to accept ANSI C" >&5
12468 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12469 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12470   echo $ECHO_N "(cached) $ECHO_C" >&6
12471 else
12472   ac_cv_prog_cc_stdc=no
12473 ac_save_CC=$CC
12474 cat >conftest.$ac_ext <<_ACEOF
12475 #line 12475 "configure"
12476 #include "confdefs.h"
12477 #include <stdarg.h>
12478 #include <stdio.h>
12479 #include <sys/types.h>
12480 #include <sys/stat.h>
12481 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12482 struct buf { int x; };
12483 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12484 static char *e (p, i)
12485      char **p;
12486      int i;
12487 {
12488   return p[i];
12489 }
12490 static char *f (char * (*g) (char **, int), char **p, ...)
12491 {
12492   char *s;
12493   va_list v;
12494   va_start (v,p);
12495   s = g (p, va_arg (v,int));
12496   va_end (v);
12497   return s;
12498 }
12499 int test (int i, double x);
12500 struct s1 {int (*f) (int a);};
12501 struct s2 {int (*f) (double a);};
12502 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12503 int argc;
12504 char **argv;
12505 int
12506 main ()
12507 {
12508 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12509   ;
12510   return 0;
12511 }
12512 _ACEOF
12513 # Don't try gcc -ansi; that turns off useful extensions and
12514 # breaks some systems' header files.
12515 # AIX                   -qlanglvl=ansi
12516 # Ultrix and OSF/1      -std1
12517 # HP-UX 10.20 and later -Ae
12518 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12519 # SVR4                  -Xc -D__EXTENSIONS__
12520 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12521 do
12522   CC="$ac_save_CC $ac_arg"
12523   rm -f conftest.$ac_objext
12524 if { (eval echo "$as_me:12524: \"$ac_compile\"") >&5
12525   (eval $ac_compile) 2>&5
12526   ac_status=$?
12527   echo "$as_me:12527: \$? = $ac_status" >&5
12528   (exit $ac_status); } &&
12529          { ac_try='test -s conftest.$ac_objext'
12530   { (eval echo "$as_me:12530: \"$ac_try\"") >&5
12531   (eval $ac_try) 2>&5
12532   ac_status=$?
12533   echo "$as_me:12533: \$? = $ac_status" >&5
12534   (exit $ac_status); }; }; then
12535   ac_cv_prog_cc_stdc=$ac_arg
12536 break
12537 else
12538   echo "$as_me: failed program was:" >&5
12539 cat conftest.$ac_ext >&5
12540 fi
12541 rm -f conftest.$ac_objext
12542 done
12543 rm -f conftest.$ac_ext conftest.$ac_objext
12544 CC=$ac_save_CC
12545
12546 fi
12547
12548 case "x$ac_cv_prog_cc_stdc" in
12549   x|xno)
12550     echo "$as_me:12550: result: none needed" >&5
12551 echo "${ECHO_T}none needed" >&6 ;;
12552   *)
12553     echo "$as_me:12553: result: $ac_cv_prog_cc_stdc" >&5
12554 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12555     CC="$CC $ac_cv_prog_cc_stdc" ;;
12556 esac
12557
12558 echo "$as_me:12558: checking for an ANSI C-conforming const" >&5
12559 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12560 if test "${ac_cv_c_const+set}" = set; then
12561   echo $ECHO_N "(cached) $ECHO_C" >&6
12562 else
12563   cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566
12567 int
12568 main ()
12569 {
12570 /* FIXME: Include the comments suggested by Paul. */
12571 #ifndef __cplusplus
12572   /* Ultrix mips cc rejects this.  */
12573   typedef int charset[2];
12574   const charset x;
12575   /* SunOS 4.1.1 cc rejects this.  */
12576   char const *const *ccp;
12577   char **p;
12578   /* NEC SVR4.0.2 mips cc rejects this.  */
12579   struct point {int x, y;};
12580   static struct point const zero = {0,0};
12581   /* AIX XL C 1.02.0.0 rejects this.
12582      It does not let you subtract one const X* pointer from another in
12583      an arm of an if-expression whose if-part is not a constant
12584      expression */
12585   const char *g = "string";
12586   ccp = &g + (g ? g-g : 0);
12587   /* HPUX 7.0 cc rejects these. */
12588   ++ccp;
12589   p = (char**) ccp;
12590   ccp = (char const *const *) p;
12591   { /* SCO 3.2v4 cc rejects this.  */
12592     char *t;
12593     char const *s = 0 ? (char *) 0 : (char const *) 0;
12594
12595     *t++ = 0;
12596   }
12597   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12598     int x[] = {25, 17};
12599     const int *foo = &x[0];
12600     ++foo;
12601   }
12602   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12603     typedef const int *iptr;
12604     iptr p = 0;
12605     ++p;
12606   }
12607   { /* AIX XL C 1.02.0.0 rejects this saying
12608        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12609     struct s { int j; const int *ap[3]; };
12610     struct s *b; b->j = 5;
12611   }
12612   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12613     const int foo = 10;
12614   }
12615 #endif
12616
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f conftest.$ac_objext
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit $ac_status); } &&
12627          { ac_try='test -s conftest.$ac_objext'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit $ac_status); }; }; then
12633   ac_cv_c_const=yes
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat conftest.$ac_ext >&5
12637 ac_cv_c_const=no
12638 fi
12639 rm -f conftest.$ac_objext conftest.$ac_ext
12640 fi
12641 echo "$as_me:12641: result: $ac_cv_c_const" >&5
12642 echo "${ECHO_T}$ac_cv_c_const" >&6
12643 if test $ac_cv_c_const = no; then
12644
12645 cat >>confdefs.h <<\EOF
12646 #define const
12647 EOF
12648
12649 fi
12650
12651 echo "$as_me:12651: checking for inline" >&5
12652 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12653 if test "${ac_cv_c_inline+set}" = set; then
12654   echo $ECHO_N "(cached) $ECHO_C" >&6
12655 else
12656   ac_cv_c_inline=no
12657 for ac_kw in inline __inline__ __inline; do
12658   cat >conftest.$ac_ext <<_ACEOF
12659 #line 12659 "configure"
12660 #include "confdefs.h"
12661 #ifndef __cplusplus
12662 static $ac_kw int static_foo () {return 0; }
12663 $ac_kw int foo () {return 0; }
12664 #endif
12665
12666 _ACEOF
12667 rm -f conftest.$ac_objext
12668 if { (eval echo "$as_me:12668: \"$ac_compile\"") >&5
12669   (eval $ac_compile) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit $ac_status); } &&
12673          { ac_try='test -s conftest.$ac_objext'
12674   { (eval echo "$as_me:12674: \"$ac_try\"") >&5
12675   (eval $ac_try) 2>&5
12676   ac_status=$?
12677   echo "$as_me:12677: \$? = $ac_status" >&5
12678   (exit $ac_status); }; }; then
12679   ac_cv_c_inline=$ac_kw; break
12680 else
12681   echo "$as_me: failed program was:" >&5
12682 cat conftest.$ac_ext >&5
12683 fi
12684 rm -f conftest.$ac_objext conftest.$ac_ext
12685 done
12686
12687 fi
12688 echo "$as_me:12688: result: $ac_cv_c_inline" >&5
12689 echo "${ECHO_T}$ac_cv_c_inline" >&6
12690 case $ac_cv_c_inline in
12691   inline | yes) ;;
12692   no)
12693 cat >>confdefs.h <<\EOF
12694 #define inline
12695 EOF
12696  ;;
12697   *)  cat >>confdefs.h <<EOF
12698 #define inline $ac_cv_c_inline
12699 EOF
12700  ;;
12701 esac
12702
12703 NCURSES_INLINE=
12704 if test "$ac_cv_c_inline" != no ; then
12705   NCURSES_INLINE=inline
12706   if test "$INTEL_COMPILER" = yes
12707   then
12708     :
12709   elif test "$GCC" = yes
12710   then
12711     echo "$as_me:12711: checking if gcc supports options to tune inlining" >&5
12712 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12713 if test "${cf_cv_gcc_inline+set}" = set; then
12714   echo $ECHO_N "(cached) $ECHO_C" >&6
12715 else
12716
12717       cf_save_CFLAGS=$CFLAGS
12718       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12719       cat >conftest.$ac_ext <<_ACEOF
12720 #line 12720 "configure"
12721 #include "confdefs.h"
12722 inline int foo(void) { return 1; }
12723 int
12724 main ()
12725 {
12726 ${cf_cv_main_return:-return} foo()
12727   ;
12728   return 0;
12729 }
12730 _ACEOF
12731 rm -f conftest.$ac_objext
12732 if { (eval echo "$as_me:12732: \"$ac_compile\"") >&5
12733   (eval $ac_compile) 2>&5
12734   ac_status=$?
12735   echo "$as_me:12735: \$? = $ac_status" >&5
12736   (exit $ac_status); } &&
12737          { ac_try='test -s conftest.$ac_objext'
12738   { (eval echo "$as_me:12738: \"$ac_try\"") >&5
12739   (eval $ac_try) 2>&5
12740   ac_status=$?
12741   echo "$as_me:12741: \$? = $ac_status" >&5
12742   (exit $ac_status); }; }; then
12743   cf_cv_gcc_inline=yes
12744 else
12745   echo "$as_me: failed program was:" >&5
12746 cat conftest.$ac_ext >&5
12747 cf_cv_gcc_inline=no
12748 fi
12749 rm -f conftest.$ac_objext conftest.$ac_ext
12750       CFLAGS=$cf_save_CFLAGS
12751
12752 fi
12753 echo "$as_me:12753: result: $cf_cv_gcc_inline" >&5
12754 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12755     if test "$cf_cv_gcc_inline" = yes ; then
12756
12757 cf_fix_cppflags=no
12758 cf_new_cflags=
12759 cf_new_cppflags=
12760 cf_new_extra_cppflags=
12761
12762 for cf_add_cflags in --param max-inline-insns-single=1200
12763 do
12764 case $cf_fix_cppflags in
12765 no)
12766         case $cf_add_cflags in #(vi
12767         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12768                 case $cf_add_cflags in
12769                 -D*)
12770                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12771
12772                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12773                         && test -z "${cf_tst_cflags}" \
12774                         && cf_fix_cppflags=yes
12775
12776                         if test $cf_fix_cppflags = yes ; then
12777                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12778                                 continue
12779                         elif test "${cf_tst_cflags}" = "\"'" ; then
12780                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12781                                 continue
12782                         fi
12783                         ;;
12784                 esac
12785                 case "$CPPFLAGS" in
12786                 *$cf_add_cflags) #(vi
12787                         ;;
12788                 *) #(vi
12789                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12790                         ;;
12791                 esac
12792                 ;;
12793         *)
12794                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12795                 ;;
12796         esac
12797         ;;
12798 yes)
12799         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12800
12801         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12802
12803         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12804         && test -z "${cf_tst_cflags}" \
12805         && cf_fix_cppflags=no
12806         ;;
12807 esac
12808 done
12809
12810 if test -n "$cf_new_cflags" ; then
12811
12812         CFLAGS="$CFLAGS $cf_new_cflags"
12813 fi
12814
12815 if test -n "$cf_new_cppflags" ; then
12816
12817         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12818 fi
12819
12820 if test -n "$cf_new_extra_cppflags" ; then
12821
12822         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12823 fi
12824
12825     fi
12826   fi
12827 fi
12828
12829 echo "$as_me:12829: checking for signal global datatype" >&5
12830 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12831 if test "${cf_cv_sig_atomic_t+set}" = set; then
12832   echo $ECHO_N "(cached) $ECHO_C" >&6
12833 else
12834
12835         for cf_type in \
12836                 "volatile sig_atomic_t" \
12837                 "sig_atomic_t" \
12838                 "int"
12839         do
12840         cat >conftest.$ac_ext <<_ACEOF
12841 #line 12841 "configure"
12842 #include "confdefs.h"
12843
12844 #include <sys/types.h>
12845 #include <signal.h>
12846 #include <stdio.h>
12847
12848 extern $cf_type x;
12849 $cf_type x;
12850 static void handler(int sig)
12851 {
12852         x = 5;
12853 }
12854 int
12855 main ()
12856 {
12857 signal(SIGINT, handler);
12858                  x = 1
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext
12864 if { (eval echo "$as_me:12864: \"$ac_compile\"") >&5
12865   (eval $ac_compile) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -s conftest.$ac_objext'
12870   { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   cf_cv_sig_atomic_t=$cf_type
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 cat conftest.$ac_ext >&5
12879 cf_cv_sig_atomic_t=no
12880 fi
12881 rm -f conftest.$ac_objext conftest.$ac_ext
12882                 test "$cf_cv_sig_atomic_t" != no && break
12883         done
12884
12885 fi
12886
12887 echo "$as_me:12887: result: $cf_cv_sig_atomic_t" >&5
12888 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12889 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12890 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12891 EOF
12892
12893 if test $NCURSES_CHTYPE = auto ; then
12894
12895 echo "$as_me:12895: checking for type of chtype" >&5
12896 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12897 if test "${cf_cv_typeof_chtype+set}" = set; then
12898   echo $ECHO_N "(cached) $ECHO_C" >&6
12899 else
12900
12901                 if test "$cross_compiling" = yes; then
12902   cf_cv_typeof_chtype=long
12903 else
12904   cat >conftest.$ac_ext <<_ACEOF
12905 #line 12905 "configure"
12906 #include "confdefs.h"
12907
12908 #define WANT_BITS 31
12909 #include <stdio.h>
12910 int main()
12911 {
12912         FILE *fp = fopen("cf_test.out", "w");
12913         if (fp != 0) {
12914                 char *result = "long";
12915                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12916                         int n;
12917                         unsigned int x, y;
12918                         for (n = 0; n < WANT_BITS; n++) {
12919                                 x = (1 << n);
12920                                 y = (x >> n);
12921                                 if (y != 1 || x == 0) {
12922                                         x = 0;
12923                                         break;
12924                                 }
12925                         }
12926                         /*
12927                          * If x is nonzero, an int is big enough for the bits
12928                          * that we want.
12929                          */
12930                         result = (x != 0) ? "int" : "long";
12931                 }
12932                 fputs(result, fp);
12933                 fclose(fp);
12934         }
12935         ${cf_cv_main_return:-return}(0);
12936 }
12937
12938 _ACEOF
12939 rm -f conftest$ac_exeext
12940 if { (eval echo "$as_me:12940: \"$ac_link\"") >&5
12941   (eval $ac_link) 2>&5
12942   ac_status=$?
12943   echo "$as_me:12943: \$? = $ac_status" >&5
12944   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12945   { (eval echo "$as_me:12945: \"$ac_try\"") >&5
12946   (eval $ac_try) 2>&5
12947   ac_status=$?
12948   echo "$as_me:12948: \$? = $ac_status" >&5
12949   (exit $ac_status); }; }; then
12950   cf_cv_typeof_chtype=`cat cf_test.out`
12951 else
12952   echo "$as_me: program exited with status $ac_status" >&5
12953 echo "$as_me: failed program was:" >&5
12954 cat conftest.$ac_ext >&5
12955 cf_cv_typeof_chtype=long
12956 fi
12957 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12958 fi
12959                 rm -f cf_test.out
12960
12961 fi
12962
12963 echo "$as_me:12963: result: $cf_cv_typeof_chtype" >&5
12964 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12965
12966 cat >>confdefs.h <<EOF
12967 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12968 EOF
12969
12970 else
12971         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12972 fi
12973 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12974
12975 echo "$as_me:12975: checking if unsigned literals are legal" >&5
12976 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12977 if test "${cf_cv_unsigned_literals+set}" = set; then
12978   echo $ECHO_N "(cached) $ECHO_C" >&6
12979 else
12980
12981         cat >conftest.$ac_ext <<_ACEOF
12982 #line 12982 "configure"
12983 #include "confdefs.h"
12984
12985 int
12986 main ()
12987 {
12988 long x = 1L + 1UL + 1U + 1
12989   ;
12990   return 0;
12991 }
12992 _ACEOF
12993 rm -f conftest.$ac_objext
12994 if { (eval echo "$as_me:12994: \"$ac_compile\"") >&5
12995   (eval $ac_compile) 2>&5
12996   ac_status=$?
12997   echo "$as_me:12997: \$? = $ac_status" >&5
12998   (exit $ac_status); } &&
12999          { ac_try='test -s conftest.$ac_objext'
13000   { (eval echo "$as_me:13000: \"$ac_try\"") >&5
13001   (eval $ac_try) 2>&5
13002   ac_status=$?
13003   echo "$as_me:13003: \$? = $ac_status" >&5
13004   (exit $ac_status); }; }; then
13005   cf_cv_unsigned_literals=yes
13006 else
13007   echo "$as_me: failed program was:" >&5
13008 cat conftest.$ac_ext >&5
13009 cf_cv_unsigned_literals=no
13010 fi
13011 rm -f conftest.$ac_objext conftest.$ac_ext
13012
13013 fi
13014
13015 echo "$as_me:13015: result: $cf_cv_unsigned_literals" >&5
13016 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13017
13018 cf_cv_1UL="1"
13019 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13020 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13021
13022 if test $NCURSES_MMASK_T = auto ; then
13023         cf_cv_typeof_mmask_t=long
13024 else
13025         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13026 fi
13027 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13028
13029 ###     Checks for external-data
13030
13031 echo "$as_me:13031: checking if external errno is declared" >&5
13032 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13033 if test "${cf_cv_dcl_errno+set}" = set; then
13034   echo $ECHO_N "(cached) $ECHO_C" >&6
13035 else
13036
13037     cat >conftest.$ac_ext <<_ACEOF
13038 #line 13038 "configure"
13039 #include "confdefs.h"
13040
13041 #ifdef HAVE_STDLIB_H
13042 #include <stdlib.h>
13043 #endif
13044 #include <stdio.h>
13045 #include <sys/types.h>
13046 #include <errno.h>
13047 int
13048 main ()
13049 {
13050 int x = (int) errno
13051   ;
13052   return 0;
13053 }
13054 _ACEOF
13055 rm -f conftest.$ac_objext
13056 if { (eval echo "$as_me:13056: \"$ac_compile\"") >&5
13057   (eval $ac_compile) 2>&5
13058   ac_status=$?
13059   echo "$as_me:13059: \$? = $ac_status" >&5
13060   (exit $ac_status); } &&
13061          { ac_try='test -s conftest.$ac_objext'
13062   { (eval echo "$as_me:13062: \"$ac_try\"") >&5
13063   (eval $ac_try) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit $ac_status); }; }; then
13067   cf_cv_dcl_errno=yes
13068 else
13069   echo "$as_me: failed program was:" >&5
13070 cat conftest.$ac_ext >&5
13071 cf_cv_dcl_errno=no
13072 fi
13073 rm -f conftest.$ac_objext conftest.$ac_ext
13074
13075 fi
13076 echo "$as_me:13076: result: $cf_cv_dcl_errno" >&5
13077 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13078
13079 if test "$cf_cv_dcl_errno" = no ; then
13080
13081 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13082
13083     cat >>confdefs.h <<EOF
13084 #define $cf_result 1
13085 EOF
13086
13087 fi
13088
13089 # It's possible (for near-UNIX clones) that the data doesn't exist
13090
13091 echo "$as_me:13091: checking if external errno exists" >&5
13092 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13093 if test "${cf_cv_have_errno+set}" = set; then
13094   echo $ECHO_N "(cached) $ECHO_C" >&6
13095 else
13096
13097     cat >conftest.$ac_ext <<_ACEOF
13098 #line 13098 "configure"
13099 #include "confdefs.h"
13100
13101 #undef errno
13102 extern int errno;
13103
13104 int
13105 main ()
13106 {
13107 errno = 2
13108   ;
13109   return 0;
13110 }
13111 _ACEOF
13112 rm -f conftest.$ac_objext conftest$ac_exeext
13113 if { (eval echo "$as_me:13113: \"$ac_link\"") >&5
13114   (eval $ac_link) 2>&5
13115   ac_status=$?
13116   echo "$as_me:13116: \$? = $ac_status" >&5
13117   (exit $ac_status); } &&
13118          { ac_try='test -s conftest$ac_exeext'
13119   { (eval echo "$as_me:13119: \"$ac_try\"") >&5
13120   (eval $ac_try) 2>&5
13121   ac_status=$?
13122   echo "$as_me:13122: \$? = $ac_status" >&5
13123   (exit $ac_status); }; }; then
13124   cf_cv_have_errno=yes
13125 else
13126   echo "$as_me: failed program was:" >&5
13127 cat conftest.$ac_ext >&5
13128 cf_cv_have_errno=no
13129 fi
13130 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13131
13132 fi
13133 echo "$as_me:13133: result: $cf_cv_have_errno" >&5
13134 echo "${ECHO_T}$cf_cv_have_errno" >&6
13135
13136 if test "$cf_cv_have_errno" = yes ; then
13137
13138 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13139
13140     cat >>confdefs.h <<EOF
13141 #define $cf_result 1
13142 EOF
13143
13144 fi
13145
13146 echo "$as_me:13146: checking if data-only library module links" >&5
13147 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13148 if test "${cf_cv_link_dataonly+set}" = set; then
13149   echo $ECHO_N "(cached) $ECHO_C" >&6
13150 else
13151
13152         rm -f conftest.a
13153         cat >conftest.$ac_ext <<EOF
13154 #line 13154 "configure"
13155 int     testdata[3] = { 123, 456, 789 };
13156 EOF
13157         if { (eval echo "$as_me:13157: \"$ac_compile\"") >&5
13158   (eval $ac_compile) 2>&5
13159   ac_status=$?
13160   echo "$as_me:13160: \$? = $ac_status" >&5
13161   (exit $ac_status); } ; then
13162                 mv conftest.o data.o && \
13163                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13164         fi
13165         rm -f conftest.$ac_ext data.o
13166         cat >conftest.$ac_ext <<EOF
13167 #line 13167 "configure"
13168 int     testfunc()
13169 {
13170 #if defined(NeXT)
13171         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13172 #else
13173         extern int testdata[3];
13174         return testdata[0] == 123
13175            &&  testdata[1] == 456
13176            &&  testdata[2] == 789;
13177 #endif
13178 }
13179 EOF
13180         if { (eval echo "$as_me:13180: \"$ac_compile\"") >&5
13181   (eval $ac_compile) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit $ac_status); }; then
13185                 mv conftest.o func.o && \
13186                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13187         fi
13188         rm -f conftest.$ac_ext func.o
13189         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13190         cf_saveLIBS="$LIBS"
13191         LIBS="conftest.a $LIBS"
13192         if test "$cross_compiling" = yes; then
13193   cf_cv_link_dataonly=unknown
13194 else
13195   cat >conftest.$ac_ext <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198
13199         int main()
13200         {
13201                 extern int testfunc();
13202                 ${cf_cv_main_return:-return} (!testfunc());
13203         }
13204
13205 _ACEOF
13206 rm -f conftest$ac_exeext
13207 if { (eval echo "$as_me:13207: \"$ac_link\"") >&5
13208   (eval $ac_link) 2>&5
13209   ac_status=$?
13210   echo "$as_me:13210: \$? = $ac_status" >&5
13211   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13212   { (eval echo "$as_me:13212: \"$ac_try\"") >&5
13213   (eval $ac_try) 2>&5
13214   ac_status=$?
13215   echo "$as_me:13215: \$? = $ac_status" >&5
13216   (exit $ac_status); }; }; then
13217   cf_cv_link_dataonly=yes
13218 else
13219   echo "$as_me: program exited with status $ac_status" >&5
13220 echo "$as_me: failed program was:" >&5
13221 cat conftest.$ac_ext >&5
13222 cf_cv_link_dataonly=no
13223 fi
13224 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13225 fi
13226         LIBS="$cf_saveLIBS"
13227
13228 fi
13229
13230 echo "$as_me:13230: result: $cf_cv_link_dataonly" >&5
13231 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13232
13233 if test "$cf_cv_link_dataonly" = no ; then
13234         cat >>confdefs.h <<\EOF
13235 #define BROKEN_LINKER 1
13236 EOF
13237
13238         BROKEN_LINKER=1
13239 fi
13240
13241 ###     Checks for library functions.
13242
13243 for ac_func in \
13244 getcwd \
13245 getegid \
13246 geteuid \
13247 getttynam \
13248 issetugid \
13249 poll \
13250 remove \
13251 select \
13252 setbuf \
13253 setbuffer \
13254 setvbuf \
13255 sigaction \
13256 sigvec \
13257 strdup \
13258 strstr \
13259 tcgetpgrp \
13260 times \
13261 vsnprintf \
13262
13263 do
13264 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13265 echo "$as_me:13265: checking for $ac_func" >&5
13266 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13267 if eval "test \"\${$as_ac_var+set}\" = set"; then
13268   echo $ECHO_N "(cached) $ECHO_C" >&6
13269 else
13270   cat >conftest.$ac_ext <<_ACEOF
13271 #line 13271 "configure"
13272 #include "confdefs.h"
13273 /* System header to define __stub macros and hopefully few prototypes,
13274     which can conflict with char $ac_func (); below.  */
13275 #include <assert.h>
13276 /* Override any gcc2 internal prototype to avoid an error.  */
13277 #ifdef __cplusplus
13278 extern "C"
13279 #endif
13280 /* We use char because int might match the return type of a gcc2
13281    builtin and then its argument prototype would still apply.  */
13282 char $ac_func ();
13283 char (*f) ();
13284
13285 int
13286 main ()
13287 {
13288 /* The GNU C library defines this for functions which it implements
13289     to always fail with ENOSYS.  Some functions are actually named
13290     something starting with __ and the normal name is an alias.  */
13291 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13292 choke me
13293 #else
13294 f = $ac_func;
13295 #endif
13296
13297   ;
13298   return 0;
13299 }
13300 _ACEOF
13301 rm -f conftest.$ac_objext conftest$ac_exeext
13302 if { (eval echo "$as_me:13302: \"$ac_link\"") >&5
13303   (eval $ac_link) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); } &&
13307          { ac_try='test -s conftest$ac_exeext'
13308   { (eval echo "$as_me:13308: \"$ac_try\"") >&5
13309   (eval $ac_try) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; }; then
13313   eval "$as_ac_var=yes"
13314 else
13315   echo "$as_me: failed program was:" >&5
13316 cat conftest.$ac_ext >&5
13317 eval "$as_ac_var=no"
13318 fi
13319 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13320 fi
13321 echo "$as_me:13321: result: `eval echo '${'$as_ac_var'}'`" >&5
13322 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13323 if test `eval echo '${'$as_ac_var'}'` = yes; then
13324   cat >>confdefs.h <<EOF
13325 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13326 EOF
13327
13328 fi
13329 done
13330
13331 if test "$with_getcap" = "yes" ; then
13332
13333 echo "$as_me:13333: checking for terminal-capability database functions" >&5
13334 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13335 if test "${cf_cv_cgetent+set}" = set; then
13336   echo $ECHO_N "(cached) $ECHO_C" >&6
13337 else
13338
13339 cat >conftest.$ac_ext <<_ACEOF
13340 #line 13340 "configure"
13341 #include "confdefs.h"
13342
13343 #include <stdlib.h>
13344 int
13345 main ()
13346 {
13347
13348         char temp[128];
13349         char *buf = temp;
13350         char *db_array = temp;
13351         cgetent(&buf, /* int *, */ &db_array, "vt100");
13352         cgetcap(buf, "tc", '=');
13353         cgetmatch(buf, "tc");
13354
13355   ;
13356   return 0;
13357 }
13358 _ACEOF
13359 rm -f conftest.$ac_objext conftest$ac_exeext
13360 if { (eval echo "$as_me:13360: \"$ac_link\"") >&5
13361   (eval $ac_link) 2>&5
13362   ac_status=$?
13363   echo "$as_me:13363: \$? = $ac_status" >&5
13364   (exit $ac_status); } &&
13365          { ac_try='test -s conftest$ac_exeext'
13366   { (eval echo "$as_me:13366: \"$ac_try\"") >&5
13367   (eval $ac_try) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); }; }; then
13371   cf_cv_cgetent=yes
13372 else
13373   echo "$as_me: failed program was:" >&5
13374 cat conftest.$ac_ext >&5
13375 cf_cv_cgetent=no
13376 fi
13377 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13378
13379 fi
13380
13381 echo "$as_me:13381: result: $cf_cv_cgetent" >&5
13382 echo "${ECHO_T}$cf_cv_cgetent" >&6
13383 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13384 #define HAVE_BSD_CGETENT 1
13385 EOF
13386
13387 fi
13388
13389 echo "$as_me:13389: checking for isascii" >&5
13390 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13391 if test "${cf_cv_have_isascii+set}" = set; then
13392   echo $ECHO_N "(cached) $ECHO_C" >&6
13393 else
13394
13395         cat >conftest.$ac_ext <<_ACEOF
13396 #line 13396 "configure"
13397 #include "confdefs.h"
13398 #include <ctype.h>
13399 int
13400 main ()
13401 {
13402 int x = isascii(' ')
13403   ;
13404   return 0;
13405 }
13406 _ACEOF
13407 rm -f conftest.$ac_objext conftest$ac_exeext
13408 if { (eval echo "$as_me:13408: \"$ac_link\"") >&5
13409   (eval $ac_link) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit $ac_status); } &&
13413          { ac_try='test -s conftest$ac_exeext'
13414   { (eval echo "$as_me:13414: \"$ac_try\"") >&5
13415   (eval $ac_try) 2>&5
13416   ac_status=$?
13417   echo "$as_me:13417: \$? = $ac_status" >&5
13418   (exit $ac_status); }; }; then
13419   cf_cv_have_isascii=yes
13420 else
13421   echo "$as_me: failed program was:" >&5
13422 cat conftest.$ac_ext >&5
13423 cf_cv_have_isascii=no
13424 fi
13425 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13426
13427 fi
13428 echo "$as_me:13428: result: $cf_cv_have_isascii" >&5
13429 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13430 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13431 #define HAVE_ISASCII 1
13432 EOF
13433
13434 if test "$ac_cv_func_sigaction" = yes; then
13435 echo "$as_me:13435: checking whether sigaction needs _POSIX_SOURCE" >&5
13436 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13437 cat >conftest.$ac_ext <<_ACEOF
13438 #line 13438 "configure"
13439 #include "confdefs.h"
13440
13441 #include <sys/types.h>
13442 #include <signal.h>
13443 int
13444 main ()
13445 {
13446 struct sigaction act
13447   ;
13448   return 0;
13449 }
13450 _ACEOF
13451 rm -f conftest.$ac_objext
13452 if { (eval echo "$as_me:13452: \"$ac_compile\"") >&5
13453   (eval $ac_compile) 2>&5
13454   ac_status=$?
13455   echo "$as_me:13455: \$? = $ac_status" >&5
13456   (exit $ac_status); } &&
13457          { ac_try='test -s conftest.$ac_objext'
13458   { (eval echo "$as_me:13458: \"$ac_try\"") >&5
13459   (eval $ac_try) 2>&5
13460   ac_status=$?
13461   echo "$as_me:13461: \$? = $ac_status" >&5
13462   (exit $ac_status); }; }; then
13463   sigact_bad=no
13464 else
13465   echo "$as_me: failed program was:" >&5
13466 cat conftest.$ac_ext >&5
13467
13468 cat >conftest.$ac_ext <<_ACEOF
13469 #line 13469 "configure"
13470 #include "confdefs.h"
13471
13472 #define _POSIX_SOURCE
13473 #include <sys/types.h>
13474 #include <signal.h>
13475 int
13476 main ()
13477 {
13478 struct sigaction act
13479   ;
13480   return 0;
13481 }
13482 _ACEOF
13483 rm -f conftest.$ac_objext
13484 if { (eval echo "$as_me:13484: \"$ac_compile\"") >&5
13485   (eval $ac_compile) 2>&5
13486   ac_status=$?
13487   echo "$as_me:13487: \$? = $ac_status" >&5
13488   (exit $ac_status); } &&
13489          { ac_try='test -s conftest.$ac_objext'
13490   { (eval echo "$as_me:13490: \"$ac_try\"") >&5
13491   (eval $ac_try) 2>&5
13492   ac_status=$?
13493   echo "$as_me:13493: \$? = $ac_status" >&5
13494   (exit $ac_status); }; }; then
13495   sigact_bad=yes
13496          cat >>confdefs.h <<\EOF
13497 #define SVR4_ACTION 1
13498 EOF
13499
13500 else
13501   echo "$as_me: failed program was:" >&5
13502 cat conftest.$ac_ext >&5
13503 sigact_bad=unknown
13504 fi
13505 rm -f conftest.$ac_objext conftest.$ac_ext
13506 fi
13507 rm -f conftest.$ac_objext conftest.$ac_ext
13508 echo "$as_me:13508: result: $sigact_bad" >&5
13509 echo "${ECHO_T}$sigact_bad" >&6
13510 fi
13511
13512 echo "$as_me:13512: checking if nanosleep really works" >&5
13513 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13514 if test "${cf_cv_func_nanosleep+set}" = set; then
13515   echo $ECHO_N "(cached) $ECHO_C" >&6
13516 else
13517
13518 if test "$cross_compiling" = yes; then
13519   cf_cv_func_nanosleep=unknown
13520 else
13521   cat >conftest.$ac_ext <<_ACEOF
13522 #line 13522 "configure"
13523 #include "confdefs.h"
13524
13525 #include <stdio.h>
13526 #include <errno.h>
13527 #include <time.h>
13528
13529 #ifdef HAVE_SYS_TIME_H
13530 #include <sys/time.h>
13531 #endif
13532
13533 int main() {
13534         struct timespec ts1, ts2;
13535         int code;
13536         ts1.tv_sec  = 0;
13537         ts1.tv_nsec = 750000000;
13538         ts2.tv_sec  = 0;
13539         ts2.tv_nsec = 0;
13540         errno = 0;
13541         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13542         ${cf_cv_main_return:-return}(code != 0);
13543 }
13544
13545 _ACEOF
13546 rm -f conftest$ac_exeext
13547 if { (eval echo "$as_me:13547: \"$ac_link\"") >&5
13548   (eval $ac_link) 2>&5
13549   ac_status=$?
13550   echo "$as_me:13550: \$? = $ac_status" >&5
13551   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13552   { (eval echo "$as_me:13552: \"$ac_try\"") >&5
13553   (eval $ac_try) 2>&5
13554   ac_status=$?
13555   echo "$as_me:13555: \$? = $ac_status" >&5
13556   (exit $ac_status); }; }; then
13557   cf_cv_func_nanosleep=yes
13558 else
13559   echo "$as_me: program exited with status $ac_status" >&5
13560 echo "$as_me: failed program was:" >&5
13561 cat conftest.$ac_ext >&5
13562 cf_cv_func_nanosleep=no
13563 fi
13564 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13565 fi
13566 fi
13567 echo "$as_me:13567: result: $cf_cv_func_nanosleep" >&5
13568 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13569
13570 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13571 #define HAVE_NANOSLEEP 1
13572 EOF
13573
13574 for ac_header in \
13575 termio.h \
13576 termios.h \
13577 unistd.h \
13578
13579 do
13580 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13581 echo "$as_me:13581: checking for $ac_header" >&5
13582 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13583 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13584   echo $ECHO_N "(cached) $ECHO_C" >&6
13585 else
13586   cat >conftest.$ac_ext <<_ACEOF
13587 #line 13587 "configure"
13588 #include "confdefs.h"
13589 #include <$ac_header>
13590 _ACEOF
13591 if { (eval echo "$as_me:13591: \"$ac_cpp conftest.$ac_ext\"") >&5
13592   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13593   ac_status=$?
13594   egrep -v '^ *\+' conftest.er1 >conftest.err
13595   rm -f conftest.er1
13596   cat conftest.err >&5
13597   echo "$as_me:13597: \$? = $ac_status" >&5
13598   (exit $ac_status); } >/dev/null; then
13599   if test -s conftest.err; then
13600     ac_cpp_err=$ac_c_preproc_warn_flag
13601   else
13602     ac_cpp_err=
13603   fi
13604 else
13605   ac_cpp_err=yes
13606 fi
13607 if test -z "$ac_cpp_err"; then
13608   eval "$as_ac_Header=yes"
13609 else
13610   echo "$as_me: failed program was:" >&5
13611   cat conftest.$ac_ext >&5
13612   eval "$as_ac_Header=no"
13613 fi
13614 rm -f conftest.err conftest.$ac_ext
13615 fi
13616 echo "$as_me:13616: result: `eval echo '${'$as_ac_Header'}'`" >&5
13617 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13618 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13619   cat >>confdefs.h <<EOF
13620 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13621 EOF
13622
13623 fi
13624 done
13625
13626 if test "$ISC" = yes ; then
13627
13628 for ac_header in sys/termio.h
13629 do
13630 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13631 echo "$as_me:13631: checking for $ac_header" >&5
13632 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13633 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13634   echo $ECHO_N "(cached) $ECHO_C" >&6
13635 else
13636   cat >conftest.$ac_ext <<_ACEOF
13637 #line 13637 "configure"
13638 #include "confdefs.h"
13639 #include <$ac_header>
13640 _ACEOF
13641 if { (eval echo "$as_me:13641: \"$ac_cpp conftest.$ac_ext\"") >&5
13642   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13643   ac_status=$?
13644   egrep -v '^ *\+' conftest.er1 >conftest.err
13645   rm -f conftest.er1
13646   cat conftest.err >&5
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit $ac_status); } >/dev/null; then
13649   if test -s conftest.err; then
13650     ac_cpp_err=$ac_c_preproc_warn_flag
13651   else
13652     ac_cpp_err=
13653   fi
13654 else
13655   ac_cpp_err=yes
13656 fi
13657 if test -z "$ac_cpp_err"; then
13658   eval "$as_ac_Header=yes"
13659 else
13660   echo "$as_me: failed program was:" >&5
13661   cat conftest.$ac_ext >&5
13662   eval "$as_ac_Header=no"
13663 fi
13664 rm -f conftest.err conftest.$ac_ext
13665 fi
13666 echo "$as_me:13666: result: `eval echo '${'$as_ac_Header'}'`" >&5
13667 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13668 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13669   cat >>confdefs.h <<EOF
13670 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13671 EOF
13672
13673 fi
13674 done
13675
13676 fi
13677 if test "$ac_cv_header_termios_h" = yes ; then
13678         case "$CFLAGS $CPPFLAGS" in
13679         *-D_POSIX_SOURCE*)
13680                 termios_bad=dunno ;;
13681         *)      termios_bad=maybe ;;
13682         esac
13683         if test "$termios_bad" = maybe ; then
13684         echo "$as_me:13684: checking whether termios.h needs _POSIX_SOURCE" >&5
13685 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13686         cat >conftest.$ac_ext <<_ACEOF
13687 #line 13687 "configure"
13688 #include "confdefs.h"
13689 #include <termios.h>
13690 int
13691 main ()
13692 {
13693 struct termios foo; int x = foo.c_iflag
13694   ;
13695   return 0;
13696 }
13697 _ACEOF
13698 rm -f conftest.$ac_objext
13699 if { (eval echo "$as_me:13699: \"$ac_compile\"") >&5
13700   (eval $ac_compile) 2>&5
13701   ac_status=$?
13702   echo "$as_me:13702: \$? = $ac_status" >&5
13703   (exit $ac_status); } &&
13704          { ac_try='test -s conftest.$ac_objext'
13705   { (eval echo "$as_me:13705: \"$ac_try\"") >&5
13706   (eval $ac_try) 2>&5
13707   ac_status=$?
13708   echo "$as_me:13708: \$? = $ac_status" >&5
13709   (exit $ac_status); }; }; then
13710   termios_bad=no
13711 else
13712   echo "$as_me: failed program was:" >&5
13713 cat conftest.$ac_ext >&5
13714
13715                 cat >conftest.$ac_ext <<_ACEOF
13716 #line 13716 "configure"
13717 #include "confdefs.h"
13718
13719 #define _POSIX_SOURCE
13720 #include <termios.h>
13721 int
13722 main ()
13723 {
13724 struct termios foo; int x = foo.c_iflag
13725   ;
13726   return 0;
13727 }
13728 _ACEOF
13729 rm -f conftest.$ac_objext
13730 if { (eval echo "$as_me:13730: \"$ac_compile\"") >&5
13731   (eval $ac_compile) 2>&5
13732   ac_status=$?
13733   echo "$as_me:13733: \$? = $ac_status" >&5
13734   (exit $ac_status); } &&
13735          { ac_try='test -s conftest.$ac_objext'
13736   { (eval echo "$as_me:13736: \"$ac_try\"") >&5
13737   (eval $ac_try) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); }; }; then
13741   termios_bad=unknown
13742 else
13743   echo "$as_me: failed program was:" >&5
13744 cat conftest.$ac_ext >&5
13745 termios_bad=yes cat >>confdefs.h <<\EOF
13746 #define SVR4_TERMIO 1
13747 EOF
13748
13749 fi
13750 rm -f conftest.$ac_objext conftest.$ac_ext
13751
13752 fi
13753 rm -f conftest.$ac_objext conftest.$ac_ext
13754         echo "$as_me:13754: result: $termios_bad" >&5
13755 echo "${ECHO_T}$termios_bad" >&6
13756         fi
13757 fi
13758
13759 echo "$as_me:13759: checking for tcgetattr" >&5
13760 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13761 if test "${cf_cv_have_tcgetattr+set}" = set; then
13762   echo $ECHO_N "(cached) $ECHO_C" >&6
13763 else
13764
13765 cat >conftest.$ac_ext <<_ACEOF
13766 #line 13766 "configure"
13767 #include "confdefs.h"
13768
13769 #include <sys/types.h>
13770 #ifdef HAVE_UNISTD_H
13771 #include <unistd.h>
13772 #endif
13773 #ifdef HAVE_TERMIOS_H
13774 #include <termios.h>
13775 #define TTY struct termios
13776 #else
13777 #ifdef HAVE_TERMIO_H
13778 #include <termio.h>
13779 #define TTY struct termio
13780 #endif
13781 #endif
13782
13783 int
13784 main ()
13785 {
13786
13787 TTY foo;
13788 tcgetattr(1, &foo);
13789   ;
13790   return 0;
13791 }
13792 _ACEOF
13793 rm -f conftest.$ac_objext conftest$ac_exeext
13794 if { (eval echo "$as_me:13794: \"$ac_link\"") >&5
13795   (eval $ac_link) 2>&5
13796   ac_status=$?
13797   echo "$as_me:13797: \$? = $ac_status" >&5
13798   (exit $ac_status); } &&
13799          { ac_try='test -s conftest$ac_exeext'
13800   { (eval echo "$as_me:13800: \"$ac_try\"") >&5
13801   (eval $ac_try) 2>&5
13802   ac_status=$?
13803   echo "$as_me:13803: \$? = $ac_status" >&5
13804   (exit $ac_status); }; }; then
13805   cf_cv_have_tcgetattr=yes
13806 else
13807   echo "$as_me: failed program was:" >&5
13808 cat conftest.$ac_ext >&5
13809 cf_cv_have_tcgetattr=no
13810 fi
13811 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13812 fi
13813 echo "$as_me:13813: result: $cf_cv_have_tcgetattr" >&5
13814 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13815 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13816 #define HAVE_TCGETATTR 1
13817 EOF
13818
13819 echo "$as_me:13819: checking for vsscanf function or workaround" >&5
13820 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13821 if test "${cf_cv_func_vsscanf+set}" = set; then
13822   echo $ECHO_N "(cached) $ECHO_C" >&6
13823 else
13824
13825 cat >conftest.$ac_ext <<_ACEOF
13826 #line 13826 "configure"
13827 #include "confdefs.h"
13828
13829 #include <stdarg.h>
13830 #include <stdio.h>
13831 int
13832 main ()
13833 {
13834
13835         va_list ap;
13836         vsscanf("from", "%d", ap)
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 rm -f conftest.$ac_objext conftest$ac_exeext
13842 if { (eval echo "$as_me:13842: \"$ac_link\"") >&5
13843   (eval $ac_link) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit $ac_status); } &&
13847          { ac_try='test -s conftest$ac_exeext'
13848   { (eval echo "$as_me:13848: \"$ac_try\"") >&5
13849   (eval $ac_try) 2>&5
13850   ac_status=$?
13851   echo "$as_me:13851: \$? = $ac_status" >&5
13852   (exit $ac_status); }; }; then
13853   cf_cv_func_vsscanf=vsscanf
13854 else
13855   echo "$as_me: failed program was:" >&5
13856 cat conftest.$ac_ext >&5
13857
13858 cat >conftest.$ac_ext <<_ACEOF
13859 #line 13859 "configure"
13860 #include "confdefs.h"
13861
13862 #include <stdarg.h>
13863 #include <stdio.h>
13864 int
13865 main ()
13866 {
13867
13868     FILE strbuf;
13869     char *str = "from";
13870
13871     strbuf._flag = _IOREAD;
13872     strbuf._ptr = strbuf._base = (unsigned char *) str;
13873     strbuf._cnt = strlen(str);
13874     strbuf._file = _NFILE;
13875     return (vfscanf(&strbuf, "%d", ap))
13876   ;
13877   return 0;
13878 }
13879 _ACEOF
13880 rm -f conftest.$ac_objext conftest$ac_exeext
13881 if { (eval echo "$as_me:13881: \"$ac_link\"") >&5
13882   (eval $ac_link) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit $ac_status); } &&
13886          { ac_try='test -s conftest$ac_exeext'
13887   { (eval echo "$as_me:13887: \"$ac_try\"") >&5
13888   (eval $ac_try) 2>&5
13889   ac_status=$?
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit $ac_status); }; }; then
13892   cf_cv_func_vsscanf=vfscanf
13893 else
13894   echo "$as_me: failed program was:" >&5
13895 cat conftest.$ac_ext >&5
13896
13897 cat >conftest.$ac_ext <<_ACEOF
13898 #line 13898 "configure"
13899 #include "confdefs.h"
13900
13901 #include <stdarg.h>
13902 #include <stdio.h>
13903 int
13904 main ()
13905 {
13906
13907     FILE strbuf;
13908     char *str = "from";
13909
13910     strbuf._flag = _IOREAD;
13911     strbuf._ptr = strbuf._base = (unsigned char *) str;
13912     strbuf._cnt = strlen(str);
13913     strbuf._file = _NFILE;
13914     return (_doscan(&strbuf, "%d", ap))
13915   ;
13916   return 0;
13917 }
13918 _ACEOF
13919 rm -f conftest.$ac_objext conftest$ac_exeext
13920 if { (eval echo "$as_me:13920: \"$ac_link\"") >&5
13921   (eval $ac_link) 2>&5
13922   ac_status=$?
13923   echo "$as_me:13923: \$? = $ac_status" >&5
13924   (exit $ac_status); } &&
13925          { ac_try='test -s conftest$ac_exeext'
13926   { (eval echo "$as_me:13926: \"$ac_try\"") >&5
13927   (eval $ac_try) 2>&5
13928   ac_status=$?
13929   echo "$as_me:13929: \$? = $ac_status" >&5
13930   (exit $ac_status); }; }; then
13931   cf_cv_func_vsscanf=_doscan
13932 else
13933   echo "$as_me: failed program was:" >&5
13934 cat conftest.$ac_ext >&5
13935
13936 cf_cv_func_vsscanf=no
13937 fi
13938 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13939 fi
13940 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13941 fi
13942 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13943 fi
13944 echo "$as_me:13944: result: $cf_cv_func_vsscanf" >&5
13945 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13946
13947 case $cf_cv_func_vsscanf in #(vi
13948 vsscanf) cat >>confdefs.h <<\EOF
13949 #define HAVE_VSSCANF 1
13950 EOF
13951 ;; #(vi
13952 vfscanf) cat >>confdefs.h <<\EOF
13953 #define HAVE_VFSCANF 1
13954 EOF
13955 ;; #(vi
13956 _doscan) cat >>confdefs.h <<\EOF
13957 #define HAVE__DOSCAN 1
13958 EOF
13959 ;;
13960 esac
13961
13962 echo "$as_me:13962: checking for working mkstemp" >&5
13963 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13964 if test "${cf_cv_func_mkstemp+set}" = set; then
13965   echo $ECHO_N "(cached) $ECHO_C" >&6
13966 else
13967
13968 rm -f conftest*
13969 if test "$cross_compiling" = yes; then
13970   echo "$as_me:13970: checking for mkstemp" >&5
13971 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13972 if test "${ac_cv_func_mkstemp+set}" = set; then
13973   echo $ECHO_N "(cached) $ECHO_C" >&6
13974 else
13975   cat >conftest.$ac_ext <<_ACEOF
13976 #line 13976 "configure"
13977 #include "confdefs.h"
13978 /* System header to define __stub macros and hopefully few prototypes,
13979     which can conflict with char mkstemp (); below.  */
13980 #include <assert.h>
13981 /* Override any gcc2 internal prototype to avoid an error.  */
13982 #ifdef __cplusplus
13983 extern "C"
13984 #endif
13985 /* We use char because int might match the return type of a gcc2
13986    builtin and then its argument prototype would still apply.  */
13987 char mkstemp ();
13988 char (*f) ();
13989
13990 int
13991 main ()
13992 {
13993 /* The GNU C library defines this for functions which it implements
13994     to always fail with ENOSYS.  Some functions are actually named
13995     something starting with __ and the normal name is an alias.  */
13996 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13997 choke me
13998 #else
13999 f = mkstemp;
14000 #endif
14001
14002   ;
14003   return 0;
14004 }
14005 _ACEOF
14006 rm -f conftest.$ac_objext conftest$ac_exeext
14007 if { (eval echo "$as_me:14007: \"$ac_link\"") >&5
14008   (eval $ac_link) 2>&5
14009   ac_status=$?
14010   echo "$as_me:14010: \$? = $ac_status" >&5
14011   (exit $ac_status); } &&
14012          { ac_try='test -s conftest$ac_exeext'
14013   { (eval echo "$as_me:14013: \"$ac_try\"") >&5
14014   (eval $ac_try) 2>&5
14015   ac_status=$?
14016   echo "$as_me:14016: \$? = $ac_status" >&5
14017   (exit $ac_status); }; }; then
14018   ac_cv_func_mkstemp=yes
14019 else
14020   echo "$as_me: failed program was:" >&5
14021 cat conftest.$ac_ext >&5
14022 ac_cv_func_mkstemp=no
14023 fi
14024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14025 fi
14026 echo "$as_me:14026: result: $ac_cv_func_mkstemp" >&5
14027 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14028
14029 else
14030   cat >conftest.$ac_ext <<_ACEOF
14031 #line 14031 "configure"
14032 #include "confdefs.h"
14033
14034 #include <sys/types.h>
14035 #include <stdlib.h>
14036 #include <stdio.h>
14037 #include <string.h>
14038 #include <sys/stat.h>
14039 int main()
14040 {
14041         char *tmpl = "conftestXXXXXX";
14042         char name[2][80];
14043         int n;
14044         int result = 0;
14045         int fd;
14046         struct stat sb;
14047
14048         umask(077);
14049         for (n = 0; n < 2; ++n) {
14050                 strcpy(name[n], tmpl);
14051                 if ((fd = mkstemp(name[n])) >= 0) {
14052                         if (!strcmp(name[n], tmpl)
14053                          || stat(name[n], &sb) != 0
14054                          || (sb.st_mode & S_IFMT) != S_IFREG
14055                          || (sb.st_mode & 077) != 0) {
14056                                 result = 1;
14057                         }
14058                         close(fd);
14059                 }
14060         }
14061         if (result == 0
14062          && !strcmp(name[0], name[1]))
14063                 result = 1;
14064         ${cf_cv_main_return:-return}(result);
14065 }
14066
14067 _ACEOF
14068 rm -f conftest$ac_exeext
14069 if { (eval echo "$as_me:14069: \"$ac_link\"") >&5
14070   (eval $ac_link) 2>&5
14071   ac_status=$?
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14074   { (eval echo "$as_me:14074: \"$ac_try\"") >&5
14075   (eval $ac_try) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); }; }; then
14079   cf_cv_func_mkstemp=yes
14080
14081 else
14082   echo "$as_me: program exited with status $ac_status" >&5
14083 echo "$as_me: failed program was:" >&5
14084 cat conftest.$ac_ext >&5
14085 cf_cv_func_mkstemp=no
14086
14087 fi
14088 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14089 fi
14090
14091 fi
14092 echo "$as_me:14092: result: $cf_cv_func_mkstemp" >&5
14093 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14094 if test "$cf_cv_func_mkstemp" = yes ; then
14095         cat >>confdefs.h <<\EOF
14096 #define HAVE_MKSTEMP 1
14097 EOF
14098
14099 fi
14100
14101 # setup for prototype of fallback for vsscanf()
14102
14103 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14104         HAVE_VSSCANF=1
14105 else
14106         HAVE_VSSCANF=0
14107 fi
14108
14109 if test "$cross_compiling" = yes ; then
14110         { echo "$as_me:14110: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14111 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14112 else
14113         echo "$as_me:14113: checking whether setvbuf arguments are reversed" >&5
14114 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14115 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14116   echo $ECHO_N "(cached) $ECHO_C" >&6
14117 else
14118   if test "$cross_compiling" = yes; then
14119   { { echo "$as_me:14119: error: cannot run test program while cross compiling" >&5
14120 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14121    { (exit 1); exit 1; }; }
14122 else
14123   cat >conftest.$ac_ext <<_ACEOF
14124 #line 14124 "configure"
14125 #include "confdefs.h"
14126 #include <stdio.h>
14127 /* If setvbuf has the reversed format, exit 0. */
14128 int
14129 main ()
14130 {
14131   /* This call has the arguments reversed.
14132      A reversed system may check and see that the address of main
14133      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14134   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14135     $ac_main_return(1);
14136   putc('\r', stdout);
14137   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14138 }
14139 _ACEOF
14140 rm -f conftest$ac_exeext
14141 if { (eval echo "$as_me:14141: \"$ac_link\"") >&5
14142   (eval $ac_link) 2>&5
14143   ac_status=$?
14144   echo "$as_me:14144: \$? = $ac_status" >&5
14145   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14146   { (eval echo "$as_me:14146: \"$ac_try\"") >&5
14147   (eval $ac_try) 2>&5
14148   ac_status=$?
14149   echo "$as_me:14149: \$? = $ac_status" >&5
14150   (exit $ac_status); }; }; then
14151   ac_cv_func_setvbuf_reversed=yes
14152 else
14153   echo "$as_me: program exited with status $ac_status" >&5
14154 echo "$as_me: failed program was:" >&5
14155 cat conftest.$ac_ext >&5
14156 ac_cv_func_setvbuf_reversed=no
14157 fi
14158 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14159 fi
14160 rm -f core core.* *.core
14161 fi
14162 echo "$as_me:14162: result: $ac_cv_func_setvbuf_reversed" >&5
14163 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14164 if test $ac_cv_func_setvbuf_reversed = yes; then
14165
14166 cat >>confdefs.h <<\EOF
14167 #define SETVBUF_REVERSED 1
14168 EOF
14169
14170 fi
14171
14172 fi
14173 echo "$as_me:14173: checking return type of signal handlers" >&5
14174 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14175 if test "${ac_cv_type_signal+set}" = set; then
14176   echo $ECHO_N "(cached) $ECHO_C" >&6
14177 else
14178   cat >conftest.$ac_ext <<_ACEOF
14179 #line 14179 "configure"
14180 #include "confdefs.h"
14181 #include <sys/types.h>
14182 #include <signal.h>
14183 #ifdef signal
14184 # undef signal
14185 #endif
14186 #ifdef __cplusplus
14187 extern "C" void (*signal (int, void (*)(int)))(int);
14188 #else
14189 void (*signal ()) ();
14190 #endif
14191
14192 int
14193 main ()
14194 {
14195 int i;
14196   ;
14197   return 0;
14198 }
14199 _ACEOF
14200 rm -f conftest.$ac_objext
14201 if { (eval echo "$as_me:14201: \"$ac_compile\"") >&5
14202   (eval $ac_compile) 2>&5
14203   ac_status=$?
14204   echo "$as_me:14204: \$? = $ac_status" >&5
14205   (exit $ac_status); } &&
14206          { ac_try='test -s conftest.$ac_objext'
14207   { (eval echo "$as_me:14207: \"$ac_try\"") >&5
14208   (eval $ac_try) 2>&5
14209   ac_status=$?
14210   echo "$as_me:14210: \$? = $ac_status" >&5
14211   (exit $ac_status); }; }; then
14212   ac_cv_type_signal=void
14213 else
14214   echo "$as_me: failed program was:" >&5
14215 cat conftest.$ac_ext >&5
14216 ac_cv_type_signal=int
14217 fi
14218 rm -f conftest.$ac_objext conftest.$ac_ext
14219 fi
14220 echo "$as_me:14220: result: $ac_cv_type_signal" >&5
14221 echo "${ECHO_T}$ac_cv_type_signal" >&6
14222
14223 cat >>confdefs.h <<EOF
14224 #define RETSIGTYPE $ac_cv_type_signal
14225 EOF
14226
14227 echo "$as_me:14227: checking for type sigaction_t" >&5
14228 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14229 if test "${cf_cv_type_sigaction+set}" = set; then
14230   echo $ECHO_N "(cached) $ECHO_C" >&6
14231 else
14232
14233         cat >conftest.$ac_ext <<_ACEOF
14234 #line 14234 "configure"
14235 #include "confdefs.h"
14236
14237 #include <signal.h>
14238 int
14239 main ()
14240 {
14241 sigaction_t x
14242   ;
14243   return 0;
14244 }
14245 _ACEOF
14246 rm -f conftest.$ac_objext
14247 if { (eval echo "$as_me:14247: \"$ac_compile\"") >&5
14248   (eval $ac_compile) 2>&5
14249   ac_status=$?
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit $ac_status); } &&
14252          { ac_try='test -s conftest.$ac_objext'
14253   { (eval echo "$as_me:14253: \"$ac_try\"") >&5
14254   (eval $ac_try) 2>&5
14255   ac_status=$?
14256   echo "$as_me:14256: \$? = $ac_status" >&5
14257   (exit $ac_status); }; }; then
14258   cf_cv_type_sigaction=yes
14259 else
14260   echo "$as_me: failed program was:" >&5
14261 cat conftest.$ac_ext >&5
14262 cf_cv_type_sigaction=no
14263 fi
14264 rm -f conftest.$ac_objext conftest.$ac_ext
14265 fi
14266
14267 echo "$as_me:14267: result: $cf_cv_type_sigaction" >&5
14268 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14269 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14270 #define HAVE_TYPE_SIGACTION 1
14271 EOF
14272
14273 echo "$as_me:14273: checking declaration of size-change" >&5
14274 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14275 if test "${cf_cv_sizechange+set}" = set; then
14276   echo $ECHO_N "(cached) $ECHO_C" >&6
14277 else
14278
14279     cf_cv_sizechange=unknown
14280     cf_save_CPPFLAGS="$CPPFLAGS"
14281
14282 for cf_opts in "" "NEED_PTEM_H"
14283 do
14284
14285     CPPFLAGS="$cf_save_CPPFLAGS"
14286     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14287     cat >conftest.$ac_ext <<_ACEOF
14288 #line 14288 "configure"
14289 #include "confdefs.h"
14290 #include <sys/types.h>
14291 #ifdef HAVE_TERMIOS_H
14292 #include <termios.h>
14293 #else
14294 #ifdef HAVE_TERMIO_H
14295 #include <termio.h>
14296 #endif
14297 #endif
14298 #ifdef NEED_PTEM_H
14299 /* This is a workaround for SCO:  they neglected to define struct winsize in
14300  * termios.h -- it's only in termio.h and ptem.h
14301  */
14302 #include        <sys/stream.h>
14303 #include        <sys/ptem.h>
14304 #endif
14305 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14306 #include <sys/ioctl.h>
14307 #endif
14308
14309 int
14310 main ()
14311 {
14312
14313 #ifdef TIOCGSIZE
14314         struct ttysize win;     /* FIXME: what system is this? */
14315         int y = win.ts_lines;
14316         int x = win.ts_cols;
14317 #else
14318 #ifdef TIOCGWINSZ
14319         struct winsize win;
14320         int y = win.ws_row;
14321         int x = win.ws_col;
14322 #else
14323         no TIOCGSIZE or TIOCGWINSZ
14324 #endif /* TIOCGWINSZ */
14325 #endif /* TIOCGSIZE */
14326
14327   ;
14328   return 0;
14329 }
14330 _ACEOF
14331 rm -f conftest.$ac_objext
14332 if { (eval echo "$as_me:14332: \"$ac_compile\"") >&5
14333   (eval $ac_compile) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit $ac_status); } &&
14337          { ac_try='test -s conftest.$ac_objext'
14338   { (eval echo "$as_me:14338: \"$ac_try\"") >&5
14339   (eval $ac_try) 2>&5
14340   ac_status=$?
14341   echo "$as_me:14341: \$? = $ac_status" >&5
14342   (exit $ac_status); }; }; then
14343   cf_cv_sizechange=yes
14344 else
14345   echo "$as_me: failed program was:" >&5
14346 cat conftest.$ac_ext >&5
14347 cf_cv_sizechange=no
14348 fi
14349 rm -f conftest.$ac_objext conftest.$ac_ext
14350
14351         CPPFLAGS="$cf_save_CPPFLAGS"
14352         if test "$cf_cv_sizechange" = yes ; then
14353                 echo "size-change succeeded ($cf_opts)" >&5
14354                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14355                 break
14356         fi
14357 done
14358
14359 fi
14360 echo "$as_me:14360: result: $cf_cv_sizechange" >&5
14361 echo "${ECHO_T}$cf_cv_sizechange" >&6
14362 if test "$cf_cv_sizechange" != no ; then
14363         cat >>confdefs.h <<\EOF
14364 #define HAVE_SIZECHANGE 1
14365 EOF
14366
14367         case $cf_cv_sizechange in #(vi
14368         NEED*)
14369                 cat >>confdefs.h <<EOF
14370 #define $cf_cv_sizechange  1
14371 EOF
14372
14373                 ;;
14374         esac
14375 fi
14376
14377 echo "$as_me:14377: checking for memmove" >&5
14378 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14379 if test "${ac_cv_func_memmove+set}" = set; then
14380   echo $ECHO_N "(cached) $ECHO_C" >&6
14381 else
14382   cat >conftest.$ac_ext <<_ACEOF
14383 #line 14383 "configure"
14384 #include "confdefs.h"
14385 /* System header to define __stub macros and hopefully few prototypes,
14386     which can conflict with char memmove (); below.  */
14387 #include <assert.h>
14388 /* Override any gcc2 internal prototype to avoid an error.  */
14389 #ifdef __cplusplus
14390 extern "C"
14391 #endif
14392 /* We use char because int might match the return type of a gcc2
14393    builtin and then its argument prototype would still apply.  */
14394 char memmove ();
14395 char (*f) ();
14396
14397 int
14398 main ()
14399 {
14400 /* The GNU C library defines this for functions which it implements
14401     to always fail with ENOSYS.  Some functions are actually named
14402     something starting with __ and the normal name is an alias.  */
14403 #if defined (__stub_memmove) || defined (__stub___memmove)
14404 choke me
14405 #else
14406 f = memmove;
14407 #endif
14408
14409   ;
14410   return 0;
14411 }
14412 _ACEOF
14413 rm -f conftest.$ac_objext conftest$ac_exeext
14414 if { (eval echo "$as_me:14414: \"$ac_link\"") >&5
14415   (eval $ac_link) 2>&5
14416   ac_status=$?
14417   echo "$as_me:14417: \$? = $ac_status" >&5
14418   (exit $ac_status); } &&
14419          { ac_try='test -s conftest$ac_exeext'
14420   { (eval echo "$as_me:14420: \"$ac_try\"") >&5
14421   (eval $ac_try) 2>&5
14422   ac_status=$?
14423   echo "$as_me:14423: \$? = $ac_status" >&5
14424   (exit $ac_status); }; }; then
14425   ac_cv_func_memmove=yes
14426 else
14427   echo "$as_me: failed program was:" >&5
14428 cat conftest.$ac_ext >&5
14429 ac_cv_func_memmove=no
14430 fi
14431 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14432 fi
14433 echo "$as_me:14433: result: $ac_cv_func_memmove" >&5
14434 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14435 if test $ac_cv_func_memmove = yes; then
14436   :
14437 else
14438
14439 echo "$as_me:14439: checking for bcopy" >&5
14440 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14441 if test "${ac_cv_func_bcopy+set}" = set; then
14442   echo $ECHO_N "(cached) $ECHO_C" >&6
14443 else
14444   cat >conftest.$ac_ext <<_ACEOF
14445 #line 14445 "configure"
14446 #include "confdefs.h"
14447 /* System header to define __stub macros and hopefully few prototypes,
14448     which can conflict with char bcopy (); below.  */
14449 #include <assert.h>
14450 /* Override any gcc2 internal prototype to avoid an error.  */
14451 #ifdef __cplusplus
14452 extern "C"
14453 #endif
14454 /* We use char because int might match the return type of a gcc2
14455    builtin and then its argument prototype would still apply.  */
14456 char bcopy ();
14457 char (*f) ();
14458
14459 int
14460 main ()
14461 {
14462 /* The GNU C library defines this for functions which it implements
14463     to always fail with ENOSYS.  Some functions are actually named
14464     something starting with __ and the normal name is an alias.  */
14465 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14466 choke me
14467 #else
14468 f = bcopy;
14469 #endif
14470
14471   ;
14472   return 0;
14473 }
14474 _ACEOF
14475 rm -f conftest.$ac_objext conftest$ac_exeext
14476 if { (eval echo "$as_me:14476: \"$ac_link\"") >&5
14477   (eval $ac_link) 2>&5
14478   ac_status=$?
14479   echo "$as_me:14479: \$? = $ac_status" >&5
14480   (exit $ac_status); } &&
14481          { ac_try='test -s conftest$ac_exeext'
14482   { (eval echo "$as_me:14482: \"$ac_try\"") >&5
14483   (eval $ac_try) 2>&5
14484   ac_status=$?
14485   echo "$as_me:14485: \$? = $ac_status" >&5
14486   (exit $ac_status); }; }; then
14487   ac_cv_func_bcopy=yes
14488 else
14489   echo "$as_me: failed program was:" >&5
14490 cat conftest.$ac_ext >&5
14491 ac_cv_func_bcopy=no
14492 fi
14493 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14494 fi
14495 echo "$as_me:14495: result: $ac_cv_func_bcopy" >&5
14496 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14497 if test $ac_cv_func_bcopy = yes; then
14498
14499         echo "$as_me:14499: checking if bcopy does overlapping moves" >&5
14500 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14501 if test "${cf_cv_good_bcopy+set}" = set; then
14502   echo $ECHO_N "(cached) $ECHO_C" >&6
14503 else
14504
14505                 if test "$cross_compiling" = yes; then
14506   cf_cv_good_bcopy=unknown
14507 else
14508   cat >conftest.$ac_ext <<_ACEOF
14509 #line 14509 "configure"
14510 #include "confdefs.h"
14511
14512 int main() {
14513         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14514         char temp[40];
14515         bcopy(data, temp, sizeof(data));
14516         bcopy(temp+10, temp, 15);
14517         bcopy(temp+5, temp+15, 10);
14518         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14519 }
14520
14521 _ACEOF
14522 rm -f conftest$ac_exeext
14523 if { (eval echo "$as_me:14523: \"$ac_link\"") >&5
14524   (eval $ac_link) 2>&5
14525   ac_status=$?
14526   echo "$as_me:14526: \$? = $ac_status" >&5
14527   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14528   { (eval echo "$as_me:14528: \"$ac_try\"") >&5
14529   (eval $ac_try) 2>&5
14530   ac_status=$?
14531   echo "$as_me:14531: \$? = $ac_status" >&5
14532   (exit $ac_status); }; }; then
14533   cf_cv_good_bcopy=yes
14534 else
14535   echo "$as_me: program exited with status $ac_status" >&5
14536 echo "$as_me: failed program was:" >&5
14537 cat conftest.$ac_ext >&5
14538 cf_cv_good_bcopy=no
14539 fi
14540 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14541 fi
14542
14543 fi
14544 echo "$as_me:14544: result: $cf_cv_good_bcopy" >&5
14545 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14546
14547 else
14548   cf_cv_good_bcopy=no
14549 fi
14550
14551         if test "$cf_cv_good_bcopy" = yes ; then
14552                 cat >>confdefs.h <<\EOF
14553 #define USE_OK_BCOPY 1
14554 EOF
14555
14556         else
14557                 cat >>confdefs.h <<\EOF
14558 #define USE_MY_MEMMOVE 1
14559 EOF
14560
14561         fi
14562
14563 fi
14564
14565 echo "$as_me:14565: checking if poll really works" >&5
14566 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14567 if test "${cf_cv_working_poll+set}" = set; then
14568   echo $ECHO_N "(cached) $ECHO_C" >&6
14569 else
14570
14571 if test "$cross_compiling" = yes; then
14572   cf_cv_working_poll=unknown
14573 else
14574   cat >conftest.$ac_ext <<_ACEOF
14575 #line 14575 "configure"
14576 #include "confdefs.h"
14577
14578 #include <stdio.h>
14579 #ifdef HAVE_POLL_H
14580 #include <poll.h>
14581 #else
14582 #include <sys/poll.h>
14583 #endif
14584 int main() {
14585         struct pollfd myfds;
14586         int ret;
14587
14588         myfds.fd = 0;
14589         myfds.events = POLLIN;
14590
14591         ret = poll(&myfds, 1, 100);
14592         ${cf_cv_main_return:-return}(ret != 0);
14593 }
14594 _ACEOF
14595 rm -f conftest$ac_exeext
14596 if { (eval echo "$as_me:14596: \"$ac_link\"") >&5
14597   (eval $ac_link) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14601   { (eval echo "$as_me:14601: \"$ac_try\"") >&5
14602   (eval $ac_try) 2>&5
14603   ac_status=$?
14604   echo "$as_me:14604: \$? = $ac_status" >&5
14605   (exit $ac_status); }; }; then
14606   cf_cv_working_poll=yes
14607 else
14608   echo "$as_me: program exited with status $ac_status" >&5
14609 echo "$as_me: failed program was:" >&5
14610 cat conftest.$ac_ext >&5
14611 cf_cv_working_poll=no
14612 fi
14613 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14614 fi
14615 fi
14616 echo "$as_me:14616: result: $cf_cv_working_poll" >&5
14617 echo "${ECHO_T}$cf_cv_working_poll" >&6
14618 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14619 #define HAVE_WORKING_POLL 1
14620 EOF
14621
14622 # special check for test/ditto.c
14623
14624 echo "$as_me:14624: checking for openpty in -lutil" >&5
14625 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14626 if test "${ac_cv_lib_util_openpty+set}" = set; then
14627   echo $ECHO_N "(cached) $ECHO_C" >&6
14628 else
14629   ac_check_lib_save_LIBS=$LIBS
14630 LIBS="-lutil  $LIBS"
14631 cat >conftest.$ac_ext <<_ACEOF
14632 #line 14632 "configure"
14633 #include "confdefs.h"
14634
14635 /* Override any gcc2 internal prototype to avoid an error.  */
14636 #ifdef __cplusplus
14637 extern "C"
14638 #endif
14639 /* We use char because int might match the return type of a gcc2
14640    builtin and then its argument prototype would still apply.  */
14641 char openpty ();
14642 int
14643 main ()
14644 {
14645 openpty ();
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 rm -f conftest.$ac_objext conftest$ac_exeext
14651 if { (eval echo "$as_me:14651: \"$ac_link\"") >&5
14652   (eval $ac_link) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit $ac_status); } &&
14656          { ac_try='test -s conftest$ac_exeext'
14657   { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658   (eval $ac_try) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit $ac_status); }; }; then
14662   ac_cv_lib_util_openpty=yes
14663 else
14664   echo "$as_me: failed program was:" >&5
14665 cat conftest.$ac_ext >&5
14666 ac_cv_lib_util_openpty=no
14667 fi
14668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14669 LIBS=$ac_check_lib_save_LIBS
14670 fi
14671 echo "$as_me:14671: result: $ac_cv_lib_util_openpty" >&5
14672 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14673 if test $ac_cv_lib_util_openpty = yes; then
14674   cf_cv_lib_util=yes
14675 else
14676   cf_cv_lib_util=no
14677 fi
14678
14679 echo "$as_me:14679: checking for openpty header" >&5
14680 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14681 if test "${cf_cv_func_openpty+set}" = set; then
14682   echo $ECHO_N "(cached) $ECHO_C" >&6
14683 else
14684
14685     cf_save_LIBS="$LIBS"
14686     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14687     for cf_header in pty.h libutil.h util.h
14688     do
14689     cat >conftest.$ac_ext <<_ACEOF
14690 #line 14690 "configure"
14691 #include "confdefs.h"
14692
14693 #include <$cf_header>
14694
14695 int
14696 main ()
14697 {
14698
14699     int x = openpty((int *)0, (int *)0, (char *)0,
14700                    (struct termios *)0, (struct winsize *)0);
14701
14702   ;
14703   return 0;
14704 }
14705 _ACEOF
14706 rm -f conftest.$ac_objext conftest$ac_exeext
14707 if { (eval echo "$as_me:14707: \"$ac_link\"") >&5
14708   (eval $ac_link) 2>&5
14709   ac_status=$?
14710   echo "$as_me:14710: \$? = $ac_status" >&5
14711   (exit $ac_status); } &&
14712          { ac_try='test -s conftest$ac_exeext'
14713   { (eval echo "$as_me:14713: \"$ac_try\"") >&5
14714   (eval $ac_try) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); }; }; then
14718
14719         cf_cv_func_openpty=$cf_header
14720         break
14721
14722 else
14723   echo "$as_me: failed program was:" >&5
14724 cat conftest.$ac_ext >&5
14725
14726         cf_cv_func_openpty=no
14727
14728 fi
14729 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14730     done
14731     LIBS="$cf_save_LIBS"
14732
14733 fi
14734 echo "$as_me:14734: result: $cf_cv_func_openpty" >&5
14735 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14736
14737 if test "$cf_cv_func_openpty" != no ; then
14738     cat >>confdefs.h <<EOF
14739 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14740 EOF
14741
14742     cat >>confdefs.h <<\EOF
14743 #define USE_XTERM_PTY 1
14744 EOF
14745
14746     if test "$cf_cv_lib_util" = yes ; then
14747         TEST_LIBS="-lutil $TEST_LIBS"
14748     fi
14749 fi
14750
14751 if test "$with_hashed_db" != no ; then
14752         cat >>confdefs.h <<\EOF
14753 #define USE_HASHED_DB 1
14754 EOF
14755
14756 case $with_hashed_db in #(vi
14757 yes|*able*) #(vi
14758     ;;
14759 *)
14760     if test -d "$with_hashed_db" ; then
14761
14762 if test -n "$with_hashed_db/include" ; then
14763   for cf_add_incdir in $with_hashed_db/include
14764   do
14765         while test $cf_add_incdir != /usr/include
14766         do
14767           if test -d $cf_add_incdir
14768           then
14769                 cf_have_incdir=no
14770                 if test -n "$CFLAGS$CPPFLAGS" ; then
14771                   # a loop is needed to ensure we can add subdirs of existing dirs
14772                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14773                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14774                           cf_have_incdir=yes; break
14775                         fi
14776                   done
14777                 fi
14778
14779                 if test "$cf_have_incdir" = no ; then
14780                   if test "$cf_add_incdir" = /usr/local/include ; then
14781                         if test "$GCC" = yes
14782                         then
14783                           cf_save_CPPFLAGS=$CPPFLAGS
14784                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14785                           cat >conftest.$ac_ext <<_ACEOF
14786 #line 14786 "configure"
14787 #include "confdefs.h"
14788 #include <stdio.h>
14789 int
14790 main ()
14791 {
14792 printf("Hello")
14793   ;
14794   return 0;
14795 }
14796 _ACEOF
14797 rm -f conftest.$ac_objext
14798 if { (eval echo "$as_me:14798: \"$ac_compile\"") >&5
14799   (eval $ac_compile) 2>&5
14800   ac_status=$?
14801   echo "$as_me:14801: \$? = $ac_status" >&5
14802   (exit $ac_status); } &&
14803          { ac_try='test -s conftest.$ac_objext'
14804   { (eval echo "$as_me:14804: \"$ac_try\"") >&5
14805   (eval $ac_try) 2>&5
14806   ac_status=$?
14807   echo "$as_me:14807: \$? = $ac_status" >&5
14808   (exit $ac_status); }; }; then
14809   :
14810 else
14811   echo "$as_me: failed program was:" >&5
14812 cat conftest.$ac_ext >&5
14813 cf_have_incdir=yes
14814 fi
14815 rm -f conftest.$ac_objext conftest.$ac_ext
14816                           CPPFLAGS=$cf_save_CPPFLAGS
14817                         fi
14818                   fi
14819                 fi
14820
14821                 if test "$cf_have_incdir" = no ; then
14822                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14823
14824 echo "${as_me-configure}:14824: testing adding $cf_add_incdir to include-path ..." 1>&5
14825
14826                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14827
14828                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14829                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14830                   cf_add_incdir="$cf_top_incdir"
14831                 else
14832                   break
14833                 fi
14834           fi
14835         done
14836   done
14837 fi
14838
14839 if test -n "$with_hashed_db/lib" ; then
14840   for cf_add_libdir in $with_hashed_db/lib
14841   do
14842     if test $cf_add_libdir = /usr/lib ; then
14843       :
14844     elif test -d $cf_add_libdir
14845     then
14846       cf_have_libdir=no
14847       if test -n "$LDFLAGS$LIBS" ; then
14848         # a loop is needed to ensure we can add subdirs of existing dirs
14849         for cf_test_libdir in $LDFLAGS $LIBS ; do
14850           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14851             cf_have_libdir=yes; break
14852           fi
14853         done
14854       fi
14855       if test "$cf_have_libdir" = no ; then
14856         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14857
14858 echo "${as_me-configure}:14858: testing adding $cf_add_libdir to library-path ..." 1>&5
14859
14860         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14861       fi
14862     fi
14863   done
14864 fi
14865
14866     fi
14867 esac
14868
14869 echo "$as_me:14869: checking for db.h" >&5
14870 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14871 if test "${ac_cv_header_db_h+set}" = set; then
14872   echo $ECHO_N "(cached) $ECHO_C" >&6
14873 else
14874   cat >conftest.$ac_ext <<_ACEOF
14875 #line 14875 "configure"
14876 #include "confdefs.h"
14877 #include <db.h>
14878 _ACEOF
14879 if { (eval echo "$as_me:14879: \"$ac_cpp conftest.$ac_ext\"") >&5
14880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14881   ac_status=$?
14882   egrep -v '^ *\+' conftest.er1 >conftest.err
14883   rm -f conftest.er1
14884   cat conftest.err >&5
14885   echo "$as_me:14885: \$? = $ac_status" >&5
14886   (exit $ac_status); } >/dev/null; then
14887   if test -s conftest.err; then
14888     ac_cpp_err=$ac_c_preproc_warn_flag
14889   else
14890     ac_cpp_err=
14891   fi
14892 else
14893   ac_cpp_err=yes
14894 fi
14895 if test -z "$ac_cpp_err"; then
14896   ac_cv_header_db_h=yes
14897 else
14898   echo "$as_me: failed program was:" >&5
14899   cat conftest.$ac_ext >&5
14900   ac_cv_header_db_h=no
14901 fi
14902 rm -f conftest.err conftest.$ac_ext
14903 fi
14904 echo "$as_me:14904: result: $ac_cv_header_db_h" >&5
14905 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14906 if test $ac_cv_header_db_h = yes; then
14907
14908 echo "$as_me:14908: checking for version of db" >&5
14909 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14910 if test "${cf_cv_hashed_db_version+set}" = set; then
14911   echo $ECHO_N "(cached) $ECHO_C" >&6
14912 else
14913
14914 cf_cv_hashed_db_version=unknown
14915
14916 for cf_db_version in 1 2 3 4 5
14917 do
14918
14919 echo "${as_me-configure}:14919: testing checking for db version $cf_db_version ..." 1>&5
14920
14921         cat >conftest.$ac_ext <<_ACEOF
14922 #line 14922 "configure"
14923 #include "confdefs.h"
14924
14925 $ac_includes_default
14926 #include <db.h>
14927
14928 #ifdef DB_VERSION_MAJOR
14929         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14930 #if $cf_db_version == DB_VERSION_MAJOR
14931         /* ok */
14932 #else
14933         make an error
14934 #endif
14935 #else
14936 #if $cf_db_version == 1
14937         /* ok: assuming this is DB 1.8.5 */
14938 #else
14939         make an error
14940 #endif
14941 #endif
14942
14943 int
14944 main ()
14945 {
14946 DBT *foo = 0
14947   ;
14948   return 0;
14949 }
14950 _ACEOF
14951 rm -f conftest.$ac_objext
14952 if { (eval echo "$as_me:14952: \"$ac_compile\"") >&5
14953   (eval $ac_compile) 2>&5
14954   ac_status=$?
14955   echo "$as_me:14955: \$? = $ac_status" >&5
14956   (exit $ac_status); } &&
14957          { ac_try='test -s conftest.$ac_objext'
14958   { (eval echo "$as_me:14958: \"$ac_try\"") >&5
14959   (eval $ac_try) 2>&5
14960   ac_status=$?
14961   echo "$as_me:14961: \$? = $ac_status" >&5
14962   (exit $ac_status); }; }; then
14963
14964         cf_cv_hashed_db_version=$cf_db_version
14965         break
14966
14967 else
14968   echo "$as_me: failed program was:" >&5
14969 cat conftest.$ac_ext >&5
14970 fi
14971 rm -f conftest.$ac_objext conftest.$ac_ext
14972 done
14973
14974 fi
14975 echo "$as_me:14975: result: $cf_cv_hashed_db_version" >&5
14976 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14977
14978 if test "$cf_cv_hashed_db_version" = unknown ; then
14979         { { echo "$as_me:14979: error: Cannot determine version of db" >&5
14980 echo "$as_me: error: Cannot determine version of db" >&2;}
14981    { (exit 1); exit 1; }; }
14982 else
14983
14984 echo "$as_me:14984: checking for db libraries" >&5
14985 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14986 if test "${cf_cv_hashed_db_libs+set}" = set; then
14987   echo $ECHO_N "(cached) $ECHO_C" >&6
14988 else
14989
14990 cf_cv_hashed_db_libs=unknown
14991 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14992 do
14993         cf_save_libs="$LIBS"
14994         if test -n "$cf_db_libs"; then
14995                 LIBS="-l$cf_db_libs $LIBS"
14996         fi
14997
14998 echo "${as_me-configure}:14998: testing checking for library "$cf_db_libs" ..." 1>&5
14999
15000         cat >conftest.$ac_ext <<_ACEOF
15001 #line 15001 "configure"
15002 #include "confdefs.h"
15003
15004 $ac_includes_default
15005 #include <db.h>
15006
15007 int
15008 main ()
15009 {
15010
15011         char *path = "/tmp/foo";
15012 #ifdef DB_VERSION_MAJOR
15013 #if DB_VERSION_MAJOR >= 4
15014         DB *result = 0;
15015         db_create(&result, NULL, 0);
15016         result->open(result,
15017                 NULL,
15018                 path,
15019                 path,
15020                 DB_HASH,
15021                 DB_CREATE,
15022                 0644);
15023 #elif DB_VERSION_MAJOR >= 3
15024         DB *result = 0;
15025         db_create(&result, NULL, 0);
15026         result->open(result,
15027                 path,
15028                 path,
15029                 DB_HASH,
15030                 DB_CREATE,
15031                 0644);
15032 #elif DB_VERSION_MAJOR >= 2
15033         DB *result = 0;
15034         db_open(path,
15035                 DB_HASH,
15036                 DB_CREATE,
15037                 0644,
15038                 (DB_ENV *) 0,
15039                 (DB_INFO *) 0,
15040                 &result);
15041 #endif /* DB_VERSION_MAJOR */
15042 #else
15043         DB *result = dbopen(path,
15044                      2,
15045                      0644,
15046                      DB_HASH,
15047                      0);
15048 #endif
15049         ${cf_cv_main_return:-return}(result != 0)
15050
15051   ;
15052   return 0;
15053 }
15054 _ACEOF
15055 rm -f conftest.$ac_objext conftest$ac_exeext
15056 if { (eval echo "$as_me:15056: \"$ac_link\"") >&5
15057   (eval $ac_link) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); } &&
15061          { ac_try='test -s conftest$ac_exeext'
15062   { (eval echo "$as_me:15062: \"$ac_try\"") >&5
15063   (eval $ac_try) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); }; }; then
15067
15068         if test -n "$cf_db_libs" ; then
15069                 cf_cv_hashed_db_libs=$cf_db_libs
15070         else
15071                 cf_cv_hashed_db_libs=default
15072         fi
15073         LIBS="$cf_save_libs"
15074         break
15075
15076 else
15077   echo "$as_me: failed program was:" >&5
15078 cat conftest.$ac_ext >&5
15079 fi
15080 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15081         LIBS="$cf_save_libs"
15082 done
15083
15084 fi
15085 echo "$as_me:15085: result: $cf_cv_hashed_db_libs" >&5
15086 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
15087
15088         if test "$cf_cv_hashed_db_libs" = unknown ; then
15089                 { { echo "$as_me:15089: error: Cannot determine library for db" >&5
15090 echo "$as_me: error: Cannot determine library for db" >&2;}
15091    { (exit 1); exit 1; }; }
15092         elif test "$cf_cv_hashed_db_libs" != default ; then
15093                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
15094         fi
15095 fi
15096
15097 else
15098
15099         { { echo "$as_me:15099: error: Cannot find db.h" >&5
15100 echo "$as_me: error: Cannot find db.h" >&2;}
15101    { (exit 1); exit 1; }; }
15102
15103 fi
15104
15105 fi
15106
15107 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15108         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15109         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15110 fi
15111
15112 # Just in case, check if the C compiler has a bool type.
15113
15114 echo "$as_me:15114: checking if we should include stdbool.h" >&5
15115 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15116
15117 if test "${cf_cv_header_stdbool_h+set}" = set; then
15118   echo $ECHO_N "(cached) $ECHO_C" >&6
15119 else
15120
15121         cat >conftest.$ac_ext <<_ACEOF
15122 #line 15122 "configure"
15123 #include "confdefs.h"
15124
15125 int
15126 main ()
15127 {
15128 bool foo = false
15129   ;
15130   return 0;
15131 }
15132 _ACEOF
15133 rm -f conftest.$ac_objext
15134 if { (eval echo "$as_me:15134: \"$ac_compile\"") >&5
15135   (eval $ac_compile) 2>&5
15136   ac_status=$?
15137   echo "$as_me:15137: \$? = $ac_status" >&5
15138   (exit $ac_status); } &&
15139          { ac_try='test -s conftest.$ac_objext'
15140   { (eval echo "$as_me:15140: \"$ac_try\"") >&5
15141   (eval $ac_try) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit $ac_status); }; }; then
15145   cf_cv_header_stdbool_h=0
15146 else
15147   echo "$as_me: failed program was:" >&5
15148 cat conftest.$ac_ext >&5
15149 cat >conftest.$ac_ext <<_ACEOF
15150 #line 15150 "configure"
15151 #include "confdefs.h"
15152
15153 #ifndef __BEOS__
15154 #include <stdbool.h>
15155 #endif
15156
15157 int
15158 main ()
15159 {
15160 bool foo = false
15161   ;
15162   return 0;
15163 }
15164 _ACEOF
15165 rm -f conftest.$ac_objext
15166 if { (eval echo "$as_me:15166: \"$ac_compile\"") >&5
15167   (eval $ac_compile) 2>&5
15168   ac_status=$?
15169   echo "$as_me:15169: \$? = $ac_status" >&5
15170   (exit $ac_status); } &&
15171          { ac_try='test -s conftest.$ac_objext'
15172   { (eval echo "$as_me:15172: \"$ac_try\"") >&5
15173   (eval $ac_try) 2>&5
15174   ac_status=$?
15175   echo "$as_me:15175: \$? = $ac_status" >&5
15176   (exit $ac_status); }; }; then
15177   cf_cv_header_stdbool_h=1
15178 else
15179   echo "$as_me: failed program was:" >&5
15180 cat conftest.$ac_ext >&5
15181 cf_cv_header_stdbool_h=0
15182 fi
15183 rm -f conftest.$ac_objext conftest.$ac_ext
15184 fi
15185 rm -f conftest.$ac_objext conftest.$ac_ext
15186 fi
15187
15188 if test "$cf_cv_header_stdbool_h" = 1
15189 then    echo "$as_me:15189: result: yes" >&5
15190 echo "${ECHO_T}yes" >&6
15191 else    echo "$as_me:15191: result: no" >&5
15192 echo "${ECHO_T}no" >&6
15193 fi
15194
15195 echo "$as_me:15195: checking for builtin bool type" >&5
15196 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15197
15198 if test "${cf_cv_cc_bool_type+set}" = set; then
15199   echo $ECHO_N "(cached) $ECHO_C" >&6
15200 else
15201
15202         cat >conftest.$ac_ext <<_ACEOF
15203 #line 15203 "configure"
15204 #include "confdefs.h"
15205
15206 #include <stdio.h>
15207 #include <sys/types.h>
15208
15209 int
15210 main ()
15211 {
15212 bool x = false
15213   ;
15214   return 0;
15215 }
15216 _ACEOF
15217 rm -f conftest.$ac_objext
15218 if { (eval echo "$as_me:15218: \"$ac_compile\"") >&5
15219   (eval $ac_compile) 2>&5
15220   ac_status=$?
15221   echo "$as_me:15221: \$? = $ac_status" >&5
15222   (exit $ac_status); } &&
15223          { ac_try='test -s conftest.$ac_objext'
15224   { (eval echo "$as_me:15224: \"$ac_try\"") >&5
15225   (eval $ac_try) 2>&5
15226   ac_status=$?
15227   echo "$as_me:15227: \$? = $ac_status" >&5
15228   (exit $ac_status); }; }; then
15229   cf_cv_cc_bool_type=1
15230 else
15231   echo "$as_me: failed program was:" >&5
15232 cat conftest.$ac_ext >&5
15233 cf_cv_cc_bool_type=0
15234 fi
15235 rm -f conftest.$ac_objext conftest.$ac_ext
15236
15237 fi
15238
15239 if test "$cf_cv_cc_bool_type" = 1
15240 then    echo "$as_me:15240: result: yes" >&5
15241 echo "${ECHO_T}yes" >&6
15242 else    echo "$as_me:15242: result: no" >&5
15243 echo "${ECHO_T}no" >&6
15244 fi
15245
15246 # Check for C++ compiler characteristics (and ensure that it's there!)
15247 if test -n "$CXX" ; then
15248         ac_ext=cc
15249 ac_cpp='$CXXCPP $CPPFLAGS'
15250 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15251 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15252 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15253 ac_main_return=return
15254
15255 if test -n "$GXX" ; then
15256 case $cf_cv_system_name in #(vi
15257 os2*) #(vi
15258         cf_stdcpp_libname=stdcpp
15259         ;;
15260 *)
15261         cf_stdcpp_libname=stdc++
15262         ;;
15263 esac
15264 echo "$as_me:15264: checking for library $cf_stdcpp_libname" >&5
15265 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15266 if test "${cf_cv_libstdcpp+set}" = set; then
15267   echo $ECHO_N "(cached) $ECHO_C" >&6
15268 else
15269
15270         cf_save="$LIBS"
15271         LIBS="$LIBS -l$cf_stdcpp_libname"
15272 cat >conftest.$ac_ext <<_ACEOF
15273 #line 15273 "configure"
15274 #include "confdefs.h"
15275
15276 #include <strstream.h>
15277 int
15278 main ()
15279 {
15280
15281 char buf[80];
15282 strstreambuf foo(buf, sizeof(buf))
15283
15284   ;
15285   return 0;
15286 }
15287 _ACEOF
15288 rm -f conftest.$ac_objext conftest$ac_exeext
15289 if { (eval echo "$as_me:15289: \"$ac_link\"") >&5
15290   (eval $ac_link) 2>&5
15291   ac_status=$?
15292   echo "$as_me:15292: \$? = $ac_status" >&5
15293   (exit $ac_status); } &&
15294          { ac_try='test -s conftest$ac_exeext'
15295   { (eval echo "$as_me:15295: \"$ac_try\"") >&5
15296   (eval $ac_try) 2>&5
15297   ac_status=$?
15298   echo "$as_me:15298: \$? = $ac_status" >&5
15299   (exit $ac_status); }; }; then
15300   cf_cv_libstdcpp=yes
15301 else
15302   echo "$as_me: failed program was:" >&5
15303 cat conftest.$ac_ext >&5
15304 cf_cv_libstdcpp=no
15305 fi
15306 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15307         LIBS="$cf_save"
15308
15309 fi
15310 echo "$as_me:15310: result: $cf_cv_libstdcpp" >&5
15311 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15312 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15313 fi
15314
15315         echo "$as_me:15315: checking whether $CXX understands -c and -o together" >&5
15316 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15317 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15318   echo $ECHO_N "(cached) $ECHO_C" >&6
15319 else
15320
15321 cat > conftest.$ac_ext <<CF_EOF
15322 #include <stdio.h>
15323 int main()
15324 {
15325         ${cf_cv_main_return:-return}(0);
15326 }
15327 CF_EOF
15328 # We do the test twice because some compilers refuse to overwrite an
15329 # existing .o file with -o, though they will create one.
15330 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15331 if { (eval echo "$as_me:15331: \"$ac_try\"") >&5
15332   (eval $ac_try) 2>&5
15333   ac_status=$?
15334   echo "$as_me:15334: \$? = $ac_status" >&5
15335   (exit $ac_status); } &&
15336   test -f conftest2.$ac_objext && { (eval echo "$as_me:15336: \"$ac_try\"") >&5
15337   (eval $ac_try) 2>&5
15338   ac_status=$?
15339   echo "$as_me:15339: \$? = $ac_status" >&5
15340   (exit $ac_status); };
15341 then
15342   eval cf_cv_prog_CXX_c_o=yes
15343 else
15344   eval cf_cv_prog_CXX_c_o=no
15345 fi
15346 rm -f conftest*
15347
15348 fi
15349 if test $cf_cv_prog_CXX_c_o = yes; then
15350   echo "$as_me:15350: result: yes" >&5
15351 echo "${ECHO_T}yes" >&6
15352 else
15353   echo "$as_me:15353: result: no" >&5
15354 echo "${ECHO_T}no" >&6
15355 fi
15356
15357         case $GXX_VERSION in
15358         1*|2.0-6*)
15359                 cf_cxx_library=yes
15360                 ;;
15361         *-2.7*|2.7*)
15362
15363 cf_cxx_library=unknown
15364 case $cf_cv_system_name in #(vi
15365 os2*) #(vi
15366         cf_gpp_libname=gpp
15367         ;;
15368 *)
15369         cf_gpp_libname=g++
15370         ;;
15371 esac
15372 if test "$GXX" = yes; then
15373         echo "$as_me:15373: checking for lib$cf_gpp_libname" >&5
15374 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15375         cf_save="$LIBS"
15376         LIBS="$LIBS -l$cf_gpp_libname"
15377         cat >conftest.$ac_ext <<_ACEOF
15378 #line 15378 "configure"
15379 #include "confdefs.h"
15380
15381 #include <$cf_gpp_libname/builtin.h>
15382
15383 int
15384 main ()
15385 {
15386 two_arg_error_handler_t foo2 = lib_error_handler
15387   ;
15388   return 0;
15389 }
15390 _ACEOF
15391 rm -f conftest.$ac_objext conftest$ac_exeext
15392 if { (eval echo "$as_me:15392: \"$ac_link\"") >&5
15393   (eval $ac_link) 2>&5
15394   ac_status=$?
15395   echo "$as_me:15395: \$? = $ac_status" >&5
15396   (exit $ac_status); } &&
15397          { ac_try='test -s conftest$ac_exeext'
15398   { (eval echo "$as_me:15398: \"$ac_try\"") >&5
15399   (eval $ac_try) 2>&5
15400   ac_status=$?
15401   echo "$as_me:15401: \$? = $ac_status" >&5
15402   (exit $ac_status); }; }; then
15403   cf_cxx_library=yes
15404          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15405          if test "$cf_gpp_libname" = cpp ; then
15406             cat >>confdefs.h <<\EOF
15407 #define HAVE_GPP_BUILTIN_H 1
15408 EOF
15409
15410          else
15411             cat >>confdefs.h <<\EOF
15412 #define HAVE_GXX_BUILTIN_H 1
15413 EOF
15414
15415          fi
15416 else
15417   echo "$as_me: failed program was:" >&5
15418 cat conftest.$ac_ext >&5
15419 cat >conftest.$ac_ext <<_ACEOF
15420 #line 15420 "configure"
15421 #include "confdefs.h"
15422
15423 #include <builtin.h>
15424
15425 int
15426 main ()
15427 {
15428 two_arg_error_handler_t foo2 = lib_error_handler
15429   ;
15430   return 0;
15431 }
15432 _ACEOF
15433 rm -f conftest.$ac_objext conftest$ac_exeext
15434 if { (eval echo "$as_me:15434: \"$ac_link\"") >&5
15435   (eval $ac_link) 2>&5
15436   ac_status=$?
15437   echo "$as_me:15437: \$? = $ac_status" >&5
15438   (exit $ac_status); } &&
15439          { ac_try='test -s conftest$ac_exeext'
15440   { (eval echo "$as_me:15440: \"$ac_try\"") >&5
15441   (eval $ac_try) 2>&5
15442   ac_status=$?
15443   echo "$as_me:15443: \$? = $ac_status" >&5
15444   (exit $ac_status); }; }; then
15445   cf_cxx_library=yes
15446          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15447          cat >>confdefs.h <<\EOF
15448 #define HAVE_BUILTIN_H 1
15449 EOF
15450
15451 else
15452   echo "$as_me: failed program was:" >&5
15453 cat conftest.$ac_ext >&5
15454 cf_cxx_library=no
15455 fi
15456 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15457 fi
15458 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15459         LIBS="$cf_save"
15460         echo "$as_me:15460: result: $cf_cxx_library" >&5
15461 echo "${ECHO_T}$cf_cxx_library" >&6
15462 fi
15463
15464                 ;;
15465         *)
15466                 cf_cxx_library=no
15467                 ;;
15468         esac
15469
15470         ac_ext=cc
15471 ac_cpp='$CXXCPP $CPPFLAGS'
15472 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15473 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15474 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15475 ac_main_return=return
15476 echo "$as_me:15476: checking how to run the C++ preprocessor" >&5
15477 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15478 if test -z "$CXXCPP"; then
15479   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15480   echo $ECHO_N "(cached) $ECHO_C" >&6
15481 else
15482       # Double quotes because CXXCPP needs to be expanded
15483     for CXXCPP in "$CXX -E" "/lib/cpp"
15484     do
15485       ac_preproc_ok=false
15486 for ac_cxx_preproc_warn_flag in '' yes
15487 do
15488   # Use a header file that comes with gcc, so configuring glibc
15489   # with a fresh cross-compiler works.
15490   # On the NeXT, cc -E runs the code through the compiler's parser,
15491   # not just through cpp. "Syntax error" is here to catch this case.
15492   cat >conftest.$ac_ext <<_ACEOF
15493 #line 15493 "configure"
15494 #include "confdefs.h"
15495 #include <assert.h>
15496                      Syntax error
15497 _ACEOF
15498 if { (eval echo "$as_me:15498: \"$ac_cpp conftest.$ac_ext\"") >&5
15499   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15500   ac_status=$?
15501   egrep -v '^ *\+' conftest.er1 >conftest.err
15502   rm -f conftest.er1
15503   cat conftest.err >&5
15504   echo "$as_me:15504: \$? = $ac_status" >&5
15505   (exit $ac_status); } >/dev/null; then
15506   if test -s conftest.err; then
15507     ac_cpp_err=$ac_cxx_preproc_warn_flag
15508   else
15509     ac_cpp_err=
15510   fi
15511 else
15512   ac_cpp_err=yes
15513 fi
15514 if test -z "$ac_cpp_err"; then
15515   :
15516 else
15517   echo "$as_me: failed program was:" >&5
15518   cat conftest.$ac_ext >&5
15519   # Broken: fails on valid input.
15520 continue
15521 fi
15522 rm -f conftest.err conftest.$ac_ext
15523
15524   # OK, works on sane cases.  Now check whether non-existent headers
15525   # can be detected and how.
15526   cat >conftest.$ac_ext <<_ACEOF
15527 #line 15527 "configure"
15528 #include "confdefs.h"
15529 #include <ac_nonexistent.h>
15530 _ACEOF
15531 if { (eval echo "$as_me:15531: \"$ac_cpp conftest.$ac_ext\"") >&5
15532   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15533   ac_status=$?
15534   egrep -v '^ *\+' conftest.er1 >conftest.err
15535   rm -f conftest.er1
15536   cat conftest.err >&5
15537   echo "$as_me:15537: \$? = $ac_status" >&5
15538   (exit $ac_status); } >/dev/null; then
15539   if test -s conftest.err; then
15540     ac_cpp_err=$ac_cxx_preproc_warn_flag
15541   else
15542     ac_cpp_err=
15543   fi
15544 else
15545   ac_cpp_err=yes
15546 fi
15547 if test -z "$ac_cpp_err"; then
15548   # Broken: success on invalid input.
15549 continue
15550 else
15551   echo "$as_me: failed program was:" >&5
15552   cat conftest.$ac_ext >&5
15553   # Passes both tests.
15554 ac_preproc_ok=:
15555 break
15556 fi
15557 rm -f conftest.err conftest.$ac_ext
15558
15559 done
15560 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15561 rm -f conftest.err conftest.$ac_ext
15562 if $ac_preproc_ok; then
15563   break
15564 fi
15565
15566     done
15567     ac_cv_prog_CXXCPP=$CXXCPP
15568
15569 fi
15570   CXXCPP=$ac_cv_prog_CXXCPP
15571 else
15572   ac_cv_prog_CXXCPP=$CXXCPP
15573 fi
15574 echo "$as_me:15574: result: $CXXCPP" >&5
15575 echo "${ECHO_T}$CXXCPP" >&6
15576 ac_preproc_ok=false
15577 for ac_cxx_preproc_warn_flag in '' yes
15578 do
15579   # Use a header file that comes with gcc, so configuring glibc
15580   # with a fresh cross-compiler works.
15581   # On the NeXT, cc -E runs the code through the compiler's parser,
15582   # not just through cpp. "Syntax error" is here to catch this case.
15583   cat >conftest.$ac_ext <<_ACEOF
15584 #line 15584 "configure"
15585 #include "confdefs.h"
15586 #include <assert.h>
15587                      Syntax error
15588 _ACEOF
15589 if { (eval echo "$as_me:15589: \"$ac_cpp conftest.$ac_ext\"") >&5
15590   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15591   ac_status=$?
15592   egrep -v '^ *\+' conftest.er1 >conftest.err
15593   rm -f conftest.er1
15594   cat conftest.err >&5
15595   echo "$as_me:15595: \$? = $ac_status" >&5
15596   (exit $ac_status); } >/dev/null; then
15597   if test -s conftest.err; then
15598     ac_cpp_err=$ac_cxx_preproc_warn_flag
15599   else
15600     ac_cpp_err=
15601   fi
15602 else
15603   ac_cpp_err=yes
15604 fi
15605 if test -z "$ac_cpp_err"; then
15606   :
15607 else
15608   echo "$as_me: failed program was:" >&5
15609   cat conftest.$ac_ext >&5
15610   # Broken: fails on valid input.
15611 continue
15612 fi
15613 rm -f conftest.err conftest.$ac_ext
15614
15615   # OK, works on sane cases.  Now check whether non-existent headers
15616   # can be detected and how.
15617   cat >conftest.$ac_ext <<_ACEOF
15618 #line 15618 "configure"
15619 #include "confdefs.h"
15620 #include <ac_nonexistent.h>
15621 _ACEOF
15622 if { (eval echo "$as_me:15622: \"$ac_cpp conftest.$ac_ext\"") >&5
15623   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15624   ac_status=$?
15625   egrep -v '^ *\+' conftest.er1 >conftest.err
15626   rm -f conftest.er1
15627   cat conftest.err >&5
15628   echo "$as_me:15628: \$? = $ac_status" >&5
15629   (exit $ac_status); } >/dev/null; then
15630   if test -s conftest.err; then
15631     ac_cpp_err=$ac_cxx_preproc_warn_flag
15632   else
15633     ac_cpp_err=
15634   fi
15635 else
15636   ac_cpp_err=yes
15637 fi
15638 if test -z "$ac_cpp_err"; then
15639   # Broken: success on invalid input.
15640 continue
15641 else
15642   echo "$as_me: failed program was:" >&5
15643   cat conftest.$ac_ext >&5
15644   # Passes both tests.
15645 ac_preproc_ok=:
15646 break
15647 fi
15648 rm -f conftest.err conftest.$ac_ext
15649
15650 done
15651 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15652 rm -f conftest.err conftest.$ac_ext
15653 if $ac_preproc_ok; then
15654   :
15655 else
15656   { { echo "$as_me:15656: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15657 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15658    { (exit 1); exit 1; }; }
15659 fi
15660
15661 ac_ext=cc
15662 ac_cpp='$CXXCPP $CPPFLAGS'
15663 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15664 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15665 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15666 ac_main_return=return
15667
15668 for ac_header in iostream typeinfo
15669 do
15670 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15671 echo "$as_me:15671: checking for $ac_header" >&5
15672 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15673 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15674   echo $ECHO_N "(cached) $ECHO_C" >&6
15675 else
15676   cat >conftest.$ac_ext <<_ACEOF
15677 #line 15677 "configure"
15678 #include "confdefs.h"
15679 #include <$ac_header>
15680 _ACEOF
15681 if { (eval echo "$as_me:15681: \"$ac_cpp conftest.$ac_ext\"") >&5
15682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15683   ac_status=$?
15684   egrep -v '^ *\+' conftest.er1 >conftest.err
15685   rm -f conftest.er1
15686   cat conftest.err >&5
15687   echo "$as_me:15687: \$? = $ac_status" >&5
15688   (exit $ac_status); } >/dev/null; then
15689   if test -s conftest.err; then
15690     ac_cpp_err=$ac_cxx_preproc_warn_flag
15691   else
15692     ac_cpp_err=
15693   fi
15694 else
15695   ac_cpp_err=yes
15696 fi
15697 if test -z "$ac_cpp_err"; then
15698   eval "$as_ac_Header=yes"
15699 else
15700   echo "$as_me: failed program was:" >&5
15701   cat conftest.$ac_ext >&5
15702   eval "$as_ac_Header=no"
15703 fi
15704 rm -f conftest.err conftest.$ac_ext
15705 fi
15706 echo "$as_me:15706: result: `eval echo '${'$as_ac_Header'}'`" >&5
15707 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15708 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15709   cat >>confdefs.h <<EOF
15710 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15711 EOF
15712
15713 fi
15714 done
15715
15716     if test x"$ac_cv_header_iostream" = xyes ; then
15717         echo "$as_me:15717: checking if iostream uses std-namespace" >&5
15718 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15719         cat >conftest.$ac_ext <<_ACEOF
15720 #line 15720 "configure"
15721 #include "confdefs.h"
15722
15723 #include <iostream>
15724 using std::endl;
15725 using std::cerr;
15726 int
15727 main ()
15728 {
15729
15730 cerr << "testing" << endl;
15731
15732   ;
15733   return 0;
15734 }
15735 _ACEOF
15736 rm -f conftest.$ac_objext
15737 if { (eval echo "$as_me:15737: \"$ac_compile\"") >&5
15738   (eval $ac_compile) 2>&5
15739   ac_status=$?
15740   echo "$as_me:15740: \$? = $ac_status" >&5
15741   (exit $ac_status); } &&
15742          { ac_try='test -s conftest.$ac_objext'
15743   { (eval echo "$as_me:15743: \"$ac_try\"") >&5
15744   (eval $ac_try) 2>&5
15745   ac_status=$?
15746   echo "$as_me:15746: \$? = $ac_status" >&5
15747   (exit $ac_status); }; }; then
15748   cf_iostream_namespace=yes
15749 else
15750   echo "$as_me: failed program was:" >&5
15751 cat conftest.$ac_ext >&5
15752 cf_iostream_namespace=no
15753 fi
15754 rm -f conftest.$ac_objext conftest.$ac_ext
15755         echo "$as_me:15755: result: $cf_iostream_namespace" >&5
15756 echo "${ECHO_T}$cf_iostream_namespace" >&6
15757         if test "$cf_iostream_namespace" = yes ; then
15758             cat >>confdefs.h <<\EOF
15759 #define IOSTREAM_NAMESPACE 1
15760 EOF
15761
15762         fi
15763     fi
15764
15765 echo "$as_me:15765: checking if we should include stdbool.h" >&5
15766 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15767
15768 if test "${cf_cv_header_stdbool_h+set}" = set; then
15769   echo $ECHO_N "(cached) $ECHO_C" >&6
15770 else
15771
15772         cat >conftest.$ac_ext <<_ACEOF
15773 #line 15773 "configure"
15774 #include "confdefs.h"
15775
15776 int
15777 main ()
15778 {
15779 bool foo = false
15780   ;
15781   return 0;
15782 }
15783 _ACEOF
15784 rm -f conftest.$ac_objext
15785 if { (eval echo "$as_me:15785: \"$ac_compile\"") >&5
15786   (eval $ac_compile) 2>&5
15787   ac_status=$?
15788   echo "$as_me:15788: \$? = $ac_status" >&5
15789   (exit $ac_status); } &&
15790          { ac_try='test -s conftest.$ac_objext'
15791   { (eval echo "$as_me:15791: \"$ac_try\"") >&5
15792   (eval $ac_try) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); }; }; then
15796   cf_cv_header_stdbool_h=0
15797 else
15798   echo "$as_me: failed program was:" >&5
15799 cat conftest.$ac_ext >&5
15800 cat >conftest.$ac_ext <<_ACEOF
15801 #line 15801 "configure"
15802 #include "confdefs.h"
15803
15804 #ifndef __BEOS__
15805 #include <stdbool.h>
15806 #endif
15807
15808 int
15809 main ()
15810 {
15811 bool foo = false
15812   ;
15813   return 0;
15814 }
15815 _ACEOF
15816 rm -f conftest.$ac_objext
15817 if { (eval echo "$as_me:15817: \"$ac_compile\"") >&5
15818   (eval $ac_compile) 2>&5
15819   ac_status=$?
15820   echo "$as_me:15820: \$? = $ac_status" >&5
15821   (exit $ac_status); } &&
15822          { ac_try='test -s conftest.$ac_objext'
15823   { (eval echo "$as_me:15823: \"$ac_try\"") >&5
15824   (eval $ac_try) 2>&5
15825   ac_status=$?
15826   echo "$as_me:15826: \$? = $ac_status" >&5
15827   (exit $ac_status); }; }; then
15828   cf_cv_header_stdbool_h=1
15829 else
15830   echo "$as_me: failed program was:" >&5
15831 cat conftest.$ac_ext >&5
15832 cf_cv_header_stdbool_h=0
15833 fi
15834 rm -f conftest.$ac_objext conftest.$ac_ext
15835 fi
15836 rm -f conftest.$ac_objext conftest.$ac_ext
15837 fi
15838
15839 if test "$cf_cv_header_stdbool_h" = 1
15840 then    echo "$as_me:15840: result: yes" >&5
15841 echo "${ECHO_T}yes" >&6
15842 else    echo "$as_me:15842: result: no" >&5
15843 echo "${ECHO_T}no" >&6
15844 fi
15845
15846 echo "$as_me:15846: checking for builtin bool type" >&5
15847 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15848
15849 if test "${cf_cv_builtin_bool+set}" = set; then
15850   echo $ECHO_N "(cached) $ECHO_C" >&6
15851 else
15852
15853         cat >conftest.$ac_ext <<_ACEOF
15854 #line 15854 "configure"
15855 #include "confdefs.h"
15856
15857 #include <stdio.h>
15858 #include <sys/types.h>
15859
15860 int
15861 main ()
15862 {
15863 bool x = false
15864   ;
15865   return 0;
15866 }
15867 _ACEOF
15868 rm -f conftest.$ac_objext
15869 if { (eval echo "$as_me:15869: \"$ac_compile\"") >&5
15870   (eval $ac_compile) 2>&5
15871   ac_status=$?
15872   echo "$as_me:15872: \$? = $ac_status" >&5
15873   (exit $ac_status); } &&
15874          { ac_try='test -s conftest.$ac_objext'
15875   { (eval echo "$as_me:15875: \"$ac_try\"") >&5
15876   (eval $ac_try) 2>&5
15877   ac_status=$?
15878   echo "$as_me:15878: \$? = $ac_status" >&5
15879   (exit $ac_status); }; }; then
15880   cf_cv_builtin_bool=1
15881 else
15882   echo "$as_me: failed program was:" >&5
15883 cat conftest.$ac_ext >&5
15884 cf_cv_builtin_bool=0
15885 fi
15886 rm -f conftest.$ac_objext conftest.$ac_ext
15887
15888 fi
15889
15890 if test "$cf_cv_builtin_bool" = 1
15891 then    echo "$as_me:15891: result: yes" >&5
15892 echo "${ECHO_T}yes" >&6
15893 else    echo "$as_me:15893: result: no" >&5
15894 echo "${ECHO_T}no" >&6
15895 fi
15896
15897 echo "$as_me:15897: checking for size of bool" >&5
15898 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15899 if test "${cf_cv_type_of_bool+set}" = set; then
15900   echo $ECHO_N "(cached) $ECHO_C" >&6
15901 else
15902
15903         rm -f cf_test.out
15904         if test "$cross_compiling" = yes; then
15905   cf_cv_type_of_bool=unknown
15906 else
15907   cat >conftest.$ac_ext <<_ACEOF
15908 #line 15908 "configure"
15909 #include "confdefs.h"
15910
15911 #include <stdlib.h>
15912 #include <stdio.h>
15913
15914 #if defined(__cplusplus)
15915
15916 #ifdef HAVE_GXX_BUILTIN_H
15917 #include <g++/builtin.h>
15918 #elif HAVE_GPP_BUILTIN_H
15919 #include <gpp/builtin.h>
15920 #elif HAVE_BUILTIN_H
15921 #include <builtin.h>
15922 #endif
15923
15924 #else
15925
15926 #if $cf_cv_header_stdbool_h
15927 #include <stdbool.h>
15928 #endif
15929
15930 #endif
15931
15932 main()
15933 {
15934         FILE *fp = fopen("cf_test.out", "w");
15935         if (fp != 0) {
15936                 bool x = true;
15937                 if ((bool)(-x) >= 0)
15938                         fputs("unsigned ", fp);
15939                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15940                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15941                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15942                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15943                 fclose(fp);
15944         }
15945         ${cf_cv_main_return:-return}(0);
15946 }
15947
15948 _ACEOF
15949 rm -f conftest$ac_exeext
15950 if { (eval echo "$as_me:15950: \"$ac_link\"") >&5
15951   (eval $ac_link) 2>&5
15952   ac_status=$?
15953   echo "$as_me:15953: \$? = $ac_status" >&5
15954   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15955   { (eval echo "$as_me:15955: \"$ac_try\"") >&5
15956   (eval $ac_try) 2>&5
15957   ac_status=$?
15958   echo "$as_me:15958: \$? = $ac_status" >&5
15959   (exit $ac_status); }; }; then
15960   cf_cv_type_of_bool=`cat cf_test.out`
15961                  if test -z "$cf_cv_type_of_bool"; then
15962                    cf_cv_type_of_bool=unknown
15963                  fi
15964 else
15965   echo "$as_me: program exited with status $ac_status" >&5
15966 echo "$as_me: failed program was:" >&5
15967 cat conftest.$ac_ext >&5
15968 cf_cv_type_of_bool=unknown
15969 fi
15970 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15971 fi
15972
15973 fi
15974
15975         rm -f cf_test.out
15976 echo "$as_me:15976: result: $cf_cv_type_of_bool" >&5
15977 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15978 if test "$cf_cv_type_of_bool" = unknown ; then
15979         case .$NCURSES_BOOL in #(vi
15980         .auto|.) NCURSES_BOOL=unsigned;;
15981         esac
15982         { echo "$as_me:15982: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15983 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15984         cf_cv_type_of_bool=$NCURSES_BOOL
15985 fi
15986
15987 echo "$as_me:15987: checking for special defines needed for etip.h" >&5
15988 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15989 cf_save_CXXFLAGS="$CXXFLAGS"
15990 cf_result="none"
15991 for cf_math in "" MATH_H
15992 do
15993 for cf_excp in "" MATH_EXCEPTION
15994 do
15995         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15996         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15997         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15998 cat >conftest.$ac_ext <<_ACEOF
15999 #line 15999 "configure"
16000 #include "confdefs.h"
16001
16002 #include <etip.h.in>
16003
16004 int
16005 main ()
16006 {
16007
16008   ;
16009   return 0;
16010 }
16011 _ACEOF
16012 rm -f conftest.$ac_objext
16013 if { (eval echo "$as_me:16013: \"$ac_compile\"") >&5
16014   (eval $ac_compile) 2>&5
16015   ac_status=$?
16016   echo "$as_me:16016: \$? = $ac_status" >&5
16017   (exit $ac_status); } &&
16018          { ac_try='test -s conftest.$ac_objext'
16019   { (eval echo "$as_me:16019: \"$ac_try\"") >&5
16020   (eval $ac_try) 2>&5
16021   ac_status=$?
16022   echo "$as_me:16022: \$? = $ac_status" >&5
16023   (exit $ac_status); }; }; then
16024
16025         test -n "$cf_math" && cat >>confdefs.h <<EOF
16026 #define ETIP_NEEDS_${cf_math} 1
16027 EOF
16028
16029         test -n "$cf_excp" && cat >>confdefs.h <<EOF
16030 #define ETIP_NEEDS_${cf_excp} 1
16031 EOF
16032
16033         cf_result="$cf_math $cf_excp"
16034         break
16035
16036 else
16037   echo "$as_me: failed program was:" >&5
16038 cat conftest.$ac_ext >&5
16039 fi
16040 rm -f conftest.$ac_objext conftest.$ac_ext
16041 done
16042 done
16043 echo "$as_me:16043: result: $cf_result" >&5
16044 echo "${ECHO_T}$cf_result" >&6
16045 CXXFLAGS="$cf_save_CXXFLAGS"
16046
16047 if test -n "$CXX"; then
16048 echo "$as_me:16048: checking if $CXX accepts parameter initialization" >&5
16049 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
16050 if test "${cf_cv_cpp_param_init+set}" = set; then
16051   echo $ECHO_N "(cached) $ECHO_C" >&6
16052 else
16053
16054         ac_ext=cc
16055 ac_cpp='$CXXCPP $CPPFLAGS'
16056 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16057 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16058 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16059 ac_main_return=return
16060
16061         if test "$cross_compiling" = yes; then
16062   cf_cv_cpp_param_init=unknown
16063 else
16064   cat >conftest.$ac_ext <<_ACEOF
16065 #line 16065 "configure"
16066 #include "confdefs.h"
16067
16068 class TEST {
16069 private:
16070         int value;
16071 public:
16072         TEST(int x = 1);
16073         ~TEST();
16074 };
16075
16076 TEST::TEST(int x = 1)   // some compilers do not like second initializer
16077 {
16078         value = x;
16079 }
16080 void main() { }
16081
16082 _ACEOF
16083 rm -f conftest$ac_exeext
16084 if { (eval echo "$as_me:16084: \"$ac_link\"") >&5
16085   (eval $ac_link) 2>&5
16086   ac_status=$?
16087   echo "$as_me:16087: \$? = $ac_status" >&5
16088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16089   { (eval echo "$as_me:16089: \"$ac_try\"") >&5
16090   (eval $ac_try) 2>&5
16091   ac_status=$?
16092   echo "$as_me:16092: \$? = $ac_status" >&5
16093   (exit $ac_status); }; }; then
16094   cf_cv_cpp_param_init=yes
16095 else
16096   echo "$as_me: program exited with status $ac_status" >&5
16097 echo "$as_me: failed program was:" >&5
16098 cat conftest.$ac_ext >&5
16099 cf_cv_cpp_param_init=no
16100 fi
16101 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16102 fi
16103         ac_ext=cc
16104 ac_cpp='$CXXCPP $CPPFLAGS'
16105 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16106 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16107 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16108 ac_main_return=return
16109
16110 fi
16111 echo "$as_me:16111: result: $cf_cv_cpp_param_init" >&5
16112 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16113 fi
16114 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16115 #define CPP_HAS_PARAM_INIT 1
16116 EOF
16117
16118 if test -n "$CXX"; then
16119
16120 echo "$as_me:16120: checking if $CXX accepts static_cast" >&5
16121 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16122 if test "${cf_cv_cpp_static_cast+set}" = set; then
16123   echo $ECHO_N "(cached) $ECHO_C" >&6
16124 else
16125
16126         ac_ext=cc
16127 ac_cpp='$CXXCPP $CPPFLAGS'
16128 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16129 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16130 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16131 ac_main_return=return
16132
16133         cat >conftest.$ac_ext <<_ACEOF
16134 #line 16134 "configure"
16135 #include "confdefs.h"
16136
16137 class NCursesPanel
16138 {
16139 public:
16140   NCursesPanel(int nlines,
16141                int ncols,
16142                int begin_y = 0,
16143                int begin_x = 0)
16144   {
16145   }
16146
16147   ~NCursesPanel();
16148 };
16149
16150 template<class T> class NCursesUserPanel : public NCursesPanel
16151 {
16152 public:
16153   NCursesUserPanel (int nlines,
16154                     int ncols,
16155                     int begin_y = 0,
16156                     int begin_x = 0,
16157                     const T* p_UserData = static_cast<T*>(0))
16158     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16159   {
16160   };
16161   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16162   {
16163   };
16164
16165   virtual ~NCursesUserPanel() {};
16166 };
16167
16168 int
16169 main ()
16170 {
16171
16172         const char* p_UserData = static_cast<char*>(0)
16173   ;
16174   return 0;
16175 }
16176 _ACEOF
16177 rm -f conftest.$ac_objext
16178 if { (eval echo "$as_me:16178: \"$ac_compile\"") >&5
16179   (eval $ac_compile) 2>&5
16180   ac_status=$?
16181   echo "$as_me:16181: \$? = $ac_status" >&5
16182   (exit $ac_status); } &&
16183          { ac_try='test -s conftest.$ac_objext'
16184   { (eval echo "$as_me:16184: \"$ac_try\"") >&5
16185   (eval $ac_try) 2>&5
16186   ac_status=$?
16187   echo "$as_me:16187: \$? = $ac_status" >&5
16188   (exit $ac_status); }; }; then
16189   cf_cv_cpp_static_cast=yes
16190 else
16191   echo "$as_me: failed program was:" >&5
16192 cat conftest.$ac_ext >&5
16193 cf_cv_cpp_static_cast=no
16194 fi
16195 rm -f conftest.$ac_objext conftest.$ac_ext
16196
16197         ac_ext=cc
16198 ac_cpp='$CXXCPP $CPPFLAGS'
16199 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16200 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16201 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16202 ac_main_return=return
16203
16204 fi
16205 echo "$as_me:16205: result: $cf_cv_cpp_static_cast" >&5
16206 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16207
16208 fi
16209
16210 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16211 #define CPP_HAS_STATIC_CAST 1
16212 EOF
16213
16214         CXX_AR='$(AR)'
16215         CXX_ARFLAGS='$(ARFLAGS)'
16216         case $cf_cv_system_name in #(vi
16217         irix*) #(vi
16218             if test "$GXX" != yes ; then
16219                 CXX_AR='$(CXX)'
16220                 CXX_ARFLAGS='-ar -o'
16221             fi
16222             ;;
16223         sco3.2v5*) #(vi
16224             CXXLDFLAGS="-u main"
16225             ;;
16226         solaris2*)
16227             if test "$GXX" != yes ; then
16228                 CXX_AR='$(CXX)'
16229                 CXX_ARFLAGS='-xar -o'
16230             fi
16231             ;;
16232         esac
16233
16234 else
16235         cf_cxx_library=no
16236         cf_cv_builtin_bool=1
16237
16238         # Just because we are not configuring against C++ right now does not
16239         # mean that a user will not want to use C++.  Some distributors disable
16240         # the C++ portion of this configuration as a shortcut (or just to avoid
16241         # compiling the demo in the c++ directory).  So we need a reasonable
16242         # default for the 'bool' type.
16243         #
16244         # Caveat: since the storage of the bool type is not standardized, it
16245         # may change.
16246
16247         if test "$NCURSES_BOOL" != auto ; then
16248                 cf_cv_type_of_bool=$NCURSES_BOOL
16249                 cf_cv_header_stdbool_h=0
16250         else
16251                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16252
16253 echo "$as_me:16253: checking for size of bool" >&5
16254 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16255 if test "${cf_cv_type_of_bool+set}" = set; then
16256   echo $ECHO_N "(cached) $ECHO_C" >&6
16257 else
16258
16259         rm -f cf_test.out
16260         if test "$cross_compiling" = yes; then
16261   cf_cv_type_of_bool=unknown
16262 else
16263   cat >conftest.$ac_ext <<_ACEOF
16264 #line 16264 "configure"
16265 #include "confdefs.h"
16266
16267 #include <stdlib.h>
16268 #include <stdio.h>
16269
16270 #if defined(__cplusplus)
16271
16272 #ifdef HAVE_GXX_BUILTIN_H
16273 #include <g++/builtin.h>
16274 #elif HAVE_GPP_BUILTIN_H
16275 #include <gpp/builtin.h>
16276 #elif HAVE_BUILTIN_H
16277 #include <builtin.h>
16278 #endif
16279
16280 #else
16281
16282 #if $cf_cv_header_stdbool_h
16283 #include <stdbool.h>
16284 #endif
16285
16286 #endif
16287
16288 main()
16289 {
16290         FILE *fp = fopen("cf_test.out", "w");
16291         if (fp != 0) {
16292                 bool x = true;
16293                 if ((bool)(-x) >= 0)
16294                         fputs("unsigned ", fp);
16295                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16296                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16297                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16298                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16299                 fclose(fp);
16300         }
16301         ${cf_cv_main_return:-return}(0);
16302 }
16303
16304 _ACEOF
16305 rm -f conftest$ac_exeext
16306 if { (eval echo "$as_me:16306: \"$ac_link\"") >&5
16307   (eval $ac_link) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16311   { (eval echo "$as_me:16311: \"$ac_try\"") >&5
16312   (eval $ac_try) 2>&5
16313   ac_status=$?
16314   echo "$as_me:16314: \$? = $ac_status" >&5
16315   (exit $ac_status); }; }; then
16316   cf_cv_type_of_bool=`cat cf_test.out`
16317                  if test -z "$cf_cv_type_of_bool"; then
16318                    cf_cv_type_of_bool=unknown
16319                  fi
16320 else
16321   echo "$as_me: program exited with status $ac_status" >&5
16322 echo "$as_me: failed program was:" >&5
16323 cat conftest.$ac_ext >&5
16324 cf_cv_type_of_bool=unknown
16325 fi
16326 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16327 fi
16328
16329 fi
16330
16331         rm -f cf_test.out
16332 echo "$as_me:16332: result: $cf_cv_type_of_bool" >&5
16333 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16334 if test "$cf_cv_type_of_bool" = unknown ; then
16335         case .$NCURSES_BOOL in #(vi
16336         .auto|.) NCURSES_BOOL=unsigned;;
16337         esac
16338         { echo "$as_me:16338: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16339 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16340         cf_cv_type_of_bool=$NCURSES_BOOL
16341 fi
16342
16343                 else
16344                         echo "$as_me:16344: checking for fallback type of bool" >&5
16345 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16346                         case "$host_cpu" in #(vi
16347                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16348                         *)      cf_cv_type_of_bool=int  ;;
16349                         esac
16350                         echo "$as_me:16350: result: $cf_cv_type_of_bool" >&5
16351 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16352                 fi
16353         fi
16354 fi
16355
16356 # If the C compiler did not declare bool, and we did not determine that the C++
16357 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16358 # ncurses library use the same type as C++ bool.  Note that this allows one to
16359 # specify the type of bool in a configure-script option and postpone
16360 # integration with the C++ compiler provided that the types are compatible.
16361 USE_CXX_BOOL=1
16362 if test $cf_cv_cc_bool_type = 1
16363 then
16364         # oops: C has a bool.  Unlikely, but C++ could differ.
16365         USE_CXX_BOOL=0
16366 elif test $cf_cv_builtin_bool = 0
16367 then
16368         # C++ has no bool
16369         USE_CXX_BOOL=0
16370 else
16371         # this is the normal case
16372         USE_CXX_BOOL='defined(__cplusplus)'
16373 fi
16374
16375 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16376
16377 if test "$cf_with_ada" != "no" ; then
16378     if test "$with_libtool" != "no"; then
16379         { echo "$as_me:16379: WARNING: libtool does not support Ada - disabling feature" >&5
16380 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16381         cf_with_ada=no
16382     fi
16383 fi
16384
16385 if test "$cf_with_ada" != "no" ; then
16386 cf_ada_make=gnatmake
16387 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16388 set dummy $cf_ada_make; ac_word=$2
16389 echo "$as_me:16389: checking for $ac_word" >&5
16390 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16391 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16392   echo $ECHO_N "(cached) $ECHO_C" >&6
16393 else
16394   if test -n "$gnat_exists"; then
16395   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16396 else
16397   ac_save_IFS=$IFS; IFS=$ac_path_separator
16398 ac_dummy="$PATH"
16399 for ac_dir in $ac_dummy; do
16400   IFS=$ac_save_IFS
16401   test -z "$ac_dir" && ac_dir=.
16402   $as_executable_p "$ac_dir/$ac_word" || continue
16403 ac_cv_prog_gnat_exists="yes"
16404 echo "$as_me:16404: found $ac_dir/$ac_word" >&5
16405 break
16406 done
16407
16408   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16409 fi
16410 fi
16411 gnat_exists=$ac_cv_prog_gnat_exists
16412 if test -n "$gnat_exists"; then
16413   echo "$as_me:16413: result: $gnat_exists" >&5
16414 echo "${ECHO_T}$gnat_exists" >&6
16415 else
16416   echo "$as_me:16416: result: no" >&5
16417 echo "${ECHO_T}no" >&6
16418 fi
16419
16420 if test "$ac_cv_prog_gnat_exists" = no; then
16421    cf_ada_make=
16422 else
16423
16424 echo "$as_me:16424: checking for gnat version" >&5
16425 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16426 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16427   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16428 echo "$as_me:16428: result: $cf_gnat_version" >&5
16429 echo "${ECHO_T}$cf_gnat_version" >&6
16430
16431 case $cf_gnat_version in
16432   3.1[1-9]*|3.[2-9]*|[4-9].*)
16433     cf_cv_prog_gnat_correct=yes
16434     ;;
16435   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16436      cf_cv_prog_gnat_correct=no
16437      ;;
16438 esac
16439 case $cf_gnat_version in
16440   3.[1-9]*|[4-9].*)
16441       cf_compile_generics=generics
16442       cf_generic_objects="\${GENOBJS}"
16443       ;;
16444   *)  cf_compile_generics=
16445       cf_generic_objects=
16446       ;;
16447 esac
16448
16449    # Extract the first word of "m4", so it can be a program name with args.
16450 set dummy m4; ac_word=$2
16451 echo "$as_me:16451: checking for $ac_word" >&5
16452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16453 if test "${ac_cv_prog_M4_exists+set}" = set; then
16454   echo $ECHO_N "(cached) $ECHO_C" >&6
16455 else
16456   if test -n "$M4_exists"; then
16457   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16458 else
16459   ac_save_IFS=$IFS; IFS=$ac_path_separator
16460 ac_dummy="$PATH"
16461 for ac_dir in $ac_dummy; do
16462   IFS=$ac_save_IFS
16463   test -z "$ac_dir" && ac_dir=.
16464   $as_executable_p "$ac_dir/$ac_word" || continue
16465 ac_cv_prog_M4_exists="yes"
16466 echo "$as_me:16466: found $ac_dir/$ac_word" >&5
16467 break
16468 done
16469
16470   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16471 fi
16472 fi
16473 M4_exists=$ac_cv_prog_M4_exists
16474 if test -n "$M4_exists"; then
16475   echo "$as_me:16475: result: $M4_exists" >&5
16476 echo "${ECHO_T}$M4_exists" >&6
16477 else
16478   echo "$as_me:16478: result: no" >&5
16479 echo "${ECHO_T}no" >&6
16480 fi
16481
16482    if test "$ac_cv_prog_M4_exists" = no; then
16483       cf_cv_prog_gnat_correct=no
16484       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16485    fi
16486    if test "$cf_cv_prog_gnat_correct" = yes; then
16487       echo "$as_me:16487: checking if GNAT works" >&5
16488 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16489
16490 rm -f conftest*
16491 cat >>conftest.ads <<CF_EOF
16492 procedure conftest;
16493 CF_EOF
16494 cat >>conftest.adb <<CF_EOF
16495 with Text_IO;
16496 with GNAT.OS_Lib;
16497 procedure conftest is
16498 begin
16499    Text_IO.Put ("Hello World");
16500    Text_IO.New_Line;
16501    GNAT.OS_Lib.OS_Exit (0);
16502 end conftest;
16503 CF_EOF
16504 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16505    if ( ./conftest 1>&5 2>&1 ) ; then
16506       cf_cv_prog_gnat_correct=yes
16507    else
16508       cf_cv_prog_gnat_correct=no
16509    fi
16510 else
16511    cf_cv_prog_gnat_correct=no
16512 fi
16513 rm -f conftest*
16514
16515       echo "$as_me:16515: result: $cf_cv_prog_gnat_correct" >&5
16516 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16517    fi
16518 fi
16519 if test "$cf_cv_prog_gnat_correct" = yes; then
16520    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16521
16522    echo "$as_me:16522: checking if GNAT pragma Unreferenced works" >&5
16523 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16524
16525 rm -f conftest*
16526 cat >>conftest.ads <<CF_EOF
16527 procedure conftest;
16528 CF_EOF
16529 cat >>conftest.adb <<CF_EOF
16530 with Text_IO;
16531 with GNAT.OS_Lib;
16532 procedure conftest is
16533    test : Integer;
16534    pragma Unreferenced (test);
16535 begin
16536    test := 1;
16537    Text_IO.Put ("Hello World");
16538    Text_IO.New_Line;
16539    GNAT.OS_Lib.OS_Exit (0);
16540 end conftest;
16541 CF_EOF
16542 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16543       cf_cv_pragma_unreferenced=yes
16544 else
16545    cf_cv_pragma_unreferenced=no
16546 fi
16547 rm -f conftest*
16548
16549    echo "$as_me:16549: result: $cf_cv_pragma_unreferenced" >&5
16550 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16551
16552    # if the pragma is supported, use it (needed in the Trace code).
16553    if test $cf_cv_pragma_unreferenced = yes ; then
16554       PRAGMA_UNREF=TRUE
16555    else
16556       PRAGMA_UNREF=FALSE
16557    fi
16558
16559 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16560 if test "${with_ada_compiler+set}" = set; then
16561   withval="$with_ada_compiler"
16562   cf_ada_compiler=$withval
16563 else
16564   cf_ada_compiler=gnatmake
16565 fi;
16566
16567    cf_ada_package=terminal_interface
16568
16569 # Check whether --with-ada-include or --without-ada-include was given.
16570 if test "${with_ada_include+set}" = set; then
16571   withval="$with_ada_include"
16572
16573 else
16574   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16575 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16576
16577 if test "x$prefix" != xNONE; then
16578   cf_path_syntax="$prefix"
16579 else
16580   cf_path_syntax="$ac_default_prefix"
16581 fi
16582
16583 case ".$withval" in #(vi
16584 .\$\(*\)*|.\'*\'*) #(vi
16585   ;;
16586 ..|./*|.\\*) #(vi
16587   ;;
16588 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16589   ;;
16590 .\${*prefix}*) #(vi
16591   eval withval="$withval"
16592   case ".$withval" in #(vi
16593   .NONE/*)
16594     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16595     ;;
16596   esac
16597   ;; #(vi
16598 .no|.NONE/*)
16599   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16600   ;;
16601 *)
16602   { { echo "$as_me:16602: error: expected a pathname, not \"$withval\"" >&5
16603 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16604    { (exit 1); exit 1; }; }
16605   ;;
16606 esac
16607
16608 fi
16609 ADA_INCLUDE="$withval"
16610
16611 # Check whether --with-ada-objects or --without-ada-objects was given.
16612 if test "${with_ada_objects+set}" = set; then
16613   withval="$with_ada_objects"
16614
16615 else
16616   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16617 fi; if test -n "$prefix/lib/ada/adalib" ; then
16618
16619 if test "x$prefix" != xNONE; then
16620   cf_path_syntax="$prefix"
16621 else
16622   cf_path_syntax="$ac_default_prefix"
16623 fi
16624
16625 case ".$withval" in #(vi
16626 .\$\(*\)*|.\'*\'*) #(vi
16627   ;;
16628 ..|./*|.\\*) #(vi
16629   ;;
16630 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16631   ;;
16632 .\${*prefix}*) #(vi
16633   eval withval="$withval"
16634   case ".$withval" in #(vi
16635   .NONE/*)
16636     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16637     ;;
16638   esac
16639   ;; #(vi
16640 .no|.NONE/*)
16641   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16642   ;;
16643 *)
16644   { { echo "$as_me:16644: error: expected a pathname, not \"$withval\"" >&5
16645 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16646    { (exit 1); exit 1; }; }
16647   ;;
16648 esac
16649
16650 fi
16651 ADA_OBJECTS="$withval"
16652
16653 fi
16654 fi
16655 else
16656    cf_with_ada=no
16657 fi
16658
16659 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16660 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16661 ###
16662 ### ticlib modules may be a separate library, otherwise contained in termlib.
16663 ### termlib modules may be a separate library, otherwise contained in ncurses.
16664 ###
16665 ### The of "+" or " " between the tokens controls the way the script
16666 ### chooses to split module lists into libraries.
16667 ###
16668 ### (see CF_LIB_RULES).
16669 echo "$as_me:16669: checking for library subsets" >&5
16670 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16671 LIB_SUBSETS=
16672
16673 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16674         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16675         if test "$with_ticlib" != no ; then
16676                 LIB_SUBSETS="${LIB_SUBSETS} "
16677         else
16678                 LIB_SUBSETS="${LIB_SUBSETS}+"
16679         fi
16680 fi
16681
16682 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16683 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16684
16685 if test "$with_termlib" != no ; then
16686         LIB_SUBSETS="${LIB_SUBSETS} "
16687 else
16688         LIB_SUBSETS="${LIB_SUBSETS}+"
16689 fi
16690
16691 LIB_SUBSETS="${LIB_SUBSETS}base"
16692
16693 # Most term-driver calls are to tinfo, but some like init_pair are to the
16694 # base library (so it resides in base).
16695 if test "$with_term_driver" != no ; then
16696         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
16697         case $cf_cv_system_name in #(vi
16698         *mingw32*) #(vi
16699                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16700                 ;;
16701         *) #(vi
16702                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16703                 ;;
16704         esac
16705 fi
16706
16707 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16708 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16709
16710 echo "$as_me:16710: result: $LIB_SUBSETS" >&5
16711 echo "${ECHO_T}$LIB_SUBSETS" >&6
16712
16713 ### Construct the list of include-directories to be generated
16714
16715 CPPFLAGS="$CPPFLAGS -I. -I../include"
16716 if test "$srcdir" != "."; then
16717         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16718 fi
16719 if test "$GCC" != yes; then
16720         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16721 elif test "$includedir" != "/usr/include"; then
16722         if test "$includedir" = '${prefix}/include' ; then
16723                 if test $prefix != /usr ; then
16724                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16725                 fi
16726         else
16727                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16728         fi
16729 fi
16730
16731 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16732 if test "$srcdir" != "."; then
16733         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16734 fi
16735 if test "$GCC" != yes; then
16736         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16737 elif test "$includedir" != "/usr/include"; then
16738         if test "$includedir" = '${prefix}/include' ; then
16739                 if test $prefix != /usr ; then
16740                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16741                 fi
16742         else
16743                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16744         fi
16745 fi
16746
16747 ### Build up pieces for makefile rules
16748 echo "$as_me:16748: checking default library suffix" >&5
16749 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16750
16751         case $DFT_LWR_MODEL in
16752         libtool) DFT_ARG_SUFFIX=''   ;;
16753         normal)  DFT_ARG_SUFFIX=''   ;;
16754         debug)   DFT_ARG_SUFFIX='_g' ;;
16755         profile) DFT_ARG_SUFFIX='_p' ;;
16756         shared)  DFT_ARG_SUFFIX=''   ;;
16757         esac
16758         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16759 echo "$as_me:16759: result: $DFT_ARG_SUFFIX" >&5
16760 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16761
16762 echo "$as_me:16762: checking default library-dependency suffix" >&5
16763 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16764
16765         case $DFT_LWR_MODEL in #(vi
16766         libtool) #(vi
16767                 DFT_LIB_SUFFIX='.la'
16768                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16769                 ;;
16770         normal) #(vi
16771                 DFT_LIB_SUFFIX='.a'
16772                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16773                 ;;
16774         debug) #(vi
16775                 DFT_LIB_SUFFIX='_g.a'
16776                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16777                 ;;
16778         profile) #(vi
16779                 DFT_LIB_SUFFIX='_p.a'
16780                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16781                 ;;
16782         shared) #(vi
16783                 case $cf_cv_system_name in
16784                 aix[56]*) #(vi
16785                         DFT_LIB_SUFFIX='.a'
16786                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16787                         ;;
16788                 cygwin*) #(vi
16789                         DFT_LIB_SUFFIX='.dll'
16790                         DFT_DEP_SUFFIX='.dll.a'
16791                         ;;
16792                 darwin*) #(vi
16793                         DFT_LIB_SUFFIX='.dylib'
16794                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16795                         ;;
16796                 hpux*) #(vi
16797                         case $target in
16798                         ia64*) #(vi
16799                                 DFT_LIB_SUFFIX='.so'
16800                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16801                                 ;;
16802                         *) #(vi
16803                                 DFT_LIB_SUFFIX='.sl'
16804                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16805                                 ;;
16806                         esac
16807                         ;;
16808                 *)      DFT_LIB_SUFFIX='.so'
16809                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16810                         ;;
16811                 esac
16812         esac
16813         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16814         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16815 echo "$as_me:16815: result: $DFT_DEP_SUFFIX" >&5
16816 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16817
16818 echo "$as_me:16818: checking default object directory" >&5
16819 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16820
16821         case $DFT_LWR_MODEL in
16822         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16823         normal)  DFT_OBJ_SUBDIR='objects' ;;
16824         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16825         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16826         shared)
16827                 case $cf_cv_system_name in #(vi
16828                 cygwin) #(vi
16829                         DFT_OBJ_SUBDIR='objects' ;;
16830                 *)
16831                         DFT_OBJ_SUBDIR='obj_s' ;;
16832                 esac
16833         esac
16834 echo "$as_me:16834: result: $DFT_OBJ_SUBDIR" >&5
16835 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16836
16837 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16838 if test "$cf_with_cxx" = yes ; then
16839 echo "$as_me:16839: checking c++ library-dependency suffix" >&5
16840 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16841 if test "$with_libtool" != "no"; then
16842         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16843 else
16844
16845         case normal in #(vi
16846         libtool) #(vi
16847                 CXX_LIB_SUFFIX='.la'
16848                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16849                 ;;
16850         normal) #(vi
16851                 CXX_LIB_SUFFIX='.a'
16852                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16853                 ;;
16854         debug) #(vi
16855                 CXX_LIB_SUFFIX='_g.a'
16856                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16857                 ;;
16858         profile) #(vi
16859                 CXX_LIB_SUFFIX='_p.a'
16860                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16861                 ;;
16862         shared) #(vi
16863                 case $cf_cv_system_name in
16864                 aix[56]*) #(vi
16865                         CXX_LIB_SUFFIX='.a'
16866                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16867                         ;;
16868                 cygwin*) #(vi
16869                         CXX_LIB_SUFFIX='.dll'
16870                         CXX_DEP_SUFFIX='.dll.a'
16871                         ;;
16872                 darwin*) #(vi
16873                         CXX_LIB_SUFFIX='.dylib'
16874                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16875                         ;;
16876                 hpux*) #(vi
16877                         case $target in
16878                         ia64*) #(vi
16879                                 CXX_LIB_SUFFIX='.so'
16880                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16881                                 ;;
16882                         *) #(vi
16883                                 CXX_LIB_SUFFIX='.sl'
16884                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16885                                 ;;
16886                         esac
16887                         ;;
16888                 *)      CXX_LIB_SUFFIX='.so'
16889                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16890                         ;;
16891                 esac
16892         esac
16893         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16894         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16895 fi
16896 echo "$as_me:16896: result: $CXX_LIB_SUFFIX" >&5
16897 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16898
16899 fi
16900
16901 # do not want -ldl in build except as needed for -lncurses dependency
16902 if test "$with_dlsym" = yes ; then
16903 if test $DFT_LWR_MODEL = shared || \
16904    test $DFT_LWR_MODEL = libtool ; then
16905
16906 # remove dl library from $LIBS
16907 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16908
16909 fi
16910 fi
16911 ### Set up low-level terminfo dependencies for makefiles.
16912
16913 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16914 # do not need libdl
16915 TICS_LIST=
16916 if test "$with_dlsym" = yes ; then
16917
16918 # remove dl library from $SHLIB_LIST
16919 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16920
16921 fi
16922
16923 if test "$with_ticlib" != no ; then
16924
16925         if test "$with_ticlib" != yes ; then
16926                 TICS_NAME=$with_ticlib
16927                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16928                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16929                 TICS_LIB_SUFFIX="${with_ticlib}"
16930         else
16931                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16932                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16933                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16934         fi
16935         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16936 else
16937         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16938 fi
16939
16940 if test "$with_termlib" != no ; then
16941
16942         if test "$with_termlib" != yes ; then
16943                 TINFO_NAME=$with_termlib
16944                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16945                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16946                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16947                 TINFO_LIB_SUFFIX="${with_termlib}"
16948         else
16949                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16950                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16951                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16952                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16953         fi
16954
16955         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16956         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16957         if test "$DFT_LWR_MODEL" = "libtool"; then
16958                 TEST_ARGS="${TEST_DEPS}"
16959                 TEST_ARG2="${TEST_DEP2}"
16960                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16961                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
16962                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
16963         else
16964                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16965                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16966                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16967                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16968                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16969         fi
16970 else
16971         # the next lines are needed for linking libtic over libncurses
16972         TINFO_NAME=${LIB_NAME}
16973         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16974         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16975         if test "$with_tic_depends" = yes ; then
16976                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16977         else
16978                 TICS_LIST="$SHLIB_LIST"
16979         fi
16980
16981         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16982 fi
16983
16984 if test "$DFT_LWR_MODEL" = shared ; then
16985         case $cf_cv_system_name in #(vi
16986         cygwin*)
16987                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16988                 TINFO_SUFFIX=.dll
16989                 ;;
16990         esac
16991 fi
16992
16993 if test "$with_dlsym" = yes ; then
16994
16995 # remove dl library from $TICS_LIST
16996 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16997
16998 fi
16999
17000 if test "$DFT_LWR_MODEL" = "libtool"; then
17001     OBJEXT=lo
17002 fi
17003
17004 # needed for Ada95
17005 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
17006
17007 case $DFT_LWR_MODEL in
17008 normal|debug|profile)
17009
17010 if test "$GCC" = yes ; then
17011         case $cf_cv_system_name in #(
17012         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
17013                 LDFLAGS_STATIC=
17014                 LDFLAGS_SHARED=
17015                 ;;
17016     *)  #( normally, except when broken
17017         LDFLAGS_STATIC=-static
17018         LDFLAGS_SHARED=-dynamic
17019         ;;
17020     esac
17021 else
17022         case $cf_cv_system_name in #(
17023         aix[456]*)      #( from ld manpage
17024                 LDFLAGS_STATIC=-bstatic
17025                 LDFLAGS_SHARED=-bdynamic
17026                 ;;
17027         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
17028                 # We could also use just "archive" and "shared".
17029                 LDFLAGS_STATIC=-Wl,-a,archive_shared
17030                 LDFLAGS_SHARED=-Wl,-a,shared_archive
17031                 ;;
17032         irix*)          #( from ld manpage IRIX64
17033                 LDFLAGS_STATIC=-Bstatic
17034                 LDFLAGS_SHARED=-Bdynamic
17035                 ;;
17036         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
17037                 # alternative "-oldstyle_liblookup" (not in cc manpage)
17038                 LDFLAGS_STATIC=-noso
17039                 LDFLAGS_SHARED=-so_archive
17040                 ;;
17041         solaris2*)
17042                 LDFLAGS_STATIC=-Bstatic
17043                 LDFLAGS_SHARED=-Bdynamic
17044                 ;;
17045         esac
17046 fi
17047
17048         ;;
17049 esac
17050
17051 echo "$as_me:17051: checking where we will install curses.h" >&5
17052 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
17053 test "$with_overwrite" = no && \
17054 test "x$includedir" = 'x${prefix}/include' && \
17055         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
17056 echo "$as_me:17056: result: $includedir" >&5
17057 echo "${ECHO_T}$includedir" >&6
17058
17059 ### Resolve a conflict between normal and wide-curses by forcing applications
17060 ### that will need libutf8 to add it to their configure script.
17061 if test "$with_overwrite" != no ; then
17062 if test "$NCURSES_LIBUTF8" = 1 ; then
17063         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
17064         { echo "$as_me:17064: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
17065 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
17066 fi
17067 fi
17068 WITH_OVERWRITE=$with_overwrite
17069
17070 # used to separate tack out of the tree
17071 NCURSES_TREE=
17072
17073 ### predefined stuff for the test programs
17074 cat >>confdefs.h <<\EOF
17075 #define HAVE_SLK_COLOR 1
17076 EOF
17077
17078 ### Construct the list of subdirectories for which we'll customize makefiles
17079 ### with the appropriate compile-rules.
17080
17081 echo "$as_me:17081: checking for src modules" >&5
17082 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
17083
17084 # dependencies and linker-arguments for test-programs
17085 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
17086 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
17087 if test "$DFT_LWR_MODEL" = "libtool"; then
17088         TEST_ARGS="${TEST_DEPS}"
17089         TEST_ARG2="${TEST_DEP2}"
17090 else
17091         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
17092         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
17093 fi
17094
17095 cf_cv_src_modules=
17096 for cf_dir in $modules_to_build
17097 do
17098         if test -f $srcdir/$cf_dir/modules; then
17099
17100                 # We may/may not have tack in the distribution, though the
17101                 # makefile is.
17102                 if test $cf_dir = tack ; then
17103                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17104                                 continue
17105                         fi
17106                 fi
17107
17108                 if test -z "$cf_cv_src_modules"; then
17109                         cf_cv_src_modules=$cf_dir
17110                 else
17111                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17112                 fi
17113
17114                 # Make the ncurses_cfg.h file record the library interface files as
17115                 # well.  These are header files that are the same name as their
17116                 # directory.  Ncurses is the only library that does not follow
17117                 # that pattern.
17118                 if test $cf_dir = tack ; then
17119                         continue
17120                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17121
17122 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17123
17124                         cat >>confdefs.h <<EOF
17125 #define HAVE_${cf_have_include}_H 1
17126 EOF
17127
17128                         cat >>confdefs.h <<EOF
17129 #define HAVE_LIB${cf_have_include} 1
17130 EOF
17131
17132                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17133                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17134                         if test "$DFT_LWR_MODEL" = "libtool"; then
17135                                 TEST_ARGS="${TEST_DEPS}"
17136                                 TEST_ARG2="${TEST_DEP2}"
17137                         else
17138                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17139                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17140                         fi
17141                 fi
17142         fi
17143 done
17144 echo "$as_me:17144: result: $cf_cv_src_modules" >&5
17145 echo "${ECHO_T}$cf_cv_src_modules" >&6
17146
17147 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17148 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17149
17150 SRC_SUBDIRS=
17151 if test "x$cf_with_manpages" != xno ; then
17152         SRC_SUBDIRS="$SRC_SUBDIRS man"
17153 fi
17154 SRC_SUBDIRS="$SRC_SUBDIRS include"
17155 for cf_dir in $cf_cv_src_modules
17156 do
17157         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17158 done
17159 SRC_SUBDIRS="$SRC_SUBDIRS test"
17160 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17161 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17162
17163 ADA_SUBDIRS=
17164 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17165         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17166         ADA_SUBDIRS="gen src samples"
17167 fi
17168
17169 SUB_MAKEFILES=
17170 for cf_dir in $SRC_SUBDIRS
17171 do
17172         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17173 done
17174
17175 if test -n "$ADA_SUBDIRS"; then
17176         for cf_dir in $ADA_SUBDIRS
17177         do
17178                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17179         done
17180
17181 fi
17182
17183 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17184    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17185 fi
17186
17187 DIRS_TO_MAKE="lib"
17188 for cf_item in $cf_list_models
17189 do
17190
17191         case $cf_item in
17192         libtool) cf_subdir='obj_lo'  ;;
17193         normal)  cf_subdir='objects' ;;
17194         debug)   cf_subdir='obj_g' ;;
17195         profile) cf_subdir='obj_p' ;;
17196         shared)
17197                 case $cf_cv_system_name in #(vi
17198                 cygwin) #(vi
17199                         cf_subdir='objects' ;;
17200                 *)
17201                         cf_subdir='obj_s' ;;
17202                 esac
17203         esac
17204
17205         for cf_item2 in $DIRS_TO_MAKE
17206         do
17207                 test $cf_item2 = $cf_subdir && break
17208         done
17209         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17210 done
17211 for cf_dir in $DIRS_TO_MAKE
17212 do
17213         test ! -d $cf_dir && mkdir $cf_dir
17214 done
17215
17216 cat >>confdefs.h <<EOF
17217 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17218 EOF
17219
17220 cat >>confdefs.h <<EOF
17221 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17222 EOF
17223
17224 ### Now that we're done running tests, add the compiler-warnings, if any
17225
17226 cf_fix_cppflags=no
17227 cf_new_cflags=
17228 cf_new_cppflags=
17229 cf_new_extra_cppflags=
17230
17231 for cf_add_cflags in $EXTRA_CFLAGS
17232 do
17233 case $cf_fix_cppflags in
17234 no)
17235         case $cf_add_cflags in #(vi
17236         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17237                 case $cf_add_cflags in
17238                 -D*)
17239                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17240
17241                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17242                         && test -z "${cf_tst_cflags}" \
17243                         && cf_fix_cppflags=yes
17244
17245                         if test $cf_fix_cppflags = yes ; then
17246                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17247                                 continue
17248                         elif test "${cf_tst_cflags}" = "\"'" ; then
17249                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17250                                 continue
17251                         fi
17252                         ;;
17253                 esac
17254                 case "$CPPFLAGS" in
17255                 *$cf_add_cflags) #(vi
17256                         ;;
17257                 *) #(vi
17258                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17259                         ;;
17260                 esac
17261                 ;;
17262         *)
17263                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17264                 ;;
17265         esac
17266         ;;
17267 yes)
17268         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17269
17270         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17271
17272         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17273         && test -z "${cf_tst_cflags}" \
17274         && cf_fix_cppflags=no
17275         ;;
17276 esac
17277 done
17278
17279 if test -n "$cf_new_cflags" ; then
17280
17281         CFLAGS="$CFLAGS $cf_new_cflags"
17282 fi
17283
17284 if test -n "$cf_new_cppflags" ; then
17285
17286         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17287 fi
17288
17289 if test -n "$cf_new_extra_cppflags" ; then
17290
17291         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17292 fi
17293
17294 ### If we're building with rpath, try to link non-standard libs that way too.
17295 if test "$DFT_LWR_MODEL" = "shared"; then
17296
17297 echo "$as_me:17297: checking for updated LDFLAGS" >&5
17298 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17299 if test -n "$LDFLAGS" ; then
17300 echo "$as_me:17300: result: maybe" >&5
17301 echo "${ECHO_T}maybe" >&6
17302 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17303
17304 echo "${as_me-configure}:17304: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17305
17306 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17307
17308 echo "${as_me-configure}:17308: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17309
17310 case "$EXTRA_LDFLAGS" in #(vi
17311 -Wl,-rpath,*) #(vi
17312         cf_rpath_hack="-Wl,-rpath,"
17313         ;;
17314 -R\ *)
17315         cf_rpath_hack="-R "
17316         ;;
17317 -R*)
17318         cf_rpath_hack="-R"
17319         ;;
17320 *)
17321         cf_rpath_hack=
17322         ;;
17323 esac
17324 if test -n "$cf_rpath_hack" ; then
17325         cf_rpath_dst=
17326         for cf_rpath_src in $LDFLAGS
17327         do
17328                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17329
17330 echo "${as_me-configure}:17330: testing Filtering $cf_rpath_src ..." 1>&5
17331
17332                 case $cf_rpath_src in #(vi
17333                 -L*) #(vi
17334                         if test "$cf_rpath_hack" = "-R " ; then
17335                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17336                         else
17337                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17338                         fi
17339                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17340
17341 echo "${as_me-configure}:17341: testing ...Filter $cf_rpath_tmp ..." 1>&5
17342
17343                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17344                         ;;
17345                 esac
17346                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17347         done
17348         LDFLAGS=$cf_rpath_dst
17349         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17350
17351 echo "${as_me-configure}:17351: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17352
17353         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17354
17355 echo "${as_me-configure}:17355: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17356
17357 fi
17358 else
17359 echo "$as_me:17359: result: no" >&5
17360 echo "${ECHO_T}no" >&6
17361 fi
17362
17363 fi
17364
17365 ### Define substitutions for header files to avoid name-pollution
17366
17367 if test "$cf_cv_have_tcgetattr" = yes ; then
17368         HAVE_TCGETATTR=1
17369 else
17370         HAVE_TCGETATTR=0
17371 fi
17372
17373 if test "$ac_cv_header_termio_h" = yes ; then
17374         HAVE_TERMIO_H=1
17375 else
17376         HAVE_TERMIO_H=0
17377 fi
17378
17379 if test "$ac_cv_header_termios_h" = yes ; then
17380         HAVE_TERMIOS_H=1
17381 else
17382         HAVE_TERMIOS_H=0
17383 fi
17384
17385 ################################################################################
17386 test "$use_database" = yes && \
17387 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17388
17389 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17390
17391 if test x"$enable_pc_files" = xyes ; then \
17392 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17393 MAKE_PC_FILES=
17394 else
17395 MAKE_PC_FILES="#"
17396 fi
17397
17398 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"
17399 ac_config_commands="$ac_config_commands default"
17400 cat >confcache <<\_ACEOF
17401 # This file is a shell script that caches the results of configure
17402 # tests run on this system so they can be shared between configure
17403 # scripts and configure runs, see configure's option --config-cache.
17404 # It is not useful on other systems.  If it contains results you don't
17405 # want to keep, you may remove or edit it.
17406 #
17407 # config.status only pays attention to the cache file if you give it
17408 # the --recheck option to rerun configure.
17409 #
17410 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17411 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17412 # following values.
17413
17414 _ACEOF
17415
17416 # The following way of writing the cache mishandles newlines in values,
17417 # but we know of no workaround that is simple, portable, and efficient.
17418 # So, don't put newlines in cache variables' values.
17419 # Ultrix sh set writes to stderr and can't be redirected directly,
17420 # and sets the high bit in the cache file unless we assign to the vars.
17421 {
17422   (set) 2>&1 |
17423     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17424     *ac_space=\ *)
17425       # `set' does not quote correctly, so add quotes (double-quote
17426       # substitution turns \\\\ into \\, and sed turns \\ into \).
17427       sed -n \
17428         "s/'/'\\\\''/g;
17429           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17430       ;;
17431     *)
17432       # `set' quotes correctly as required by POSIX, so do not add quotes.
17433       sed -n \
17434         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17435       ;;
17436     esac;
17437 } |
17438   sed '
17439      t clear
17440      : clear
17441      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17442      t end
17443      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17444      : end' >>confcache
17445 if cmp -s $cache_file confcache; then :; else
17446   if test -w $cache_file; then
17447     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17448     cat confcache >$cache_file
17449   else
17450     echo "not updating unwritable cache $cache_file"
17451   fi
17452 fi
17453 rm -f confcache
17454
17455 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17456 # Let make expand exec_prefix.
17457 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17458
17459 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17460 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17461 # trailing colons and then remove the whole line if VPATH becomes empty
17462 # (actually we leave an empty line to preserve line numbers).
17463 if test "x$srcdir" = x.; then
17464   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17465 s/:*\$(srcdir):*/:/;
17466 s/:*\${srcdir}:*/:/;
17467 s/:*@srcdir@:*/:/;
17468 s/^\([^=]*=[    ]*\):*/\1/;
17469 s/:*$//;
17470 s/^[^=]*=[      ]*$//;
17471 }'
17472 fi
17473
17474 DEFS=-DHAVE_CONFIG_H
17475
17476 : ${CONFIG_STATUS=./config.status}
17477 ac_clean_files_save=$ac_clean_files
17478 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17479 { echo "$as_me:17479: creating $CONFIG_STATUS" >&5
17480 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17481 cat >$CONFIG_STATUS <<_ACEOF
17482 #! $SHELL
17483 # Generated automatically by configure.
17484 # Run this file to recreate the current configuration.
17485 # Compiler output produced by configure, useful for debugging
17486 # configure, is in config.log if it exists.
17487
17488 debug=false
17489 SHELL=\${CONFIG_SHELL-$SHELL}
17490 ac_cs_invocation="\$0 \$@"
17491
17492 _ACEOF
17493
17494 cat >>$CONFIG_STATUS <<\_ACEOF
17495 # Be Bourne compatible
17496 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17497   emulate sh
17498   NULLCMD=:
17499 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17500   set -o posix
17501 fi
17502
17503 # Name of the executable.
17504 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17505
17506 if expr a : '\(a\)' >/dev/null 2>&1; then
17507   as_expr=expr
17508 else
17509   as_expr=false
17510 fi
17511
17512 rm -f conf$$ conf$$.exe conf$$.file
17513 echo >conf$$.file
17514 if ln -s conf$$.file conf$$ 2>/dev/null; then
17515   # We could just check for DJGPP; but this test a) works b) is more generic
17516   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17517   if test -f conf$$.exe; then
17518     # Don't use ln at all; we don't have any links
17519     as_ln_s='cp -p'
17520   else
17521     as_ln_s='ln -s'
17522   fi
17523 elif ln conf$$.file conf$$ 2>/dev/null; then
17524   as_ln_s=ln
17525 else
17526   as_ln_s='cp -p'
17527 fi
17528 rm -f conf$$ conf$$.exe conf$$.file
17529
17530 as_executable_p="test -f"
17531
17532 # Support unset when possible.
17533 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17534   as_unset=unset
17535 else
17536   as_unset=false
17537 fi
17538
17539 # NLS nuisances.
17540 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17541 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17542 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17543 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17544 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17545 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17546 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17547 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17548
17549 # IFS
17550 # We need space, tab and new line, in precisely that order.
17551 as_nl='
17552 '
17553 IFS="   $as_nl"
17554
17555 # CDPATH.
17556 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17557
17558 exec 6>&1
17559
17560 _ACEOF
17561
17562 # Files that config.status was made for.
17563 if test -n "$ac_config_files"; then
17564   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17565 fi
17566
17567 if test -n "$ac_config_headers"; then
17568   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17569 fi
17570
17571 if test -n "$ac_config_links"; then
17572   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17573 fi
17574
17575 if test -n "$ac_config_commands"; then
17576   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17577 fi
17578
17579 cat >>$CONFIG_STATUS <<\EOF
17580
17581 ac_cs_usage="\
17582 \`$as_me' instantiates files from templates according to the
17583 current configuration.
17584
17585 Usage: $0 [OPTIONS] [FILE]...
17586
17587   -h, --help       print this help, then exit
17588   -V, --version    print version number, then exit
17589   -d, --debug      don't remove temporary files
17590       --recheck    update $as_me by reconfiguring in the same conditions
17591   --file=FILE[:TEMPLATE]
17592                    instantiate the configuration file FILE
17593   --header=FILE[:TEMPLATE]
17594                    instantiate the configuration header FILE
17595
17596 Configuration files:
17597 $config_files
17598
17599 Configuration headers:
17600 $config_headers
17601
17602 Configuration commands:
17603 $config_commands
17604
17605 Report bugs to <bug-autoconf@gnu.org>."
17606 EOF
17607
17608 cat >>$CONFIG_STATUS <<EOF
17609 ac_cs_version="\\
17610 config.status
17611 configured by $0, generated by GNU Autoconf 2.52.20081225,
17612   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17613
17614 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17615 Free Software Foundation, Inc.
17616 This config.status script is free software; the Free Software Foundation
17617 gives unlimited permission to copy, distribute and modify it."
17618 srcdir=$srcdir
17619 INSTALL="$INSTALL"
17620 EOF
17621
17622 cat >>$CONFIG_STATUS <<\EOF
17623 # If no file are specified by the user, then we need to provide default
17624 # value.  By we need to know if files were specified by the user.
17625 ac_need_defaults=:
17626 while test $# != 0
17627 do
17628   case $1 in
17629   --*=*)
17630     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17631     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17632     shift
17633     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17634     shift
17635     ;;
17636   -*);;
17637   *) # This is not an option, so the user has probably given explicit
17638      # arguments.
17639      ac_need_defaults=false;;
17640   esac
17641
17642   case $1 in
17643   # Handling of the options.
17644 EOF
17645 cat >>$CONFIG_STATUS <<EOF
17646   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17647     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17648     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17649 EOF
17650 cat >>$CONFIG_STATUS <<\EOF
17651   --version | --vers* | -V )
17652     echo "$ac_cs_version"; exit 0 ;;
17653   --he | --h)
17654     # Conflict between --help and --header
17655     { { echo "$as_me:17655: error: ambiguous option: $1
17656 Try \`$0 --help' for more information." >&5
17657 echo "$as_me: error: ambiguous option: $1
17658 Try \`$0 --help' for more information." >&2;}
17659    { (exit 1); exit 1; }; };;
17660   --help | --hel | -h )
17661     echo "$ac_cs_usage"; exit 0 ;;
17662   --debug | --d* | -d )
17663     debug=: ;;
17664   --file | --fil | --fi | --f )
17665     shift
17666     CONFIG_FILES="$CONFIG_FILES $1"
17667     ac_need_defaults=false;;
17668   --header | --heade | --head | --hea )
17669     shift
17670     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17671     ac_need_defaults=false;;
17672
17673   # This is an error.
17674   -*) { { echo "$as_me:17674: error: unrecognized option: $1
17675 Try \`$0 --help' for more information." >&5
17676 echo "$as_me: error: unrecognized option: $1
17677 Try \`$0 --help' for more information." >&2;}
17678    { (exit 1); exit 1; }; } ;;
17679
17680   *) ac_config_targets="$ac_config_targets $1" ;;
17681
17682   esac
17683   shift
17684 done
17685
17686 exec 5>>config.log
17687 cat >&5 << _ACEOF
17688
17689 ## ----------------------- ##
17690 ## Running config.status.  ##
17691 ## ----------------------- ##
17692
17693 This file was extended by $as_me 2.52.20081225, executed with
17694   CONFIG_FILES    = $CONFIG_FILES
17695   CONFIG_HEADERS  = $CONFIG_HEADERS
17696   CONFIG_LINKS    = $CONFIG_LINKS
17697   CONFIG_COMMANDS = $CONFIG_COMMANDS
17698   > $ac_cs_invocation
17699 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17700
17701 _ACEOF
17702 EOF
17703
17704 cat >>$CONFIG_STATUS <<EOF
17705 #
17706 # INIT-COMMANDS section.
17707 #
17708
17709 ### Special initialization commands, used to pass information from the
17710 ### configuration-run into config.status
17711
17712 AWK="$AWK"
17713 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17714 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17715 ECHO_LINK="$ECHO_LINK"
17716 LDCONFIG="$LDCONFIG"
17717 LIB_NAME="$LIB_NAME"
17718 LIB_SUBSETS="$LIB_SUBSETS"
17719 LIB_SUFFIX="$LIB_SUFFIX"
17720 LIB_TRACING="$LIB_TRACING"
17721 MAKE_TERMINFO="$MAKE_TERMINFO"
17722 NCURSES_MAJOR="$NCURSES_MAJOR"
17723 NCURSES_MINOR="$NCURSES_MINOR"
17724 NCURSES_OSPEED="$NCURSES_OSPEED"
17725 NCURSES_PATCH="$NCURSES_PATCH"
17726 SRC_SUBDIRS="$SRC_SUBDIRS"
17727 TERMINFO="$TERMINFO"
17728 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17729 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17730 TICS_NAME="$TICS_NAME"
17731 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17732 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17733 TINFO_NAME="$TINFO_NAME"
17734 TINFO_SUFFIX="$TINFO_SUFFIX"
17735 WITH_CURSES_H="$with_curses_h"
17736 WITH_ECHO="$with_echo"
17737 WITH_OVERWRITE="$with_overwrite"
17738 cf_LIST_MODELS="$cf_list_models"
17739 cf_cv_abi_version="$cf_cv_abi_version"
17740 cf_cv_do_relink="$cf_cv_do_relink"
17741 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17742 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17743 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17744 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17745 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17746 cf_cv_rel_version="$cf_cv_rel_version"
17747 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17748 cf_cv_shared_soname='$cf_cv_shared_soname'
17749 cf_cv_shlib_version="$cf_cv_shlib_version"
17750 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17751 cf_cv_system_name="$cf_cv_system_name"
17752 cf_with_cxx_binding="$cf_with_cxx_binding"
17753 cf_with_manpages="$cf_with_manpages"
17754 host="$host"
17755 target="$target"
17756
17757 EOF
17758
17759 cat >>$CONFIG_STATUS <<\EOF
17760 for ac_config_target in $ac_config_targets
17761 do
17762   case "$ac_config_target" in
17763   # Handling of arguments.
17764   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17765   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17766   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
17767   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17768   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17769   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17770   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17771   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17772   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17773   *) { { echo "$as_me:17773: error: invalid argument: $ac_config_target" >&5
17774 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17775    { (exit 1); exit 1; }; };;
17776   esac
17777 done
17778
17779 # If the user did not use the arguments to specify the items to instantiate,
17780 # then the envvar interface is used.  Set only those that are not.
17781 # We use the long form for the default assignment because of an extremely
17782 # bizarre bug on SunOS 4.1.3.
17783 if $ac_need_defaults; then
17784   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17785   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17786   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17787 fi
17788
17789 # Create a temporary directory, and hook for its removal unless debugging.
17790 $debug ||
17791 {
17792   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17793   trap '{ (exit 1); exit 1; }' 1 2 13 15
17794 }
17795
17796 # Create a (secure) tmp directory for tmp files.
17797 : ${TMPDIR=/tmp}
17798 {
17799   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17800   test -n "$tmp" && test -d "$tmp"
17801 }  ||
17802 {
17803   tmp=$TMPDIR/cs$$-$RANDOM
17804   (umask 077 && mkdir $tmp)
17805 } ||
17806 {
17807    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17808    { (exit 1); exit 1; }
17809 }
17810
17811 EOF
17812
17813 cat >>$CONFIG_STATUS <<EOF
17814
17815 #
17816 # CONFIG_FILES section.
17817 #
17818
17819 # No need to generate the scripts if there are no CONFIG_FILES.
17820 # This happens for instance when ./config.status config.h
17821 if test -n "\$CONFIG_FILES"; then
17822   # Protect against being on the right side of a sed subst in config.status.
17823   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17824    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17825 s,@SHELL@,$SHELL,;t t
17826 s,@exec_prefix@,$exec_prefix,;t t
17827 s,@prefix@,$prefix,;t t
17828 s,@program_transform_name@,$program_transform_name,;t t
17829 s,@bindir@,$bindir,;t t
17830 s,@sbindir@,$sbindir,;t t
17831 s,@libexecdir@,$libexecdir,;t t
17832 s,@datadir@,$datadir,;t t
17833 s,@sysconfdir@,$sysconfdir,;t t
17834 s,@sharedstatedir@,$sharedstatedir,;t t
17835 s,@localstatedir@,$localstatedir,;t t
17836 s,@libdir@,$libdir,;t t
17837 s,@includedir@,$includedir,;t t
17838 s,@oldincludedir@,$oldincludedir,;t t
17839 s,@infodir@,$infodir,;t t
17840 s,@mandir@,$mandir,;t t
17841 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17842 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17843 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17844 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17845 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17846 s,@build_alias@,$build_alias,;t t
17847 s,@host_alias@,$host_alias,;t t
17848 s,@target_alias@,$target_alias,;t t
17849 s,@ECHO_C@,$ECHO_C,;t t
17850 s,@ECHO_N@,$ECHO_N,;t t
17851 s,@ECHO_T@,$ECHO_T,;t t
17852 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17853 s,@DEFS@,$DEFS,;t t
17854 s,@LIBS@,$LIBS,;t t
17855 s,@top_builddir@,$top_builddir,;t t
17856 s,@EGREP@,$EGREP,;t t
17857 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17858 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17859 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17860 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17861 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17862 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17863 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17864 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17865 s,@build@,$build,;t t
17866 s,@build_cpu@,$build_cpu,;t t
17867 s,@build_vendor@,$build_vendor,;t t
17868 s,@build_os@,$build_os,;t t
17869 s,@host@,$host,;t t
17870 s,@host_cpu@,$host_cpu,;t t
17871 s,@host_vendor@,$host_vendor,;t t
17872 s,@host_os@,$host_os,;t t
17873 s,@target@,$target,;t t
17874 s,@target_cpu@,$target_cpu,;t t
17875 s,@target_vendor@,$target_vendor,;t t
17876 s,@target_os@,$target_os,;t t
17877 s,@CC@,$CC,;t t
17878 s,@CFLAGS@,$CFLAGS,;t t
17879 s,@LDFLAGS@,$LDFLAGS,;t t
17880 s,@CPPFLAGS@,$CPPFLAGS,;t t
17881 s,@ac_ct_CC@,$ac_ct_CC,;t t
17882 s,@EXEEXT@,$EXEEXT,;t t
17883 s,@OBJEXT@,$OBJEXT,;t t
17884 s,@CPP@,$CPP,;t t
17885 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17886 s,@PROG_EXT@,$PROG_EXT,;t t
17887 s,@LDCONFIG@,$LDCONFIG,;t t
17888 s,@CXX@,$CXX,;t t
17889 s,@CXXFLAGS@,$CXXFLAGS,;t t
17890 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17891 s,@AWK@,$AWK,;t t
17892 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17893 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17894 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17895 s,@LINT@,$LINT,;t t
17896 s,@LINT_OPTS@,$LINT_OPTS,;t t
17897 s,@LN_S@,$LN_S,;t t
17898 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17899 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17900 s,@SET_MAKE@,$SET_MAKE,;t t
17901 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17902 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17903 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17904 s,@RANLIB@,$RANLIB,;t t
17905 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17906 s,@LD@,$LD,;t t
17907 s,@ac_ct_LD@,$ac_ct_LD,;t t
17908 s,@AR@,$AR,;t t
17909 s,@ac_ct_AR@,$ac_ct_AR,;t t
17910 s,@ARFLAGS@,$ARFLAGS,;t t
17911 s,@DESTDIR@,$DESTDIR,;t t
17912 s,@BUILD_CC@,$BUILD_CC,;t t
17913 s,@BUILD_CPP@,$BUILD_CPP,;t t
17914 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17915 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17916 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17917 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17918 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17919 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17920 s,@cf_list_models@,$cf_list_models,;t t
17921 s,@LIBTOOL@,$LIBTOOL,;t t
17922 s,@LT_UNDEF@,$LT_UNDEF,;t t
17923 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17924 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17925 s,@LIB_CREATE@,$LIB_CREATE,;t t
17926 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17927 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17928 s,@LIB_PREP@,$LIB_PREP,;t t
17929 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17930 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17931 s,@LIB_LINK@,$LIB_LINK,;t t
17932 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17933 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17934 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17935 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17936 s,@TICS_NAME@,$TICS_NAME,;t t
17937 s,@TINFO_NAME@,$TINFO_NAME,;t t
17938 s,@LIB_NAME@,$LIB_NAME,;t t
17939 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17940 s,@CC_G_OPT@,$CC_G_OPT,;t t
17941 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17942 s,@LD_MODEL@,$LD_MODEL,;t t
17943 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17944 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17945 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17946 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17947 s,@LINK_PROGS@,$LINK_PROGS,;t t
17948 s,@LINK_TESTS@,$LINK_TESTS,;t t
17949 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17950 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17951 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17952 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17953 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17954 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17955 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17956 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17957 s,@TERMINFO@,$TERMINFO,;t t
17958 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17959 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17960 s,@TERMPATH@,$TERMPATH,;t t
17961 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17962 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17963 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17964 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17965 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17966 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17967 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17968 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17969 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17970 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17971 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17972 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17973 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17974 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17975 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
17976 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17977 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17978 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17979 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17980 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17981 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17982 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17983 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17984 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17985 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17986 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
17987 s,@PTHREAD@,$PTHREAD,;t t
17988 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17989 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17990 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17991 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17992 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17993 s,@ECHO_LINK@,$ECHO_LINK,;t t
17994 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17995 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17996 s,@ADA_TRACE@,$ADA_TRACE,;t t
17997 s,@MATH_LIB@,$MATH_LIB,;t t
17998 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17999 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
18000 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
18001 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
18002 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
18003 s,@TEST_LIBS@,$TEST_LIBS,;t t
18004 s,@CXXCPP@,$CXXCPP,;t t
18005 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
18006 s,@CXX_AR@,$CXX_AR,;t t
18007 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
18008 s,@CXXLIBS@,$CXXLIBS,;t t
18009 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
18010 s,@gnat_exists@,$gnat_exists,;t t
18011 s,@M4_exists@,$M4_exists,;t t
18012 s,@cf_ada_make@,$cf_ada_make,;t t
18013 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18014 s,@cf_ada_package@,$cf_ada_package,;t t
18015 s,@ADAFLAGS@,$ADAFLAGS,;t t
18016 s,@cf_compile_generics@,$cf_compile_generics,;t t
18017 s,@cf_generic_objects@,$cf_generic_objects,;t t
18018 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
18019 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18020 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18021 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18022 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18023 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18024 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18025 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
18026 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
18027 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
18028 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
18029 s,@TICS_ARGS@,$TICS_ARGS,;t t
18030 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
18031 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
18032 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
18033 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
18034 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
18035 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18036 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18037 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
18038 s,@TICS_LIST@,$TICS_LIST,;t t
18039 s,@TINFO_LIST@,$TINFO_LIST,;t t
18040 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
18041 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18042 s,@TEST_ARGS@,$TEST_ARGS,;t t
18043 s,@TEST_DEPS@,$TEST_DEPS,;t t
18044 s,@TEST_ARG2@,$TEST_ARG2,;t t
18045 s,@TEST_DEP2@,$TEST_DEP2,;t t
18046 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18047 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
18048 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
18049 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
18050 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
18051 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
18052 s,@cross_compiling@,$cross_compiling,;t t
18053 CEOF
18054
18055 EOF
18056
18057   cat >>$CONFIG_STATUS <<\EOF
18058   # Split the substitutions into bite-sized pieces for seds with
18059   # small command number limits, like on Digital OSF/1 and HP-UX.
18060   ac_max_sed_lines=48
18061   ac_sed_frag=1 # Number of current file.
18062   ac_beg=1 # First line for current file.
18063   ac_end=$ac_max_sed_lines # Line after last line for current file.
18064   ac_more_lines=:
18065   ac_sed_cmds=
18066   while $ac_more_lines; do
18067     if test $ac_beg -gt 1; then
18068       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18069     else
18070       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18071     fi
18072     if test ! -s $tmp/subs.frag; then
18073       ac_more_lines=false
18074     else
18075       # The purpose of the label and of the branching condition is to
18076       # speed up the sed processing (if there are no `@' at all, there
18077       # is no need to browse any of the substitutions).
18078       # These are the two extra sed commands mentioned above.
18079       (echo ':t
18080   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18081       if test -z "$ac_sed_cmds"; then
18082         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18083       else
18084         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18085       fi
18086       ac_sed_frag=`expr $ac_sed_frag + 1`
18087       ac_beg=$ac_end
18088       ac_end=`expr $ac_end + $ac_max_sed_lines`
18089     fi
18090   done
18091   if test -z "$ac_sed_cmds"; then
18092     ac_sed_cmds=cat
18093   fi
18094 fi # test -n "$CONFIG_FILES"
18095
18096 EOF
18097 cat >>$CONFIG_STATUS <<\EOF
18098 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18099   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18100   case $ac_file in
18101   - | *:- | *:-:* ) # input from stdin
18102         cat >$tmp/stdin
18103         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18104         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18105   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18106         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18107   * )   ac_file_in=$ac_file.in ;;
18108   esac
18109
18110   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18111   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18112          X"$ac_file" : 'X\(//\)[^/]' \| \
18113          X"$ac_file" : 'X\(//\)$' \| \
18114          X"$ac_file" : 'X\(/\)' \| \
18115          .     : '\(.\)' 2>/dev/null ||
18116 echo X"$ac_file" |
18117     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18118           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18119           /^X\(\/\/\)$/{ s//\1/; q; }
18120           /^X\(\/\).*/{ s//\1/; q; }
18121           s/.*/./; q'`
18122   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18123     { case "$ac_dir" in
18124   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18125   *)                      as_incr_dir=.;;
18126 esac
18127 as_dummy="$ac_dir"
18128 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18129   case $as_mkdir_dir in
18130     # Skip DOS drivespec
18131     ?:) as_incr_dir=$as_mkdir_dir ;;
18132     *)
18133       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18134       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18135     ;;
18136   esac
18137 done; }
18138
18139     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18140     # A "../" for each directory in $ac_dir_suffix.
18141     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18142   else
18143     ac_dir_suffix= ac_dots=
18144   fi
18145
18146   case $srcdir in
18147   .)  ac_srcdir=.
18148       if test -z "$ac_dots"; then
18149          ac_top_srcdir=.
18150       else
18151          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18152       fi ;;
18153   [\\/]* | ?:[\\/]* )
18154       ac_srcdir=$srcdir$ac_dir_suffix;
18155       ac_top_srcdir=$srcdir ;;
18156   *) # Relative path.
18157     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18158     ac_top_srcdir=$ac_dots$srcdir ;;
18159   esac
18160
18161   case $INSTALL in
18162   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18163   *) ac_INSTALL=$ac_dots$INSTALL ;;
18164   esac
18165
18166   if test x"$ac_file" != x-; then
18167     { echo "$as_me:18167: creating $ac_file" >&5
18168 echo "$as_me: creating $ac_file" >&6;}
18169     rm -f "$ac_file"
18170   fi
18171   # Let's still pretend it is `configure' which instantiates (i.e., don't
18172   # use $as_me), people would be surprised to read:
18173   #    /* config.h.  Generated automatically by config.status.  */
18174   configure_input="Generated automatically from `echo $ac_file_in |
18175                                                  sed 's,.*/,,'` by configure."
18176
18177   # First look for the input files in the build tree, otherwise in the
18178   # src tree.
18179   ac_file_inputs=`IFS=:
18180     for f in $ac_file_in; do
18181       case $f in
18182       -) echo $tmp/stdin ;;
18183       [\\/$]*)
18184          # Absolute (can't be DOS-style, as IFS=:)
18185          test -f "$f" || { { echo "$as_me:18185: error: cannot find input file: $f" >&5
18186 echo "$as_me: error: cannot find input file: $f" >&2;}
18187    { (exit 1); exit 1; }; }
18188          echo $f;;
18189       *) # Relative
18190          if test -f "$f"; then
18191            # Build tree
18192            echo $f
18193          elif test -f "$srcdir/$f"; then
18194            # Source tree
18195            echo $srcdir/$f
18196          else
18197            # /dev/null tree
18198            { { echo "$as_me:18198: error: cannot find input file: $f" >&5
18199 echo "$as_me: error: cannot find input file: $f" >&2;}
18200    { (exit 1); exit 1; }; }
18201          fi;;
18202       esac
18203     done` || { (exit 1); exit 1; }
18204 EOF
18205 cat >>$CONFIG_STATUS <<EOF
18206   sed "$ac_vpsub
18207 $extrasub
18208 EOF
18209 cat >>$CONFIG_STATUS <<\EOF
18210 :t
18211 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18212 s,@configure_input@,$configure_input,;t t
18213 s,@srcdir@,$ac_srcdir,;t t
18214 s,@top_srcdir@,$ac_top_srcdir,;t t
18215 s,@INSTALL@,$ac_INSTALL,;t t
18216 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18217   rm -f $tmp/stdin
18218   if test x"$ac_file" != x-; then
18219     mv $tmp/out $ac_file
18220   else
18221     cat $tmp/out
18222     rm -f $tmp/out
18223   fi
18224
18225 done
18226 EOF
18227 cat >>$CONFIG_STATUS <<\EOF
18228
18229 #
18230 # CONFIG_HEADER section.
18231 #
18232
18233 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18234 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18235 #
18236 # ac_d sets the value in "#define NAME VALUE" lines.
18237 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18238 ac_dB='[        ].*$,\1#\2'
18239 ac_dC=' '
18240 ac_dD=',;t'
18241 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18242 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18243 ac_iB='\([      ]\),\1#\2define\3'
18244 ac_iC=' '
18245 ac_iD='\4,;t'
18246 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18247 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18248 ac_uB='$,\1#\2define\3'
18249 ac_uC=' '
18250 ac_uD=',;t'
18251
18252 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18253   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18254   case $ac_file in
18255   - | *:- | *:-:* ) # input from stdin
18256         cat >$tmp/stdin
18257         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18258         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18259   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18260         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18261   * )   ac_file_in=$ac_file.in ;;
18262   esac
18263
18264   test x"$ac_file" != x- && { echo "$as_me:18264: creating $ac_file" >&5
18265 echo "$as_me: creating $ac_file" >&6;}
18266
18267   # First look for the input files in the build tree, otherwise in the
18268   # src tree.
18269   ac_file_inputs=`IFS=:
18270     for f in $ac_file_in; do
18271       case $f in
18272       -) echo $tmp/stdin ;;
18273       [\\/$]*)
18274          # Absolute (can't be DOS-style, as IFS=:)
18275          test -f "$f" || { { echo "$as_me:18275: error: cannot find input file: $f" >&5
18276 echo "$as_me: error: cannot find input file: $f" >&2;}
18277    { (exit 1); exit 1; }; }
18278          echo $f;;
18279       *) # Relative
18280          if test -f "$f"; then
18281            # Build tree
18282            echo $f
18283          elif test -f "$srcdir/$f"; then
18284            # Source tree
18285            echo $srcdir/$f
18286          else
18287            # /dev/null tree
18288            { { echo "$as_me:18288: error: cannot find input file: $f" >&5
18289 echo "$as_me: error: cannot find input file: $f" >&2;}
18290    { (exit 1); exit 1; }; }
18291          fi;;
18292       esac
18293     done` || { (exit 1); exit 1; }
18294   # Remove the trailing spaces.
18295   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18296
18297 EOF
18298
18299 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18300 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18301 # be either 'cat' or 'sort'.
18302 cat confdefs.h | uniq >conftest.vals
18303
18304 # Break up conftest.vals because some shells have a limit on
18305 # the size of here documents, and old seds have small limits too.
18306
18307 rm -f conftest.tail
18308 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18309 while grep . conftest.vals >/dev/null
18310 do
18311   # Write chunks of a limited-size here document to conftest.frag.
18312   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18313   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18314   echo 'CEOF' >> $CONFIG_STATUS
18315   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18316   rm -f conftest.vals
18317   mv conftest.tail conftest.vals
18318 done
18319 rm -f conftest.vals
18320
18321 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18322 # marker @DEFS@.
18323 echo '  cat >> conftest.edit <<CEOF
18324 /@DEFS@/r conftest.frag
18325 /@DEFS@/d
18326 CEOF
18327 sed -f conftest.edit $tmp/in > $tmp/out
18328 rm -f $tmp/in
18329 mv $tmp/out $tmp/in
18330 rm -f conftest.edit conftest.frag
18331 ' >> $CONFIG_STATUS
18332
18333 cat >>$CONFIG_STATUS <<\EOF
18334   # Let's still pretend it is `configure' which instantiates (i.e., don't
18335   # use $as_me), people would be surprised to read:
18336   #    /* config.h.  Generated automatically by config.status.  */
18337   if test x"$ac_file" = x-; then
18338     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18339   else
18340     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18341   fi
18342   cat $tmp/in >>$tmp/config.h
18343   rm -f $tmp/in
18344   if test x"$ac_file" != x-; then
18345     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18346       { echo "$as_me:18346: $ac_file is unchanged" >&5
18347 echo "$as_me: $ac_file is unchanged" >&6;}
18348     else
18349       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18350          X"$ac_file" : 'X\(//\)[^/]' \| \
18351          X"$ac_file" : 'X\(//\)$' \| \
18352          X"$ac_file" : 'X\(/\)' \| \
18353          .     : '\(.\)' 2>/dev/null ||
18354 echo X"$ac_file" |
18355     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18356           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18357           /^X\(\/\/\)$/{ s//\1/; q; }
18358           /^X\(\/\).*/{ s//\1/; q; }
18359           s/.*/./; q'`
18360       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18361         { case "$ac_dir" in
18362   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18363   *)                      as_incr_dir=.;;
18364 esac
18365 as_dummy="$ac_dir"
18366 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18367   case $as_mkdir_dir in
18368     # Skip DOS drivespec
18369     ?:) as_incr_dir=$as_mkdir_dir ;;
18370     *)
18371       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18372       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18373     ;;
18374   esac
18375 done; }
18376
18377       fi
18378       rm -f $ac_file
18379       mv $tmp/config.h $ac_file
18380     fi
18381   else
18382     cat $tmp/config.h
18383     rm -f $tmp/config.h
18384   fi
18385 done
18386 EOF
18387 cat >>$CONFIG_STATUS <<\EOF
18388
18389 #
18390 # CONFIG_COMMANDS section.
18391 #
18392 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18393   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18394   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18395
18396   case $ac_dest in
18397     default )
18398
18399 for cf_dir in test
18400 do
18401         if test ! -d $srcdir/$cf_dir; then
18402                 continue
18403         elif test -f $srcdir/$cf_dir/programs; then
18404                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18405         fi
18406 done
18407
18408         case $cf_cv_system_name in #(vi
18409         OS/2*|os2*) #(vi
18410         LIB_PREFIX=''
18411         ;;
18412         *)      LIB_PREFIX='lib'
18413         ;;
18414         esac
18415 cf_prefix=$LIB_PREFIX
18416
18417 if test $cf_cv_shlib_version = cygdll ; then
18418         TINFO_NAME=$TINFO_ARG_SUFFIX
18419         TINFO_SUFFIX=.dll
18420 fi
18421
18422 for cf_dir in $SRC_SUBDIRS
18423 do
18424         if test ! -d $srcdir/$cf_dir ; then
18425                 continue
18426         elif test -f $srcdir/$cf_dir/modules; then
18427
18428                 SHARED_LIB=
18429                 LIBS_TO_MAKE=
18430                 for cf_item in $cf_LIST_MODELS
18431                 do
18432
18433         case $cf_item in #(vi
18434         libtool) #(vi
18435                 cf_suffix='.la'
18436                 cf_depsuf=$cf_suffix
18437                 ;;
18438         normal) #(vi
18439                 cf_suffix='.a'
18440                 cf_depsuf=$cf_suffix
18441                 ;;
18442         debug) #(vi
18443                 cf_suffix='_g.a'
18444                 cf_depsuf=$cf_suffix
18445                 ;;
18446         profile) #(vi
18447                 cf_suffix='_p.a'
18448                 cf_depsuf=$cf_suffix
18449                 ;;
18450         shared) #(vi
18451                 case $cf_cv_system_name in
18452                 aix[56]*) #(vi
18453                         cf_suffix='.a'
18454                         cf_depsuf=$cf_suffix
18455                         ;;
18456                 cygwin*) #(vi
18457                         cf_suffix='.dll'
18458                         cf_depsuf='.dll.a'
18459                         ;;
18460                 darwin*) #(vi
18461                         cf_suffix='.dylib'
18462                         cf_depsuf=$cf_suffix
18463                         ;;
18464                 hpux*) #(vi
18465                         case $target in
18466                         ia64*) #(vi
18467                                 cf_suffix='.so'
18468                                 cf_depsuf=$cf_suffix
18469                                 ;;
18470                         *) #(vi
18471                                 cf_suffix='.sl'
18472                                 cf_depsuf=$cf_suffix
18473                                 ;;
18474                         esac
18475                         ;;
18476                 *)      cf_suffix='.so'
18477                         cf_depsuf=$cf_suffix
18478                         ;;
18479                 esac
18480         esac
18481         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18482         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18483
18484                         if test $cf_item = shared ; then
18485                         if test "$cf_cv_do_symlinks" = yes ; then
18486                                 case "$cf_cv_shlib_version" in #(vi
18487                                 rel) #(vi
18488                                         case "$cf_cv_system_name" in #(vi
18489                                         darwin*)
18490                                         case .${LIB_SUFFIX} in
18491                                         .w*)
18492                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18493                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18494                                                 ;;
18495                                         *)
18496                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18497                                                 ;;
18498                                         esac
18499                                         ;; #(vi
18500                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18501                                         esac
18502                                         ;;
18503                                 abi)
18504                                         case "$cf_cv_system_name" in #(vi
18505                                         darwin*)
18506                                         case .${LIB_SUFFIX} in
18507                                         .w*)
18508                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18509                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18510                                                 ;;
18511                                         *)
18512                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18513                                                 ;;
18514                                         esac
18515                                         ;; #(vi
18516                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18517                                         esac
18518                                         ;;
18519                                 esac
18520                         fi
18521                         # cygwin needs import library, and has unique naming convention
18522                         # use autodetected ${cf_prefix} for import lib and static lib, but
18523                         # use 'cyg' prefix for shared lib.
18524                         if test $cf_cv_shlib_version = cygdll ; then
18525                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18526                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18527                                 continue
18528                         fi
18529                         fi
18530                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18531                 done
18532
18533                 if test $cf_dir = ncurses ; then
18534                         cf_subsets="$LIB_SUBSETS"
18535                         cf_r_parts="$cf_subsets"
18536                         cf_liblist="$LIBS_TO_MAKE"
18537
18538                         while test -n "$cf_r_parts"
18539                         do
18540                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18541                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18542                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18543                                         cf_item=
18544                                         case $cf_l_parts in #(vi
18545                                         *termlib*) #(vi
18546                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18547                                                 ;;
18548                                         *ticlib*)
18549                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18550                                                 ;;
18551                                         *)
18552                                                 break
18553                                                 ;;
18554                                         esac
18555                                         if test -n "$cf_item"; then
18556                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18557                                         fi
18558                                 else
18559                                         break
18560                                 fi
18561                         done
18562                 else
18563                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18564                 fi
18565
18566                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18567                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18568                         $cf_dir/Makefile >$cf_dir/Makefile.out
18569                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18570
18571                 $AWK -f $srcdir/mk-0th.awk \
18572                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18573                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18574
18575                 for cf_subset in $cf_subsets
18576                 do
18577                         cf_subdirs=
18578                         for cf_item in $cf_LIST_MODELS
18579                         do
18580                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18581
18582 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18583
18584         case $cf_item in #(vi
18585         libtool) #(vi
18586                 cf_suffix='.la'
18587                 cf_depsuf=$cf_suffix
18588                 ;;
18589         normal) #(vi
18590                 cf_suffix='.a'
18591                 cf_depsuf=$cf_suffix
18592                 ;;
18593         debug) #(vi
18594                 cf_suffix='_g.a'
18595                 cf_depsuf=$cf_suffix
18596                 ;;
18597         profile) #(vi
18598                 cf_suffix='_p.a'
18599                 cf_depsuf=$cf_suffix
18600                 ;;
18601         shared) #(vi
18602                 case $cf_cv_system_name in
18603                 aix[56]*) #(vi
18604                         cf_suffix='.a'
18605                         cf_depsuf=$cf_suffix
18606                         ;;
18607                 cygwin*) #(vi
18608                         cf_suffix='.dll'
18609                         cf_depsuf='.dll.a'
18610                         ;;
18611                 darwin*) #(vi
18612                         cf_suffix='.dylib'
18613                         cf_depsuf=$cf_suffix
18614                         ;;
18615                 hpux*) #(vi
18616                         case $target in
18617                         ia64*) #(vi
18618                                 cf_suffix='.so'
18619                                 cf_depsuf=$cf_suffix
18620                                 ;;
18621                         *) #(vi
18622                                 cf_suffix='.sl'
18623                                 cf_depsuf=$cf_suffix
18624                                 ;;
18625                         esac
18626                         ;;
18627                 *)      cf_suffix='.so'
18628                         cf_depsuf=$cf_suffix
18629                         ;;
18630                 esac
18631         esac
18632         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18633         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18634
18635         case $cf_item in
18636         libtool) cf_subdir='obj_lo'  ;;
18637         normal)  cf_subdir='objects' ;;
18638         debug)   cf_subdir='obj_g' ;;
18639         profile) cf_subdir='obj_p' ;;
18640         shared)
18641                 case $cf_cv_system_name in #(vi
18642                 cygwin) #(vi
18643                         cf_subdir='objects' ;;
18644                 *)
18645                         cf_subdir='obj_s' ;;
18646                 esac
18647         esac
18648
18649                         # Test for case where we build libtinfo with a different name.
18650                         cf_libname=$cf_dir
18651                         if test $cf_dir = ncurses ; then
18652                                 case $cf_subset in
18653                                 *base*)
18654                                         cf_libname=${cf_libname}$LIB_SUFFIX
18655                                         ;;
18656                                 *termlib*)
18657                                         cf_libname=$TINFO_LIB_SUFFIX
18658                                         ;;
18659                                 ticlib*)
18660                                         cf_libname=$TICS_LIB_SUFFIX
18661                                         ;;
18662                                 esac
18663                         else
18664                                 cf_libname=${cf_libname}$LIB_SUFFIX
18665                         fi
18666                         if test -n "${DFT_ARG_SUFFIX}" ; then
18667                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18668                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18669                         fi
18670
18671                         # These dependencies really are for development, not
18672                         # builds, but they are useful in porting, too.
18673                         cf_depend="../include/ncurses_cfg.h"
18674                         if test "$srcdir" = "."; then
18675                                 cf_reldir="."
18676                         else
18677                                 cf_reldir="\${srcdir}"
18678                         fi
18679
18680                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18681                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18682                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18683                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18684                         fi
18685
18686                         cf_dir_suffix=
18687                         old_cf_suffix="$cf_suffix"
18688                         if test "$cf_cv_shlib_version_infix" = yes ; then
18689                         if test -n "$LIB_SUFFIX" ; then
18690                                 case $LIB_SUFFIX in
18691                                 w*)
18692                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18693                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18694                                         cf_dir_suffix=w
18695                                         ;;
18696                                 esac
18697                         fi
18698                         fi
18699
18700                         $AWK -f $srcdir/mk-1st.awk \
18701                                 name=${cf_libname}${cf_dir_suffix} \
18702                                 traces=$LIB_TRACING \
18703                                 MODEL=$cf_ITEM \
18704                                 model=$cf_subdir \
18705                                 prefix=$cf_prefix \
18706                                 suffix=$cf_suffix \
18707                                 subset=$cf_subset \
18708                                 TermlibRoot=$TINFO_NAME \
18709                                 TermlibSuffix=$TINFO_SUFFIX \
18710                                 ShlibVer=$cf_cv_shlib_version \
18711                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18712                                 ReLink=${cf_cv_do_relink-no} \
18713                                 DoLinks=$cf_cv_do_symlinks \
18714                                 rmSoLocs=$cf_cv_rm_so_locs \
18715                                 ldconfig="$LDCONFIG" \
18716                                 overwrite=$WITH_OVERWRITE \
18717                                 depend="$cf_depend" \
18718                                 host="$host" \
18719                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18720
18721                         cf_suffix="$old_cf_suffix"
18722
18723                         for cf_subdir2 in $cf_subdirs lib
18724                         do
18725                                 test $cf_subdir = $cf_subdir2 && break
18726                         done
18727                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18728                         $AWK -f $srcdir/mk-2nd.awk \
18729                                 name=$cf_dir \
18730                                 traces=$LIB_TRACING \
18731                                 MODEL=$cf_ITEM \
18732                                 model=$cf_subdir \
18733                                 subset=$cf_subset \
18734                                 srcdir=$srcdir \
18735                                 echo=$WITH_ECHO \
18736                                 crenames=$cf_cv_prog_CC_c_o \
18737                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18738                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18739                         cf_subdirs="$cf_subdirs $cf_subdir"
18740                         done
18741                 done
18742         fi
18743
18744         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18745 done
18746
18747 for cf_dir in $SRC_SUBDIRS
18748 do
18749         if test ! -d $srcdir/$cf_dir ; then
18750                 continue
18751         fi
18752
18753         if test -f $cf_dir/Makefile ; then
18754                 case "$cf_dir" in
18755                 Ada95) #(vi
18756                         echo 'libs \' >> Makefile
18757                         echo 'install.libs \' >> Makefile
18758                         echo 'uninstall.libs ::' >> Makefile
18759                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18760                         ;;
18761                 esac
18762         fi
18763
18764         if test -f $srcdir/$cf_dir/modules; then
18765                 echo >> Makefile
18766                 if test -f $srcdir/$cf_dir/headers; then
18767 cat >> Makefile <<CF_EOF
18768 install.includes \\
18769 uninstall.includes \\
18770 CF_EOF
18771                 fi
18772 if test "$cf_dir" != "c++" ; then
18773 echo 'lint \' >> Makefile
18774 fi
18775 cat >> Makefile <<CF_EOF
18776 libs \\
18777 lintlib \\
18778 install.libs \\
18779 uninstall.libs \\
18780 install.$cf_dir \\
18781 uninstall.$cf_dir ::
18782         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18783 CF_EOF
18784         elif test -f $srcdir/$cf_dir/headers; then
18785 cat >> Makefile <<CF_EOF
18786
18787 libs \\
18788 install.libs \\
18789 uninstall.libs \\
18790 install.includes \\
18791 uninstall.includes ::
18792         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18793 CF_EOF
18794 fi
18795 done
18796
18797 cat >> Makefile <<CF_EOF
18798
18799 install.libs uninstall.libs \\
18800 install.data uninstall.data ::
18801 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18802 CF_EOF
18803
18804 if test "x$cf_with_manpages" = xyes; then
18805 cat >> Makefile <<CF_EOF
18806
18807 install.man \\
18808 uninstall.man ::
18809         cd man && \${MAKE} \${CF_MFLAGS} \$@
18810 CF_EOF
18811 fi
18812
18813 cat >> Makefile <<CF_EOF
18814
18815 distclean ::
18816         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18817         rm -f headers.sh headers.sed mk_shared_lib.sh
18818         rm -f edit_man.* man_alias.*
18819         rm -rf \${DIRS_TO_MAKE}
18820 CF_EOF
18821
18822 # Special case: tack's manpage lives in its own directory.
18823 if test "x$cf_with_manpages" = xyes; then
18824 if test -d tack ; then
18825 if test -f $srcdir/$tack.h; then
18826 cat >> Makefile <<CF_EOF
18827
18828 install.man \\
18829 uninstall.man ::
18830         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18831 CF_EOF
18832 fi
18833 fi
18834 fi
18835
18836 rm -f headers.sed headers.sh
18837
18838 echo creating headers.sh
18839 cat >headers.sh <<CF_EOF
18840 #! /bin/sh
18841 # This shell script is generated by the 'configure' script.  It is invoked in a
18842 # subdirectory of the build tree.  It generates a sed-script in the parent
18843 # directory that is used to adjust includes for header files that reside in a
18844 # subdirectory of /usr/include, etc.
18845 PRG=""
18846 while test \$# != 3
18847 do
18848 PRG="\$PRG \$1"; shift
18849 done
18850 DST=\$1
18851 REF=\$2
18852 SRC=\$3
18853 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18854 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18855 echo installing \$SRC in \$DST
18856 CF_EOF
18857
18858 if test $WITH_CURSES_H = yes; then
18859         cat >>headers.sh <<CF_EOF
18860 case \$DST in
18861 /*/include/*)
18862         END=\`basename \$DST\`
18863         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18864         do
18865                 NAME=\`basename \$i\`
18866                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18867         done
18868         ;;
18869 *)
18870         echo "" >> \$TMPSED
18871         ;;
18872 esac
18873 CF_EOF
18874
18875 else
18876         cat >>headers.sh <<CF_EOF
18877 case \$DST in
18878 /*/include/*)
18879         END=\`basename \$DST\`
18880         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18881         do
18882                 NAME=\`basename \$i\`
18883                 if test "\$NAME" = "curses.h"
18884                 then
18885                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18886                         NAME=ncurses.h
18887                 fi
18888                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18889         done
18890         ;;
18891 *)
18892         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18893         ;;
18894 esac
18895 CF_EOF
18896 fi
18897 cat >>headers.sh <<CF_EOF
18898 rm -f \$TMPSRC
18899 sed -f \$TMPSED \$SRC > \$TMPSRC
18900 NAME=\`basename \$SRC\`
18901 CF_EOF
18902 if test $WITH_CURSES_H != yes; then
18903         cat >>headers.sh <<CF_EOF
18904 test "\$NAME" = "curses.h" && NAME=ncurses.h
18905 CF_EOF
18906 fi
18907 cat >>headers.sh <<CF_EOF
18908 # Just in case someone gzip'd manpages, remove the conflicting copy.
18909 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18910
18911 eval \$PRG \$TMPSRC \$DST/\$NAME
18912 rm -f \$TMPSRC \$TMPSED
18913 CF_EOF
18914
18915 chmod 0755 headers.sh
18916
18917 for cf_dir in $SRC_SUBDIRS
18918 do
18919         if test ! -d $srcdir/$cf_dir ; then
18920                 continue
18921         fi
18922
18923         if test -f $srcdir/$cf_dir/headers; then
18924                 $AWK -f $srcdir/mk-hdr.awk \
18925                         subset="$LIB_SUBSETS" \
18926                         compat="$WITH_CURSES_H" \
18927                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18928         fi
18929
18930         if test -f $srcdir/$cf_dir/modules; then
18931                 if test "$cf_dir" != "c++" ; then
18932                         cat >>$cf_dir/Makefile <<"CF_EOF"
18933 depend : ${AUTO_SRC}
18934         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18935
18936 # DO NOT DELETE THIS LINE -- make depend depends on it.
18937 CF_EOF
18938                 fi
18939         fi
18940 done
18941
18942  ;;
18943   esac
18944 done
18945 EOF
18946
18947 cat >>$CONFIG_STATUS <<\EOF
18948
18949 { (exit 0); exit 0; }
18950 EOF
18951 chmod +x $CONFIG_STATUS
18952 ac_clean_files=$ac_clean_files_save
18953
18954 # configure is writing to config.log, and then calls config.status.
18955 # config.status does its own redirection, appending to config.log.
18956 # Unfortunately, on DOS this fails, as config.log is still kept open
18957 # by configure, so config.status won't be able to write to it; its
18958 # output is simply discarded.  So we exec the FD to /dev/null,
18959 # effectively closing config.log, so it can be properly (re)opened and
18960 # appended to by config.status.  When coming back to configure, we
18961 # need to make the FD available again.
18962 if test "$no_create" != yes; then
18963   ac_cs_success=:
18964   exec 5>/dev/null
18965   $SHELL $CONFIG_STATUS || ac_cs_success=false
18966   exec 5>>config.log
18967   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18968   # would make configure fail if this is the last instruction.
18969   $ac_cs_success || { (exit 1); exit 1; }
18970 fi
18971 ${MAKE-make} preinstall