]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090105
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.463 .
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-rcs-ids          compile-in RCS identifiers
759 Options to Specify How Manpages are Installed:
760   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
761                           optionally formatted/catonly, e.g., gzip,formatted
762   --with-manpage-renames  specify manpage-renaming
763   --with-manpage-aliases  specify manpage-aliases using .so
764   --with-manpage-symlinks specify manpage-aliases using symlinks
765   --with-manpage-tbl      specify manpage processing with tbl
766 Extensions:
767   --disable-ext-funcs     disable function-extensions
768   --enable-const          compile with extra/non-standard const
769   --enable-ext-colors     compile for 256-color support
770   --enable-ext-mouse      compile for extended mouse-encoding
771   --enable-no-padding     compile with $NCURSES_NO_PADDING code
772   --enable-signed-char    compile using signed Boolean's in term.h
773   --enable-sigwinch       compile with SIGWINCH handler
774   --enable-tcap-names     compile with user-definable terminal capabilities
775 Development Code:
776   --without-develop       disable development options
777   --enable-hard-tabs      compile with hard-tabs code
778   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
779 Experimental Code:
780   --disable-assumed-color do not assume anything about default-colors
781   --disable-hashmap       compile without hashmap scrolling-optimization
782   --enable-colorfgbg      compile with $COLORFGBG code
783   --with-pthread          use POSIX thread library
784   --enable-weak-symbols   enable weak-symbols for pthreads
785   --enable-reentrant      compile with experimental reentrant code
786   --enable-safe-sprintf   compile with experimental safe-sprintf code
787   --disable-scroll-hints  compile without scroll-hints code
788   --enable-wgetch-events  compile with experimental wgetch-events code
789 Testing/development Options:
790   --enable-echo           build: display "compiling" commands (default)
791   --enable-warnings       build: turn on GCC compiler warnings
792   --enable-assertions     test: turn on generation of assertion code
793   --with-dmalloc          test: use Gray Watson's dmalloc library
794   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
795   --with-valgrind         test: use valgrind
796   --disable-leaks         test: free permanent memory, analyze leaks
797   --enable-expanded       test: generate functions for certain macros
798   --disable-macros        test: use functions rather than macros
799   --with-trace            test: add trace() function to all models of ncurses
800 Ada95 Binding Options:
801   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
802   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
803   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
804
805 Some influential environment variables:
806   CC          C compiler command
807   CFLAGS      C compiler flags
808   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
809               nonstandard directory <lib dir>
810   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
811               headers in a nonstandard directory <include dir>
812   CPP         C preprocessor
813   CXX         C++ compiler command
814   CXXFLAGS    C++ compiler flags
815   CXXCPP      C++ preprocessor
816
817 Use these variables to override the choices made by `configure' or to help
818 it to find libraries and programs with nonstandard names/locations.
819
820 EOF
821 fi
822
823 if test "$ac_init_help" = "recursive"; then
824   # If there are subdirs, report their specific --help.
825   ac_popdir=`pwd`
826   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
827     cd $ac_subdir
828     # A "../" for each directory in /$ac_subdir.
829     ac_dots=`echo $ac_subdir |
830              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
831
832     case $srcdir in
833     .) # No --srcdir option.  We are building in place.
834       ac_sub_srcdir=$srcdir ;;
835     [\\/]* | ?:[\\/]* ) # Absolute path.
836       ac_sub_srcdir=$srcdir/$ac_subdir ;;
837     *) # Relative path.
838       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
839     esac
840
841     # Check for guested configure; otherwise get Cygnus style configure.
842     if test -f $ac_sub_srcdir/configure.gnu; then
843       echo
844       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
845     elif test -f $ac_sub_srcdir/configure; then
846       echo
847       $SHELL $ac_sub_srcdir/configure  --help=recursive
848     elif test -f $ac_sub_srcdir/configure.ac ||
849            test -f $ac_sub_srcdir/configure.in; then
850       echo
851       $ac_configure --help
852     else
853       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
854     fi
855     cd $ac_popdir
856   done
857 fi
858
859 test -n "$ac_init_help" && exit 0
860 if $ac_init_version; then
861   cat <<\EOF
862
863 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
864 Free Software Foundation, Inc.
865 This configure script is free software; the Free Software Foundation
866 gives unlimited permission to copy, distribute and modify it.
867 EOF
868   exit 0
869 fi
870 exec 5>config.log
871 cat >&5 <<EOF
872 This file contains any messages produced by compilers while
873 running configure, to aid debugging if configure makes a mistake.
874
875 It was created by $as_me, which was
876 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
877
878   $ $0 $@
879
880 EOF
881 {
882 cat <<_ASUNAME
883 ## ---------- ##
884 ## Platform.  ##
885 ## ---------- ##
886
887 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
888 uname -m = `(uname -m) 2>/dev/null || echo unknown`
889 uname -r = `(uname -r) 2>/dev/null || echo unknown`
890 uname -s = `(uname -s) 2>/dev/null || echo unknown`
891 uname -v = `(uname -v) 2>/dev/null || echo unknown`
892
893 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
894 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
895
896 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
897 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
898 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
899 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
900 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
901 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
902 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
903
904 PATH = $PATH
905
906 _ASUNAME
907 } >&5
908
909 cat >&5 <<EOF
910 ## ------------ ##
911 ## Core tests.  ##
912 ## ------------ ##
913
914 EOF
915
916 # Keep a trace of the command line.
917 # Strip out --no-create and --no-recursion so they do not pile up.
918 # Also quote any args containing shell meta-characters.
919 ac_configure_args=
920 ac_sep=
921 for ac_arg
922 do
923   case $ac_arg in
924   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
925   | --no-cr | --no-c) ;;
926   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
927   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
928   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
929     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
930     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
931     ac_sep=" " ;;
932   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
933      ac_sep=" " ;;
934   esac
935   # Get rid of the leading space.
936 done
937
938 # When interrupted or exit'd, cleanup temporary files, and complete
939 # config.log.  We remove comments because anyway the quotes in there
940 # would cause problems or look ugly.
941 trap 'exit_status=$?
942   # Save into config.log some information that might help in debugging.
943   echo >&5
944   echo "## ----------------- ##" >&5
945   echo "## Cache variables.  ##" >&5
946   echo "## ----------------- ##" >&5
947   echo >&5
948   # The following way of writing the cache mishandles newlines in values,
949 {
950   (set) 2>&1 |
951     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
952     *ac_space=\ *)
953       sed -n \
954         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
955           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
956       ;;
957     *)
958       sed -n \
959         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
960       ;;
961     esac;
962 } >&5
963   sed "/^$/d" confdefs.h >conftest.log
964   if test -s conftest.log; then
965     echo >&5
966     echo "## ------------ ##" >&5
967     echo "## confdefs.h.  ##" >&5
968     echo "## ------------ ##" >&5
969     echo >&5
970     cat conftest.log >&5
971   fi
972   (echo; echo) >&5
973   test "$ac_signal" != 0 &&
974     echo "$as_me: caught signal $ac_signal" >&5
975   echo "$as_me: exit $exit_status" >&5
976   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
977     exit $exit_status
978      ' 0
979 for ac_signal in 1 2 13 15; do
980   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
981 done
982 ac_signal=0
983
984 # confdefs.h avoids OS command line length limits that DEFS can exceed.
985 rm -rf conftest* confdefs.h
986 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
987 echo >confdefs.h
988
989 # Let the site file select an alternate cache file if it wants to.
990 # Prefer explicitly selected file to automatically selected ones.
991 if test -z "$CONFIG_SITE"; then
992   if test "x$prefix" != xNONE; then
993     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
994   else
995     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
996   fi
997 fi
998 for ac_site_file in $CONFIG_SITE; do
999   if test -r "$ac_site_file"; then
1000     { echo "$as_me:1000: loading site script $ac_site_file" >&5
1001 echo "$as_me: loading site script $ac_site_file" >&6;}
1002     cat "$ac_site_file" >&5
1003     . "$ac_site_file"
1004   fi
1005 done
1006
1007 if test -r "$cache_file"; then
1008   # Some versions of bash will fail to source /dev/null (special
1009   # files actually), so we avoid doing that.
1010   if test -f "$cache_file"; then
1011     { echo "$as_me:1011: loading cache $cache_file" >&5
1012 echo "$as_me: loading cache $cache_file" >&6;}
1013     case $cache_file in
1014       [\\/]* | ?:[\\/]* ) . $cache_file;;
1015       *)                      . ./$cache_file;;
1016     esac
1017   fi
1018 else
1019   { echo "$as_me:1019: creating cache $cache_file" >&5
1020 echo "$as_me: creating cache $cache_file" >&6;}
1021   >$cache_file
1022 fi
1023
1024 # Check that the precious variables saved in the cache have kept the same
1025 # value.
1026 ac_cache_corrupted=false
1027 for ac_var in `(set) 2>&1 |
1028                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1029   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1030   eval ac_new_set=\$ac_env_${ac_var}_set
1031   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1032   eval ac_new_val="\$ac_env_${ac_var}_value"
1033   case $ac_old_set,$ac_new_set in
1034     set,)
1035       { echo "$as_me:1035: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1036 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1037       ac_cache_corrupted=: ;;
1038     ,set)
1039       { echo "$as_me:1039: error: \`$ac_var' was not set in the previous run" >&5
1040 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1041       ac_cache_corrupted=: ;;
1042     ,);;
1043     *)
1044       if test "x$ac_old_val" != "x$ac_new_val"; then
1045         { echo "$as_me:1045: error: \`$ac_var' has changed since the previous run:" >&5
1046 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1047         { echo "$as_me:1047:   former value:  $ac_old_val" >&5
1048 echo "$as_me:   former value:  $ac_old_val" >&2;}
1049         { echo "$as_me:1049:   current value: $ac_new_val" >&5
1050 echo "$as_me:   current value: $ac_new_val" >&2;}
1051         ac_cache_corrupted=:
1052       fi;;
1053   esac
1054   # Pass precious variables to config.status.  It doesn't matter if
1055   # we pass some twice (in addition to the command line arguments).
1056   if test "$ac_new_set" = set; then
1057     case $ac_new_val in
1058     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1059       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1060       ac_configure_args="$ac_configure_args '$ac_arg'"
1061       ;;
1062     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1063        ;;
1064     esac
1065   fi
1066 done
1067 if $ac_cache_corrupted; then
1068   { echo "$as_me:1068: error: changes in the environment can compromise the build" >&5
1069 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1070   { { echo "$as_me:1070: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1071 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1072    { (exit 1); exit 1; }; }
1073 fi
1074
1075 ac_ext=c
1076 ac_cpp='$CPP $CPPFLAGS'
1077 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1078 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1079 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1080 ac_main_return=return
1081
1082 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1083   *c*,-n*) ECHO_N= ECHO_C='
1084 ' ECHO_T='      ' ;;
1085   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1086   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1087 esac
1088 echo "#! $SHELL" >conftest.sh
1089 echo  "exit 0"   >>conftest.sh
1090 chmod +x conftest.sh
1091 if { (echo "$as_me:1091: PATH=\".;.\"; conftest.sh") >&5
1092   (PATH=".;."; conftest.sh) 2>&5
1093   ac_status=$?
1094   echo "$as_me:1094: \$? = $ac_status" >&5
1095   (exit $ac_status); }; then
1096   ac_path_separator=';'
1097 else
1098   ac_path_separator=:
1099 fi
1100 PATH_SEPARATOR="$ac_path_separator"
1101 rm -f conftest.sh
1102
1103 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1104
1105 top_builddir=`pwd`
1106
1107 echo "$as_me:1107: checking for egrep" >&5
1108 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1109 if test "${ac_cv_prog_egrep+set}" = set; then
1110   echo $ECHO_N "(cached) $ECHO_C" >&6
1111 else
1112   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1113     then ac_cv_prog_egrep='grep -E'
1114     else ac_cv_prog_egrep='egrep'
1115     fi
1116 fi
1117 echo "$as_me:1117: result: $ac_cv_prog_egrep" >&5
1118 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1119  EGREP=$ac_cv_prog_egrep
1120
1121 test -z "$EGREP" && { { echo "$as_me:1121: error: No egrep program found" >&5
1122 echo "$as_me: error: No egrep program found" >&2;}
1123    { (exit 1); exit 1; }; }
1124
1125 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1126 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1127 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1128 cf_cv_abi_version=${NCURSES_MAJOR}
1129 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1130 cf_cv_timestamp=`date`
1131 echo "$as_me:1131: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1132 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1133
1134 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1135
1136 # Check whether --with-rel-version or --without-rel-version was given.
1137 if test "${with_rel_version+set}" = set; then
1138   withval="$with_rel_version"
1139   { echo "$as_me:1139: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1140 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1141  cf_cv_rel_version=$withval
1142 fi;
1143
1144  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1145  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1146
1147 if test -n "$NCURSES_MAJOR" ; then
1148   case $NCURSES_MAJOR in #(vi
1149   [0-9]*) #(vi
1150         ;;
1151   *)
1152         { { echo "$as_me:1152: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1153 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1154    { (exit 1); exit 1; }; }
1155         ;;
1156   esac
1157 else
1158   { { echo "$as_me:1158: error: Release major-version value is empty" >&5
1159 echo "$as_me: error: Release major-version value is empty" >&2;}
1160    { (exit 1); exit 1; }; }
1161 fi
1162
1163 if test -n "$NCURSES_MINOR" ; then
1164   case $NCURSES_MINOR in #(vi
1165   [0-9]*) #(vi
1166         ;;
1167   *)
1168         { { echo "$as_me:1168: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1169 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1170    { (exit 1); exit 1; }; }
1171         ;;
1172   esac
1173 else
1174   { { echo "$as_me:1174: error: Release minor-version value is empty" >&5
1175 echo "$as_me: error: Release minor-version value is empty" >&2;}
1176    { (exit 1); exit 1; }; }
1177 fi
1178
1179 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1180
1181 # Check whether --with-abi-version or --without-abi-version was given.
1182 if test "${with_abi_version+set}" = set; then
1183   withval="$with_abi_version"
1184   { echo "$as_me:1184: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1185 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1186  cf_cv_abi_version=$withval
1187 fi;
1188
1189 if test -n "$cf_cv_abi_version" ; then
1190   case $cf_cv_abi_version in #(vi
1191   [0-9]*) #(vi
1192         ;;
1193   *)
1194         { { echo "$as_me:1194: error: ABI version is not a number: $cf_cv_abi_version" >&5
1195 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1196    { (exit 1); exit 1; }; }
1197         ;;
1198   esac
1199 else
1200   { { echo "$as_me:1200: error: ABI version value is empty" >&5
1201 echo "$as_me: error: ABI version value is empty" >&2;}
1202    { (exit 1); exit 1; }; }
1203 fi
1204
1205 ac_aux_dir=
1206 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1207   if test -f $ac_dir/install-sh; then
1208     ac_aux_dir=$ac_dir
1209     ac_install_sh="$ac_aux_dir/install-sh -c"
1210     break
1211   elif test -f $ac_dir/install.sh; then
1212     ac_aux_dir=$ac_dir
1213     ac_install_sh="$ac_aux_dir/install.sh -c"
1214     break
1215   elif test -f $ac_dir/shtool; then
1216     ac_aux_dir=$ac_dir
1217     ac_install_sh="$ac_aux_dir/shtool install -c"
1218     break
1219   fi
1220 done
1221 if test -z "$ac_aux_dir"; then
1222   { { echo "$as_me:1222: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1223 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1224    { (exit 1); exit 1; }; }
1225 fi
1226 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1227 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1228 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1229
1230 # Make sure we can run config.sub.
1231 $ac_config_sub sun4 >/dev/null 2>&1 ||
1232   { { echo "$as_me:1232: error: cannot run $ac_config_sub" >&5
1233 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1234    { (exit 1); exit 1; }; }
1235
1236 echo "$as_me:1236: checking build system type" >&5
1237 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1238 if test "${ac_cv_build+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   ac_cv_build_alias=$build_alias
1242 test -z "$ac_cv_build_alias" &&
1243   ac_cv_build_alias=`$ac_config_guess`
1244 test -z "$ac_cv_build_alias" &&
1245   { { echo "$as_me:1245: error: cannot guess build type; you must specify one" >&5
1246 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1247    { (exit 1); exit 1; }; }
1248 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1249   { { echo "$as_me:1249: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1250 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1251    { (exit 1); exit 1; }; }
1252
1253 fi
1254 echo "$as_me:1254: result: $ac_cv_build" >&5
1255 echo "${ECHO_T}$ac_cv_build" >&6
1256 build=$ac_cv_build
1257 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1258 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1259 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1260
1261 echo "$as_me:1261: checking host system type" >&5
1262 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1263 if test "${ac_cv_host+set}" = set; then
1264   echo $ECHO_N "(cached) $ECHO_C" >&6
1265 else
1266   ac_cv_host_alias=$host_alias
1267 test -z "$ac_cv_host_alias" &&
1268   ac_cv_host_alias=$ac_cv_build_alias
1269 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1270   { { echo "$as_me:1270: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1271 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1272    { (exit 1); exit 1; }; }
1273
1274 fi
1275 echo "$as_me:1275: result: $ac_cv_host" >&5
1276 echo "${ECHO_T}$ac_cv_host" >&6
1277 host=$ac_cv_host
1278 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1279 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1280 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1281
1282 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1283         echo "$as_me:1283: checking target system type" >&5
1284 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1285 if test "${ac_cv_target+set}" = set; then
1286   echo $ECHO_N "(cached) $ECHO_C" >&6
1287 else
1288   ac_cv_target_alias=$target_alias
1289 test "x$ac_cv_target_alias" = "x" &&
1290   ac_cv_target_alias=$ac_cv_host_alias
1291 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1292   { { echo "$as_me:1292: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1293 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1294    { (exit 1); exit 1; }; }
1295
1296 fi
1297 echo "$as_me:1297: result: $ac_cv_target" >&5
1298 echo "${ECHO_T}$ac_cv_target" >&6
1299 target=$ac_cv_target
1300 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1301 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1302 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1303
1304 # The aliases save the names the user supplied, while $host etc.
1305 # will get canonicalized.
1306 test -n "$target_alias" &&
1307   test "$program_prefix$program_suffix$program_transform_name" = \
1308     NONENONEs,x,x, &&
1309   program_prefix=${target_alias}-
1310         system_name="$host_os"
1311 else
1312         system_name="`(uname -s -r) 2>/dev/null`"
1313         if test -z "$system_name" ; then
1314                 system_name="`(hostname) 2>/dev/null`"
1315         fi
1316 fi
1317 test -n "$system_name" && cat >>confdefs.h <<EOF
1318 #define SYSTEM_NAME "$system_name"
1319 EOF
1320
1321 if test "${cf_cv_system_name+set}" = set; then
1322   echo $ECHO_N "(cached) $ECHO_C" >&6
1323 else
1324   cf_cv_system_name="$system_name"
1325 fi
1326
1327 test -z "$system_name" && system_name="$cf_cv_system_name"
1328 test -n "$cf_cv_system_name" && echo "$as_me:1328: result: Configuring for $cf_cv_system_name" >&5
1329 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1330
1331 if test ".$system_name" != ".$cf_cv_system_name" ; then
1332         echo "$as_me:1332: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1333 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1334         { { echo "$as_me:1334: error: \"Please remove config.cache and try again.\"" >&5
1335 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1336    { (exit 1); exit 1; }; }
1337 fi
1338
1339 # Check whether --with-system-type or --without-system-type was given.
1340 if test "${with_system_type+set}" = set; then
1341   withval="$with_system_type"
1342   { echo "$as_me:1342: WARNING: overriding system type to $withval" >&5
1343 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1344  cf_cv_system_name=$withval
1345 fi;
1346
1347 ###     Save the given $CFLAGS to allow user-override.
1348 cf_user_CFLAGS="$CFLAGS"
1349
1350 ###     Default install-location
1351
1352 echo "$as_me:1352: checking for prefix" >&5
1353 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1354 if test "x$prefix" = "xNONE" ; then
1355         case "$cf_cv_system_name" in
1356                 # non-vendor systems don't have a conflict
1357         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1358                 prefix=/usr
1359                 ;;
1360         *)      prefix=$ac_default_prefix
1361                 ;;
1362         esac
1363 fi
1364 echo "$as_me:1364: result: $prefix" >&5
1365 echo "${ECHO_T}$prefix" >&6
1366
1367 if test "x$prefix" = "xNONE" ; then
1368 echo "$as_me:1368: checking for default include-directory" >&5
1369 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1370 test -n "$verbose" && echo 1>&6
1371 for cf_symbol in \
1372         $includedir \
1373         $includedir/ncurses \
1374         $prefix/include \
1375         $prefix/include/ncurses \
1376         /usr/local/include \
1377         /usr/local/include/ncurses \
1378         /usr/include \
1379         /usr/include/ncurses
1380 do
1381         cf_dir=`eval echo $cf_symbol`
1382         if test -f $cf_dir/curses.h ; then
1383         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1384                 includedir="$cf_symbol"
1385                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1386                 break
1387         fi
1388         fi
1389         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1390 done
1391 echo "$as_me:1391: result: $includedir" >&5
1392 echo "${ECHO_T}$includedir" >&6
1393 fi
1394
1395 ###     Checks for programs.
1396 ac_ext=c
1397 ac_cpp='$CPP $CPPFLAGS'
1398 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1399 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1400 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1401 ac_main_return=return
1402 if test -n "$ac_tool_prefix"; then
1403   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1404 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1405 echo "$as_me:1405: checking for $ac_word" >&5
1406 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1407 if test "${ac_cv_prog_CC+set}" = set; then
1408   echo $ECHO_N "(cached) $ECHO_C" >&6
1409 else
1410   if test -n "$CC"; then
1411   ac_cv_prog_CC="$CC" # Let the user override the test.
1412 else
1413   ac_save_IFS=$IFS; IFS=$ac_path_separator
1414 ac_dummy="$PATH"
1415 for ac_dir in $ac_dummy; do
1416   IFS=$ac_save_IFS
1417   test -z "$ac_dir" && ac_dir=.
1418   $as_executable_p "$ac_dir/$ac_word" || continue
1419 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1420 echo "$as_me:1420: found $ac_dir/$ac_word" >&5
1421 break
1422 done
1423
1424 fi
1425 fi
1426 CC=$ac_cv_prog_CC
1427 if test -n "$CC"; then
1428   echo "$as_me:1428: result: $CC" >&5
1429 echo "${ECHO_T}$CC" >&6
1430 else
1431   echo "$as_me:1431: result: no" >&5
1432 echo "${ECHO_T}no" >&6
1433 fi
1434
1435 fi
1436 if test -z "$ac_cv_prog_CC"; then
1437   ac_ct_CC=$CC
1438   # Extract the first word of "gcc", so it can be a program name with args.
1439 set dummy gcc; ac_word=$2
1440 echo "$as_me:1440: checking for $ac_word" >&5
1441 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1442 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1443   echo $ECHO_N "(cached) $ECHO_C" >&6
1444 else
1445   if test -n "$ac_ct_CC"; then
1446   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1447 else
1448   ac_save_IFS=$IFS; IFS=$ac_path_separator
1449 ac_dummy="$PATH"
1450 for ac_dir in $ac_dummy; do
1451   IFS=$ac_save_IFS
1452   test -z "$ac_dir" && ac_dir=.
1453   $as_executable_p "$ac_dir/$ac_word" || continue
1454 ac_cv_prog_ac_ct_CC="gcc"
1455 echo "$as_me:1455: found $ac_dir/$ac_word" >&5
1456 break
1457 done
1458
1459 fi
1460 fi
1461 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1462 if test -n "$ac_ct_CC"; then
1463   echo "$as_me:1463: result: $ac_ct_CC" >&5
1464 echo "${ECHO_T}$ac_ct_CC" >&6
1465 else
1466   echo "$as_me:1466: result: no" >&5
1467 echo "${ECHO_T}no" >&6
1468 fi
1469
1470   CC=$ac_ct_CC
1471 else
1472   CC="$ac_cv_prog_CC"
1473 fi
1474
1475 if test -z "$CC"; then
1476   if test -n "$ac_tool_prefix"; then
1477   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1478 set dummy ${ac_tool_prefix}cc; ac_word=$2
1479 echo "$as_me:1479: checking for $ac_word" >&5
1480 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1481 if test "${ac_cv_prog_CC+set}" = set; then
1482   echo $ECHO_N "(cached) $ECHO_C" >&6
1483 else
1484   if test -n "$CC"; then
1485   ac_cv_prog_CC="$CC" # Let the user override the test.
1486 else
1487   ac_save_IFS=$IFS; IFS=$ac_path_separator
1488 ac_dummy="$PATH"
1489 for ac_dir in $ac_dummy; do
1490   IFS=$ac_save_IFS
1491   test -z "$ac_dir" && ac_dir=.
1492   $as_executable_p "$ac_dir/$ac_word" || continue
1493 ac_cv_prog_CC="${ac_tool_prefix}cc"
1494 echo "$as_me:1494: found $ac_dir/$ac_word" >&5
1495 break
1496 done
1497
1498 fi
1499 fi
1500 CC=$ac_cv_prog_CC
1501 if test -n "$CC"; then
1502   echo "$as_me:1502: result: $CC" >&5
1503 echo "${ECHO_T}$CC" >&6
1504 else
1505   echo "$as_me:1505: result: no" >&5
1506 echo "${ECHO_T}no" >&6
1507 fi
1508
1509 fi
1510 if test -z "$ac_cv_prog_CC"; then
1511   ac_ct_CC=$CC
1512   # Extract the first word of "cc", so it can be a program name with args.
1513 set dummy cc; ac_word=$2
1514 echo "$as_me:1514: checking for $ac_word" >&5
1515 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1516 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1517   echo $ECHO_N "(cached) $ECHO_C" >&6
1518 else
1519   if test -n "$ac_ct_CC"; then
1520   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1521 else
1522   ac_save_IFS=$IFS; IFS=$ac_path_separator
1523 ac_dummy="$PATH"
1524 for ac_dir in $ac_dummy; do
1525   IFS=$ac_save_IFS
1526   test -z "$ac_dir" && ac_dir=.
1527   $as_executable_p "$ac_dir/$ac_word" || continue
1528 ac_cv_prog_ac_ct_CC="cc"
1529 echo "$as_me:1529: found $ac_dir/$ac_word" >&5
1530 break
1531 done
1532
1533 fi
1534 fi
1535 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1536 if test -n "$ac_ct_CC"; then
1537   echo "$as_me:1537: result: $ac_ct_CC" >&5
1538 echo "${ECHO_T}$ac_ct_CC" >&6
1539 else
1540   echo "$as_me:1540: result: no" >&5
1541 echo "${ECHO_T}no" >&6
1542 fi
1543
1544   CC=$ac_ct_CC
1545 else
1546   CC="$ac_cv_prog_CC"
1547 fi
1548
1549 fi
1550 if test -z "$CC"; then
1551   # Extract the first word of "cc", so it can be a program name with args.
1552 set dummy cc; ac_word=$2
1553 echo "$as_me:1553: checking for $ac_word" >&5
1554 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1555 if test "${ac_cv_prog_CC+set}" = set; then
1556   echo $ECHO_N "(cached) $ECHO_C" >&6
1557 else
1558   if test -n "$CC"; then
1559   ac_cv_prog_CC="$CC" # Let the user override the test.
1560 else
1561   ac_prog_rejected=no
1562   ac_save_IFS=$IFS; IFS=$ac_path_separator
1563 ac_dummy="$PATH"
1564 for ac_dir in $ac_dummy; do
1565   IFS=$ac_save_IFS
1566   test -z "$ac_dir" && ac_dir=.
1567   $as_executable_p "$ac_dir/$ac_word" || continue
1568 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1569   ac_prog_rejected=yes
1570   continue
1571 fi
1572 ac_cv_prog_CC="cc"
1573 echo "$as_me:1573: found $ac_dir/$ac_word" >&5
1574 break
1575 done
1576
1577 if test $ac_prog_rejected = yes; then
1578   # We found a bogon in the path, so make sure we never use it.
1579   set dummy $ac_cv_prog_CC
1580   shift
1581   if test $# != 0; then
1582     # We chose a different compiler from the bogus one.
1583     # However, it has the same basename, so the bogon will be chosen
1584     # first if we set CC to just the basename; use the full file name.
1585     shift
1586     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1587     shift
1588     ac_cv_prog_CC="$@"
1589   fi
1590 fi
1591 fi
1592 fi
1593 CC=$ac_cv_prog_CC
1594 if test -n "$CC"; then
1595   echo "$as_me:1595: result: $CC" >&5
1596 echo "${ECHO_T}$CC" >&6
1597 else
1598   echo "$as_me:1598: result: no" >&5
1599 echo "${ECHO_T}no" >&6
1600 fi
1601
1602 fi
1603 if test -z "$CC"; then
1604   if test -n "$ac_tool_prefix"; then
1605   for ac_prog in cl
1606   do
1607     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1608 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1609 echo "$as_me:1609: checking for $ac_word" >&5
1610 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1611 if test "${ac_cv_prog_CC+set}" = set; then
1612   echo $ECHO_N "(cached) $ECHO_C" >&6
1613 else
1614   if test -n "$CC"; then
1615   ac_cv_prog_CC="$CC" # Let the user override the test.
1616 else
1617   ac_save_IFS=$IFS; IFS=$ac_path_separator
1618 ac_dummy="$PATH"
1619 for ac_dir in $ac_dummy; do
1620   IFS=$ac_save_IFS
1621   test -z "$ac_dir" && ac_dir=.
1622   $as_executable_p "$ac_dir/$ac_word" || continue
1623 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1624 echo "$as_me:1624: found $ac_dir/$ac_word" >&5
1625 break
1626 done
1627
1628 fi
1629 fi
1630 CC=$ac_cv_prog_CC
1631 if test -n "$CC"; then
1632   echo "$as_me:1632: result: $CC" >&5
1633 echo "${ECHO_T}$CC" >&6
1634 else
1635   echo "$as_me:1635: result: no" >&5
1636 echo "${ECHO_T}no" >&6
1637 fi
1638
1639     test -n "$CC" && break
1640   done
1641 fi
1642 if test -z "$CC"; then
1643   ac_ct_CC=$CC
1644   for ac_prog in cl
1645 do
1646   # Extract the first word of "$ac_prog", so it can be a program name with args.
1647 set dummy $ac_prog; ac_word=$2
1648 echo "$as_me:1648: checking for $ac_word" >&5
1649 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1650 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1651   echo $ECHO_N "(cached) $ECHO_C" >&6
1652 else
1653   if test -n "$ac_ct_CC"; then
1654   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1655 else
1656   ac_save_IFS=$IFS; IFS=$ac_path_separator
1657 ac_dummy="$PATH"
1658 for ac_dir in $ac_dummy; do
1659   IFS=$ac_save_IFS
1660   test -z "$ac_dir" && ac_dir=.
1661   $as_executable_p "$ac_dir/$ac_word" || continue
1662 ac_cv_prog_ac_ct_CC="$ac_prog"
1663 echo "$as_me:1663: found $ac_dir/$ac_word" >&5
1664 break
1665 done
1666
1667 fi
1668 fi
1669 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1670 if test -n "$ac_ct_CC"; then
1671   echo "$as_me:1671: result: $ac_ct_CC" >&5
1672 echo "${ECHO_T}$ac_ct_CC" >&6
1673 else
1674   echo "$as_me:1674: result: no" >&5
1675 echo "${ECHO_T}no" >&6
1676 fi
1677
1678   test -n "$ac_ct_CC" && break
1679 done
1680
1681   CC=$ac_ct_CC
1682 fi
1683
1684 fi
1685
1686 test -z "$CC" && { { echo "$as_me:1686: error: no acceptable cc found in \$PATH" >&5
1687 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1688    { (exit 1); exit 1; }; }
1689
1690 # Provide some information about the compiler.
1691 echo "$as_me:1691:" \
1692      "checking for C compiler version" >&5
1693 ac_compiler=`set X $ac_compile; echo $2`
1694 { (eval echo "$as_me:1694: \"$ac_compiler --version </dev/null >&5\"") >&5
1695   (eval $ac_compiler --version </dev/null >&5) 2>&5
1696   ac_status=$?
1697   echo "$as_me:1697: \$? = $ac_status" >&5
1698   (exit $ac_status); }
1699 { (eval echo "$as_me:1699: \"$ac_compiler -v </dev/null >&5\"") >&5
1700   (eval $ac_compiler -v </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
1710 cat >conftest.$ac_ext <<_ACEOF
1711 #line 1711 "configure"
1712 #include "confdefs.h"
1713
1714 int
1715 main ()
1716 {
1717
1718   ;
1719   return 0;
1720 }
1721 _ACEOF
1722 ac_clean_files_save=$ac_clean_files
1723 ac_clean_files="$ac_clean_files a.out a.exe"
1724 # Try to create an executable without -o first, disregard a.out.
1725 # It will help us diagnose broken compilers, and finding out an intuition
1726 # of exeext.
1727 echo "$as_me:1727: checking for C compiler default output" >&5
1728 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1729 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1730 if { (eval echo "$as_me:1730: \"$ac_link_default\"") >&5
1731   (eval $ac_link_default) 2>&5
1732   ac_status=$?
1733   echo "$as_me:1733: \$? = $ac_status" >&5
1734   (exit $ac_status); }; then
1735   # Find the output, starting from the most likely.  This scheme is
1736 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1737 # resort.
1738 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1739                 ls a.out conftest 2>/dev/null;
1740                 ls a.* conftest.* 2>/dev/null`; do
1741   case $ac_file in
1742     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1743     a.out ) # We found the default executable, but exeext='' is most
1744             # certainly right.
1745             break;;
1746     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1747           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1748           export ac_cv_exeext
1749           break;;
1750     * ) break;;
1751   esac
1752 done
1753 else
1754   echo "$as_me: failed program was:" >&5
1755 cat conftest.$ac_ext >&5
1756 { { echo "$as_me:1756: error: C compiler cannot create executables" >&5
1757 echo "$as_me: error: C compiler cannot create executables" >&2;}
1758    { (exit 77); exit 77; }; }
1759 fi
1760
1761 ac_exeext=$ac_cv_exeext
1762 echo "$as_me:1762: result: $ac_file" >&5
1763 echo "${ECHO_T}$ac_file" >&6
1764
1765 # Check the compiler produces executables we can run.  If not, either
1766 # the compiler is broken, or we cross compile.
1767 echo "$as_me:1767: checking whether the C compiler works" >&5
1768 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1769 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1770 # If not cross compiling, check that we can run a simple program.
1771 if test "$cross_compiling" != yes; then
1772   if { ac_try='./$ac_file'
1773   { (eval echo "$as_me:1773: \"$ac_try\"") >&5
1774   (eval $ac_try) 2>&5
1775   ac_status=$?
1776   echo "$as_me:1776: \$? = $ac_status" >&5
1777   (exit $ac_status); }; }; then
1778     cross_compiling=no
1779   else
1780     if test "$cross_compiling" = maybe; then
1781         cross_compiling=yes
1782     else
1783         { { echo "$as_me:1783: error: cannot run C compiled programs.
1784 If you meant to cross compile, use \`--host'." >&5
1785 echo "$as_me: error: cannot run C compiled programs.
1786 If you meant to cross compile, use \`--host'." >&2;}
1787    { (exit 1); exit 1; }; }
1788     fi
1789   fi
1790 fi
1791 echo "$as_me:1791: result: yes" >&5
1792 echo "${ECHO_T}yes" >&6
1793
1794 rm -f a.out a.exe conftest$ac_cv_exeext
1795 ac_clean_files=$ac_clean_files_save
1796 # Check the compiler produces executables we can run.  If not, either
1797 # the compiler is broken, or we cross compile.
1798 echo "$as_me:1798: checking whether we are cross compiling" >&5
1799 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1800 echo "$as_me:1800: result: $cross_compiling" >&5
1801 echo "${ECHO_T}$cross_compiling" >&6
1802
1803 echo "$as_me:1803: checking for executable suffix" >&5
1804 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1805 if { (eval echo "$as_me:1805: \"$ac_link\"") >&5
1806   (eval $ac_link) 2>&5
1807   ac_status=$?
1808   echo "$as_me:1808: \$? = $ac_status" >&5
1809   (exit $ac_status); }; then
1810   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1811 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1812 # work properly (i.e., refer to `conftest.exe'), while it won't with
1813 # `rm'.
1814 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1815   case $ac_file in
1816     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1817     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1818           export ac_cv_exeext
1819           break;;
1820     * ) break;;
1821   esac
1822 done
1823 else
1824   { { echo "$as_me:1824: error: cannot compute EXEEXT: cannot compile and link" >&5
1825 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1826    { (exit 1); exit 1; }; }
1827 fi
1828
1829 rm -f conftest$ac_cv_exeext
1830 echo "$as_me:1830: result: $ac_cv_exeext" >&5
1831 echo "${ECHO_T}$ac_cv_exeext" >&6
1832
1833 rm -f conftest.$ac_ext
1834 EXEEXT=$ac_cv_exeext
1835 ac_exeext=$EXEEXT
1836 echo "$as_me:1836: checking for object suffix" >&5
1837 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1838 if test "${ac_cv_objext+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   cat >conftest.$ac_ext <<_ACEOF
1842 #line 1842 "configure"
1843 #include "confdefs.h"
1844
1845 int
1846 main ()
1847 {
1848
1849   ;
1850   return 0;
1851 }
1852 _ACEOF
1853 rm -f conftest.o conftest.obj
1854 if { (eval echo "$as_me:1854: \"$ac_compile\"") >&5
1855   (eval $ac_compile) 2>&5
1856   ac_status=$?
1857   echo "$as_me:1857: \$? = $ac_status" >&5
1858   (exit $ac_status); }; then
1859   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1860   case $ac_file in
1861     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1862     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1863        break;;
1864   esac
1865 done
1866 else
1867   echo "$as_me: failed program was:" >&5
1868 cat conftest.$ac_ext >&5
1869 { { echo "$as_me:1869: error: cannot compute OBJEXT: cannot compile" >&5
1870 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1871    { (exit 1); exit 1; }; }
1872 fi
1873
1874 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1875 fi
1876 echo "$as_me:1876: result: $ac_cv_objext" >&5
1877 echo "${ECHO_T}$ac_cv_objext" >&6
1878 OBJEXT=$ac_cv_objext
1879 ac_objext=$OBJEXT
1880 echo "$as_me:1880: checking whether we are using the GNU C compiler" >&5
1881 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1882 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1883   echo $ECHO_N "(cached) $ECHO_C" >&6
1884 else
1885   cat >conftest.$ac_ext <<_ACEOF
1886 #line 1886 "configure"
1887 #include "confdefs.h"
1888
1889 int
1890 main ()
1891 {
1892 #ifndef __GNUC__
1893        choke me
1894 #endif
1895
1896   ;
1897   return 0;
1898 }
1899 _ACEOF
1900 rm -f conftest.$ac_objext
1901 if { (eval echo "$as_me:1901: \"$ac_compile\"") >&5
1902   (eval $ac_compile) 2>&5
1903   ac_status=$?
1904   echo "$as_me:1904: \$? = $ac_status" >&5
1905   (exit $ac_status); } &&
1906          { ac_try='test -s conftest.$ac_objext'
1907   { (eval echo "$as_me:1907: \"$ac_try\"") >&5
1908   (eval $ac_try) 2>&5
1909   ac_status=$?
1910   echo "$as_me:1910: \$? = $ac_status" >&5
1911   (exit $ac_status); }; }; then
1912   ac_compiler_gnu=yes
1913 else
1914   echo "$as_me: failed program was:" >&5
1915 cat conftest.$ac_ext >&5
1916 ac_compiler_gnu=no
1917 fi
1918 rm -f conftest.$ac_objext conftest.$ac_ext
1919 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1920
1921 fi
1922 echo "$as_me:1922: result: $ac_cv_c_compiler_gnu" >&5
1923 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1924 GCC=`test $ac_compiler_gnu = yes && echo yes`
1925 ac_test_CFLAGS=${CFLAGS+set}
1926 ac_save_CFLAGS=$CFLAGS
1927 CFLAGS="-g"
1928 echo "$as_me:1928: checking whether $CC accepts -g" >&5
1929 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1930 if test "${ac_cv_prog_cc_g+set}" = set; then
1931   echo $ECHO_N "(cached) $ECHO_C" >&6
1932 else
1933   cat >conftest.$ac_ext <<_ACEOF
1934 #line 1934 "configure"
1935 #include "confdefs.h"
1936
1937 int
1938 main ()
1939 {
1940
1941   ;
1942   return 0;
1943 }
1944 _ACEOF
1945 rm -f conftest.$ac_objext
1946 if { (eval echo "$as_me:1946: \"$ac_compile\"") >&5
1947   (eval $ac_compile) 2>&5
1948   ac_status=$?
1949   echo "$as_me:1949: \$? = $ac_status" >&5
1950   (exit $ac_status); } &&
1951          { ac_try='test -s conftest.$ac_objext'
1952   { (eval echo "$as_me:1952: \"$ac_try\"") >&5
1953   (eval $ac_try) 2>&5
1954   ac_status=$?
1955   echo "$as_me:1955: \$? = $ac_status" >&5
1956   (exit $ac_status); }; }; then
1957   ac_cv_prog_cc_g=yes
1958 else
1959   echo "$as_me: failed program was:" >&5
1960 cat conftest.$ac_ext >&5
1961 ac_cv_prog_cc_g=no
1962 fi
1963 rm -f conftest.$ac_objext conftest.$ac_ext
1964 fi
1965 echo "$as_me:1965: result: $ac_cv_prog_cc_g" >&5
1966 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1967 if test "$ac_test_CFLAGS" = set; then
1968   CFLAGS=$ac_save_CFLAGS
1969 elif test $ac_cv_prog_cc_g = yes; then
1970   if test "$GCC" = yes; then
1971     CFLAGS="-g -O2"
1972   else
1973     CFLAGS="-g"
1974   fi
1975 else
1976   if test "$GCC" = yes; then
1977     CFLAGS="-O2"
1978   else
1979     CFLAGS=
1980   fi
1981 fi
1982 # Some people use a C++ compiler to compile C.  Since we use `exit',
1983 # in C++ we need to declare it.  In case someone uses the same compiler
1984 # for both compiling C and C++ we need to have the C++ compiler decide
1985 # the declaration of exit, since it's the most demanding environment.
1986 cat >conftest.$ac_ext <<_ACEOF
1987 #ifndef __cplusplus
1988   choke me
1989 #endif
1990 _ACEOF
1991 rm -f conftest.$ac_objext
1992 if { (eval echo "$as_me:1992: \"$ac_compile\"") >&5
1993   (eval $ac_compile) 2>&5
1994   ac_status=$?
1995   echo "$as_me:1995: \$? = $ac_status" >&5
1996   (exit $ac_status); } &&
1997          { ac_try='test -s conftest.$ac_objext'
1998   { (eval echo "$as_me:1998: \"$ac_try\"") >&5
1999   (eval $ac_try) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit $ac_status); }; }; then
2003   for ac_declaration in \
2004    ''\
2005    '#include <stdlib.h>' \
2006    'extern "C" void std::exit (int) throw (); using std::exit;' \
2007    'extern "C" void std::exit (int); using std::exit;' \
2008    'extern "C" void exit (int) throw ();' \
2009    'extern "C" void exit (int);' \
2010    'void exit (int);'
2011 do
2012   cat >conftest.$ac_ext <<_ACEOF
2013 #line 2013 "configure"
2014 #include "confdefs.h"
2015 #include <stdlib.h>
2016 $ac_declaration
2017 int
2018 main ()
2019 {
2020 exit (42);
2021   ;
2022   return 0;
2023 }
2024 _ACEOF
2025 rm -f conftest.$ac_objext
2026 if { (eval echo "$as_me:2026: \"$ac_compile\"") >&5
2027   (eval $ac_compile) 2>&5
2028   ac_status=$?
2029   echo "$as_me:2029: \$? = $ac_status" >&5
2030   (exit $ac_status); } &&
2031          { ac_try='test -s conftest.$ac_objext'
2032   { (eval echo "$as_me:2032: \"$ac_try\"") >&5
2033   (eval $ac_try) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit $ac_status); }; }; then
2037   :
2038 else
2039   echo "$as_me: failed program was:" >&5
2040 cat conftest.$ac_ext >&5
2041 continue
2042 fi
2043 rm -f conftest.$ac_objext conftest.$ac_ext
2044   cat >conftest.$ac_ext <<_ACEOF
2045 #line 2045 "configure"
2046 #include "confdefs.h"
2047 $ac_declaration
2048 int
2049 main ()
2050 {
2051 exit (42);
2052   ;
2053   return 0;
2054 }
2055 _ACEOF
2056 rm -f conftest.$ac_objext
2057 if { (eval echo "$as_me:2057: \"$ac_compile\"") >&5
2058   (eval $ac_compile) 2>&5
2059   ac_status=$?
2060   echo "$as_me:2060: \$? = $ac_status" >&5
2061   (exit $ac_status); } &&
2062          { ac_try='test -s conftest.$ac_objext'
2063   { (eval echo "$as_me:2063: \"$ac_try\"") >&5
2064   (eval $ac_try) 2>&5
2065   ac_status=$?
2066   echo "$as_me:2066: \$? = $ac_status" >&5
2067   (exit $ac_status); }; }; then
2068   break
2069 else
2070   echo "$as_me: failed program was:" >&5
2071 cat conftest.$ac_ext >&5
2072 fi
2073 rm -f conftest.$ac_objext conftest.$ac_ext
2074 done
2075 rm -f conftest*
2076 if test -n "$ac_declaration"; then
2077   echo '#ifdef __cplusplus' >>confdefs.h
2078   echo $ac_declaration      >>confdefs.h
2079   echo '#endif'             >>confdefs.h
2080 fi
2081
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat conftest.$ac_ext >&5
2085 fi
2086 rm -f conftest.$ac_objext conftest.$ac_ext
2087 ac_ext=c
2088 ac_cpp='$CPP $CPPFLAGS'
2089 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2090 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2091 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2092 ac_main_return=return
2093
2094 GCC_VERSION=none
2095 if test "$GCC" = yes ; then
2096         echo "$as_me:2096: checking version of $CC" >&5
2097 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2098         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2099         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2100         echo "$as_me:2100: result: $GCC_VERSION" >&5
2101 echo "${ECHO_T}$GCC_VERSION" >&6
2102 fi
2103
2104 ac_ext=c
2105 ac_cpp='$CPP $CPPFLAGS'
2106 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2107 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2108 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2109 ac_main_return=return
2110 echo "$as_me:2110: checking how to run the C preprocessor" >&5
2111 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2112 # On Suns, sometimes $CPP names a directory.
2113 if test -n "$CPP" && test -d "$CPP"; then
2114   CPP=
2115 fi
2116 if test -z "$CPP"; then
2117   if test "${ac_cv_prog_CPP+set}" = set; then
2118   echo $ECHO_N "(cached) $ECHO_C" >&6
2119 else
2120       # Double quotes because CPP needs to be expanded
2121     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2122     do
2123       ac_preproc_ok=false
2124 for ac_c_preproc_warn_flag in '' yes
2125 do
2126   # Use a header file that comes with gcc, so configuring glibc
2127   # with a fresh cross-compiler works.
2128   # On the NeXT, cc -E runs the code through the compiler's parser,
2129   # not just through cpp. "Syntax error" is here to catch this case.
2130   cat >conftest.$ac_ext <<_ACEOF
2131 #line 2131 "configure"
2132 #include "confdefs.h"
2133 #include <assert.h>
2134                      Syntax error
2135 _ACEOF
2136 if { (eval echo "$as_me:2136: \"$ac_cpp conftest.$ac_ext\"") >&5
2137   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2138   ac_status=$?
2139   egrep -v '^ *\+' conftest.er1 >conftest.err
2140   rm -f conftest.er1
2141   cat conftest.err >&5
2142   echo "$as_me:2142: \$? = $ac_status" >&5
2143   (exit $ac_status); } >/dev/null; then
2144   if test -s conftest.err; then
2145     ac_cpp_err=$ac_c_preproc_warn_flag
2146   else
2147     ac_cpp_err=
2148   fi
2149 else
2150   ac_cpp_err=yes
2151 fi
2152 if test -z "$ac_cpp_err"; then
2153   :
2154 else
2155   echo "$as_me: failed program was:" >&5
2156   cat conftest.$ac_ext >&5
2157   # Broken: fails on valid input.
2158 continue
2159 fi
2160 rm -f conftest.err conftest.$ac_ext
2161
2162   # OK, works on sane cases.  Now check whether non-existent headers
2163   # can be detected and how.
2164   cat >conftest.$ac_ext <<_ACEOF
2165 #line 2165 "configure"
2166 #include "confdefs.h"
2167 #include <ac_nonexistent.h>
2168 _ACEOF
2169 if { (eval echo "$as_me:2169: \"$ac_cpp conftest.$ac_ext\"") >&5
2170   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2171   ac_status=$?
2172   egrep -v '^ *\+' conftest.er1 >conftest.err
2173   rm -f conftest.er1
2174   cat conftest.err >&5
2175   echo "$as_me:2175: \$? = $ac_status" >&5
2176   (exit $ac_status); } >/dev/null; then
2177   if test -s conftest.err; then
2178     ac_cpp_err=$ac_c_preproc_warn_flag
2179   else
2180     ac_cpp_err=
2181   fi
2182 else
2183   ac_cpp_err=yes
2184 fi
2185 if test -z "$ac_cpp_err"; then
2186   # Broken: success on invalid input.
2187 continue
2188 else
2189   echo "$as_me: failed program was:" >&5
2190   cat conftest.$ac_ext >&5
2191   # Passes both tests.
2192 ac_preproc_ok=:
2193 break
2194 fi
2195 rm -f conftest.err conftest.$ac_ext
2196
2197 done
2198 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2199 rm -f conftest.err conftest.$ac_ext
2200 if $ac_preproc_ok; then
2201   break
2202 fi
2203
2204     done
2205     ac_cv_prog_CPP=$CPP
2206
2207 fi
2208   CPP=$ac_cv_prog_CPP
2209 else
2210   ac_cv_prog_CPP=$CPP
2211 fi
2212 echo "$as_me:2212: result: $CPP" >&5
2213 echo "${ECHO_T}$CPP" >&6
2214 ac_preproc_ok=false
2215 for ac_c_preproc_warn_flag in '' yes
2216 do
2217   # Use a header file that comes with gcc, so configuring glibc
2218   # with a fresh cross-compiler works.
2219   # On the NeXT, cc -E runs the code through the compiler's parser,
2220   # not just through cpp. "Syntax error" is here to catch this case.
2221   cat >conftest.$ac_ext <<_ACEOF
2222 #line 2222 "configure"
2223 #include "confdefs.h"
2224 #include <assert.h>
2225                      Syntax error
2226 _ACEOF
2227 if { (eval echo "$as_me:2227: \"$ac_cpp conftest.$ac_ext\"") >&5
2228   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2229   ac_status=$?
2230   egrep -v '^ *\+' conftest.er1 >conftest.err
2231   rm -f conftest.er1
2232   cat conftest.err >&5
2233   echo "$as_me:2233: \$? = $ac_status" >&5
2234   (exit $ac_status); } >/dev/null; then
2235   if test -s conftest.err; then
2236     ac_cpp_err=$ac_c_preproc_warn_flag
2237   else
2238     ac_cpp_err=
2239   fi
2240 else
2241   ac_cpp_err=yes
2242 fi
2243 if test -z "$ac_cpp_err"; then
2244   :
2245 else
2246   echo "$as_me: failed program was:" >&5
2247   cat conftest.$ac_ext >&5
2248   # Broken: fails on valid input.
2249 continue
2250 fi
2251 rm -f conftest.err conftest.$ac_ext
2252
2253   # OK, works on sane cases.  Now check whether non-existent headers
2254   # can be detected and how.
2255   cat >conftest.$ac_ext <<_ACEOF
2256 #line 2256 "configure"
2257 #include "confdefs.h"
2258 #include <ac_nonexistent.h>
2259 _ACEOF
2260 if { (eval echo "$as_me:2260: \"$ac_cpp conftest.$ac_ext\"") >&5
2261   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2262   ac_status=$?
2263   egrep -v '^ *\+' conftest.er1 >conftest.err
2264   rm -f conftest.er1
2265   cat conftest.err >&5
2266   echo "$as_me:2266: \$? = $ac_status" >&5
2267   (exit $ac_status); } >/dev/null; then
2268   if test -s conftest.err; then
2269     ac_cpp_err=$ac_c_preproc_warn_flag
2270   else
2271     ac_cpp_err=
2272   fi
2273 else
2274   ac_cpp_err=yes
2275 fi
2276 if test -z "$ac_cpp_err"; then
2277   # Broken: success on invalid input.
2278 continue
2279 else
2280   echo "$as_me: failed program was:" >&5
2281   cat conftest.$ac_ext >&5
2282   # Passes both tests.
2283 ac_preproc_ok=:
2284 break
2285 fi
2286 rm -f conftest.err conftest.$ac_ext
2287
2288 done
2289 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2290 rm -f conftest.err conftest.$ac_ext
2291 if $ac_preproc_ok; then
2292   :
2293 else
2294   { { echo "$as_me:2294: error: C preprocessor \"$CPP\" fails sanity check" >&5
2295 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2296    { (exit 1); exit 1; }; }
2297 fi
2298
2299 ac_ext=c
2300 ac_cpp='$CPP $CPPFLAGS'
2301 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2302 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2303 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2304 ac_main_return=return
2305
2306 if test $ac_cv_c_compiler_gnu = yes; then
2307     echo "$as_me:2307: checking whether $CC needs -traditional" >&5
2308 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2309 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2310   echo $ECHO_N "(cached) $ECHO_C" >&6
2311 else
2312     ac_pattern="Autoconf.*'x'"
2313   cat >conftest.$ac_ext <<_ACEOF
2314 #line 2314 "configure"
2315 #include "confdefs.h"
2316 #include <sgtty.h>
2317 int Autoconf = TIOCGETP;
2318 _ACEOF
2319 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2320   egrep "$ac_pattern" >/dev/null 2>&1; then
2321   ac_cv_prog_gcc_traditional=yes
2322 else
2323   ac_cv_prog_gcc_traditional=no
2324 fi
2325 rm -f conftest*
2326
2327   if test $ac_cv_prog_gcc_traditional = no; then
2328     cat >conftest.$ac_ext <<_ACEOF
2329 #line 2329 "configure"
2330 #include "confdefs.h"
2331 #include <termio.h>
2332 int Autoconf = TCGETA;
2333 _ACEOF
2334 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2335   egrep "$ac_pattern" >/dev/null 2>&1; then
2336   ac_cv_prog_gcc_traditional=yes
2337 fi
2338 rm -f conftest*
2339
2340   fi
2341 fi
2342 echo "$as_me:2342: result: $ac_cv_prog_gcc_traditional" >&5
2343 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2344   if test $ac_cv_prog_gcc_traditional = yes; then
2345     CC="$CC -traditional"
2346   fi
2347 fi
2348
2349 echo "$as_me:2349: checking whether $CC understands -c and -o together" >&5
2350 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2351 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2352   echo $ECHO_N "(cached) $ECHO_C" >&6
2353 else
2354
2355 cat > conftest.$ac_ext <<CF_EOF
2356 #include <stdio.h>
2357 int main()
2358 {
2359         ${cf_cv_main_return:-return}(0);
2360 }
2361 CF_EOF
2362 # We do the test twice because some compilers refuse to overwrite an
2363 # existing .o file with -o, though they will create one.
2364 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2365 if { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit $ac_status); } &&
2370   test -f conftest2.$ac_objext && { (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 then
2376   eval cf_cv_prog_CC_c_o=yes
2377 else
2378   eval cf_cv_prog_CC_c_o=no
2379 fi
2380 rm -f conftest*
2381
2382 fi
2383 if test $cf_cv_prog_CC_c_o = yes; then
2384   echo "$as_me:2384: result: yes" >&5
2385 echo "${ECHO_T}yes" >&6
2386 else
2387   echo "$as_me:2387: result: no" >&5
2388 echo "${ECHO_T}no" >&6
2389 fi
2390
2391 echo "$as_me:2391: checking for POSIXized ISC" >&5
2392 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2393 if test -d /etc/conf/kconfig.d &&
2394    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2395 then
2396   echo "$as_me:2396: result: yes" >&5
2397 echo "${ECHO_T}yes" >&6
2398   ISC=yes # If later tests want to check for ISC.
2399
2400 cat >>confdefs.h <<\EOF
2401 #define _POSIX_SOURCE 1
2402 EOF
2403
2404   if test "$GCC" = yes; then
2405     CC="$CC -posix"
2406   else
2407     CC="$CC -Xp"
2408   fi
2409 else
2410   echo "$as_me:2410: result: no" >&5
2411 echo "${ECHO_T}no" >&6
2412   ISC=
2413 fi
2414
2415 echo "$as_me:2415: checking for ${CC-cc} option to accept ANSI C" >&5
2416 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2417 if test "${cf_cv_ansi_cc+set}" = set; then
2418   echo $ECHO_N "(cached) $ECHO_C" >&6
2419 else
2420
2421 cf_cv_ansi_cc=no
2422 cf_save_CFLAGS="$CFLAGS"
2423 cf_save_CPPFLAGS="$CPPFLAGS"
2424 # Don't try gcc -ansi; that turns off useful extensions and
2425 # breaks some systems' header files.
2426 # AIX                   -qlanglvl=ansi
2427 # Ultrix and OSF/1      -std1
2428 # HP-UX                 -Aa -D_HPUX_SOURCE
2429 # SVR4                  -Xc
2430 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2431 for cf_arg in "-DCC_HAS_PROTOS" \
2432         "" \
2433         -qlanglvl=ansi \
2434         -std1 \
2435         -Ae \
2436         "-Aa -D_HPUX_SOURCE" \
2437         -Xc
2438 do
2439
2440 cf_fix_cppflags=no
2441 cf_new_cflags=
2442 cf_new_cppflags=
2443 cf_new_extra_cppflags=
2444
2445 for cf_add_cflags in $cf_arg
2446 do
2447 case $cf_fix_cppflags in
2448 no)
2449         case $cf_add_cflags in #(vi
2450         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2451                 case $cf_add_cflags in
2452                 -D*)
2453                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2454
2455                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2456                         && test -z "${cf_tst_cflags}" \
2457                         && cf_fix_cppflags=yes
2458
2459                         if test $cf_fix_cppflags = yes ; then
2460                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2461                                 continue
2462                         elif test "${cf_tst_cflags}" = "\"'" ; then
2463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2464                                 continue
2465                         fi
2466                         ;;
2467                 esac
2468                 case "$CPPFLAGS" in
2469                 *$cf_add_cflags) #(vi
2470                         ;;
2471                 *) #(vi
2472                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2473                         ;;
2474                 esac
2475                 ;;
2476         *)
2477                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2478                 ;;
2479         esac
2480         ;;
2481 yes)
2482         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2483
2484         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2485
2486         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2487         && test -z "${cf_tst_cflags}" \
2488         && cf_fix_cppflags=no
2489         ;;
2490 esac
2491 done
2492
2493 if test -n "$cf_new_cflags" ; then
2494
2495         CFLAGS="$CFLAGS $cf_new_cflags"
2496 fi
2497
2498 if test -n "$cf_new_cppflags" ; then
2499
2500         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2501 fi
2502
2503 if test -n "$cf_new_extra_cppflags" ; then
2504
2505         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2506 fi
2507
2508         cat >conftest.$ac_ext <<_ACEOF
2509 #line 2509 "configure"
2510 #include "confdefs.h"
2511
2512 #ifndef CC_HAS_PROTOS
2513 #if !defined(__STDC__) || (__STDC__ != 1)
2514 choke me
2515 #endif
2516 #endif
2517
2518 int
2519 main ()
2520 {
2521
2522         int test (int i, double x);
2523         struct s1 {int (*f) (int a);};
2524         struct s2 {int (*f) (double a);};
2525   ;
2526   return 0;
2527 }
2528 _ACEOF
2529 rm -f conftest.$ac_objext
2530 if { (eval echo "$as_me:2530: \"$ac_compile\"") >&5
2531   (eval $ac_compile) 2>&5
2532   ac_status=$?
2533   echo "$as_me:2533: \$? = $ac_status" >&5
2534   (exit $ac_status); } &&
2535          { ac_try='test -s conftest.$ac_objext'
2536   { (eval echo "$as_me:2536: \"$ac_try\"") >&5
2537   (eval $ac_try) 2>&5
2538   ac_status=$?
2539   echo "$as_me:2539: \$? = $ac_status" >&5
2540   (exit $ac_status); }; }; then
2541   cf_cv_ansi_cc="$cf_arg"; break
2542 else
2543   echo "$as_me: failed program was:" >&5
2544 cat conftest.$ac_ext >&5
2545 fi
2546 rm -f conftest.$ac_objext conftest.$ac_ext
2547 done
2548 CFLAGS="$cf_save_CFLAGS"
2549 CPPFLAGS="$cf_save_CPPFLAGS"
2550
2551 fi
2552 echo "$as_me:2552: result: $cf_cv_ansi_cc" >&5
2553 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2554
2555 if test "$cf_cv_ansi_cc" != "no"; then
2556 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2557
2558 cf_fix_cppflags=no
2559 cf_new_cflags=
2560 cf_new_cppflags=
2561 cf_new_extra_cppflags=
2562
2563 for cf_add_cflags in $cf_cv_ansi_cc
2564 do
2565 case $cf_fix_cppflags in
2566 no)
2567         case $cf_add_cflags in #(vi
2568         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2569                 case $cf_add_cflags in
2570                 -D*)
2571                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2572
2573                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2574                         && test -z "${cf_tst_cflags}" \
2575                         && cf_fix_cppflags=yes
2576
2577                         if test $cf_fix_cppflags = yes ; then
2578                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2579                                 continue
2580                         elif test "${cf_tst_cflags}" = "\"'" ; then
2581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2582                                 continue
2583                         fi
2584                         ;;
2585                 esac
2586                 case "$CPPFLAGS" in
2587                 *$cf_add_cflags) #(vi
2588                         ;;
2589                 *) #(vi
2590                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2591                         ;;
2592                 esac
2593                 ;;
2594         *)
2595                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2596                 ;;
2597         esac
2598         ;;
2599 yes)
2600         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2601
2602         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2603
2604         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2605         && test -z "${cf_tst_cflags}" \
2606         && cf_fix_cppflags=no
2607         ;;
2608 esac
2609 done
2610
2611 if test -n "$cf_new_cflags" ; then
2612
2613         CFLAGS="$CFLAGS $cf_new_cflags"
2614 fi
2615
2616 if test -n "$cf_new_cppflags" ; then
2617
2618         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
2619 fi
2620
2621 if test -n "$cf_new_extra_cppflags" ; then
2622
2623         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2624 fi
2625
2626 else
2627         cat >>confdefs.h <<\EOF
2628 #define CC_HAS_PROTOS 1
2629 EOF
2630
2631 fi
2632 fi
2633
2634 if test "$cf_cv_ansi_cc" = "no"; then
2635         { { echo "$as_me:2635: error: Your compiler does not appear to recognize prototypes.
2636 You have the following choices:
2637         a. adjust your compiler options
2638         b. get an up-to-date compiler
2639         c. use a wrapper such as unproto" >&5
2640 echo "$as_me: 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" >&2;}
2645    { (exit 1); exit 1; }; }
2646 fi
2647
2648 case $cf_cv_system_name in
2649 os2*)
2650     CFLAGS="$CFLAGS -Zmt"
2651     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2652     CXXFLAGS="$CXXFLAGS -Zmt"
2653     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2654     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2655     ac_cv_exeext=.exe
2656     ;;
2657 esac
2658
2659 PROG_EXT="$EXEEXT"
2660
2661 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2662 #define PROG_EXT "$PROG_EXT"
2663 EOF
2664
2665 if test "$cross_compiling" = yes ; then
2666   LDCONFIG=:
2667 else
2668 case "$cf_cv_system_name" in #(vi
2669 dragonfly*|freebsd*) #(vi
2670   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2671   ;;
2672 *) LDPATH=$PATH:/sbin:/usr/sbin
2673   # Extract the first word of "ldconfig", so it can be a program name with args.
2674 set dummy ldconfig; ac_word=$2
2675 echo "$as_me:2675: checking for $ac_word" >&5
2676 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2677 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2678   echo $ECHO_N "(cached) $ECHO_C" >&6
2679 else
2680   case $LDCONFIG in
2681   [\\/]* | ?:[\\/]*)
2682   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2683   ;;
2684   *)
2685   ac_save_IFS=$IFS; IFS=$ac_path_separator
2686 ac_dummy="$LDPATH"
2687 for ac_dir in $ac_dummy; do
2688   IFS=$ac_save_IFS
2689   test -z "$ac_dir" && ac_dir=.
2690   if $as_executable_p "$ac_dir/$ac_word"; then
2691    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2692    echo "$as_me:2692: found $ac_dir/$ac_word" >&5
2693    break
2694 fi
2695 done
2696
2697   ;;
2698 esac
2699 fi
2700 LDCONFIG=$ac_cv_path_LDCONFIG
2701
2702 if test -n "$LDCONFIG"; then
2703   echo "$as_me:2703: result: $LDCONFIG" >&5
2704 echo "${ECHO_T}$LDCONFIG" >&6
2705 else
2706   echo "$as_me:2706: result: no" >&5
2707 echo "${ECHO_T}no" >&6
2708 fi
2709
2710   ;;
2711 esac
2712 fi
2713
2714 echo "$as_me:2714: checking if you want to ensure bool is consistent with C++" >&5
2715 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2716
2717 # Check whether --with-cxx or --without-cxx was given.
2718 if test "${with_cxx+set}" = set; then
2719   withval="$with_cxx"
2720   cf_with_cxx=$withval
2721 else
2722   cf_with_cxx=yes
2723 fi;
2724 echo "$as_me:2724: result: $cf_with_cxx" >&5
2725 echo "${ECHO_T}$cf_with_cxx" >&6
2726 if test "X$cf_with_cxx" = Xno ; then
2727         CXX=""
2728         GXX=""
2729 else
2730         # with autoconf 2.13, we can change the error to a warning:
2731                 ac_ext=cc
2732 ac_cpp='$CXXCPP $CPPFLAGS'
2733 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2734 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2735 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2736 ac_main_return=return
2737 if test -n "$ac_tool_prefix"; then
2738   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2739   do
2740     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2741 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2742 echo "$as_me:2742: checking for $ac_word" >&5
2743 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2744 if test "${ac_cv_prog_CXX+set}" = set; then
2745   echo $ECHO_N "(cached) $ECHO_C" >&6
2746 else
2747   if test -n "$CXX"; then
2748   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2749 else
2750   ac_save_IFS=$IFS; IFS=$ac_path_separator
2751 ac_dummy="$PATH"
2752 for ac_dir in $ac_dummy; do
2753   IFS=$ac_save_IFS
2754   test -z "$ac_dir" && ac_dir=.
2755   $as_executable_p "$ac_dir/$ac_word" || continue
2756 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2757 echo "$as_me:2757: found $ac_dir/$ac_word" >&5
2758 break
2759 done
2760
2761 fi
2762 fi
2763 CXX=$ac_cv_prog_CXX
2764 if test -n "$CXX"; then
2765   echo "$as_me:2765: result: $CXX" >&5
2766 echo "${ECHO_T}$CXX" >&6
2767 else
2768   echo "$as_me:2768: result: no" >&5
2769 echo "${ECHO_T}no" >&6
2770 fi
2771
2772     test -n "$CXX" && break
2773   done
2774 fi
2775 if test -z "$CXX"; then
2776   ac_ct_CXX=$CXX
2777   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2778 do
2779   # Extract the first word of "$ac_prog", so it can be a program name with args.
2780 set dummy $ac_prog; ac_word=$2
2781 echo "$as_me:2781: checking for $ac_word" >&5
2782 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2783 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2784   echo $ECHO_N "(cached) $ECHO_C" >&6
2785 else
2786   if test -n "$ac_ct_CXX"; then
2787   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2788 else
2789   ac_save_IFS=$IFS; IFS=$ac_path_separator
2790 ac_dummy="$PATH"
2791 for ac_dir in $ac_dummy; do
2792   IFS=$ac_save_IFS
2793   test -z "$ac_dir" && ac_dir=.
2794   $as_executable_p "$ac_dir/$ac_word" || continue
2795 ac_cv_prog_ac_ct_CXX="$ac_prog"
2796 echo "$as_me:2796: found $ac_dir/$ac_word" >&5
2797 break
2798 done
2799
2800 fi
2801 fi
2802 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2803 if test -n "$ac_ct_CXX"; then
2804   echo "$as_me:2804: result: $ac_ct_CXX" >&5
2805 echo "${ECHO_T}$ac_ct_CXX" >&6
2806 else
2807   echo "$as_me:2807: result: no" >&5
2808 echo "${ECHO_T}no" >&6
2809 fi
2810
2811   test -n "$ac_ct_CXX" && break
2812 done
2813 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2814
2815   CXX=$ac_ct_CXX
2816 fi
2817
2818 # Provide some information about the compiler.
2819 echo "$as_me:2819:" \
2820      "checking for C++ compiler version" >&5
2821 ac_compiler=`set X $ac_compile; echo $2`
2822 { (eval echo "$as_me:2822: \"$ac_compiler --version </dev/null >&5\"") >&5
2823   (eval $ac_compiler --version </dev/null >&5) 2>&5
2824   ac_status=$?
2825   echo "$as_me:2825: \$? = $ac_status" >&5
2826   (exit $ac_status); }
2827 { (eval echo "$as_me:2827: \"$ac_compiler -v </dev/null >&5\"") >&5
2828   (eval $ac_compiler -v </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
2838 echo "$as_me:2838: checking whether we are using the GNU C++ compiler" >&5
2839 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2840 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2841   echo $ECHO_N "(cached) $ECHO_C" >&6
2842 else
2843   cat >conftest.$ac_ext <<_ACEOF
2844 #line 2844 "configure"
2845 #include "confdefs.h"
2846
2847 int
2848 main ()
2849 {
2850 #ifndef __GNUC__
2851        choke me
2852 #endif
2853
2854   ;
2855   return 0;
2856 }
2857 _ACEOF
2858 rm -f conftest.$ac_objext
2859 if { (eval echo "$as_me:2859: \"$ac_compile\"") >&5
2860   (eval $ac_compile) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit $ac_status); } &&
2864          { ac_try='test -s conftest.$ac_objext'
2865   { (eval echo "$as_me:2865: \"$ac_try\"") >&5
2866   (eval $ac_try) 2>&5
2867   ac_status=$?
2868   echo "$as_me:2868: \$? = $ac_status" >&5
2869   (exit $ac_status); }; }; then
2870   ac_compiler_gnu=yes
2871 else
2872   echo "$as_me: failed program was:" >&5
2873 cat conftest.$ac_ext >&5
2874 ac_compiler_gnu=no
2875 fi
2876 rm -f conftest.$ac_objext conftest.$ac_ext
2877 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2878
2879 fi
2880 echo "$as_me:2880: result: $ac_cv_cxx_compiler_gnu" >&5
2881 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2882 GXX=`test $ac_compiler_gnu = yes && echo yes`
2883 ac_test_CXXFLAGS=${CXXFLAGS+set}
2884 ac_save_CXXFLAGS=$CXXFLAGS
2885 CXXFLAGS="-g"
2886 echo "$as_me:2886: checking whether $CXX accepts -g" >&5
2887 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2888 if test "${ac_cv_prog_cxx_g+set}" = set; then
2889   echo $ECHO_N "(cached) $ECHO_C" >&6
2890 else
2891   cat >conftest.$ac_ext <<_ACEOF
2892 #line 2892 "configure"
2893 #include "confdefs.h"
2894
2895 int
2896 main ()
2897 {
2898
2899   ;
2900   return 0;
2901 }
2902 _ACEOF
2903 rm -f conftest.$ac_objext
2904 if { (eval echo "$as_me:2904: \"$ac_compile\"") >&5
2905   (eval $ac_compile) 2>&5
2906   ac_status=$?
2907   echo "$as_me:2907: \$? = $ac_status" >&5
2908   (exit $ac_status); } &&
2909          { ac_try='test -s conftest.$ac_objext'
2910   { (eval echo "$as_me:2910: \"$ac_try\"") >&5
2911   (eval $ac_try) 2>&5
2912   ac_status=$?
2913   echo "$as_me:2913: \$? = $ac_status" >&5
2914   (exit $ac_status); }; }; then
2915   ac_cv_prog_cxx_g=yes
2916 else
2917   echo "$as_me: failed program was:" >&5
2918 cat conftest.$ac_ext >&5
2919 ac_cv_prog_cxx_g=no
2920 fi
2921 rm -f conftest.$ac_objext conftest.$ac_ext
2922 fi
2923 echo "$as_me:2923: result: $ac_cv_prog_cxx_g" >&5
2924 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2925 if test "$ac_test_CXXFLAGS" = set; then
2926   CXXFLAGS=$ac_save_CXXFLAGS
2927 elif test $ac_cv_prog_cxx_g = yes; then
2928   if test "$GXX" = yes; then
2929     CXXFLAGS="-g -O2"
2930   else
2931     CXXFLAGS="-g"
2932   fi
2933 else
2934   if test "$GXX" = yes; then
2935     CXXFLAGS="-O2"
2936   else
2937     CXXFLAGS=
2938   fi
2939 fi
2940 for ac_declaration in \
2941    ''\
2942    '#include <stdlib.h>' \
2943    'extern "C" void std::exit (int) throw (); using std::exit;' \
2944    'extern "C" void std::exit (int); using std::exit;' \
2945    'extern "C" void exit (int) throw ();' \
2946    'extern "C" void exit (int);' \
2947    'void exit (int);'
2948 do
2949   cat >conftest.$ac_ext <<_ACEOF
2950 #line 2950 "configure"
2951 #include "confdefs.h"
2952 #include <stdlib.h>
2953 $ac_declaration
2954 int
2955 main ()
2956 {
2957 exit (42);
2958   ;
2959   return 0;
2960 }
2961 _ACEOF
2962 rm -f conftest.$ac_objext
2963 if { (eval echo "$as_me:2963: \"$ac_compile\"") >&5
2964   (eval $ac_compile) 2>&5
2965   ac_status=$?
2966   echo "$as_me:2966: \$? = $ac_status" >&5
2967   (exit $ac_status); } &&
2968          { ac_try='test -s conftest.$ac_objext'
2969   { (eval echo "$as_me:2969: \"$ac_try\"") >&5
2970   (eval $ac_try) 2>&5
2971   ac_status=$?
2972   echo "$as_me:2972: \$? = $ac_status" >&5
2973   (exit $ac_status); }; }; then
2974   :
2975 else
2976   echo "$as_me: failed program was:" >&5
2977 cat conftest.$ac_ext >&5
2978 continue
2979 fi
2980 rm -f conftest.$ac_objext conftest.$ac_ext
2981   cat >conftest.$ac_ext <<_ACEOF
2982 #line 2982 "configure"
2983 #include "confdefs.h"
2984 $ac_declaration
2985 int
2986 main ()
2987 {
2988 exit (42);
2989   ;
2990   return 0;
2991 }
2992 _ACEOF
2993 rm -f conftest.$ac_objext
2994 if { (eval echo "$as_me:2994: \"$ac_compile\"") >&5
2995   (eval $ac_compile) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); } &&
2999          { ac_try='test -s conftest.$ac_objext'
3000   { (eval echo "$as_me:3000: \"$ac_try\"") >&5
3001   (eval $ac_try) 2>&5
3002   ac_status=$?
3003   echo "$as_me:3003: \$? = $ac_status" >&5
3004   (exit $ac_status); }; }; then
3005   break
3006 else
3007   echo "$as_me: failed program was:" >&5
3008 cat conftest.$ac_ext >&5
3009 fi
3010 rm -f conftest.$ac_objext conftest.$ac_ext
3011 done
3012 rm -f conftest*
3013 if test -n "$ac_declaration"; then
3014   echo '#ifdef __cplusplus' >>confdefs.h
3015   echo $ac_declaration      >>confdefs.h
3016   echo '#endif'             >>confdefs.h
3017 fi
3018
3019 ac_ext=c
3020 ac_cpp='$CPP $CPPFLAGS'
3021 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3022 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3023 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3024 ac_main_return=return
3025
3026                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3027         if test "$CXX" = "g++" ; then
3028                 # Extract the first word of "g++", so it can be a program name with args.
3029 set dummy g++; ac_word=$2
3030 echo "$as_me:3030: checking for $ac_word" >&5
3031 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3032 if test "${ac_cv_path_CXX+set}" = set; then
3033   echo $ECHO_N "(cached) $ECHO_C" >&6
3034 else
3035   case $CXX in
3036   [\\/]* | ?:[\\/]*)
3037   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3038   ;;
3039   *)
3040   ac_save_IFS=$IFS; IFS=$ac_path_separator
3041 ac_dummy="$PATH"
3042 for ac_dir in $ac_dummy; do
3043   IFS=$ac_save_IFS
3044   test -z "$ac_dir" && ac_dir=.
3045   if $as_executable_p "$ac_dir/$ac_word"; then
3046    ac_cv_path_CXX="$ac_dir/$ac_word"
3047    echo "$as_me:3047: found $ac_dir/$ac_word" >&5
3048    break
3049 fi
3050 done
3051
3052   ;;
3053 esac
3054 fi
3055 CXX=$ac_cv_path_CXX
3056
3057 if test -n "$CXX"; then
3058   echo "$as_me:3058: result: $CXX" >&5
3059 echo "${ECHO_T}$CXX" >&6
3060 else
3061   echo "$as_me:3061: result: no" >&5
3062 echo "${ECHO_T}no" >&6
3063 fi
3064
3065         fi
3066         if test "$CXX" = "g++" ; then
3067                 { echo "$as_me:3067: WARNING: ignoring hardcoded g++" >&5
3068 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3069                 cf_with_cxx=no; CXX=""; GXX="";
3070         fi
3071 fi
3072
3073 GXX_VERSION=none
3074 if test "$GXX" = yes; then
3075         echo "$as_me:3075: checking version of g++" >&5
3076 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3077         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3078         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3079         echo "$as_me:3079: result: $GXX_VERSION" >&5
3080 echo "${ECHO_T}$GXX_VERSION" >&6
3081 fi
3082
3083 case $GXX_VERSION in
3084 1*|2.[0-6]*)
3085         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3086         # cf_cxx_library=no
3087         { echo "$as_me:3087: WARNING: templates do not work" >&5
3088 echo "$as_me: WARNING: templates do not work" >&2;}
3089         ;;
3090 esac
3091
3092 echo "$as_me:3092: checking if you want to build C++ binding and demo" >&5
3093 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3094
3095 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3096 if test "${with_cxx_binding+set}" = set; then
3097   withval="$with_cxx_binding"
3098   cf_with_cxx_binding=$withval
3099 else
3100   cf_with_cxx_binding=$cf_with_cxx
3101 fi;
3102 echo "$as_me:3102: result: $cf_with_cxx_binding" >&5
3103 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3104
3105 echo "$as_me:3105: checking if you want to build with Ada95" >&5
3106 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3107
3108 # Check whether --with-ada or --without-ada was given.
3109 if test "${with_ada+set}" = set; then
3110   withval="$with_ada"
3111   cf_with_ada=$withval
3112 else
3113   cf_with_ada=yes
3114 fi;
3115 echo "$as_me:3115: result: $cf_with_ada" >&5
3116 echo "${ECHO_T}$cf_with_ada" >&6
3117
3118 echo "$as_me:3118: checking if you want to install manpages" >&5
3119 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3120
3121 # Check whether --with-manpages or --without-manpages was given.
3122 if test "${with_manpages+set}" = set; then
3123   withval="$with_manpages"
3124   cf_with_manpages=$withval
3125 else
3126   cf_with_manpages=yes
3127 fi;
3128 echo "$as_me:3128: result: $cf_with_manpages" >&5
3129 echo "${ECHO_T}$cf_with_manpages" >&6
3130
3131 echo "$as_me:3131: checking if you want to build programs such as tic" >&5
3132 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3133
3134 # Check whether --with-progs or --without-progs was given.
3135 if test "${with_progs+set}" = set; then
3136   withval="$with_progs"
3137   cf_with_progs=$withval
3138 else
3139   cf_with_progs=yes
3140 fi;
3141 echo "$as_me:3141: result: $cf_with_progs" >&5
3142 echo "${ECHO_T}$cf_with_progs" >&6
3143
3144 echo "$as_me:3144: checking if you wish to install curses.h" >&5
3145 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3146
3147 # Check whether --with-curses-h or --without-curses-h was given.
3148 if test "${with_curses_h+set}" = set; then
3149   withval="$with_curses_h"
3150   with_curses_h=$withval
3151 else
3152   with_curses_h=yes
3153 fi;
3154 echo "$as_me:3154: result: $with_curses_h" >&5
3155 echo "${ECHO_T}$with_curses_h" >&6
3156
3157 modules_to_build="ncurses"
3158 if test "X$cf_with_progs" != Xno ; then
3159 modules_to_build="$modules_to_build progs tack"
3160 fi
3161 modules_to_build="$modules_to_build panel menu form"
3162
3163 test "$program_prefix" != NONE &&
3164   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3165 # Use a double $ so make ignores it.
3166 test "$program_suffix" != NONE &&
3167   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3168 # Double any \ or $.  echo might interpret backslashes.
3169 # By default was `s,x,x', remove it if useless.
3170 cat <<\_ACEOF >conftest.sed
3171 s/[\\$]/&&/g;s/;s,x,x,$//
3172 _ACEOF
3173 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3174 rm conftest.sed
3175
3176 for ac_prog in mawk gawk nawk awk
3177 do
3178   # Extract the first word of "$ac_prog", so it can be a program name with args.
3179 set dummy $ac_prog; ac_word=$2
3180 echo "$as_me:3180: checking for $ac_word" >&5
3181 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3182 if test "${ac_cv_prog_AWK+set}" = set; then
3183   echo $ECHO_N "(cached) $ECHO_C" >&6
3184 else
3185   if test -n "$AWK"; then
3186   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3187 else
3188   ac_save_IFS=$IFS; IFS=$ac_path_separator
3189 ac_dummy="$PATH"
3190 for ac_dir in $ac_dummy; do
3191   IFS=$ac_save_IFS
3192   test -z "$ac_dir" && ac_dir=.
3193   $as_executable_p "$ac_dir/$ac_word" || continue
3194 ac_cv_prog_AWK="$ac_prog"
3195 echo "$as_me:3195: found $ac_dir/$ac_word" >&5
3196 break
3197 done
3198
3199 fi
3200 fi
3201 AWK=$ac_cv_prog_AWK
3202 if test -n "$AWK"; then
3203   echo "$as_me:3203: result: $AWK" >&5
3204 echo "${ECHO_T}$AWK" >&6
3205 else
3206   echo "$as_me:3206: result: no" >&5
3207 echo "${ECHO_T}no" >&6
3208 fi
3209
3210   test -n "$AWK" && break
3211 done
3212
3213 test -z "$AWK" && { { echo "$as_me:3213: error: No awk program found" >&5
3214 echo "$as_me: error: No awk program found" >&2;}
3215    { (exit 1); exit 1; }; }
3216
3217 echo "$as_me:3217: checking for egrep" >&5
3218 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3219 if test "${ac_cv_prog_egrep+set}" = set; then
3220   echo $ECHO_N "(cached) $ECHO_C" >&6
3221 else
3222   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3223     then ac_cv_prog_egrep='grep -E'
3224     else ac_cv_prog_egrep='egrep'
3225     fi
3226 fi
3227 echo "$as_me:3227: result: $ac_cv_prog_egrep" >&5
3228 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3229  EGREP=$ac_cv_prog_egrep
3230
3231 test -z "$EGREP" && { { echo "$as_me:3231: error: No egrep program found" >&5
3232 echo "$as_me: error: No egrep program found" >&2;}
3233    { (exit 1); exit 1; }; }
3234
3235 # Find a good install program.  We prefer a C program (faster),
3236 # so one script is as good as another.  But avoid the broken or
3237 # incompatible versions:
3238 # SysV /etc/install, /usr/sbin/install
3239 # SunOS /usr/etc/install
3240 # IRIX /sbin/install
3241 # AIX /bin/install
3242 # AmigaOS /C/install, which installs bootblocks on floppy discs
3243 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3244 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3245 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3246 # ./install, which can be erroneously created by make from ./install.sh.
3247 echo "$as_me:3247: checking for a BSD compatible install" >&5
3248 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3249 if test -z "$INSTALL"; then
3250 if test "${ac_cv_path_install+set}" = set; then
3251   echo $ECHO_N "(cached) $ECHO_C" >&6
3252 else
3253     ac_save_IFS=$IFS; IFS=$ac_path_separator
3254   for ac_dir in $PATH; do
3255     IFS=$ac_save_IFS
3256     # Account for people who put trailing slashes in PATH elements.
3257     case $ac_dir/ in
3258     / | ./ | .// | /cC/* \
3259     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3260     | /usr/ucb/* ) ;;
3261     *)
3262       # OSF1 and SCO ODT 3.0 have their own names for install.
3263       # Don't use installbsd from OSF since it installs stuff as root
3264       # by default.
3265       for ac_prog in ginstall scoinst install; do
3266         if $as_executable_p "$ac_dir/$ac_prog"; then
3267           if test $ac_prog = install &&
3268             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3269             # AIX install.  It has an incompatible calling convention.
3270             :
3271           elif test $ac_prog = install &&
3272             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3273             # program-specific install script used by HP pwplus--don't use.
3274             :
3275           else
3276             ac_cv_path_install="$ac_dir/$ac_prog -c"
3277             break 2
3278           fi
3279         fi
3280       done
3281       ;;
3282     esac
3283   done
3284
3285 fi
3286   if test "${ac_cv_path_install+set}" = set; then
3287     INSTALL=$ac_cv_path_install
3288   else
3289     # As a last resort, use the slow shell script.  We don't cache a
3290     # path for INSTALL within a source directory, because that will
3291     # break other packages using the cache if that directory is
3292     # removed, or if the path is relative.
3293     INSTALL=$ac_install_sh
3294   fi
3295 fi
3296 echo "$as_me:3296: result: $INSTALL" >&5
3297 echo "${ECHO_T}$INSTALL" >&6
3298
3299 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3300 # It thinks the first close brace ends the variable substitution.
3301 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3302
3303 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3304
3305 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3306
3307 case $INSTALL in
3308 /*)
3309   ;;
3310 *)
3311   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3312   test -z "$cf_dir" && cf_dir=.
3313   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3314   ;;
3315 esac
3316
3317 for ac_prog in tdlint lint alint
3318 do
3319   # Extract the first word of "$ac_prog", so it can be a program name with args.
3320 set dummy $ac_prog; ac_word=$2
3321 echo "$as_me:3321: checking for $ac_word" >&5
3322 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3323 if test "${ac_cv_prog_LINT+set}" = set; then
3324   echo $ECHO_N "(cached) $ECHO_C" >&6
3325 else
3326   if test -n "$LINT"; then
3327   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3328 else
3329   ac_save_IFS=$IFS; IFS=$ac_path_separator
3330 ac_dummy="$PATH"
3331 for ac_dir in $ac_dummy; do
3332   IFS=$ac_save_IFS
3333   test -z "$ac_dir" && ac_dir=.
3334   $as_executable_p "$ac_dir/$ac_word" || continue
3335 ac_cv_prog_LINT="$ac_prog"
3336 echo "$as_me:3336: found $ac_dir/$ac_word" >&5
3337 break
3338 done
3339
3340 fi
3341 fi
3342 LINT=$ac_cv_prog_LINT
3343 if test -n "$LINT"; then
3344   echo "$as_me:3344: result: $LINT" >&5
3345 echo "${ECHO_T}$LINT" >&6
3346 else
3347   echo "$as_me:3347: result: no" >&5
3348 echo "${ECHO_T}no" >&6
3349 fi
3350
3351   test -n "$LINT" && break
3352 done
3353
3354 echo "$as_me:3354: checking whether ln -s works" >&5
3355 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3356 LN_S=$as_ln_s
3357 if test "$LN_S" = "ln -s"; then
3358   echo "$as_me:3358: result: yes" >&5
3359 echo "${ECHO_T}yes" >&6
3360 else
3361   echo "$as_me:3361: result: no, using $LN_S" >&5
3362 echo "${ECHO_T}no, using $LN_S" >&6
3363 fi
3364
3365 echo "$as_me:3365: checking for long file names" >&5
3366 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3367 if test "${ac_cv_sys_long_file_names+set}" = set; then
3368   echo $ECHO_N "(cached) $ECHO_C" >&6
3369 else
3370   ac_cv_sys_long_file_names=yes
3371 # Test for long file names in all the places we know might matter:
3372 #      .                the current directory, where building will happen
3373 #      $prefix/lib      where we will be installing things
3374 #      $exec_prefix/lib likewise
3375 # eval it to expand exec_prefix.
3376 #      $TMPDIR          if set, where it might want to write temporary files
3377 # if $TMPDIR is not set:
3378 #      /tmp             where it might want to write temporary files
3379 #      /var/tmp         likewise
3380 #      /usr/tmp         likewise
3381 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3382   ac_tmpdirs=$TMPDIR
3383 else
3384   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3385 fi
3386 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3387   test -d $ac_dir || continue
3388   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3389   ac_xdir=$ac_dir/cf$$
3390   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3391   ac_tf1=$ac_xdir/conftest9012345
3392   ac_tf2=$ac_xdir/conftest9012346
3393   (echo 1 >$ac_tf1) 2>/dev/null
3394   (echo 2 >$ac_tf2) 2>/dev/null
3395   ac_val=`cat $ac_tf1 2>/dev/null`
3396   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3397     ac_cv_sys_long_file_names=no
3398     rm -rf $ac_xdir 2>/dev/null
3399     break
3400   fi
3401   rm -rf $ac_xdir 2>/dev/null
3402 done
3403 fi
3404 echo "$as_me:3404: result: $ac_cv_sys_long_file_names" >&5
3405 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3406 if test $ac_cv_sys_long_file_names = yes; then
3407
3408 cat >>confdefs.h <<\EOF
3409 #define HAVE_LONG_FILE_NAMES 1
3410 EOF
3411
3412 fi
3413
3414 # if we find pkg-config, check if we should install the ".pc" files.
3415
3416 echo "$as_me:3416: checking if you want to use pkg-config" >&5
3417 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3418
3419 # Check whether --with-pkg-config or --without-pkg-config was given.
3420 if test "${with_pkg_config+set}" = set; then
3421   withval="$with_pkg_config"
3422   cf_pkg_config=$withval
3423 else
3424   cf_pkg_config=yes
3425 fi;
3426 echo "$as_me:3426: result: $cf_pkg_config" >&5
3427 echo "${ECHO_T}$cf_pkg_config" >&6
3428
3429 case $cf_pkg_config in
3430 no)
3431         PKG_CONFIG=none
3432         ;;
3433 yes)
3434         # Extract the first word of "pkg-config", so it can be a program name with args.
3435 set dummy pkg-config; ac_word=$2
3436 echo "$as_me:3436: checking for $ac_word" >&5
3437 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3438 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3439   echo $ECHO_N "(cached) $ECHO_C" >&6
3440 else
3441   case $PKG_CONFIG in
3442   [\\/]* | ?:[\\/]*)
3443   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3444   ;;
3445   *)
3446   ac_save_IFS=$IFS; IFS=$ac_path_separator
3447 ac_dummy="$PATH"
3448 for ac_dir in $ac_dummy; do
3449   IFS=$ac_save_IFS
3450   test -z "$ac_dir" && ac_dir=.
3451   if $as_executable_p "$ac_dir/$ac_word"; then
3452    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3453    echo "$as_me:3453: found $ac_dir/$ac_word" >&5
3454    break
3455 fi
3456 done
3457
3458   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3459   ;;
3460 esac
3461 fi
3462 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3463
3464 if test -n "$PKG_CONFIG"; then
3465   echo "$as_me:3465: result: $PKG_CONFIG" >&5
3466 echo "${ECHO_T}$PKG_CONFIG" >&6
3467 else
3468   echo "$as_me:3468: result: no" >&5
3469 echo "${ECHO_T}no" >&6
3470 fi
3471
3472         ;;
3473 *)
3474         PKG_CONFIG=$withval
3475         ;;
3476 esac
3477
3478 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3479 if test "$PKG_CONFIG" != none ; then
3480
3481 if test "x$prefix" != xNONE; then
3482   cf_path_syntax="$prefix"
3483 else
3484   cf_path_syntax="$ac_default_prefix"
3485 fi
3486
3487 case ".$PKG_CONFIG" in #(vi
3488 .\$\(*\)*|.\'*\'*) #(vi
3489   ;;
3490 ..|./*|.\\*) #(vi
3491   ;;
3492 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3493   ;;
3494 .\${*prefix}*) #(vi
3495   eval PKG_CONFIG="$PKG_CONFIG"
3496   case ".$PKG_CONFIG" in #(vi
3497   .NONE/*)
3498     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3499     ;;
3500   esac
3501   ;; #(vi
3502 .no|.NONE/*)
3503   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3504   ;;
3505 *)
3506   { { echo "$as_me:3506: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3507 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3508    { (exit 1); exit 1; }; }
3509   ;;
3510 esac
3511
3512 fi
3513
3514 if test "$PKG_CONFIG" != no ; then
3515         echo "$as_me:3515: checking if we should install .pc files for $PKG_CONFIG" >&5
3516 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3517
3518         # Leave this as something that can be overridden in the environment.
3519         if test -z "$PKG_CONFIG_LIBDIR" ; then
3520                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3521         fi
3522
3523         if test -d "$PKG_CONFIG_LIBDIR" ; then
3524
3525 # Check whether --enable-pc-files or --disable-pc-files was given.
3526 if test "${enable_pc_files+set}" = set; then
3527   enableval="$enable_pc_files"
3528   enable_pc_files=$enableval
3529 else
3530   enable_pc_files=no
3531 fi;
3532                 echo "$as_me:3532: result: $enable_pc_files" >&5
3533 echo "${ECHO_T}$enable_pc_files" >&6
3534         else
3535                 echo "$as_me:3535: result: no" >&5
3536 echo "${ECHO_T}no" >&6
3537                 { echo "$as_me:3537: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3538 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3539                 enable_pc_files=no
3540         fi
3541 fi
3542
3543 echo "$as_me:3543: checking if we should assume mixed-case filenames" >&5
3544 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3545
3546 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3547 if test "${enable_mixed_case+set}" = set; then
3548   enableval="$enable_mixed_case"
3549   enable_mixedcase=$enableval
3550 else
3551   enable_mixedcase=auto
3552 fi;
3553 echo "$as_me:3553: result: $enable_mixedcase" >&5
3554 echo "${ECHO_T}$enable_mixedcase" >&6
3555 if test "$enable_mixedcase" = "auto" ; then
3556
3557 echo "$as_me:3557: checking if filesystem supports mixed-case filenames" >&5
3558 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3559 if test "${cf_cv_mixedcase+set}" = set; then
3560   echo $ECHO_N "(cached) $ECHO_C" >&6
3561 else
3562
3563 if test "$cross_compiling" = yes ; then
3564         case $target_alias in #(vi
3565         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3566                 cf_cv_mixedcase=no
3567                 ;;
3568         *)
3569                 cf_cv_mixedcase=yes
3570                 ;;
3571         esac
3572 else
3573         rm -f conftest CONFTEST
3574         echo test >conftest
3575         if test -f CONFTEST ; then
3576                 cf_cv_mixedcase=no
3577         else
3578                 cf_cv_mixedcase=yes
3579         fi
3580         rm -f conftest CONFTEST
3581 fi
3582
3583 fi
3584 echo "$as_me:3584: result: $cf_cv_mixedcase" >&5
3585 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3586 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3587 #define MIXEDCASE_FILENAMES 1
3588 EOF
3589
3590 else
3591     cf_cv_mixedcase=$enable_mixedcase
3592     if test "$enable_mixedcase" = "yes" ; then
3593         cat >>confdefs.h <<\EOF
3594 #define MIXEDCASE_FILENAMES 1
3595 EOF
3596
3597     fi
3598 fi
3599
3600 # do this after mixed-case option (tags/TAGS is not as important as tic).
3601 echo "$as_me:3601: checking whether ${MAKE-make} sets \${MAKE}" >&5
3602 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3603 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3604 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3605   echo $ECHO_N "(cached) $ECHO_C" >&6
3606 else
3607   cat >conftest.make <<\EOF
3608 all:
3609         @echo 'ac_maketemp="${MAKE}"'
3610 EOF
3611 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3612 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3613 if test -n "$ac_maketemp"; then
3614   eval ac_cv_prog_make_${ac_make}_set=yes
3615 else
3616   eval ac_cv_prog_make_${ac_make}_set=no
3617 fi
3618 rm -f conftest.make
3619 fi
3620 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3621   echo "$as_me:3621: result: yes" >&5
3622 echo "${ECHO_T}yes" >&6
3623   SET_MAKE=
3624 else
3625   echo "$as_me:3625: result: no" >&5
3626 echo "${ECHO_T}no" >&6
3627   SET_MAKE="MAKE=${MAKE-make}"
3628 fi
3629
3630 # Extract the first word of "ctags", so it can be a program name with args.
3631 set dummy ctags; ac_word=$2
3632 echo "$as_me:3632: checking for $ac_word" >&5
3633 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3634 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3635   echo $ECHO_N "(cached) $ECHO_C" >&6
3636 else
3637   if test -n "$MAKE_LOWER_TAGS"; then
3638   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3639 else
3640   ac_save_IFS=$IFS; IFS=$ac_path_separator
3641 ac_dummy="$PATH"
3642 for ac_dir in $ac_dummy; do
3643   IFS=$ac_save_IFS
3644   test -z "$ac_dir" && ac_dir=.
3645   $as_executable_p "$ac_dir/$ac_word" || continue
3646 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3647 echo "$as_me:3647: found $ac_dir/$ac_word" >&5
3648 break
3649 done
3650
3651   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3652 fi
3653 fi
3654 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3655 if test -n "$MAKE_LOWER_TAGS"; then
3656   echo "$as_me:3656: result: $MAKE_LOWER_TAGS" >&5
3657 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3658 else
3659   echo "$as_me:3659: result: no" >&5
3660 echo "${ECHO_T}no" >&6
3661 fi
3662
3663 if test "$cf_cv_mixedcase" = yes ; then
3664         # Extract the first word of "etags", so it can be a program name with args.
3665 set dummy etags; ac_word=$2
3666 echo "$as_me:3666: checking for $ac_word" >&5
3667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3668 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3669   echo $ECHO_N "(cached) $ECHO_C" >&6
3670 else
3671   if test -n "$MAKE_UPPER_TAGS"; then
3672   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3673 else
3674   ac_save_IFS=$IFS; IFS=$ac_path_separator
3675 ac_dummy="$PATH"
3676 for ac_dir in $ac_dummy; do
3677   IFS=$ac_save_IFS
3678   test -z "$ac_dir" && ac_dir=.
3679   $as_executable_p "$ac_dir/$ac_word" || continue
3680 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3681 echo "$as_me:3681: found $ac_dir/$ac_word" >&5
3682 break
3683 done
3684
3685   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3686 fi
3687 fi
3688 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3689 if test -n "$MAKE_UPPER_TAGS"; then
3690   echo "$as_me:3690: result: $MAKE_UPPER_TAGS" >&5
3691 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3692 else
3693   echo "$as_me:3693: result: no" >&5
3694 echo "${ECHO_T}no" >&6
3695 fi
3696
3697 else
3698         MAKE_UPPER_TAGS=no
3699 fi
3700
3701 if test "$MAKE_UPPER_TAGS" = yes ; then
3702         MAKE_UPPER_TAGS=
3703 else
3704         MAKE_UPPER_TAGS="#"
3705 fi
3706
3707 if test "$MAKE_LOWER_TAGS" = yes ; then
3708         MAKE_LOWER_TAGS=
3709 else
3710         MAKE_LOWER_TAGS="#"
3711 fi
3712
3713 echo "$as_me:3713: checking for makeflags variable" >&5
3714 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3715 if test "${cf_cv_makeflags+set}" = set; then
3716   echo $ECHO_N "(cached) $ECHO_C" >&6
3717 else
3718
3719         cf_cv_makeflags=''
3720         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3721         do
3722                 cat >cf_makeflags.tmp <<CF_EOF
3723 SHELL = /bin/sh
3724 all :
3725         @ echo '.$cf_option'
3726 CF_EOF
3727                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3728                 case "$cf_result" in
3729                 .*k)
3730                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3731                         case "$cf_result" in
3732                         .*CC=*) cf_cv_makeflags=
3733                                 ;;
3734                         *)      cf_cv_makeflags=$cf_option
3735                                 ;;
3736                         esac
3737                         break
3738                         ;;
3739                 .-)     ;;
3740                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3741                         ;;
3742                 esac
3743         done
3744         rm -f cf_makeflags.tmp
3745
3746 fi
3747 echo "$as_me:3747: result: $cf_cv_makeflags" >&5
3748 echo "${ECHO_T}$cf_cv_makeflags" >&6
3749
3750 if test -n "$ac_tool_prefix"; then
3751   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3752 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3753 echo "$as_me:3753: checking for $ac_word" >&5
3754 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3755 if test "${ac_cv_prog_RANLIB+set}" = set; then
3756   echo $ECHO_N "(cached) $ECHO_C" >&6
3757 else
3758   if test -n "$RANLIB"; then
3759   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3760 else
3761   ac_save_IFS=$IFS; IFS=$ac_path_separator
3762 ac_dummy="$PATH"
3763 for ac_dir in $ac_dummy; do
3764   IFS=$ac_save_IFS
3765   test -z "$ac_dir" && ac_dir=.
3766   $as_executable_p "$ac_dir/$ac_word" || continue
3767 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3768 echo "$as_me:3768: found $ac_dir/$ac_word" >&5
3769 break
3770 done
3771
3772 fi
3773 fi
3774 RANLIB=$ac_cv_prog_RANLIB
3775 if test -n "$RANLIB"; then
3776   echo "$as_me:3776: result: $RANLIB" >&5
3777 echo "${ECHO_T}$RANLIB" >&6
3778 else
3779   echo "$as_me:3779: result: no" >&5
3780 echo "${ECHO_T}no" >&6
3781 fi
3782
3783 fi
3784 if test -z "$ac_cv_prog_RANLIB"; then
3785   ac_ct_RANLIB=$RANLIB
3786   # Extract the first word of "ranlib", so it can be a program name with args.
3787 set dummy ranlib; ac_word=$2
3788 echo "$as_me:3788: checking for $ac_word" >&5
3789 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3790 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3791   echo $ECHO_N "(cached) $ECHO_C" >&6
3792 else
3793   if test -n "$ac_ct_RANLIB"; then
3794   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3795 else
3796   ac_save_IFS=$IFS; IFS=$ac_path_separator
3797 ac_dummy="$PATH"
3798 for ac_dir in $ac_dummy; do
3799   IFS=$ac_save_IFS
3800   test -z "$ac_dir" && ac_dir=.
3801   $as_executable_p "$ac_dir/$ac_word" || continue
3802 ac_cv_prog_ac_ct_RANLIB="ranlib"
3803 echo "$as_me:3803: found $ac_dir/$ac_word" >&5
3804 break
3805 done
3806
3807   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3808 fi
3809 fi
3810 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3811 if test -n "$ac_ct_RANLIB"; then
3812   echo "$as_me:3812: result: $ac_ct_RANLIB" >&5
3813 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3814 else
3815   echo "$as_me:3815: result: no" >&5
3816 echo "${ECHO_T}no" >&6
3817 fi
3818
3819   RANLIB=$ac_ct_RANLIB
3820 else
3821   RANLIB="$ac_cv_prog_RANLIB"
3822 fi
3823
3824 if test -n "$ac_tool_prefix"; then
3825   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3826 set dummy ${ac_tool_prefix}ld; ac_word=$2
3827 echo "$as_me:3827: checking for $ac_word" >&5
3828 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3829 if test "${ac_cv_prog_LD+set}" = set; then
3830   echo $ECHO_N "(cached) $ECHO_C" >&6
3831 else
3832   if test -n "$LD"; then
3833   ac_cv_prog_LD="$LD" # Let the user override the test.
3834 else
3835   ac_save_IFS=$IFS; IFS=$ac_path_separator
3836 ac_dummy="$PATH"
3837 for ac_dir in $ac_dummy; do
3838   IFS=$ac_save_IFS
3839   test -z "$ac_dir" && ac_dir=.
3840   $as_executable_p "$ac_dir/$ac_word" || continue
3841 ac_cv_prog_LD="${ac_tool_prefix}ld"
3842 echo "$as_me:3842: found $ac_dir/$ac_word" >&5
3843 break
3844 done
3845
3846 fi
3847 fi
3848 LD=$ac_cv_prog_LD
3849 if test -n "$LD"; then
3850   echo "$as_me:3850: result: $LD" >&5
3851 echo "${ECHO_T}$LD" >&6
3852 else
3853   echo "$as_me:3853: result: no" >&5
3854 echo "${ECHO_T}no" >&6
3855 fi
3856
3857 fi
3858 if test -z "$ac_cv_prog_LD"; then
3859   ac_ct_LD=$LD
3860   # Extract the first word of "ld", so it can be a program name with args.
3861 set dummy ld; ac_word=$2
3862 echo "$as_me:3862: checking for $ac_word" >&5
3863 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3864 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3865   echo $ECHO_N "(cached) $ECHO_C" >&6
3866 else
3867   if test -n "$ac_ct_LD"; then
3868   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3869 else
3870   ac_save_IFS=$IFS; IFS=$ac_path_separator
3871 ac_dummy="$PATH"
3872 for ac_dir in $ac_dummy; do
3873   IFS=$ac_save_IFS
3874   test -z "$ac_dir" && ac_dir=.
3875   $as_executable_p "$ac_dir/$ac_word" || continue
3876 ac_cv_prog_ac_ct_LD="ld"
3877 echo "$as_me:3877: found $ac_dir/$ac_word" >&5
3878 break
3879 done
3880
3881   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3882 fi
3883 fi
3884 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3885 if test -n "$ac_ct_LD"; then
3886   echo "$as_me:3886: result: $ac_ct_LD" >&5
3887 echo "${ECHO_T}$ac_ct_LD" >&6
3888 else
3889   echo "$as_me:3889: result: no" >&5
3890 echo "${ECHO_T}no" >&6
3891 fi
3892
3893   LD=$ac_ct_LD
3894 else
3895   LD="$ac_cv_prog_LD"
3896 fi
3897
3898 if test -n "$ac_tool_prefix"; then
3899   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3900 set dummy ${ac_tool_prefix}ar; ac_word=$2
3901 echo "$as_me:3901: checking for $ac_word" >&5
3902 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3903 if test "${ac_cv_prog_AR+set}" = set; then
3904   echo $ECHO_N "(cached) $ECHO_C" >&6
3905 else
3906   if test -n "$AR"; then
3907   ac_cv_prog_AR="$AR" # Let the user override the test.
3908 else
3909   ac_save_IFS=$IFS; IFS=$ac_path_separator
3910 ac_dummy="$PATH"
3911 for ac_dir in $ac_dummy; do
3912   IFS=$ac_save_IFS
3913   test -z "$ac_dir" && ac_dir=.
3914   $as_executable_p "$ac_dir/$ac_word" || continue
3915 ac_cv_prog_AR="${ac_tool_prefix}ar"
3916 echo "$as_me:3916: found $ac_dir/$ac_word" >&5
3917 break
3918 done
3919
3920 fi
3921 fi
3922 AR=$ac_cv_prog_AR
3923 if test -n "$AR"; then
3924   echo "$as_me:3924: result: $AR" >&5
3925 echo "${ECHO_T}$AR" >&6
3926 else
3927   echo "$as_me:3927: result: no" >&5
3928 echo "${ECHO_T}no" >&6
3929 fi
3930
3931 fi
3932 if test -z "$ac_cv_prog_AR"; then
3933   ac_ct_AR=$AR
3934   # Extract the first word of "ar", so it can be a program name with args.
3935 set dummy ar; ac_word=$2
3936 echo "$as_me:3936: checking for $ac_word" >&5
3937 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3938 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3939   echo $ECHO_N "(cached) $ECHO_C" >&6
3940 else
3941   if test -n "$ac_ct_AR"; then
3942   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3943 else
3944   ac_save_IFS=$IFS; IFS=$ac_path_separator
3945 ac_dummy="$PATH"
3946 for ac_dir in $ac_dummy; do
3947   IFS=$ac_save_IFS
3948   test -z "$ac_dir" && ac_dir=.
3949   $as_executable_p "$ac_dir/$ac_word" || continue
3950 ac_cv_prog_ac_ct_AR="ar"
3951 echo "$as_me:3951: found $ac_dir/$ac_word" >&5
3952 break
3953 done
3954
3955   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3956 fi
3957 fi
3958 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3959 if test -n "$ac_ct_AR"; then
3960   echo "$as_me:3960: result: $ac_ct_AR" >&5
3961 echo "${ECHO_T}$ac_ct_AR" >&6
3962 else
3963   echo "$as_me:3963: result: no" >&5
3964 echo "${ECHO_T}no" >&6
3965 fi
3966
3967   AR=$ac_ct_AR
3968 else
3969   AR="$ac_cv_prog_AR"
3970 fi
3971
3972 if test -n "$ac_tool_prefix"; then
3973   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3974 set dummy ${ac_tool_prefix}ar; ac_word=$2
3975 echo "$as_me:3975: checking for $ac_word" >&5
3976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3977 if test "${ac_cv_prog_AR+set}" = set; then
3978   echo $ECHO_N "(cached) $ECHO_C" >&6
3979 else
3980   if test -n "$AR"; then
3981   ac_cv_prog_AR="$AR" # Let the user override the test.
3982 else
3983   ac_save_IFS=$IFS; IFS=$ac_path_separator
3984 ac_dummy="$PATH"
3985 for ac_dir in $ac_dummy; do
3986   IFS=$ac_save_IFS
3987   test -z "$ac_dir" && ac_dir=.
3988   $as_executable_p "$ac_dir/$ac_word" || continue
3989 ac_cv_prog_AR="${ac_tool_prefix}ar"
3990 echo "$as_me:3990: found $ac_dir/$ac_word" >&5
3991 break
3992 done
3993
3994 fi
3995 fi
3996 AR=$ac_cv_prog_AR
3997 if test -n "$AR"; then
3998   echo "$as_me:3998: result: $AR" >&5
3999 echo "${ECHO_T}$AR" >&6
4000 else
4001   echo "$as_me:4001: result: no" >&5
4002 echo "${ECHO_T}no" >&6
4003 fi
4004
4005 fi
4006 if test -z "$ac_cv_prog_AR"; then
4007   ac_ct_AR=$AR
4008   # Extract the first word of "ar", so it can be a program name with args.
4009 set dummy ar; ac_word=$2
4010 echo "$as_me:4010: checking for $ac_word" >&5
4011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4012 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4013   echo $ECHO_N "(cached) $ECHO_C" >&6
4014 else
4015   if test -n "$ac_ct_AR"; then
4016   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4017 else
4018   ac_save_IFS=$IFS; IFS=$ac_path_separator
4019 ac_dummy="$PATH"
4020 for ac_dir in $ac_dummy; do
4021   IFS=$ac_save_IFS
4022   test -z "$ac_dir" && ac_dir=.
4023   $as_executable_p "$ac_dir/$ac_word" || continue
4024 ac_cv_prog_ac_ct_AR="ar"
4025 echo "$as_me:4025: found $ac_dir/$ac_word" >&5
4026 break
4027 done
4028
4029   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4030 fi
4031 fi
4032 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4033 if test -n "$ac_ct_AR"; then
4034   echo "$as_me:4034: result: $ac_ct_AR" >&5
4035 echo "${ECHO_T}$ac_ct_AR" >&6
4036 else
4037   echo "$as_me:4037: result: no" >&5
4038 echo "${ECHO_T}no" >&6
4039 fi
4040
4041   AR=$ac_ct_AR
4042 else
4043   AR="$ac_cv_prog_AR"
4044 fi
4045
4046 echo "$as_me:4046: checking for options to update archives" >&5
4047 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4048 if test "${cf_cv_ar_flags+set}" = set; then
4049   echo $ECHO_N "(cached) $ECHO_C" >&6
4050 else
4051
4052         cf_cv_ar_flags=unknown
4053         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4054         do
4055                 rm -f conftest.$ac_cv_objext
4056                 rm -f conftest.a
4057
4058                 cat >conftest.$ac_ext <<EOF
4059 #line 4059 "configure"
4060 int     testdata[3] = { 123, 456, 789 };
4061 EOF
4062                 if { (eval echo "$as_me:4062: \"$ac_compile\"") >&5
4063   (eval $ac_compile) 2>&5
4064   ac_status=$?
4065   echo "$as_me:4065: \$? = $ac_status" >&5
4066   (exit $ac_status); } ; then
4067                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4068                         if test -f conftest.a ; then
4069                                 cf_cv_ar_flags=$cf_ar_flags
4070                                 break
4071                         fi
4072                 else
4073                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4074
4075 echo "${as_me-configure}:4075: testing cannot compile test-program ..." 1>&5
4076
4077                         break
4078                 fi
4079         done
4080         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4081
4082 fi
4083 echo "$as_me:4083: result: $cf_cv_ar_flags" >&5
4084 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4085
4086 ARFLAGS=$cf_cv_ar_flags
4087
4088 echo "$as_me:4088: checking if you have specified an install-prefix" >&5
4089 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4090
4091 # Check whether --with-install-prefix or --without-install-prefix was given.
4092 if test "${with_install_prefix+set}" = set; then
4093   withval="$with_install_prefix"
4094   case "$withval" in #(vi
4095         yes|no) #(vi
4096                 ;;
4097         *)      DESTDIR="$withval"
4098                 ;;
4099         esac
4100 fi;
4101 echo "$as_me:4101: result: $DESTDIR" >&5
4102 echo "${ECHO_T}$DESTDIR" >&6
4103
4104 ###############################################################################
4105
4106 # If we're cross-compiling, allow the user to override the tools and their
4107 # options.  The configure script is oriented toward identifying the host
4108 # compiler, etc., but we need a build compiler to generate parts of the source.
4109
4110 if test "$cross_compiling" = yes ; then
4111
4112         # defaults that we might want to override
4113         : ${BUILD_CFLAGS:=''}
4114         : ${BUILD_CPPFLAGS:=''}
4115         : ${BUILD_LDFLAGS:=''}
4116         : ${BUILD_LIBS:=''}
4117         : ${BUILD_EXEEXT:='$x'}
4118         : ${BUILD_OBJEXT:='o'}
4119
4120 # Check whether --with-build-cc or --without-build-cc was given.
4121 if test "${with_build_cc+set}" = set; then
4122   withval="$with_build_cc"
4123   BUILD_CC="$withval"
4124 else
4125   for ac_prog in gcc cc cl
4126 do
4127   # Extract the first word of "$ac_prog", so it can be a program name with args.
4128 set dummy $ac_prog; ac_word=$2
4129 echo "$as_me:4129: checking for $ac_word" >&5
4130 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4131 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4132   echo $ECHO_N "(cached) $ECHO_C" >&6
4133 else
4134   if test -n "$BUILD_CC"; then
4135   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4136 else
4137   ac_save_IFS=$IFS; IFS=$ac_path_separator
4138 ac_dummy="$PATH"
4139 for ac_dir in $ac_dummy; do
4140   IFS=$ac_save_IFS
4141   test -z "$ac_dir" && ac_dir=.
4142   $as_executable_p "$ac_dir/$ac_word" || continue
4143 ac_cv_prog_BUILD_CC="$ac_prog"
4144 echo "$as_me:4144: found $ac_dir/$ac_word" >&5
4145 break
4146 done
4147
4148 fi
4149 fi
4150 BUILD_CC=$ac_cv_prog_BUILD_CC
4151 if test -n "$BUILD_CC"; then
4152   echo "$as_me:4152: result: $BUILD_CC" >&5
4153 echo "${ECHO_T}$BUILD_CC" >&6
4154 else
4155   echo "$as_me:4155: result: no" >&5
4156 echo "${ECHO_T}no" >&6
4157 fi
4158
4159   test -n "$BUILD_CC" && break
4160 done
4161
4162 fi;
4163         echo "$as_me:4163: checking for native build C compiler" >&5
4164 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4165         echo "$as_me:4165: result: $BUILD_CC" >&5
4166 echo "${ECHO_T}$BUILD_CC" >&6
4167
4168         echo "$as_me:4168: checking for native build C preprocessor" >&5
4169 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4170
4171 # Check whether --with-build-cpp or --without-build-cpp was given.
4172 if test "${with_build_cpp+set}" = set; then
4173   withval="$with_build_cpp"
4174   BUILD_CPP="$withval"
4175 else
4176   BUILD_CPP='${BUILD_CC} -E'
4177 fi;
4178         echo "$as_me:4178: result: $BUILD_CPP" >&5
4179 echo "${ECHO_T}$BUILD_CPP" >&6
4180
4181         echo "$as_me:4181: checking for native build C flags" >&5
4182 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4183
4184 # Check whether --with-build-cflags or --without-build-cflags was given.
4185 if test "${with_build_cflags+set}" = set; then
4186   withval="$with_build_cflags"
4187   BUILD_CFLAGS="$withval"
4188 fi;
4189         echo "$as_me:4189: result: $BUILD_CFLAGS" >&5
4190 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4191
4192         echo "$as_me:4192: checking for native build C preprocessor-flags" >&5
4193 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4194
4195 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4196 if test "${with_build_cppflags+set}" = set; then
4197   withval="$with_build_cppflags"
4198   BUILD_CPPFLAGS="$withval"
4199 fi;
4200         echo "$as_me:4200: result: $BUILD_CPPFLAGS" >&5
4201 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4202
4203         echo "$as_me:4203: checking for native build linker-flags" >&5
4204 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4205
4206 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4207 if test "${with_build_ldflags+set}" = set; then
4208   withval="$with_build_ldflags"
4209   BUILD_LDFLAGS="$withval"
4210 fi;
4211         echo "$as_me:4211: result: $BUILD_LDFLAGS" >&5
4212 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4213
4214         echo "$as_me:4214: checking for native build linker-libraries" >&5
4215 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4216
4217 # Check whether --with-build-libs or --without-build-libs was given.
4218 if test "${with_build_libs+set}" = set; then
4219   withval="$with_build_libs"
4220   BUILD_LIBS="$withval"
4221 fi;
4222         echo "$as_me:4222: result: $BUILD_LIBS" >&5
4223 echo "${ECHO_T}$BUILD_LIBS" >&6
4224
4225         # this assumes we're on Unix.
4226         BUILD_EXEEXT=
4227         BUILD_OBJEXT=o
4228
4229         : ${BUILD_CC:='${CC}'}
4230
4231         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4232                 { { echo "$as_me:4232: error: Cross-build requires two compilers.
4233 Use --with-build-cc to specify the native compiler." >&5
4234 echo "$as_me: error: Cross-build requires two compilers.
4235 Use --with-build-cc to specify the native compiler." >&2;}
4236    { (exit 1); exit 1; }; }
4237         fi
4238
4239 else
4240         : ${BUILD_CC:='${CC}'}
4241         : ${BUILD_CPP:='${CPP}'}
4242         : ${BUILD_CFLAGS:='${CFLAGS}'}
4243         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4244         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4245         : ${BUILD_LIBS:='${LIBS}'}
4246         : ${BUILD_EXEEXT:='$x'}
4247         : ${BUILD_OBJEXT:='o'}
4248 fi
4249
4250 ###############################################################################
4251
4252 ### Options to allow the user to specify the set of libraries which are used.
4253 ### Use "--without-normal --with-shared" to allow the default model to be
4254 ### shared, for example.
4255 cf_list_models=""
4256
4257 LIBTOOL=
4258
4259 # common library maintenance symbols that are convenient for libtool scripts:
4260 LIB_CREATE='${AR} -cr'
4261 LIB_OBJECT='${OBJECTS}'
4262 LIB_SUFFIX=.a
4263 LIB_PREP="$RANLIB"
4264
4265 # symbols used to prop libtool up to enable it to determine what it should be
4266 # doing:
4267 LIB_CLEAN=
4268 LIB_COMPILE=
4269 LIB_LINK='${CC}'
4270 LIB_INSTALL=
4271 LIB_UNINSTALL=
4272
4273 echo "$as_me:4273: checking if you want to build libraries with libtool" >&5
4274 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4275
4276 # Check whether --with-libtool or --without-libtool was given.
4277 if test "${with_libtool+set}" = set; then
4278   withval="$with_libtool"
4279   with_libtool=$withval
4280 else
4281   with_libtool=no
4282 fi;
4283 echo "$as_me:4283: result: $with_libtool" >&5
4284 echo "${ECHO_T}$with_libtool" >&6
4285 if test "$with_libtool" != "no"; then
4286
4287         if test "$with_libtool" != "yes" ; then
4288
4289 if test "x$prefix" != xNONE; then
4290   cf_path_syntax="$prefix"
4291 else
4292   cf_path_syntax="$ac_default_prefix"
4293 fi
4294
4295 case ".$with_libtool" in #(vi
4296 .\$\(*\)*|.\'*\'*) #(vi
4297   ;;
4298 ..|./*|.\\*) #(vi
4299   ;;
4300 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4301   ;;
4302 .\${*prefix}*) #(vi
4303   eval with_libtool="$with_libtool"
4304   case ".$with_libtool" in #(vi
4305   .NONE/*)
4306     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4307     ;;
4308   esac
4309   ;; #(vi
4310 .no|.NONE/*)
4311   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4312   ;;
4313 *)
4314   { { echo "$as_me:4314: error: expected a pathname, not \"$with_libtool\"" >&5
4315 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4316    { (exit 1); exit 1; }; }
4317   ;;
4318 esac
4319
4320                 LIBTOOL=$with_libtool
4321         else
4322                 # Extract the first word of "libtool", so it can be a program name with args.
4323 set dummy libtool; ac_word=$2
4324 echo "$as_me:4324: checking for $ac_word" >&5
4325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4326 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4327   echo $ECHO_N "(cached) $ECHO_C" >&6
4328 else
4329   case $LIBTOOL in
4330   [\\/]* | ?:[\\/]*)
4331   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4332   ;;
4333   *)
4334   ac_save_IFS=$IFS; IFS=$ac_path_separator
4335 ac_dummy="$PATH"
4336 for ac_dir in $ac_dummy; do
4337   IFS=$ac_save_IFS
4338   test -z "$ac_dir" && ac_dir=.
4339   if $as_executable_p "$ac_dir/$ac_word"; then
4340    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4341    echo "$as_me:4341: found $ac_dir/$ac_word" >&5
4342    break
4343 fi
4344 done
4345
4346   ;;
4347 esac
4348 fi
4349 LIBTOOL=$ac_cv_path_LIBTOOL
4350
4351 if test -n "$LIBTOOL"; then
4352   echo "$as_me:4352: result: $LIBTOOL" >&5
4353 echo "${ECHO_T}$LIBTOOL" >&6
4354 else
4355   echo "$as_me:4355: result: no" >&5
4356 echo "${ECHO_T}no" >&6
4357 fi
4358
4359         fi
4360         if test -z "$LIBTOOL" ; then
4361                 { { echo "$as_me:4361: error: Cannot find libtool" >&5
4362 echo "$as_me: error: Cannot find libtool" >&2;}
4363    { (exit 1); exit 1; }; }
4364         fi
4365         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} -o'
4366         LIB_OBJECT='${OBJECTS:.o=.lo}'
4367         LIB_SUFFIX=.la
4368         LIB_CLEAN='${LIBTOOL} --mode=clean'
4369         LIB_COMPILE='${LIBTOOL} --mode=compile'
4370         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4371         LIB_INSTALL='${LIBTOOL} --mode=install'
4372         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4373         LIB_PREP=:
4374
4375         # Show the version of libtool
4376         echo "$as_me:4376: checking version of libtool" >&5
4377 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4378
4379         # Save the version in a cache variable - this is not entirely a good
4380         # thing, but the version string from libtool is very ugly, and for
4381         # bug reports it might be useful to have the original string.
4382         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.].*//'`
4383         echo "$as_me:4383: result: $cf_cv_libtool_version" >&5
4384 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4385         if test -z "$cf_cv_libtool_version" ; then
4386                 { { echo "$as_me:4386: error: This is not GNU libtool" >&5
4387 echo "$as_me: error: This is not GNU libtool" >&2;}
4388    { (exit 1); exit 1; }; }
4389         fi
4390
4391         # special hack to add --tag option for C++ compiler
4392         case $cf_cv_libtool_version in
4393         1.[5-9]*|[2-9]*)
4394                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4395                 LIBTOOL="$LIBTOOL --tag=CC"
4396                 ;;
4397         *)
4398                 LIBTOOL_CXX="$LIBTOOL"
4399                 ;;
4400         esac
4401 else
4402         LIBTOOL=""
4403         LIBTOOL_CXX=""
4404 fi
4405
4406 test -z "$LIBTOOL" && ECHO_LT=
4407
4408 if test "$with_libtool" != "no" ; then
4409
4410 cf_list_models="$cf_list_models libtool"
4411
4412 else
4413
4414 echo "$as_me:4414: checking if you want to build shared libraries" >&5
4415 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4416
4417 # Check whether --with-shared or --without-shared was given.
4418 if test "${with_shared+set}" = set; then
4419   withval="$with_shared"
4420   with_shared=$withval
4421 else
4422   with_shared=no
4423 fi;
4424 echo "$as_me:4424: result: $with_shared" >&5
4425 echo "${ECHO_T}$with_shared" >&6
4426 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4427
4428 echo "$as_me:4428: checking if you want to build static libraries" >&5
4429 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4430
4431 # Check whether --with-normal or --without-normal was given.
4432 if test "${with_normal+set}" = set; then
4433   withval="$with_normal"
4434   with_normal=$withval
4435 else
4436   with_normal=yes
4437 fi;
4438 echo "$as_me:4438: result: $with_normal" >&5
4439 echo "${ECHO_T}$with_normal" >&6
4440 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4441
4442 echo "$as_me:4442: checking if you want to build debug libraries" >&5
4443 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4444
4445 # Check whether --with-debug or --without-debug was given.
4446 if test "${with_debug+set}" = set; then
4447   withval="$with_debug"
4448   with_debug=$withval
4449 else
4450   with_debug=yes
4451 fi;
4452 echo "$as_me:4452: result: $with_debug" >&5
4453 echo "${ECHO_T}$with_debug" >&6
4454 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4455
4456 echo "$as_me:4456: checking if you want to build profiling libraries" >&5
4457 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4458
4459 # Check whether --with-profile or --without-profile was given.
4460 if test "${with_profile+set}" = set; then
4461   withval="$with_profile"
4462   with_profile=$withval
4463 else
4464   with_profile=no
4465 fi;
4466 echo "$as_me:4466: result: $with_profile" >&5
4467 echo "${ECHO_T}$with_profile" >&6
4468 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4469
4470 fi
4471
4472 ###############################################################################
4473
4474 echo "$as_me:4474: checking for specified models" >&5
4475 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4476 test -z "$cf_list_models" && cf_list_models=normal
4477 test "$with_libtool" != "no" && cf_list_models=libtool
4478 echo "$as_me:4478: result: $cf_list_models" >&5
4479 echo "${ECHO_T}$cf_list_models" >&6
4480
4481 ### Use the first model as the default, and save its suffix for use in building
4482 ### up test-applications.
4483 echo "$as_me:4483: checking for default model" >&5
4484 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4485 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4486 echo "$as_me:4486: result: $DFT_LWR_MODEL" >&5
4487 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4488
4489 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4490
4491 TICS_NAME=tic
4492
4493 TINFO_NAME=tinfo
4494
4495 LIB_NAME=ncurses
4496
4497 LIB_DIR=../lib
4498 LIB_2ND=../../lib
4499
4500         case $cf_cv_system_name in #(vi
4501         OS/2*|os2*) #(vi
4502         LIB_PREFIX=''
4503         ;;
4504         *)      LIB_PREFIX='lib'
4505         ;;
4506         esac
4507 cf_prefix=$LIB_PREFIX
4508
4509 LIB_PREFIX=$cf_prefix
4510
4511 LIB_SUFFIX=
4512
4513 ###############################################################################
4514
4515 echo "$as_me:4515: checking if you want to build a separate terminfo library" >&5
4516 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4517
4518 # Check whether --with-termlib or --without-termlib was given.
4519 if test "${with_termlib+set}" = set; then
4520   withval="$with_termlib"
4521   with_termlib=$withval
4522 else
4523   with_termlib=no
4524 fi;
4525 echo "$as_me:4525: result: $with_termlib" >&5
4526 echo "${ECHO_T}$with_termlib" >&6
4527
4528 echo "$as_me:4528: checking if you want to build a separate tic library" >&5
4529 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4530
4531 # Check whether --with-ticlib or --without-ticlib was given.
4532 if test "${with_ticlib+set}" = set; then
4533   withval="$with_ticlib"
4534   with_ticlib=$withval
4535 else
4536   with_ticlib=no
4537 fi;
4538 echo "$as_me:4538: result: $with_ticlib" >&5
4539 echo "${ECHO_T}$with_ticlib" >&6
4540
4541 ### Checks for special libraries, must be done up-front.
4542 SHLIB_LIST=""
4543
4544 echo "$as_me:4544: checking if you want to link with the GPM mouse library" >&5
4545 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4546
4547 # Check whether --with-gpm or --without-gpm was given.
4548 if test "${with_gpm+set}" = set; then
4549   withval="$with_gpm"
4550   with_gpm=$withval
4551 else
4552   with_gpm=maybe
4553 fi;
4554 echo "$as_me:4554: result: $with_gpm" >&5
4555 echo "${ECHO_T}$with_gpm" >&6
4556
4557 if test "$with_gpm" != no ; then
4558         echo "$as_me:4558: checking for gpm.h" >&5
4559 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4560 if test "${ac_cv_header_gpm_h+set}" = set; then
4561   echo $ECHO_N "(cached) $ECHO_C" >&6
4562 else
4563   cat >conftest.$ac_ext <<_ACEOF
4564 #line 4564 "configure"
4565 #include "confdefs.h"
4566 #include <gpm.h>
4567 _ACEOF
4568 if { (eval echo "$as_me:4568: \"$ac_cpp conftest.$ac_ext\"") >&5
4569   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4570   ac_status=$?
4571   egrep -v '^ *\+' conftest.er1 >conftest.err
4572   rm -f conftest.er1
4573   cat conftest.err >&5
4574   echo "$as_me:4574: \$? = $ac_status" >&5
4575   (exit $ac_status); } >/dev/null; then
4576   if test -s conftest.err; then
4577     ac_cpp_err=$ac_c_preproc_warn_flag
4578   else
4579     ac_cpp_err=
4580   fi
4581 else
4582   ac_cpp_err=yes
4583 fi
4584 if test -z "$ac_cpp_err"; then
4585   ac_cv_header_gpm_h=yes
4586 else
4587   echo "$as_me: failed program was:" >&5
4588   cat conftest.$ac_ext >&5
4589   ac_cv_header_gpm_h=no
4590 fi
4591 rm -f conftest.err conftest.$ac_ext
4592 fi
4593 echo "$as_me:4593: result: $ac_cv_header_gpm_h" >&5
4594 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4595 if test $ac_cv_header_gpm_h = yes; then
4596
4597                 cat >>confdefs.h <<\EOF
4598 #define HAVE_GPM_H 1
4599 EOF
4600
4601                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4602                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4603
4604 echo "${as_me-configure}:4604: testing assuming we really have GPM library ..." 1>&5
4605
4606                         cat >>confdefs.h <<\EOF
4607 #define HAVE_LIBGPM 1
4608 EOF
4609
4610                 else
4611                         echo "$as_me:4611: checking for Gpm_Open in -lgpm" >&5
4612 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4613 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4614   echo $ECHO_N "(cached) $ECHO_C" >&6
4615 else
4616   ac_check_lib_save_LIBS=$LIBS
4617 LIBS="-lgpm  $LIBS"
4618 cat >conftest.$ac_ext <<_ACEOF
4619 #line 4619 "configure"
4620 #include "confdefs.h"
4621
4622 /* Override any gcc2 internal prototype to avoid an error.  */
4623 #ifdef __cplusplus
4624 extern "C"
4625 #endif
4626 /* We use char because int might match the return type of a gcc2
4627    builtin and then its argument prototype would still apply.  */
4628 char Gpm_Open ();
4629 int
4630 main ()
4631 {
4632 Gpm_Open ();
4633   ;
4634   return 0;
4635 }
4636 _ACEOF
4637 rm -f conftest.$ac_objext conftest$ac_exeext
4638 if { (eval echo "$as_me:4638: \"$ac_link\"") >&5
4639   (eval $ac_link) 2>&5
4640   ac_status=$?
4641   echo "$as_me:4641: \$? = $ac_status" >&5
4642   (exit $ac_status); } &&
4643          { ac_try='test -s conftest$ac_exeext'
4644   { (eval echo "$as_me:4644: \"$ac_try\"") >&5
4645   (eval $ac_try) 2>&5
4646   ac_status=$?
4647   echo "$as_me:4647: \$? = $ac_status" >&5
4648   (exit $ac_status); }; }; then
4649   ac_cv_lib_gpm_Gpm_Open=yes
4650 else
4651   echo "$as_me: failed program was:" >&5
4652 cat conftest.$ac_ext >&5
4653 ac_cv_lib_gpm_Gpm_Open=no
4654 fi
4655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4656 LIBS=$ac_check_lib_save_LIBS
4657 fi
4658 echo "$as_me:4658: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4659 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4660 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4661   :
4662 else
4663
4664                                 { { echo "$as_me:4664: error: Cannot link with GPM library" >&5
4665 echo "$as_me: error: Cannot link with GPM library" >&2;}
4666    { (exit 1); exit 1; }; }
4667                 fi
4668                 with_gpm=yes
4669
4670 fi
4671
4672 else
4673
4674                 test "$with_gpm" != maybe && { echo "$as_me:4674: WARNING: Cannot find GPM header" >&5
4675 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4676                 with_gpm=no
4677
4678 fi
4679
4680 fi
4681
4682 if test "$with_gpm" != no ; then
4683         echo "$as_me:4683: checking if you want to load GPM dynamically" >&5
4684 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4685
4686 # Check whether --with-dlsym or --without-dlsym was given.
4687 if test "${with_dlsym+set}" = set; then
4688   withval="$with_dlsym"
4689   with_dlsym=$withval
4690 else
4691   with_dlsym=yes
4692 fi;
4693         echo "$as_me:4693: result: $with_dlsym" >&5
4694 echo "${ECHO_T}$with_dlsym" >&6
4695         if test "$with_dlsym" = yes ; then
4696
4697 cf_have_dlsym=no
4698 echo "$as_me:4698: checking for dlsym" >&5
4699 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4700 if test "${ac_cv_func_dlsym+set}" = set; then
4701   echo $ECHO_N "(cached) $ECHO_C" >&6
4702 else
4703   cat >conftest.$ac_ext <<_ACEOF
4704 #line 4704 "configure"
4705 #include "confdefs.h"
4706 /* System header to define __stub macros and hopefully few prototypes,
4707     which can conflict with char dlsym (); below.  */
4708 #include <assert.h>
4709 /* Override any gcc2 internal prototype to avoid an error.  */
4710 #ifdef __cplusplus
4711 extern "C"
4712 #endif
4713 /* We use char because int might match the return type of a gcc2
4714    builtin and then its argument prototype would still apply.  */
4715 char dlsym ();
4716 char (*f) ();
4717
4718 int
4719 main ()
4720 {
4721 /* The GNU C library defines this for functions which it implements
4722     to always fail with ENOSYS.  Some functions are actually named
4723     something starting with __ and the normal name is an alias.  */
4724 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4725 choke me
4726 #else
4727 f = dlsym;
4728 #endif
4729
4730   ;
4731   return 0;
4732 }
4733 _ACEOF
4734 rm -f conftest.$ac_objext conftest$ac_exeext
4735 if { (eval echo "$as_me:4735: \"$ac_link\"") >&5
4736   (eval $ac_link) 2>&5
4737   ac_status=$?
4738   echo "$as_me:4738: \$? = $ac_status" >&5
4739   (exit $ac_status); } &&
4740          { ac_try='test -s conftest$ac_exeext'
4741   { (eval echo "$as_me:4741: \"$ac_try\"") >&5
4742   (eval $ac_try) 2>&5
4743   ac_status=$?
4744   echo "$as_me:4744: \$? = $ac_status" >&5
4745   (exit $ac_status); }; }; then
4746   ac_cv_func_dlsym=yes
4747 else
4748   echo "$as_me: failed program was:" >&5
4749 cat conftest.$ac_ext >&5
4750 ac_cv_func_dlsym=no
4751 fi
4752 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4753 fi
4754 echo "$as_me:4754: result: $ac_cv_func_dlsym" >&5
4755 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4756 if test $ac_cv_func_dlsym = yes; then
4757   cf_have_dlsym=yes
4758 else
4759
4760 cf_have_libdl=no
4761 echo "$as_me:4761: checking for dlsym in -ldl" >&5
4762 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4763 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4764   echo $ECHO_N "(cached) $ECHO_C" >&6
4765 else
4766   ac_check_lib_save_LIBS=$LIBS
4767 LIBS="-ldl  $LIBS"
4768 cat >conftest.$ac_ext <<_ACEOF
4769 #line 4769 "configure"
4770 #include "confdefs.h"
4771
4772 /* Override any gcc2 internal prototype to avoid an error.  */
4773 #ifdef __cplusplus
4774 extern "C"
4775 #endif
4776 /* We use char because int might match the return type of a gcc2
4777    builtin and then its argument prototype would still apply.  */
4778 char dlsym ();
4779 int
4780 main ()
4781 {
4782 dlsym ();
4783   ;
4784   return 0;
4785 }
4786 _ACEOF
4787 rm -f conftest.$ac_objext conftest$ac_exeext
4788 if { (eval echo "$as_me:4788: \"$ac_link\"") >&5
4789   (eval $ac_link) 2>&5
4790   ac_status=$?
4791   echo "$as_me:4791: \$? = $ac_status" >&5
4792   (exit $ac_status); } &&
4793          { ac_try='test -s conftest$ac_exeext'
4794   { (eval echo "$as_me:4794: \"$ac_try\"") >&5
4795   (eval $ac_try) 2>&5
4796   ac_status=$?
4797   echo "$as_me:4797: \$? = $ac_status" >&5
4798   (exit $ac_status); }; }; then
4799   ac_cv_lib_dl_dlsym=yes
4800 else
4801   echo "$as_me: failed program was:" >&5
4802 cat conftest.$ac_ext >&5
4803 ac_cv_lib_dl_dlsym=no
4804 fi
4805 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4806 LIBS=$ac_check_lib_save_LIBS
4807 fi
4808 echo "$as_me:4808: result: $ac_cv_lib_dl_dlsym" >&5
4809 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4810 if test $ac_cv_lib_dl_dlsym = yes; then
4811
4812         cf_have_dlsym=yes
4813         cf_have_libdl=yes
4814 fi
4815
4816 fi
4817
4818 if test "$cf_have_dlsym" = yes ; then
4819         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4820
4821         echo "$as_me:4821: checking whether able to link to dl*() functions" >&5
4822 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4823         cat >conftest.$ac_ext <<_ACEOF
4824 #line 4824 "configure"
4825 #include "confdefs.h"
4826 #include <dlfcn.h>
4827 int
4828 main ()
4829 {
4830
4831                 void *obj;
4832                 if ((obj = dlopen("filename", 0)) != 0) {
4833                         if (dlsym(obj, "symbolname") == 0) {
4834                         dlclose(obj);
4835                         }
4836                 }
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 rm -f conftest.$ac_objext conftest$ac_exeext
4842 if { (eval echo "$as_me:4842: \"$ac_link\"") >&5
4843   (eval $ac_link) 2>&5
4844   ac_status=$?
4845   echo "$as_me:4845: \$? = $ac_status" >&5
4846   (exit $ac_status); } &&
4847          { ac_try='test -s conftest$ac_exeext'
4848   { (eval echo "$as_me:4848: \"$ac_try\"") >&5
4849   (eval $ac_try) 2>&5
4850   ac_status=$?
4851   echo "$as_me:4851: \$? = $ac_status" >&5
4852   (exit $ac_status); }; }; then
4853
4854                 cat >>confdefs.h <<\EOF
4855 #define HAVE_LIBDL 1
4856 EOF
4857
4858 else
4859   echo "$as_me: failed program was:" >&5
4860 cat conftest.$ac_ext >&5
4861
4862                 { { echo "$as_me:4862: error: Cannot link test program for libdl" >&5
4863 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4864    { (exit 1); exit 1; }; }
4865 fi
4866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4867         echo "$as_me:4867: result: ok" >&5
4868 echo "${ECHO_T}ok" >&6
4869 else
4870         { { echo "$as_me:4870: error: Cannot find dlsym function" >&5
4871 echo "$as_me: error: Cannot find dlsym function" >&2;}
4872    { (exit 1); exit 1; }; }
4873 fi
4874
4875                 if test "$with_gpm" != yes ; then
4876                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4877
4878 echo "${as_me-configure}:4878: testing assuming soname for gpm is $with_gpm ..." 1>&5
4879
4880                         cf_cv_gpm_soname="$with_gpm"
4881                 else
4882
4883 echo "$as_me:4883: checking for soname of gpm library" >&5
4884 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4885 if test "${cf_cv_gpm_soname+set}" = set; then
4886   echo $ECHO_N "(cached) $ECHO_C" >&6
4887 else
4888
4889 cf_cv_gpm_soname=unknown
4890 if test "$cross_compiling" != yes ; then
4891 cat >conftest.$ac_ext <<CF_EOF
4892 #include <gpm.h>
4893 int main()
4894 {
4895 if (Gpm_Open(0,0)) Gpm_Close();
4896         ${cf_cv_main_return:-return}(0);
4897 }
4898 CF_EOF
4899 cf_save_LIBS="$LIBS"
4900         LIBS="-lgpm $LIBS"
4901         if { (eval echo "$as_me:4901: \"$ac_compile\"") >&5
4902   (eval $ac_compile) 2>&5
4903   ac_status=$?
4904   echo "$as_me:4904: \$? = $ac_status" >&5
4905   (exit $ac_status); } ; then
4906                 if { (eval echo "$as_me:4906: \"$ac_link\"") >&5
4907   (eval $ac_link) 2>&5
4908   ac_status=$?
4909   echo "$as_me:4909: \$? = $ac_status" >&5
4910   (exit $ac_status); } ; then
4911                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4912                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4913                 fi
4914         fi
4915 rm -f conftest*
4916 LIBS="$cf_save_LIBS"
4917 fi
4918
4919 fi
4920 echo "$as_me:4920: result: $cf_cv_gpm_soname" >&5
4921 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4922
4923                 fi
4924                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4925 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4926 EOF
4927
4928                 SHLIB_LIST="-ldl $SHLIB_LIST"
4929         else
4930                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4931         fi
4932         cat >>confdefs.h <<\EOF
4933 #define HAVE_LIBGPM 1
4934 EOF
4935
4936 echo "$as_me:4936: checking for Gpm_Wgetch in -lgpm" >&5
4937 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4938 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4939   echo $ECHO_N "(cached) $ECHO_C" >&6
4940 else
4941   ac_check_lib_save_LIBS=$LIBS
4942 LIBS="-lgpm  $LIBS"
4943 cat >conftest.$ac_ext <<_ACEOF
4944 #line 4944 "configure"
4945 #include "confdefs.h"
4946
4947 /* Override any gcc2 internal prototype to avoid an error.  */
4948 #ifdef __cplusplus
4949 extern "C"
4950 #endif
4951 /* We use char because int might match the return type of a gcc2
4952    builtin and then its argument prototype would still apply.  */
4953 char Gpm_Wgetch ();
4954 int
4955 main ()
4956 {
4957 Gpm_Wgetch ();
4958   ;
4959   return 0;
4960 }
4961 _ACEOF
4962 rm -f conftest.$ac_objext conftest$ac_exeext
4963 if { (eval echo "$as_me:4963: \"$ac_link\"") >&5
4964   (eval $ac_link) 2>&5
4965   ac_status=$?
4966   echo "$as_me:4966: \$? = $ac_status" >&5
4967   (exit $ac_status); } &&
4968          { ac_try='test -s conftest$ac_exeext'
4969   { (eval echo "$as_me:4969: \"$ac_try\"") >&5
4970   (eval $ac_try) 2>&5
4971   ac_status=$?
4972   echo "$as_me:4972: \$? = $ac_status" >&5
4973   (exit $ac_status); }; }; then
4974   ac_cv_lib_gpm_Gpm_Wgetch=yes
4975 else
4976   echo "$as_me: failed program was:" >&5
4977 cat conftest.$ac_ext >&5
4978 ac_cv_lib_gpm_Gpm_Wgetch=no
4979 fi
4980 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4981 LIBS=$ac_check_lib_save_LIBS
4982 fi
4983 echo "$as_me:4983: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4984 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4985 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4986
4987 echo "$as_me:4987: checking if GPM is weakly bound to curses library" >&5
4988 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
4989 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
4990   echo $ECHO_N "(cached) $ECHO_C" >&6
4991 else
4992
4993 cf_cv_check_gpm_wgetch=unknown
4994 if test "$cross_compiling" != yes ; then
4995
4996 cat >conftest.$ac_ext <<CF_EOF
4997 #include <gpm.h>
4998 int main()
4999 {
5000         Gpm_Wgetch();
5001         ${cf_cv_main_return:-return}(0);
5002 }
5003 CF_EOF
5004
5005         cf_save_LIBS="$LIBS"
5006         # This only works if we can look at the symbol table.  If a shared
5007         # library is stripped for install, we cannot use that.  So we're forced
5008         # to rely on the static library, noting that some packagers may not
5009         # include it.
5010         LIBS="-static -lgpm -dynamic $LIBS"
5011         if { (eval echo "$as_me:5011: \"$ac_compile\"") >&5
5012   (eval $ac_compile) 2>&5
5013   ac_status=$?
5014   echo "$as_me:5014: \$? = $ac_status" >&5
5015   (exit $ac_status); } ; then
5016                 if { (eval echo "$as_me:5016: \"$ac_link\"") >&5
5017   (eval $ac_link) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); } ; then
5021                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5022                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5023                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5024                 fi
5025         fi
5026         rm -f conftest*
5027         LIBS="$cf_save_LIBS"
5028 fi
5029
5030 fi
5031 echo "$as_me:5031: result: $cf_cv_check_gpm_wgetch" >&5
5032 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5033
5034 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5035         { echo "$as_me:5035: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5036 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5037 fi
5038
5039 fi
5040
5041 fi
5042
5043 # not everyone has "test -c"
5044 if test -c /dev/sysmouse 2>/dev/null ; then
5045 echo "$as_me:5045: checking if you want to use sysmouse" >&5
5046 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5047
5048 # Check whether --with-sysmouse or --without-sysmouse was given.
5049 if test "${with_sysmouse+set}" = set; then
5050   withval="$with_sysmouse"
5051   cf_with_sysmouse=$withval
5052 else
5053   cf_with_sysmouse=maybe
5054 fi;
5055         if test "$cf_with_sysmouse" != no ; then
5056         cat >conftest.$ac_ext <<_ACEOF
5057 #line 5057 "configure"
5058 #include "confdefs.h"
5059
5060 #include <osreldate.h>
5061 #if (__FreeBSD_version >= 400017)
5062 #include <sys/consio.h>
5063 #include <sys/fbio.h>
5064 #else
5065 #include <machine/console.h>
5066 #endif
5067
5068 int
5069 main ()
5070 {
5071
5072         struct mouse_info the_mouse;
5073         ioctl(0, CONS_MOUSECTL, &the_mouse);
5074
5075   ;
5076   return 0;
5077 }
5078 _ACEOF
5079 rm -f conftest.$ac_objext
5080 if { (eval echo "$as_me:5080: \"$ac_compile\"") >&5
5081   (eval $ac_compile) 2>&5
5082   ac_status=$?
5083   echo "$as_me:5083: \$? = $ac_status" >&5
5084   (exit $ac_status); } &&
5085          { ac_try='test -s conftest.$ac_objext'
5086   { (eval echo "$as_me:5086: \"$ac_try\"") >&5
5087   (eval $ac_try) 2>&5
5088   ac_status=$?
5089   echo "$as_me:5089: \$? = $ac_status" >&5
5090   (exit $ac_status); }; }; then
5091   cf_with_sysmouse=yes
5092 else
5093   echo "$as_me: failed program was:" >&5
5094 cat conftest.$ac_ext >&5
5095 cf_with_sysmouse=no
5096 fi
5097 rm -f conftest.$ac_objext conftest.$ac_ext
5098         fi
5099 echo "$as_me:5099: result: $cf_with_sysmouse" >&5
5100 echo "${ECHO_T}$cf_with_sysmouse" >&6
5101 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5102 #define USE_SYSMOUSE 1
5103 EOF
5104
5105 fi
5106
5107 if test X"$CC_G_OPT" = X"" ; then
5108         CC_G_OPT='-g'
5109         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5110 fi
5111
5112 if test X"$CXX_G_OPT" = X"" ; then
5113         CXX_G_OPT='-g'
5114         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5115 fi
5116
5117 echo "$as_me:5117: checking for default loader flags" >&5
5118 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5119 case $DFT_LWR_MODEL in
5120 libtool) LD_MODEL=''   ;;
5121 normal)  LD_MODEL=''   ;;
5122 debug)   LD_MODEL=$CC_G_OPT ;;
5123 profile) LD_MODEL='-pg';;
5124 shared)  LD_MODEL=''   ;;
5125 esac
5126 echo "$as_me:5126: result: $LD_MODEL" >&5
5127 echo "${ECHO_T}$LD_MODEL" >&6
5128
5129 case $DFT_LWR_MODEL in
5130 shared)
5131
5132 echo "$as_me:5132: checking if rpath option should be used" >&5
5133 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5134
5135 # Check whether --enable-rpath or --disable-rpath was given.
5136 if test "${enable_rpath+set}" = set; then
5137   enableval="$enable_rpath"
5138   cf_cv_ld_rpath=$enableval
5139 else
5140   cf_cv_ld_rpath=no
5141 fi;
5142 echo "$as_me:5142: result: $cf_cv_ld_rpath" >&5
5143 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5144
5145 echo "$as_me:5145: checking if shared libraries should be relinked during install" >&5
5146 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5147
5148 # Check whether --enable-relink or --disable-relink was given.
5149 if test "${enable_relink+set}" = set; then
5150   enableval="$enable_relink"
5151   cf_cv_do_relink=$enableval
5152 else
5153   cf_cv_do_relink=yes
5154 fi;
5155 echo "$as_me:5155: result: $cf_cv_do_relink" >&5
5156 echo "${ECHO_T}$cf_cv_do_relink" >&6
5157         ;;
5158 esac
5159
5160         LOCAL_LDFLAGS=
5161         LOCAL_LDFLAGS2=
5162         LD_RPATH_OPT=
5163         LD_SHARED_OPTS=
5164         INSTALL_LIB="-m 644"
5165
5166         cf_cv_do_symlinks=no
5167
5168         echo "$as_me:5168: checking if release/abi version should be used for shared libs" >&5
5169 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5170
5171 # Check whether --with-shlib-version or --without-shlib-version was given.
5172 if test "${with_shlib_version+set}" = set; then
5173   withval="$with_shlib_version"
5174   test -z "$withval" && withval=auto
5175         case $withval in #(vi
5176         yes) #(vi
5177                 cf_cv_shlib_version=auto
5178                 ;;
5179         rel|abi|auto|no) #(vi
5180                 cf_cv_shlib_version=$withval
5181                 ;;
5182         *)
5183                 { { echo "$as_me:5183: error: option value must be one of: rel, abi, auto or no" >&5
5184 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5185    { (exit 1); exit 1; }; }
5186                 ;;
5187         esac
5188
5189 else
5190   cf_cv_shlib_version=auto
5191 fi;
5192         echo "$as_me:5192: result: $cf_cv_shlib_version" >&5
5193 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5194
5195         cf_cv_rm_so_locs=no
5196
5197         # Some less-capable ports of gcc support only -fpic
5198         CC_SHARED_OPTS=
5199         if test "$GCC" = yes
5200         then
5201                 echo "$as_me:5201: checking which $CC option to use" >&5
5202 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5203                 cf_save_CFLAGS="$CFLAGS"
5204                 for CC_SHARED_OPTS in -fPIC -fpic ''
5205                 do
5206                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5207                         cat >conftest.$ac_ext <<_ACEOF
5208 #line 5208 "configure"
5209 #include "confdefs.h"
5210 #include <stdio.h>
5211 int
5212 main ()
5213 {
5214 int x = 1
5215   ;
5216   return 0;
5217 }
5218 _ACEOF
5219 rm -f conftest.$ac_objext
5220 if { (eval echo "$as_me:5220: \"$ac_compile\"") >&5
5221   (eval $ac_compile) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); } &&
5225          { ac_try='test -s conftest.$ac_objext'
5226   { (eval echo "$as_me:5226: \"$ac_try\"") >&5
5227   (eval $ac_try) 2>&5
5228   ac_status=$?
5229   echo "$as_me:5229: \$? = $ac_status" >&5
5230   (exit $ac_status); }; }; then
5231   break
5232 else
5233   echo "$as_me: failed program was:" >&5
5234 cat conftest.$ac_ext >&5
5235 fi
5236 rm -f conftest.$ac_objext conftest.$ac_ext
5237                 done
5238                 echo "$as_me:5238: result: $CC_SHARED_OPTS" >&5
5239 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5240                 CFLAGS="$cf_save_CFLAGS"
5241         fi
5242
5243         cf_cv_shlib_version_infix=no
5244
5245         case $cf_cv_system_name in
5246         aix[56]*)
5247                 if test "$GCC" = yes; then
5248                         CC_SHARED_OPTS=
5249                         MK_SHARED_LIB="$(CC) -shared"
5250                 fi
5251                 ;;
5252         beos*)
5253                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5254                 ;;
5255         cygwin*)
5256                 CC_SHARED_OPTS=
5257                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5258                 cf_cv_shlib_version=cygdll
5259                 cf_cv_shlib_version_infix=cygdll
5260                 cat >mk_shared_lib.sh <<-CF_EOF
5261                 #!/bin/sh
5262                 SHARED_LIB=\$1
5263                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5264                 shift
5265                 cat <<-EOF
5266                 Linking shared library
5267                 ** SHARED_LIB \$SHARED_LIB
5268                 ** IMPORT_LIB \$IMPORT_LIB
5269 EOF
5270                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5271 CF_EOF
5272                 chmod +x mk_shared_lib.sh
5273                 ;;
5274         darwin*)
5275                 EXTRA_CFLAGS="-no-cpp-precomp"
5276                 CC_SHARED_OPTS="-dynamic"
5277                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5278                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5279                 cf_cv_shlib_version_infix=yes
5280                 echo "$as_me:5280: checking if ld -search_paths_first works" >&5
5281 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5282 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5283   echo $ECHO_N "(cached) $ECHO_C" >&6
5284 else
5285
5286                         cf_save_LDFLAGS=$LDFLAGS
5287                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5288                         cat >conftest.$ac_ext <<_ACEOF
5289 #line 5289 "configure"
5290 #include "confdefs.h"
5291
5292 int
5293 main ()
5294 {
5295 int i;
5296   ;
5297   return 0;
5298 }
5299 _ACEOF
5300 rm -f conftest.$ac_objext conftest$ac_exeext
5301 if { (eval echo "$as_me:5301: \"$ac_link\"") >&5
5302   (eval $ac_link) 2>&5
5303   ac_status=$?
5304   echo "$as_me:5304: \$? = $ac_status" >&5
5305   (exit $ac_status); } &&
5306          { ac_try='test -s conftest$ac_exeext'
5307   { (eval echo "$as_me:5307: \"$ac_try\"") >&5
5308   (eval $ac_try) 2>&5
5309   ac_status=$?
5310   echo "$as_me:5310: \$? = $ac_status" >&5
5311   (exit $ac_status); }; }; then
5312   cf_cv_ldflags_search_paths_first=yes
5313 else
5314   echo "$as_me: failed program was:" >&5
5315 cat conftest.$ac_ext >&5
5316 cf_cv_ldflags_search_paths_first=no
5317 fi
5318 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5319                                 LDFLAGS=$cf_save_LDFLAGS
5320 fi
5321 echo "$as_me:5321: result: $cf_cv_ldflags_search_paths_first" >&5
5322 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5323                 if test $cf_cv_ldflags_search_paths_first = yes; then
5324                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5325                 fi
5326                 ;;
5327         hpux*)
5328                 # (tested with gcc 2.7.2 -- I don't have c89)
5329                 if test "$GCC" = yes; then
5330                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5331                 else
5332                         CC_SHARED_OPTS='+Z'
5333                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5334                 fi
5335                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5336                 # HP-UX shared libraries must be executable, and should be
5337                 # readonly to exploit a quirk in the memory manager.
5338                 INSTALL_LIB="-m 555"
5339                 ;;
5340         irix*)
5341                 if test "$cf_cv_ld_rpath" = yes ; then
5342                         if test "$GCC" = yes; then
5343                                 LD_RPATH_OPT="-Wl,-rpath,"
5344                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5345                         else
5346                                 LD_RPATH_OPT="-rpath "
5347                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5348                         fi
5349                 fi
5350                 # tested with IRIX 5.2 and 'cc'.
5351                 if test "$GCC" != yes; then
5352                         CC_SHARED_OPTS='-KPIC'
5353                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5354                 else
5355                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5356                 fi
5357                 cf_cv_rm_so_locs=yes
5358                 ;;
5359         linux*|gnu*|k*bsd*-gnu)
5360                 if test "$DFT_LWR_MODEL" = "shared" ; then
5361                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5362                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5363                 fi
5364                 if test "$cf_cv_ld_rpath" = yes ; then
5365                         LD_RPATH_OPT="-Wl,-rpath,"
5366                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5367                 fi
5368
5369         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5370         if test "$cf_cv_shlib_version" = rel; then
5371                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5372         else
5373                 cf_cv_shared_soname='`basename $@`'
5374         fi
5375
5376                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5377                 ;;
5378         openbsd[2-9].*)
5379                 if test "$DFT_LWR_MODEL" = "shared" ; then
5380                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5381                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5382                 fi
5383                 if test "$cf_cv_ld_rpath" = yes ; then
5384                         LD_RPATH_OPT="-Wl,-rpath,"
5385                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5386                 fi
5387                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5388
5389         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5390         if test "$cf_cv_shlib_version" = rel; then
5391                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5392         else
5393                 cf_cv_shared_soname='`basename $@`'
5394         fi
5395
5396                 MK_SHARED_LIB='${CC} ${CFLAGS} -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5397                 ;;
5398         nto-qnx*|openbsd*|freebsd[12].*)
5399                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5400                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5401                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5402                 ;;
5403         freebsd*)
5404                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5405                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5406                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5407                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5408                         LD_RPATH_OPT="-rpath "
5409                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5410                 fi
5411
5412         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5413         if test "$cf_cv_shlib_version" = rel; then
5414                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5415         else
5416                 cf_cv_shared_soname='`basename $@`'
5417         fi
5418
5419                 MK_SHARED_LIB='${LD} -Bshareable -soname=`basename $@` -o $@'
5420                 ;;
5421         netbsd*)
5422                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5423                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5424                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5425                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5426                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5427                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5428                         if test "$cf_cv_shlib_version" = auto; then
5429                         if test -f /usr/libexec/ld.elf_so; then
5430                                 cf_cv_shlib_version=abi
5431                         else
5432                                 cf_cv_shlib_version=rel
5433                         fi
5434                         fi
5435
5436         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5437         if test "$cf_cv_shlib_version" = rel; then
5438                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5439         else
5440                 cf_cv_shared_soname='`basename $@`'
5441         fi
5442
5443                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5444                 else
5445                         MK_SHARED_LIB='${LD} -Bshareable -o $@'
5446                 fi
5447                 ;;
5448         osf*|mls+*)
5449                 # tested with OSF/1 V3.2 and 'cc'
5450                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5451                 # link with shared libs).
5452                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5453                 case $host_os in
5454                 osf4*)
5455                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5456                         ;;
5457                 esac
5458                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5459                 if test "$DFT_LWR_MODEL" = "shared" ; then
5460                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5461                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5462                 fi
5463                 if test "$cf_cv_ld_rpath" = yes ; then
5464                         LD_RPATH_OPT="-rpath"
5465                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5466                 fi
5467                 cf_cv_rm_so_locs=yes
5468                 ;;
5469         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5470                 # tested with osr5.0.5
5471                 if test "$GCC" != yes; then
5472                         CC_SHARED_OPTS='-belf -KPIC'
5473                 fi
5474                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5475                 if test "$cf_cv_ld_rpath" = yes ; then
5476                         # only way is to set LD_RUN_PATH but no switch for it
5477                         RUN_PATH=$libdir
5478                 fi
5479                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5480                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5481                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5482                 ;;
5483         sunos4*)
5484                 # tested with SunOS 4.1.1 and gcc 2.7.0
5485                 if test "$GCC" != yes; then
5486                         CC_SHARED_OPTS='-KPIC'
5487                 fi
5488                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5489                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5490                 ;;
5491         solaris2*)
5492                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5493                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5494                 if test "$DFT_LWR_MODEL" = "shared" ; then
5495                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5496                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5497                 fi
5498                 if test "$cf_cv_ld_rpath" = yes ; then
5499                         LD_RPATH_OPT="-R"
5500                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5501                 fi
5502
5503         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5504         if test "$cf_cv_shlib_version" = rel; then
5505                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5506         else
5507                 cf_cv_shared_soname='`basename $@`'
5508         fi
5509
5510                 if test "$GCC" != yes; then
5511                         cf_save_CFLAGS="$CFLAGS"
5512                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5513                         do
5514                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5515                                 cat >conftest.$ac_ext <<_ACEOF
5516 #line 5516 "configure"
5517 #include "confdefs.h"
5518 #include <stdio.h>
5519 int
5520 main ()
5521 {
5522 printf("Hello\n");
5523   ;
5524   return 0;
5525 }
5526 _ACEOF
5527 rm -f conftest.$ac_objext
5528 if { (eval echo "$as_me:5528: \"$ac_compile\"") >&5
5529   (eval $ac_compile) 2>&5
5530   ac_status=$?
5531   echo "$as_me:5531: \$? = $ac_status" >&5
5532   (exit $ac_status); } &&
5533          { ac_try='test -s conftest.$ac_objext'
5534   { (eval echo "$as_me:5534: \"$ac_try\"") >&5
5535   (eval $ac_try) 2>&5
5536   ac_status=$?
5537   echo "$as_me:5537: \$? = $ac_status" >&5
5538   (exit $ac_status); }; }; then
5539   break
5540 else
5541   echo "$as_me: failed program was:" >&5
5542 cat conftest.$ac_ext >&5
5543 fi
5544 rm -f conftest.$ac_objext conftest.$ac_ext
5545                         done
5546                         CFLAGS="$cf_save_CFLAGS"
5547                         CC_SHARED_OPTS=$cf_shared_opts
5548                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5549                 else
5550                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5551                 fi
5552                 ;;
5553         sysv5uw7*|unix_sv*)
5554                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5555                 if test "$GCC" != yes; then
5556                         CC_SHARED_OPTS='-KPIC'
5557                 fi
5558                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5559                 ;;
5560         *)
5561                 CC_SHARED_OPTS='unknown'
5562                 MK_SHARED_LIB='echo unknown'
5563                 ;;
5564         esac
5565
5566         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5567         case "$cf_cv_shlib_version" in #(vi
5568         rel|abi)
5569                 case "$MK_SHARED_LIB" in #(vi
5570                 *'-o $@')
5571                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5572                         ;;
5573                 *)
5574                         { echo "$as_me:5574: WARNING: ignored --with-shlib-version" >&5
5575 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5576                         ;;
5577                 esac
5578                 ;;
5579         esac
5580
5581         if test -n "$LD_RPATH_OPT" ; then
5582                 echo "$as_me:5582: checking if we need a space after rpath option" >&5
5583 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5584                 cf_save_LIBS="$LIBS"
5585                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5586                 cat >conftest.$ac_ext <<_ACEOF
5587 #line 5587 "configure"
5588 #include "confdefs.h"
5589
5590 int
5591 main ()
5592 {
5593
5594   ;
5595   return 0;
5596 }
5597 _ACEOF
5598 rm -f conftest.$ac_objext conftest$ac_exeext
5599 if { (eval echo "$as_me:5599: \"$ac_link\"") >&5
5600   (eval $ac_link) 2>&5
5601   ac_status=$?
5602   echo "$as_me:5602: \$? = $ac_status" >&5
5603   (exit $ac_status); } &&
5604          { ac_try='test -s conftest$ac_exeext'
5605   { (eval echo "$as_me:5605: \"$ac_try\"") >&5
5606   (eval $ac_try) 2>&5
5607   ac_status=$?
5608   echo "$as_me:5608: \$? = $ac_status" >&5
5609   (exit $ac_status); }; }; then
5610   cf_rpath_space=no
5611 else
5612   echo "$as_me: failed program was:" >&5
5613 cat conftest.$ac_ext >&5
5614 cf_rpath_space=yes
5615 fi
5616 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5617                 LIBS="$cf_save_LIBS"
5618                 echo "$as_me:5618: result: $cf_rpath_space" >&5
5619 echo "${ECHO_T}$cf_rpath_space" >&6
5620                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5621                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5622         fi
5623
5624 if test "$CC_SHARED_OPTS" = "unknown"; then
5625         for model in $cf_list_models; do
5626                 if test "$model" = "shared"; then
5627                         { { echo "$as_me:5627: error: Shared libraries are not supported in this version" >&5
5628 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5629    { (exit 1); exit 1; }; }
5630                 fi
5631         done
5632 fi
5633
5634 ###############################################################################
5635
5636 ###     use option --disable-overwrite to leave out the link to -lcurses
5637 echo "$as_me:5637: checking if you wish to install ncurses overwriting curses" >&5
5638 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5639
5640 # Check whether --enable-overwrite or --disable-overwrite was given.
5641 if test "${enable_overwrite+set}" = set; then
5642   enableval="$enable_overwrite"
5643   with_overwrite=$enableval
5644 else
5645   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5646 fi;
5647 echo "$as_me:5647: result: $with_overwrite" >&5
5648 echo "${ECHO_T}$with_overwrite" >&6
5649
5650 echo "$as_me:5650: checking if external terminfo-database is used" >&5
5651 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5652
5653 # Check whether --enable-database or --disable-database was given.
5654 if test "${enable_database+set}" = set; then
5655   enableval="$enable_database"
5656   use_database=$enableval
5657 else
5658   use_database=yes
5659 fi;
5660 echo "$as_me:5660: result: $use_database" >&5
5661 echo "${ECHO_T}$use_database" >&6
5662
5663 case $host_os in #(vi
5664 os2*) #(vi
5665         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5666         ;;
5667 *) #(vi
5668         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5669         ;;
5670 esac
5671
5672         case $cf_cv_system_name in
5673         os2*)   PATHSEP=';'  ;;
5674         *)      PATHSEP=':'  ;;
5675         esac
5676
5677 if test "$use_database" != no ; then
5678         cat >>confdefs.h <<\EOF
5679 #define USE_DATABASE 1
5680 EOF
5681
5682         echo "$as_me:5682: checking which terminfo source-file will be installed" >&5
5683 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5684
5685 # Check whether --enable-database or --disable-database was given.
5686 if test "${enable_database+set}" = set; then
5687   enableval="$enable_database"
5688   TERMINFO_SRC=$withval
5689 fi;
5690         echo "$as_me:5690: result: $TERMINFO_SRC" >&5
5691 echo "${ECHO_T}$TERMINFO_SRC" >&6
5692
5693         echo "$as_me:5693: checking whether to use hashed database instead of directory/tree" >&5
5694 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5695
5696 # Check whether --with-hashed-db or --without-hashed-db was given.
5697 if test "${with_hashed_db+set}" = set; then
5698   withval="$with_hashed_db"
5699
5700 else
5701   with_hashed_db=no
5702 fi;
5703         echo "$as_me:5703: result: $with_hashed_db" >&5
5704 echo "${ECHO_T}$with_hashed_db" >&6
5705 else
5706         with_hashed_db=no
5707 fi
5708
5709 echo "$as_me:5709: checking for list of fallback descriptions" >&5
5710 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5711
5712 # Check whether --with-fallbacks or --without-fallbacks was given.
5713 if test "${with_fallbacks+set}" = set; then
5714   withval="$with_fallbacks"
5715   with_fallback=$withval
5716 else
5717   with_fallback=
5718 fi;
5719 echo "$as_me:5719: result: $with_fallback" >&5
5720 echo "${ECHO_T}$with_fallback" >&6
5721 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5722
5723 echo "$as_me:5723: checking if you want modern xterm or antique" >&5
5724 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5725
5726 # Check whether --with-xterm-new or --without-xterm-new was given.
5727 if test "${with_xterm_new+set}" = set; then
5728   withval="$with_xterm_new"
5729   with_xterm_new=$withval
5730 else
5731   with_xterm_new=yes
5732 fi;
5733 case $with_xterm_new in
5734 no)     with_xterm_new=xterm-old;;
5735 *)      with_xterm_new=xterm-new;;
5736 esac
5737 echo "$as_me:5737: result: $with_xterm_new" >&5
5738 echo "${ECHO_T}$with_xterm_new" >&6
5739 WHICH_XTERM=$with_xterm_new
5740
5741 MAKE_TERMINFO=
5742 if test "$use_database" = no ; then
5743         TERMINFO="${datadir}/terminfo"
5744         MAKE_TERMINFO="#"
5745 else
5746
5747 echo "$as_me:5747: checking for list of terminfo directories" >&5
5748 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5749
5750 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5751 if test "${with_terminfo_dirs+set}" = set; then
5752   withval="$with_terminfo_dirs"
5753
5754 else
5755   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5756 fi;
5757 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5758 cf_dst_path=
5759 for cf_src_path in $withval
5760 do
5761
5762 if test "x$prefix" != xNONE; then
5763   cf_path_syntax="$prefix"
5764 else
5765   cf_path_syntax="$ac_default_prefix"
5766 fi
5767
5768 case ".$cf_src_path" in #(vi
5769 .\$\(*\)*|.\'*\'*) #(vi
5770   ;;
5771 ..|./*|.\\*) #(vi
5772   ;;
5773 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5774   ;;
5775 .\${*prefix}*) #(vi
5776   eval cf_src_path="$cf_src_path"
5777   case ".$cf_src_path" in #(vi
5778   .NONE/*)
5779     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5780     ;;
5781   esac
5782   ;; #(vi
5783 .no|.NONE/*)
5784   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5785   ;;
5786 *)
5787   { { echo "$as_me:5787: error: expected a pathname, not \"$cf_src_path\"" >&5
5788 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5789    { (exit 1); exit 1; }; }
5790   ;;
5791 esac
5792
5793   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5794   cf_dst_path="${cf_dst_path}${cf_src_path}"
5795 done
5796 IFS="$ac_save_ifs"
5797
5798 eval 'TERMINFO_DIRS="$cf_dst_path"'
5799
5800 echo "$as_me:5800: result: $TERMINFO_DIRS" >&5
5801 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5802 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5803 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5804 EOF
5805
5806 echo "$as_me:5806: checking for default terminfo directory" >&5
5807 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5808
5809 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5810 if test "${with_default_terminfo_dir+set}" = set; then
5811   withval="$with_default_terminfo_dir"
5812
5813 else
5814   withval="${TERMINFO-${datadir}/terminfo}"
5815 fi; if test -n "${datadir}/terminfo" ; then
5816
5817 if test "x$prefix" != xNONE; then
5818   cf_path_syntax="$prefix"
5819 else
5820   cf_path_syntax="$ac_default_prefix"
5821 fi
5822
5823 case ".$withval" in #(vi
5824 .\$\(*\)*|.\'*\'*) #(vi
5825   ;;
5826 ..|./*|.\\*) #(vi
5827   ;;
5828 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5829   ;;
5830 .\${*prefix}*) #(vi
5831   eval withval="$withval"
5832   case ".$withval" in #(vi
5833   .NONE/*)
5834     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5835     ;;
5836   esac
5837   ;; #(vi
5838 .no|.NONE/*)
5839   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5840   ;;
5841 *)
5842   { { echo "$as_me:5842: error: expected a pathname, not \"$withval\"" >&5
5843 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5844    { (exit 1); exit 1; }; }
5845   ;;
5846 esac
5847
5848 fi
5849 TERMINFO="$withval"
5850
5851 echo "$as_me:5851: result: $TERMINFO" >&5
5852 echo "${ECHO_T}$TERMINFO" >&6
5853 cat >>confdefs.h <<EOF
5854 #define TERMINFO "$TERMINFO"
5855 EOF
5856
5857 fi
5858
5859 ###     use option --disable-big-core to make tic run on small machines
5860 ###     We need 4Mb, check if we can allocate 50% more than that.
5861 echo "$as_me:5861: checking if big-core option selected" >&5
5862 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5863
5864 # Check whether --enable-big-core or --disable-big-core was given.
5865 if test "${enable_big_core+set}" = set; then
5866   enableval="$enable_big_core"
5867   with_big_core=$enableval
5868 else
5869   if test "$cross_compiling" = yes; then
5870   with_big_core=no
5871 else
5872   cat >conftest.$ac_ext <<_ACEOF
5873 #line 5873 "configure"
5874 #include "confdefs.h"
5875
5876 #include <stdlib.h>
5877 #include <string.h>
5878 int main() {
5879         unsigned long n = 6000000L;
5880         char *s = malloc(n);
5881         if (s != 0)
5882                 s[0] = s[n-1] = 0;
5883         ${cf_cv_main_return:-return}(s == 0);
5884 }
5885 _ACEOF
5886 rm -f conftest$ac_exeext
5887 if { (eval echo "$as_me:5887: \"$ac_link\"") >&5
5888   (eval $ac_link) 2>&5
5889   ac_status=$?
5890   echo "$as_me:5890: \$? = $ac_status" >&5
5891   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5892   { (eval echo "$as_me:5892: \"$ac_try\"") >&5
5893   (eval $ac_try) 2>&5
5894   ac_status=$?
5895   echo "$as_me:5895: \$? = $ac_status" >&5
5896   (exit $ac_status); }; }; then
5897   with_big_core=yes
5898 else
5899   echo "$as_me: program exited with status $ac_status" >&5
5900 echo "$as_me: failed program was:" >&5
5901 cat conftest.$ac_ext >&5
5902 with_big_core=no
5903 fi
5904 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5905 fi
5906 fi;
5907 echo "$as_me:5907: result: $with_big_core" >&5
5908 echo "${ECHO_T}$with_big_core" >&6
5909 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5910 #define HAVE_BIG_CORE 1
5911 EOF
5912
5913 ### ISO C only guarantees 512-char strings, we have tables which load faster
5914 ### when constructed using "big" strings.  More than the C compiler, the awk
5915 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5916 echo "$as_me:5916: checking if big-strings option selected" >&5
5917 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5918
5919 # Check whether --enable-big-strings or --disable-big-strings was given.
5920 if test "${enable_big_strings+set}" = set; then
5921   enableval="$enable_big_strings"
5922   with_big_strings=$enableval
5923 else
5924
5925         case x$AWK in #(vi
5926         x)
5927                 eval with_big_strings=no
5928                 ;;
5929         *) #(vi
5930                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5931                         | $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
5932                         eval with_big_strings=yes
5933                 else
5934                         eval with_big_strings=no
5935                 fi
5936                 ;;
5937         esac
5938
5939 fi;
5940 echo "$as_me:5940: result: $with_big_strings" >&5
5941 echo "${ECHO_T}$with_big_strings" >&6
5942
5943 USE_BIG_STRINGS=0
5944 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5945
5946 ###     use option --enable-termcap to compile in the termcap fallback support
5947 echo "$as_me:5947: checking if you want termcap-fallback support" >&5
5948 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5949
5950 # Check whether --enable-termcap or --disable-termcap was given.
5951 if test "${enable_termcap+set}" = set; then
5952   enableval="$enable_termcap"
5953   with_termcap=$enableval
5954 else
5955   with_termcap=no
5956 fi;
5957 echo "$as_me:5957: result: $with_termcap" >&5
5958 echo "${ECHO_T}$with_termcap" >&6
5959
5960 if test "$with_termcap" != "yes" ; then
5961         if test "$use_database" = no ; then
5962                 if test -z "$with_fallback" ; then
5963                         { { echo "$as_me:5963: error: You have disabled the database w/o specifying fallbacks" >&5
5964 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5965    { (exit 1); exit 1; }; }
5966                 fi
5967         fi
5968         cat >>confdefs.h <<\EOF
5969 #define PURE_TERMINFO 1
5970 EOF
5971
5972 else
5973
5974 if test "$with_ticlib" != no ; then
5975         { { echo "$as_me:5975: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5976 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5977    { (exit 1); exit 1; }; }
5978 fi
5979
5980 cat >>confdefs.h <<\EOF
5981 #define USE_TERMCAP 1
5982 EOF
5983
5984 echo "$as_me:5984: checking for list of termcap files" >&5
5985 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5986
5987 # Check whether --with-termpath or --without-termpath was given.
5988 if test "${with_termpath+set}" = set; then
5989   withval="$with_termpath"
5990
5991 else
5992   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
5993 fi;
5994 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATHSEP}"
5995 cf_dst_path=
5996 for cf_src_path in $withval
5997 do
5998
5999 if test "x$prefix" != xNONE; then
6000   cf_path_syntax="$prefix"
6001 else
6002   cf_path_syntax="$ac_default_prefix"
6003 fi
6004
6005 case ".$cf_src_path" in #(vi
6006 .\$\(*\)*|.\'*\'*) #(vi
6007   ;;
6008 ..|./*|.\\*) #(vi
6009   ;;
6010 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6011   ;;
6012 .\${*prefix}*) #(vi
6013   eval cf_src_path="$cf_src_path"
6014   case ".$cf_src_path" in #(vi
6015   .NONE/*)
6016     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6017     ;;
6018   esac
6019   ;; #(vi
6020 .no|.NONE/*)
6021   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6022   ;;
6023 *)
6024   { { echo "$as_me:6024: error: expected a pathname, not \"$cf_src_path\"" >&5
6025 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6026    { (exit 1); exit 1; }; }
6027   ;;
6028 esac
6029
6030   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6031   cf_dst_path="${cf_dst_path}${cf_src_path}"
6032 done
6033 IFS="$ac_save_ifs"
6034
6035 eval 'TERMPATH="$cf_dst_path"'
6036
6037 echo "$as_me:6037: result: $TERMPATH" >&5
6038 echo "${ECHO_T}$TERMPATH" >&6
6039 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6040 #define TERMPATH "$TERMPATH"
6041 EOF
6042
6043 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6044 echo "$as_me:6044: checking if fast termcap-loader is needed" >&5
6045 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6046
6047 # Check whether --enable-getcap or --disable-getcap was given.
6048 if test "${enable_getcap+set}" = set; then
6049   enableval="$enable_getcap"
6050   with_getcap=$enableval
6051 else
6052   with_getcap=no
6053 fi;
6054 echo "$as_me:6054: result: $with_getcap" >&5
6055 echo "${ECHO_T}$with_getcap" >&6
6056 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6057 #define USE_GETCAP 1
6058 EOF
6059
6060 echo "$as_me:6060: checking if translated termcaps will be cached in ~/.terminfo" >&5
6061 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6062
6063 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6064 if test "${enable_getcap_cache+set}" = set; then
6065   enableval="$enable_getcap_cache"
6066   with_getcap_cache=$enableval
6067 else
6068   with_getcap_cache=no
6069 fi;
6070 echo "$as_me:6070: result: $with_getcap_cache" >&5
6071 echo "${ECHO_T}$with_getcap_cache" >&6
6072 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6073 #define USE_GETCAP_CACHE 1
6074 EOF
6075
6076 fi
6077
6078 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6079 echo "$as_me:6079: checking if ~/.terminfo is wanted" >&5
6080 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6081
6082 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6083 if test "${enable_home_terminfo+set}" = set; then
6084   enableval="$enable_home_terminfo"
6085   with_home_terminfo=$enableval
6086 else
6087   with_home_terminfo=yes
6088 fi;
6089 echo "$as_me:6089: result: $with_home_terminfo" >&5
6090 echo "${ECHO_T}$with_home_terminfo" >&6
6091 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6092 #define USE_HOME_TERMINFO 1
6093 EOF
6094
6095 echo "$as_me:6095: checking if you want to use restricted environment when running as root" >&5
6096 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6097
6098 # Check whether --enable-root-environ or --disable-root-environ was given.
6099 if test "${enable_root_environ+set}" = set; then
6100   enableval="$enable_root_environ"
6101   with_root_environ=$enableval
6102 else
6103   with_root_environ=yes
6104 fi;
6105 echo "$as_me:6105: result: $with_root_environ" >&5
6106 echo "${ECHO_T}$with_root_environ" >&6
6107 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6108 #define USE_ROOT_ENVIRON 1
6109 EOF
6110
6111 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6112 ###   to reduce storage requirements for the terminfo database.
6113
6114 for ac_func in \
6115         remove \
6116         unlink
6117 do
6118 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6119 echo "$as_me:6119: checking for $ac_func" >&5
6120 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6121 if eval "test \"\${$as_ac_var+set}\" = set"; then
6122   echo $ECHO_N "(cached) $ECHO_C" >&6
6123 else
6124   cat >conftest.$ac_ext <<_ACEOF
6125 #line 6125 "configure"
6126 #include "confdefs.h"
6127 /* System header to define __stub macros and hopefully few prototypes,
6128     which can conflict with char $ac_func (); below.  */
6129 #include <assert.h>
6130 /* Override any gcc2 internal prototype to avoid an error.  */
6131 #ifdef __cplusplus
6132 extern "C"
6133 #endif
6134 /* We use char because int might match the return type of a gcc2
6135    builtin and then its argument prototype would still apply.  */
6136 char $ac_func ();
6137 char (*f) ();
6138
6139 int
6140 main ()
6141 {
6142 /* The GNU C library defines this for functions which it implements
6143     to always fail with ENOSYS.  Some functions are actually named
6144     something starting with __ and the normal name is an alias.  */
6145 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6146 choke me
6147 #else
6148 f = $ac_func;
6149 #endif
6150
6151   ;
6152   return 0;
6153 }
6154 _ACEOF
6155 rm -f conftest.$ac_objext conftest$ac_exeext
6156 if { (eval echo "$as_me:6156: \"$ac_link\"") >&5
6157   (eval $ac_link) 2>&5
6158   ac_status=$?
6159   echo "$as_me:6159: \$? = $ac_status" >&5
6160   (exit $ac_status); } &&
6161          { ac_try='test -s conftest$ac_exeext'
6162   { (eval echo "$as_me:6162: \"$ac_try\"") >&5
6163   (eval $ac_try) 2>&5
6164   ac_status=$?
6165   echo "$as_me:6165: \$? = $ac_status" >&5
6166   (exit $ac_status); }; }; then
6167   eval "$as_ac_var=yes"
6168 else
6169   echo "$as_me: failed program was:" >&5
6170 cat conftest.$ac_ext >&5
6171 eval "$as_ac_var=no"
6172 fi
6173 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6174 fi
6175 echo "$as_me:6175: result: `eval echo '${'$as_ac_var'}'`" >&5
6176 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6177 if test `eval echo '${'$as_ac_var'}'` = yes; then
6178   cat >>confdefs.h <<EOF
6179 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6180 EOF
6181
6182 fi
6183 done
6184
6185 if test "$cross_compiling" = yes ; then
6186
6187 for ac_func in \
6188                 link \
6189                 symlink
6190 do
6191 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6192 echo "$as_me:6192: checking for $ac_func" >&5
6193 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6194 if eval "test \"\${$as_ac_var+set}\" = set"; then
6195   echo $ECHO_N "(cached) $ECHO_C" >&6
6196 else
6197   cat >conftest.$ac_ext <<_ACEOF
6198 #line 6198 "configure"
6199 #include "confdefs.h"
6200 /* System header to define __stub macros and hopefully few prototypes,
6201     which can conflict with char $ac_func (); below.  */
6202 #include <assert.h>
6203 /* Override any gcc2 internal prototype to avoid an error.  */
6204 #ifdef __cplusplus
6205 extern "C"
6206 #endif
6207 /* We use char because int might match the return type of a gcc2
6208    builtin and then its argument prototype would still apply.  */
6209 char $ac_func ();
6210 char (*f) ();
6211
6212 int
6213 main ()
6214 {
6215 /* The GNU C library defines this for functions which it implements
6216     to always fail with ENOSYS.  Some functions are actually named
6217     something starting with __ and the normal name is an alias.  */
6218 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6219 choke me
6220 #else
6221 f = $ac_func;
6222 #endif
6223
6224   ;
6225   return 0;
6226 }
6227 _ACEOF
6228 rm -f conftest.$ac_objext conftest$ac_exeext
6229 if { (eval echo "$as_me:6229: \"$ac_link\"") >&5
6230   (eval $ac_link) 2>&5
6231   ac_status=$?
6232   echo "$as_me:6232: \$? = $ac_status" >&5
6233   (exit $ac_status); } &&
6234          { ac_try='test -s conftest$ac_exeext'
6235   { (eval echo "$as_me:6235: \"$ac_try\"") >&5
6236   (eval $ac_try) 2>&5
6237   ac_status=$?
6238   echo "$as_me:6238: \$? = $ac_status" >&5
6239   (exit $ac_status); }; }; then
6240   eval "$as_ac_var=yes"
6241 else
6242   echo "$as_me: failed program was:" >&5
6243 cat conftest.$ac_ext >&5
6244 eval "$as_ac_var=no"
6245 fi
6246 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6247 fi
6248 echo "$as_me:6248: result: `eval echo '${'$as_ac_var'}'`" >&5
6249 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6250 if test `eval echo '${'$as_ac_var'}'` = yes; then
6251   cat >>confdefs.h <<EOF
6252 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6253 EOF
6254
6255 fi
6256 done
6257
6258 else
6259         echo "$as_me:6259: checking if link/symlink functions work" >&5
6260 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6261 if test "${cf_cv_link_funcs+set}" = set; then
6262   echo $ECHO_N "(cached) $ECHO_C" >&6
6263 else
6264
6265                 cf_cv_link_funcs=
6266                 for cf_func in link symlink ; do
6267                         if test "$cross_compiling" = yes; then
6268
6269                         eval 'ac_cv_func_'$cf_func'=error'
6270 else
6271   cat >conftest.$ac_ext <<_ACEOF
6272 #line 6272 "configure"
6273 #include "confdefs.h"
6274
6275 #include <sys/types.h>
6276 #include <sys/stat.h>
6277 #ifdef HAVE_UNISTD_H
6278 #include <unistd.h>
6279 #endif
6280 int main()
6281 {
6282         int fail = 0;
6283         char *src = "config.log";
6284         char *dst = "conftest.chk";
6285         struct stat src_sb;
6286         struct stat dst_sb;
6287
6288         stat(src, &src_sb);
6289         fail = ($cf_func("config.log", "conftest.chk") < 0)
6290             || (stat(dst, &dst_sb) < 0)
6291             || (dst_sb.st_mtime != src_sb.st_mtime);
6292 #ifdef HAVE_UNLINK
6293         unlink(dst);
6294 #else
6295         remove(dst);
6296 #endif
6297         ${cf_cv_main_return:-return} (fail);
6298 }
6299
6300 _ACEOF
6301 rm -f conftest$ac_exeext
6302 if { (eval echo "$as_me:6302: \"$ac_link\"") >&5
6303   (eval $ac_link) 2>&5
6304   ac_status=$?
6305   echo "$as_me:6305: \$? = $ac_status" >&5
6306   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6307   { (eval echo "$as_me:6307: \"$ac_try\"") >&5
6308   (eval $ac_try) 2>&5
6309   ac_status=$?
6310   echo "$as_me:6310: \$? = $ac_status" >&5
6311   (exit $ac_status); }; }; then
6312
6313                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6314                         eval 'ac_cv_func_'$cf_func'=yes'
6315 else
6316   echo "$as_me: program exited with status $ac_status" >&5
6317 echo "$as_me: failed program was:" >&5
6318 cat conftest.$ac_ext >&5
6319
6320                         eval 'ac_cv_func_'$cf_func'=no'
6321 fi
6322 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6323 fi
6324                 done
6325                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6326
6327 fi
6328 echo "$as_me:6328: result: $cf_cv_link_funcs" >&5
6329 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6330         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6331 #define HAVE_LINK 1
6332 EOF
6333
6334         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6335 #define HAVE_SYMLINK 1
6336 EOF
6337
6338 fi
6339
6340 with_links=no
6341 with_symlinks=no
6342
6343 # soft links (symbolic links) are useful for some systems where hard links do
6344 # not work, or to make it simpler to copy terminfo trees around.
6345 if test "$ac_cv_func_symlink" = yes ; then
6346     echo "$as_me:6346: checking if tic should use symbolic links" >&5
6347 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6348
6349 # Check whether --enable-symlinks or --disable-symlinks was given.
6350 if test "${enable_symlinks+set}" = set; then
6351   enableval="$enable_symlinks"
6352   with_symlinks=$enableval
6353 else
6354   with_symlinks=no
6355 fi;
6356     echo "$as_me:6356: result: $with_symlinks" >&5
6357 echo "${ECHO_T}$with_symlinks" >&6
6358 fi
6359
6360 # If we have hard links and did not choose to use soft links instead, there is
6361 # no reason to make this choice optional - use the hard links.
6362 if test "$with_symlinks" = no ; then
6363     echo "$as_me:6363: checking if tic should use hard links" >&5
6364 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6365     if test "$ac_cv_func_link" = yes ; then
6366         with_links=yes
6367     else
6368         with_links=no
6369     fi
6370     echo "$as_me:6370: result: $with_links" >&5
6371 echo "${ECHO_T}$with_links" >&6
6372 fi
6373
6374 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6375 #define USE_LINKS 1
6376 EOF
6377
6378 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6379 #define USE_SYMLINKS 1
6380 EOF
6381
6382 ###   use option --enable-broken-linker to force on use of broken-linker support
6383 echo "$as_me:6383: checking if you want broken-linker support code" >&5
6384 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6385
6386 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6387 if test "${enable_broken_linker+set}" = set; then
6388   enableval="$enable_broken_linker"
6389   with_broken_linker=$enableval
6390 else
6391   with_broken_linker=${BROKEN_LINKER-no}
6392 fi;
6393 echo "$as_me:6393: result: $with_broken_linker" >&5
6394 echo "${ECHO_T}$with_broken_linker" >&6
6395
6396 BROKEN_LINKER=0
6397 if test "$with_broken_linker" = yes ; then
6398         cat >>confdefs.h <<\EOF
6399 #define BROKEN_LINKER 1
6400 EOF
6401
6402         BROKEN_LINKER=1
6403 elif test "$DFT_LWR_MODEL" = shared ; then
6404         case $cf_cv_system_name in #(vi
6405         cygwin*)
6406                 cat >>confdefs.h <<\EOF
6407 #define BROKEN_LINKER 1
6408 EOF
6409
6410                 BROKEN_LINKER=1
6411                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6412
6413 echo "${as_me-configure}:6413: testing cygwin linker is broken anyway ..." 1>&5
6414
6415                 ;;
6416         esac
6417 fi
6418
6419 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6420 echo "$as_me:6420: checking if tputs should process BSD-style prefix padding" >&5
6421 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6422
6423 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6424 if test "${enable_bsdpad+set}" = set; then
6425   enableval="$enable_bsdpad"
6426   with_bsdpad=$enableval
6427 else
6428   with_bsdpad=no
6429 fi;
6430 echo "$as_me:6430: result: $with_bsdpad" >&5
6431 echo "${ECHO_T}$with_bsdpad" >&6
6432 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6433 #define BSD_TPUTS 1
6434 EOF
6435
6436 ###   use option --enable-widec to turn on use of wide-character support
6437 NCURSES_CH_T=chtype
6438 NCURSES_LIBUTF8=0
6439
6440 NEED_WCHAR_H=0
6441 NCURSES_MBSTATE_T=0
6442 NCURSES_WCHAR_T=0
6443 NCURSES_WINT_T=0
6444
6445 # Check to define _XOPEN_SOURCE "automatically"
6446
6447 echo "$as_me:6447: checking if $CC -U and -D options work together" >&5
6448 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6449 if test "${cf_cv_cc_u_d_options+set}" = set; then
6450   echo $ECHO_N "(cached) $ECHO_C" >&6
6451 else
6452
6453         cf_save_CPPFLAGS="$CPPFLAGS"
6454         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6455         cat >conftest.$ac_ext <<_ACEOF
6456 #line 6456 "configure"
6457 #include "confdefs.h"
6458
6459 int
6460 main ()
6461 {
6462
6463 #ifndef U_D_OPTIONS
6464 make an undefined-error
6465 #endif
6466 #ifdef  D_U_OPTIONS
6467 make a defined-error
6468 #endif
6469
6470   ;
6471   return 0;
6472 }
6473 _ACEOF
6474 rm -f conftest.$ac_objext
6475 if { (eval echo "$as_me:6475: \"$ac_compile\"") >&5
6476   (eval $ac_compile) 2>&5
6477   ac_status=$?
6478   echo "$as_me:6478: \$? = $ac_status" >&5
6479   (exit $ac_status); } &&
6480          { ac_try='test -s conftest.$ac_objext'
6481   { (eval echo "$as_me:6481: \"$ac_try\"") >&5
6482   (eval $ac_try) 2>&5
6483   ac_status=$?
6484   echo "$as_me:6484: \$? = $ac_status" >&5
6485   (exit $ac_status); }; }; then
6486
6487         cf_cv_cc_u_d_options=yes
6488 else
6489   echo "$as_me: failed program was:" >&5
6490 cat conftest.$ac_ext >&5
6491
6492         cf_cv_cc_u_d_options=no
6493 fi
6494 rm -f conftest.$ac_objext conftest.$ac_ext
6495         CPPFLAGS="$cf_save_CPPFLAGS"
6496
6497 fi
6498 echo "$as_me:6498: result: $cf_cv_cc_u_d_options" >&5
6499 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6500
6501 cf_XOPEN_SOURCE=500
6502 cf_POSIX_C_SOURCE=199506L
6503
6504 case $host_os in #(vi
6505 aix[456]*) #(vi
6506         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6507         ;;
6508 freebsd*|dragonfly*) #(vi
6509         # 5.x headers associate
6510         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6511         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6512         cf_POSIX_C_SOURCE=200112L
6513         cf_XOPEN_SOURCE=600
6514         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6515         ;;
6516 hpux*) #(vi
6517         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6518         ;;
6519 irix[56].*) #(vi
6520         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6521         ;;
6522 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6523
6524 echo "$as_me:6524: checking if we must define _GNU_SOURCE" >&5
6525 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6526 if test "${cf_cv_gnu_source+set}" = set; then
6527   echo $ECHO_N "(cached) $ECHO_C" >&6
6528 else
6529
6530 cat >conftest.$ac_ext <<_ACEOF
6531 #line 6531 "configure"
6532 #include "confdefs.h"
6533 #include <sys/types.h>
6534 int
6535 main ()
6536 {
6537
6538 #ifndef _XOPEN_SOURCE
6539 make an error
6540 #endif
6541   ;
6542   return 0;
6543 }
6544 _ACEOF
6545 rm -f conftest.$ac_objext
6546 if { (eval echo "$as_me:6546: \"$ac_compile\"") >&5
6547   (eval $ac_compile) 2>&5
6548   ac_status=$?
6549   echo "$as_me:6549: \$? = $ac_status" >&5
6550   (exit $ac_status); } &&
6551          { ac_try='test -s conftest.$ac_objext'
6552   { (eval echo "$as_me:6552: \"$ac_try\"") >&5
6553   (eval $ac_try) 2>&5
6554   ac_status=$?
6555   echo "$as_me:6555: \$? = $ac_status" >&5
6556   (exit $ac_status); }; }; then
6557   cf_cv_gnu_source=no
6558 else
6559   echo "$as_me: failed program was:" >&5
6560 cat conftest.$ac_ext >&5
6561 cf_save="$CPPFLAGS"
6562          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6563          cat >conftest.$ac_ext <<_ACEOF
6564 #line 6564 "configure"
6565 #include "confdefs.h"
6566 #include <sys/types.h>
6567 int
6568 main ()
6569 {
6570
6571 #ifdef _XOPEN_SOURCE
6572 make an error
6573 #endif
6574   ;
6575   return 0;
6576 }
6577 _ACEOF
6578 rm -f conftest.$ac_objext
6579 if { (eval echo "$as_me:6579: \"$ac_compile\"") >&5
6580   (eval $ac_compile) 2>&5
6581   ac_status=$?
6582   echo "$as_me:6582: \$? = $ac_status" >&5
6583   (exit $ac_status); } &&
6584          { ac_try='test -s conftest.$ac_objext'
6585   { (eval echo "$as_me:6585: \"$ac_try\"") >&5
6586   (eval $ac_try) 2>&5
6587   ac_status=$?
6588   echo "$as_me:6588: \$? = $ac_status" >&5
6589   (exit $ac_status); }; }; then
6590   cf_cv_gnu_source=no
6591 else
6592   echo "$as_me: failed program was:" >&5
6593 cat conftest.$ac_ext >&5
6594 cf_cv_gnu_source=yes
6595 fi
6596 rm -f conftest.$ac_objext conftest.$ac_ext
6597         CPPFLAGS="$cf_save"
6598
6599 fi
6600 rm -f conftest.$ac_objext conftest.$ac_ext
6601
6602 fi
6603 echo "$as_me:6603: result: $cf_cv_gnu_source" >&5
6604 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6605 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6606
6607         ;;
6608 mirbsd*) #(vi
6609         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6610         ;;
6611 netbsd*) #(vi
6612         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6613         ;;
6614 openbsd*) #(vi
6615         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6616         ;;
6617 osf[45]*) #(vi
6618         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6619         ;;
6620 nto-qnx*) #(vi
6621         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6622         ;;
6623 sco*) #(vi
6624         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6625         ;;
6626 solaris*) #(vi
6627         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6628         ;;
6629 *)
6630         echo "$as_me:6630: checking if we should define _XOPEN_SOURCE" >&5
6631 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6632 if test "${cf_cv_xopen_source+set}" = set; then
6633   echo $ECHO_N "(cached) $ECHO_C" >&6
6634 else
6635
6636         cat >conftest.$ac_ext <<_ACEOF
6637 #line 6637 "configure"
6638 #include "confdefs.h"
6639 #include <sys/types.h>
6640 int
6641 main ()
6642 {
6643
6644 #ifndef _XOPEN_SOURCE
6645 make an error
6646 #endif
6647   ;
6648   return 0;
6649 }
6650 _ACEOF
6651 rm -f conftest.$ac_objext
6652 if { (eval echo "$as_me:6652: \"$ac_compile\"") >&5
6653   (eval $ac_compile) 2>&5
6654   ac_status=$?
6655   echo "$as_me:6655: \$? = $ac_status" >&5
6656   (exit $ac_status); } &&
6657          { ac_try='test -s conftest.$ac_objext'
6658   { (eval echo "$as_me:6658: \"$ac_try\"") >&5
6659   (eval $ac_try) 2>&5
6660   ac_status=$?
6661   echo "$as_me:6661: \$? = $ac_status" >&5
6662   (exit $ac_status); }; }; then
6663   cf_cv_xopen_source=no
6664 else
6665   echo "$as_me: failed program was:" >&5
6666 cat conftest.$ac_ext >&5
6667 cf_save="$CPPFLAGS"
6668          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6669          cat >conftest.$ac_ext <<_ACEOF
6670 #line 6670 "configure"
6671 #include "confdefs.h"
6672 #include <sys/types.h>
6673 int
6674 main ()
6675 {
6676
6677 #ifdef _XOPEN_SOURCE
6678 make an error
6679 #endif
6680   ;
6681   return 0;
6682 }
6683 _ACEOF
6684 rm -f conftest.$ac_objext
6685 if { (eval echo "$as_me:6685: \"$ac_compile\"") >&5
6686   (eval $ac_compile) 2>&5
6687   ac_status=$?
6688   echo "$as_me:6688: \$? = $ac_status" >&5
6689   (exit $ac_status); } &&
6690          { ac_try='test -s conftest.$ac_objext'
6691   { (eval echo "$as_me:6691: \"$ac_try\"") >&5
6692   (eval $ac_try) 2>&5
6693   ac_status=$?
6694   echo "$as_me:6694: \$? = $ac_status" >&5
6695   (exit $ac_status); }; }; then
6696   cf_cv_xopen_source=no
6697 else
6698   echo "$as_me: failed program was:" >&5
6699 cat conftest.$ac_ext >&5
6700 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6701 fi
6702 rm -f conftest.$ac_objext conftest.$ac_ext
6703         CPPFLAGS="$cf_save"
6704
6705 fi
6706 rm -f conftest.$ac_objext conftest.$ac_ext
6707
6708 fi
6709 echo "$as_me:6709: result: $cf_cv_xopen_source" >&5
6710 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6711         if test "$cf_cv_xopen_source" != no ; then
6712
6713 # remove _XOPEN_SOURCE symbol from $CFLAGS
6714 CFLAGS=`echo "$CFLAGS" | \
6715         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6716                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6717
6718 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6719 CPPFLAGS=`echo "$CPPFLAGS" | \
6720         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6721                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6722
6723                 test "$cf_cv_cc_u_d_options" = yes && \
6724                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6725                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6726         fi
6727
6728 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6729
6730 cf_save_CFLAGS="$CFLAGS"
6731 cf_save_CPPFLAGS="$CPPFLAGS"
6732
6733 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6734 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6735         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6736                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6737
6738 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6739 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6740         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6741                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6742
6743 echo "$as_me:6743: checking if we should define _POSIX_C_SOURCE" >&5
6744 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6745 if test "${cf_cv_posix_c_source+set}" = set; then
6746   echo $ECHO_N "(cached) $ECHO_C" >&6
6747 else
6748
6749 echo "${as_me-configure}:6749: testing if the symbol is already defined go no further ..." 1>&5
6750
6751         cat >conftest.$ac_ext <<_ACEOF
6752 #line 6752 "configure"
6753 #include "confdefs.h"
6754 #include <sys/types.h>
6755 int
6756 main ()
6757 {
6758
6759 #ifndef _POSIX_C_SOURCE
6760 make an error
6761 #endif
6762   ;
6763   return 0;
6764 }
6765 _ACEOF
6766 rm -f conftest.$ac_objext
6767 if { (eval echo "$as_me:6767: \"$ac_compile\"") >&5
6768   (eval $ac_compile) 2>&5
6769   ac_status=$?
6770   echo "$as_me:6770: \$? = $ac_status" >&5
6771   (exit $ac_status); } &&
6772          { ac_try='test -s conftest.$ac_objext'
6773   { (eval echo "$as_me:6773: \"$ac_try\"") >&5
6774   (eval $ac_try) 2>&5
6775   ac_status=$?
6776   echo "$as_me:6776: \$? = $ac_status" >&5
6777   (exit $ac_status); }; }; then
6778   cf_cv_posix_c_source=no
6779 else
6780   echo "$as_me: failed program was:" >&5
6781 cat conftest.$ac_ext >&5
6782 cf_want_posix_source=no
6783          case .$cf_POSIX_C_SOURCE in #(vi
6784          .[12]??*) #(vi
6785                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6786                 ;;
6787          .2) #(vi
6788                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6789                 cf_want_posix_source=yes
6790                 ;;
6791          .*)
6792                 cf_want_posix_source=yes
6793                 ;;
6794          esac
6795          if test "$cf_want_posix_source" = yes ; then
6796                 cat >conftest.$ac_ext <<_ACEOF
6797 #line 6797 "configure"
6798 #include "confdefs.h"
6799 #include <sys/types.h>
6800 int
6801 main ()
6802 {
6803
6804 #ifdef _POSIX_SOURCE
6805 make an error
6806 #endif
6807   ;
6808   return 0;
6809 }
6810 _ACEOF
6811 rm -f conftest.$ac_objext
6812 if { (eval echo "$as_me:6812: \"$ac_compile\"") >&5
6813   (eval $ac_compile) 2>&5
6814   ac_status=$?
6815   echo "$as_me:6815: \$? = $ac_status" >&5
6816   (exit $ac_status); } &&
6817          { ac_try='test -s conftest.$ac_objext'
6818   { (eval echo "$as_me:6818: \"$ac_try\"") >&5
6819   (eval $ac_try) 2>&5
6820   ac_status=$?
6821   echo "$as_me:6821: \$? = $ac_status" >&5
6822   (exit $ac_status); }; }; then
6823   :
6824 else
6825   echo "$as_me: failed program was:" >&5
6826 cat conftest.$ac_ext >&5
6827 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6828 fi
6829 rm -f conftest.$ac_objext conftest.$ac_ext
6830          fi
6831
6832 echo "${as_me-configure}:6832: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6833
6834          CFLAGS="$cf_trim_CFLAGS"
6835          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6836
6837 echo "${as_me-configure}:6837: testing if the second compile does not leave our definition intact error ..." 1>&5
6838
6839          cat >conftest.$ac_ext <<_ACEOF
6840 #line 6840 "configure"
6841 #include "confdefs.h"
6842 #include <sys/types.h>
6843 int
6844 main ()
6845 {
6846
6847 #ifndef _POSIX_C_SOURCE
6848 make an error
6849 #endif
6850   ;
6851   return 0;
6852 }
6853 _ACEOF
6854 rm -f conftest.$ac_objext
6855 if { (eval echo "$as_me:6855: \"$ac_compile\"") >&5
6856   (eval $ac_compile) 2>&5
6857   ac_status=$?
6858   echo "$as_me:6858: \$? = $ac_status" >&5
6859   (exit $ac_status); } &&
6860          { ac_try='test -s conftest.$ac_objext'
6861   { (eval echo "$as_me:6861: \"$ac_try\"") >&5
6862   (eval $ac_try) 2>&5
6863   ac_status=$?
6864   echo "$as_me:6864: \$? = $ac_status" >&5
6865   (exit $ac_status); }; }; then
6866   :
6867 else
6868   echo "$as_me: failed program was:" >&5
6869 cat conftest.$ac_ext >&5
6870 cf_cv_posix_c_source=no
6871 fi
6872 rm -f conftest.$ac_objext conftest.$ac_ext
6873          CFLAGS="$cf_save_CFLAGS"
6874          CPPFLAGS="$cf_save_CPPFLAGS"
6875
6876 fi
6877 rm -f conftest.$ac_objext conftest.$ac_ext
6878
6879 fi
6880 echo "$as_me:6880: result: $cf_cv_posix_c_source" >&5
6881 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6882
6883 if test "$cf_cv_posix_c_source" != no ; then
6884         CFLAGS="$cf_trim_CFLAGS"
6885         CPPFLAGS="$cf_trim_CPPFLAGS"
6886         if test "$cf_cv_cc_u_d_options" = yes ; then
6887                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6888                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6889                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6890         fi
6891         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6892 fi
6893
6894         ;;
6895 esac
6896
6897 # Work around breakage on OS X
6898
6899 echo "$as_me:6899: checking if SIGWINCH is defined" >&5
6900 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6901 if test "${cf_cv_define_sigwinch+set}" = set; then
6902   echo $ECHO_N "(cached) $ECHO_C" >&6
6903 else
6904
6905         cat >conftest.$ac_ext <<_ACEOF
6906 #line 6906 "configure"
6907 #include "confdefs.h"
6908
6909 #include <sys/types.h>
6910 #include <sys/signal.h>
6911
6912 int
6913 main ()
6914 {
6915 int x = SIGWINCH
6916   ;
6917   return 0;
6918 }
6919 _ACEOF
6920 rm -f conftest.$ac_objext
6921 if { (eval echo "$as_me:6921: \"$ac_compile\"") >&5
6922   (eval $ac_compile) 2>&5
6923   ac_status=$?
6924   echo "$as_me:6924: \$? = $ac_status" >&5
6925   (exit $ac_status); } &&
6926          { ac_try='test -s conftest.$ac_objext'
6927   { (eval echo "$as_me:6927: \"$ac_try\"") >&5
6928   (eval $ac_try) 2>&5
6929   ac_status=$?
6930   echo "$as_me:6930: \$? = $ac_status" >&5
6931   (exit $ac_status); }; }; then
6932   cf_cv_define_sigwinch=yes
6933 else
6934   echo "$as_me: failed program was:" >&5
6935 cat conftest.$ac_ext >&5
6936 cat >conftest.$ac_ext <<_ACEOF
6937 #line 6937 "configure"
6938 #include "confdefs.h"
6939
6940 #undef _XOPEN_SOURCE
6941 #undef _POSIX_SOURCE
6942 #undef _POSIX_C_SOURCE
6943 #include <sys/types.h>
6944 #include <sys/signal.h>
6945
6946 int
6947 main ()
6948 {
6949 int x = SIGWINCH
6950   ;
6951   return 0;
6952 }
6953 _ACEOF
6954 rm -f conftest.$ac_objext
6955 if { (eval echo "$as_me:6955: \"$ac_compile\"") >&5
6956   (eval $ac_compile) 2>&5
6957   ac_status=$?
6958   echo "$as_me:6958: \$? = $ac_status" >&5
6959   (exit $ac_status); } &&
6960          { ac_try='test -s conftest.$ac_objext'
6961   { (eval echo "$as_me:6961: \"$ac_try\"") >&5
6962   (eval $ac_try) 2>&5
6963   ac_status=$?
6964   echo "$as_me:6964: \$? = $ac_status" >&5
6965   (exit $ac_status); }; }; then
6966   cf_cv_define_sigwinch=maybe
6967 else
6968   echo "$as_me: failed program was:" >&5
6969 cat conftest.$ac_ext >&5
6970 cf_cv_define_sigwinch=no
6971 fi
6972 rm -f conftest.$ac_objext conftest.$ac_ext
6973
6974 fi
6975 rm -f conftest.$ac_objext conftest.$ac_ext
6976
6977 fi
6978 echo "$as_me:6978: result: $cf_cv_define_sigwinch" >&5
6979 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6980
6981 if test "$cf_cv_define_sigwinch" = maybe ; then
6982 echo "$as_me:6982: checking for actual SIGWINCH definition" >&5
6983 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6984 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6985   echo $ECHO_N "(cached) $ECHO_C" >&6
6986 else
6987
6988 cf_cv_fixup_sigwinch=unknown
6989 cf_sigwinch=32
6990 while test $cf_sigwinch != 1
6991 do
6992         cat >conftest.$ac_ext <<_ACEOF
6993 #line 6993 "configure"
6994 #include "confdefs.h"
6995
6996 #undef _XOPEN_SOURCE
6997 #undef _POSIX_SOURCE
6998 #undef _POSIX_C_SOURCE
6999 #include <sys/types.h>
7000 #include <sys/signal.h>
7001
7002 int
7003 main ()
7004 {
7005
7006 #if SIGWINCH != $cf_sigwinch
7007 make an error
7008 #endif
7009 int x = SIGWINCH
7010   ;
7011   return 0;
7012 }
7013 _ACEOF
7014 rm -f conftest.$ac_objext
7015 if { (eval echo "$as_me:7015: \"$ac_compile\"") >&5
7016   (eval $ac_compile) 2>&5
7017   ac_status=$?
7018   echo "$as_me:7018: \$? = $ac_status" >&5
7019   (exit $ac_status); } &&
7020          { ac_try='test -s conftest.$ac_objext'
7021   { (eval echo "$as_me:7021: \"$ac_try\"") >&5
7022   (eval $ac_try) 2>&5
7023   ac_status=$?
7024   echo "$as_me:7024: \$? = $ac_status" >&5
7025   (exit $ac_status); }; }; then
7026   cf_cv_fixup_sigwinch=$cf_sigwinch
7027          break
7028 else
7029   echo "$as_me: failed program was:" >&5
7030 cat conftest.$ac_ext >&5
7031 fi
7032 rm -f conftest.$ac_objext conftest.$ac_ext
7033
7034 cf_sigwinch=`expr $cf_sigwinch - 1`
7035 done
7036
7037 fi
7038 echo "$as_me:7038: result: $cf_cv_fixup_sigwinch" >&5
7039 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7040
7041         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7042                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7043         fi
7044 fi
7045
7046 # Checks for CODESET support.
7047
7048   echo "$as_me:7048: checking for nl_langinfo and CODESET" >&5
7049 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7050 if test "${am_cv_langinfo_codeset+set}" = set; then
7051   echo $ECHO_N "(cached) $ECHO_C" >&6
7052 else
7053   cat >conftest.$ac_ext <<_ACEOF
7054 #line 7054 "configure"
7055 #include "confdefs.h"
7056 #include <langinfo.h>
7057 int
7058 main ()
7059 {
7060 char* cs = nl_langinfo(CODESET);
7061   ;
7062   return 0;
7063 }
7064 _ACEOF
7065 rm -f conftest.$ac_objext conftest$ac_exeext
7066 if { (eval echo "$as_me:7066: \"$ac_link\"") >&5
7067   (eval $ac_link) 2>&5
7068   ac_status=$?
7069   echo "$as_me:7069: \$? = $ac_status" >&5
7070   (exit $ac_status); } &&
7071          { ac_try='test -s conftest$ac_exeext'
7072   { (eval echo "$as_me:7072: \"$ac_try\"") >&5
7073   (eval $ac_try) 2>&5
7074   ac_status=$?
7075   echo "$as_me:7075: \$? = $ac_status" >&5
7076   (exit $ac_status); }; }; then
7077   am_cv_langinfo_codeset=yes
7078 else
7079   echo "$as_me: failed program was:" >&5
7080 cat conftest.$ac_ext >&5
7081 am_cv_langinfo_codeset=no
7082 fi
7083 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7084
7085 fi
7086 echo "$as_me:7086: result: $am_cv_langinfo_codeset" >&5
7087 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7088   if test $am_cv_langinfo_codeset = yes; then
7089
7090 cat >>confdefs.h <<\EOF
7091 #define HAVE_LANGINFO_CODESET 1
7092 EOF
7093
7094   fi
7095
7096 # use these variables to work around a defect in gcc's fixincludes.
7097 NCURSES_OK_WCHAR_T=
7098 NCURSES_OK_WINT_T=
7099
7100 echo "$as_me:7100: checking if you want wide-character code" >&5
7101 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7102
7103 # Check whether --enable-widec or --disable-widec was given.
7104 if test "${enable_widec+set}" = set; then
7105   enableval="$enable_widec"
7106   with_widec=$enableval
7107 else
7108   with_widec=no
7109 fi;
7110 echo "$as_me:7110: result: $with_widec" >&5
7111 echo "${ECHO_T}$with_widec" >&6
7112 if test "$with_widec" = yes ; then
7113         LIB_SUFFIX="w${LIB_SUFFIX}"
7114         cat >>confdefs.h <<\EOF
7115 #define USE_WIDEC_SUPPORT 1
7116 EOF
7117
7118 echo "$as_me:7118: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7119 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7120 cat >conftest.$ac_ext <<_ACEOF
7121 #line 7121 "configure"
7122 #include "confdefs.h"
7123 #include <sys/types.h>
7124
7125 int
7126 main ()
7127 {
7128
7129 #ifndef _XOPEN_SOURCE_EXTENDED
7130 make an error
7131 #endif
7132   ;
7133   return 0;
7134 }
7135 _ACEOF
7136 rm -f conftest.$ac_objext
7137 if { (eval echo "$as_me:7137: \"$ac_compile\"") >&5
7138   (eval $ac_compile) 2>&5
7139   ac_status=$?
7140   echo "$as_me:7140: \$? = $ac_status" >&5
7141   (exit $ac_status); } &&
7142          { ac_try='test -s conftest.$ac_objext'
7143   { (eval echo "$as_me:7143: \"$ac_try\"") >&5
7144   (eval $ac_try) 2>&5
7145   ac_status=$?
7146   echo "$as_me:7146: \$? = $ac_status" >&5
7147   (exit $ac_status); }; }; then
7148   cf_result=no
7149 else
7150   echo "$as_me: failed program was:" >&5
7151 cat conftest.$ac_ext >&5
7152 cf_result=yes
7153 fi
7154 rm -f conftest.$ac_objext conftest.$ac_ext
7155 echo "$as_me:7155: result: $cf_result" >&5
7156 echo "${ECHO_T}$cf_result" >&6
7157
7158 if test "$cf_result" = yes ; then
7159         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7160 elif test "x" != "x" ; then
7161         echo "$as_me:7161: checking checking for compatible value versus " >&5
7162 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7163         cat >conftest.$ac_ext <<_ACEOF
7164 #line 7164 "configure"
7165 #include "confdefs.h"
7166 #include <sys/types.h>
7167
7168 int
7169 main ()
7170 {
7171
7172 #if _XOPEN_SOURCE_EXTENDED- < 0
7173 make an error
7174 #endif
7175   ;
7176   return 0;
7177 }
7178 _ACEOF
7179 rm -f conftest.$ac_objext
7180 if { (eval echo "$as_me:7180: \"$ac_compile\"") >&5
7181   (eval $ac_compile) 2>&5
7182   ac_status=$?
7183   echo "$as_me:7183: \$? = $ac_status" >&5
7184   (exit $ac_status); } &&
7185          { ac_try='test -s conftest.$ac_objext'
7186   { (eval echo "$as_me:7186: \"$ac_try\"") >&5
7187   (eval $ac_try) 2>&5
7188   ac_status=$?
7189   echo "$as_me:7189: \$? = $ac_status" >&5
7190   (exit $ac_status); }; }; then
7191   cf_result=yes
7192 else
7193   echo "$as_me: failed program was:" >&5
7194 cat conftest.$ac_ext >&5
7195 cf_result=no
7196 fi
7197 rm -f conftest.$ac_objext conftest.$ac_ext
7198         echo "$as_me:7198: result: $cf_result" >&5
7199 echo "${ECHO_T}$cf_result" >&6
7200         if test "$cf_result" = no ; then
7201                 # perhaps we can override it - try...
7202                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7203         fi
7204 fi
7205
7206         # with_overwrite=no
7207         NCURSES_CH_T=cchar_t
7208
7209 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7210 do
7211 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7212 echo "$as_me:7212: checking for $ac_func" >&5
7213 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7214 if eval "test \"\${$as_ac_var+set}\" = set"; then
7215   echo $ECHO_N "(cached) $ECHO_C" >&6
7216 else
7217   cat >conftest.$ac_ext <<_ACEOF
7218 #line 7218 "configure"
7219 #include "confdefs.h"
7220 /* System header to define __stub macros and hopefully few prototypes,
7221     which can conflict with char $ac_func (); below.  */
7222 #include <assert.h>
7223 /* Override any gcc2 internal prototype to avoid an error.  */
7224 #ifdef __cplusplus
7225 extern "C"
7226 #endif
7227 /* We use char because int might match the return type of a gcc2
7228    builtin and then its argument prototype would still apply.  */
7229 char $ac_func ();
7230 char (*f) ();
7231
7232 int
7233 main ()
7234 {
7235 /* The GNU C library defines this for functions which it implements
7236     to always fail with ENOSYS.  Some functions are actually named
7237     something starting with __ and the normal name is an alias.  */
7238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7239 choke me
7240 #else
7241 f = $ac_func;
7242 #endif
7243
7244   ;
7245   return 0;
7246 }
7247 _ACEOF
7248 rm -f conftest.$ac_objext conftest$ac_exeext
7249 if { (eval echo "$as_me:7249: \"$ac_link\"") >&5
7250   (eval $ac_link) 2>&5
7251   ac_status=$?
7252   echo "$as_me:7252: \$? = $ac_status" >&5
7253   (exit $ac_status); } &&
7254          { ac_try='test -s conftest$ac_exeext'
7255   { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7256   (eval $ac_try) 2>&5
7257   ac_status=$?
7258   echo "$as_me:7258: \$? = $ac_status" >&5
7259   (exit $ac_status); }; }; then
7260   eval "$as_ac_var=yes"
7261 else
7262   echo "$as_me: failed program was:" >&5
7263 cat conftest.$ac_ext >&5
7264 eval "$as_ac_var=no"
7265 fi
7266 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7267 fi
7268 echo "$as_me:7268: result: `eval echo '${'$as_ac_var'}'`" >&5
7269 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7270 if test `eval echo '${'$as_ac_var'}'` = yes; then
7271   cat >>confdefs.h <<EOF
7272 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7273 EOF
7274
7275 fi
7276 done
7277
7278         if test "$ac_cv_func_putwc" != yes ; then
7279
7280 echo "$as_me:7280: checking for multibyte character support" >&5
7281 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7282 if test "${cf_cv_utf8_lib+set}" = set; then
7283   echo $ECHO_N "(cached) $ECHO_C" >&6
7284 else
7285
7286         cf_save_LIBS="$LIBS"
7287         cat >conftest.$ac_ext <<_ACEOF
7288 #line 7288 "configure"
7289 #include "confdefs.h"
7290
7291 #include <stdlib.h>
7292 int
7293 main ()
7294 {
7295 putwc(0,0);
7296   ;
7297   return 0;
7298 }
7299 _ACEOF
7300 rm -f conftest.$ac_objext conftest$ac_exeext
7301 if { (eval echo "$as_me:7301: \"$ac_link\"") >&5
7302   (eval $ac_link) 2>&5
7303   ac_status=$?
7304   echo "$as_me:7304: \$? = $ac_status" >&5
7305   (exit $ac_status); } &&
7306          { ac_try='test -s conftest$ac_exeext'
7307   { (eval echo "$as_me:7307: \"$ac_try\"") >&5
7308   (eval $ac_try) 2>&5
7309   ac_status=$?
7310   echo "$as_me:7310: \$? = $ac_status" >&5
7311   (exit $ac_status); }; }; then
7312   cf_cv_utf8_lib=yes
7313 else
7314   echo "$as_me: failed program was:" >&5
7315 cat conftest.$ac_ext >&5
7316
7317 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7318 # will be set on completion of the AC_TRY_LINK below.
7319 cf_cv_header_path_utf8=
7320 cf_cv_library_path_utf8=
7321
7322 echo "${as_me-configure}:7322: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7323
7324 cat >conftest.$ac_ext <<_ACEOF
7325 #line 7325 "configure"
7326 #include "confdefs.h"
7327
7328 #include <libutf8.h>
7329 int
7330 main ()
7331 {
7332 putwc(0,0);
7333   ;
7334   return 0;
7335 }
7336 _ACEOF
7337 rm -f conftest.$ac_objext conftest$ac_exeext
7338 if { (eval echo "$as_me:7338: \"$ac_link\"") >&5
7339   (eval $ac_link) 2>&5
7340   ac_status=$?
7341   echo "$as_me:7341: \$? = $ac_status" >&5
7342   (exit $ac_status); } &&
7343          { ac_try='test -s conftest$ac_exeext'
7344   { (eval echo "$as_me:7344: \"$ac_try\"") >&5
7345   (eval $ac_try) 2>&5
7346   ac_status=$?
7347   echo "$as_me:7347: \$? = $ac_status" >&5
7348   (exit $ac_status); }; }; then
7349   cf_cv_find_linkage_utf8=yes
7350 else
7351   echo "$as_me: failed program was:" >&5
7352 cat conftest.$ac_ext >&5
7353
7354     cf_cv_find_linkage_utf8=no
7355
7356     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7357
7358 echo "${as_me-configure}:7358: testing find linkage for utf8 library ..." 1>&5
7359
7360 echo "${as_me-configure}:7360: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7361
7362     cf_save_CPPFLAGS="$CPPFLAGS"
7363     cf_test_CPPFLAGS="$CPPFLAGS"
7364
7365 cf_header_path_list=""
7366 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7367         for cf_header_path in $CPPFLAGS $CFLAGS
7368         do
7369                 case $cf_header_path in #(vi
7370                 -I*)
7371                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7372
7373 test "$cf_header_path" != "NONE" && \
7374 test -d "$cf_header_path" && \
7375  {
7376         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7377         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7378         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7379         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7380         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7381         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7382 }
7383
7384                         cf_header_path_list="$cf_header_path_list $cf_search"
7385                         ;;
7386                 esac
7387         done
7388 fi
7389
7390 cf_search=""
7391
7392 test "/usr" != "$prefix" && \
7393 test -d "/usr" && \
7394 (test $prefix = NONE || test -d $prefix) && {
7395         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7396         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7397         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7398         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7399         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7400         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7401 }
7402
7403 test "$prefix" != "NONE" && \
7404 test -d "$prefix" && \
7405  {
7406         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7407         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7408         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7409         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7410         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7411         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7412 }
7413
7414 test "/usr/local" != "$prefix" && \
7415 test -d "/usr/local" && \
7416 (test $prefix = NONE || test -d $prefix) && {
7417         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7418         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7419         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7420         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7421         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7422         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7423 }
7424
7425 test "/opt" != "$prefix" && \
7426 test -d "/opt" && \
7427 (test $prefix = NONE || test -d $prefix) && {
7428         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7429         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7430         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7431         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7432         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7433         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7434 }
7435
7436 test "$HOME" != "$prefix" && \
7437 test -d "$HOME" && \
7438 (test $prefix = NONE || test -d $prefix) && {
7439         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7440         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7441         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7442         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7443         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7444         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7445 }
7446
7447 test "$includedir" != NONE && \
7448 test "$includedir" != "/usr/include" && \
7449 test -d "$includedir" && {
7450         test -d $includedir &&    cf_search="$cf_search $includedir"
7451         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7452 }
7453
7454 test "$oldincludedir" != NONE && \
7455 test "$oldincludedir" != "/usr/include" && \
7456 test -d "$oldincludedir" && {
7457         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7458         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7459 }
7460
7461 cf_search="$cf_header_path_list $cf_search"
7462
7463     for cf_cv_header_path_utf8 in $cf_search
7464     do
7465       if test -d $cf_cv_header_path_utf8 ; then
7466         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7467
7468 echo "${as_me-configure}:7468: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7469
7470         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7471         cat >conftest.$ac_ext <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474
7475 #include <libutf8.h>
7476 int
7477 main ()
7478 {
7479 putwc(0,0);
7480   ;
7481   return 0;
7482 }
7483 _ACEOF
7484 rm -f conftest.$ac_objext
7485 if { (eval echo "$as_me:7485: \"$ac_compile\"") >&5
7486   (eval $ac_compile) 2>&5
7487   ac_status=$?
7488   echo "$as_me:7488: \$? = $ac_status" >&5
7489   (exit $ac_status); } &&
7490          { ac_try='test -s conftest.$ac_objext'
7491   { (eval echo "$as_me:7491: \"$ac_try\"") >&5
7492   (eval $ac_try) 2>&5
7493   ac_status=$?
7494   echo "$as_me:7494: \$? = $ac_status" >&5
7495   (exit $ac_status); }; }; then
7496
7497             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7498
7499 echo "${as_me-configure}:7499: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7500
7501             cf_cv_find_linkage_utf8=maybe
7502             cf_test_CPPFLAGS="$CPPFLAGS"
7503             break
7504 else
7505   echo "$as_me: failed program was:" >&5
7506 cat conftest.$ac_ext >&5
7507
7508             CPPFLAGS="$cf_save_CPPFLAGS"
7509
7510 fi
7511 rm -f conftest.$ac_objext conftest.$ac_ext
7512       fi
7513     done
7514
7515     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7516
7517 echo "${as_me-configure}:7517: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7518
7519       cf_save_LIBS="$LIBS"
7520       cf_save_LDFLAGS="$LDFLAGS"
7521
7522       if test "$cf_cv_find_linkage_utf8" != yes ; then
7523
7524 cf_library_path_list=""
7525 if test -n "${LDFLAGS}${LIBS}" ; then
7526         for cf_library_path in $LDFLAGS $LIBS
7527         do
7528                 case $cf_library_path in #(vi
7529                 -L*)
7530                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7531
7532 test "$cf_library_path" != "NONE" && \
7533 test -d "$cf_library_path" && \
7534  {
7535         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7536         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7537         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7538         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7539         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7540         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7541 }
7542
7543                         cf_library_path_list="$cf_library_path_list $cf_search"
7544                         ;;
7545                 esac
7546         done
7547 fi
7548
7549 cf_search=""
7550
7551 test "/usr" != "$prefix" && \
7552 test -d "/usr" && \
7553 (test $prefix = NONE || test -d $prefix) && {
7554         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7555         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7556         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7557         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7558         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7559         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7560 }
7561
7562 test "$prefix" != "NONE" && \
7563 test -d "$prefix" && \
7564  {
7565         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7566         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7567         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7568         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7569         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7570         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7571 }
7572
7573 test "/usr/local" != "$prefix" && \
7574 test -d "/usr/local" && \
7575 (test $prefix = NONE || test -d $prefix) && {
7576         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7577         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7578         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7579         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7580         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7581         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7582 }
7583
7584 test "/opt" != "$prefix" && \
7585 test -d "/opt" && \
7586 (test $prefix = NONE || test -d $prefix) && {
7587         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7588         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7589         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7590         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7591         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7592         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7593 }
7594
7595 test "$HOME" != "$prefix" && \
7596 test -d "$HOME" && \
7597 (test $prefix = NONE || test -d $prefix) && {
7598         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7599         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7600         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7601         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7602         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7603         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7604 }
7605
7606 cf_search="$cf_library_path_list $cf_search"
7607
7608         for cf_cv_library_path_utf8 in $cf_search
7609         do
7610           if test -d $cf_cv_library_path_utf8 ; then
7611             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7612
7613 echo "${as_me-configure}:7613: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7614
7615             CPPFLAGS="$cf_test_CPPFLAGS"
7616             LIBS="-lutf8  $cf_save_LIBS"
7617             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7618             cat >conftest.$ac_ext <<_ACEOF
7619 #line 7619 "configure"
7620 #include "confdefs.h"
7621
7622 #include <libutf8.h>
7623 int
7624 main ()
7625 {
7626 putwc(0,0);
7627   ;
7628   return 0;
7629 }
7630 _ACEOF
7631 rm -f conftest.$ac_objext conftest$ac_exeext
7632 if { (eval echo "$as_me:7632: \"$ac_link\"") >&5
7633   (eval $ac_link) 2>&5
7634   ac_status=$?
7635   echo "$as_me:7635: \$? = $ac_status" >&5
7636   (exit $ac_status); } &&
7637          { ac_try='test -s conftest$ac_exeext'
7638   { (eval echo "$as_me:7638: \"$ac_try\"") >&5
7639   (eval $ac_try) 2>&5
7640   ac_status=$?
7641   echo "$as_me:7641: \$? = $ac_status" >&5
7642   (exit $ac_status); }; }; then
7643
7644                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7645
7646 echo "${as_me-configure}:7646: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7647
7648                 cf_cv_find_linkage_utf8=yes
7649                 cf_cv_library_file_utf8="-lutf8"
7650                 break
7651 else
7652   echo "$as_me: failed program was:" >&5
7653 cat conftest.$ac_ext >&5
7654
7655                 CPPFLAGS="$cf_save_CPPFLAGS"
7656                 LIBS="$cf_save_LIBS"
7657                 LDFLAGS="$cf_save_LDFLAGS"
7658
7659 fi
7660 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7661           fi
7662         done
7663         LIBS="$cf_save_LIBS"
7664         CPPFLAGS="$cf_save_CPPFLAGS"
7665         LDFLAGS="$cf_save_LDFLAGS"
7666       fi
7667
7668     else
7669       cf_cv_find_linkage_utf8=no
7670     fi
7671
7672 fi
7673 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7674
7675 if test "$cf_cv_find_linkage_utf8" = yes ; then
7676 cf_cv_utf8_lib=add-on
7677 else
7678 cf_cv_utf8_lib=no
7679 fi
7680
7681 fi
7682 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7683 fi
7684 echo "$as_me:7684: result: $cf_cv_utf8_lib" >&5
7685 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7686
7687 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7688 # ncurses/ncursesw:
7689 if test "$cf_cv_utf8_lib" = "add-on" ; then
7690         cat >>confdefs.h <<\EOF
7691 #define HAVE_LIBUTF8_H 1
7692 EOF
7693
7694 if test -n "$cf_cv_header_path_utf8" ; then
7695   for cf_add_incdir in $cf_cv_header_path_utf8
7696   do
7697         while test $cf_add_incdir != /usr/include
7698         do
7699           if test -d $cf_add_incdir
7700           then
7701                 cf_have_incdir=no
7702                 if test -n "$CFLAGS$CPPFLAGS" ; then
7703                   # a loop is needed to ensure we can add subdirs of existing dirs
7704                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7705                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7706                           cf_have_incdir=yes; break
7707                         fi
7708                   done
7709                 fi
7710
7711                 if test "$cf_have_incdir" = no ; then
7712                   if test "$cf_add_incdir" = /usr/local/include ; then
7713                         if test "$GCC" = yes
7714                         then
7715                           cf_save_CPPFLAGS=$CPPFLAGS
7716                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7717                           cat >conftest.$ac_ext <<_ACEOF
7718 #line 7718 "configure"
7719 #include "confdefs.h"
7720 #include <stdio.h>
7721 int
7722 main ()
7723 {
7724 printf("Hello")
7725   ;
7726   return 0;
7727 }
7728 _ACEOF
7729 rm -f conftest.$ac_objext
7730 if { (eval echo "$as_me:7730: \"$ac_compile\"") >&5
7731   (eval $ac_compile) 2>&5
7732   ac_status=$?
7733   echo "$as_me:7733: \$? = $ac_status" >&5
7734   (exit $ac_status); } &&
7735          { ac_try='test -s conftest.$ac_objext'
7736   { (eval echo "$as_me:7736: \"$ac_try\"") >&5
7737   (eval $ac_try) 2>&5
7738   ac_status=$?
7739   echo "$as_me:7739: \$? = $ac_status" >&5
7740   (exit $ac_status); }; }; then
7741   :
7742 else
7743   echo "$as_me: failed program was:" >&5
7744 cat conftest.$ac_ext >&5
7745 cf_have_incdir=yes
7746 fi
7747 rm -f conftest.$ac_objext conftest.$ac_ext
7748                           CPPFLAGS=$cf_save_CPPFLAGS
7749                         fi
7750                   fi
7751                 fi
7752
7753                 if test "$cf_have_incdir" = no ; then
7754                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7755
7756 echo "${as_me-configure}:7756: testing adding $cf_add_incdir to include-path ..." 1>&5
7757
7758                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
7759
7760                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7761                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7762                   cf_add_incdir="$cf_top_incdir"
7763                 else
7764                   break
7765                 fi
7766           fi
7767         done
7768   done
7769 fi
7770
7771 if test -n "$cf_cv_library_path_utf8" ; then
7772   for cf_add_libdir in $cf_cv_library_path_utf8
7773   do
7774     if test $cf_add_libdir = /usr/lib ; then
7775       :
7776     elif test -d $cf_add_libdir
7777     then
7778       cf_have_libdir=no
7779       if test -n "$LDFLAGS$LIBS" ; then
7780         # a loop is needed to ensure we can add subdirs of existing dirs
7781         for cf_test_libdir in $LDFLAGS $LIBS ; do
7782           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7783             cf_have_libdir=yes; break
7784           fi
7785         done
7786       fi
7787       if test "$cf_have_libdir" = no ; then
7788         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7789
7790 echo "${as_me-configure}:7790: testing adding $cf_add_libdir to library-path ..." 1>&5
7791
7792         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7793       fi
7794     fi
7795   done
7796 fi
7797
7798         LIBS="-lutf8 $LIBS"
7799 fi
7800
7801                 if test "$cf_cv_utf8_lib" != no ; then
7802                         NCURSES_LIBUTF8=1
7803                 fi
7804         fi
7805
7806 # This is needed on Tru64 5.0 to declare mbstate_t
7807 echo "$as_me:7807: checking if we must include wchar.h to declare mbstate_t" >&5
7808 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7809 if test "${cf_cv_mbstate_t+set}" = set; then
7810   echo $ECHO_N "(cached) $ECHO_C" >&6
7811 else
7812
7813 cat >conftest.$ac_ext <<_ACEOF
7814 #line 7814 "configure"
7815 #include "confdefs.h"
7816
7817 #include <stdlib.h>
7818 #include <stdarg.h>
7819 #include <stdio.h>
7820 #ifdef HAVE_LIBUTF8_H
7821 #include <libutf8.h>
7822 #endif
7823 int
7824 main ()
7825 {
7826 mbstate_t state
7827   ;
7828   return 0;
7829 }
7830 _ACEOF
7831 rm -f conftest.$ac_objext
7832 if { (eval echo "$as_me:7832: \"$ac_compile\"") >&5
7833   (eval $ac_compile) 2>&5
7834   ac_status=$?
7835   echo "$as_me:7835: \$? = $ac_status" >&5
7836   (exit $ac_status); } &&
7837          { ac_try='test -s conftest.$ac_objext'
7838   { (eval echo "$as_me:7838: \"$ac_try\"") >&5
7839   (eval $ac_try) 2>&5
7840   ac_status=$?
7841   echo "$as_me:7841: \$? = $ac_status" >&5
7842   (exit $ac_status); }; }; then
7843   cf_cv_mbstate_t=no
7844 else
7845   echo "$as_me: failed program was:" >&5
7846 cat conftest.$ac_ext >&5
7847 cat >conftest.$ac_ext <<_ACEOF
7848 #line 7848 "configure"
7849 #include "confdefs.h"
7850
7851 #include <stdlib.h>
7852 #include <stdarg.h>
7853 #include <stdio.h>
7854 #include <wchar.h>
7855 #ifdef HAVE_LIBUTF8_H
7856 #include <libutf8.h>
7857 #endif
7858 int
7859 main ()
7860 {
7861 mbstate_t value
7862   ;
7863   return 0;
7864 }
7865 _ACEOF
7866 rm -f conftest.$ac_objext
7867 if { (eval echo "$as_me:7867: \"$ac_compile\"") >&5
7868   (eval $ac_compile) 2>&5
7869   ac_status=$?
7870   echo "$as_me:7870: \$? = $ac_status" >&5
7871   (exit $ac_status); } &&
7872          { ac_try='test -s conftest.$ac_objext'
7873   { (eval echo "$as_me:7873: \"$ac_try\"") >&5
7874   (eval $ac_try) 2>&5
7875   ac_status=$?
7876   echo "$as_me:7876: \$? = $ac_status" >&5
7877   (exit $ac_status); }; }; then
7878   cf_cv_mbstate_t=yes
7879 else
7880   echo "$as_me: failed program was:" >&5
7881 cat conftest.$ac_ext >&5
7882 cf_cv_mbstate_t=unknown
7883 fi
7884 rm -f conftest.$ac_objext conftest.$ac_ext
7885 fi
7886 rm -f conftest.$ac_objext conftest.$ac_ext
7887 fi
7888 echo "$as_me:7888: result: $cf_cv_mbstate_t" >&5
7889 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7890
7891 if test "$cf_cv_mbstate_t" = yes ; then
7892         cat >>confdefs.h <<\EOF
7893 #define NEED_WCHAR_H 1
7894 EOF
7895
7896         NEED_WCHAR_H=1
7897 fi
7898
7899 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7900 if test "$cf_cv_mbstate_t" = unknown ; then
7901         NCURSES_MBSTATE_T=1
7902 fi
7903
7904 # This is needed on Tru64 5.0 to declare wchar_t
7905 echo "$as_me:7905: checking if we must include wchar.h to declare wchar_t" >&5
7906 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7907 if test "${cf_cv_wchar_t+set}" = set; then
7908   echo $ECHO_N "(cached) $ECHO_C" >&6
7909 else
7910
7911 cat >conftest.$ac_ext <<_ACEOF
7912 #line 7912 "configure"
7913 #include "confdefs.h"
7914
7915 #include <stdlib.h>
7916 #include <stdarg.h>
7917 #include <stdio.h>
7918 #ifdef HAVE_LIBUTF8_H
7919 #include <libutf8.h>
7920 #endif
7921 int
7922 main ()
7923 {
7924 wchar_t state
7925   ;
7926   return 0;
7927 }
7928 _ACEOF
7929 rm -f conftest.$ac_objext
7930 if { (eval echo "$as_me:7930: \"$ac_compile\"") >&5
7931   (eval $ac_compile) 2>&5
7932   ac_status=$?
7933   echo "$as_me:7933: \$? = $ac_status" >&5
7934   (exit $ac_status); } &&
7935          { ac_try='test -s conftest.$ac_objext'
7936   { (eval echo "$as_me:7936: \"$ac_try\"") >&5
7937   (eval $ac_try) 2>&5
7938   ac_status=$?
7939   echo "$as_me:7939: \$? = $ac_status" >&5
7940   (exit $ac_status); }; }; then
7941   cf_cv_wchar_t=no
7942 else
7943   echo "$as_me: failed program was:" >&5
7944 cat conftest.$ac_ext >&5
7945 cat >conftest.$ac_ext <<_ACEOF
7946 #line 7946 "configure"
7947 #include "confdefs.h"
7948
7949 #include <stdlib.h>
7950 #include <stdarg.h>
7951 #include <stdio.h>
7952 #include <wchar.h>
7953 #ifdef HAVE_LIBUTF8_H
7954 #include <libutf8.h>
7955 #endif
7956 int
7957 main ()
7958 {
7959 wchar_t value
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f conftest.$ac_objext
7965 if { (eval echo "$as_me:7965: \"$ac_compile\"") >&5
7966   (eval $ac_compile) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit $ac_status); } &&
7970          { ac_try='test -s conftest.$ac_objext'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit $ac_status); }; }; then
7976   cf_cv_wchar_t=yes
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat conftest.$ac_ext >&5
7980 cf_cv_wchar_t=unknown
7981 fi
7982 rm -f conftest.$ac_objext conftest.$ac_ext
7983 fi
7984 rm -f conftest.$ac_objext conftest.$ac_ext
7985 fi
7986 echo "$as_me:7986: result: $cf_cv_wchar_t" >&5
7987 echo "${ECHO_T}$cf_cv_wchar_t" >&6
7988
7989 if test "$cf_cv_wchar_t" = yes ; then
7990         cat >>confdefs.h <<\EOF
7991 #define NEED_WCHAR_H 1
7992 EOF
7993
7994         NEED_WCHAR_H=1
7995 fi
7996
7997 # if we do not find wchar_t in either place, use substitution to provide a fallback.
7998 if test "$cf_cv_wchar_t" = unknown ; then
7999         NCURSES_WCHAR_T=1
8000 fi
8001
8002 # if we find wchar_t in either place, use substitution to provide a fallback.
8003 if test "$cf_cv_wchar_t" != unknown ; then
8004         NCURSES_OK_WCHAR_T=1
8005 fi
8006
8007 # This is needed on Tru64 5.0 to declare wint_t
8008 echo "$as_me:8008: checking if we must include wchar.h to declare wint_t" >&5
8009 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8010 if test "${cf_cv_wint_t+set}" = set; then
8011   echo $ECHO_N "(cached) $ECHO_C" >&6
8012 else
8013
8014 cat >conftest.$ac_ext <<_ACEOF
8015 #line 8015 "configure"
8016 #include "confdefs.h"
8017
8018 #include <stdlib.h>
8019 #include <stdarg.h>
8020 #include <stdio.h>
8021 #ifdef HAVE_LIBUTF8_H
8022 #include <libutf8.h>
8023 #endif
8024 int
8025 main ()
8026 {
8027 wint_t state
8028   ;
8029   return 0;
8030 }
8031 _ACEOF
8032 rm -f conftest.$ac_objext
8033 if { (eval echo "$as_me:8033: \"$ac_compile\"") >&5
8034   (eval $ac_compile) 2>&5
8035   ac_status=$?
8036   echo "$as_me:8036: \$? = $ac_status" >&5
8037   (exit $ac_status); } &&
8038          { ac_try='test -s conftest.$ac_objext'
8039   { (eval echo "$as_me:8039: \"$ac_try\"") >&5
8040   (eval $ac_try) 2>&5
8041   ac_status=$?
8042   echo "$as_me:8042: \$? = $ac_status" >&5
8043   (exit $ac_status); }; }; then
8044   cf_cv_wint_t=no
8045 else
8046   echo "$as_me: failed program was:" >&5
8047 cat conftest.$ac_ext >&5
8048 cat >conftest.$ac_ext <<_ACEOF
8049 #line 8049 "configure"
8050 #include "confdefs.h"
8051
8052 #include <stdlib.h>
8053 #include <stdarg.h>
8054 #include <stdio.h>
8055 #include <wchar.h>
8056 #ifdef HAVE_LIBUTF8_H
8057 #include <libutf8.h>
8058 #endif
8059 int
8060 main ()
8061 {
8062 wint_t value
8063   ;
8064   return 0;
8065 }
8066 _ACEOF
8067 rm -f conftest.$ac_objext
8068 if { (eval echo "$as_me:8068: \"$ac_compile\"") >&5
8069   (eval $ac_compile) 2>&5
8070   ac_status=$?
8071   echo "$as_me:8071: \$? = $ac_status" >&5
8072   (exit $ac_status); } &&
8073          { ac_try='test -s conftest.$ac_objext'
8074   { (eval echo "$as_me:8074: \"$ac_try\"") >&5
8075   (eval $ac_try) 2>&5
8076   ac_status=$?
8077   echo "$as_me:8077: \$? = $ac_status" >&5
8078   (exit $ac_status); }; }; then
8079   cf_cv_wint_t=yes
8080 else
8081   echo "$as_me: failed program was:" >&5
8082 cat conftest.$ac_ext >&5
8083 cf_cv_wint_t=unknown
8084 fi
8085 rm -f conftest.$ac_objext conftest.$ac_ext
8086 fi
8087 rm -f conftest.$ac_objext conftest.$ac_ext
8088 fi
8089 echo "$as_me:8089: result: $cf_cv_wint_t" >&5
8090 echo "${ECHO_T}$cf_cv_wint_t" >&6
8091
8092 if test "$cf_cv_wint_t" = yes ; then
8093         cat >>confdefs.h <<\EOF
8094 #define NEED_WCHAR_H 1
8095 EOF
8096
8097         NEED_WCHAR_H=1
8098 fi
8099
8100 # if we do not find wint_t in either place, use substitution to provide a fallback.
8101 if test "$cf_cv_wint_t" = unknown ; then
8102         NCURSES_WINT_T=1
8103 fi
8104
8105 # if we find wint_t in either place, use substitution to provide a fallback.
8106 if test "$cf_cv_wint_t" != unknown ; then
8107         NCURSES_OK_WINT_T=1
8108 fi
8109
8110         if test "$NCURSES_MBSTATE_T" != 0; then
8111                 cat >>confdefs.h <<\EOF
8112 #define NEED_MBSTATE_T_DEF 1
8113 EOF
8114
8115         fi
8116 fi
8117
8118 ###   use option --disable-lp64 to allow long chtype
8119 case $cf_cv_abi_version in
8120 [345]*)
8121         default_with_lp64=no
8122         ;;
8123 *)
8124         default_with_lp64=yes
8125         ;;
8126 esac
8127
8128 echo "$as_me:8128: checking whether to enable _LP64 definition in curses.h" >&5
8129 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8130
8131 # Check whether --enable-lp64 or --disable-lp64 was given.
8132 if test "${enable_lp64+set}" = set; then
8133   enableval="$enable_lp64"
8134   with_lp64=$enableval
8135 else
8136   with_lp64=$default_with_lp64
8137 fi;
8138 echo "$as_me:8138: result: $with_lp64" >&5
8139 echo "${ECHO_T}$with_lp64" >&6
8140
8141 if test "$with_lp64" = yes ; then
8142         cf_cv_enable_lp64=1
8143 else
8144         cf_cv_enable_lp64=0
8145 fi
8146
8147 # Check whether --enable-largefile or --disable-largefile was given.
8148 if test "${enable_largefile+set}" = set; then
8149   enableval="$enable_largefile"
8150
8151 fi;
8152 if test "$enable_largefile" != no; then
8153
8154   echo "$as_me:8154: checking for special C compiler options needed for large files" >&5
8155 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8156 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8157   echo $ECHO_N "(cached) $ECHO_C" >&6
8158 else
8159   ac_cv_sys_largefile_CC=no
8160      if test "$GCC" != yes; then
8161        ac_save_CC=$CC
8162        while :; do
8163          # IRIX 6.2 and later do not support large files by default,
8164          # so use the C compiler's -n32 option if that helps.
8165          cat >conftest.$ac_ext <<_ACEOF
8166 #line 8166 "configure"
8167 #include "confdefs.h"
8168 #include <sys/types.h>
8169  /* Check that off_t can represent 2**63 - 1 correctly.
8170     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8171     since some C++ compilers masquerading as C compilers
8172     incorrectly reject 9223372036854775807.  */
8173 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8174   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8175                        && LARGE_OFF_T % 2147483647 == 1)
8176                       ? 1 : -1];
8177 int
8178 main ()
8179 {
8180
8181   ;
8182   return 0;
8183 }
8184 _ACEOF
8185          rm -f conftest.$ac_objext
8186 if { (eval echo "$as_me:8186: \"$ac_compile\"") >&5
8187   (eval $ac_compile) 2>&5
8188   ac_status=$?
8189   echo "$as_me:8189: \$? = $ac_status" >&5
8190   (exit $ac_status); } &&
8191          { ac_try='test -s conftest.$ac_objext'
8192   { (eval echo "$as_me:8192: \"$ac_try\"") >&5
8193   (eval $ac_try) 2>&5
8194   ac_status=$?
8195   echo "$as_me:8195: \$? = $ac_status" >&5
8196   (exit $ac_status); }; }; then
8197   break
8198 else
8199   echo "$as_me: failed program was:" >&5
8200 cat conftest.$ac_ext >&5
8201 fi
8202 rm -f conftest.$ac_objext
8203          CC="$CC -n32"
8204          rm -f conftest.$ac_objext
8205 if { (eval echo "$as_me:8205: \"$ac_compile\"") >&5
8206   (eval $ac_compile) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); } &&
8210          { ac_try='test -s conftest.$ac_objext'
8211   { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212   (eval $ac_try) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); }; }; then
8216   ac_cv_sys_largefile_CC=' -n32'; break
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220 fi
8221 rm -f conftest.$ac_objext
8222          break
8223        done
8224        CC=$ac_save_CC
8225        rm -f conftest.$ac_ext
8226     fi
8227 fi
8228 echo "$as_me:8228: result: $ac_cv_sys_largefile_CC" >&5
8229 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8230   if test "$ac_cv_sys_largefile_CC" != no; then
8231     CC=$CC$ac_cv_sys_largefile_CC
8232   fi
8233
8234   echo "$as_me:8234: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8235 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8236 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8237   echo $ECHO_N "(cached) $ECHO_C" >&6
8238 else
8239   while :; do
8240   ac_cv_sys_file_offset_bits=no
8241   cat >conftest.$ac_ext <<_ACEOF
8242 #line 8242 "configure"
8243 #include "confdefs.h"
8244 #include <sys/types.h>
8245  /* Check that off_t can represent 2**63 - 1 correctly.
8246     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8247     since some C++ compilers masquerading as C compilers
8248     incorrectly reject 9223372036854775807.  */
8249 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8250   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8251                        && LARGE_OFF_T % 2147483647 == 1)
8252                       ? 1 : -1];
8253 int
8254 main ()
8255 {
8256
8257   ;
8258   return 0;
8259 }
8260 _ACEOF
8261 rm -f conftest.$ac_objext
8262 if { (eval echo "$as_me:8262: \"$ac_compile\"") >&5
8263   (eval $ac_compile) 2>&5
8264   ac_status=$?
8265   echo "$as_me:8265: \$? = $ac_status" >&5
8266   (exit $ac_status); } &&
8267          { ac_try='test -s conftest.$ac_objext'
8268   { (eval echo "$as_me:8268: \"$ac_try\"") >&5
8269   (eval $ac_try) 2>&5
8270   ac_status=$?
8271   echo "$as_me:8271: \$? = $ac_status" >&5
8272   (exit $ac_status); }; }; then
8273   break
8274 else
8275   echo "$as_me: failed program was:" >&5
8276 cat conftest.$ac_ext >&5
8277 fi
8278 rm -f conftest.$ac_objext conftest.$ac_ext
8279   cat >conftest.$ac_ext <<_ACEOF
8280 #line 8280 "configure"
8281 #include "confdefs.h"
8282 #define _FILE_OFFSET_BITS 64
8283 #include <sys/types.h>
8284  /* Check that off_t can represent 2**63 - 1 correctly.
8285     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8286     since some C++ compilers masquerading as C compilers
8287     incorrectly reject 9223372036854775807.  */
8288 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8289   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8290                        && LARGE_OFF_T % 2147483647 == 1)
8291                       ? 1 : -1];
8292 int
8293 main ()
8294 {
8295
8296   ;
8297   return 0;
8298 }
8299 _ACEOF
8300 rm -f conftest.$ac_objext
8301 if { (eval echo "$as_me:8301: \"$ac_compile\"") >&5
8302   (eval $ac_compile) 2>&5
8303   ac_status=$?
8304   echo "$as_me:8304: \$? = $ac_status" >&5
8305   (exit $ac_status); } &&
8306          { ac_try='test -s conftest.$ac_objext'
8307   { (eval echo "$as_me:8307: \"$ac_try\"") >&5
8308   (eval $ac_try) 2>&5
8309   ac_status=$?
8310   echo "$as_me:8310: \$? = $ac_status" >&5
8311   (exit $ac_status); }; }; then
8312   ac_cv_sys_file_offset_bits=64; break
8313 else
8314   echo "$as_me: failed program was:" >&5
8315 cat conftest.$ac_ext >&5
8316 fi
8317 rm -f conftest.$ac_objext conftest.$ac_ext
8318   break
8319 done
8320 fi
8321 echo "$as_me:8321: result: $ac_cv_sys_file_offset_bits" >&5
8322 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8323 if test "$ac_cv_sys_file_offset_bits" != no; then
8324
8325 cat >>confdefs.h <<EOF
8326 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8327 EOF
8328
8329 fi
8330 rm -f conftest*
8331   echo "$as_me:8331: checking for _LARGE_FILES value needed for large files" >&5
8332 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8333 if test "${ac_cv_sys_large_files+set}" = set; then
8334   echo $ECHO_N "(cached) $ECHO_C" >&6
8335 else
8336   while :; do
8337   ac_cv_sys_large_files=no
8338   cat >conftest.$ac_ext <<_ACEOF
8339 #line 8339 "configure"
8340 #include "confdefs.h"
8341 #include <sys/types.h>
8342  /* Check that off_t can represent 2**63 - 1 correctly.
8343     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8344     since some C++ compilers masquerading as C compilers
8345     incorrectly reject 9223372036854775807.  */
8346 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8347   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8348                        && LARGE_OFF_T % 2147483647 == 1)
8349                       ? 1 : -1];
8350 int
8351 main ()
8352 {
8353
8354   ;
8355   return 0;
8356 }
8357 _ACEOF
8358 rm -f conftest.$ac_objext
8359 if { (eval echo "$as_me:8359: \"$ac_compile\"") >&5
8360   (eval $ac_compile) 2>&5
8361   ac_status=$?
8362   echo "$as_me:8362: \$? = $ac_status" >&5
8363   (exit $ac_status); } &&
8364          { ac_try='test -s conftest.$ac_objext'
8365   { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8366   (eval $ac_try) 2>&5
8367   ac_status=$?
8368   echo "$as_me:8368: \$? = $ac_status" >&5
8369   (exit $ac_status); }; }; then
8370   break
8371 else
8372   echo "$as_me: failed program was:" >&5
8373 cat conftest.$ac_ext >&5
8374 fi
8375 rm -f conftest.$ac_objext conftest.$ac_ext
8376   cat >conftest.$ac_ext <<_ACEOF
8377 #line 8377 "configure"
8378 #include "confdefs.h"
8379 #define _LARGE_FILES 1
8380 #include <sys/types.h>
8381  /* Check that off_t can represent 2**63 - 1 correctly.
8382     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8383     since some C++ compilers masquerading as C compilers
8384     incorrectly reject 9223372036854775807.  */
8385 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8386   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8387                        && LARGE_OFF_T % 2147483647 == 1)
8388                       ? 1 : -1];
8389 int
8390 main ()
8391 {
8392
8393   ;
8394   return 0;
8395 }
8396 _ACEOF
8397 rm -f conftest.$ac_objext
8398 if { (eval echo "$as_me:8398: \"$ac_compile\"") >&5
8399   (eval $ac_compile) 2>&5
8400   ac_status=$?
8401   echo "$as_me:8401: \$? = $ac_status" >&5
8402   (exit $ac_status); } &&
8403          { ac_try='test -s conftest.$ac_objext'
8404   { (eval echo "$as_me:8404: \"$ac_try\"") >&5
8405   (eval $ac_try) 2>&5
8406   ac_status=$?
8407   echo "$as_me:8407: \$? = $ac_status" >&5
8408   (exit $ac_status); }; }; then
8409   ac_cv_sys_large_files=1; break
8410 else
8411   echo "$as_me: failed program was:" >&5
8412 cat conftest.$ac_ext >&5
8413 fi
8414 rm -f conftest.$ac_objext conftest.$ac_ext
8415   break
8416 done
8417 fi
8418 echo "$as_me:8418: result: $ac_cv_sys_large_files" >&5
8419 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8420 if test "$ac_cv_sys_large_files" != no; then
8421
8422 cat >>confdefs.h <<EOF
8423 #define _LARGE_FILES $ac_cv_sys_large_files
8424 EOF
8425
8426 fi
8427 rm -f conftest*
8428 fi
8429
8430     if test "$enable_largefile" != no ; then
8431         echo "$as_me:8431: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8432 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8433 if test "${ac_cv_sys_largefile_source+set}" = set; then
8434   echo $ECHO_N "(cached) $ECHO_C" >&6
8435 else
8436   while :; do
8437   ac_cv_sys_largefile_source=no
8438   cat >conftest.$ac_ext <<_ACEOF
8439 #line 8439 "configure"
8440 #include "confdefs.h"
8441 #include <stdio.h>
8442 int
8443 main ()
8444 {
8445 return !fseeko;
8446   ;
8447   return 0;
8448 }
8449 _ACEOF
8450 rm -f conftest.$ac_objext
8451 if { (eval echo "$as_me:8451: \"$ac_compile\"") >&5
8452   (eval $ac_compile) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit $ac_status); } &&
8456          { ac_try='test -s conftest.$ac_objext'
8457   { (eval echo "$as_me:8457: \"$ac_try\"") >&5
8458   (eval $ac_try) 2>&5
8459   ac_status=$?
8460   echo "$as_me:8460: \$? = $ac_status" >&5
8461   (exit $ac_status); }; }; then
8462   break
8463 else
8464   echo "$as_me: failed program was:" >&5
8465 cat conftest.$ac_ext >&5
8466 fi
8467 rm -f conftest.$ac_objext conftest.$ac_ext
8468   cat >conftest.$ac_ext <<_ACEOF
8469 #line 8469 "configure"
8470 #include "confdefs.h"
8471 #define _LARGEFILE_SOURCE 1
8472 #include <stdio.h>
8473 int
8474 main ()
8475 {
8476 return !fseeko;
8477   ;
8478   return 0;
8479 }
8480 _ACEOF
8481 rm -f conftest.$ac_objext
8482 if { (eval echo "$as_me:8482: \"$ac_compile\"") >&5
8483   (eval $ac_compile) 2>&5
8484   ac_status=$?
8485   echo "$as_me:8485: \$? = $ac_status" >&5
8486   (exit $ac_status); } &&
8487          { ac_try='test -s conftest.$ac_objext'
8488   { (eval echo "$as_me:8488: \"$ac_try\"") >&5
8489   (eval $ac_try) 2>&5
8490   ac_status=$?
8491   echo "$as_me:8491: \$? = $ac_status" >&5
8492   (exit $ac_status); }; }; then
8493   ac_cv_sys_largefile_source=1; break
8494 else
8495   echo "$as_me: failed program was:" >&5
8496 cat conftest.$ac_ext >&5
8497 fi
8498 rm -f conftest.$ac_objext conftest.$ac_ext
8499   break
8500 done
8501 fi
8502 echo "$as_me:8502: result: $ac_cv_sys_largefile_source" >&5
8503 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8504 if test "$ac_cv_sys_largefile_source" != no; then
8505
8506 cat >>confdefs.h <<EOF
8507 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8508 EOF
8509
8510 fi
8511 rm -f conftest*
8512
8513 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8514 # in glibc 2.1.3, but that breaks too many other things.
8515 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8516 echo "$as_me:8516: checking for fseeko" >&5
8517 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8518 if test "${ac_cv_func_fseeko+set}" = set; then
8519   echo $ECHO_N "(cached) $ECHO_C" >&6
8520 else
8521   cat >conftest.$ac_ext <<_ACEOF
8522 #line 8522 "configure"
8523 #include "confdefs.h"
8524 #include <stdio.h>
8525 int
8526 main ()
8527 {
8528 return fseeko && fseeko (stdin, 0, 0);
8529   ;
8530   return 0;
8531 }
8532 _ACEOF
8533 rm -f conftest.$ac_objext conftest$ac_exeext
8534 if { (eval echo "$as_me:8534: \"$ac_link\"") >&5
8535   (eval $ac_link) 2>&5
8536   ac_status=$?
8537   echo "$as_me:8537: \$? = $ac_status" >&5
8538   (exit $ac_status); } &&
8539          { ac_try='test -s conftest$ac_exeext'
8540   { (eval echo "$as_me:8540: \"$ac_try\"") >&5
8541   (eval $ac_try) 2>&5
8542   ac_status=$?
8543   echo "$as_me:8543: \$? = $ac_status" >&5
8544   (exit $ac_status); }; }; then
8545   ac_cv_func_fseeko=yes
8546 else
8547   echo "$as_me: failed program was:" >&5
8548 cat conftest.$ac_ext >&5
8549 ac_cv_func_fseeko=no
8550 fi
8551 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8552 fi
8553 echo "$as_me:8553: result: $ac_cv_func_fseeko" >&5
8554 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8555 if test $ac_cv_func_fseeko = yes; then
8556
8557 cat >>confdefs.h <<\EOF
8558 #define HAVE_FSEEKO 1
8559 EOF
8560
8561 fi
8562
8563         # Normally we would collect these definitions in the config.h,
8564         # but (like _XOPEN_SOURCE), some environments rely on having these
8565         # defined before any of the system headers are included.  Another
8566         # case comes up with C++, e.g., on AIX the compiler compiles the
8567         # header files by themselves before looking at the body files it is
8568         # told to compile.  For ncurses, those header files do not include
8569         # the config.h
8570         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8571         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8572         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8573
8574         echo "$as_me:8574: checking whether to use struct dirent64" >&5
8575 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8576 if test "${cf_cv_struct_dirent64+set}" = set; then
8577   echo $ECHO_N "(cached) $ECHO_C" >&6
8578 else
8579
8580                 cat >conftest.$ac_ext <<_ACEOF
8581 #line 8581 "configure"
8582 #include "confdefs.h"
8583
8584 #include <sys/types.h>
8585 #include <dirent.h>
8586
8587 int
8588 main ()
8589 {
8590
8591                 /* if transitional largefile support is setup, this is true */
8592                 extern struct dirent64 * readdir(DIR *);
8593                 struct dirent64 *x = readdir((DIR *)0);
8594                 struct dirent *y = readdir((DIR *)0);
8595                 int z = x - y;
8596
8597   ;
8598   return 0;
8599 }
8600 _ACEOF
8601 rm -f conftest.$ac_objext
8602 if { (eval echo "$as_me:8602: \"$ac_compile\"") >&5
8603   (eval $ac_compile) 2>&5
8604   ac_status=$?
8605   echo "$as_me:8605: \$? = $ac_status" >&5
8606   (exit $ac_status); } &&
8607          { ac_try='test -s conftest.$ac_objext'
8608   { (eval echo "$as_me:8608: \"$ac_try\"") >&5
8609   (eval $ac_try) 2>&5
8610   ac_status=$?
8611   echo "$as_me:8611: \$? = $ac_status" >&5
8612   (exit $ac_status); }; }; then
8613   cf_cv_struct_dirent64=yes
8614 else
8615   echo "$as_me: failed program was:" >&5
8616 cat conftest.$ac_ext >&5
8617 cf_cv_struct_dirent64=no
8618 fi
8619 rm -f conftest.$ac_objext conftest.$ac_ext
8620
8621 fi
8622 echo "$as_me:8622: result: $cf_cv_struct_dirent64" >&5
8623 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8624         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8625 #define HAVE_STRUCT_DIRENT64 1
8626 EOF
8627
8628     fi
8629
8630 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8631 echo "$as_me:8631: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8632 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8633
8634 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8635 if test "${enable_tparm_varargs+set}" = set; then
8636   enableval="$enable_tparm_varargs"
8637   with_tparm_varargs=$enableval
8638 else
8639   with_tparm_varargs=yes
8640 fi;
8641 echo "$as_me:8641: result: $with_tparm_varargs" >&5
8642 echo "${ECHO_T}$with_tparm_varargs" >&6
8643 NCURSES_TPARM_VARARGS=0
8644 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8645
8646 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8647 if test "$with_ticlib" != no ; then
8648 echo "$as_me:8648: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8649 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8650
8651 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8652 if test "${enable_tic_depends+set}" = set; then
8653   enableval="$enable_tic_depends"
8654   with_tic_depends=$enableval
8655 else
8656   with_tic_depends=yes
8657 fi;
8658 echo "$as_me:8658: result: $with_tic_depends" >&5
8659 echo "${ECHO_T}$with_tic_depends" >&6
8660 else
8661         with_tic_depends=no
8662 fi
8663
8664 ###   use option --with-bool to override bool's type
8665 echo "$as_me:8665: checking for type of bool" >&5
8666 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8667
8668 # Check whether --with-bool or --without-bool was given.
8669 if test "${with_bool+set}" = set; then
8670   withval="$with_bool"
8671   NCURSES_BOOL="$withval"
8672 else
8673   NCURSES_BOOL=auto
8674 fi;
8675 echo "$as_me:8675: result: $NCURSES_BOOL" >&5
8676 echo "${ECHO_T}$NCURSES_BOOL" >&6
8677
8678 echo "$as_me:8678: checking for alternate terminal capabilities file" >&5
8679 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8680
8681 # Check whether --with-caps or --without-caps was given.
8682 if test "${with_caps+set}" = set; then
8683   withval="$with_caps"
8684   TERMINFO_CAPS=Caps.$withval
8685 else
8686   TERMINFO_CAPS=Caps
8687 fi;
8688 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8689 echo "$as_me:8689: result: $TERMINFO_CAPS" >&5
8690 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8691
8692 ###   use option --with-chtype to override chtype's type
8693 echo "$as_me:8693: checking for type of chtype" >&5
8694 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8695
8696 # Check whether --with-chtype or --without-chtype was given.
8697 if test "${with_chtype+set}" = set; then
8698   withval="$with_chtype"
8699   NCURSES_CHTYPE="$withval"
8700 else
8701   NCURSES_CHTYPE=auto
8702 fi;
8703 echo "$as_me:8703: result: $NCURSES_CHTYPE" >&5
8704 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8705
8706 ###   use option --with-ospeed to override ospeed's type
8707 echo "$as_me:8707: checking for type of ospeed" >&5
8708 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8709
8710 # Check whether --with-ospeed or --without-ospeed was given.
8711 if test "${with_ospeed+set}" = set; then
8712   withval="$with_ospeed"
8713   NCURSES_OSPEED="$withval"
8714 else
8715   NCURSES_OSPEED=short
8716 fi;
8717 echo "$as_me:8717: result: $NCURSES_OSPEED" >&5
8718 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8719
8720 ###   use option --with-mmask-t to override mmask_t's type
8721 echo "$as_me:8721: checking for type of mmask_t" >&5
8722 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8723
8724 # Check whether --with-mmask-t or --without-mmask-t was given.
8725 if test "${with_mmask_t+set}" = set; then
8726   withval="$with_mmask_t"
8727   NCURSES_MMASK_T="$withval"
8728 else
8729   NCURSES_MMASK_T=auto
8730 fi;
8731 echo "$as_me:8731: result: $NCURSES_MMASK_T" >&5
8732 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8733
8734 ### Enable compiling-in rcs id's
8735 echo "$as_me:8735: checking if RCS identifiers should be compiled-in" >&5
8736 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8737
8738 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8739 if test "${with_rcs_ids+set}" = set; then
8740   withval="$with_rcs_ids"
8741   with_rcs_ids=$withval
8742 else
8743   with_rcs_ids=no
8744 fi;
8745 echo "$as_me:8745: result: $with_rcs_ids" >&5
8746 echo "${ECHO_T}$with_rcs_ids" >&6
8747 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8748 #define USE_RCS_IDS 1
8749 EOF
8750
8751 ###############################################################################
8752
8753 echo "$as_me:8753: checking format of man-pages" >&5
8754 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8755
8756 # Check whether --with-manpage-format or --without-manpage-format was given.
8757 if test "${with_manpage_format+set}" = set; then
8758   withval="$with_manpage_format"
8759   MANPAGE_FORMAT=$withval
8760 else
8761   MANPAGE_FORMAT=unknown
8762 fi;
8763
8764 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8765 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8766
8767 cf_unknown=
8768
8769 case $MANPAGE_FORMAT in
8770 unknown)
8771   if test -z "$MANPATH" ; then
8772     MANPATH="/usr/man:/usr/share/man"
8773   fi
8774
8775   # look for the 'date' man-page (it's most likely to be installed!)
8776   MANPAGE_FORMAT=
8777   cf_preform=no
8778   cf_catonly=yes
8779   cf_example=date
8780
8781   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATHSEP}"
8782   for cf_dir in $MANPATH; do
8783     test -z "$cf_dir" && cf_dir=/usr/man
8784     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
8785     do
8786       cf_test=`echo $cf_name | sed -e 's/*//'`
8787       if test "x$cf_test" = "x$cf_name" ; then
8788
8789         case "$cf_name" in
8790         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8791         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8792         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8793         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8794         esac
8795
8796         case "$cf_name" in
8797         $cf_dir/man*)
8798           cf_catonly=no
8799           ;;
8800         $cf_dir/cat*)
8801           cf_preform=yes
8802           ;;
8803         esac
8804         break
8805       fi
8806
8807       # if we found a match in either man* or cat*, stop looking
8808       if test -n "$MANPAGE_FORMAT" ; then
8809         cf_found=no
8810         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8811         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8812         case "$cf_name" in
8813         $cf_dir/cat*)
8814           cf_found=yes
8815           ;;
8816         esac
8817         test $cf_found=yes && break
8818       fi
8819     done
8820     # only check the first directory in $MANPATH where we find manpages
8821     if test -n "$MANPAGE_FORMAT" ; then
8822        break
8823     fi
8824   done
8825   # if we did not find the example, just assume it is normal
8826   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8827   IFS="$ac_save_ifs"
8828   ;;
8829 *)
8830   for cf_option in $MANPAGE_FORMAT; do
8831      case $cf_option in #(vi
8832      gzip|compress|BSDI|normal|formatted|catonly)
8833        ;;
8834      *)
8835        cf_unknown="$cf_unknown $cf_option"
8836        ;;
8837      esac
8838   done
8839   ;;
8840 esac
8841
8842 echo "$as_me:8842: result: $MANPAGE_FORMAT" >&5
8843 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8844 if test -n "$cf_unknown" ; then
8845   { echo "$as_me:8845: WARNING: Unexpected manpage-format $cf_unknown" >&5
8846 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8847 fi
8848
8849 echo "$as_me:8849: checking for manpage renaming" >&5
8850 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8851
8852 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8853 if test "${with_manpage_renames+set}" = set; then
8854   withval="$with_manpage_renames"
8855   MANPAGE_RENAMES=$withval
8856 else
8857   MANPAGE_RENAMES=yes
8858 fi;
8859
8860 case ".$MANPAGE_RENAMES" in #(vi
8861 .no) #(vi
8862   ;;
8863 .|.yes)
8864   # Debian 'man' program?
8865   if test -f /etc/debian_version ; then
8866     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8867   else
8868     MANPAGE_RENAMES=no
8869   fi
8870   ;;
8871 esac
8872
8873 if test "$MANPAGE_RENAMES" != no ; then
8874   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8875     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8876   elif test ! -f $MANPAGE_RENAMES ; then
8877     { { echo "$as_me:8877: error: not a filename: $MANPAGE_RENAMES" >&5
8878 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8879    { (exit 1); exit 1; }; }
8880   fi
8881
8882   test ! -d man && mkdir man
8883
8884   # Construct a sed-script to perform renaming within man-pages
8885   if test -n "$MANPAGE_RENAMES" ; then
8886     test ! -d man && mkdir man
8887     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8888   fi
8889 fi
8890
8891 echo "$as_me:8891: result: $MANPAGE_RENAMES" >&5
8892 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8893
8894 echo "$as_me:8894: checking if manpage aliases will be installed" >&5
8895 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8896
8897 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8898 if test "${with_manpage_aliases+set}" = set; then
8899   withval="$with_manpage_aliases"
8900   MANPAGE_ALIASES=$withval
8901 else
8902   MANPAGE_ALIASES=yes
8903 fi;
8904
8905 echo "$as_me:8905: result: $MANPAGE_ALIASES" >&5
8906 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8907
8908 if test "$LN_S" = "ln -s"; then
8909         cf_use_symlinks=yes
8910 else
8911         cf_use_symlinks=no
8912 fi
8913
8914 MANPAGE_SYMLINKS=no
8915 if test "$MANPAGE_ALIASES" = yes ; then
8916 echo "$as_me:8916: checking if manpage symlinks should be used" >&5
8917 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8918
8919 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8920 if test "${with_manpage_symlinks+set}" = set; then
8921   withval="$with_manpage_symlinks"
8922   MANPAGE_SYMLINKS=$withval
8923 else
8924   MANPAGE_SYMLINKS=$cf_use_symlinks
8925 fi;
8926
8927 if test "$$cf_use_symlinks" = no; then
8928 if test "$MANPAGE_SYMLINKS" = yes ; then
8929         { echo "$as_me:8929: WARNING: cannot make symlinks" >&5
8930 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8931         MANPAGE_SYMLINKS=no
8932 fi
8933 fi
8934
8935 echo "$as_me:8935: result: $MANPAGE_SYMLINKS" >&5
8936 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8937 fi
8938
8939 echo "$as_me:8939: checking for manpage tbl" >&5
8940 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8941
8942 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8943 if test "${with_manpage_tbl+set}" = set; then
8944   withval="$with_manpage_tbl"
8945   MANPAGE_TBL=$withval
8946 else
8947   MANPAGE_TBL=no
8948 fi;
8949
8950 echo "$as_me:8950: result: $MANPAGE_TBL" >&5
8951 echo "${ECHO_T}$MANPAGE_TBL" >&6
8952
8953   if test "$prefix" = "NONE" ; then
8954      cf_prefix="$ac_default_prefix"
8955   else
8956      cf_prefix="$prefix"
8957   fi
8958
8959   case "$MANPAGE_FORMAT" in # (vi
8960   *catonly*) # (vi
8961     cf_format=yes
8962     cf_inboth=no
8963     ;;
8964   *formatted*) # (vi
8965     cf_format=yes
8966     cf_inboth=yes
8967     ;;
8968   *)
8969     cf_format=no
8970     cf_inboth=no
8971     ;;
8972   esac
8973
8974 test ! -d man && mkdir man
8975
8976 cf_so_strip=
8977 cf_compress=
8978 case "$MANPAGE_FORMAT" in #(vi
8979 *compress*) #(vi
8980         cf_so_strip="Z"
8981         cf_compress=compress
8982   ;;
8983 *gzip*) #(vi
8984         cf_so_strip="gz"
8985         cf_compress=gzip
8986   ;;
8987 esac
8988
8989 cf_edit_man=./edit_man.sh
8990 cf_man_alias=`pwd`/man_alias.sed
8991
8992 cat >$cf_edit_man <<CF_EOF
8993 #! /bin/sh
8994 # this script is generated by the configure-script CF_MAN_PAGES macro.
8995
8996 prefix="$cf_prefix"
8997 datadir="$datadir"
8998
8999 NCURSES_MAJOR="$NCURSES_MAJOR"
9000 NCURSES_MINOR="$NCURSES_MINOR"
9001 NCURSES_PATCH="$NCURSES_PATCH"
9002
9003 NCURSES_OSPEED="$NCURSES_OSPEED"
9004 TERMINFO="$TERMINFO"
9005
9006 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9007
9008 INSTALL="$INSTALL"
9009 INSTALL_DATA="$INSTALL_DATA"
9010
9011 transform="$program_transform_name"
9012
9013 TMP=\${TMPDIR-/tmp}/man\$\$
9014 trap "rm -f \$TMP" 0 1 2 5 15
9015
9016 form=\$1
9017 shift || exit 1
9018
9019 verb=\$1
9020 shift || exit 1
9021
9022 mandir=\$1
9023 shift || exit 1
9024
9025 srcdir=\$1
9026 top_srcdir=\$srcdir/..
9027 shift || exit 1
9028
9029 if test "\$form" = normal ; then
9030         if test "$cf_format" = yes ; then
9031         if test "$cf_inboth" = no ; then
9032                 sh \$0 format \$verb \$mandir \$srcdir \$*
9033                 exit $?
9034         fi
9035         fi
9036         cf_subdir=\$mandir/man
9037         cf_tables=$MANPAGE_TBL
9038 else
9039         cf_subdir=\$mandir/cat
9040         cf_tables=yes
9041 fi
9042
9043 # process the list of source-files
9044 for i in \$* ; do
9045 case \$i in #(vi
9046 *.orig|*.rej) ;; #(vi
9047 *.[0-9]*)
9048         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9049         if test \$verb = installing ; then
9050         if test ! -d \$cf_subdir\${section} ; then
9051                 \$MKDIRS \$cf_subdir\$section
9052         fi
9053         fi
9054
9055         # replace variables in man page
9056         if test ! -f $cf_man_alias ; then
9057 cat >>$cf_man_alias <<-CF_EOF2
9058                 s,@DATADIR@,\$datadir,g
9059                 s,@TERMINFO@,\$TERMINFO,g
9060                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9061                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9062                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9063                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9064 CF_EOF
9065
9066         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9067         do
9068                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9069                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9070 cat >>$cf_edit_man <<-CF_EOF
9071                 s,@$cf_NAME@,$cf_name,
9072 CF_EOF
9073         done
9074
9075 cat >>$cf_edit_man <<CF_EOF
9076 CF_EOF2
9077                 echo "...made $cf_man_alias"
9078         fi
9079
9080         aliases=
9081         cf_source=\`basename \$i\`
9082         inalias=\$cf_source
9083         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9084         if test ! -f \$inalias ; then
9085                 echo .. skipped \$cf_source
9086                 continue
9087         fi
9088 CF_EOF
9089
9090 if test "$MANPAGE_ALIASES" != no ; then
9091 cat >>$cf_edit_man <<CF_EOF
9092         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9093 CF_EOF
9094 fi
9095
9096 if test "$MANPAGE_RENAMES" = no ; then
9097 cat >>$cf_edit_man <<CF_EOF
9098         # perform program transformations for section 1 man pages
9099         if test \$section = 1 ; then
9100                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9101         else
9102                 cf_target=\$cf_subdir\${section}/\$cf_source
9103         fi
9104 CF_EOF
9105 else
9106 cat >>$cf_edit_man <<CF_EOF
9107         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9108         if test -z "\$cf_target" ; then
9109                 echo '? missing rename for '\$cf_source
9110                 cf_target="\$cf_source"
9111         fi
9112         cf_target="\$cf_subdir\${section}/\${cf_target}"
9113
9114 CF_EOF
9115 fi
9116
9117 cat >>$cf_edit_man <<CF_EOF
9118         sed     -f $cf_man_alias \\
9119 CF_EOF
9120
9121 if test -f $MANPAGE_RENAMES ; then
9122 cat >>$cf_edit_man <<CF_EOF
9123                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9124 CF_EOF
9125 else
9126 cat >>$cf_edit_man <<CF_EOF
9127                 < \$i >\$TMP
9128 CF_EOF
9129 fi
9130
9131 cat >>$cf_edit_man <<CF_EOF
9132 if test \$cf_tables = yes ; then
9133         tbl \$TMP >\$TMP.out
9134         mv \$TMP.out \$TMP
9135 fi
9136 CF_EOF
9137
9138 if test $with_curses_h != yes ; then
9139 cat >>$cf_edit_man <<CF_EOF
9140         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9141         mv \$TMP.out \$TMP
9142 CF_EOF
9143 fi
9144
9145 cat >>$cf_edit_man <<CF_EOF
9146         if test \$form = format ; then
9147                 nroff -man \$TMP >\$TMP.out
9148                 mv \$TMP.out \$TMP
9149         fi
9150 CF_EOF
9151
9152 if test -n "$cf_compress" ; then
9153 cat >>$cf_edit_man <<CF_EOF
9154         if test \$verb = installing ; then
9155         if ( $cf_compress -f \$TMP )
9156         then
9157                 mv \$TMP.$cf_so_strip \$TMP
9158         fi
9159         fi
9160         cf_target="\$cf_target.$cf_so_strip"
9161 CF_EOF
9162 fi
9163
9164 case "$MANPAGE_FORMAT" in #(vi
9165 *BSDI*)
9166 cat >>$cf_edit_man <<CF_EOF
9167         if test \$form = format ; then
9168                 # BSDI installs only .0 suffixes in the cat directories
9169                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9170         fi
9171 CF_EOF
9172   ;;
9173 esac
9174
9175 cat >>$cf_edit_man <<CF_EOF
9176         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9177         if test \$verb = installing ; then
9178                 echo \$verb \$cf_target
9179                 \$INSTALL_DATA \$TMP \$cf_target
9180                 test -d \$cf_subdir\${section} &&
9181                 test -n "\$aliases" && (
9182                         cd \$cf_subdir\${section} && (
9183                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9184                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9185                                 cf_target=\`basename \$cf_target\`
9186                                 for cf_alias in \$aliases
9187                                 do
9188                                         if test \$section = 1 ; then
9189                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9190                                         fi
9191
9192                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9193                                                 if test -f \$cf_alias\${suffix} ; then
9194                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9195                                                         then
9196                                                                 continue
9197                                                         fi
9198                                                 fi
9199                                                 echo .. \$verb alias \$cf_alias\${suffix}
9200                                                 rm -f \$cf_alias\${suffix}
9201                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9202                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9203                                                 echo ".so \$cf_source" >\$TMP
9204 CF_EOF
9205 if test -n "$cf_compress" ; then
9206 cat >>$cf_edit_man <<CF_EOF
9207                                                 if test -n "$cf_so_strip" ; then
9208                                                         $cf_compress -f \$TMP
9209                                                         mv \$TMP.$cf_so_strip \$TMP
9210                                                 fi
9211 CF_EOF
9212 fi
9213 cat >>$cf_edit_man <<CF_EOF
9214                                                 echo .. \$verb alias \$cf_alias\${suffix}
9215                                                 rm -f \$cf_alias\${suffix}
9216                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9217                                         fi
9218                                 done
9219                         )
9220                 )
9221         elif test \$verb = removing ; then
9222                 test -f \$cf_target && (
9223                         echo \$verb \$cf_target
9224                         rm -f \$cf_target
9225                 )
9226                 test -d \$cf_subdir\${section} &&
9227                 test -n "\$aliases" && (
9228                         cd \$cf_subdir\${section} && (
9229                                 for cf_alias in \$aliases
9230                                 do
9231                                         if test \$section = 1 ; then
9232                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9233                                         fi
9234
9235                                         echo .. \$verb alias \$cf_alias\${suffix}
9236                                         rm -f \$cf_alias\${suffix}
9237                                 done
9238                         )
9239                 )
9240         else
9241 #               echo ".hy 0"
9242                 cat \$TMP
9243         fi
9244         ;;
9245 esac
9246 done
9247
9248 if test $cf_inboth = yes ; then
9249 if test \$form != format ; then
9250         sh \$0 format \$verb \$mandir \$srcdir \$*
9251 fi
9252 fi
9253
9254 exit 0
9255 CF_EOF
9256 chmod 755 $cf_edit_man
9257
9258 ###############################################################################
9259
9260 ### Note that some functions (such as const) are normally disabled anyway.
9261 echo "$as_me:9261: checking if you want to build with function extensions" >&5
9262 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9263
9264 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9265 if test "${enable_ext_funcs+set}" = set; then
9266   enableval="$enable_ext_funcs"
9267   with_ext_funcs=$enableval
9268 else
9269   with_ext_funcs=yes
9270 fi;
9271 echo "$as_me:9271: result: $with_ext_funcs" >&5
9272 echo "${ECHO_T}$with_ext_funcs" >&6
9273 if test "$with_ext_funcs" = yes ; then
9274         NCURSES_EXT_FUNCS=1
9275         cat >>confdefs.h <<\EOF
9276 #define HAVE_CURSES_VERSION 1
9277 EOF
9278
9279         cat >>confdefs.h <<\EOF
9280 #define HAVE_HAS_KEY 1
9281 EOF
9282
9283         cat >>confdefs.h <<\EOF
9284 #define HAVE_RESIZETERM 1
9285 EOF
9286
9287         cat >>confdefs.h <<\EOF
9288 #define HAVE_RESIZE_TERM 1
9289 EOF
9290
9291         cat >>confdefs.h <<\EOF
9292 #define HAVE_USE_DEFAULT_COLORS 1
9293 EOF
9294
9295         cat >>confdefs.h <<\EOF
9296 #define HAVE_WRESIZE 1
9297 EOF
9298
9299         cat >>confdefs.h <<\EOF
9300 #define NCURSES_EXT_FUNCS 1
9301 EOF
9302
9303         GENERATED_EXT_FUNCS=generated
9304 else
9305         NCURSES_EXT_FUNCS=0
9306         GENERATED_EXT_FUNCS=
9307 fi
9308
9309 ###   use option --enable-const to turn on use of const beyond that in XSI.
9310 echo "$as_me:9310: checking for extended use of const keyword" >&5
9311 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9312
9313 # Check whether --enable-const or --disable-const was given.
9314 if test "${enable_const+set}" = set; then
9315   enableval="$enable_const"
9316   with_ext_const=$enableval
9317 else
9318   with_ext_const=no
9319 fi;
9320 echo "$as_me:9320: result: $with_ext_const" >&5
9321 echo "${ECHO_T}$with_ext_const" >&6
9322 NCURSES_CONST='/*nothing*/'
9323 if test "$with_ext_const" = yes ; then
9324         NCURSES_CONST=const
9325 fi
9326
9327 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9328 echo "$as_me:9328: checking if you want to use extended colors" >&5
9329 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9330
9331 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9332 if test "${enable_ext_colors+set}" = set; then
9333   enableval="$enable_ext_colors"
9334   with_ext_colors=$enableval
9335 else
9336   with_ext_colors=no
9337 fi;
9338 echo "$as_me:9338: result: $with_ext_colors" >&5
9339 echo "${ECHO_T}$with_ext_colors" >&6
9340 NCURSES_EXT_COLORS=0
9341 if test "$with_ext_colors" = yes ; then
9342         if test "$with_widec" != yes ; then
9343                 { { echo "$as_me:9343: error: This option applies only to wide-character library" >&5
9344 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9345    { (exit 1); exit 1; }; }
9346         else
9347                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9348
9349 if test "${with_abi_version+set}" != set; then
9350         case $cf_cv_rel_version in
9351         5.*)
9352                 cf_cv_rel_version=6.0
9353                 cf_cv_abi_version=6
9354                 { echo "$as_me:9354: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9355 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9356                 ;;
9357         esac
9358 fi
9359
9360         fi
9361         NCURSES_EXT_COLORS=1
9362         cat >>confdefs.h <<\EOF
9363 #define NCURSES_EXT_COLORS 1
9364 EOF
9365
9366 fi
9367
9368 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9369 echo "$as_me:9369: checking if you want to use extended mouse encoding" >&5
9370 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9371
9372 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9373 if test "${enable_ext_mouse+set}" = set; then
9374   enableval="$enable_ext_mouse"
9375   with_ext_mouse=$enableval
9376 else
9377   with_ext_mouse=no
9378 fi;
9379 echo "$as_me:9379: result: $with_ext_mouse" >&5
9380 echo "${ECHO_T}$with_ext_mouse" >&6
9381 NCURSES_MOUSE_VERSION=1
9382 if test "$with_ext_mouse" = yes ; then
9383         NCURSES_MOUSE_VERSION=2
9384
9385 if test "${with_abi_version+set}" != set; then
9386         case $cf_cv_rel_version in
9387         5.*)
9388                 cf_cv_rel_version=6.0
9389                 cf_cv_abi_version=6
9390                 { echo "$as_me:9390: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9391 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9392                 ;;
9393         esac
9394 fi
9395
9396 fi
9397
9398 echo "$as_me:9398: checking if you want \$NCURSES_NO_PADDING code" >&5
9399 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9400
9401 # Check whether --enable-no-padding or --disable-no-padding was given.
9402 if test "${enable_no_padding+set}" = set; then
9403   enableval="$enable_no_padding"
9404   with_no_padding=$enableval
9405 else
9406   with_no_padding=$with_ext_funcs
9407 fi;
9408 echo "$as_me:9408: result: $with_no_padding" >&5
9409 echo "${ECHO_T}$with_no_padding" >&6
9410 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9411 #define NCURSES_NO_PADDING 1
9412 EOF
9413
9414 echo "$as_me:9414: checking for ANSI C header files" >&5
9415 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9416 if test "${ac_cv_header_stdc+set}" = set; then
9417   echo $ECHO_N "(cached) $ECHO_C" >&6
9418 else
9419   cat >conftest.$ac_ext <<_ACEOF
9420 #line 9420 "configure"
9421 #include "confdefs.h"
9422 #include <stdlib.h>
9423 #include <stdarg.h>
9424 #include <string.h>
9425 #include <float.h>
9426
9427 _ACEOF
9428 if { (eval echo "$as_me:9428: \"$ac_cpp conftest.$ac_ext\"") >&5
9429   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9430   ac_status=$?
9431   egrep -v '^ *\+' conftest.er1 >conftest.err
9432   rm -f conftest.er1
9433   cat conftest.err >&5
9434   echo "$as_me:9434: \$? = $ac_status" >&5
9435   (exit $ac_status); } >/dev/null; then
9436   if test -s conftest.err; then
9437     ac_cpp_err=$ac_c_preproc_warn_flag
9438   else
9439     ac_cpp_err=
9440   fi
9441 else
9442   ac_cpp_err=yes
9443 fi
9444 if test -z "$ac_cpp_err"; then
9445   ac_cv_header_stdc=yes
9446 else
9447   echo "$as_me: failed program was:" >&5
9448   cat conftest.$ac_ext >&5
9449   ac_cv_header_stdc=no
9450 fi
9451 rm -f conftest.err conftest.$ac_ext
9452
9453 if test $ac_cv_header_stdc = yes; then
9454   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9455   cat >conftest.$ac_ext <<_ACEOF
9456 #line 9456 "configure"
9457 #include "confdefs.h"
9458 #include <string.h>
9459
9460 _ACEOF
9461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9462   egrep "memchr" >/dev/null 2>&1; then
9463   :
9464 else
9465   ac_cv_header_stdc=no
9466 fi
9467 rm -f conftest*
9468
9469 fi
9470
9471 if test $ac_cv_header_stdc = yes; then
9472   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9473   cat >conftest.$ac_ext <<_ACEOF
9474 #line 9474 "configure"
9475 #include "confdefs.h"
9476 #include <stdlib.h>
9477
9478 _ACEOF
9479 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9480   egrep "free" >/dev/null 2>&1; then
9481   :
9482 else
9483   ac_cv_header_stdc=no
9484 fi
9485 rm -f conftest*
9486
9487 fi
9488
9489 if test $ac_cv_header_stdc = yes; then
9490   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9491   if test "$cross_compiling" = yes; then
9492   :
9493 else
9494   cat >conftest.$ac_ext <<_ACEOF
9495 #line 9495 "configure"
9496 #include "confdefs.h"
9497 #include <ctype.h>
9498 #if ((' ' & 0x0FF) == 0x020)
9499 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9500 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9501 #else
9502 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9503                      || ('j' <= (c) && (c) <= 'r') \
9504                      || ('s' <= (c) && (c) <= 'z'))
9505 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9506 #endif
9507
9508 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9509 int
9510 main ()
9511 {
9512   int i;
9513   for (i = 0; i < 256; i++)
9514     if (XOR (islower (i), ISLOWER (i))
9515         || toupper (i) != TOUPPER (i))
9516       $ac_main_return(2);
9517   $ac_main_return (0);
9518 }
9519 _ACEOF
9520 rm -f conftest$ac_exeext
9521 if { (eval echo "$as_me:9521: \"$ac_link\"") >&5
9522   (eval $ac_link) 2>&5
9523   ac_status=$?
9524   echo "$as_me:9524: \$? = $ac_status" >&5
9525   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9526   { (eval echo "$as_me:9526: \"$ac_try\"") >&5
9527   (eval $ac_try) 2>&5
9528   ac_status=$?
9529   echo "$as_me:9529: \$? = $ac_status" >&5
9530   (exit $ac_status); }; }; then
9531   :
9532 else
9533   echo "$as_me: program exited with status $ac_status" >&5
9534 echo "$as_me: failed program was:" >&5
9535 cat conftest.$ac_ext >&5
9536 ac_cv_header_stdc=no
9537 fi
9538 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9539 fi
9540 fi
9541 fi
9542 echo "$as_me:9542: result: $ac_cv_header_stdc" >&5
9543 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9544 if test $ac_cv_header_stdc = yes; then
9545
9546 cat >>confdefs.h <<\EOF
9547 #define STDC_HEADERS 1
9548 EOF
9549
9550 fi
9551
9552 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9553
9554 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9555                   inttypes.h stdint.h unistd.h
9556 do
9557 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9558 echo "$as_me:9558: checking for $ac_header" >&5
9559 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9560 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9561   echo $ECHO_N "(cached) $ECHO_C" >&6
9562 else
9563   cat >conftest.$ac_ext <<_ACEOF
9564 #line 9564 "configure"
9565 #include "confdefs.h"
9566 $ac_includes_default
9567 #include <$ac_header>
9568 _ACEOF
9569 rm -f conftest.$ac_objext
9570 if { (eval echo "$as_me:9570: \"$ac_compile\"") >&5
9571   (eval $ac_compile) 2>&5
9572   ac_status=$?
9573   echo "$as_me:9573: \$? = $ac_status" >&5
9574   (exit $ac_status); } &&
9575          { ac_try='test -s conftest.$ac_objext'
9576   { (eval echo "$as_me:9576: \"$ac_try\"") >&5
9577   (eval $ac_try) 2>&5
9578   ac_status=$?
9579   echo "$as_me:9579: \$? = $ac_status" >&5
9580   (exit $ac_status); }; }; then
9581   eval "$as_ac_Header=yes"
9582 else
9583   echo "$as_me: failed program was:" >&5
9584 cat conftest.$ac_ext >&5
9585 eval "$as_ac_Header=no"
9586 fi
9587 rm -f conftest.$ac_objext conftest.$ac_ext
9588 fi
9589 echo "$as_me:9589: result: `eval echo '${'$as_ac_Header'}'`" >&5
9590 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9591 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9592   cat >>confdefs.h <<EOF
9593 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9594 EOF
9595
9596 fi
9597 done
9598
9599 echo "$as_me:9599: checking for signed char" >&5
9600 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9601 if test "${ac_cv_type_signed_char+set}" = set; then
9602   echo $ECHO_N "(cached) $ECHO_C" >&6
9603 else
9604   cat >conftest.$ac_ext <<_ACEOF
9605 #line 9605 "configure"
9606 #include "confdefs.h"
9607 $ac_includes_default
9608 int
9609 main ()
9610 {
9611 if ((signed char *) 0)
9612   return 0;
9613 if (sizeof (signed char))
9614   return 0;
9615   ;
9616   return 0;
9617 }
9618 _ACEOF
9619 rm -f conftest.$ac_objext
9620 if { (eval echo "$as_me:9620: \"$ac_compile\"") >&5
9621   (eval $ac_compile) 2>&5
9622   ac_status=$?
9623   echo "$as_me:9623: \$? = $ac_status" >&5
9624   (exit $ac_status); } &&
9625          { ac_try='test -s conftest.$ac_objext'
9626   { (eval echo "$as_me:9626: \"$ac_try\"") >&5
9627   (eval $ac_try) 2>&5
9628   ac_status=$?
9629   echo "$as_me:9629: \$? = $ac_status" >&5
9630   (exit $ac_status); }; }; then
9631   ac_cv_type_signed_char=yes
9632 else
9633   echo "$as_me: failed program was:" >&5
9634 cat conftest.$ac_ext >&5
9635 ac_cv_type_signed_char=no
9636 fi
9637 rm -f conftest.$ac_objext conftest.$ac_ext
9638 fi
9639 echo "$as_me:9639: result: $ac_cv_type_signed_char" >&5
9640 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9641
9642 echo "$as_me:9642: checking size of signed char" >&5
9643 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9644 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9645   echo $ECHO_N "(cached) $ECHO_C" >&6
9646 else
9647   if test "$ac_cv_type_signed_char" = yes; then
9648   if test "$cross_compiling" = yes; then
9649   # Depending upon the size, compute the lo and hi bounds.
9650 cat >conftest.$ac_ext <<_ACEOF
9651 #line 9651 "configure"
9652 #include "confdefs.h"
9653 $ac_includes_default
9654 int
9655 main ()
9656 {
9657 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9658   ;
9659   return 0;
9660 }
9661 _ACEOF
9662 rm -f conftest.$ac_objext
9663 if { (eval echo "$as_me:9663: \"$ac_compile\"") >&5
9664   (eval $ac_compile) 2>&5
9665   ac_status=$?
9666   echo "$as_me:9666: \$? = $ac_status" >&5
9667   (exit $ac_status); } &&
9668          { ac_try='test -s conftest.$ac_objext'
9669   { (eval echo "$as_me:9669: \"$ac_try\"") >&5
9670   (eval $ac_try) 2>&5
9671   ac_status=$?
9672   echo "$as_me:9672: \$? = $ac_status" >&5
9673   (exit $ac_status); }; }; then
9674   ac_lo=0 ac_mid=0
9675   while :; do
9676     cat >conftest.$ac_ext <<_ACEOF
9677 #line 9677 "configure"
9678 #include "confdefs.h"
9679 $ac_includes_default
9680 int
9681 main ()
9682 {
9683 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9684   ;
9685   return 0;
9686 }
9687 _ACEOF
9688 rm -f conftest.$ac_objext
9689 if { (eval echo "$as_me:9689: \"$ac_compile\"") >&5
9690   (eval $ac_compile) 2>&5
9691   ac_status=$?
9692   echo "$as_me:9692: \$? = $ac_status" >&5
9693   (exit $ac_status); } &&
9694          { ac_try='test -s conftest.$ac_objext'
9695   { (eval echo "$as_me:9695: \"$ac_try\"") >&5
9696   (eval $ac_try) 2>&5
9697   ac_status=$?
9698   echo "$as_me:9698: \$? = $ac_status" >&5
9699   (exit $ac_status); }; }; then
9700   ac_hi=$ac_mid; break
9701 else
9702   echo "$as_me: failed program was:" >&5
9703 cat conftest.$ac_ext >&5
9704 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9705 fi
9706 rm -f conftest.$ac_objext conftest.$ac_ext
9707   done
9708 else
9709   echo "$as_me: failed program was:" >&5
9710 cat conftest.$ac_ext >&5
9711 ac_hi=-1 ac_mid=-1
9712   while :; do
9713     cat >conftest.$ac_ext <<_ACEOF
9714 #line 9714 "configure"
9715 #include "confdefs.h"
9716 $ac_includes_default
9717 int
9718 main ()
9719 {
9720 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9721   ;
9722   return 0;
9723 }
9724 _ACEOF
9725 rm -f conftest.$ac_objext
9726 if { (eval echo "$as_me:9726: \"$ac_compile\"") >&5
9727   (eval $ac_compile) 2>&5
9728   ac_status=$?
9729   echo "$as_me:9729: \$? = $ac_status" >&5
9730   (exit $ac_status); } &&
9731          { ac_try='test -s conftest.$ac_objext'
9732   { (eval echo "$as_me:9732: \"$ac_try\"") >&5
9733   (eval $ac_try) 2>&5
9734   ac_status=$?
9735   echo "$as_me:9735: \$? = $ac_status" >&5
9736   (exit $ac_status); }; }; then
9737   ac_lo=$ac_mid; break
9738 else
9739   echo "$as_me: failed program was:" >&5
9740 cat conftest.$ac_ext >&5
9741 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9742 fi
9743 rm -f conftest.$ac_objext conftest.$ac_ext
9744   done
9745 fi
9746 rm -f conftest.$ac_objext conftest.$ac_ext
9747 # Binary search between lo and hi bounds.
9748 while test "x$ac_lo" != "x$ac_hi"; do
9749   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9750   cat >conftest.$ac_ext <<_ACEOF
9751 #line 9751 "configure"
9752 #include "confdefs.h"
9753 $ac_includes_default
9754 int
9755 main ()
9756 {
9757 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9758   ;
9759   return 0;
9760 }
9761 _ACEOF
9762 rm -f conftest.$ac_objext
9763 if { (eval echo "$as_me:9763: \"$ac_compile\"") >&5
9764   (eval $ac_compile) 2>&5
9765   ac_status=$?
9766   echo "$as_me:9766: \$? = $ac_status" >&5
9767   (exit $ac_status); } &&
9768          { ac_try='test -s conftest.$ac_objext'
9769   { (eval echo "$as_me:9769: \"$ac_try\"") >&5
9770   (eval $ac_try) 2>&5
9771   ac_status=$?
9772   echo "$as_me:9772: \$? = $ac_status" >&5
9773   (exit $ac_status); }; }; then
9774   ac_hi=$ac_mid
9775 else
9776   echo "$as_me: failed program was:" >&5
9777 cat conftest.$ac_ext >&5
9778 ac_lo=`expr $ac_mid + 1`
9779 fi
9780 rm -f conftest.$ac_objext conftest.$ac_ext
9781 done
9782 ac_cv_sizeof_signed_char=$ac_lo
9783 else
9784   if test "$cross_compiling" = yes; then
9785   { { echo "$as_me:9785: error: cannot run test program while cross compiling" >&5
9786 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9787    { (exit 1); exit 1; }; }
9788 else
9789   cat >conftest.$ac_ext <<_ACEOF
9790 #line 9790 "configure"
9791 #include "confdefs.h"
9792 $ac_includes_default
9793 int
9794 main ()
9795 {
9796 FILE *f = fopen ("conftest.val", "w");
9797 if (!f)
9798   $ac_main_return (1);
9799 fprintf (f, "%d", (sizeof (signed char)));
9800 fclose (f);
9801   ;
9802   return 0;
9803 }
9804 _ACEOF
9805 rm -f conftest$ac_exeext
9806 if { (eval echo "$as_me:9806: \"$ac_link\"") >&5
9807   (eval $ac_link) 2>&5
9808   ac_status=$?
9809   echo "$as_me:9809: \$? = $ac_status" >&5
9810   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9811   { (eval echo "$as_me:9811: \"$ac_try\"") >&5
9812   (eval $ac_try) 2>&5
9813   ac_status=$?
9814   echo "$as_me:9814: \$? = $ac_status" >&5
9815   (exit $ac_status); }; }; then
9816   ac_cv_sizeof_signed_char=`cat conftest.val`
9817 else
9818   echo "$as_me: program exited with status $ac_status" >&5
9819 echo "$as_me: failed program was:" >&5
9820 cat conftest.$ac_ext >&5
9821 fi
9822 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9823 fi
9824 fi
9825 rm -f conftest.val
9826 else
9827   ac_cv_sizeof_signed_char=0
9828 fi
9829 fi
9830 echo "$as_me:9830: result: $ac_cv_sizeof_signed_char" >&5
9831 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9832 cat >>confdefs.h <<EOF
9833 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9834 EOF
9835
9836 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9837         NCURSES_SBOOL="signed char"
9838 else
9839         NCURSES_SBOOL="char"
9840 fi
9841 echo "$as_me:9841: checking if you want to use signed Boolean array in term.h" >&5
9842 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9843
9844 # Check whether --enable-signed-char or --disable-signed-char was given.
9845 if test "${enable_signed_char+set}" = set; then
9846   enableval="$enable_signed_char"
9847   with_signed_char=$enableval
9848 else
9849   with_signed_char=no
9850 fi;
9851 echo "$as_me:9851: result: $with_signed_char" >&5
9852 echo "${ECHO_T}$with_signed_char" >&6
9853 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9854
9855 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9856 echo "$as_me:9856: checking if you want SIGWINCH handler" >&5
9857 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9858
9859 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9860 if test "${enable_sigwinch+set}" = set; then
9861   enableval="$enable_sigwinch"
9862   with_sigwinch=$enableval
9863 else
9864   with_sigwinch=$with_ext_funcs
9865 fi;
9866 echo "$as_me:9866: result: $with_sigwinch" >&5
9867 echo "${ECHO_T}$with_sigwinch" >&6
9868 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9869 #define USE_SIGWINCH 1
9870 EOF
9871
9872 ###   use option --enable-tcap-names to allow user to define new capabilities
9873 echo "$as_me:9873: checking if you want user-definable terminal capabilities like termcap" >&5
9874 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9875
9876 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9877 if test "${enable_tcap_names+set}" = set; then
9878   enableval="$enable_tcap_names"
9879   with_tcap_names=$enableval
9880 else
9881   with_tcap_names=$with_ext_funcs
9882 fi;
9883 echo "$as_me:9883: result: $with_tcap_names" >&5
9884 echo "${ECHO_T}$with_tcap_names" >&6
9885 NCURSES_XNAMES=0
9886 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9887
9888 ###############################################################################
9889 # These options are relatively safe to experiment with.
9890
9891 echo "$as_me:9891: checking if you want all development code" >&5
9892 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9893
9894 # Check whether --with-develop or --without-develop was given.
9895 if test "${with_develop+set}" = set; then
9896   withval="$with_develop"
9897   with_develop=$withval
9898 else
9899   with_develop=no
9900 fi;
9901 echo "$as_me:9901: result: $with_develop" >&5
9902 echo "${ECHO_T}$with_develop" >&6
9903
9904 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9905 echo "$as_me:9905: checking if you want hard-tabs code" >&5
9906 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9907
9908 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9909 if test "${enable_hard_tabs+set}" = set; then
9910   enableval="$enable_hard_tabs"
9911
9912 else
9913   enable_hard_tabs=$with_develop
9914 fi;
9915 echo "$as_me:9915: result: $enable_hard_tabs" >&5
9916 echo "${ECHO_T}$enable_hard_tabs" >&6
9917 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9918 #define USE_HARD_TABS 1
9919 EOF
9920
9921 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9922 echo "$as_me:9922: checking if you want limited support for xmc" >&5
9923 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9924
9925 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9926 if test "${enable_xmc_glitch+set}" = set; then
9927   enableval="$enable_xmc_glitch"
9928
9929 else
9930   enable_xmc_glitch=$with_develop
9931 fi;
9932 echo "$as_me:9932: result: $enable_xmc_glitch" >&5
9933 echo "${ECHO_T}$enable_xmc_glitch" >&6
9934 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9935 #define USE_XMC_SUPPORT 1
9936 EOF
9937
9938 ###############################################################################
9939 # These are just experimental, probably should not be in a package:
9940
9941 echo "$as_me:9941: checking if you do not want to assume colors are white-on-black" >&5
9942 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9943
9944 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9945 if test "${enable_assumed_color+set}" = set; then
9946   enableval="$enable_assumed_color"
9947   with_assumed_color=$enableval
9948 else
9949   with_assumed_color=yes
9950 fi;
9951 echo "$as_me:9951: result: $with_assumed_color" >&5
9952 echo "${ECHO_T}$with_assumed_color" >&6
9953 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
9954 #define USE_ASSUMED_COLOR 1
9955 EOF
9956
9957 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
9958 echo "$as_me:9958: checking if you want hashmap scrolling-optimization code" >&5
9959 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
9960
9961 # Check whether --enable-hashmap or --disable-hashmap was given.
9962 if test "${enable_hashmap+set}" = set; then
9963   enableval="$enable_hashmap"
9964   with_hashmap=$enableval
9965 else
9966   with_hashmap=yes
9967 fi;
9968 echo "$as_me:9968: result: $with_hashmap" >&5
9969 echo "${ECHO_T}$with_hashmap" >&6
9970 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
9971 #define USE_HASHMAP 1
9972 EOF
9973
9974 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
9975 echo "$as_me:9975: checking if you want colorfgbg code" >&5
9976 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
9977
9978 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
9979 if test "${enable_colorfgbg+set}" = set; then
9980   enableval="$enable_colorfgbg"
9981   with_colorfgbg=$enableval
9982 else
9983   with_colorfgbg=no
9984 fi;
9985 echo "$as_me:9985: result: $with_colorfgbg" >&5
9986 echo "${ECHO_T}$with_colorfgbg" >&6
9987 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
9988 #define USE_COLORFGBG 1
9989 EOF
9990
9991 # This is still experimental (20080329), but should ultimately be moved to
9992 # the script-block --with-normal, etc.
9993
9994 echo "$as_me:9994: checking if you want to link with the pthread library" >&5
9995 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
9996
9997 # Check whether --with-pthread or --without-pthread was given.
9998 if test "${with_pthread+set}" = set; then
9999   withval="$with_pthread"
10000   with_pthread=$withval
10001 else
10002   with_pthread=no
10003 fi;
10004 echo "$as_me:10004: result: $with_pthread" >&5
10005 echo "${ECHO_T}$with_pthread" >&6
10006
10007 if test "$with_pthread" != no ; then
10008     echo "$as_me:10008: checking for pthread.h" >&5
10009 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10010 if test "${ac_cv_header_pthread_h+set}" = set; then
10011   echo $ECHO_N "(cached) $ECHO_C" >&6
10012 else
10013   cat >conftest.$ac_ext <<_ACEOF
10014 #line 10014 "configure"
10015 #include "confdefs.h"
10016 #include <pthread.h>
10017 _ACEOF
10018 if { (eval echo "$as_me:10018: \"$ac_cpp conftest.$ac_ext\"") >&5
10019   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10020   ac_status=$?
10021   egrep -v '^ *\+' conftest.er1 >conftest.err
10022   rm -f conftest.er1
10023   cat conftest.err >&5
10024   echo "$as_me:10024: \$? = $ac_status" >&5
10025   (exit $ac_status); } >/dev/null; then
10026   if test -s conftest.err; then
10027     ac_cpp_err=$ac_c_preproc_warn_flag
10028   else
10029     ac_cpp_err=
10030   fi
10031 else
10032   ac_cpp_err=yes
10033 fi
10034 if test -z "$ac_cpp_err"; then
10035   ac_cv_header_pthread_h=yes
10036 else
10037   echo "$as_me: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   ac_cv_header_pthread_h=no
10040 fi
10041 rm -f conftest.err conftest.$ac_ext
10042 fi
10043 echo "$as_me:10043: result: $ac_cv_header_pthread_h" >&5
10044 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10045 if test $ac_cv_header_pthread_h = yes; then
10046
10047         cat >>confdefs.h <<\EOF
10048 #define HAVE_PTHREADS_H 1
10049 EOF
10050
10051         echo "$as_me:10051: checking if we can link with the pthread library" >&5
10052 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10053         cf_save_LIBS="$LIBS"
10054         LIBS="-lpthread $LIBS"
10055         cat >conftest.$ac_ext <<_ACEOF
10056 #line 10056 "configure"
10057 #include "confdefs.h"
10058
10059 #include <pthread.h>
10060
10061 int
10062 main ()
10063 {
10064
10065         int rc = pthread_create(0,0,0,0);
10066
10067   ;
10068   return 0;
10069 }
10070 _ACEOF
10071 rm -f conftest.$ac_objext conftest$ac_exeext
10072 if { (eval echo "$as_me:10072: \"$ac_link\"") >&5
10073   (eval $ac_link) 2>&5
10074   ac_status=$?
10075   echo "$as_me:10075: \$? = $ac_status" >&5
10076   (exit $ac_status); } &&
10077          { ac_try='test -s conftest$ac_exeext'
10078   { (eval echo "$as_me:10078: \"$ac_try\"") >&5
10079   (eval $ac_try) 2>&5
10080   ac_status=$?
10081   echo "$as_me:10081: \$? = $ac_status" >&5
10082   (exit $ac_status); }; }; then
10083   with_pthread=yes
10084 else
10085   echo "$as_me: failed program was:" >&5
10086 cat conftest.$ac_ext >&5
10087 with_pthread=no
10088 fi
10089 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10090         LIBS="$cf_save_LIBS"
10091         echo "$as_me:10091: result: $with_pthread" >&5
10092 echo "${ECHO_T}$with_pthread" >&6
10093
10094         if test "$with_pthread" = yes ; then
10095             LIBS="-lpthread $LIBS"
10096             cat >>confdefs.h <<\EOF
10097 #define HAVE_LIBPTHREADS 1
10098 EOF
10099
10100         else
10101             { { echo "$as_me:10101: error: Cannot link with pthread library" >&5
10102 echo "$as_me: error: Cannot link with pthread library" >&2;}
10103    { (exit 1); exit 1; }; }
10104         fi
10105
10106 fi
10107
10108 fi
10109
10110 echo "$as_me:10110: checking if you want to use weak-symbols for pthreads" >&5
10111 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10112
10113 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10114 if test "${enable_weak_symbols+set}" = set; then
10115   enableval="$enable_weak_symbols"
10116   use_weak_symbols=$withval
10117 else
10118   use_weak_symbols=no
10119 fi;
10120 echo "$as_me:10120: result: $use_weak_symbols" >&5
10121 echo "${ECHO_T}$use_weak_symbols" >&6
10122 if test "$use_weak_symbols" = yes ; then
10123
10124 echo "$as_me:10124: checking if $CC supports weak symbols" >&5
10125 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10126 if test "${cf_cv_weak_symbols+set}" = set; then
10127   echo $ECHO_N "(cached) $ECHO_C" >&6
10128 else
10129
10130 cat >conftest.$ac_ext <<_ACEOF
10131 #line 10131 "configure"
10132 #include "confdefs.h"
10133
10134 #include <stdio.h>
10135 int
10136 main ()
10137 {
10138
10139 #if defined(__GNUC__)
10140 #  if defined __USE_ISOC99
10141 #    define _cat_pragma(exp)    _Pragma(#exp)
10142 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10143 #  else
10144 #    define _weak_pragma(exp)
10145 #  endif
10146 #  define _declare(name)        __extension__ extern __typeof__(name) name
10147 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10148 #endif
10149
10150 weak_symbol(fopen);
10151
10152   ;
10153   return 0;
10154 }
10155 _ACEOF
10156 rm -f conftest.$ac_objext
10157 if { (eval echo "$as_me:10157: \"$ac_compile\"") >&5
10158   (eval $ac_compile) 2>&5
10159   ac_status=$?
10160   echo "$as_me:10160: \$? = $ac_status" >&5
10161   (exit $ac_status); } &&
10162          { ac_try='test -s conftest.$ac_objext'
10163   { (eval echo "$as_me:10163: \"$ac_try\"") >&5
10164   (eval $ac_try) 2>&5
10165   ac_status=$?
10166   echo "$as_me:10166: \$? = $ac_status" >&5
10167   (exit $ac_status); }; }; then
10168   cf_cv_weak_symbols=yes
10169 else
10170   echo "$as_me: failed program was:" >&5
10171 cat conftest.$ac_ext >&5
10172 cf_cv_weak_symbols=no
10173 fi
10174 rm -f conftest.$ac_objext conftest.$ac_ext
10175
10176 fi
10177 echo "$as_me:10177: result: $cf_cv_weak_symbols" >&5
10178 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10179
10180 else
10181     cf_cv_weak_symbols=no
10182 fi
10183
10184 if test $cf_cv_weak_symbols = yes ; then
10185     cat >>confdefs.h <<\EOF
10186 #define USE_WEAK_SYMBOLS 1
10187 EOF
10188
10189 fi
10190
10191 PTHREAD=
10192 if test "$with_pthread" = "yes" ; then
10193     cat >>confdefs.h <<\EOF
10194 #define USE_PTHREADS 1
10195 EOF
10196
10197     enable_reentrant=yes
10198     if test $cf_cv_weak_symbols = yes ; then
10199         PTHREAD=-lpthread
10200     fi
10201 fi
10202
10203 # Reentrant code has to be opaque; there's little advantage to making ncurses
10204 # opaque outside of that, so there is no --enable-opaque option.  We can use
10205 # this option without --with-pthreads, but this will be always set for
10206 # pthreads.
10207 echo "$as_me:10207: checking if you want experimental reentrant code" >&5
10208 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10209
10210 # Check whether --enable-reentrant or --disable-reentrant was given.
10211 if test "${enable_reentrant+set}" = set; then
10212   enableval="$enable_reentrant"
10213   with_reentrant=$enableval
10214 else
10215   with_reentrant=no
10216 fi;
10217 echo "$as_me:10217: result: $with_reentrant" >&5
10218 echo "${ECHO_T}$with_reentrant" >&6
10219 if test "$with_reentrant" = yes ; then
10220         cf_cv_enable_reentrant=1
10221         cf_cv_enable_opaque="NCURSES_INTERNALS"
10222         NCURSES_OPAQUE=1
10223         NCURSES_SIZE_T=int
10224     if test $cf_cv_weak_symbols = yes ; then
10225
10226 # remove pthread library from $LIBS
10227 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10228
10229     else
10230         LIB_SUFFIX="t${LIB_SUFFIX}"
10231     fi
10232         cat >>confdefs.h <<\EOF
10233 #define USE_REENTRANT 1
10234 EOF
10235
10236 if test "${with_abi_version+set}" != set; then
10237         case $cf_cv_rel_version in
10238         5.*)
10239                 cf_cv_rel_version=6.0
10240                 cf_cv_abi_version=6
10241                 { echo "$as_me:10241: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10242 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10243                 ;;
10244         esac
10245 fi
10246
10247 else
10248         cf_cv_enable_reentrant=0
10249         cf_cv_enable_opaque="NCURSES_OPAQUE"
10250         NCURSES_OPAQUE=0
10251         NCURSES_SIZE_T=short
10252 fi
10253
10254 echo "$as_me:10254: checking if you want experimental safe-sprintf code" >&5
10255 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10256
10257 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10258 if test "${enable_safe_sprintf+set}" = set; then
10259   enableval="$enable_safe_sprintf"
10260   with_safe_sprintf=$enableval
10261 else
10262   with_safe_sprintf=no
10263 fi;
10264 echo "$as_me:10264: result: $with_safe_sprintf" >&5
10265 echo "${ECHO_T}$with_safe_sprintf" >&6
10266 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10267 #define USE_SAFE_SPRINTF 1
10268 EOF
10269
10270 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10271 # when hashmap is used scroll hints are useless
10272 if test "$with_hashmap" = no ; then
10273 echo "$as_me:10273: checking if you want to experiment without scrolling-hints code" >&5
10274 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10275
10276 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10277 if test "${enable_scroll_hints+set}" = set; then
10278   enableval="$enable_scroll_hints"
10279   with_scroll_hints=$enableval
10280 else
10281   with_scroll_hints=yes
10282 fi;
10283 echo "$as_me:10283: result: $with_scroll_hints" >&5
10284 echo "${ECHO_T}$with_scroll_hints" >&6
10285 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10286 #define USE_SCROLL_HINTS 1
10287 EOF
10288
10289 fi
10290
10291 echo "$as_me:10291: checking if you want experimental wgetch-events code" >&5
10292 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10293
10294 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10295 if test "${enable_wgetch_events+set}" = set; then
10296   enableval="$enable_wgetch_events"
10297   with_wgetch_events=$enableval
10298 else
10299   with_wgetch_events=no
10300 fi;
10301 echo "$as_me:10301: result: $with_wgetch_events" >&5
10302 echo "${ECHO_T}$with_wgetch_events" >&6
10303 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10304 #define NCURSES_WGETCH_EVENTS 1
10305 EOF
10306
10307 ###############################################################################
10308
10309 ###     use option --disable-echo to suppress full display compiling commands
10310 echo "$as_me:10310: checking if you want to display full commands during build" >&5
10311 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10312
10313 # Check whether --enable-echo or --disable-echo was given.
10314 if test "${enable_echo+set}" = set; then
10315   enableval="$enable_echo"
10316   with_echo=$enableval
10317 else
10318   with_echo=yes
10319 fi;
10320 if test "$with_echo" = yes; then
10321         ECHO_LINK=
10322 else
10323         ECHO_LINK='@ echo linking $@ ... ;'
10324         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10325         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10326 fi
10327 echo "$as_me:10327: result: $with_echo" >&5
10328 echo "${ECHO_T}$with_echo" >&6
10329
10330 ###     use option --enable-warnings to turn on all gcc warnings
10331 echo "$as_me:10331: checking if you want to see compiler warnings" >&5
10332 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10333
10334 # Check whether --enable-warnings or --disable-warnings was given.
10335 if test "${enable_warnings+set}" = set; then
10336   enableval="$enable_warnings"
10337   with_warnings=$enableval
10338 fi;
10339 echo "$as_me:10339: result: $with_warnings" >&5
10340 echo "${ECHO_T}$with_warnings" >&6
10341
10342 if test "x$with_warnings" = "xyes"; then
10343         ADAFLAGS="$ADAFLAGS -gnatg"
10344
10345 INTEL_COMPILER=no
10346
10347 if test "$GCC" = yes ; then
10348         case $host_os in
10349         linux*|gnu*)
10350                 echo "$as_me:10350: checking if this is really Intel C compiler" >&5
10351 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10352                 cf_save_CFLAGS="$CFLAGS"
10353                 CFLAGS="$CFLAGS -no-gcc"
10354                 cat >conftest.$ac_ext <<_ACEOF
10355 #line 10355 "configure"
10356 #include "confdefs.h"
10357
10358 int
10359 main ()
10360 {
10361
10362 #ifdef __INTEL_COMPILER
10363 #else
10364 make an error
10365 #endif
10366
10367   ;
10368   return 0;
10369 }
10370 _ACEOF
10371 rm -f conftest.$ac_objext
10372 if { (eval echo "$as_me:10372: \"$ac_compile\"") >&5
10373   (eval $ac_compile) 2>&5
10374   ac_status=$?
10375   echo "$as_me:10375: \$? = $ac_status" >&5
10376   (exit $ac_status); } &&
10377          { ac_try='test -s conftest.$ac_objext'
10378   { (eval echo "$as_me:10378: \"$ac_try\"") >&5
10379   (eval $ac_try) 2>&5
10380   ac_status=$?
10381   echo "$as_me:10381: \$? = $ac_status" >&5
10382   (exit $ac_status); }; }; then
10383   INTEL_COMPILER=yes
10384 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10385
10386 else
10387   echo "$as_me: failed program was:" >&5
10388 cat conftest.$ac_ext >&5
10389 fi
10390 rm -f conftest.$ac_objext conftest.$ac_ext
10391                 CFLAGS="$cf_save_CFLAGS"
10392                 echo "$as_me:10392: result: $INTEL_COMPILER" >&5
10393 echo "${ECHO_T}$INTEL_COMPILER" >&6
10394                 ;;
10395         esac
10396 fi
10397
10398 cat > conftest.$ac_ext <<EOF
10399 #line 10399 "${as_me-configure}"
10400 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10401 EOF
10402
10403 if test "$INTEL_COMPILER" = yes
10404 then
10405 # The "-wdXXX" options suppress warnings:
10406 # remark #1419: external declaration in primary source file
10407 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10408 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10409 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10410 # remark #193: zero used for undefined preprocessing identifier
10411 # remark #593: variable "curs_sb_left_arrow" was set but never used
10412 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10413 # remark #869: parameter "tw" was never referenced
10414 # remark #981: operands are evaluated in unspecified order
10415 # warning #269: invalid format string conversion
10416
10417         { echo "$as_me:10417: checking for $CC warning options..." >&5
10418 echo "$as_me: checking for $CC warning options..." >&6;}
10419         cf_save_CFLAGS="$CFLAGS"
10420         EXTRA_CFLAGS="-Wall"
10421         for cf_opt in \
10422                 wd1419 \
10423                 wd1682 \
10424                 wd1683 \
10425                 wd1684 \
10426                 wd193 \
10427                 wd279 \
10428                 wd593 \
10429                 wd810 \
10430                 wd869 \
10431                 wd981
10432         do
10433                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10434                 if { (eval echo "$as_me:10434: \"$ac_compile\"") >&5
10435   (eval $ac_compile) 2>&5
10436   ac_status=$?
10437   echo "$as_me:10437: \$? = $ac_status" >&5
10438   (exit $ac_status); }; then
10439                         test -n "$verbose" && echo "$as_me:10439: result: ... -$cf_opt" >&5
10440 echo "${ECHO_T}... -$cf_opt" >&6
10441                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10442                 fi
10443         done
10444         CFLAGS="$cf_save_CFLAGS"
10445
10446 elif test "$GCC" = yes
10447 then
10448         { echo "$as_me:10448: checking for $CC warning options..." >&5
10449 echo "$as_me: checking for $CC warning options..." >&6;}
10450         cf_save_CFLAGS="$CFLAGS"
10451         EXTRA_CFLAGS="-W -Wall"
10452         cf_warn_CONST=""
10453         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10454         for cf_opt in \
10455                 Wbad-function-cast \
10456                 Wcast-align \
10457                 Wcast-qual \
10458                 Winline \
10459                 Wmissing-declarations \
10460                 Wmissing-prototypes \
10461                 Wnested-externs \
10462                 Wpointer-arith \
10463                 Wshadow \
10464                 Wstrict-prototypes \
10465                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10466         do
10467                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10468                 if { (eval echo "$as_me:10468: \"$ac_compile\"") >&5
10469   (eval $ac_compile) 2>&5
10470   ac_status=$?
10471   echo "$as_me:10471: \$? = $ac_status" >&5
10472   (exit $ac_status); }; then
10473                         test -n "$verbose" && echo "$as_me:10473: result: ... -$cf_opt" >&5
10474 echo "${ECHO_T}... -$cf_opt" >&6
10475                         case $cf_opt in #(vi
10476                         Wcast-qual) #(vi
10477                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10478                                 ;;
10479                         Winline) #(vi
10480                                 case $GCC_VERSION in
10481                                 [34].*)
10482                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10483
10484 echo "${as_me-configure}:10484: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10485
10486                                         continue;;
10487                                 esac
10488                                 ;;
10489                         esac
10490                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10491                 fi
10492         done
10493         CFLAGS="$cf_save_CFLAGS"
10494 fi
10495 rm -f conftest*
10496
10497         if test "$cf_with_cxx" = yes ; then
10498
10499 INTEL_CPLUSPLUS=no
10500
10501 if test "$GCC" = yes ; then
10502         case $host_os in
10503         linux*|gnu*)
10504                 echo "$as_me:10504: checking if this is really Intel C++ compiler" >&5
10505 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10506                 cf_save_CFLAGS="$CXXFLAGS"
10507                 CXXFLAGS="$CXXFLAGS -no-gcc"
10508                 cat >conftest.$ac_ext <<_ACEOF
10509 #line 10509 "configure"
10510 #include "confdefs.h"
10511
10512 int
10513 main ()
10514 {
10515
10516 #ifdef __INTEL_COMPILER
10517 #else
10518 make an error
10519 #endif
10520
10521   ;
10522   return 0;
10523 }
10524 _ACEOF
10525 rm -f conftest.$ac_objext
10526 if { (eval echo "$as_me:10526: \"$ac_compile\"") >&5
10527   (eval $ac_compile) 2>&5
10528   ac_status=$?
10529   echo "$as_me:10529: \$? = $ac_status" >&5
10530   (exit $ac_status); } &&
10531          { ac_try='test -s conftest.$ac_objext'
10532   { (eval echo "$as_me:10532: \"$ac_try\"") >&5
10533   (eval $ac_try) 2>&5
10534   ac_status=$?
10535   echo "$as_me:10535: \$? = $ac_status" >&5
10536   (exit $ac_status); }; }; then
10537   INTEL_CPLUSPLUS=yes
10538 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10539
10540 else
10541   echo "$as_me: failed program was:" >&5
10542 cat conftest.$ac_ext >&5
10543 fi
10544 rm -f conftest.$ac_objext conftest.$ac_ext
10545                 CXXFLAGS="$cf_save_CFLAGS"
10546                 echo "$as_me:10546: result: $INTEL_CPLUSPLUS" >&5
10547 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10548                 ;;
10549         esac
10550 fi
10551
10552 ac_ext=cc
10553 ac_cpp='$CXXCPP $CPPFLAGS'
10554 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10555 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10556 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10557 ac_main_return=return
10558
10559 cat > conftest.$ac_ext <<EOF
10560 #line 10560 "configure"
10561 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10562 EOF
10563
10564 if test "$INTEL_CPLUSPLUS" = yes
10565 then
10566 # The "-wdXXX" options suppress warnings:
10567 # remark #1419: external declaration in primary source file
10568 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10569 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10570 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10571 # remark #193: zero used for undefined preprocessing identifier
10572 # remark #593: variable "curs_sb_left_arrow" was set but never used
10573 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10574 # remark #869: parameter "tw" was never referenced
10575 # remark #981: operands are evaluated in unspecified order
10576 # warning #269: invalid format string conversion
10577
10578         { echo "$as_me:10578: checking for $CC warning options..." >&5
10579 echo "$as_me: checking for $CC warning options..." >&6;}
10580         cf_save_CXXFLAGS="$CXXFLAGS"
10581         EXTRA_CXXFLAGS="-Wall"
10582         for cf_opt in \
10583                 wd1419 \
10584                 wd1682 \
10585                 wd1683 \
10586                 wd1684 \
10587                 wd193 \
10588                 wd279 \
10589                 wd593 \
10590                 wd810 \
10591                 wd869 \
10592                 wd981
10593         do
10594                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10595                 if { (eval echo "$as_me:10595: \"$ac_compile\"") >&5
10596   (eval $ac_compile) 2>&5
10597   ac_status=$?
10598   echo "$as_me:10598: \$? = $ac_status" >&5
10599   (exit $ac_status); }; then
10600                         test -n "$verbose" && echo "$as_me:10600: result: ... -$cf_opt" >&5
10601 echo "${ECHO_T}... -$cf_opt" >&6
10602                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10603                 fi
10604         done
10605         CXXFLAGS="$cf_save_CXXFLAGS"
10606
10607 elif test "$GXX" = yes
10608 then
10609         { echo "$as_me:10609: checking for $CXX warning options..." >&5
10610 echo "$as_me: checking for $CXX warning options..." >&6;}
10611         cf_save_CXXFLAGS="$CXXFLAGS"
10612         EXTRA_CXXFLAGS="-W -Wall"
10613         cf_gxx_extra_warnings=""
10614         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10615         case "$GCC_VERSION" in
10616         [1-2].*)
10617                 ;;
10618         *)
10619                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10620                 ;;
10621         esac
10622         for cf_opt in \
10623                 Wabi \
10624                 fabi-version=0 \
10625                 Woverloaded-virtual \
10626                 Wsign-promo \
10627                 Wsynth \
10628                 Wold-style-cast \
10629                 Wcast-align \
10630                 Wcast-qual \
10631                 Wmissing-prototypes \
10632                 Wpointer-arith \
10633                 Wshadow \
10634                 Wstrict-prototypes \
10635                 Wundef $cf_gxx_extra_warnings Wno-unused
10636         do
10637                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10638                 if { (eval echo "$as_me:10638: \"$ac_compile\"") >&5
10639   (eval $ac_compile) 2>&5
10640   ac_status=$?
10641   echo "$as_me:10641: \$? = $ac_status" >&5
10642   (exit $ac_status); }; then
10643                         test -n "$verbose" && echo "$as_me:10643: result: ... -$cf_opt" >&5
10644 echo "${ECHO_T}... -$cf_opt" >&6
10645                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10646                 else
10647                         test -n "$verbose" && echo "$as_me:10647: result: ... no -$cf_opt" >&5
10648 echo "${ECHO_T}... no -$cf_opt" >&6
10649                 fi
10650         done
10651         CXXFLAGS="$cf_save_CXXFLAGS"
10652 fi
10653
10654 rm -f conftest*
10655 ac_ext=c
10656 ac_cpp='$CPP $CPPFLAGS'
10657 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10658 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10659 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10660 ac_main_return=return
10661
10662         fi
10663 fi
10664
10665 if test "$GCC" = yes
10666 then
10667 cat > conftest.i <<EOF
10668 #ifndef GCC_PRINTF
10669 #define GCC_PRINTF 0
10670 #endif
10671 #ifndef GCC_SCANF
10672 #define GCC_SCANF 0
10673 #endif
10674 #ifndef GCC_NORETURN
10675 #define GCC_NORETURN /* nothing */
10676 #endif
10677 #ifndef GCC_UNUSED
10678 #define GCC_UNUSED /* nothing */
10679 #endif
10680 EOF
10681 if test "$GCC" = yes
10682 then
10683         { echo "$as_me:10683: checking for $CC __attribute__ directives..." >&5
10684 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10685 cat > conftest.$ac_ext <<EOF
10686 #line 10686 "${as_me-configure}"
10687 #include "confdefs.h"
10688 #include "conftest.h"
10689 #include "conftest.i"
10690 #if     GCC_PRINTF
10691 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10692 #else
10693 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10694 #endif
10695 #if     GCC_SCANF
10696 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10697 #else
10698 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10699 #endif
10700 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10701 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10702 extern void foo(void) GCC_NORETURN;
10703 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10704 EOF
10705         for cf_attribute in scanf printf unused noreturn
10706         do
10707
10708 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10709
10710                 cf_directive="__attribute__(($cf_attribute))"
10711                 echo "checking for $CC $cf_directive" 1>&5
10712                 case $cf_attribute in
10713                 scanf|printf)
10714                 cat >conftest.h <<EOF
10715 #define GCC_$cf_ATTRIBUTE 1
10716 EOF
10717                         ;;
10718                 *)
10719                 cat >conftest.h <<EOF
10720 #define GCC_$cf_ATTRIBUTE $cf_directive
10721 EOF
10722                         ;;
10723                 esac
10724                 if { (eval echo "$as_me:10724: \"$ac_compile\"") >&5
10725   (eval $ac_compile) 2>&5
10726   ac_status=$?
10727   echo "$as_me:10727: \$? = $ac_status" >&5
10728   (exit $ac_status); }; then
10729                         test -n "$verbose" && echo "$as_me:10729: result: ... $cf_attribute" >&5
10730 echo "${ECHO_T}... $cf_attribute" >&6
10731                         cat conftest.h >>confdefs.h
10732                 fi
10733         done
10734 else
10735         fgrep define conftest.i >>confdefs.h
10736 fi
10737 rm -rf conftest*
10738 fi
10739
10740 ###     use option --enable-assertions to turn on generation of assertion code
10741 echo "$as_me:10741: checking if you want to enable runtime assertions" >&5
10742 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10743
10744 # Check whether --enable-assertions or --disable-assertions was given.
10745 if test "${enable_assertions+set}" = set; then
10746   enableval="$enable_assertions"
10747   with_assertions=$enableval
10748 else
10749   with_assertions=no
10750 fi;
10751 echo "$as_me:10751: result: $with_assertions" >&5
10752 echo "${ECHO_T}$with_assertions" >&6
10753 if test -n "$GCC"
10754 then
10755         if test "$with_assertions" = no
10756         then
10757                 cat >>confdefs.h <<\EOF
10758 #define NDEBUG 1
10759 EOF
10760
10761                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10762         else
10763                 ADAFLAGS="$ADAFLAGS -gnata"
10764         fi
10765 fi
10766
10767 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10768
10769 echo "$as_me:10769: checking if you want to use dmalloc for testing" >&5
10770 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10771
10772 # Check whether --with-dmalloc or --without-dmalloc was given.
10773 if test "${with_dmalloc+set}" = set; then
10774   withval="$with_dmalloc"
10775   cat >>confdefs.h <<\EOF
10776 #define USE_DMALLOC 1
10777 EOF
10778
10779         : ${with_cflags:=-g}
10780         : ${with_no_leaks:=yes}
10781          with_dmalloc=yes
10782 else
10783   with_dmalloc=
10784 fi;
10785 echo "$as_me:10785: result: ${with_dmalloc:-no}" >&5
10786 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10787
10788 case .$with_cflags in #(vi
10789 .*-g*)
10790         case .$CFLAGS in #(vi
10791         .*-g*) #(vi
10792                 ;;
10793         *)
10794
10795 cf_fix_cppflags=no
10796 cf_new_cflags=
10797 cf_new_cppflags=
10798 cf_new_extra_cppflags=
10799
10800 for cf_add_cflags in -g
10801 do
10802 case $cf_fix_cppflags in
10803 no)
10804         case $cf_add_cflags in #(vi
10805         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10806                 case $cf_add_cflags in
10807                 -D*)
10808                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10809
10810                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10811                         && test -z "${cf_tst_cflags}" \
10812                         && cf_fix_cppflags=yes
10813
10814                         if test $cf_fix_cppflags = yes ; then
10815                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10816                                 continue
10817                         elif test "${cf_tst_cflags}" = "\"'" ; then
10818                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10819                                 continue
10820                         fi
10821                         ;;
10822                 esac
10823                 case "$CPPFLAGS" in
10824                 *$cf_add_cflags) #(vi
10825                         ;;
10826                 *) #(vi
10827                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10828                         ;;
10829                 esac
10830                 ;;
10831         *)
10832                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10833                 ;;
10834         esac
10835         ;;
10836 yes)
10837         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10838
10839         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10840
10841         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10842         && test -z "${cf_tst_cflags}" \
10843         && cf_fix_cppflags=no
10844         ;;
10845 esac
10846 done
10847
10848 if test -n "$cf_new_cflags" ; then
10849
10850         CFLAGS="$CFLAGS $cf_new_cflags"
10851 fi
10852
10853 if test -n "$cf_new_cppflags" ; then
10854
10855         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
10856 fi
10857
10858 if test -n "$cf_new_extra_cppflags" ; then
10859
10860         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10861 fi
10862
10863                 ;;
10864         esac
10865         ;;
10866 esac
10867
10868 if test "$with_dmalloc" = yes ; then
10869         echo "$as_me:10869: checking for dmalloc.h" >&5
10870 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10871 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10872   echo $ECHO_N "(cached) $ECHO_C" >&6
10873 else
10874   cat >conftest.$ac_ext <<_ACEOF
10875 #line 10875 "configure"
10876 #include "confdefs.h"
10877 #include <dmalloc.h>
10878 _ACEOF
10879 if { (eval echo "$as_me:10879: \"$ac_cpp conftest.$ac_ext\"") >&5
10880   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10881   ac_status=$?
10882   egrep -v '^ *\+' conftest.er1 >conftest.err
10883   rm -f conftest.er1
10884   cat conftest.err >&5
10885   echo "$as_me:10885: \$? = $ac_status" >&5
10886   (exit $ac_status); } >/dev/null; then
10887   if test -s conftest.err; then
10888     ac_cpp_err=$ac_c_preproc_warn_flag
10889   else
10890     ac_cpp_err=
10891   fi
10892 else
10893   ac_cpp_err=yes
10894 fi
10895 if test -z "$ac_cpp_err"; then
10896   ac_cv_header_dmalloc_h=yes
10897 else
10898   echo "$as_me: failed program was:" >&5
10899   cat conftest.$ac_ext >&5
10900   ac_cv_header_dmalloc_h=no
10901 fi
10902 rm -f conftest.err conftest.$ac_ext
10903 fi
10904 echo "$as_me:10904: result: $ac_cv_header_dmalloc_h" >&5
10905 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10906 if test $ac_cv_header_dmalloc_h = yes; then
10907
10908 echo "$as_me:10908: checking for dmalloc_debug in -ldmalloc" >&5
10909 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10910 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10911   echo $ECHO_N "(cached) $ECHO_C" >&6
10912 else
10913   ac_check_lib_save_LIBS=$LIBS
10914 LIBS="-ldmalloc  $LIBS"
10915 cat >conftest.$ac_ext <<_ACEOF
10916 #line 10916 "configure"
10917 #include "confdefs.h"
10918
10919 /* Override any gcc2 internal prototype to avoid an error.  */
10920 #ifdef __cplusplus
10921 extern "C"
10922 #endif
10923 /* We use char because int might match the return type of a gcc2
10924    builtin and then its argument prototype would still apply.  */
10925 char dmalloc_debug ();
10926 int
10927 main ()
10928 {
10929 dmalloc_debug ();
10930   ;
10931   return 0;
10932 }
10933 _ACEOF
10934 rm -f conftest.$ac_objext conftest$ac_exeext
10935 if { (eval echo "$as_me:10935: \"$ac_link\"") >&5
10936   (eval $ac_link) 2>&5
10937   ac_status=$?
10938   echo "$as_me:10938: \$? = $ac_status" >&5
10939   (exit $ac_status); } &&
10940          { ac_try='test -s conftest$ac_exeext'
10941   { (eval echo "$as_me:10941: \"$ac_try\"") >&5
10942   (eval $ac_try) 2>&5
10943   ac_status=$?
10944   echo "$as_me:10944: \$? = $ac_status" >&5
10945   (exit $ac_status); }; }; then
10946   ac_cv_lib_dmalloc_dmalloc_debug=yes
10947 else
10948   echo "$as_me: failed program was:" >&5
10949 cat conftest.$ac_ext >&5
10950 ac_cv_lib_dmalloc_dmalloc_debug=no
10951 fi
10952 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10953 LIBS=$ac_check_lib_save_LIBS
10954 fi
10955 echo "$as_me:10955: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
10956 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
10957 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
10958   cat >>confdefs.h <<EOF
10959 #define HAVE_LIBDMALLOC 1
10960 EOF
10961
10962   LIBS="-ldmalloc $LIBS"
10963
10964 fi
10965
10966 fi
10967
10968 fi
10969
10970 echo "$as_me:10970: checking if you want to use dbmalloc for testing" >&5
10971 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
10972
10973 # Check whether --with-dbmalloc or --without-dbmalloc was given.
10974 if test "${with_dbmalloc+set}" = set; then
10975   withval="$with_dbmalloc"
10976   cat >>confdefs.h <<\EOF
10977 #define USE_DBMALLOC 1
10978 EOF
10979
10980         : ${with_cflags:=-g}
10981         : ${with_no_leaks:=yes}
10982          with_dbmalloc=yes
10983 else
10984   with_dbmalloc=
10985 fi;
10986 echo "$as_me:10986: result: ${with_dbmalloc:-no}" >&5
10987 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
10988
10989 case .$with_cflags in #(vi
10990 .*-g*)
10991         case .$CFLAGS in #(vi
10992         .*-g*) #(vi
10993                 ;;
10994         *)
10995
10996 cf_fix_cppflags=no
10997 cf_new_cflags=
10998 cf_new_cppflags=
10999 cf_new_extra_cppflags=
11000
11001 for cf_add_cflags in -g
11002 do
11003 case $cf_fix_cppflags in
11004 no)
11005         case $cf_add_cflags in #(vi
11006         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11007                 case $cf_add_cflags in
11008                 -D*)
11009                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11010
11011                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11012                         && test -z "${cf_tst_cflags}" \
11013                         && cf_fix_cppflags=yes
11014
11015                         if test $cf_fix_cppflags = yes ; then
11016                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11017                                 continue
11018                         elif test "${cf_tst_cflags}" = "\"'" ; then
11019                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11020                                 continue
11021                         fi
11022                         ;;
11023                 esac
11024                 case "$CPPFLAGS" in
11025                 *$cf_add_cflags) #(vi
11026                         ;;
11027                 *) #(vi
11028                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11029                         ;;
11030                 esac
11031                 ;;
11032         *)
11033                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11034                 ;;
11035         esac
11036         ;;
11037 yes)
11038         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11039
11040         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11041
11042         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11043         && test -z "${cf_tst_cflags}" \
11044         && cf_fix_cppflags=no
11045         ;;
11046 esac
11047 done
11048
11049 if test -n "$cf_new_cflags" ; then
11050
11051         CFLAGS="$CFLAGS $cf_new_cflags"
11052 fi
11053
11054 if test -n "$cf_new_cppflags" ; then
11055
11056         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11057 fi
11058
11059 if test -n "$cf_new_extra_cppflags" ; then
11060
11061         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11062 fi
11063
11064                 ;;
11065         esac
11066         ;;
11067 esac
11068
11069 if test "$with_dbmalloc" = yes ; then
11070         echo "$as_me:11070: checking for dbmalloc.h" >&5
11071 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11072 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11073   echo $ECHO_N "(cached) $ECHO_C" >&6
11074 else
11075   cat >conftest.$ac_ext <<_ACEOF
11076 #line 11076 "configure"
11077 #include "confdefs.h"
11078 #include <dbmalloc.h>
11079 _ACEOF
11080 if { (eval echo "$as_me:11080: \"$ac_cpp conftest.$ac_ext\"") >&5
11081   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11082   ac_status=$?
11083   egrep -v '^ *\+' conftest.er1 >conftest.err
11084   rm -f conftest.er1
11085   cat conftest.err >&5
11086   echo "$as_me:11086: \$? = $ac_status" >&5
11087   (exit $ac_status); } >/dev/null; then
11088   if test -s conftest.err; then
11089     ac_cpp_err=$ac_c_preproc_warn_flag
11090   else
11091     ac_cpp_err=
11092   fi
11093 else
11094   ac_cpp_err=yes
11095 fi
11096 if test -z "$ac_cpp_err"; then
11097   ac_cv_header_dbmalloc_h=yes
11098 else
11099   echo "$as_me: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   ac_cv_header_dbmalloc_h=no
11102 fi
11103 rm -f conftest.err conftest.$ac_ext
11104 fi
11105 echo "$as_me:11105: result: $ac_cv_header_dbmalloc_h" >&5
11106 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11107 if test $ac_cv_header_dbmalloc_h = yes; then
11108
11109 echo "$as_me:11109: checking for debug_malloc in -ldbmalloc" >&5
11110 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11111 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11112   echo $ECHO_N "(cached) $ECHO_C" >&6
11113 else
11114   ac_check_lib_save_LIBS=$LIBS
11115 LIBS="-ldbmalloc  $LIBS"
11116 cat >conftest.$ac_ext <<_ACEOF
11117 #line 11117 "configure"
11118 #include "confdefs.h"
11119
11120 /* Override any gcc2 internal prototype to avoid an error.  */
11121 #ifdef __cplusplus
11122 extern "C"
11123 #endif
11124 /* We use char because int might match the return type of a gcc2
11125    builtin and then its argument prototype would still apply.  */
11126 char debug_malloc ();
11127 int
11128 main ()
11129 {
11130 debug_malloc ();
11131   ;
11132   return 0;
11133 }
11134 _ACEOF
11135 rm -f conftest.$ac_objext conftest$ac_exeext
11136 if { (eval echo "$as_me:11136: \"$ac_link\"") >&5
11137   (eval $ac_link) 2>&5
11138   ac_status=$?
11139   echo "$as_me:11139: \$? = $ac_status" >&5
11140   (exit $ac_status); } &&
11141          { ac_try='test -s conftest$ac_exeext'
11142   { (eval echo "$as_me:11142: \"$ac_try\"") >&5
11143   (eval $ac_try) 2>&5
11144   ac_status=$?
11145   echo "$as_me:11145: \$? = $ac_status" >&5
11146   (exit $ac_status); }; }; then
11147   ac_cv_lib_dbmalloc_debug_malloc=yes
11148 else
11149   echo "$as_me: failed program was:" >&5
11150 cat conftest.$ac_ext >&5
11151 ac_cv_lib_dbmalloc_debug_malloc=no
11152 fi
11153 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11154 LIBS=$ac_check_lib_save_LIBS
11155 fi
11156 echo "$as_me:11156: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11157 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11158 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11159   cat >>confdefs.h <<EOF
11160 #define HAVE_LIBDBMALLOC 1
11161 EOF
11162
11163   LIBS="-ldbmalloc $LIBS"
11164
11165 fi
11166
11167 fi
11168
11169 fi
11170
11171 echo "$as_me:11171: checking if you want to use valgrind for testing" >&5
11172 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11173
11174 # Check whether --with-valgrind or --without-valgrind was given.
11175 if test "${with_valgrind+set}" = set; then
11176   withval="$with_valgrind"
11177   cat >>confdefs.h <<\EOF
11178 #define USE_VALGRIND 1
11179 EOF
11180
11181         : ${with_cflags:=-g}
11182         : ${with_no_leaks:=yes}
11183          with_valgrind=yes
11184 else
11185   with_valgrind=
11186 fi;
11187 echo "$as_me:11187: result: ${with_valgrind:-no}" >&5
11188 echo "${ECHO_T}${with_valgrind:-no}" >&6
11189
11190 case .$with_cflags in #(vi
11191 .*-g*)
11192         case .$CFLAGS in #(vi
11193         .*-g*) #(vi
11194                 ;;
11195         *)
11196
11197 cf_fix_cppflags=no
11198 cf_new_cflags=
11199 cf_new_cppflags=
11200 cf_new_extra_cppflags=
11201
11202 for cf_add_cflags in -g
11203 do
11204 case $cf_fix_cppflags in
11205 no)
11206         case $cf_add_cflags in #(vi
11207         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11208                 case $cf_add_cflags in
11209                 -D*)
11210                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11211
11212                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11213                         && test -z "${cf_tst_cflags}" \
11214                         && cf_fix_cppflags=yes
11215
11216                         if test $cf_fix_cppflags = yes ; then
11217                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11218                                 continue
11219                         elif test "${cf_tst_cflags}" = "\"'" ; then
11220                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11221                                 continue
11222                         fi
11223                         ;;
11224                 esac
11225                 case "$CPPFLAGS" in
11226                 *$cf_add_cflags) #(vi
11227                         ;;
11228                 *) #(vi
11229                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11230                         ;;
11231                 esac
11232                 ;;
11233         *)
11234                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11235                 ;;
11236         esac
11237         ;;
11238 yes)
11239         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11240
11241         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11242
11243         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11244         && test -z "${cf_tst_cflags}" \
11245         && cf_fix_cppflags=no
11246         ;;
11247 esac
11248 done
11249
11250 if test -n "$cf_new_cflags" ; then
11251
11252         CFLAGS="$CFLAGS $cf_new_cflags"
11253 fi
11254
11255 if test -n "$cf_new_cppflags" ; then
11256
11257         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11258 fi
11259
11260 if test -n "$cf_new_extra_cppflags" ; then
11261
11262         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11263 fi
11264
11265                 ;;
11266         esac
11267         ;;
11268 esac
11269
11270 echo "$as_me:11270: checking if you want to perform memory-leak testing" >&5
11271 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11272
11273 # Check whether --enable-leaks or --disable-leaks was given.
11274 if test "${enable_leaks+set}" = set; then
11275   enableval="$enable_leaks"
11276   with_no_leaks=yes
11277 else
11278   : ${with_no_leaks:=no}
11279 fi;
11280 echo "$as_me:11280: result: $with_no_leaks" >&5
11281 echo "${ECHO_T}$with_no_leaks" >&6
11282
11283 if test "$with_no_leaks" = yes ; then
11284         cat >>confdefs.h <<\EOF
11285 #define NO_LEAKS 1
11286 EOF
11287
11288 fi
11289
11290 cat >>confdefs.h <<\EOF
11291 #define HAVE_NC_ALLOC_H 1
11292 EOF
11293
11294 ###     use option --enable-expanded to generate certain macros as functions
11295
11296 # Check whether --enable-expanded or --disable-expanded was given.
11297 if test "${enable_expanded+set}" = set; then
11298   enableval="$enable_expanded"
11299   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11300 #define NCURSES_EXPANDED 1
11301 EOF
11302
11303 fi;
11304
11305 ###     use option --disable-macros to suppress macros in favor of functions
11306
11307 # Check whether --enable-macros or --disable-macros was given.
11308 if test "${enable_macros+set}" = set; then
11309   enableval="$enable_macros"
11310   test "$enableval" = no && cat >>confdefs.h <<\EOF
11311 #define NCURSES_NOMACROS 1
11312 EOF
11313
11314 fi;
11315
11316 # Normally we only add trace() to the debug-library.  Allow this to be
11317 # extended to all models of the ncurses library:
11318 cf_all_traces=no
11319 case "$CFLAGS $CPPFLAGS" in
11320 *-DTRACE*)
11321         cf_all_traces=yes
11322         ;;
11323 esac
11324
11325 echo "$as_me:11325: checking whether to add trace feature to all models" >&5
11326 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11327
11328 # Check whether --with-trace or --without-trace was given.
11329 if test "${with_trace+set}" = set; then
11330   withval="$with_trace"
11331   cf_with_trace=$withval
11332 else
11333   cf_with_trace=$cf_all_traces
11334 fi;
11335 echo "$as_me:11335: result: $cf_with_trace" >&5
11336 echo "${ECHO_T}$cf_with_trace" >&6
11337
11338 if test "$cf_with_trace" = yes ; then
11339         LIB_TRACING=all
11340         ADA_TRACE=TRUE
11341
11342 cf_fix_cppflags=no
11343 cf_new_cflags=
11344 cf_new_cppflags=
11345 cf_new_extra_cppflags=
11346
11347 for cf_add_cflags in -DTRACE
11348 do
11349 case $cf_fix_cppflags in
11350 no)
11351         case $cf_add_cflags in #(vi
11352         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11353                 case $cf_add_cflags in
11354                 -D*)
11355                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11356
11357                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11358                         && test -z "${cf_tst_cflags}" \
11359                         && cf_fix_cppflags=yes
11360
11361                         if test $cf_fix_cppflags = yes ; then
11362                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11363                                 continue
11364                         elif test "${cf_tst_cflags}" = "\"'" ; then
11365                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11366                                 continue
11367                         fi
11368                         ;;
11369                 esac
11370                 case "$CPPFLAGS" in
11371                 *$cf_add_cflags) #(vi
11372                         ;;
11373                 *) #(vi
11374                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11375                         ;;
11376                 esac
11377                 ;;
11378         *)
11379                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11380                 ;;
11381         esac
11382         ;;
11383 yes)
11384         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11385
11386         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11387
11388         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11389         && test -z "${cf_tst_cflags}" \
11390         && cf_fix_cppflags=no
11391         ;;
11392 esac
11393 done
11394
11395 if test -n "$cf_new_cflags" ; then
11396
11397         CFLAGS="$CFLAGS $cf_new_cflags"
11398 fi
11399
11400 if test -n "$cf_new_cppflags" ; then
11401
11402         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
11403 fi
11404
11405 if test -n "$cf_new_extra_cppflags" ; then
11406
11407         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11408 fi
11409
11410 else
11411         LIB_TRACING=DEBUG
11412         ADA_TRACE=FALSE
11413 fi
11414
11415 ###     Checks for libraries.
11416 echo "$as_me:11416: checking for gettimeofday" >&5
11417 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11418 if test "${ac_cv_func_gettimeofday+set}" = set; then
11419   echo $ECHO_N "(cached) $ECHO_C" >&6
11420 else
11421   cat >conftest.$ac_ext <<_ACEOF
11422 #line 11422 "configure"
11423 #include "confdefs.h"
11424 /* System header to define __stub macros and hopefully few prototypes,
11425     which can conflict with char gettimeofday (); below.  */
11426 #include <assert.h>
11427 /* Override any gcc2 internal prototype to avoid an error.  */
11428 #ifdef __cplusplus
11429 extern "C"
11430 #endif
11431 /* We use char because int might match the return type of a gcc2
11432    builtin and then its argument prototype would still apply.  */
11433 char gettimeofday ();
11434 char (*f) ();
11435
11436 int
11437 main ()
11438 {
11439 /* The GNU C library defines this for functions which it implements
11440     to always fail with ENOSYS.  Some functions are actually named
11441     something starting with __ and the normal name is an alias.  */
11442 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11443 choke me
11444 #else
11445 f = gettimeofday;
11446 #endif
11447
11448   ;
11449   return 0;
11450 }
11451 _ACEOF
11452 rm -f conftest.$ac_objext conftest$ac_exeext
11453 if { (eval echo "$as_me:11453: \"$ac_link\"") >&5
11454   (eval $ac_link) 2>&5
11455   ac_status=$?
11456   echo "$as_me:11456: \$? = $ac_status" >&5
11457   (exit $ac_status); } &&
11458          { ac_try='test -s conftest$ac_exeext'
11459   { (eval echo "$as_me:11459: \"$ac_try\"") >&5
11460   (eval $ac_try) 2>&5
11461   ac_status=$?
11462   echo "$as_me:11462: \$? = $ac_status" >&5
11463   (exit $ac_status); }; }; then
11464   ac_cv_func_gettimeofday=yes
11465 else
11466   echo "$as_me: failed program was:" >&5
11467 cat conftest.$ac_ext >&5
11468 ac_cv_func_gettimeofday=no
11469 fi
11470 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11471 fi
11472 echo "$as_me:11472: result: $ac_cv_func_gettimeofday" >&5
11473 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11474 if test $ac_cv_func_gettimeofday = yes; then
11475   cat >>confdefs.h <<\EOF
11476 #define HAVE_GETTIMEOFDAY 1
11477 EOF
11478
11479 else
11480
11481 echo "$as_me:11481: checking for gettimeofday in -lbsd" >&5
11482 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11483 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486   ac_check_lib_save_LIBS=$LIBS
11487 LIBS="-lbsd  $LIBS"
11488 cat >conftest.$ac_ext <<_ACEOF
11489 #line 11489 "configure"
11490 #include "confdefs.h"
11491
11492 /* Override any gcc2 internal prototype to avoid an error.  */
11493 #ifdef __cplusplus
11494 extern "C"
11495 #endif
11496 /* We use char because int might match the return type of a gcc2
11497    builtin and then its argument prototype would still apply.  */
11498 char gettimeofday ();
11499 int
11500 main ()
11501 {
11502 gettimeofday ();
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -f conftest.$ac_objext conftest$ac_exeext
11508 if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509   (eval $ac_link) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); } &&
11513          { ac_try='test -s conftest$ac_exeext'
11514   { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515   (eval $ac_try) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit $ac_status); }; }; then
11519   ac_cv_lib_bsd_gettimeofday=yes
11520 else
11521   echo "$as_me: failed program was:" >&5
11522 cat conftest.$ac_ext >&5
11523 ac_cv_lib_bsd_gettimeofday=no
11524 fi
11525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11526 LIBS=$ac_check_lib_save_LIBS
11527 fi
11528 echo "$as_me:11528: result: $ac_cv_lib_bsd_gettimeofday" >&5
11529 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11530 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11531   cat >>confdefs.h <<\EOF
11532 #define HAVE_GETTIMEOFDAY 1
11533 EOF
11534
11535         LIBS="$LIBS -lbsd"
11536 fi
11537
11538 fi
11539
11540 echo "$as_me:11540: checking if -lm needed for math functions" >&5
11541 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11542 if test "${cf_cv_need_libm+set}" = set; then
11543   echo $ECHO_N "(cached) $ECHO_C" >&6
11544 else
11545
11546         cat >conftest.$ac_ext <<_ACEOF
11547 #line 11547 "configure"
11548 #include "confdefs.h"
11549
11550         #include <stdio.h>
11551         #include <math.h>
11552
11553 int
11554 main ()
11555 {
11556 double x = rand(); printf("result = %g\n", sin(x))
11557   ;
11558   return 0;
11559 }
11560 _ACEOF
11561 rm -f conftest.$ac_objext conftest$ac_exeext
11562 if { (eval echo "$as_me:11562: \"$ac_link\"") >&5
11563   (eval $ac_link) 2>&5
11564   ac_status=$?
11565   echo "$as_me:11565: \$? = $ac_status" >&5
11566   (exit $ac_status); } &&
11567          { ac_try='test -s conftest$ac_exeext'
11568   { (eval echo "$as_me:11568: \"$ac_try\"") >&5
11569   (eval $ac_try) 2>&5
11570   ac_status=$?
11571   echo "$as_me:11571: \$? = $ac_status" >&5
11572   (exit $ac_status); }; }; then
11573   cf_cv_need_libm=no
11574 else
11575   echo "$as_me: failed program was:" >&5
11576 cat conftest.$ac_ext >&5
11577 cf_cv_need_libm=yes
11578 fi
11579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11580 fi
11581 echo "$as_me:11581: result: $cf_cv_need_libm" >&5
11582 echo "${ECHO_T}$cf_cv_need_libm" >&6
11583 if test "$cf_cv_need_libm" = yes
11584 then
11585 MATH_LIB=-lm
11586 fi
11587
11588 ###     Checks for header files.
11589 echo "$as_me:11589: checking for ANSI C header files" >&5
11590 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11591 if test "${ac_cv_header_stdc+set}" = set; then
11592   echo $ECHO_N "(cached) $ECHO_C" >&6
11593 else
11594   cat >conftest.$ac_ext <<_ACEOF
11595 #line 11595 "configure"
11596 #include "confdefs.h"
11597 #include <stdlib.h>
11598 #include <stdarg.h>
11599 #include <string.h>
11600 #include <float.h>
11601
11602 _ACEOF
11603 if { (eval echo "$as_me:11603: \"$ac_cpp conftest.$ac_ext\"") >&5
11604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11605   ac_status=$?
11606   egrep -v '^ *\+' conftest.er1 >conftest.err
11607   rm -f conftest.er1
11608   cat conftest.err >&5
11609   echo "$as_me:11609: \$? = $ac_status" >&5
11610   (exit $ac_status); } >/dev/null; then
11611   if test -s conftest.err; then
11612     ac_cpp_err=$ac_c_preproc_warn_flag
11613   else
11614     ac_cpp_err=
11615   fi
11616 else
11617   ac_cpp_err=yes
11618 fi
11619 if test -z "$ac_cpp_err"; then
11620   ac_cv_header_stdc=yes
11621 else
11622   echo "$as_me: failed program was:" >&5
11623   cat conftest.$ac_ext >&5
11624   ac_cv_header_stdc=no
11625 fi
11626 rm -f conftest.err conftest.$ac_ext
11627
11628 if test $ac_cv_header_stdc = yes; then
11629   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11630   cat >conftest.$ac_ext <<_ACEOF
11631 #line 11631 "configure"
11632 #include "confdefs.h"
11633 #include <string.h>
11634
11635 _ACEOF
11636 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11637   egrep "memchr" >/dev/null 2>&1; then
11638   :
11639 else
11640   ac_cv_header_stdc=no
11641 fi
11642 rm -f conftest*
11643
11644 fi
11645
11646 if test $ac_cv_header_stdc = yes; then
11647   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11648   cat >conftest.$ac_ext <<_ACEOF
11649 #line 11649 "configure"
11650 #include "confdefs.h"
11651 #include <stdlib.h>
11652
11653 _ACEOF
11654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11655   egrep "free" >/dev/null 2>&1; then
11656   :
11657 else
11658   ac_cv_header_stdc=no
11659 fi
11660 rm -f conftest*
11661
11662 fi
11663
11664 if test $ac_cv_header_stdc = yes; then
11665   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11666   if test "$cross_compiling" = yes; then
11667   :
11668 else
11669   cat >conftest.$ac_ext <<_ACEOF
11670 #line 11670 "configure"
11671 #include "confdefs.h"
11672 #include <ctype.h>
11673 #if ((' ' & 0x0FF) == 0x020)
11674 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11675 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11676 #else
11677 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11678                      || ('j' <= (c) && (c) <= 'r') \
11679                      || ('s' <= (c) && (c) <= 'z'))
11680 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11681 #endif
11682
11683 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11684 int
11685 main ()
11686 {
11687   int i;
11688   for (i = 0; i < 256; i++)
11689     if (XOR (islower (i), ISLOWER (i))
11690         || toupper (i) != TOUPPER (i))
11691       $ac_main_return(2);
11692   $ac_main_return (0);
11693 }
11694 _ACEOF
11695 rm -f conftest$ac_exeext
11696 if { (eval echo "$as_me:11696: \"$ac_link\"") >&5
11697   (eval $ac_link) 2>&5
11698   ac_status=$?
11699   echo "$as_me:11699: \$? = $ac_status" >&5
11700   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11701   { (eval echo "$as_me:11701: \"$ac_try\"") >&5
11702   (eval $ac_try) 2>&5
11703   ac_status=$?
11704   echo "$as_me:11704: \$? = $ac_status" >&5
11705   (exit $ac_status); }; }; then
11706   :
11707 else
11708   echo "$as_me: program exited with status $ac_status" >&5
11709 echo "$as_me: failed program was:" >&5
11710 cat conftest.$ac_ext >&5
11711 ac_cv_header_stdc=no
11712 fi
11713 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11714 fi
11715 fi
11716 fi
11717 echo "$as_me:11717: result: $ac_cv_header_stdc" >&5
11718 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11719 if test $ac_cv_header_stdc = yes; then
11720
11721 cat >>confdefs.h <<\EOF
11722 #define STDC_HEADERS 1
11723 EOF
11724
11725 fi
11726
11727 ac_header_dirent=no
11728 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11729   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11730 echo "$as_me:11730: checking for $ac_hdr that defines DIR" >&5
11731 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11732 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11733   echo $ECHO_N "(cached) $ECHO_C" >&6
11734 else
11735   cat >conftest.$ac_ext <<_ACEOF
11736 #line 11736 "configure"
11737 #include "confdefs.h"
11738 #include <sys/types.h>
11739 #include <$ac_hdr>
11740
11741 int
11742 main ()
11743 {
11744 if ((DIR *) 0)
11745 return 0;
11746   ;
11747   return 0;
11748 }
11749 _ACEOF
11750 rm -f conftest.$ac_objext
11751 if { (eval echo "$as_me:11751: \"$ac_compile\"") >&5
11752   (eval $ac_compile) 2>&5
11753   ac_status=$?
11754   echo "$as_me:11754: \$? = $ac_status" >&5
11755   (exit $ac_status); } &&
11756          { ac_try='test -s conftest.$ac_objext'
11757   { (eval echo "$as_me:11757: \"$ac_try\"") >&5
11758   (eval $ac_try) 2>&5
11759   ac_status=$?
11760   echo "$as_me:11760: \$? = $ac_status" >&5
11761   (exit $ac_status); }; }; then
11762   eval "$as_ac_Header=yes"
11763 else
11764   echo "$as_me: failed program was:" >&5
11765 cat conftest.$ac_ext >&5
11766 eval "$as_ac_Header=no"
11767 fi
11768 rm -f conftest.$ac_objext conftest.$ac_ext
11769 fi
11770 echo "$as_me:11770: result: `eval echo '${'$as_ac_Header'}'`" >&5
11771 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11772 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11773   cat >>confdefs.h <<EOF
11774 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11775 EOF
11776
11777 ac_header_dirent=$ac_hdr; break
11778 fi
11779
11780 done
11781 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11782 if test $ac_header_dirent = dirent.h; then
11783   echo "$as_me:11783: checking for opendir in -ldir" >&5
11784 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11785 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11786   echo $ECHO_N "(cached) $ECHO_C" >&6
11787 else
11788   ac_check_lib_save_LIBS=$LIBS
11789 LIBS="-ldir  $LIBS"
11790 cat >conftest.$ac_ext <<_ACEOF
11791 #line 11791 "configure"
11792 #include "confdefs.h"
11793
11794 /* Override any gcc2 internal prototype to avoid an error.  */
11795 #ifdef __cplusplus
11796 extern "C"
11797 #endif
11798 /* We use char because int might match the return type of a gcc2
11799    builtin and then its argument prototype would still apply.  */
11800 char opendir ();
11801 int
11802 main ()
11803 {
11804 opendir ();
11805   ;
11806   return 0;
11807 }
11808 _ACEOF
11809 rm -f conftest.$ac_objext conftest$ac_exeext
11810 if { (eval echo "$as_me:11810: \"$ac_link\"") >&5
11811   (eval $ac_link) 2>&5
11812   ac_status=$?
11813   echo "$as_me:11813: \$? = $ac_status" >&5
11814   (exit $ac_status); } &&
11815          { ac_try='test -s conftest$ac_exeext'
11816   { (eval echo "$as_me:11816: \"$ac_try\"") >&5
11817   (eval $ac_try) 2>&5
11818   ac_status=$?
11819   echo "$as_me:11819: \$? = $ac_status" >&5
11820   (exit $ac_status); }; }; then
11821   ac_cv_lib_dir_opendir=yes
11822 else
11823   echo "$as_me: failed program was:" >&5
11824 cat conftest.$ac_ext >&5
11825 ac_cv_lib_dir_opendir=no
11826 fi
11827 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11828 LIBS=$ac_check_lib_save_LIBS
11829 fi
11830 echo "$as_me:11830: result: $ac_cv_lib_dir_opendir" >&5
11831 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11832 if test $ac_cv_lib_dir_opendir = yes; then
11833   LIBS="$LIBS -ldir"
11834 fi
11835
11836 else
11837   echo "$as_me:11837: checking for opendir in -lx" >&5
11838 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11839 if test "${ac_cv_lib_x_opendir+set}" = set; then
11840   echo $ECHO_N "(cached) $ECHO_C" >&6
11841 else
11842   ac_check_lib_save_LIBS=$LIBS
11843 LIBS="-lx  $LIBS"
11844 cat >conftest.$ac_ext <<_ACEOF
11845 #line 11845 "configure"
11846 #include "confdefs.h"
11847
11848 /* Override any gcc2 internal prototype to avoid an error.  */
11849 #ifdef __cplusplus
11850 extern "C"
11851 #endif
11852 /* We use char because int might match the return type of a gcc2
11853    builtin and then its argument prototype would still apply.  */
11854 char opendir ();
11855 int
11856 main ()
11857 {
11858 opendir ();
11859   ;
11860   return 0;
11861 }
11862 _ACEOF
11863 rm -f conftest.$ac_objext conftest$ac_exeext
11864 if { (eval echo "$as_me:11864: \"$ac_link\"") >&5
11865   (eval $ac_link) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); } &&
11869          { ac_try='test -s conftest$ac_exeext'
11870   { (eval echo "$as_me:11870: \"$ac_try\"") >&5
11871   (eval $ac_try) 2>&5
11872   ac_status=$?
11873   echo "$as_me:11873: \$? = $ac_status" >&5
11874   (exit $ac_status); }; }; then
11875   ac_cv_lib_x_opendir=yes
11876 else
11877   echo "$as_me: failed program was:" >&5
11878 cat conftest.$ac_ext >&5
11879 ac_cv_lib_x_opendir=no
11880 fi
11881 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11882 LIBS=$ac_check_lib_save_LIBS
11883 fi
11884 echo "$as_me:11884: result: $ac_cv_lib_x_opendir" >&5
11885 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11886 if test $ac_cv_lib_x_opendir = yes; then
11887   LIBS="$LIBS -lx"
11888 fi
11889
11890 fi
11891
11892 echo "$as_me:11892: checking whether time.h and sys/time.h may both be included" >&5
11893 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11894 if test "${ac_cv_header_time+set}" = set; then
11895   echo $ECHO_N "(cached) $ECHO_C" >&6
11896 else
11897   cat >conftest.$ac_ext <<_ACEOF
11898 #line 11898 "configure"
11899 #include "confdefs.h"
11900 #include <sys/types.h>
11901 #include <sys/time.h>
11902 #include <time.h>
11903
11904 int
11905 main ()
11906 {
11907 if ((struct tm *) 0)
11908 return 0;
11909   ;
11910   return 0;
11911 }
11912 _ACEOF
11913 rm -f conftest.$ac_objext
11914 if { (eval echo "$as_me:11914: \"$ac_compile\"") >&5
11915   (eval $ac_compile) 2>&5
11916   ac_status=$?
11917   echo "$as_me:11917: \$? = $ac_status" >&5
11918   (exit $ac_status); } &&
11919          { ac_try='test -s conftest.$ac_objext'
11920   { (eval echo "$as_me:11920: \"$ac_try\"") >&5
11921   (eval $ac_try) 2>&5
11922   ac_status=$?
11923   echo "$as_me:11923: \$? = $ac_status" >&5
11924   (exit $ac_status); }; }; then
11925   ac_cv_header_time=yes
11926 else
11927   echo "$as_me: failed program was:" >&5
11928 cat conftest.$ac_ext >&5
11929 ac_cv_header_time=no
11930 fi
11931 rm -f conftest.$ac_objext conftest.$ac_ext
11932 fi
11933 echo "$as_me:11933: result: $ac_cv_header_time" >&5
11934 echo "${ECHO_T}$ac_cv_header_time" >&6
11935 if test $ac_cv_header_time = yes; then
11936
11937 cat >>confdefs.h <<\EOF
11938 #define TIME_WITH_SYS_TIME 1
11939 EOF
11940
11941 fi
11942
11943 echo "$as_me:11943: checking for regular-expression headers" >&5
11944 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
11945 if test "${cf_cv_regex+set}" = set; then
11946   echo $ECHO_N "(cached) $ECHO_C" >&6
11947 else
11948
11949 cat >conftest.$ac_ext <<_ACEOF
11950 #line 11950 "configure"
11951 #include "confdefs.h"
11952 #include <sys/types.h>
11953 #include <regex.h>
11954 int
11955 main ()
11956 {
11957
11958         regex_t *p;
11959         int x = regcomp(p, "", 0);
11960         int y = regexec(p, "", 0, 0, 0);
11961         regfree(p);
11962
11963   ;
11964   return 0;
11965 }
11966 _ACEOF
11967 rm -f conftest.$ac_objext conftest$ac_exeext
11968 if { (eval echo "$as_me:11968: \"$ac_link\"") >&5
11969   (eval $ac_link) 2>&5
11970   ac_status=$?
11971   echo "$as_me:11971: \$? = $ac_status" >&5
11972   (exit $ac_status); } &&
11973          { ac_try='test -s conftest$ac_exeext'
11974   { (eval echo "$as_me:11974: \"$ac_try\"") >&5
11975   (eval $ac_try) 2>&5
11976   ac_status=$?
11977   echo "$as_me:11977: \$? = $ac_status" >&5
11978   (exit $ac_status); }; }; then
11979   cf_cv_regex="regex.h"
11980 else
11981   echo "$as_me: failed program was:" >&5
11982 cat conftest.$ac_ext >&5
11983
11984         cat >conftest.$ac_ext <<_ACEOF
11985 #line 11985 "configure"
11986 #include "confdefs.h"
11987 #include <regexp.h>
11988 int
11989 main ()
11990 {
11991
11992                 char *p = compile("", "", "", 0);
11993                 int x = step("", "");
11994
11995   ;
11996   return 0;
11997 }
11998 _ACEOF
11999 rm -f conftest.$ac_objext conftest$ac_exeext
12000 if { (eval echo "$as_me:12000: \"$ac_link\"") >&5
12001   (eval $ac_link) 2>&5
12002   ac_status=$?
12003   echo "$as_me:12003: \$? = $ac_status" >&5
12004   (exit $ac_status); } &&
12005          { ac_try='test -s conftest$ac_exeext'
12006   { (eval echo "$as_me:12006: \"$ac_try\"") >&5
12007   (eval $ac_try) 2>&5
12008   ac_status=$?
12009   echo "$as_me:12009: \$? = $ac_status" >&5
12010   (exit $ac_status); }; }; then
12011   cf_cv_regex="regexp.h"
12012 else
12013   echo "$as_me: failed program was:" >&5
12014 cat conftest.$ac_ext >&5
12015
12016                 cf_save_LIBS="$LIBS"
12017                 LIBS="-lgen $LIBS"
12018                 cat >conftest.$ac_ext <<_ACEOF
12019 #line 12019 "configure"
12020 #include "confdefs.h"
12021 #include <regexpr.h>
12022 int
12023 main ()
12024 {
12025
12026                         char *p = compile("", "", "");
12027                         int x = step("", "");
12028
12029   ;
12030   return 0;
12031 }
12032 _ACEOF
12033 rm -f conftest.$ac_objext conftest$ac_exeext
12034 if { (eval echo "$as_me:12034: \"$ac_link\"") >&5
12035   (eval $ac_link) 2>&5
12036   ac_status=$?
12037   echo "$as_me:12037: \$? = $ac_status" >&5
12038   (exit $ac_status); } &&
12039          { ac_try='test -s conftest$ac_exeext'
12040   { (eval echo "$as_me:12040: \"$ac_try\"") >&5
12041   (eval $ac_try) 2>&5
12042   ac_status=$?
12043   echo "$as_me:12043: \$? = $ac_status" >&5
12044   (exit $ac_status); }; }; then
12045   cf_cv_regex="regexpr.h"
12046 else
12047   echo "$as_me: failed program was:" >&5
12048 cat conftest.$ac_ext >&5
12049 LIBS="$cf_save_LIBS"
12050 fi
12051 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12052 fi
12053 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12054 fi
12055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12056
12057 fi
12058
12059 echo "$as_me:12059: result: $cf_cv_regex" >&5
12060 echo "${ECHO_T}$cf_cv_regex" >&6
12061 case $cf_cv_regex in
12062         regex.h)   cat >>confdefs.h <<\EOF
12063 #define HAVE_REGEX_H_FUNCS 1
12064 EOF
12065  ;;
12066         regexp.h)  cat >>confdefs.h <<\EOF
12067 #define HAVE_REGEXP_H_FUNCS 1
12068 EOF
12069  ;;
12070         regexpr.h) cat >>confdefs.h <<\EOF
12071 #define HAVE_REGEXPR_H_FUNCS 1
12072 EOF
12073  ;;
12074 esac
12075
12076 for ac_header in \
12077 fcntl.h \
12078 getopt.h \
12079 limits.h \
12080 locale.h \
12081 poll.h \
12082 sys/bsdtypes.h \
12083 sys/ioctl.h \
12084 sys/param.h \
12085 sys/poll.h \
12086 sys/select.h \
12087 sys/time.h \
12088 sys/times.h \
12089 ttyent.h \
12090 unistd.h \
12091 wctype.h \
12092
12093 do
12094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12095 echo "$as_me:12095: checking for $ac_header" >&5
12096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12098   echo $ECHO_N "(cached) $ECHO_C" >&6
12099 else
12100   cat >conftest.$ac_ext <<_ACEOF
12101 #line 12101 "configure"
12102 #include "confdefs.h"
12103 #include <$ac_header>
12104 _ACEOF
12105 if { (eval echo "$as_me:12105: \"$ac_cpp conftest.$ac_ext\"") >&5
12106   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12107   ac_status=$?
12108   egrep -v '^ *\+' conftest.er1 >conftest.err
12109   rm -f conftest.er1
12110   cat conftest.err >&5
12111   echo "$as_me:12111: \$? = $ac_status" >&5
12112   (exit $ac_status); } >/dev/null; then
12113   if test -s conftest.err; then
12114     ac_cpp_err=$ac_c_preproc_warn_flag
12115   else
12116     ac_cpp_err=
12117   fi
12118 else
12119   ac_cpp_err=yes
12120 fi
12121 if test -z "$ac_cpp_err"; then
12122   eval "$as_ac_Header=yes"
12123 else
12124   echo "$as_me: failed program was:" >&5
12125   cat conftest.$ac_ext >&5
12126   eval "$as_ac_Header=no"
12127 fi
12128 rm -f conftest.err conftest.$ac_ext
12129 fi
12130 echo "$as_me:12130: result: `eval echo '${'$as_ac_Header'}'`" >&5
12131 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12132 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12133   cat >>confdefs.h <<EOF
12134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12135 EOF
12136
12137 fi
12138 done
12139
12140 # check for ISC (this may also define _POSIX_SOURCE)
12141 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12142 if test "$ISC" = yes ; then
12143
12144 echo "$as_me:12144: checking for main in -lcposix" >&5
12145 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12146 if test "${ac_cv_lib_cposix_main+set}" = set; then
12147   echo $ECHO_N "(cached) $ECHO_C" >&6
12148 else
12149   ac_check_lib_save_LIBS=$LIBS
12150 LIBS="-lcposix  $LIBS"
12151 cat >conftest.$ac_ext <<_ACEOF
12152 #line 12152 "configure"
12153 #include "confdefs.h"
12154
12155 int
12156 main ()
12157 {
12158 main ();
12159   ;
12160   return 0;
12161 }
12162 _ACEOF
12163 rm -f conftest.$ac_objext conftest$ac_exeext
12164 if { (eval echo "$as_me:12164: \"$ac_link\"") >&5
12165   (eval $ac_link) 2>&5
12166   ac_status=$?
12167   echo "$as_me:12167: \$? = $ac_status" >&5
12168   (exit $ac_status); } &&
12169          { ac_try='test -s conftest$ac_exeext'
12170   { (eval echo "$as_me:12170: \"$ac_try\"") >&5
12171   (eval $ac_try) 2>&5
12172   ac_status=$?
12173   echo "$as_me:12173: \$? = $ac_status" >&5
12174   (exit $ac_status); }; }; then
12175   ac_cv_lib_cposix_main=yes
12176 else
12177   echo "$as_me: failed program was:" >&5
12178 cat conftest.$ac_ext >&5
12179 ac_cv_lib_cposix_main=no
12180 fi
12181 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12182 LIBS=$ac_check_lib_save_LIBS
12183 fi
12184 echo "$as_me:12184: result: $ac_cv_lib_cposix_main" >&5
12185 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12186 if test $ac_cv_lib_cposix_main = yes; then
12187   cat >>confdefs.h <<EOF
12188 #define HAVE_LIBCPOSIX 1
12189 EOF
12190
12191   LIBS="-lcposix $LIBS"
12192
12193 fi
12194
12195         echo "$as_me:12195: checking for bzero in -linet" >&5
12196 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12197 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12198   echo $ECHO_N "(cached) $ECHO_C" >&6
12199 else
12200   ac_check_lib_save_LIBS=$LIBS
12201 LIBS="-linet  $LIBS"
12202 cat >conftest.$ac_ext <<_ACEOF
12203 #line 12203 "configure"
12204 #include "confdefs.h"
12205
12206 /* Override any gcc2 internal prototype to avoid an error.  */
12207 #ifdef __cplusplus
12208 extern "C"
12209 #endif
12210 /* We use char because int might match the return type of a gcc2
12211    builtin and then its argument prototype would still apply.  */
12212 char bzero ();
12213 int
12214 main ()
12215 {
12216 bzero ();
12217   ;
12218   return 0;
12219 }
12220 _ACEOF
12221 rm -f conftest.$ac_objext conftest$ac_exeext
12222 if { (eval echo "$as_me:12222: \"$ac_link\"") >&5
12223   (eval $ac_link) 2>&5
12224   ac_status=$?
12225   echo "$as_me:12225: \$? = $ac_status" >&5
12226   (exit $ac_status); } &&
12227          { ac_try='test -s conftest$ac_exeext'
12228   { (eval echo "$as_me:12228: \"$ac_try\"") >&5
12229   (eval $ac_try) 2>&5
12230   ac_status=$?
12231   echo "$as_me:12231: \$? = $ac_status" >&5
12232   (exit $ac_status); }; }; then
12233   ac_cv_lib_inet_bzero=yes
12234 else
12235   echo "$as_me: failed program was:" >&5
12236 cat conftest.$ac_ext >&5
12237 ac_cv_lib_inet_bzero=no
12238 fi
12239 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12240 LIBS=$ac_check_lib_save_LIBS
12241 fi
12242 echo "$as_me:12242: result: $ac_cv_lib_inet_bzero" >&5
12243 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12244 if test $ac_cv_lib_inet_bzero = yes; then
12245   LIBS="$LIBS -linet"
12246 fi
12247 fi
12248
12249 echo "$as_me:12249: checking if sys/time.h works with sys/select.h" >&5
12250 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12251 if test "${cf_cv_sys_time_select+set}" = set; then
12252   echo $ECHO_N "(cached) $ECHO_C" >&6
12253 else
12254
12255 cat >conftest.$ac_ext <<_ACEOF
12256 #line 12256 "configure"
12257 #include "confdefs.h"
12258
12259 #include <sys/types.h>
12260 #ifdef HAVE_SYS_TIME_H
12261 #include <sys/time.h>
12262 #endif
12263 #ifdef HAVE_SYS_SELECT_H
12264 #include <sys/select.h>
12265 #endif
12266
12267 int
12268 main ()
12269 {
12270
12271   ;
12272   return 0;
12273 }
12274 _ACEOF
12275 rm -f conftest.$ac_objext
12276 if { (eval echo "$as_me:12276: \"$ac_compile\"") >&5
12277   (eval $ac_compile) 2>&5
12278   ac_status=$?
12279   echo "$as_me:12279: \$? = $ac_status" >&5
12280   (exit $ac_status); } &&
12281          { ac_try='test -s conftest.$ac_objext'
12282   { (eval echo "$as_me:12282: \"$ac_try\"") >&5
12283   (eval $ac_try) 2>&5
12284   ac_status=$?
12285   echo "$as_me:12285: \$? = $ac_status" >&5
12286   (exit $ac_status); }; }; then
12287   cf_cv_sys_time_select=yes
12288 else
12289   echo "$as_me: failed program was:" >&5
12290 cat conftest.$ac_ext >&5
12291 cf_cv_sys_time_select=no
12292 fi
12293 rm -f conftest.$ac_objext conftest.$ac_ext
12294
12295 fi
12296
12297 echo "$as_me:12297: result: $cf_cv_sys_time_select" >&5
12298 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12299 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12300 #define HAVE_SYS_TIME_SELECT 1
12301 EOF
12302
12303 ###     checks for compiler characteristics
12304 ac_ext=c
12305 ac_cpp='$CPP $CPPFLAGS'
12306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12309 ac_main_return=return
12310
12311 echo "$as_me:12311: checking for $CC option to accept ANSI C" >&5
12312 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12313 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12314   echo $ECHO_N "(cached) $ECHO_C" >&6
12315 else
12316   ac_cv_prog_cc_stdc=no
12317 ac_save_CC=$CC
12318 cat >conftest.$ac_ext <<_ACEOF
12319 #line 12319 "configure"
12320 #include "confdefs.h"
12321 #include <stdarg.h>
12322 #include <stdio.h>
12323 #include <sys/types.h>
12324 #include <sys/stat.h>
12325 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12326 struct buf { int x; };
12327 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12328 static char *e (p, i)
12329      char **p;
12330      int i;
12331 {
12332   return p[i];
12333 }
12334 static char *f (char * (*g) (char **, int), char **p, ...)
12335 {
12336   char *s;
12337   va_list v;
12338   va_start (v,p);
12339   s = g (p, va_arg (v,int));
12340   va_end (v);
12341   return s;
12342 }
12343 int test (int i, double x);
12344 struct s1 {int (*f) (int a);};
12345 struct s2 {int (*f) (double a);};
12346 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12347 int argc;
12348 char **argv;
12349 int
12350 main ()
12351 {
12352 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12353   ;
12354   return 0;
12355 }
12356 _ACEOF
12357 # Don't try gcc -ansi; that turns off useful extensions and
12358 # breaks some systems' header files.
12359 # AIX                   -qlanglvl=ansi
12360 # Ultrix and OSF/1      -std1
12361 # HP-UX 10.20 and later -Ae
12362 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12363 # SVR4                  -Xc -D__EXTENSIONS__
12364 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12365 do
12366   CC="$ac_save_CC $ac_arg"
12367   rm -f conftest.$ac_objext
12368 if { (eval echo "$as_me:12368: \"$ac_compile\"") >&5
12369   (eval $ac_compile) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit $ac_status); } &&
12373          { ac_try='test -s conftest.$ac_objext'
12374   { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit $ac_status); }; }; then
12379   ac_cv_prog_cc_stdc=$ac_arg
12380 break
12381 else
12382   echo "$as_me: failed program was:" >&5
12383 cat conftest.$ac_ext >&5
12384 fi
12385 rm -f conftest.$ac_objext
12386 done
12387 rm -f conftest.$ac_ext conftest.$ac_objext
12388 CC=$ac_save_CC
12389
12390 fi
12391
12392 case "x$ac_cv_prog_cc_stdc" in
12393   x|xno)
12394     echo "$as_me:12394: result: none needed" >&5
12395 echo "${ECHO_T}none needed" >&6 ;;
12396   *)
12397     echo "$as_me:12397: result: $ac_cv_prog_cc_stdc" >&5
12398 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12399     CC="$CC $ac_cv_prog_cc_stdc" ;;
12400 esac
12401
12402 echo "$as_me:12402: checking for an ANSI C-conforming const" >&5
12403 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12404 if test "${ac_cv_c_const+set}" = set; then
12405   echo $ECHO_N "(cached) $ECHO_C" >&6
12406 else
12407   cat >conftest.$ac_ext <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410
12411 int
12412 main ()
12413 {
12414 /* FIXME: Include the comments suggested by Paul. */
12415 #ifndef __cplusplus
12416   /* Ultrix mips cc rejects this.  */
12417   typedef int charset[2];
12418   const charset x;
12419   /* SunOS 4.1.1 cc rejects this.  */
12420   char const *const *ccp;
12421   char **p;
12422   /* NEC SVR4.0.2 mips cc rejects this.  */
12423   struct point {int x, y;};
12424   static struct point const zero = {0,0};
12425   /* AIX XL C 1.02.0.0 rejects this.
12426      It does not let you subtract one const X* pointer from another in
12427      an arm of an if-expression whose if-part is not a constant
12428      expression */
12429   const char *g = "string";
12430   ccp = &g + (g ? g-g : 0);
12431   /* HPUX 7.0 cc rejects these. */
12432   ++ccp;
12433   p = (char**) ccp;
12434   ccp = (char const *const *) p;
12435   { /* SCO 3.2v4 cc rejects this.  */
12436     char *t;
12437     char const *s = 0 ? (char *) 0 : (char const *) 0;
12438
12439     *t++ = 0;
12440   }
12441   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12442     int x[] = {25, 17};
12443     const int *foo = &x[0];
12444     ++foo;
12445   }
12446   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12447     typedef const int *iptr;
12448     iptr p = 0;
12449     ++p;
12450   }
12451   { /* AIX XL C 1.02.0.0 rejects this saying
12452        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12453     struct s { int j; const int *ap[3]; };
12454     struct s *b; b->j = 5;
12455   }
12456   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12457     const int foo = 10;
12458   }
12459 #endif
12460
12461   ;
12462   return 0;
12463 }
12464 _ACEOF
12465 rm -f conftest.$ac_objext
12466 if { (eval echo "$as_me:12466: \"$ac_compile\"") >&5
12467   (eval $ac_compile) 2>&5
12468   ac_status=$?
12469   echo "$as_me:12469: \$? = $ac_status" >&5
12470   (exit $ac_status); } &&
12471          { ac_try='test -s conftest.$ac_objext'
12472   { (eval echo "$as_me:12472: \"$ac_try\"") >&5
12473   (eval $ac_try) 2>&5
12474   ac_status=$?
12475   echo "$as_me:12475: \$? = $ac_status" >&5
12476   (exit $ac_status); }; }; then
12477   ac_cv_c_const=yes
12478 else
12479   echo "$as_me: failed program was:" >&5
12480 cat conftest.$ac_ext >&5
12481 ac_cv_c_const=no
12482 fi
12483 rm -f conftest.$ac_objext conftest.$ac_ext
12484 fi
12485 echo "$as_me:12485: result: $ac_cv_c_const" >&5
12486 echo "${ECHO_T}$ac_cv_c_const" >&6
12487 if test $ac_cv_c_const = no; then
12488
12489 cat >>confdefs.h <<\EOF
12490 #define const
12491 EOF
12492
12493 fi
12494
12495 echo "$as_me:12495: checking for inline" >&5
12496 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12497 if test "${ac_cv_c_inline+set}" = set; then
12498   echo $ECHO_N "(cached) $ECHO_C" >&6
12499 else
12500   ac_cv_c_inline=no
12501 for ac_kw in inline __inline__ __inline; do
12502   cat >conftest.$ac_ext <<_ACEOF
12503 #line 12503 "configure"
12504 #include "confdefs.h"
12505 #ifndef __cplusplus
12506 static $ac_kw int static_foo () {return 0; }
12507 $ac_kw int foo () {return 0; }
12508 #endif
12509
12510 _ACEOF
12511 rm -f conftest.$ac_objext
12512 if { (eval echo "$as_me:12512: \"$ac_compile\"") >&5
12513   (eval $ac_compile) 2>&5
12514   ac_status=$?
12515   echo "$as_me:12515: \$? = $ac_status" >&5
12516   (exit $ac_status); } &&
12517          { ac_try='test -s conftest.$ac_objext'
12518   { (eval echo "$as_me:12518: \"$ac_try\"") >&5
12519   (eval $ac_try) 2>&5
12520   ac_status=$?
12521   echo "$as_me:12521: \$? = $ac_status" >&5
12522   (exit $ac_status); }; }; then
12523   ac_cv_c_inline=$ac_kw; break
12524 else
12525   echo "$as_me: failed program was:" >&5
12526 cat conftest.$ac_ext >&5
12527 fi
12528 rm -f conftest.$ac_objext conftest.$ac_ext
12529 done
12530
12531 fi
12532 echo "$as_me:12532: result: $ac_cv_c_inline" >&5
12533 echo "${ECHO_T}$ac_cv_c_inline" >&6
12534 case $ac_cv_c_inline in
12535   inline | yes) ;;
12536   no)
12537 cat >>confdefs.h <<\EOF
12538 #define inline
12539 EOF
12540  ;;
12541   *)  cat >>confdefs.h <<EOF
12542 #define inline $ac_cv_c_inline
12543 EOF
12544  ;;
12545 esac
12546
12547 NCURSES_INLINE=
12548 if test "$ac_cv_c_inline" != no ; then
12549   NCURSES_INLINE=inline
12550   if test "$INTEL_COMPILER" = yes
12551   then
12552     :
12553   elif test "$GCC" = yes
12554   then
12555     echo "$as_me:12555: checking if gcc supports options to tune inlining" >&5
12556 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12557 if test "${cf_cv_gcc_inline+set}" = set; then
12558   echo $ECHO_N "(cached) $ECHO_C" >&6
12559 else
12560
12561       cf_save_CFLAGS=$CFLAGS
12562       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12563       cat >conftest.$ac_ext <<_ACEOF
12564 #line 12564 "configure"
12565 #include "confdefs.h"
12566 inline int foo(void) { return 1; }
12567 int
12568 main ()
12569 {
12570 ${cf_cv_main_return:-return} foo()
12571   ;
12572   return 0;
12573 }
12574 _ACEOF
12575 rm -f conftest.$ac_objext
12576 if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
12577   (eval $ac_compile) 2>&5
12578   ac_status=$?
12579   echo "$as_me:12579: \$? = $ac_status" >&5
12580   (exit $ac_status); } &&
12581          { ac_try='test -s conftest.$ac_objext'
12582   { (eval echo "$as_me:12582: \"$ac_try\"") >&5
12583   (eval $ac_try) 2>&5
12584   ac_status=$?
12585   echo "$as_me:12585: \$? = $ac_status" >&5
12586   (exit $ac_status); }; }; then
12587   cf_cv_gcc_inline=yes
12588 else
12589   echo "$as_me: failed program was:" >&5
12590 cat conftest.$ac_ext >&5
12591 cf_cv_gcc_inline=no
12592 fi
12593 rm -f conftest.$ac_objext conftest.$ac_ext
12594       CFLAGS=$cf_save_CFLAGS
12595
12596 fi
12597 echo "$as_me:12597: result: $cf_cv_gcc_inline" >&5
12598 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12599     if test "$cf_cv_gcc_inline" = yes ; then
12600
12601 cf_fix_cppflags=no
12602 cf_new_cflags=
12603 cf_new_cppflags=
12604 cf_new_extra_cppflags=
12605
12606 for cf_add_cflags in --param max-inline-insns-single=1200
12607 do
12608 case $cf_fix_cppflags in
12609 no)
12610         case $cf_add_cflags in #(vi
12611         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12612                 case $cf_add_cflags in
12613                 -D*)
12614                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12615
12616                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12617                         && test -z "${cf_tst_cflags}" \
12618                         && cf_fix_cppflags=yes
12619
12620                         if test $cf_fix_cppflags = yes ; then
12621                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12622                                 continue
12623                         elif test "${cf_tst_cflags}" = "\"'" ; then
12624                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12625                                 continue
12626                         fi
12627                         ;;
12628                 esac
12629                 case "$CPPFLAGS" in
12630                 *$cf_add_cflags) #(vi
12631                         ;;
12632                 *) #(vi
12633                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12634                         ;;
12635                 esac
12636                 ;;
12637         *)
12638                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12639                 ;;
12640         esac
12641         ;;
12642 yes)
12643         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12644
12645         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12646
12647         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12648         && test -z "${cf_tst_cflags}" \
12649         && cf_fix_cppflags=no
12650         ;;
12651 esac
12652 done
12653
12654 if test -n "$cf_new_cflags" ; then
12655
12656         CFLAGS="$CFLAGS $cf_new_cflags"
12657 fi
12658
12659 if test -n "$cf_new_cppflags" ; then
12660
12661         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
12662 fi
12663
12664 if test -n "$cf_new_extra_cppflags" ; then
12665
12666         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12667 fi
12668
12669     fi
12670   fi
12671 fi
12672
12673 echo "$as_me:12673: checking for signal global datatype" >&5
12674 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12675 if test "${cf_cv_sig_atomic_t+set}" = set; then
12676   echo $ECHO_N "(cached) $ECHO_C" >&6
12677 else
12678
12679         for cf_type in \
12680                 "volatile sig_atomic_t" \
12681                 "sig_atomic_t" \
12682                 "int"
12683         do
12684         cat >conftest.$ac_ext <<_ACEOF
12685 #line 12685 "configure"
12686 #include "confdefs.h"
12687
12688 #include <sys/types.h>
12689 #include <signal.h>
12690 #include <stdio.h>
12691
12692 extern $cf_type x;
12693 $cf_type x;
12694 static void handler(int sig)
12695 {
12696         x = 5;
12697 }
12698 int
12699 main ()
12700 {
12701 signal(SIGINT, handler);
12702                  x = 1
12703   ;
12704   return 0;
12705 }
12706 _ACEOF
12707 rm -f conftest.$ac_objext
12708 if { (eval echo "$as_me:12708: \"$ac_compile\"") >&5
12709   (eval $ac_compile) 2>&5
12710   ac_status=$?
12711   echo "$as_me:12711: \$? = $ac_status" >&5
12712   (exit $ac_status); } &&
12713          { ac_try='test -s conftest.$ac_objext'
12714   { (eval echo "$as_me:12714: \"$ac_try\"") >&5
12715   (eval $ac_try) 2>&5
12716   ac_status=$?
12717   echo "$as_me:12717: \$? = $ac_status" >&5
12718   (exit $ac_status); }; }; then
12719   cf_cv_sig_atomic_t=$cf_type
12720 else
12721   echo "$as_me: failed program was:" >&5
12722 cat conftest.$ac_ext >&5
12723 cf_cv_sig_atomic_t=no
12724 fi
12725 rm -f conftest.$ac_objext conftest.$ac_ext
12726                 test "$cf_cv_sig_atomic_t" != no && break
12727         done
12728
12729 fi
12730
12731 echo "$as_me:12731: result: $cf_cv_sig_atomic_t" >&5
12732 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12733 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12734 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12735 EOF
12736
12737 if test $NCURSES_CHTYPE = auto ; then
12738
12739 echo "$as_me:12739: checking for type of chtype" >&5
12740 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12741 if test "${cf_cv_typeof_chtype+set}" = set; then
12742   echo $ECHO_N "(cached) $ECHO_C" >&6
12743 else
12744
12745                 if test "$cross_compiling" = yes; then
12746   cf_cv_typeof_chtype=long
12747 else
12748   cat >conftest.$ac_ext <<_ACEOF
12749 #line 12749 "configure"
12750 #include "confdefs.h"
12751
12752 #define WANT_BITS 31
12753 #include <stdio.h>
12754 int main()
12755 {
12756         FILE *fp = fopen("cf_test.out", "w");
12757         if (fp != 0) {
12758                 char *result = "long";
12759                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12760                         int n;
12761                         unsigned int x, y;
12762                         for (n = 0; n < WANT_BITS; n++) {
12763                                 x = (1 << n);
12764                                 y = (x >> n);
12765                                 if (y != 1 || x == 0) {
12766                                         x = 0;
12767                                         break;
12768                                 }
12769                         }
12770                         /*
12771                          * If x is nonzero, an int is big enough for the bits
12772                          * that we want.
12773                          */
12774                         result = (x != 0) ? "int" : "long";
12775                 }
12776                 fputs(result, fp);
12777                 fclose(fp);
12778         }
12779         ${cf_cv_main_return:-return}(0);
12780 }
12781
12782 _ACEOF
12783 rm -f conftest$ac_exeext
12784 if { (eval echo "$as_me:12784: \"$ac_link\"") >&5
12785   (eval $ac_link) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12789   { (eval echo "$as_me:12789: \"$ac_try\"") >&5
12790   (eval $ac_try) 2>&5
12791   ac_status=$?
12792   echo "$as_me:12792: \$? = $ac_status" >&5
12793   (exit $ac_status); }; }; then
12794   cf_cv_typeof_chtype=`cat cf_test.out`
12795 else
12796   echo "$as_me: program exited with status $ac_status" >&5
12797 echo "$as_me: failed program was:" >&5
12798 cat conftest.$ac_ext >&5
12799 cf_cv_typeof_chtype=long
12800 fi
12801 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12802 fi
12803                 rm -f cf_test.out
12804
12805 fi
12806
12807 echo "$as_me:12807: result: $cf_cv_typeof_chtype" >&5
12808 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12809
12810 cat >>confdefs.h <<EOF
12811 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12812 EOF
12813
12814 else
12815         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12816 fi
12817 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12818
12819 echo "$as_me:12819: checking if unsigned literals are legal" >&5
12820 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12821 if test "${cf_cv_unsigned_literals+set}" = set; then
12822   echo $ECHO_N "(cached) $ECHO_C" >&6
12823 else
12824
12825         cat >conftest.$ac_ext <<_ACEOF
12826 #line 12826 "configure"
12827 #include "confdefs.h"
12828
12829 int
12830 main ()
12831 {
12832 long x = 1L + 1UL + 1U + 1
12833   ;
12834   return 0;
12835 }
12836 _ACEOF
12837 rm -f conftest.$ac_objext
12838 if { (eval echo "$as_me:12838: \"$ac_compile\"") >&5
12839   (eval $ac_compile) 2>&5
12840   ac_status=$?
12841   echo "$as_me:12841: \$? = $ac_status" >&5
12842   (exit $ac_status); } &&
12843          { ac_try='test -s conftest.$ac_objext'
12844   { (eval echo "$as_me:12844: \"$ac_try\"") >&5
12845   (eval $ac_try) 2>&5
12846   ac_status=$?
12847   echo "$as_me:12847: \$? = $ac_status" >&5
12848   (exit $ac_status); }; }; then
12849   cf_cv_unsigned_literals=yes
12850 else
12851   echo "$as_me: failed program was:" >&5
12852 cat conftest.$ac_ext >&5
12853 cf_cv_unsigned_literals=no
12854 fi
12855 rm -f conftest.$ac_objext conftest.$ac_ext
12856
12857 fi
12858
12859 echo "$as_me:12859: result: $cf_cv_unsigned_literals" >&5
12860 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12861
12862 cf_cv_1UL="1"
12863 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12864 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12865
12866 if test $NCURSES_MMASK_T = auto ; then
12867         cf_cv_typeof_mmask_t=long
12868 else
12869         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12870 fi
12871 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12872
12873 ###     Checks for external-data
12874
12875 echo "$as_me:12875: checking if external errno is declared" >&5
12876 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12877 if test "${cf_cv_dcl_errno+set}" = set; then
12878   echo $ECHO_N "(cached) $ECHO_C" >&6
12879 else
12880
12881     cat >conftest.$ac_ext <<_ACEOF
12882 #line 12882 "configure"
12883 #include "confdefs.h"
12884
12885 #ifdef HAVE_STDLIB_H
12886 #include <stdlib.h>
12887 #endif
12888 #include <stdio.h>
12889 #include <sys/types.h>
12890 #include <errno.h>
12891 int
12892 main ()
12893 {
12894 int x = (int) errno
12895   ;
12896   return 0;
12897 }
12898 _ACEOF
12899 rm -f conftest.$ac_objext
12900 if { (eval echo "$as_me:12900: \"$ac_compile\"") >&5
12901   (eval $ac_compile) 2>&5
12902   ac_status=$?
12903   echo "$as_me:12903: \$? = $ac_status" >&5
12904   (exit $ac_status); } &&
12905          { ac_try='test -s conftest.$ac_objext'
12906   { (eval echo "$as_me:12906: \"$ac_try\"") >&5
12907   (eval $ac_try) 2>&5
12908   ac_status=$?
12909   echo "$as_me:12909: \$? = $ac_status" >&5
12910   (exit $ac_status); }; }; then
12911   cf_cv_dcl_errno=yes
12912 else
12913   echo "$as_me: failed program was:" >&5
12914 cat conftest.$ac_ext >&5
12915 cf_cv_dcl_errno=no
12916 fi
12917 rm -f conftest.$ac_objext conftest.$ac_ext
12918
12919 fi
12920 echo "$as_me:12920: result: $cf_cv_dcl_errno" >&5
12921 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
12922
12923 if test "$cf_cv_dcl_errno" = no ; then
12924
12925 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12926
12927     cat >>confdefs.h <<EOF
12928 #define $cf_result 1
12929 EOF
12930
12931 fi
12932
12933 # It's possible (for near-UNIX clones) that the data doesn't exist
12934
12935 echo "$as_me:12935: checking if external errno exists" >&5
12936 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
12937 if test "${cf_cv_have_errno+set}" = set; then
12938   echo $ECHO_N "(cached) $ECHO_C" >&6
12939 else
12940
12941     cat >conftest.$ac_ext <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944
12945 #undef errno
12946 extern int errno;
12947
12948 int
12949 main ()
12950 {
12951 errno = 2
12952   ;
12953   return 0;
12954 }
12955 _ACEOF
12956 rm -f conftest.$ac_objext conftest$ac_exeext
12957 if { (eval echo "$as_me:12957: \"$ac_link\"") >&5
12958   (eval $ac_link) 2>&5
12959   ac_status=$?
12960   echo "$as_me:12960: \$? = $ac_status" >&5
12961   (exit $ac_status); } &&
12962          { ac_try='test -s conftest$ac_exeext'
12963   { (eval echo "$as_me:12963: \"$ac_try\"") >&5
12964   (eval $ac_try) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit $ac_status); }; }; then
12968   cf_cv_have_errno=yes
12969 else
12970   echo "$as_me: failed program was:" >&5
12971 cat conftest.$ac_ext >&5
12972 cf_cv_have_errno=no
12973 fi
12974 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12975
12976 fi
12977 echo "$as_me:12977: result: $cf_cv_have_errno" >&5
12978 echo "${ECHO_T}$cf_cv_have_errno" >&6
12979
12980 if test "$cf_cv_have_errno" = yes ; then
12981
12982 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12983
12984     cat >>confdefs.h <<EOF
12985 #define $cf_result 1
12986 EOF
12987
12988 fi
12989
12990 echo "$as_me:12990: checking if data-only library module links" >&5
12991 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
12992 if test "${cf_cv_link_dataonly+set}" = set; then
12993   echo $ECHO_N "(cached) $ECHO_C" >&6
12994 else
12995
12996         rm -f conftest.a
12997         cat >conftest.$ac_ext <<EOF
12998 #line 12998 "configure"
12999 int     testdata[3] = { 123, 456, 789 };
13000 EOF
13001         if { (eval echo "$as_me:13001: \"$ac_compile\"") >&5
13002   (eval $ac_compile) 2>&5
13003   ac_status=$?
13004   echo "$as_me:13004: \$? = $ac_status" >&5
13005   (exit $ac_status); } ; then
13006                 mv conftest.o data.o && \
13007                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13008         fi
13009         rm -f conftest.$ac_ext data.o
13010         cat >conftest.$ac_ext <<EOF
13011 #line 13011 "configure"
13012 int     testfunc()
13013 {
13014 #if defined(NeXT)
13015         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13016 #else
13017         extern int testdata[3];
13018         return testdata[0] == 123
13019            &&  testdata[1] == 456
13020            &&  testdata[2] == 789;
13021 #endif
13022 }
13023 EOF
13024         if { (eval echo "$as_me:13024: \"$ac_compile\"") >&5
13025   (eval $ac_compile) 2>&5
13026   ac_status=$?
13027   echo "$as_me:13027: \$? = $ac_status" >&5
13028   (exit $ac_status); }; then
13029                 mv conftest.o func.o && \
13030                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13031         fi
13032         rm -f conftest.$ac_ext func.o
13033         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13034         cf_saveLIBS="$LIBS"
13035         LIBS="conftest.a $LIBS"
13036         if test "$cross_compiling" = yes; then
13037   cf_cv_link_dataonly=unknown
13038 else
13039   cat >conftest.$ac_ext <<_ACEOF
13040 #line 13040 "configure"
13041 #include "confdefs.h"
13042
13043         int main()
13044         {
13045                 extern int testfunc();
13046                 ${cf_cv_main_return:-return} (!testfunc());
13047         }
13048
13049 _ACEOF
13050 rm -f conftest$ac_exeext
13051 if { (eval echo "$as_me:13051: \"$ac_link\"") >&5
13052   (eval $ac_link) 2>&5
13053   ac_status=$?
13054   echo "$as_me:13054: \$? = $ac_status" >&5
13055   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13056   { (eval echo "$as_me:13056: \"$ac_try\"") >&5
13057   (eval $ac_try) 2>&5
13058   ac_status=$?
13059   echo "$as_me:13059: \$? = $ac_status" >&5
13060   (exit $ac_status); }; }; then
13061   cf_cv_link_dataonly=yes
13062 else
13063   echo "$as_me: program exited with status $ac_status" >&5
13064 echo "$as_me: failed program was:" >&5
13065 cat conftest.$ac_ext >&5
13066 cf_cv_link_dataonly=no
13067 fi
13068 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13069 fi
13070         LIBS="$cf_saveLIBS"
13071
13072 fi
13073
13074 echo "$as_me:13074: result: $cf_cv_link_dataonly" >&5
13075 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13076
13077 if test "$cf_cv_link_dataonly" = no ; then
13078         cat >>confdefs.h <<\EOF
13079 #define BROKEN_LINKER 1
13080 EOF
13081
13082         BROKEN_LINKER=1
13083 fi
13084
13085 ###     Checks for library functions.
13086
13087 for ac_func in \
13088 getcwd \
13089 getegid \
13090 geteuid \
13091 getttynam \
13092 issetugid \
13093 poll \
13094 remove \
13095 select \
13096 setbuf \
13097 setbuffer \
13098 setvbuf \
13099 sigaction \
13100 sigvec \
13101 strdup \
13102 strstr \
13103 tcgetpgrp \
13104 times \
13105 vsnprintf \
13106
13107 do
13108 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13109 echo "$as_me:13109: checking for $ac_func" >&5
13110 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13111 if eval "test \"\${$as_ac_var+set}\" = set"; then
13112   echo $ECHO_N "(cached) $ECHO_C" >&6
13113 else
13114   cat >conftest.$ac_ext <<_ACEOF
13115 #line 13115 "configure"
13116 #include "confdefs.h"
13117 /* System header to define __stub macros and hopefully few prototypes,
13118     which can conflict with char $ac_func (); below.  */
13119 #include <assert.h>
13120 /* Override any gcc2 internal prototype to avoid an error.  */
13121 #ifdef __cplusplus
13122 extern "C"
13123 #endif
13124 /* We use char because int might match the return type of a gcc2
13125    builtin and then its argument prototype would still apply.  */
13126 char $ac_func ();
13127 char (*f) ();
13128
13129 int
13130 main ()
13131 {
13132 /* The GNU C library defines this for functions which it implements
13133     to always fail with ENOSYS.  Some functions are actually named
13134     something starting with __ and the normal name is an alias.  */
13135 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13136 choke me
13137 #else
13138 f = $ac_func;
13139 #endif
13140
13141   ;
13142   return 0;
13143 }
13144 _ACEOF
13145 rm -f conftest.$ac_objext conftest$ac_exeext
13146 if { (eval echo "$as_me:13146: \"$ac_link\"") >&5
13147   (eval $ac_link) 2>&5
13148   ac_status=$?
13149   echo "$as_me:13149: \$? = $ac_status" >&5
13150   (exit $ac_status); } &&
13151          { ac_try='test -s conftest$ac_exeext'
13152   { (eval echo "$as_me:13152: \"$ac_try\"") >&5
13153   (eval $ac_try) 2>&5
13154   ac_status=$?
13155   echo "$as_me:13155: \$? = $ac_status" >&5
13156   (exit $ac_status); }; }; then
13157   eval "$as_ac_var=yes"
13158 else
13159   echo "$as_me: failed program was:" >&5
13160 cat conftest.$ac_ext >&5
13161 eval "$as_ac_var=no"
13162 fi
13163 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13164 fi
13165 echo "$as_me:13165: result: `eval echo '${'$as_ac_var'}'`" >&5
13166 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13167 if test `eval echo '${'$as_ac_var'}'` = yes; then
13168   cat >>confdefs.h <<EOF
13169 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13170 EOF
13171
13172 fi
13173 done
13174
13175 if test "$with_getcap" = "yes" ; then
13176
13177 echo "$as_me:13177: checking for terminal-capability database functions" >&5
13178 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13179 if test "${cf_cv_cgetent+set}" = set; then
13180   echo $ECHO_N "(cached) $ECHO_C" >&6
13181 else
13182
13183 cat >conftest.$ac_ext <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186
13187 #include <stdlib.h>
13188 int
13189 main ()
13190 {
13191
13192         char temp[128];
13193         char *buf = temp;
13194         char *db_array = temp;
13195         cgetent(&buf, /* int *, */ &db_array, "vt100");
13196         cgetcap(buf, "tc", '=');
13197         cgetmatch(buf, "tc");
13198
13199   ;
13200   return 0;
13201 }
13202 _ACEOF
13203 rm -f conftest.$ac_objext conftest$ac_exeext
13204 if { (eval echo "$as_me:13204: \"$ac_link\"") >&5
13205   (eval $ac_link) 2>&5
13206   ac_status=$?
13207   echo "$as_me:13207: \$? = $ac_status" >&5
13208   (exit $ac_status); } &&
13209          { ac_try='test -s conftest$ac_exeext'
13210   { (eval echo "$as_me:13210: \"$ac_try\"") >&5
13211   (eval $ac_try) 2>&5
13212   ac_status=$?
13213   echo "$as_me:13213: \$? = $ac_status" >&5
13214   (exit $ac_status); }; }; then
13215   cf_cv_cgetent=yes
13216 else
13217   echo "$as_me: failed program was:" >&5
13218 cat conftest.$ac_ext >&5
13219 cf_cv_cgetent=no
13220 fi
13221 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13222
13223 fi
13224
13225 echo "$as_me:13225: result: $cf_cv_cgetent" >&5
13226 echo "${ECHO_T}$cf_cv_cgetent" >&6
13227 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13228 #define HAVE_BSD_CGETENT 1
13229 EOF
13230
13231 fi
13232
13233 echo "$as_me:13233: checking for isascii" >&5
13234 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13235 if test "${cf_cv_have_isascii+set}" = set; then
13236   echo $ECHO_N "(cached) $ECHO_C" >&6
13237 else
13238
13239         cat >conftest.$ac_ext <<_ACEOF
13240 #line 13240 "configure"
13241 #include "confdefs.h"
13242 #include <ctype.h>
13243 int
13244 main ()
13245 {
13246 int x = isascii(' ')
13247   ;
13248   return 0;
13249 }
13250 _ACEOF
13251 rm -f conftest.$ac_objext conftest$ac_exeext
13252 if { (eval echo "$as_me:13252: \"$ac_link\"") >&5
13253   (eval $ac_link) 2>&5
13254   ac_status=$?
13255   echo "$as_me:13255: \$? = $ac_status" >&5
13256   (exit $ac_status); } &&
13257          { ac_try='test -s conftest$ac_exeext'
13258   { (eval echo "$as_me:13258: \"$ac_try\"") >&5
13259   (eval $ac_try) 2>&5
13260   ac_status=$?
13261   echo "$as_me:13261: \$? = $ac_status" >&5
13262   (exit $ac_status); }; }; then
13263   cf_cv_have_isascii=yes
13264 else
13265   echo "$as_me: failed program was:" >&5
13266 cat conftest.$ac_ext >&5
13267 cf_cv_have_isascii=no
13268 fi
13269 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13270
13271 fi
13272 echo "$as_me:13272: result: $cf_cv_have_isascii" >&5
13273 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13274 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13275 #define HAVE_ISASCII 1
13276 EOF
13277
13278 if test "$ac_cv_func_sigaction" = yes; then
13279 echo "$as_me:13279: checking whether sigaction needs _POSIX_SOURCE" >&5
13280 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13281 cat >conftest.$ac_ext <<_ACEOF
13282 #line 13282 "configure"
13283 #include "confdefs.h"
13284
13285 #include <sys/types.h>
13286 #include <signal.h>
13287 int
13288 main ()
13289 {
13290 struct sigaction act
13291   ;
13292   return 0;
13293 }
13294 _ACEOF
13295 rm -f conftest.$ac_objext
13296 if { (eval echo "$as_me:13296: \"$ac_compile\"") >&5
13297   (eval $ac_compile) 2>&5
13298   ac_status=$?
13299   echo "$as_me:13299: \$? = $ac_status" >&5
13300   (exit $ac_status); } &&
13301          { ac_try='test -s conftest.$ac_objext'
13302   { (eval echo "$as_me:13302: \"$ac_try\"") >&5
13303   (eval $ac_try) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); }; }; then
13307   sigact_bad=no
13308 else
13309   echo "$as_me: failed program was:" >&5
13310 cat conftest.$ac_ext >&5
13311
13312 cat >conftest.$ac_ext <<_ACEOF
13313 #line 13313 "configure"
13314 #include "confdefs.h"
13315
13316 #define _POSIX_SOURCE
13317 #include <sys/types.h>
13318 #include <signal.h>
13319 int
13320 main ()
13321 {
13322 struct sigaction act
13323   ;
13324   return 0;
13325 }
13326 _ACEOF
13327 rm -f conftest.$ac_objext
13328 if { (eval echo "$as_me:13328: \"$ac_compile\"") >&5
13329   (eval $ac_compile) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit $ac_status); } &&
13333          { ac_try='test -s conftest.$ac_objext'
13334   { (eval echo "$as_me:13334: \"$ac_try\"") >&5
13335   (eval $ac_try) 2>&5
13336   ac_status=$?
13337   echo "$as_me:13337: \$? = $ac_status" >&5
13338   (exit $ac_status); }; }; then
13339   sigact_bad=yes
13340          cat >>confdefs.h <<\EOF
13341 #define SVR4_ACTION 1
13342 EOF
13343
13344 else
13345   echo "$as_me: failed program was:" >&5
13346 cat conftest.$ac_ext >&5
13347 sigact_bad=unknown
13348 fi
13349 rm -f conftest.$ac_objext conftest.$ac_ext
13350 fi
13351 rm -f conftest.$ac_objext conftest.$ac_ext
13352 echo "$as_me:13352: result: $sigact_bad" >&5
13353 echo "${ECHO_T}$sigact_bad" >&6
13354 fi
13355
13356 echo "$as_me:13356: checking if nanosleep really works" >&5
13357 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13358 if test "${cf_cv_func_nanosleep+set}" = set; then
13359   echo $ECHO_N "(cached) $ECHO_C" >&6
13360 else
13361
13362 if test "$cross_compiling" = yes; then
13363   cf_cv_func_nanosleep=unknown
13364 else
13365   cat >conftest.$ac_ext <<_ACEOF
13366 #line 13366 "configure"
13367 #include "confdefs.h"
13368
13369 #include <stdio.h>
13370 #include <errno.h>
13371 #include <time.h>
13372
13373 #ifdef HAVE_SYS_TIME_H
13374 #include <sys/time.h>
13375 #endif
13376
13377 int main() {
13378         struct timespec ts1, ts2;
13379         int code;
13380         ts1.tv_sec  = 0;
13381         ts1.tv_nsec = 750000000;
13382         ts2.tv_sec  = 0;
13383         ts2.tv_nsec = 0;
13384         errno = 0;
13385         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13386         ${cf_cv_main_return:-return}(code != 0);
13387 }
13388
13389 _ACEOF
13390 rm -f conftest$ac_exeext
13391 if { (eval echo "$as_me:13391: \"$ac_link\"") >&5
13392   (eval $ac_link) 2>&5
13393   ac_status=$?
13394   echo "$as_me:13394: \$? = $ac_status" >&5
13395   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13396   { (eval echo "$as_me:13396: \"$ac_try\"") >&5
13397   (eval $ac_try) 2>&5
13398   ac_status=$?
13399   echo "$as_me:13399: \$? = $ac_status" >&5
13400   (exit $ac_status); }; }; then
13401   cf_cv_func_nanosleep=yes
13402 else
13403   echo "$as_me: program exited with status $ac_status" >&5
13404 echo "$as_me: failed program was:" >&5
13405 cat conftest.$ac_ext >&5
13406 cf_cv_func_nanosleep=no
13407 fi
13408 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13409 fi
13410 fi
13411 echo "$as_me:13411: result: $cf_cv_func_nanosleep" >&5
13412 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13413
13414 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13415 #define HAVE_NANOSLEEP 1
13416 EOF
13417
13418 for ac_header in \
13419 termio.h \
13420 termios.h \
13421 unistd.h \
13422
13423 do
13424 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13425 echo "$as_me:13425: checking for $ac_header" >&5
13426 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13427 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13428   echo $ECHO_N "(cached) $ECHO_C" >&6
13429 else
13430   cat >conftest.$ac_ext <<_ACEOF
13431 #line 13431 "configure"
13432 #include "confdefs.h"
13433 #include <$ac_header>
13434 _ACEOF
13435 if { (eval echo "$as_me:13435: \"$ac_cpp conftest.$ac_ext\"") >&5
13436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13437   ac_status=$?
13438   egrep -v '^ *\+' conftest.er1 >conftest.err
13439   rm -f conftest.er1
13440   cat conftest.err >&5
13441   echo "$as_me:13441: \$? = $ac_status" >&5
13442   (exit $ac_status); } >/dev/null; then
13443   if test -s conftest.err; then
13444     ac_cpp_err=$ac_c_preproc_warn_flag
13445   else
13446     ac_cpp_err=
13447   fi
13448 else
13449   ac_cpp_err=yes
13450 fi
13451 if test -z "$ac_cpp_err"; then
13452   eval "$as_ac_Header=yes"
13453 else
13454   echo "$as_me: failed program was:" >&5
13455   cat conftest.$ac_ext >&5
13456   eval "$as_ac_Header=no"
13457 fi
13458 rm -f conftest.err conftest.$ac_ext
13459 fi
13460 echo "$as_me:13460: result: `eval echo '${'$as_ac_Header'}'`" >&5
13461 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13462 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13463   cat >>confdefs.h <<EOF
13464 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13465 EOF
13466
13467 fi
13468 done
13469
13470 if test "$ISC" = yes ; then
13471
13472 for ac_header in sys/termio.h
13473 do
13474 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13475 echo "$as_me:13475: checking for $ac_header" >&5
13476 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13477 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13478   echo $ECHO_N "(cached) $ECHO_C" >&6
13479 else
13480   cat >conftest.$ac_ext <<_ACEOF
13481 #line 13481 "configure"
13482 #include "confdefs.h"
13483 #include <$ac_header>
13484 _ACEOF
13485 if { (eval echo "$as_me:13485: \"$ac_cpp conftest.$ac_ext\"") >&5
13486   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13487   ac_status=$?
13488   egrep -v '^ *\+' conftest.er1 >conftest.err
13489   rm -f conftest.er1
13490   cat conftest.err >&5
13491   echo "$as_me:13491: \$? = $ac_status" >&5
13492   (exit $ac_status); } >/dev/null; then
13493   if test -s conftest.err; then
13494     ac_cpp_err=$ac_c_preproc_warn_flag
13495   else
13496     ac_cpp_err=
13497   fi
13498 else
13499   ac_cpp_err=yes
13500 fi
13501 if test -z "$ac_cpp_err"; then
13502   eval "$as_ac_Header=yes"
13503 else
13504   echo "$as_me: failed program was:" >&5
13505   cat conftest.$ac_ext >&5
13506   eval "$as_ac_Header=no"
13507 fi
13508 rm -f conftest.err conftest.$ac_ext
13509 fi
13510 echo "$as_me:13510: result: `eval echo '${'$as_ac_Header'}'`" >&5
13511 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13512 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13513   cat >>confdefs.h <<EOF
13514 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13515 EOF
13516
13517 fi
13518 done
13519
13520 fi
13521 if test "$ac_cv_header_termios_h" = yes ; then
13522         case "$CFLAGS $CPPFLAGS" in
13523         *-D_POSIX_SOURCE*)
13524                 termios_bad=dunno ;;
13525         *)      termios_bad=maybe ;;
13526         esac
13527         if test "$termios_bad" = maybe ; then
13528         echo "$as_me:13528: checking whether termios.h needs _POSIX_SOURCE" >&5
13529 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13530         cat >conftest.$ac_ext <<_ACEOF
13531 #line 13531 "configure"
13532 #include "confdefs.h"
13533 #include <termios.h>
13534 int
13535 main ()
13536 {
13537 struct termios foo; int x = foo.c_iflag
13538   ;
13539   return 0;
13540 }
13541 _ACEOF
13542 rm -f conftest.$ac_objext
13543 if { (eval echo "$as_me:13543: \"$ac_compile\"") >&5
13544   (eval $ac_compile) 2>&5
13545   ac_status=$?
13546   echo "$as_me:13546: \$? = $ac_status" >&5
13547   (exit $ac_status); } &&
13548          { ac_try='test -s conftest.$ac_objext'
13549   { (eval echo "$as_me:13549: \"$ac_try\"") >&5
13550   (eval $ac_try) 2>&5
13551   ac_status=$?
13552   echo "$as_me:13552: \$? = $ac_status" >&5
13553   (exit $ac_status); }; }; then
13554   termios_bad=no
13555 else
13556   echo "$as_me: failed program was:" >&5
13557 cat conftest.$ac_ext >&5
13558
13559                 cat >conftest.$ac_ext <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562
13563 #define _POSIX_SOURCE
13564 #include <termios.h>
13565 int
13566 main ()
13567 {
13568 struct termios foo; int x = foo.c_iflag
13569   ;
13570   return 0;
13571 }
13572 _ACEOF
13573 rm -f conftest.$ac_objext
13574 if { (eval echo "$as_me:13574: \"$ac_compile\"") >&5
13575   (eval $ac_compile) 2>&5
13576   ac_status=$?
13577   echo "$as_me:13577: \$? = $ac_status" >&5
13578   (exit $ac_status); } &&
13579          { ac_try='test -s conftest.$ac_objext'
13580   { (eval echo "$as_me:13580: \"$ac_try\"") >&5
13581   (eval $ac_try) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit $ac_status); }; }; then
13585   termios_bad=unknown
13586 else
13587   echo "$as_me: failed program was:" >&5
13588 cat conftest.$ac_ext >&5
13589 termios_bad=yes cat >>confdefs.h <<\EOF
13590 #define SVR4_TERMIO 1
13591 EOF
13592
13593 fi
13594 rm -f conftest.$ac_objext conftest.$ac_ext
13595
13596 fi
13597 rm -f conftest.$ac_objext conftest.$ac_ext
13598         echo "$as_me:13598: result: $termios_bad" >&5
13599 echo "${ECHO_T}$termios_bad" >&6
13600         fi
13601 fi
13602
13603 echo "$as_me:13603: checking for tcgetattr" >&5
13604 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13605 if test "${cf_cv_have_tcgetattr+set}" = set; then
13606   echo $ECHO_N "(cached) $ECHO_C" >&6
13607 else
13608
13609 cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612
13613 #include <sys/types.h>
13614 #ifdef HAVE_UNISTD_H
13615 #include <unistd.h>
13616 #endif
13617 #ifdef HAVE_TERMIOS_H
13618 #include <termios.h>
13619 #define TTY struct termios
13620 #else
13621 #ifdef HAVE_TERMIO_H
13622 #include <termio.h>
13623 #define TTY struct termio
13624 #endif
13625 #endif
13626
13627 int
13628 main ()
13629 {
13630
13631 TTY foo;
13632 tcgetattr(1, &foo);
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest.$ac_objext conftest$ac_exeext
13638 if { (eval echo "$as_me:13638: \"$ac_link\"") >&5
13639   (eval $ac_link) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } &&
13643          { ac_try='test -s conftest$ac_exeext'
13644   { (eval echo "$as_me:13644: \"$ac_try\"") >&5
13645   (eval $ac_try) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit $ac_status); }; }; then
13649   cf_cv_have_tcgetattr=yes
13650 else
13651   echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13653 cf_cv_have_tcgetattr=no
13654 fi
13655 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13656 fi
13657 echo "$as_me:13657: result: $cf_cv_have_tcgetattr" >&5
13658 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13659 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13660 #define HAVE_TCGETATTR 1
13661 EOF
13662
13663 echo "$as_me:13663: checking for vsscanf function or workaround" >&5
13664 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13665 if test "${cf_cv_func_vsscanf+set}" = set; then
13666   echo $ECHO_N "(cached) $ECHO_C" >&6
13667 else
13668
13669 cat >conftest.$ac_ext <<_ACEOF
13670 #line 13670 "configure"
13671 #include "confdefs.h"
13672
13673 #include <stdarg.h>
13674 #include <stdio.h>
13675 int
13676 main ()
13677 {
13678
13679         va_list ap;
13680         vsscanf("from", "%d", ap)
13681   ;
13682   return 0;
13683 }
13684 _ACEOF
13685 rm -f conftest.$ac_objext conftest$ac_exeext
13686 if { (eval echo "$as_me:13686: \"$ac_link\"") >&5
13687   (eval $ac_link) 2>&5
13688   ac_status=$?
13689   echo "$as_me:13689: \$? = $ac_status" >&5
13690   (exit $ac_status); } &&
13691          { ac_try='test -s conftest$ac_exeext'
13692   { (eval echo "$as_me:13692: \"$ac_try\"") >&5
13693   (eval $ac_try) 2>&5
13694   ac_status=$?
13695   echo "$as_me:13695: \$? = $ac_status" >&5
13696   (exit $ac_status); }; }; then
13697   cf_cv_func_vsscanf=vsscanf
13698 else
13699   echo "$as_me: failed program was:" >&5
13700 cat conftest.$ac_ext >&5
13701
13702 cat >conftest.$ac_ext <<_ACEOF
13703 #line 13703 "configure"
13704 #include "confdefs.h"
13705
13706 #include <stdarg.h>
13707 #include <stdio.h>
13708 int
13709 main ()
13710 {
13711
13712     FILE strbuf;
13713     char *str = "from";
13714
13715     strbuf._flag = _IOREAD;
13716     strbuf._ptr = strbuf._base = (unsigned char *) str;
13717     strbuf._cnt = strlen(str);
13718     strbuf._file = _NFILE;
13719     return (vfscanf(&strbuf, "%d", ap))
13720   ;
13721   return 0;
13722 }
13723 _ACEOF
13724 rm -f conftest.$ac_objext conftest$ac_exeext
13725 if { (eval echo "$as_me:13725: \"$ac_link\"") >&5
13726   (eval $ac_link) 2>&5
13727   ac_status=$?
13728   echo "$as_me:13728: \$? = $ac_status" >&5
13729   (exit $ac_status); } &&
13730          { ac_try='test -s conftest$ac_exeext'
13731   { (eval echo "$as_me:13731: \"$ac_try\"") >&5
13732   (eval $ac_try) 2>&5
13733   ac_status=$?
13734   echo "$as_me:13734: \$? = $ac_status" >&5
13735   (exit $ac_status); }; }; then
13736   cf_cv_func_vsscanf=vfscanf
13737 else
13738   echo "$as_me: failed program was:" >&5
13739 cat conftest.$ac_ext >&5
13740
13741 cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 #include <stdarg.h>
13746 #include <stdio.h>
13747 int
13748 main ()
13749 {
13750
13751     FILE strbuf;
13752     char *str = "from";
13753
13754     strbuf._flag = _IOREAD;
13755     strbuf._ptr = strbuf._base = (unsigned char *) str;
13756     strbuf._cnt = strlen(str);
13757     strbuf._file = _NFILE;
13758     return (_doscan(&strbuf, "%d", ap))
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 rm -f conftest.$ac_objext conftest$ac_exeext
13764 if { (eval echo "$as_me:13764: \"$ac_link\"") >&5
13765   (eval $ac_link) 2>&5
13766   ac_status=$?
13767   echo "$as_me:13767: \$? = $ac_status" >&5
13768   (exit $ac_status); } &&
13769          { ac_try='test -s conftest$ac_exeext'
13770   { (eval echo "$as_me:13770: \"$ac_try\"") >&5
13771   (eval $ac_try) 2>&5
13772   ac_status=$?
13773   echo "$as_me:13773: \$? = $ac_status" >&5
13774   (exit $ac_status); }; }; then
13775   cf_cv_func_vsscanf=_doscan
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779
13780 cf_cv_func_vsscanf=no
13781 fi
13782 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13783 fi
13784 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13785 fi
13786 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13787 fi
13788 echo "$as_me:13788: result: $cf_cv_func_vsscanf" >&5
13789 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13790
13791 case $cf_cv_func_vsscanf in #(vi
13792 vsscanf) cat >>confdefs.h <<\EOF
13793 #define HAVE_VSSCANF 1
13794 EOF
13795 ;; #(vi
13796 vfscanf) cat >>confdefs.h <<\EOF
13797 #define HAVE_VFSCANF 1
13798 EOF
13799 ;; #(vi
13800 _doscan) cat >>confdefs.h <<\EOF
13801 #define HAVE__DOSCAN 1
13802 EOF
13803 ;;
13804 esac
13805
13806 echo "$as_me:13806: checking for working mkstemp" >&5
13807 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13808 if test "${cf_cv_func_mkstemp+set}" = set; then
13809   echo $ECHO_N "(cached) $ECHO_C" >&6
13810 else
13811
13812 rm -f conftest*
13813 if test "$cross_compiling" = yes; then
13814   echo "$as_me:13814: checking for mkstemp" >&5
13815 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13816 if test "${ac_cv_func_mkstemp+set}" = set; then
13817   echo $ECHO_N "(cached) $ECHO_C" >&6
13818 else
13819   cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13822 /* System header to define __stub macros and hopefully few prototypes,
13823     which can conflict with char mkstemp (); below.  */
13824 #include <assert.h>
13825 /* Override any gcc2 internal prototype to avoid an error.  */
13826 #ifdef __cplusplus
13827 extern "C"
13828 #endif
13829 /* We use char because int might match the return type of a gcc2
13830    builtin and then its argument prototype would still apply.  */
13831 char mkstemp ();
13832 char (*f) ();
13833
13834 int
13835 main ()
13836 {
13837 /* The GNU C library defines this for functions which it implements
13838     to always fail with ENOSYS.  Some functions are actually named
13839     something starting with __ and the normal name is an alias.  */
13840 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13841 choke me
13842 #else
13843 f = mkstemp;
13844 #endif
13845
13846   ;
13847   return 0;
13848 }
13849 _ACEOF
13850 rm -f conftest.$ac_objext conftest$ac_exeext
13851 if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
13852   (eval $ac_link) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit $ac_status); } &&
13856          { ac_try='test -s conftest$ac_exeext'
13857   { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858   (eval $ac_try) 2>&5
13859   ac_status=$?
13860   echo "$as_me:13860: \$? = $ac_status" >&5
13861   (exit $ac_status); }; }; then
13862   ac_cv_func_mkstemp=yes
13863 else
13864   echo "$as_me: failed program was:" >&5
13865 cat conftest.$ac_ext >&5
13866 ac_cv_func_mkstemp=no
13867 fi
13868 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13869 fi
13870 echo "$as_me:13870: result: $ac_cv_func_mkstemp" >&5
13871 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13872
13873 else
13874   cat >conftest.$ac_ext <<_ACEOF
13875 #line 13875 "configure"
13876 #include "confdefs.h"
13877
13878 #include <sys/types.h>
13879 #include <stdlib.h>
13880 #include <stdio.h>
13881 #include <string.h>
13882 #include <sys/stat.h>
13883 int main()
13884 {
13885         char *tmpl = "conftestXXXXXX";
13886         char name[2][80];
13887         int n;
13888         int result = 0;
13889         int fd;
13890         struct stat sb;
13891
13892         umask(077);
13893         for (n = 0; n < 2; ++n) {
13894                 strcpy(name[n], tmpl);
13895                 if ((fd = mkstemp(name[n])) >= 0) {
13896                         if (!strcmp(name[n], tmpl)
13897                          || stat(name[n], &sb) != 0
13898                          || (sb.st_mode & S_IFMT) != S_IFREG
13899                          || (sb.st_mode & 077) != 0) {
13900                                 result = 1;
13901                         }
13902                         close(fd);
13903                 }
13904         }
13905         if (result == 0
13906          && !strcmp(name[0], name[1]))
13907                 result = 1;
13908         ${cf_cv_main_return:-return}(result);
13909 }
13910
13911 _ACEOF
13912 rm -f conftest$ac_exeext
13913 if { (eval echo "$as_me:13913: \"$ac_link\"") >&5
13914   (eval $ac_link) 2>&5
13915   ac_status=$?
13916   echo "$as_me:13916: \$? = $ac_status" >&5
13917   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit $ac_status); }; }; then
13923   cf_cv_func_mkstemp=yes
13924
13925 else
13926   echo "$as_me: program exited with status $ac_status" >&5
13927 echo "$as_me: failed program was:" >&5
13928 cat conftest.$ac_ext >&5
13929 cf_cv_func_mkstemp=no
13930
13931 fi
13932 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13933 fi
13934
13935 fi
13936 echo "$as_me:13936: result: $cf_cv_func_mkstemp" >&5
13937 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
13938 if test "$cf_cv_func_mkstemp" = yes ; then
13939         cat >>confdefs.h <<\EOF
13940 #define HAVE_MKSTEMP 1
13941 EOF
13942
13943 fi
13944
13945 # setup for prototype of fallback for vsscanf()
13946
13947 if test "$cf_cv_func_vsscanf" = vsscanf ; then
13948         HAVE_VSSCANF=1
13949 else
13950         HAVE_VSSCANF=0
13951 fi
13952
13953 if test "$cross_compiling" = yes ; then
13954         { echo "$as_me:13954: WARNING: cross compiling: assume setvbuf params not reversed" >&5
13955 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
13956 else
13957         echo "$as_me:13957: checking whether setvbuf arguments are reversed" >&5
13958 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
13959 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
13960   echo $ECHO_N "(cached) $ECHO_C" >&6
13961 else
13962   if test "$cross_compiling" = yes; then
13963   { { echo "$as_me:13963: error: cannot run test program while cross compiling" >&5
13964 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13965    { (exit 1); exit 1; }; }
13966 else
13967   cat >conftest.$ac_ext <<_ACEOF
13968 #line 13968 "configure"
13969 #include "confdefs.h"
13970 #include <stdio.h>
13971 /* If setvbuf has the reversed format, exit 0. */
13972 int
13973 main ()
13974 {
13975   /* This call has the arguments reversed.
13976      A reversed system may check and see that the address of main
13977      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
13978   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
13979     $ac_main_return(1);
13980   putc('\r', stdout);
13981   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
13982 }
13983 _ACEOF
13984 rm -f conftest$ac_exeext
13985 if { (eval echo "$as_me:13985: \"$ac_link\"") >&5
13986   (eval $ac_link) 2>&5
13987   ac_status=$?
13988   echo "$as_me:13988: \$? = $ac_status" >&5
13989   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13990   { (eval echo "$as_me:13990: \"$ac_try\"") >&5
13991   (eval $ac_try) 2>&5
13992   ac_status=$?
13993   echo "$as_me:13993: \$? = $ac_status" >&5
13994   (exit $ac_status); }; }; then
13995   ac_cv_func_setvbuf_reversed=yes
13996 else
13997   echo "$as_me: program exited with status $ac_status" >&5
13998 echo "$as_me: failed program was:" >&5
13999 cat conftest.$ac_ext >&5
14000 ac_cv_func_setvbuf_reversed=no
14001 fi
14002 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14003 fi
14004 rm -f core core.* *.core
14005 fi
14006 echo "$as_me:14006: result: $ac_cv_func_setvbuf_reversed" >&5
14007 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14008 if test $ac_cv_func_setvbuf_reversed = yes; then
14009
14010 cat >>confdefs.h <<\EOF
14011 #define SETVBUF_REVERSED 1
14012 EOF
14013
14014 fi
14015
14016 fi
14017 echo "$as_me:14017: checking return type of signal handlers" >&5
14018 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14019 if test "${ac_cv_type_signal+set}" = set; then
14020   echo $ECHO_N "(cached) $ECHO_C" >&6
14021 else
14022   cat >conftest.$ac_ext <<_ACEOF
14023 #line 14023 "configure"
14024 #include "confdefs.h"
14025 #include <sys/types.h>
14026 #include <signal.h>
14027 #ifdef signal
14028 # undef signal
14029 #endif
14030 #ifdef __cplusplus
14031 extern "C" void (*signal (int, void (*)(int)))(int);
14032 #else
14033 void (*signal ()) ();
14034 #endif
14035
14036 int
14037 main ()
14038 {
14039 int i;
14040   ;
14041   return 0;
14042 }
14043 _ACEOF
14044 rm -f conftest.$ac_objext
14045 if { (eval echo "$as_me:14045: \"$ac_compile\"") >&5
14046   (eval $ac_compile) 2>&5
14047   ac_status=$?
14048   echo "$as_me:14048: \$? = $ac_status" >&5
14049   (exit $ac_status); } &&
14050          { ac_try='test -s conftest.$ac_objext'
14051   { (eval echo "$as_me:14051: \"$ac_try\"") >&5
14052   (eval $ac_try) 2>&5
14053   ac_status=$?
14054   echo "$as_me:14054: \$? = $ac_status" >&5
14055   (exit $ac_status); }; }; then
14056   ac_cv_type_signal=void
14057 else
14058   echo "$as_me: failed program was:" >&5
14059 cat conftest.$ac_ext >&5
14060 ac_cv_type_signal=int
14061 fi
14062 rm -f conftest.$ac_objext conftest.$ac_ext
14063 fi
14064 echo "$as_me:14064: result: $ac_cv_type_signal" >&5
14065 echo "${ECHO_T}$ac_cv_type_signal" >&6
14066
14067 cat >>confdefs.h <<EOF
14068 #define RETSIGTYPE $ac_cv_type_signal
14069 EOF
14070
14071 echo "$as_me:14071: checking for type sigaction_t" >&5
14072 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14073 if test "${cf_cv_type_sigaction+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076
14077         cat >conftest.$ac_ext <<_ACEOF
14078 #line 14078 "configure"
14079 #include "confdefs.h"
14080
14081 #include <signal.h>
14082 int
14083 main ()
14084 {
14085 sigaction_t x
14086   ;
14087   return 0;
14088 }
14089 _ACEOF
14090 rm -f conftest.$ac_objext
14091 if { (eval echo "$as_me:14091: \"$ac_compile\"") >&5
14092   (eval $ac_compile) 2>&5
14093   ac_status=$?
14094   echo "$as_me:14094: \$? = $ac_status" >&5
14095   (exit $ac_status); } &&
14096          { ac_try='test -s conftest.$ac_objext'
14097   { (eval echo "$as_me:14097: \"$ac_try\"") >&5
14098   (eval $ac_try) 2>&5
14099   ac_status=$?
14100   echo "$as_me:14100: \$? = $ac_status" >&5
14101   (exit $ac_status); }; }; then
14102   cf_cv_type_sigaction=yes
14103 else
14104   echo "$as_me: failed program was:" >&5
14105 cat conftest.$ac_ext >&5
14106 cf_cv_type_sigaction=no
14107 fi
14108 rm -f conftest.$ac_objext conftest.$ac_ext
14109 fi
14110
14111 echo "$as_me:14111: result: $cf_cv_type_sigaction" >&5
14112 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14113 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14114 #define HAVE_TYPE_SIGACTION 1
14115 EOF
14116
14117 echo "$as_me:14117: checking declaration of size-change" >&5
14118 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14119 if test "${cf_cv_sizechange+set}" = set; then
14120   echo $ECHO_N "(cached) $ECHO_C" >&6
14121 else
14122
14123     cf_cv_sizechange=unknown
14124     cf_save_CPPFLAGS="$CPPFLAGS"
14125
14126 for cf_opts in "" "NEED_PTEM_H"
14127 do
14128
14129     CPPFLAGS="$cf_save_CPPFLAGS"
14130     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14131     cat >conftest.$ac_ext <<_ACEOF
14132 #line 14132 "configure"
14133 #include "confdefs.h"
14134 #include <sys/types.h>
14135 #ifdef HAVE_TERMIOS_H
14136 #include <termios.h>
14137 #else
14138 #ifdef HAVE_TERMIO_H
14139 #include <termio.h>
14140 #endif
14141 #endif
14142 #ifdef NEED_PTEM_H
14143 /* This is a workaround for SCO:  they neglected to define struct winsize in
14144  * termios.h -- it's only in termio.h and ptem.h
14145  */
14146 #include        <sys/stream.h>
14147 #include        <sys/ptem.h>
14148 #endif
14149 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14150 #include <sys/ioctl.h>
14151 #endif
14152
14153 int
14154 main ()
14155 {
14156
14157 #ifdef TIOCGSIZE
14158         struct ttysize win;     /* FIXME: what system is this? */
14159         int y = win.ts_lines;
14160         int x = win.ts_cols;
14161 #else
14162 #ifdef TIOCGWINSZ
14163         struct winsize win;
14164         int y = win.ws_row;
14165         int x = win.ws_col;
14166 #else
14167         no TIOCGSIZE or TIOCGWINSZ
14168 #endif /* TIOCGWINSZ */
14169 #endif /* TIOCGSIZE */
14170
14171   ;
14172   return 0;
14173 }
14174 _ACEOF
14175 rm -f conftest.$ac_objext
14176 if { (eval echo "$as_me:14176: \"$ac_compile\"") >&5
14177   (eval $ac_compile) 2>&5
14178   ac_status=$?
14179   echo "$as_me:14179: \$? = $ac_status" >&5
14180   (exit $ac_status); } &&
14181          { ac_try='test -s conftest.$ac_objext'
14182   { (eval echo "$as_me:14182: \"$ac_try\"") >&5
14183   (eval $ac_try) 2>&5
14184   ac_status=$?
14185   echo "$as_me:14185: \$? = $ac_status" >&5
14186   (exit $ac_status); }; }; then
14187   cf_cv_sizechange=yes
14188 else
14189   echo "$as_me: failed program was:" >&5
14190 cat conftest.$ac_ext >&5
14191 cf_cv_sizechange=no
14192 fi
14193 rm -f conftest.$ac_objext conftest.$ac_ext
14194
14195         CPPFLAGS="$cf_save_CPPFLAGS"
14196         if test "$cf_cv_sizechange" = yes ; then
14197                 echo "size-change succeeded ($cf_opts)" >&5
14198                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14199                 break
14200         fi
14201 done
14202
14203 fi
14204 echo "$as_me:14204: result: $cf_cv_sizechange" >&5
14205 echo "${ECHO_T}$cf_cv_sizechange" >&6
14206 if test "$cf_cv_sizechange" != no ; then
14207         cat >>confdefs.h <<\EOF
14208 #define HAVE_SIZECHANGE 1
14209 EOF
14210
14211         case $cf_cv_sizechange in #(vi
14212         NEED*)
14213                 cat >>confdefs.h <<EOF
14214 #define $cf_cv_sizechange  1
14215 EOF
14216
14217                 ;;
14218         esac
14219 fi
14220
14221 echo "$as_me:14221: checking for memmove" >&5
14222 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14223 if test "${ac_cv_func_memmove+set}" = set; then
14224   echo $ECHO_N "(cached) $ECHO_C" >&6
14225 else
14226   cat >conftest.$ac_ext <<_ACEOF
14227 #line 14227 "configure"
14228 #include "confdefs.h"
14229 /* System header to define __stub macros and hopefully few prototypes,
14230     which can conflict with char memmove (); below.  */
14231 #include <assert.h>
14232 /* Override any gcc2 internal prototype to avoid an error.  */
14233 #ifdef __cplusplus
14234 extern "C"
14235 #endif
14236 /* We use char because int might match the return type of a gcc2
14237    builtin and then its argument prototype would still apply.  */
14238 char memmove ();
14239 char (*f) ();
14240
14241 int
14242 main ()
14243 {
14244 /* The GNU C library defines this for functions which it implements
14245     to always fail with ENOSYS.  Some functions are actually named
14246     something starting with __ and the normal name is an alias.  */
14247 #if defined (__stub_memmove) || defined (__stub___memmove)
14248 choke me
14249 #else
14250 f = memmove;
14251 #endif
14252
14253   ;
14254   return 0;
14255 }
14256 _ACEOF
14257 rm -f conftest.$ac_objext conftest$ac_exeext
14258 if { (eval echo "$as_me:14258: \"$ac_link\"") >&5
14259   (eval $ac_link) 2>&5
14260   ac_status=$?
14261   echo "$as_me:14261: \$? = $ac_status" >&5
14262   (exit $ac_status); } &&
14263          { ac_try='test -s conftest$ac_exeext'
14264   { (eval echo "$as_me:14264: \"$ac_try\"") >&5
14265   (eval $ac_try) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit $ac_status); }; }; then
14269   ac_cv_func_memmove=yes
14270 else
14271   echo "$as_me: failed program was:" >&5
14272 cat conftest.$ac_ext >&5
14273 ac_cv_func_memmove=no
14274 fi
14275 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14276 fi
14277 echo "$as_me:14277: result: $ac_cv_func_memmove" >&5
14278 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14279 if test $ac_cv_func_memmove = yes; then
14280   :
14281 else
14282
14283 echo "$as_me:14283: checking for bcopy" >&5
14284 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14285 if test "${ac_cv_func_bcopy+set}" = set; then
14286   echo $ECHO_N "(cached) $ECHO_C" >&6
14287 else
14288   cat >conftest.$ac_ext <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291 /* System header to define __stub macros and hopefully few prototypes,
14292     which can conflict with char bcopy (); below.  */
14293 #include <assert.h>
14294 /* Override any gcc2 internal prototype to avoid an error.  */
14295 #ifdef __cplusplus
14296 extern "C"
14297 #endif
14298 /* We use char because int might match the return type of a gcc2
14299    builtin and then its argument prototype would still apply.  */
14300 char bcopy ();
14301 char (*f) ();
14302
14303 int
14304 main ()
14305 {
14306 /* The GNU C library defines this for functions which it implements
14307     to always fail with ENOSYS.  Some functions are actually named
14308     something starting with __ and the normal name is an alias.  */
14309 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14310 choke me
14311 #else
14312 f = bcopy;
14313 #endif
14314
14315   ;
14316   return 0;
14317 }
14318 _ACEOF
14319 rm -f conftest.$ac_objext conftest$ac_exeext
14320 if { (eval echo "$as_me:14320: \"$ac_link\"") >&5
14321   (eval $ac_link) 2>&5
14322   ac_status=$?
14323   echo "$as_me:14323: \$? = $ac_status" >&5
14324   (exit $ac_status); } &&
14325          { ac_try='test -s conftest$ac_exeext'
14326   { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327   (eval $ac_try) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit $ac_status); }; }; then
14331   ac_cv_func_bcopy=yes
14332 else
14333   echo "$as_me: failed program was:" >&5
14334 cat conftest.$ac_ext >&5
14335 ac_cv_func_bcopy=no
14336 fi
14337 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14338 fi
14339 echo "$as_me:14339: result: $ac_cv_func_bcopy" >&5
14340 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14341 if test $ac_cv_func_bcopy = yes; then
14342
14343         echo "$as_me:14343: checking if bcopy does overlapping moves" >&5
14344 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14345 if test "${cf_cv_good_bcopy+set}" = set; then
14346   echo $ECHO_N "(cached) $ECHO_C" >&6
14347 else
14348
14349                 if test "$cross_compiling" = yes; then
14350   cf_cv_good_bcopy=unknown
14351 else
14352   cat >conftest.$ac_ext <<_ACEOF
14353 #line 14353 "configure"
14354 #include "confdefs.h"
14355
14356 int main() {
14357         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14358         char temp[40];
14359         bcopy(data, temp, sizeof(data));
14360         bcopy(temp+10, temp, 15);
14361         bcopy(temp+5, temp+15, 10);
14362         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14363 }
14364
14365 _ACEOF
14366 rm -f conftest$ac_exeext
14367 if { (eval echo "$as_me:14367: \"$ac_link\"") >&5
14368   (eval $ac_link) 2>&5
14369   ac_status=$?
14370   echo "$as_me:14370: \$? = $ac_status" >&5
14371   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14372   { (eval echo "$as_me:14372: \"$ac_try\"") >&5
14373   (eval $ac_try) 2>&5
14374   ac_status=$?
14375   echo "$as_me:14375: \$? = $ac_status" >&5
14376   (exit $ac_status); }; }; then
14377   cf_cv_good_bcopy=yes
14378 else
14379   echo "$as_me: program exited with status $ac_status" >&5
14380 echo "$as_me: failed program was:" >&5
14381 cat conftest.$ac_ext >&5
14382 cf_cv_good_bcopy=no
14383 fi
14384 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14385 fi
14386
14387 fi
14388 echo "$as_me:14388: result: $cf_cv_good_bcopy" >&5
14389 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14390
14391 else
14392   cf_cv_good_bcopy=no
14393 fi
14394
14395         if test "$cf_cv_good_bcopy" = yes ; then
14396                 cat >>confdefs.h <<\EOF
14397 #define USE_OK_BCOPY 1
14398 EOF
14399
14400         else
14401                 cat >>confdefs.h <<\EOF
14402 #define USE_MY_MEMMOVE 1
14403 EOF
14404
14405         fi
14406
14407 fi
14408
14409 echo "$as_me:14409: checking if poll really works" >&5
14410 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14411 if test "${cf_cv_working_poll+set}" = set; then
14412   echo $ECHO_N "(cached) $ECHO_C" >&6
14413 else
14414
14415 if test "$cross_compiling" = yes; then
14416   cf_cv_working_poll=unknown
14417 else
14418   cat >conftest.$ac_ext <<_ACEOF
14419 #line 14419 "configure"
14420 #include "confdefs.h"
14421
14422 #include <stdio.h>
14423 #ifdef HAVE_POLL_H
14424 #include <poll.h>
14425 #else
14426 #include <sys/poll.h>
14427 #endif
14428 int main() {
14429         struct pollfd myfds;
14430         int ret;
14431
14432         myfds.fd = 0;
14433         myfds.events = POLLIN;
14434
14435         ret = poll(&myfds, 1, 100);
14436         ${cf_cv_main_return:-return}(ret != 0);
14437 }
14438 _ACEOF
14439 rm -f conftest$ac_exeext
14440 if { (eval echo "$as_me:14440: \"$ac_link\"") >&5
14441   (eval $ac_link) 2>&5
14442   ac_status=$?
14443   echo "$as_me:14443: \$? = $ac_status" >&5
14444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14445   { (eval echo "$as_me:14445: \"$ac_try\"") >&5
14446   (eval $ac_try) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); }; }; then
14450   cf_cv_working_poll=yes
14451 else
14452   echo "$as_me: program exited with status $ac_status" >&5
14453 echo "$as_me: failed program was:" >&5
14454 cat conftest.$ac_ext >&5
14455 cf_cv_working_poll=no
14456 fi
14457 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14458 fi
14459 fi
14460 echo "$as_me:14460: result: $cf_cv_working_poll" >&5
14461 echo "${ECHO_T}$cf_cv_working_poll" >&6
14462 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14463 #define HAVE_WORKING_POLL 1
14464 EOF
14465
14466 # special check for test/ditto.c
14467
14468 echo "$as_me:14468: checking for openpty in -lutil" >&5
14469 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14470 if test "${ac_cv_lib_util_openpty+set}" = set; then
14471   echo $ECHO_N "(cached) $ECHO_C" >&6
14472 else
14473   ac_check_lib_save_LIBS=$LIBS
14474 LIBS="-lutil  $LIBS"
14475 cat >conftest.$ac_ext <<_ACEOF
14476 #line 14476 "configure"
14477 #include "confdefs.h"
14478
14479 /* Override any gcc2 internal prototype to avoid an error.  */
14480 #ifdef __cplusplus
14481 extern "C"
14482 #endif
14483 /* We use char because int might match the return type of a gcc2
14484    builtin and then its argument prototype would still apply.  */
14485 char openpty ();
14486 int
14487 main ()
14488 {
14489 openpty ();
14490   ;
14491   return 0;
14492 }
14493 _ACEOF
14494 rm -f conftest.$ac_objext conftest$ac_exeext
14495 if { (eval echo "$as_me:14495: \"$ac_link\"") >&5
14496   (eval $ac_link) 2>&5
14497   ac_status=$?
14498   echo "$as_me:14498: \$? = $ac_status" >&5
14499   (exit $ac_status); } &&
14500          { ac_try='test -s conftest$ac_exeext'
14501   { (eval echo "$as_me:14501: \"$ac_try\"") >&5
14502   (eval $ac_try) 2>&5
14503   ac_status=$?
14504   echo "$as_me:14504: \$? = $ac_status" >&5
14505   (exit $ac_status); }; }; then
14506   ac_cv_lib_util_openpty=yes
14507 else
14508   echo "$as_me: failed program was:" >&5
14509 cat conftest.$ac_ext >&5
14510 ac_cv_lib_util_openpty=no
14511 fi
14512 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14513 LIBS=$ac_check_lib_save_LIBS
14514 fi
14515 echo "$as_me:14515: result: $ac_cv_lib_util_openpty" >&5
14516 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14517 if test $ac_cv_lib_util_openpty = yes; then
14518   cf_cv_lib_util=yes
14519 else
14520   cf_cv_lib_util=no
14521 fi
14522
14523 echo "$as_me:14523: checking for openpty header" >&5
14524 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14525 if test "${cf_cv_func_openpty+set}" = set; then
14526   echo $ECHO_N "(cached) $ECHO_C" >&6
14527 else
14528
14529     cf_save_LIBS="$LIBS"
14530     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14531     for cf_header in pty.h libutil.h util.h
14532     do
14533     cat >conftest.$ac_ext <<_ACEOF
14534 #line 14534 "configure"
14535 #include "confdefs.h"
14536
14537 #include <$cf_header>
14538
14539 int
14540 main ()
14541 {
14542
14543     int x = openpty((int *)0, (int *)0, (char *)0,
14544                    (struct termios *)0, (struct winsize *)0);
14545
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 rm -f conftest.$ac_objext conftest$ac_exeext
14551 if { (eval echo "$as_me:14551: \"$ac_link\"") >&5
14552   (eval $ac_link) 2>&5
14553   ac_status=$?
14554   echo "$as_me:14554: \$? = $ac_status" >&5
14555   (exit $ac_status); } &&
14556          { ac_try='test -s conftest$ac_exeext'
14557   { (eval echo "$as_me:14557: \"$ac_try\"") >&5
14558   (eval $ac_try) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit $ac_status); }; }; then
14562
14563         cf_cv_func_openpty=$cf_header
14564         break
14565
14566 else
14567   echo "$as_me: failed program was:" >&5
14568 cat conftest.$ac_ext >&5
14569
14570         cf_cv_func_openpty=no
14571
14572 fi
14573 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14574     done
14575     LIBS="$cf_save_LIBS"
14576
14577 fi
14578 echo "$as_me:14578: result: $cf_cv_func_openpty" >&5
14579 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14580
14581 if test "$cf_cv_func_openpty" != no ; then
14582     cat >>confdefs.h <<EOF
14583 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14584 EOF
14585
14586     cat >>confdefs.h <<\EOF
14587 #define USE_XTERM_PTY 1
14588 EOF
14589
14590     if test "$cf_cv_lib_util" = yes ; then
14591         TEST_LIBS="-lutil $TEST_LIBS"
14592     fi
14593 fi
14594
14595 if test "$with_hashed_db" != no ; then
14596         cat >>confdefs.h <<\EOF
14597 #define USE_HASHED_DB 1
14598 EOF
14599
14600 case $with_hashed_db in #(vi
14601 yes|*able*) #(vi
14602     ;;
14603 *)
14604     if test -d "$with_hashed_db" ; then
14605
14606 if test -n "$with_hashed_db/include" ; then
14607   for cf_add_incdir in $with_hashed_db/include
14608   do
14609         while test $cf_add_incdir != /usr/include
14610         do
14611           if test -d $cf_add_incdir
14612           then
14613                 cf_have_incdir=no
14614                 if test -n "$CFLAGS$CPPFLAGS" ; then
14615                   # a loop is needed to ensure we can add subdirs of existing dirs
14616                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14617                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14618                           cf_have_incdir=yes; break
14619                         fi
14620                   done
14621                 fi
14622
14623                 if test "$cf_have_incdir" = no ; then
14624                   if test "$cf_add_incdir" = /usr/local/include ; then
14625                         if test "$GCC" = yes
14626                         then
14627                           cf_save_CPPFLAGS=$CPPFLAGS
14628                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14629                           cat >conftest.$ac_ext <<_ACEOF
14630 #line 14630 "configure"
14631 #include "confdefs.h"
14632 #include <stdio.h>
14633 int
14634 main ()
14635 {
14636 printf("Hello")
14637   ;
14638   return 0;
14639 }
14640 _ACEOF
14641 rm -f conftest.$ac_objext
14642 if { (eval echo "$as_me:14642: \"$ac_compile\"") >&5
14643   (eval $ac_compile) 2>&5
14644   ac_status=$?
14645   echo "$as_me:14645: \$? = $ac_status" >&5
14646   (exit $ac_status); } &&
14647          { ac_try='test -s conftest.$ac_objext'
14648   { (eval echo "$as_me:14648: \"$ac_try\"") >&5
14649   (eval $ac_try) 2>&5
14650   ac_status=$?
14651   echo "$as_me:14651: \$? = $ac_status" >&5
14652   (exit $ac_status); }; }; then
14653   :
14654 else
14655   echo "$as_me: failed program was:" >&5
14656 cat conftest.$ac_ext >&5
14657 cf_have_incdir=yes
14658 fi
14659 rm -f conftest.$ac_objext conftest.$ac_ext
14660                           CPPFLAGS=$cf_save_CPPFLAGS
14661                         fi
14662                   fi
14663                 fi
14664
14665                 if test "$cf_have_incdir" = no ; then
14666                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14667
14668 echo "${as_me-configure}:14668: testing adding $cf_add_incdir to include-path ..." 1>&5
14669
14670                   CPPFLAGS="-I$cf_add_incdir $CPPFLAGS"
14671
14672                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14673                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14674                   cf_add_incdir="$cf_top_incdir"
14675                 else
14676                   break
14677                 fi
14678           fi
14679         done
14680   done
14681 fi
14682
14683 if test -n "$with_hashed_db/lib" ; then
14684   for cf_add_libdir in $with_hashed_db/lib
14685   do
14686     if test $cf_add_libdir = /usr/lib ; then
14687       :
14688     elif test -d $cf_add_libdir
14689     then
14690       cf_have_libdir=no
14691       if test -n "$LDFLAGS$LIBS" ; then
14692         # a loop is needed to ensure we can add subdirs of existing dirs
14693         for cf_test_libdir in $LDFLAGS $LIBS ; do
14694           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14695             cf_have_libdir=yes; break
14696           fi
14697         done
14698       fi
14699       if test "$cf_have_libdir" = no ; then
14700         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14701
14702 echo "${as_me-configure}:14702: testing adding $cf_add_libdir to library-path ..." 1>&5
14703
14704         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14705       fi
14706     fi
14707   done
14708 fi
14709
14710     fi
14711 esac
14712
14713 echo "$as_me:14713: checking for db.h" >&5
14714 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14715 if test "${ac_cv_header_db_h+set}" = set; then
14716   echo $ECHO_N "(cached) $ECHO_C" >&6
14717 else
14718   cat >conftest.$ac_ext <<_ACEOF
14719 #line 14719 "configure"
14720 #include "confdefs.h"
14721 #include <db.h>
14722 _ACEOF
14723 if { (eval echo "$as_me:14723: \"$ac_cpp conftest.$ac_ext\"") >&5
14724   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14725   ac_status=$?
14726   egrep -v '^ *\+' conftest.er1 >conftest.err
14727   rm -f conftest.er1
14728   cat conftest.err >&5
14729   echo "$as_me:14729: \$? = $ac_status" >&5
14730   (exit $ac_status); } >/dev/null; then
14731   if test -s conftest.err; then
14732     ac_cpp_err=$ac_c_preproc_warn_flag
14733   else
14734     ac_cpp_err=
14735   fi
14736 else
14737   ac_cpp_err=yes
14738 fi
14739 if test -z "$ac_cpp_err"; then
14740   ac_cv_header_db_h=yes
14741 else
14742   echo "$as_me: failed program was:" >&5
14743   cat conftest.$ac_ext >&5
14744   ac_cv_header_db_h=no
14745 fi
14746 rm -f conftest.err conftest.$ac_ext
14747 fi
14748 echo "$as_me:14748: result: $ac_cv_header_db_h" >&5
14749 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14750 if test $ac_cv_header_db_h = yes; then
14751
14752 echo "$as_me:14752: checking for version of db" >&5
14753 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14754 if test "${cf_cv_hashed_db_version+set}" = set; then
14755   echo $ECHO_N "(cached) $ECHO_C" >&6
14756 else
14757
14758 cf_cv_hashed_db_version=unknown
14759
14760 for cf_db_version in 1 2 3 4 5
14761 do
14762
14763 echo "${as_me-configure}:14763: testing checking for db version $cf_db_version ..." 1>&5
14764
14765         cat >conftest.$ac_ext <<_ACEOF
14766 #line 14766 "configure"
14767 #include "confdefs.h"
14768
14769 $ac_includes_default
14770 #include <db.h>
14771
14772 #ifdef DB_VERSION_MAJOR
14773         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14774 #if $cf_db_version == DB_VERSION_MAJOR
14775         /* ok */
14776 #else
14777         make an error
14778 #endif
14779 #else
14780 #if $cf_db_version == 1
14781         /* ok: assuming this is DB 1.8.5 */
14782 #else
14783         make an error
14784 #endif
14785 #endif
14786
14787 int
14788 main ()
14789 {
14790 DBT *foo = 0
14791   ;
14792   return 0;
14793 }
14794 _ACEOF
14795 rm -f conftest.$ac_objext
14796 if { (eval echo "$as_me:14796: \"$ac_compile\"") >&5
14797   (eval $ac_compile) 2>&5
14798   ac_status=$?
14799   echo "$as_me:14799: \$? = $ac_status" >&5
14800   (exit $ac_status); } &&
14801          { ac_try='test -s conftest.$ac_objext'
14802   { (eval echo "$as_me:14802: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit $ac_status); }; }; then
14807
14808         cf_cv_hashed_db_version=$cf_db_version
14809         break
14810
14811 else
14812   echo "$as_me: failed program was:" >&5
14813 cat conftest.$ac_ext >&5
14814 fi
14815 rm -f conftest.$ac_objext conftest.$ac_ext
14816 done
14817
14818 fi
14819 echo "$as_me:14819: result: $cf_cv_hashed_db_version" >&5
14820 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14821
14822 if test "$cf_cv_hashed_db_version" = unknown ; then
14823         { { echo "$as_me:14823: error: Cannot determine version of db" >&5
14824 echo "$as_me: error: Cannot determine version of db" >&2;}
14825    { (exit 1); exit 1; }; }
14826 else
14827
14828 echo "$as_me:14828: checking for db libraries" >&5
14829 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14830 if test "${cf_cv_hashed_db_libs+set}" = set; then
14831   echo $ECHO_N "(cached) $ECHO_C" >&6
14832 else
14833
14834 cf_cv_hashed_db_libs=unknown
14835 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14836 do
14837         cf_save_libs="$LIBS"
14838         if test -n "$cf_db_libs"; then
14839                 LIBS="-l$cf_db_libs $LIBS"
14840         fi
14841
14842 echo "${as_me-configure}:14842: testing checking for library "$cf_db_libs" ..." 1>&5
14843
14844         cat >conftest.$ac_ext <<_ACEOF
14845 #line 14845 "configure"
14846 #include "confdefs.h"
14847
14848 $ac_includes_default
14849 #include <db.h>
14850
14851 int
14852 main ()
14853 {
14854
14855         char *path = "/tmp/foo";
14856 #ifdef DB_VERSION_MAJOR
14857 #if DB_VERSION_MAJOR >= 4
14858         DB *result = 0;
14859         db_create(&result, NULL, 0);
14860         result->open(result,
14861                 NULL,
14862                 path,
14863                 path,
14864                 DB_HASH,
14865                 DB_CREATE,
14866                 0644);
14867 #elif DB_VERSION_MAJOR >= 3
14868         DB *result = 0;
14869         db_create(&result, NULL, 0);
14870         result->open(result,
14871                 path,
14872                 path,
14873                 DB_HASH,
14874                 DB_CREATE,
14875                 0644);
14876 #elif DB_VERSION_MAJOR >= 2
14877         DB *result = 0;
14878         db_open(path,
14879                 DB_HASH,
14880                 DB_CREATE,
14881                 0644,
14882                 (DB_ENV *) 0,
14883                 (DB_INFO *) 0,
14884                 &result);
14885 #endif /* DB_VERSION_MAJOR */
14886 #else
14887         DB *result = dbopen(path,
14888                      2,
14889                      0644,
14890                      DB_HASH,
14891                      0);
14892 #endif
14893         ${cf_cv_main_return:-return}(result != 0)
14894
14895   ;
14896   return 0;
14897 }
14898 _ACEOF
14899 rm -f conftest.$ac_objext conftest$ac_exeext
14900 if { (eval echo "$as_me:14900: \"$ac_link\"") >&5
14901   (eval $ac_link) 2>&5
14902   ac_status=$?
14903   echo "$as_me:14903: \$? = $ac_status" >&5
14904   (exit $ac_status); } &&
14905          { ac_try='test -s conftest$ac_exeext'
14906   { (eval echo "$as_me:14906: \"$ac_try\"") >&5
14907   (eval $ac_try) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); }; }; then
14911
14912         if test -n "$cf_db_libs" ; then
14913                 cf_cv_hashed_db_libs=$cf_db_libs
14914         else
14915                 cf_cv_hashed_db_libs=default
14916         fi
14917         LIBS="$cf_save_libs"
14918         break
14919
14920 else
14921   echo "$as_me: failed program was:" >&5
14922 cat conftest.$ac_ext >&5
14923 fi
14924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14925         LIBS="$cf_save_libs"
14926 done
14927
14928 fi
14929 echo "$as_me:14929: result: $cf_cv_hashed_db_libs" >&5
14930 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
14931
14932         if test "$cf_cv_hashed_db_libs" = unknown ; then
14933                 { { echo "$as_me:14933: error: Cannot determine library for db" >&5
14934 echo "$as_me: error: Cannot determine library for db" >&2;}
14935    { (exit 1); exit 1; }; }
14936         elif test "$cf_cv_hashed_db_libs" != default ; then
14937                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
14938         fi
14939 fi
14940
14941 else
14942
14943         { { echo "$as_me:14943: error: Cannot find db.h" >&5
14944 echo "$as_me: error: Cannot find db.h" >&2;}
14945    { (exit 1); exit 1; }; }
14946
14947 fi
14948
14949 fi
14950
14951 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
14952         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14953         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
14954 fi
14955
14956 # Just in case, check if the C compiler has a bool type.
14957
14958 echo "$as_me:14958: checking if we should include stdbool.h" >&5
14959 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
14960
14961 if test "${cf_cv_header_stdbool_h+set}" = set; then
14962   echo $ECHO_N "(cached) $ECHO_C" >&6
14963 else
14964
14965         cat >conftest.$ac_ext <<_ACEOF
14966 #line 14966 "configure"
14967 #include "confdefs.h"
14968
14969 int
14970 main ()
14971 {
14972 bool foo = false
14973   ;
14974   return 0;
14975 }
14976 _ACEOF
14977 rm -f conftest.$ac_objext
14978 if { (eval echo "$as_me:14978: \"$ac_compile\"") >&5
14979   (eval $ac_compile) 2>&5
14980   ac_status=$?
14981   echo "$as_me:14981: \$? = $ac_status" >&5
14982   (exit $ac_status); } &&
14983          { ac_try='test -s conftest.$ac_objext'
14984   { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985   (eval $ac_try) 2>&5
14986   ac_status=$?
14987   echo "$as_me:14987: \$? = $ac_status" >&5
14988   (exit $ac_status); }; }; then
14989   cf_cv_header_stdbool_h=0
14990 else
14991   echo "$as_me: failed program was:" >&5
14992 cat conftest.$ac_ext >&5
14993 cat >conftest.$ac_ext <<_ACEOF
14994 #line 14994 "configure"
14995 #include "confdefs.h"
14996
14997 #ifndef __BEOS__
14998 #include <stdbool.h>
14999 #endif
15000
15001 int
15002 main ()
15003 {
15004 bool foo = false
15005   ;
15006   return 0;
15007 }
15008 _ACEOF
15009 rm -f conftest.$ac_objext
15010 if { (eval echo "$as_me:15010: \"$ac_compile\"") >&5
15011   (eval $ac_compile) 2>&5
15012   ac_status=$?
15013   echo "$as_me:15013: \$? = $ac_status" >&5
15014   (exit $ac_status); } &&
15015          { ac_try='test -s conftest.$ac_objext'
15016   { (eval echo "$as_me:15016: \"$ac_try\"") >&5
15017   (eval $ac_try) 2>&5
15018   ac_status=$?
15019   echo "$as_me:15019: \$? = $ac_status" >&5
15020   (exit $ac_status); }; }; then
15021   cf_cv_header_stdbool_h=1
15022 else
15023   echo "$as_me: failed program was:" >&5
15024 cat conftest.$ac_ext >&5
15025 cf_cv_header_stdbool_h=0
15026 fi
15027 rm -f conftest.$ac_objext conftest.$ac_ext
15028 fi
15029 rm -f conftest.$ac_objext conftest.$ac_ext
15030 fi
15031
15032 if test "$cf_cv_header_stdbool_h" = 1
15033 then    echo "$as_me:15033: result: yes" >&5
15034 echo "${ECHO_T}yes" >&6
15035 else    echo "$as_me:15035: result: no" >&5
15036 echo "${ECHO_T}no" >&6
15037 fi
15038
15039 echo "$as_me:15039: checking for builtin bool type" >&5
15040 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15041
15042 if test "${cf_cv_cc_bool_type+set}" = set; then
15043   echo $ECHO_N "(cached) $ECHO_C" >&6
15044 else
15045
15046         cat >conftest.$ac_ext <<_ACEOF
15047 #line 15047 "configure"
15048 #include "confdefs.h"
15049
15050 #include <stdio.h>
15051 #include <sys/types.h>
15052
15053 int
15054 main ()
15055 {
15056 bool x = false
15057   ;
15058   return 0;
15059 }
15060 _ACEOF
15061 rm -f conftest.$ac_objext
15062 if { (eval echo "$as_me:15062: \"$ac_compile\"") >&5
15063   (eval $ac_compile) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); } &&
15067          { ac_try='test -s conftest.$ac_objext'
15068   { (eval echo "$as_me:15068: \"$ac_try\"") >&5
15069   (eval $ac_try) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); }; }; then
15073   cf_cv_cc_bool_type=1
15074 else
15075   echo "$as_me: failed program was:" >&5
15076 cat conftest.$ac_ext >&5
15077 cf_cv_cc_bool_type=0
15078 fi
15079 rm -f conftest.$ac_objext conftest.$ac_ext
15080
15081 fi
15082
15083 if test "$cf_cv_cc_bool_type" = 1
15084 then    echo "$as_me:15084: result: yes" >&5
15085 echo "${ECHO_T}yes" >&6
15086 else    echo "$as_me:15086: result: no" >&5
15087 echo "${ECHO_T}no" >&6
15088 fi
15089
15090 # Check for C++ compiler characteristics (and ensure that it's there!)
15091 if test -n "$CXX" ; then
15092         ac_ext=cc
15093 ac_cpp='$CXXCPP $CPPFLAGS'
15094 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15095 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15096 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15097 ac_main_return=return
15098
15099 if test -n "$GXX" ; then
15100 case $cf_cv_system_name in #(vi
15101 os2*) #(vi
15102         cf_stdcpp_libname=stdcpp
15103         ;;
15104 *)
15105         cf_stdcpp_libname=stdc++
15106         ;;
15107 esac
15108 echo "$as_me:15108: checking for library $cf_stdcpp_libname" >&5
15109 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15110 if test "${cf_cv_libstdcpp+set}" = set; then
15111   echo $ECHO_N "(cached) $ECHO_C" >&6
15112 else
15113
15114         cf_save="$LIBS"
15115         LIBS="$LIBS -l$cf_stdcpp_libname"
15116 cat >conftest.$ac_ext <<_ACEOF
15117 #line 15117 "configure"
15118 #include "confdefs.h"
15119
15120 #include <strstream.h>
15121 int
15122 main ()
15123 {
15124
15125 char buf[80];
15126 strstreambuf foo(buf, sizeof(buf))
15127
15128   ;
15129   return 0;
15130 }
15131 _ACEOF
15132 rm -f conftest.$ac_objext conftest$ac_exeext
15133 if { (eval echo "$as_me:15133: \"$ac_link\"") >&5
15134   (eval $ac_link) 2>&5
15135   ac_status=$?
15136   echo "$as_me:15136: \$? = $ac_status" >&5
15137   (exit $ac_status); } &&
15138          { ac_try='test -s conftest$ac_exeext'
15139   { (eval echo "$as_me:15139: \"$ac_try\"") >&5
15140   (eval $ac_try) 2>&5
15141   ac_status=$?
15142   echo "$as_me:15142: \$? = $ac_status" >&5
15143   (exit $ac_status); }; }; then
15144   cf_cv_libstdcpp=yes
15145 else
15146   echo "$as_me: failed program was:" >&5
15147 cat conftest.$ac_ext >&5
15148 cf_cv_libstdcpp=no
15149 fi
15150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15151         LIBS="$cf_save"
15152
15153 fi
15154 echo "$as_me:15154: result: $cf_cv_libstdcpp" >&5
15155 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15156 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15157 fi
15158
15159         echo "$as_me:15159: checking whether $CXX understands -c and -o together" >&5
15160 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15161 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15162   echo $ECHO_N "(cached) $ECHO_C" >&6
15163 else
15164
15165 cat > conftest.$ac_ext <<CF_EOF
15166 #include <stdio.h>
15167 int main()
15168 {
15169         ${cf_cv_main_return:-return}(0);
15170 }
15171 CF_EOF
15172 # We do the test twice because some compilers refuse to overwrite an
15173 # existing .o file with -o, though they will create one.
15174 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15175 if { (eval echo "$as_me:15175: \"$ac_try\"") >&5
15176   (eval $ac_try) 2>&5
15177   ac_status=$?
15178   echo "$as_me:15178: \$? = $ac_status" >&5
15179   (exit $ac_status); } &&
15180   test -f conftest2.$ac_objext && { (eval echo "$as_me:15180: \"$ac_try\"") >&5
15181   (eval $ac_try) 2>&5
15182   ac_status=$?
15183   echo "$as_me:15183: \$? = $ac_status" >&5
15184   (exit $ac_status); };
15185 then
15186   eval cf_cv_prog_CXX_c_o=yes
15187 else
15188   eval cf_cv_prog_CXX_c_o=no
15189 fi
15190 rm -f conftest*
15191
15192 fi
15193 if test $cf_cv_prog_CXX_c_o = yes; then
15194   echo "$as_me:15194: result: yes" >&5
15195 echo "${ECHO_T}yes" >&6
15196 else
15197   echo "$as_me:15197: result: no" >&5
15198 echo "${ECHO_T}no" >&6
15199 fi
15200
15201         case $GXX_VERSION in
15202         1*|2.0-6*)
15203                 cf_cxx_library=yes
15204                 ;;
15205         *-2.7*|2.7*)
15206
15207 cf_cxx_library=unknown
15208 case $cf_cv_system_name in #(vi
15209 os2*) #(vi
15210         cf_gpp_libname=gpp
15211         ;;
15212 *)
15213         cf_gpp_libname=g++
15214         ;;
15215 esac
15216 if test "$GXX" = yes; then
15217         echo "$as_me:15217: checking for lib$cf_gpp_libname" >&5
15218 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15219         cf_save="$LIBS"
15220         LIBS="$LIBS -l$cf_gpp_libname"
15221         cat >conftest.$ac_ext <<_ACEOF
15222 #line 15222 "configure"
15223 #include "confdefs.h"
15224
15225 #include <$cf_gpp_libname/builtin.h>
15226
15227 int
15228 main ()
15229 {
15230 two_arg_error_handler_t foo2 = lib_error_handler
15231   ;
15232   return 0;
15233 }
15234 _ACEOF
15235 rm -f conftest.$ac_objext conftest$ac_exeext
15236 if { (eval echo "$as_me:15236: \"$ac_link\"") >&5
15237   (eval $ac_link) 2>&5
15238   ac_status=$?
15239   echo "$as_me:15239: \$? = $ac_status" >&5
15240   (exit $ac_status); } &&
15241          { ac_try='test -s conftest$ac_exeext'
15242   { (eval echo "$as_me:15242: \"$ac_try\"") >&5
15243   (eval $ac_try) 2>&5
15244   ac_status=$?
15245   echo "$as_me:15245: \$? = $ac_status" >&5
15246   (exit $ac_status); }; }; then
15247   cf_cxx_library=yes
15248          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15249          if test "$cf_gpp_libname" = cpp ; then
15250             cat >>confdefs.h <<\EOF
15251 #define HAVE_GPP_BUILTIN_H 1
15252 EOF
15253
15254          else
15255             cat >>confdefs.h <<\EOF
15256 #define HAVE_GXX_BUILTIN_H 1
15257 EOF
15258
15259          fi
15260 else
15261   echo "$as_me: failed program was:" >&5
15262 cat conftest.$ac_ext >&5
15263 cat >conftest.$ac_ext <<_ACEOF
15264 #line 15264 "configure"
15265 #include "confdefs.h"
15266
15267 #include <builtin.h>
15268
15269 int
15270 main ()
15271 {
15272 two_arg_error_handler_t foo2 = lib_error_handler
15273   ;
15274   return 0;
15275 }
15276 _ACEOF
15277 rm -f conftest.$ac_objext conftest$ac_exeext
15278 if { (eval echo "$as_me:15278: \"$ac_link\"") >&5
15279   (eval $ac_link) 2>&5
15280   ac_status=$?
15281   echo "$as_me:15281: \$? = $ac_status" >&5
15282   (exit $ac_status); } &&
15283          { ac_try='test -s conftest$ac_exeext'
15284   { (eval echo "$as_me:15284: \"$ac_try\"") >&5
15285   (eval $ac_try) 2>&5
15286   ac_status=$?
15287   echo "$as_me:15287: \$? = $ac_status" >&5
15288   (exit $ac_status); }; }; then
15289   cf_cxx_library=yes
15290          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15291          cat >>confdefs.h <<\EOF
15292 #define HAVE_BUILTIN_H 1
15293 EOF
15294
15295 else
15296   echo "$as_me: failed program was:" >&5
15297 cat conftest.$ac_ext >&5
15298 cf_cxx_library=no
15299 fi
15300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15301 fi
15302 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15303         LIBS="$cf_save"
15304         echo "$as_me:15304: result: $cf_cxx_library" >&5
15305 echo "${ECHO_T}$cf_cxx_library" >&6
15306 fi
15307
15308                 ;;
15309         *)
15310                 cf_cxx_library=no
15311                 ;;
15312         esac
15313
15314         ac_ext=cc
15315 ac_cpp='$CXXCPP $CPPFLAGS'
15316 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15317 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15318 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15319 ac_main_return=return
15320 echo "$as_me:15320: checking how to run the C++ preprocessor" >&5
15321 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15322 if test -z "$CXXCPP"; then
15323   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15324   echo $ECHO_N "(cached) $ECHO_C" >&6
15325 else
15326       # Double quotes because CXXCPP needs to be expanded
15327     for CXXCPP in "$CXX -E" "/lib/cpp"
15328     do
15329       ac_preproc_ok=false
15330 for ac_cxx_preproc_warn_flag in '' yes
15331 do
15332   # Use a header file that comes with gcc, so configuring glibc
15333   # with a fresh cross-compiler works.
15334   # On the NeXT, cc -E runs the code through the compiler's parser,
15335   # not just through cpp. "Syntax error" is here to catch this case.
15336   cat >conftest.$ac_ext <<_ACEOF
15337 #line 15337 "configure"
15338 #include "confdefs.h"
15339 #include <assert.h>
15340                      Syntax error
15341 _ACEOF
15342 if { (eval echo "$as_me:15342: \"$ac_cpp conftest.$ac_ext\"") >&5
15343   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15344   ac_status=$?
15345   egrep -v '^ *\+' conftest.er1 >conftest.err
15346   rm -f conftest.er1
15347   cat conftest.err >&5
15348   echo "$as_me:15348: \$? = $ac_status" >&5
15349   (exit $ac_status); } >/dev/null; then
15350   if test -s conftest.err; then
15351     ac_cpp_err=$ac_cxx_preproc_warn_flag
15352   else
15353     ac_cpp_err=
15354   fi
15355 else
15356   ac_cpp_err=yes
15357 fi
15358 if test -z "$ac_cpp_err"; then
15359   :
15360 else
15361   echo "$as_me: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   # Broken: fails on valid input.
15364 continue
15365 fi
15366 rm -f conftest.err conftest.$ac_ext
15367
15368   # OK, works on sane cases.  Now check whether non-existent headers
15369   # can be detected and how.
15370   cat >conftest.$ac_ext <<_ACEOF
15371 #line 15371 "configure"
15372 #include "confdefs.h"
15373 #include <ac_nonexistent.h>
15374 _ACEOF
15375 if { (eval echo "$as_me:15375: \"$ac_cpp conftest.$ac_ext\"") >&5
15376   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15377   ac_status=$?
15378   egrep -v '^ *\+' conftest.er1 >conftest.err
15379   rm -f conftest.er1
15380   cat conftest.err >&5
15381   echo "$as_me:15381: \$? = $ac_status" >&5
15382   (exit $ac_status); } >/dev/null; then
15383   if test -s conftest.err; then
15384     ac_cpp_err=$ac_cxx_preproc_warn_flag
15385   else
15386     ac_cpp_err=
15387   fi
15388 else
15389   ac_cpp_err=yes
15390 fi
15391 if test -z "$ac_cpp_err"; then
15392   # Broken: success on invalid input.
15393 continue
15394 else
15395   echo "$as_me: failed program was:" >&5
15396   cat conftest.$ac_ext >&5
15397   # Passes both tests.
15398 ac_preproc_ok=:
15399 break
15400 fi
15401 rm -f conftest.err conftest.$ac_ext
15402
15403 done
15404 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15405 rm -f conftest.err conftest.$ac_ext
15406 if $ac_preproc_ok; then
15407   break
15408 fi
15409
15410     done
15411     ac_cv_prog_CXXCPP=$CXXCPP
15412
15413 fi
15414   CXXCPP=$ac_cv_prog_CXXCPP
15415 else
15416   ac_cv_prog_CXXCPP=$CXXCPP
15417 fi
15418 echo "$as_me:15418: result: $CXXCPP" >&5
15419 echo "${ECHO_T}$CXXCPP" >&6
15420 ac_preproc_ok=false
15421 for ac_cxx_preproc_warn_flag in '' yes
15422 do
15423   # Use a header file that comes with gcc, so configuring glibc
15424   # with a fresh cross-compiler works.
15425   # On the NeXT, cc -E runs the code through the compiler's parser,
15426   # not just through cpp. "Syntax error" is here to catch this case.
15427   cat >conftest.$ac_ext <<_ACEOF
15428 #line 15428 "configure"
15429 #include "confdefs.h"
15430 #include <assert.h>
15431                      Syntax error
15432 _ACEOF
15433 if { (eval echo "$as_me:15433: \"$ac_cpp conftest.$ac_ext\"") >&5
15434   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15435   ac_status=$?
15436   egrep -v '^ *\+' conftest.er1 >conftest.err
15437   rm -f conftest.er1
15438   cat conftest.err >&5
15439   echo "$as_me:15439: \$? = $ac_status" >&5
15440   (exit $ac_status); } >/dev/null; then
15441   if test -s conftest.err; then
15442     ac_cpp_err=$ac_cxx_preproc_warn_flag
15443   else
15444     ac_cpp_err=
15445   fi
15446 else
15447   ac_cpp_err=yes
15448 fi
15449 if test -z "$ac_cpp_err"; then
15450   :
15451 else
15452   echo "$as_me: failed program was:" >&5
15453   cat conftest.$ac_ext >&5
15454   # Broken: fails on valid input.
15455 continue
15456 fi
15457 rm -f conftest.err conftest.$ac_ext
15458
15459   # OK, works on sane cases.  Now check whether non-existent headers
15460   # can be detected and how.
15461   cat >conftest.$ac_ext <<_ACEOF
15462 #line 15462 "configure"
15463 #include "confdefs.h"
15464 #include <ac_nonexistent.h>
15465 _ACEOF
15466 if { (eval echo "$as_me:15466: \"$ac_cpp conftest.$ac_ext\"") >&5
15467   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15468   ac_status=$?
15469   egrep -v '^ *\+' conftest.er1 >conftest.err
15470   rm -f conftest.er1
15471   cat conftest.err >&5
15472   echo "$as_me:15472: \$? = $ac_status" >&5
15473   (exit $ac_status); } >/dev/null; then
15474   if test -s conftest.err; then
15475     ac_cpp_err=$ac_cxx_preproc_warn_flag
15476   else
15477     ac_cpp_err=
15478   fi
15479 else
15480   ac_cpp_err=yes
15481 fi
15482 if test -z "$ac_cpp_err"; then
15483   # Broken: success on invalid input.
15484 continue
15485 else
15486   echo "$as_me: failed program was:" >&5
15487   cat conftest.$ac_ext >&5
15488   # Passes both tests.
15489 ac_preproc_ok=:
15490 break
15491 fi
15492 rm -f conftest.err conftest.$ac_ext
15493
15494 done
15495 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15496 rm -f conftest.err conftest.$ac_ext
15497 if $ac_preproc_ok; then
15498   :
15499 else
15500   { { echo "$as_me:15500: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15501 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15502    { (exit 1); exit 1; }; }
15503 fi
15504
15505 ac_ext=cc
15506 ac_cpp='$CXXCPP $CPPFLAGS'
15507 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15508 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15509 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15510 ac_main_return=return
15511
15512 for ac_header in iostream typeinfo
15513 do
15514 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15515 echo "$as_me:15515: checking for $ac_header" >&5
15516 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15517 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15518   echo $ECHO_N "(cached) $ECHO_C" >&6
15519 else
15520   cat >conftest.$ac_ext <<_ACEOF
15521 #line 15521 "configure"
15522 #include "confdefs.h"
15523 #include <$ac_header>
15524 _ACEOF
15525 if { (eval echo "$as_me:15525: \"$ac_cpp conftest.$ac_ext\"") >&5
15526   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15527   ac_status=$?
15528   egrep -v '^ *\+' conftest.er1 >conftest.err
15529   rm -f conftest.er1
15530   cat conftest.err >&5
15531   echo "$as_me:15531: \$? = $ac_status" >&5
15532   (exit $ac_status); } >/dev/null; then
15533   if test -s conftest.err; then
15534     ac_cpp_err=$ac_cxx_preproc_warn_flag
15535   else
15536     ac_cpp_err=
15537   fi
15538 else
15539   ac_cpp_err=yes
15540 fi
15541 if test -z "$ac_cpp_err"; then
15542   eval "$as_ac_Header=yes"
15543 else
15544   echo "$as_me: failed program was:" >&5
15545   cat conftest.$ac_ext >&5
15546   eval "$as_ac_Header=no"
15547 fi
15548 rm -f conftest.err conftest.$ac_ext
15549 fi
15550 echo "$as_me:15550: result: `eval echo '${'$as_ac_Header'}'`" >&5
15551 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15552 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15553   cat >>confdefs.h <<EOF
15554 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15555 EOF
15556
15557 fi
15558 done
15559
15560     if test x"$ac_cv_header_iostream" = xyes ; then
15561         echo "$as_me:15561: checking if iostream uses std-namespace" >&5
15562 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15563         cat >conftest.$ac_ext <<_ACEOF
15564 #line 15564 "configure"
15565 #include "confdefs.h"
15566
15567 #include <iostream>
15568 using std::endl;
15569 using std::cerr;
15570 int
15571 main ()
15572 {
15573
15574 cerr << "testing" << endl;
15575
15576   ;
15577   return 0;
15578 }
15579 _ACEOF
15580 rm -f conftest.$ac_objext
15581 if { (eval echo "$as_me:15581: \"$ac_compile\"") >&5
15582   (eval $ac_compile) 2>&5
15583   ac_status=$?
15584   echo "$as_me:15584: \$? = $ac_status" >&5
15585   (exit $ac_status); } &&
15586          { ac_try='test -s conftest.$ac_objext'
15587   { (eval echo "$as_me:15587: \"$ac_try\"") >&5
15588   (eval $ac_try) 2>&5
15589   ac_status=$?
15590   echo "$as_me:15590: \$? = $ac_status" >&5
15591   (exit $ac_status); }; }; then
15592   cf_iostream_namespace=yes
15593 else
15594   echo "$as_me: failed program was:" >&5
15595 cat conftest.$ac_ext >&5
15596 cf_iostream_namespace=no
15597 fi
15598 rm -f conftest.$ac_objext conftest.$ac_ext
15599         echo "$as_me:15599: result: $cf_iostream_namespace" >&5
15600 echo "${ECHO_T}$cf_iostream_namespace" >&6
15601         if test "$cf_iostream_namespace" = yes ; then
15602             cat >>confdefs.h <<\EOF
15603 #define IOSTREAM_NAMESPACE 1
15604 EOF
15605
15606         fi
15607     fi
15608
15609 echo "$as_me:15609: checking if we should include stdbool.h" >&5
15610 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15611
15612 if test "${cf_cv_header_stdbool_h+set}" = set; then
15613   echo $ECHO_N "(cached) $ECHO_C" >&6
15614 else
15615
15616         cat >conftest.$ac_ext <<_ACEOF
15617 #line 15617 "configure"
15618 #include "confdefs.h"
15619
15620 int
15621 main ()
15622 {
15623 bool foo = false
15624   ;
15625   return 0;
15626 }
15627 _ACEOF
15628 rm -f conftest.$ac_objext
15629 if { (eval echo "$as_me:15629: \"$ac_compile\"") >&5
15630   (eval $ac_compile) 2>&5
15631   ac_status=$?
15632   echo "$as_me:15632: \$? = $ac_status" >&5
15633   (exit $ac_status); } &&
15634          { ac_try='test -s conftest.$ac_objext'
15635   { (eval echo "$as_me:15635: \"$ac_try\"") >&5
15636   (eval $ac_try) 2>&5
15637   ac_status=$?
15638   echo "$as_me:15638: \$? = $ac_status" >&5
15639   (exit $ac_status); }; }; then
15640   cf_cv_header_stdbool_h=0
15641 else
15642   echo "$as_me: failed program was:" >&5
15643 cat conftest.$ac_ext >&5
15644 cat >conftest.$ac_ext <<_ACEOF
15645 #line 15645 "configure"
15646 #include "confdefs.h"
15647
15648 #ifndef __BEOS__
15649 #include <stdbool.h>
15650 #endif
15651
15652 int
15653 main ()
15654 {
15655 bool foo = false
15656   ;
15657   return 0;
15658 }
15659 _ACEOF
15660 rm -f conftest.$ac_objext
15661 if { (eval echo "$as_me:15661: \"$ac_compile\"") >&5
15662   (eval $ac_compile) 2>&5
15663   ac_status=$?
15664   echo "$as_me:15664: \$? = $ac_status" >&5
15665   (exit $ac_status); } &&
15666          { ac_try='test -s conftest.$ac_objext'
15667   { (eval echo "$as_me:15667: \"$ac_try\"") >&5
15668   (eval $ac_try) 2>&5
15669   ac_status=$?
15670   echo "$as_me:15670: \$? = $ac_status" >&5
15671   (exit $ac_status); }; }; then
15672   cf_cv_header_stdbool_h=1
15673 else
15674   echo "$as_me: failed program was:" >&5
15675 cat conftest.$ac_ext >&5
15676 cf_cv_header_stdbool_h=0
15677 fi
15678 rm -f conftest.$ac_objext conftest.$ac_ext
15679 fi
15680 rm -f conftest.$ac_objext conftest.$ac_ext
15681 fi
15682
15683 if test "$cf_cv_header_stdbool_h" = 1
15684 then    echo "$as_me:15684: result: yes" >&5
15685 echo "${ECHO_T}yes" >&6
15686 else    echo "$as_me:15686: result: no" >&5
15687 echo "${ECHO_T}no" >&6
15688 fi
15689
15690 echo "$as_me:15690: checking for builtin bool type" >&5
15691 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15692
15693 if test "${cf_cv_builtin_bool+set}" = set; then
15694   echo $ECHO_N "(cached) $ECHO_C" >&6
15695 else
15696
15697         cat >conftest.$ac_ext <<_ACEOF
15698 #line 15698 "configure"
15699 #include "confdefs.h"
15700
15701 #include <stdio.h>
15702 #include <sys/types.h>
15703
15704 int
15705 main ()
15706 {
15707 bool x = false
15708   ;
15709   return 0;
15710 }
15711 _ACEOF
15712 rm -f conftest.$ac_objext
15713 if { (eval echo "$as_me:15713: \"$ac_compile\"") >&5
15714   (eval $ac_compile) 2>&5
15715   ac_status=$?
15716   echo "$as_me:15716: \$? = $ac_status" >&5
15717   (exit $ac_status); } &&
15718          { ac_try='test -s conftest.$ac_objext'
15719   { (eval echo "$as_me:15719: \"$ac_try\"") >&5
15720   (eval $ac_try) 2>&5
15721   ac_status=$?
15722   echo "$as_me:15722: \$? = $ac_status" >&5
15723   (exit $ac_status); }; }; then
15724   cf_cv_builtin_bool=1
15725 else
15726   echo "$as_me: failed program was:" >&5
15727 cat conftest.$ac_ext >&5
15728 cf_cv_builtin_bool=0
15729 fi
15730 rm -f conftest.$ac_objext conftest.$ac_ext
15731
15732 fi
15733
15734 if test "$cf_cv_builtin_bool" = 1
15735 then    echo "$as_me:15735: result: yes" >&5
15736 echo "${ECHO_T}yes" >&6
15737 else    echo "$as_me:15737: result: no" >&5
15738 echo "${ECHO_T}no" >&6
15739 fi
15740
15741 echo "$as_me:15741: checking for size of bool" >&5
15742 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15743 if test "${cf_cv_type_of_bool+set}" = set; then
15744   echo $ECHO_N "(cached) $ECHO_C" >&6
15745 else
15746
15747         rm -f cf_test.out
15748         if test "$cross_compiling" = yes; then
15749   cf_cv_type_of_bool=unknown
15750 else
15751   cat >conftest.$ac_ext <<_ACEOF
15752 #line 15752 "configure"
15753 #include "confdefs.h"
15754
15755 #include <stdlib.h>
15756 #include <stdio.h>
15757
15758 #if defined(__cplusplus)
15759
15760 #ifdef HAVE_GXX_BUILTIN_H
15761 #include <g++/builtin.h>
15762 #elif HAVE_GPP_BUILTIN_H
15763 #include <gpp/builtin.h>
15764 #elif HAVE_BUILTIN_H
15765 #include <builtin.h>
15766 #endif
15767
15768 #else
15769
15770 #if $cf_cv_header_stdbool_h
15771 #include <stdbool.h>
15772 #endif
15773
15774 #endif
15775
15776 main()
15777 {
15778         FILE *fp = fopen("cf_test.out", "w");
15779         if (fp != 0) {
15780                 bool x = true;
15781                 if ((bool)(-x) >= 0)
15782                         fputs("unsigned ", fp);
15783                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15784                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15785                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15786                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15787                 fclose(fp);
15788         }
15789         ${cf_cv_main_return:-return}(0);
15790 }
15791
15792 _ACEOF
15793 rm -f conftest$ac_exeext
15794 if { (eval echo "$as_me:15794: \"$ac_link\"") >&5
15795   (eval $ac_link) 2>&5
15796   ac_status=$?
15797   echo "$as_me:15797: \$? = $ac_status" >&5
15798   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15799   { (eval echo "$as_me:15799: \"$ac_try\"") >&5
15800   (eval $ac_try) 2>&5
15801   ac_status=$?
15802   echo "$as_me:15802: \$? = $ac_status" >&5
15803   (exit $ac_status); }; }; then
15804   cf_cv_type_of_bool=`cat cf_test.out`
15805                  if test -z "$cf_cv_type_of_bool"; then
15806                    cf_cv_type_of_bool=unknown
15807                  fi
15808 else
15809   echo "$as_me: program exited with status $ac_status" >&5
15810 echo "$as_me: failed program was:" >&5
15811 cat conftest.$ac_ext >&5
15812 cf_cv_type_of_bool=unknown
15813 fi
15814 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15815 fi
15816
15817 fi
15818
15819         rm -f cf_test.out
15820 echo "$as_me:15820: result: $cf_cv_type_of_bool" >&5
15821 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15822 if test "$cf_cv_type_of_bool" = unknown ; then
15823         case .$NCURSES_BOOL in #(vi
15824         .auto|.) NCURSES_BOOL=unsigned;;
15825         esac
15826         { echo "$as_me:15826: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15827 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15828         cf_cv_type_of_bool=$NCURSES_BOOL
15829 fi
15830
15831 echo "$as_me:15831: checking for special defines needed for etip.h" >&5
15832 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15833 cf_save_CXXFLAGS="$CXXFLAGS"
15834 cf_result="none"
15835 for cf_math in "" MATH_H
15836 do
15837 for cf_excp in "" MATH_EXCEPTION
15838 do
15839         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15840         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15841         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15842 cat >conftest.$ac_ext <<_ACEOF
15843 #line 15843 "configure"
15844 #include "confdefs.h"
15845
15846 #include <etip.h.in>
15847
15848 int
15849 main ()
15850 {
15851
15852   ;
15853   return 0;
15854 }
15855 _ACEOF
15856 rm -f conftest.$ac_objext
15857 if { (eval echo "$as_me:15857: \"$ac_compile\"") >&5
15858   (eval $ac_compile) 2>&5
15859   ac_status=$?
15860   echo "$as_me:15860: \$? = $ac_status" >&5
15861   (exit $ac_status); } &&
15862          { ac_try='test -s conftest.$ac_objext'
15863   { (eval echo "$as_me:15863: \"$ac_try\"") >&5
15864   (eval $ac_try) 2>&5
15865   ac_status=$?
15866   echo "$as_me:15866: \$? = $ac_status" >&5
15867   (exit $ac_status); }; }; then
15868
15869         test -n "$cf_math" && cat >>confdefs.h <<EOF
15870 #define ETIP_NEEDS_${cf_math} 1
15871 EOF
15872
15873         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15874 #define ETIP_NEEDS_${cf_excp} 1
15875 EOF
15876
15877         cf_result="$cf_math $cf_excp"
15878         break
15879
15880 else
15881   echo "$as_me: failed program was:" >&5
15882 cat conftest.$ac_ext >&5
15883 fi
15884 rm -f conftest.$ac_objext conftest.$ac_ext
15885 done
15886 done
15887 echo "$as_me:15887: result: $cf_result" >&5
15888 echo "${ECHO_T}$cf_result" >&6
15889 CXXFLAGS="$cf_save_CXXFLAGS"
15890
15891 if test -n "$CXX"; then
15892 echo "$as_me:15892: checking if $CXX accepts parameter initialization" >&5
15893 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15894 if test "${cf_cv_cpp_param_init+set}" = set; then
15895   echo $ECHO_N "(cached) $ECHO_C" >&6
15896 else
15897
15898         ac_ext=cc
15899 ac_cpp='$CXXCPP $CPPFLAGS'
15900 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15901 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15902 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15903 ac_main_return=return
15904
15905         if test "$cross_compiling" = yes; then
15906   cf_cv_cpp_param_init=unknown
15907 else
15908   cat >conftest.$ac_ext <<_ACEOF
15909 #line 15909 "configure"
15910 #include "confdefs.h"
15911
15912 class TEST {
15913 private:
15914         int value;
15915 public:
15916         TEST(int x = 1);
15917         ~TEST();
15918 };
15919
15920 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15921 {
15922         value = x;
15923 }
15924 void main() { }
15925
15926 _ACEOF
15927 rm -f conftest$ac_exeext
15928 if { (eval echo "$as_me:15928: \"$ac_link\"") >&5
15929   (eval $ac_link) 2>&5
15930   ac_status=$?
15931   echo "$as_me:15931: \$? = $ac_status" >&5
15932   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15933   { (eval echo "$as_me:15933: \"$ac_try\"") >&5
15934   (eval $ac_try) 2>&5
15935   ac_status=$?
15936   echo "$as_me:15936: \$? = $ac_status" >&5
15937   (exit $ac_status); }; }; then
15938   cf_cv_cpp_param_init=yes
15939 else
15940   echo "$as_me: program exited with status $ac_status" >&5
15941 echo "$as_me: failed program was:" >&5
15942 cat conftest.$ac_ext >&5
15943 cf_cv_cpp_param_init=no
15944 fi
15945 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15946 fi
15947         ac_ext=cc
15948 ac_cpp='$CXXCPP $CPPFLAGS'
15949 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15950 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15951 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15952 ac_main_return=return
15953
15954 fi
15955 echo "$as_me:15955: result: $cf_cv_cpp_param_init" >&5
15956 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
15957 fi
15958 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
15959 #define CPP_HAS_PARAM_INIT 1
15960 EOF
15961
15962 if test -n "$CXX"; then
15963
15964 echo "$as_me:15964: checking if $CXX accepts static_cast" >&5
15965 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
15966 if test "${cf_cv_cpp_static_cast+set}" = set; then
15967   echo $ECHO_N "(cached) $ECHO_C" >&6
15968 else
15969
15970         ac_ext=cc
15971 ac_cpp='$CXXCPP $CPPFLAGS'
15972 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15973 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15974 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15975 ac_main_return=return
15976
15977         cat >conftest.$ac_ext <<_ACEOF
15978 #line 15978 "configure"
15979 #include "confdefs.h"
15980
15981 class NCursesPanel
15982 {
15983 public:
15984   NCursesPanel(int nlines,
15985                int ncols,
15986                int begin_y = 0,
15987                int begin_x = 0)
15988   {
15989   }
15990
15991   ~NCursesPanel();
15992 };
15993
15994 template<class T> class NCursesUserPanel : public NCursesPanel
15995 {
15996 public:
15997   NCursesUserPanel (int nlines,
15998                     int ncols,
15999                     int begin_y = 0,
16000                     int begin_x = 0,
16001                     const T* p_UserData = static_cast<T*>(0))
16002     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16003   {
16004   };
16005   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16006   {
16007   };
16008
16009   virtual ~NCursesUserPanel() {};
16010 };
16011
16012 int
16013 main ()
16014 {
16015
16016         const char* p_UserData = static_cast<char*>(0)
16017   ;
16018   return 0;
16019 }
16020 _ACEOF
16021 rm -f conftest.$ac_objext
16022 if { (eval echo "$as_me:16022: \"$ac_compile\"") >&5
16023   (eval $ac_compile) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit $ac_status); } &&
16027          { ac_try='test -s conftest.$ac_objext'
16028   { (eval echo "$as_me:16028: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit $ac_status); }; }; then
16033   cf_cv_cpp_static_cast=yes
16034 else
16035   echo "$as_me: failed program was:" >&5
16036 cat conftest.$ac_ext >&5
16037 cf_cv_cpp_static_cast=no
16038 fi
16039 rm -f conftest.$ac_objext conftest.$ac_ext
16040
16041         ac_ext=cc
16042 ac_cpp='$CXXCPP $CPPFLAGS'
16043 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16044 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16045 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16046 ac_main_return=return
16047
16048 fi
16049 echo "$as_me:16049: result: $cf_cv_cpp_static_cast" >&5
16050 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16051
16052 fi
16053
16054 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16055 #define CPP_HAS_STATIC_CAST 1
16056 EOF
16057
16058         CXX_AR='$(AR)'
16059         CXX_ARFLAGS='$(ARFLAGS)'
16060         case $cf_cv_system_name in #(vi
16061         irix*) #(vi
16062             if test "$GXX" != yes ; then
16063                 CXX_AR='$(CXX)'
16064                 CXX_ARFLAGS='-ar -o'
16065             fi
16066             ;;
16067         sco3.2v5*) #(vi
16068             CXXLDFLAGS="-u main"
16069             ;;
16070         solaris2*)
16071             if test "$GXX" != yes ; then
16072                 CXX_AR='$(CXX)'
16073                 CXX_ARFLAGS='-xar -o'
16074             fi
16075             ;;
16076         esac
16077
16078 else
16079         cf_cxx_library=no
16080         cf_cv_builtin_bool=1
16081
16082         # Just because we are not configuring against C++ right now does not
16083         # mean that a user will not want to use C++.  Some distributors disable
16084         # the C++ portion of this configuration as a shortcut (or just to avoid
16085         # compiling the demo in the c++ directory).  So we need a reasonable
16086         # default for the 'bool' type.
16087         #
16088         # Caveat: since the storage of the bool type is not standardized, it
16089         # may change.
16090
16091         if test "$NCURSES_BOOL" != auto ; then
16092                 cf_cv_type_of_bool=$NCURSES_BOOL
16093                 cf_cv_header_stdbool_h=0
16094         else
16095                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16096
16097 echo "$as_me:16097: checking for size of bool" >&5
16098 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16099 if test "${cf_cv_type_of_bool+set}" = set; then
16100   echo $ECHO_N "(cached) $ECHO_C" >&6
16101 else
16102
16103         rm -f cf_test.out
16104         if test "$cross_compiling" = yes; then
16105   cf_cv_type_of_bool=unknown
16106 else
16107   cat >conftest.$ac_ext <<_ACEOF
16108 #line 16108 "configure"
16109 #include "confdefs.h"
16110
16111 #include <stdlib.h>
16112 #include <stdio.h>
16113
16114 #if defined(__cplusplus)
16115
16116 #ifdef HAVE_GXX_BUILTIN_H
16117 #include <g++/builtin.h>
16118 #elif HAVE_GPP_BUILTIN_H
16119 #include <gpp/builtin.h>
16120 #elif HAVE_BUILTIN_H
16121 #include <builtin.h>
16122 #endif
16123
16124 #else
16125
16126 #if $cf_cv_header_stdbool_h
16127 #include <stdbool.h>
16128 #endif
16129
16130 #endif
16131
16132 main()
16133 {
16134         FILE *fp = fopen("cf_test.out", "w");
16135         if (fp != 0) {
16136                 bool x = true;
16137                 if ((bool)(-x) >= 0)
16138                         fputs("unsigned ", fp);
16139                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16140                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16141                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16142                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16143                 fclose(fp);
16144         }
16145         ${cf_cv_main_return:-return}(0);
16146 }
16147
16148 _ACEOF
16149 rm -f conftest$ac_exeext
16150 if { (eval echo "$as_me:16150: \"$ac_link\"") >&5
16151   (eval $ac_link) 2>&5
16152   ac_status=$?
16153   echo "$as_me:16153: \$? = $ac_status" >&5
16154   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16155   { (eval echo "$as_me:16155: \"$ac_try\"") >&5
16156   (eval $ac_try) 2>&5
16157   ac_status=$?
16158   echo "$as_me:16158: \$? = $ac_status" >&5
16159   (exit $ac_status); }; }; then
16160   cf_cv_type_of_bool=`cat cf_test.out`
16161                  if test -z "$cf_cv_type_of_bool"; then
16162                    cf_cv_type_of_bool=unknown
16163                  fi
16164 else
16165   echo "$as_me: program exited with status $ac_status" >&5
16166 echo "$as_me: failed program was:" >&5
16167 cat conftest.$ac_ext >&5
16168 cf_cv_type_of_bool=unknown
16169 fi
16170 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16171 fi
16172
16173 fi
16174
16175         rm -f cf_test.out
16176 echo "$as_me:16176: result: $cf_cv_type_of_bool" >&5
16177 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16178 if test "$cf_cv_type_of_bool" = unknown ; then
16179         case .$NCURSES_BOOL in #(vi
16180         .auto|.) NCURSES_BOOL=unsigned;;
16181         esac
16182         { echo "$as_me:16182: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16183 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16184         cf_cv_type_of_bool=$NCURSES_BOOL
16185 fi
16186
16187                 else
16188                         echo "$as_me:16188: checking for fallback type of bool" >&5
16189 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16190                         case "$host_cpu" in #(vi
16191                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16192                         *)      cf_cv_type_of_bool=int  ;;
16193                         esac
16194                         echo "$as_me:16194: result: $cf_cv_type_of_bool" >&5
16195 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16196                 fi
16197         fi
16198 fi
16199
16200 # If the C compiler did not declare bool, and we did not determine that the C++
16201 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16202 # ncurses library use the same type as C++ bool.  Note that this allows one to
16203 # specify the type of bool in a configure-script option and postpone
16204 # integration with the C++ compiler provided that the types are compatible.
16205 USE_CXX_BOOL=1
16206 if test $cf_cv_cc_bool_type = 1
16207 then
16208         # oops: C has a bool.  Unlikely, but C++ could differ.
16209         USE_CXX_BOOL=0
16210 elif test $cf_cv_builtin_bool = 0
16211 then
16212         # C++ has no bool
16213         USE_CXX_BOOL=0
16214 else
16215         # this is the normal case
16216         USE_CXX_BOOL='defined(__cplusplus)'
16217 fi
16218
16219 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16220
16221 if test "$cf_with_ada" != "no" ; then
16222     if test "$with_libtool" != "no"; then
16223         { echo "$as_me:16223: WARNING: libtool does not support Ada - disabling feature" >&5
16224 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16225         cf_with_ada=no
16226     fi
16227 fi
16228
16229 if test "$cf_with_ada" != "no" ; then
16230 cf_ada_make=gnatmake
16231 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16232 set dummy $cf_ada_make; ac_word=$2
16233 echo "$as_me:16233: checking for $ac_word" >&5
16234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16235 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16236   echo $ECHO_N "(cached) $ECHO_C" >&6
16237 else
16238   if test -n "$gnat_exists"; then
16239   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16240 else
16241   ac_save_IFS=$IFS; IFS=$ac_path_separator
16242 ac_dummy="$PATH"
16243 for ac_dir in $ac_dummy; do
16244   IFS=$ac_save_IFS
16245   test -z "$ac_dir" && ac_dir=.
16246   $as_executable_p "$ac_dir/$ac_word" || continue
16247 ac_cv_prog_gnat_exists="yes"
16248 echo "$as_me:16248: found $ac_dir/$ac_word" >&5
16249 break
16250 done
16251
16252   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16253 fi
16254 fi
16255 gnat_exists=$ac_cv_prog_gnat_exists
16256 if test -n "$gnat_exists"; then
16257   echo "$as_me:16257: result: $gnat_exists" >&5
16258 echo "${ECHO_T}$gnat_exists" >&6
16259 else
16260   echo "$as_me:16260: result: no" >&5
16261 echo "${ECHO_T}no" >&6
16262 fi
16263
16264 if test "$ac_cv_prog_gnat_exists" = no; then
16265    cf_ada_make=
16266 else
16267
16268 echo "$as_me:16268: checking for gnat version" >&5
16269 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16270 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16271   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16272 echo "$as_me:16272: result: $cf_gnat_version" >&5
16273 echo "${ECHO_T}$cf_gnat_version" >&6
16274
16275 case $cf_gnat_version in
16276   3.1[1-9]*|3.[2-9]*|[4-9].*)
16277     cf_cv_prog_gnat_correct=yes
16278     ;;
16279   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16280      cf_cv_prog_gnat_correct=no
16281      ;;
16282 esac
16283 case $cf_gnat_version in
16284   3.[1-9]*|[4-9].*)
16285       cf_compile_generics=generics
16286       cf_generic_objects="\${GENOBJS}"
16287       ;;
16288   *)  cf_compile_generics=
16289       cf_generic_objects=
16290       ;;
16291 esac
16292
16293    # Extract the first word of "m4", so it can be a program name with args.
16294 set dummy m4; ac_word=$2
16295 echo "$as_me:16295: checking for $ac_word" >&5
16296 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16297 if test "${ac_cv_prog_M4_exists+set}" = set; then
16298   echo $ECHO_N "(cached) $ECHO_C" >&6
16299 else
16300   if test -n "$M4_exists"; then
16301   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16302 else
16303   ac_save_IFS=$IFS; IFS=$ac_path_separator
16304 ac_dummy="$PATH"
16305 for ac_dir in $ac_dummy; do
16306   IFS=$ac_save_IFS
16307   test -z "$ac_dir" && ac_dir=.
16308   $as_executable_p "$ac_dir/$ac_word" || continue
16309 ac_cv_prog_M4_exists="yes"
16310 echo "$as_me:16310: found $ac_dir/$ac_word" >&5
16311 break
16312 done
16313
16314   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16315 fi
16316 fi
16317 M4_exists=$ac_cv_prog_M4_exists
16318 if test -n "$M4_exists"; then
16319   echo "$as_me:16319: result: $M4_exists" >&5
16320 echo "${ECHO_T}$M4_exists" >&6
16321 else
16322   echo "$as_me:16322: result: no" >&5
16323 echo "${ECHO_T}no" >&6
16324 fi
16325
16326    if test "$ac_cv_prog_M4_exists" = no; then
16327       cf_cv_prog_gnat_correct=no
16328       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16329    fi
16330    if test "$cf_cv_prog_gnat_correct" = yes; then
16331       echo "$as_me:16331: checking if GNAT works" >&5
16332 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16333
16334 rm -f conftest*
16335 cat >>conftest.ads <<CF_EOF
16336 procedure conftest;
16337 CF_EOF
16338 cat >>conftest.adb <<CF_EOF
16339 with Text_IO;
16340 with GNAT.OS_Lib;
16341 procedure conftest is
16342 begin
16343    Text_IO.Put ("Hello World");
16344    Text_IO.New_Line;
16345    GNAT.OS_Lib.OS_Exit (0);
16346 end conftest;
16347 CF_EOF
16348 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16349    if ( ./conftest 1>&5 2>&1 ) ; then
16350       cf_cv_prog_gnat_correct=yes
16351    else
16352       cf_cv_prog_gnat_correct=no
16353    fi
16354 else
16355    cf_cv_prog_gnat_correct=no
16356 fi
16357 rm -f conftest*
16358
16359       echo "$as_me:16359: result: $cf_cv_prog_gnat_correct" >&5
16360 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16361    fi
16362 fi
16363 if test "$cf_cv_prog_gnat_correct" = yes; then
16364    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16365
16366    echo "$as_me:16366: checking if GNAT pragma Unreferenced works" >&5
16367 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16368
16369 rm -f conftest*
16370 cat >>conftest.ads <<CF_EOF
16371 procedure conftest;
16372 CF_EOF
16373 cat >>conftest.adb <<CF_EOF
16374 with Text_IO;
16375 with GNAT.OS_Lib;
16376 procedure conftest is
16377    test : Integer;
16378    pragma Unreferenced (test);
16379 begin
16380    test := 1;
16381    Text_IO.Put ("Hello World");
16382    Text_IO.New_Line;
16383    GNAT.OS_Lib.OS_Exit (0);
16384 end conftest;
16385 CF_EOF
16386 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16387       cf_cv_pragma_unreferenced=yes
16388 else
16389    cf_cv_pragma_unreferenced=no
16390 fi
16391 rm -f conftest*
16392
16393    echo "$as_me:16393: result: $cf_cv_pragma_unreferenced" >&5
16394 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16395
16396    # if the pragma is supported, use it (needed in the Trace code).
16397    if test $cf_cv_pragma_unreferenced = yes ; then
16398       PRAGMA_UNREF=TRUE
16399    else
16400       PRAGMA_UNREF=FALSE
16401    fi
16402
16403 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16404 if test "${with_ada_compiler+set}" = set; then
16405   withval="$with_ada_compiler"
16406   cf_ada_compiler=$withval
16407 else
16408   cf_ada_compiler=gnatmake
16409 fi;
16410
16411    cf_ada_package=terminal_interface
16412
16413 # Check whether --with-ada-include or --without-ada-include was given.
16414 if test "${with_ada_include+set}" = set; then
16415   withval="$with_ada_include"
16416
16417 else
16418   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16419 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16420
16421 if test "x$prefix" != xNONE; then
16422   cf_path_syntax="$prefix"
16423 else
16424   cf_path_syntax="$ac_default_prefix"
16425 fi
16426
16427 case ".$withval" in #(vi
16428 .\$\(*\)*|.\'*\'*) #(vi
16429   ;;
16430 ..|./*|.\\*) #(vi
16431   ;;
16432 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16433   ;;
16434 .\${*prefix}*) #(vi
16435   eval withval="$withval"
16436   case ".$withval" in #(vi
16437   .NONE/*)
16438     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16439     ;;
16440   esac
16441   ;; #(vi
16442 .no|.NONE/*)
16443   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16444   ;;
16445 *)
16446   { { echo "$as_me:16446: error: expected a pathname, not \"$withval\"" >&5
16447 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16448    { (exit 1); exit 1; }; }
16449   ;;
16450 esac
16451
16452 fi
16453 ADA_INCLUDE="$withval"
16454
16455 # Check whether --with-ada-objects or --without-ada-objects was given.
16456 if test "${with_ada_objects+set}" = set; then
16457   withval="$with_ada_objects"
16458
16459 else
16460   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16461 fi; if test -n "$prefix/lib/ada/adalib" ; then
16462
16463 if test "x$prefix" != xNONE; then
16464   cf_path_syntax="$prefix"
16465 else
16466   cf_path_syntax="$ac_default_prefix"
16467 fi
16468
16469 case ".$withval" in #(vi
16470 .\$\(*\)*|.\'*\'*) #(vi
16471   ;;
16472 ..|./*|.\\*) #(vi
16473   ;;
16474 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16475   ;;
16476 .\${*prefix}*) #(vi
16477   eval withval="$withval"
16478   case ".$withval" in #(vi
16479   .NONE/*)
16480     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16481     ;;
16482   esac
16483   ;; #(vi
16484 .no|.NONE/*)
16485   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16486   ;;
16487 *)
16488   { { echo "$as_me:16488: error: expected a pathname, not \"$withval\"" >&5
16489 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16490    { (exit 1); exit 1; }; }
16491   ;;
16492 esac
16493
16494 fi
16495 ADA_OBJECTS="$withval"
16496
16497 fi
16498 fi
16499 else
16500    cf_with_ada=no
16501 fi
16502
16503 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16504 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16505 ###
16506 ### ticlib modules may be a separate library, otherwise contained in termlib.
16507 ### termlib modules may be a separate library, otherwise contained in ncurses.
16508 ###
16509 ### The of "+" or " " between the tokens controls the way the script
16510 ### chooses to split module lists into libraries.
16511 ###
16512 ### (see CF_LIB_RULES).
16513 echo "$as_me:16513: checking for library subsets" >&5
16514 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16515 LIB_SUBSETS=
16516
16517 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16518         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16519         if test "$with_ticlib" != no ; then
16520                 LIB_SUBSETS="${LIB_SUBSETS} "
16521         else
16522                 LIB_SUBSETS="${LIB_SUBSETS}+"
16523         fi
16524 fi
16525
16526 LIB_SUBSETS="${LIB_SUBSETS}termlib"
16527 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16528 if test "$with_termlib" != no ; then
16529         LIB_SUBSETS="${LIB_SUBSETS} "
16530 else
16531         LIB_SUBSETS="${LIB_SUBSETS}+"
16532 fi
16533
16534 LIB_SUBSETS="${LIB_SUBSETS}base"
16535 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16536 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16537
16538 echo "$as_me:16538: result: $LIB_SUBSETS" >&5
16539 echo "${ECHO_T}$LIB_SUBSETS" >&6
16540
16541 ### Construct the list of include-directories to be generated
16542
16543 CPPFLAGS="-I. -I../include $CPPFLAGS"
16544 if test "$srcdir" != "."; then
16545         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
16546 fi
16547 if test "$GCC" != yes; then
16548         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16549 elif test "$includedir" != "/usr/include"; then
16550         if test "$includedir" = '${prefix}/include' ; then
16551                 if test $prefix != /usr ; then
16552                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16553                 fi
16554         else
16555                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16556         fi
16557 fi
16558
16559 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16560 if test "$srcdir" != "."; then
16561         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16562 fi
16563 if test "$GCC" != yes; then
16564         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16565 elif test "$includedir" != "/usr/include"; then
16566         if test "$includedir" = '${prefix}/include' ; then
16567                 if test $prefix != /usr ; then
16568                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16569                 fi
16570         else
16571                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16572         fi
16573 fi
16574
16575 ### Build up pieces for makefile rules
16576 echo "$as_me:16576: checking default library suffix" >&5
16577 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16578
16579         case $DFT_LWR_MODEL in
16580         libtool) DFT_ARG_SUFFIX=''   ;;
16581         normal)  DFT_ARG_SUFFIX=''   ;;
16582         debug)   DFT_ARG_SUFFIX='_g' ;;
16583         profile) DFT_ARG_SUFFIX='_p' ;;
16584         shared)  DFT_ARG_SUFFIX=''   ;;
16585         esac
16586         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16587 echo "$as_me:16587: result: $DFT_ARG_SUFFIX" >&5
16588 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16589
16590 echo "$as_me:16590: checking default library-dependency suffix" >&5
16591 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16592
16593         case $DFT_LWR_MODEL in #(vi
16594         libtool) #(vi
16595                 DFT_LIB_SUFFIX='.la'
16596                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16597                 ;;
16598         normal) #(vi
16599                 DFT_LIB_SUFFIX='.a'
16600                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16601                 ;;
16602         debug) #(vi
16603                 DFT_LIB_SUFFIX='_g.a'
16604                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16605                 ;;
16606         profile) #(vi
16607                 DFT_LIB_SUFFIX='_p.a'
16608                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16609                 ;;
16610         shared) #(vi
16611                 case $cf_cv_system_name in
16612                 aix[56]*) #(vi
16613                         DFT_LIB_SUFFIX='.a'
16614                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16615                         ;;
16616                 cygwin*) #(vi
16617                         DFT_LIB_SUFFIX='.dll'
16618                         DFT_DEP_SUFFIX='.dll.a'
16619                         ;;
16620                 darwin*) #(vi
16621                         DFT_LIB_SUFFIX='.dylib'
16622                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16623                         ;;
16624                 hpux*) #(vi
16625                         case $target in
16626                         ia64*) #(vi
16627                                 DFT_LIB_SUFFIX='.so'
16628                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16629                                 ;;
16630                         *) #(vi
16631                                 DFT_LIB_SUFFIX='.sl'
16632                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16633                                 ;;
16634                         esac
16635                         ;;
16636                 *)      DFT_LIB_SUFFIX='.so'
16637                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16638                         ;;
16639                 esac
16640         esac
16641         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16642         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16643 echo "$as_me:16643: result: $DFT_DEP_SUFFIX" >&5
16644 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16645
16646 echo "$as_me:16646: checking default object directory" >&5
16647 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16648
16649         case $DFT_LWR_MODEL in
16650         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16651         normal)  DFT_OBJ_SUBDIR='objects' ;;
16652         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16653         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16654         shared)
16655                 case $cf_cv_system_name in #(vi
16656                 cygwin) #(vi
16657                         DFT_OBJ_SUBDIR='objects' ;;
16658                 *)
16659                         DFT_OBJ_SUBDIR='obj_s' ;;
16660                 esac
16661         esac
16662 echo "$as_me:16662: result: $DFT_OBJ_SUBDIR" >&5
16663 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16664
16665 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16666 if test "$cf_with_cxx" = yes ; then
16667 echo "$as_me:16667: checking c++ library-dependency suffix" >&5
16668 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16669 if test "$with_libtool" != "no"; then
16670         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16671 else
16672
16673         case normal in #(vi
16674         libtool) #(vi
16675                 CXX_LIB_SUFFIX='.la'
16676                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16677                 ;;
16678         normal) #(vi
16679                 CXX_LIB_SUFFIX='.a'
16680                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16681                 ;;
16682         debug) #(vi
16683                 CXX_LIB_SUFFIX='_g.a'
16684                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16685                 ;;
16686         profile) #(vi
16687                 CXX_LIB_SUFFIX='_p.a'
16688                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16689                 ;;
16690         shared) #(vi
16691                 case $cf_cv_system_name in
16692                 aix[56]*) #(vi
16693                         CXX_LIB_SUFFIX='.a'
16694                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16695                         ;;
16696                 cygwin*) #(vi
16697                         CXX_LIB_SUFFIX='.dll'
16698                         CXX_DEP_SUFFIX='.dll.a'
16699                         ;;
16700                 darwin*) #(vi
16701                         CXX_LIB_SUFFIX='.dylib'
16702                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16703                         ;;
16704                 hpux*) #(vi
16705                         case $target in
16706                         ia64*) #(vi
16707                                 CXX_LIB_SUFFIX='.so'
16708                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16709                                 ;;
16710                         *) #(vi
16711                                 CXX_LIB_SUFFIX='.sl'
16712                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16713                                 ;;
16714                         esac
16715                         ;;
16716                 *)      CXX_LIB_SUFFIX='.so'
16717                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16718                         ;;
16719                 esac
16720         esac
16721         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16722         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16723 fi
16724 echo "$as_me:16724: result: $CXX_LIB_SUFFIX" >&5
16725 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16726
16727 fi
16728
16729 # do not want -ldl in build except as needed for -lncurses dependency
16730 if test "$with_dlsym" = yes ; then
16731 if test $DFT_LWR_MODEL = shared || \
16732    test $DFT_LWR_MODEL = libtool ; then
16733
16734 # remove dl library from $LIBS
16735 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16736
16737 fi
16738 fi
16739 ### Set up low-level terminfo dependencies for makefiles.
16740
16741 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16742 # do not need libdl
16743 TICS_LIST=
16744 if test "$with_dlsym" = yes ; then
16745
16746 # remove dl library from $SHLIB_LIST
16747 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16748
16749 fi
16750
16751 if test "$with_ticlib" != no ; then
16752
16753         if test "$with_ticlib" != yes ; then
16754                 TICS_NAME=$with_ticlib
16755                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16756                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16757                 TICS_LIB_SUFFIX="${with_ticlib}"
16758         else
16759                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16760                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16761                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16762         fi
16763         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16764 else
16765         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16766 fi
16767
16768 if test "$with_termlib" != no ; then
16769
16770         if test "$with_termlib" != yes ; then
16771                 TINFO_NAME=$with_termlib
16772                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16773                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16774                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16775                 TINFO_LIB_SUFFIX="${with_termlib}"
16776         else
16777                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16778                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16779                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16780                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16781         fi
16782
16783         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16784         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16785         if test "$DFT_LWR_MODEL" = "libtool"; then
16786                 TEST_ARGS="${TEST_DEPS}"
16787                 TEST_ARG2="${TEST_DEP2}"
16788                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16789         else
16790                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16791                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16792                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16793                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16794                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16795         fi
16796 else
16797         # the next lines are needed for linking libtic over libncurses
16798         TINFO_NAME=${LIB_NAME}
16799         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16800         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16801         if test "$with_tic_depends" = yes ; then
16802                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16803         else
16804                 TICS_LIST="$SHLIB_LIST"
16805         fi
16806
16807         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16808 fi
16809
16810 if test "$DFT_LWR_MODEL" = shared ; then
16811         case $cf_cv_system_name in #(vi
16812         cygwin*)
16813                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16814                 TINFO_SUFFIX=.dll
16815                 ;;
16816         esac
16817 fi
16818
16819 if test "$with_dlsym" = yes ; then
16820
16821 # remove dl library from $TICS_LIST
16822 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16823
16824 fi
16825
16826 if test "$DFT_LWR_MODEL" = "libtool"; then
16827     OBJEXT=lo
16828 fi
16829
16830 # needed for Ada95
16831 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16832
16833 case $DFT_LWR_MODEL in
16834 normal|debug|profile)
16835
16836 if test "$GCC" = yes ; then
16837         case $cf_cv_system_name in #(
16838         OS/2*|os2*|aix[4]*)     #( vi
16839                 LDFLAGS_STATIC=
16840                 LDFLAGS_SHARED=
16841                 ;;
16842     *)  #( normally, except when broken
16843         LDFLAGS_STATIC=-static
16844         LDFLAGS_SHARED=-dynamic
16845         ;;
16846     esac
16847 else
16848         case $cf_cv_system_name in #(
16849         aix[456]*)      #( from ld manpage
16850                 LDFLAGS_STATIC=-bstatic
16851                 LDFLAGS_SHARED=-bdynamic
16852                 ;;
16853         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16854                 # We could also use just "archive" and "shared".
16855                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16856                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16857                 ;;
16858         irix*)          #( from ld manpage IRIX64
16859                 LDFLAGS_STATIC=-Bstatic
16860                 LDFLAGS_SHARED=-Bdynamic
16861                 ;;
16862         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16863                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16864                 LDFLAGS_STATIC=-noso
16865                 LDFLAGS_SHARED=-so_archive
16866                 ;;
16867         solaris2*)
16868                 LDFLAGS_STATIC=-Bstatic
16869                 LDFLAGS_SHARED=-Bdynamic
16870                 ;;
16871         esac
16872 fi
16873
16874         ;;
16875 esac
16876
16877 echo "$as_me:16877: checking where we will install curses.h" >&5
16878 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16879 test "$with_overwrite" = no && \
16880 test "x$includedir" = 'x${prefix}/include' && \
16881         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16882 echo "$as_me:16882: result: $includedir" >&5
16883 echo "${ECHO_T}$includedir" >&6
16884
16885 ### Resolve a conflict between normal and wide-curses by forcing applications
16886 ### that will need libutf8 to add it to their configure script.
16887 if test "$with_overwrite" != no ; then
16888 if test "$NCURSES_LIBUTF8" = 1 ; then
16889         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16890         { echo "$as_me:16890: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16891 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16892 fi
16893 fi
16894 WITH_OVERWRITE=$with_overwrite
16895
16896 # used to separate tack out of the tree
16897 NCURSES_TREE=
16898
16899 ### predefined stuff for the test programs
16900 cat >>confdefs.h <<\EOF
16901 #define HAVE_SLK_COLOR 1
16902 EOF
16903
16904 ### Construct the list of subdirectories for which we'll customize makefiles
16905 ### with the appropriate compile-rules.
16906
16907 echo "$as_me:16907: checking for src modules" >&5
16908 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
16909
16910 # dependencies and linker-arguments for test-programs
16911 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
16912 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
16913 if test "$DFT_LWR_MODEL" = "libtool"; then
16914         TEST_ARGS="${TEST_DEPS}"
16915         TEST_ARG2="${TEST_DEP2}"
16916 else
16917         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
16918         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
16919 fi
16920
16921 cf_cv_src_modules=
16922 for cf_dir in $modules_to_build
16923 do
16924         if test -f $srcdir/$cf_dir/modules; then
16925
16926                 # We may/may not have tack in the distribution, though the
16927                 # makefile is.
16928                 if test $cf_dir = tack ; then
16929                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
16930                                 continue
16931                         fi
16932                 fi
16933
16934                 if test -z "$cf_cv_src_modules"; then
16935                         cf_cv_src_modules=$cf_dir
16936                 else
16937                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
16938                 fi
16939
16940                 # Make the ncurses_cfg.h file record the library interface files as
16941                 # well.  These are header files that are the same name as their
16942                 # directory.  Ncurses is the only library that does not follow
16943                 # that pattern.
16944                 if test $cf_dir = tack ; then
16945                         continue
16946                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
16947
16948 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16949
16950                         cat >>confdefs.h <<EOF
16951 #define HAVE_${cf_have_include}_H 1
16952 EOF
16953
16954                         cat >>confdefs.h <<EOF
16955 #define HAVE_LIB${cf_have_include} 1
16956 EOF
16957
16958                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
16959                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
16960                         if test "$DFT_LWR_MODEL" = "libtool"; then
16961                                 TEST_ARGS="${TEST_DEPS}"
16962                                 TEST_ARG2="${TEST_DEP2}"
16963                         else
16964                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
16965                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
16966                         fi
16967                 fi
16968         fi
16969 done
16970 echo "$as_me:16970: result: $cf_cv_src_modules" >&5
16971 echo "${ECHO_T}$cf_cv_src_modules" >&6
16972
16973 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
16974 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
16975
16976 SRC_SUBDIRS=
16977 if test "x$cf_with_manpages" != xno ; then
16978         SRC_SUBDIRS="$SRC_SUBDIRS man"
16979 fi
16980 SRC_SUBDIRS="$SRC_SUBDIRS include"
16981 for cf_dir in $cf_cv_src_modules
16982 do
16983         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
16984 done
16985 SRC_SUBDIRS="$SRC_SUBDIRS test"
16986 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
16987 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
16988
16989 ADA_SUBDIRS=
16990 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
16991         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
16992         ADA_SUBDIRS="gen src samples"
16993 fi
16994
16995 SUB_MAKEFILES=
16996 for cf_dir in $SRC_SUBDIRS
16997 do
16998         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
16999 done
17000
17001 if test -n "$ADA_SUBDIRS"; then
17002         for cf_dir in $ADA_SUBDIRS
17003         do
17004                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17005         done
17006
17007 fi
17008
17009 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17010    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses-config"
17011 fi
17012
17013 DIRS_TO_MAKE="lib"
17014 for cf_item in $cf_list_models
17015 do
17016
17017         case $cf_item in
17018         libtool) cf_subdir='obj_lo'  ;;
17019         normal)  cf_subdir='objects' ;;
17020         debug)   cf_subdir='obj_g' ;;
17021         profile) cf_subdir='obj_p' ;;
17022         shared)
17023                 case $cf_cv_system_name in #(vi
17024                 cygwin) #(vi
17025                         cf_subdir='objects' ;;
17026                 *)
17027                         cf_subdir='obj_s' ;;
17028                 esac
17029         esac
17030
17031         for cf_item2 in $DIRS_TO_MAKE
17032         do
17033                 test $cf_item2 = $cf_subdir && break
17034         done
17035         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17036 done
17037 for cf_dir in $DIRS_TO_MAKE
17038 do
17039         test ! -d $cf_dir && mkdir $cf_dir
17040 done
17041
17042 cat >>confdefs.h <<EOF
17043 #define NCURSES_PATHSEP '$PATHSEP'
17044 EOF
17045
17046 cat >>confdefs.h <<EOF
17047 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17048 EOF
17049
17050 ### Now that we're done running tests, add the compiler-warnings, if any
17051
17052 cf_fix_cppflags=no
17053 cf_new_cflags=
17054 cf_new_cppflags=
17055 cf_new_extra_cppflags=
17056
17057 for cf_add_cflags in $EXTRA_CFLAGS
17058 do
17059 case $cf_fix_cppflags in
17060 no)
17061         case $cf_add_cflags in #(vi
17062         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17063                 case $cf_add_cflags in
17064                 -D*)
17065                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17066
17067                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17068                         && test -z "${cf_tst_cflags}" \
17069                         && cf_fix_cppflags=yes
17070
17071                         if test $cf_fix_cppflags = yes ; then
17072                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17073                                 continue
17074                         elif test "${cf_tst_cflags}" = "\"'" ; then
17075                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17076                                 continue
17077                         fi
17078                         ;;
17079                 esac
17080                 case "$CPPFLAGS" in
17081                 *$cf_add_cflags) #(vi
17082                         ;;
17083                 *) #(vi
17084                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17085                         ;;
17086                 esac
17087                 ;;
17088         *)
17089                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17090                 ;;
17091         esac
17092         ;;
17093 yes)
17094         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17095
17096         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17097
17098         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17099         && test -z "${cf_tst_cflags}" \
17100         && cf_fix_cppflags=no
17101         ;;
17102 esac
17103 done
17104
17105 if test -n "$cf_new_cflags" ; then
17106
17107         CFLAGS="$CFLAGS $cf_new_cflags"
17108 fi
17109
17110 if test -n "$cf_new_cppflags" ; then
17111
17112         CPPFLAGS="$cf_new_cppflags $CPPFLAGS"
17113 fi
17114
17115 if test -n "$cf_new_extra_cppflags" ; then
17116
17117         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17118 fi
17119
17120 ### If we're building with rpath, try to link non-standard libs that way too.
17121 if test "$DFT_LWR_MODEL" = "shared"; then
17122
17123 echo "$as_me:17123: checking for updated LDFLAGS" >&5
17124 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17125 if test -n "$LDFLAGS" ; then
17126 echo "$as_me:17126: result: maybe" >&5
17127 echo "${ECHO_T}maybe" >&6
17128 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17129
17130 echo "${as_me-configure}:17130: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17131
17132 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17133
17134 echo "${as_me-configure}:17134: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17135
17136 case "$EXTRA_LDFLAGS" in #(vi
17137 -Wl,-rpath,*) #(vi
17138         cf_rpath_hack="-Wl,-rpath,"
17139         ;;
17140 -R\ *)
17141         cf_rpath_hack="-R "
17142         ;;
17143 -R*)
17144         cf_rpath_hack="-R"
17145         ;;
17146 *)
17147         cf_rpath_hack=
17148         ;;
17149 esac
17150 if test -n "$cf_rpath_hack" ; then
17151         cf_rpath_dst=
17152         for cf_rpath_src in $LDFLAGS
17153         do
17154                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17155
17156 echo "${as_me-configure}:17156: testing Filtering $cf_rpath_src ..." 1>&5
17157
17158                 case $cf_rpath_src in #(vi
17159                 -L*) #(vi
17160                         if test "$cf_rpath_hack" = "-R " ; then
17161                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17162                         else
17163                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17164                         fi
17165                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17166
17167 echo "${as_me-configure}:17167: testing ...Filter $cf_rpath_tmp ..." 1>&5
17168
17169                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17170                         ;;
17171                 esac
17172                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17173         done
17174         LDFLAGS=$cf_rpath_dst
17175         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17176
17177 echo "${as_me-configure}:17177: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17178
17179         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17180
17181 echo "${as_me-configure}:17181: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17182
17183 fi
17184 else
17185 echo "$as_me:17185: result: no" >&5
17186 echo "${ECHO_T}no" >&6
17187 fi
17188
17189 fi
17190
17191 ### Define substitutions for header files to avoid name-pollution
17192
17193 if test "$cf_cv_have_tcgetattr" = yes ; then
17194         HAVE_TCGETATTR=1
17195 else
17196         HAVE_TCGETATTR=0
17197 fi
17198
17199 if test "$ac_cv_header_termio_h" = yes ; then
17200         HAVE_TERMIO_H=1
17201 else
17202         HAVE_TERMIO_H=0
17203 fi
17204
17205 if test "$ac_cv_header_termios_h" = yes ; then
17206         HAVE_TERMIOS_H=1
17207 else
17208         HAVE_TERMIOS_H=0
17209 fi
17210
17211 ################################################################################
17212 test "$use_database" = yes && \
17213 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17214
17215 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17216
17217 if test x"$enable_pc_files" = xyes ; then \
17218 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17219 MAKE_PC_FILES=
17220 else
17221 MAKE_PC_FILES="#"
17222 fi
17223
17224 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
17225 ac_config_commands="$ac_config_commands default"
17226 cat >confcache <<\_ACEOF
17227 # This file is a shell script that caches the results of configure
17228 # tests run on this system so they can be shared between configure
17229 # scripts and configure runs, see configure's option --config-cache.
17230 # It is not useful on other systems.  If it contains results you don't
17231 # want to keep, you may remove or edit it.
17232 #
17233 # config.status only pays attention to the cache file if you give it
17234 # the --recheck option to rerun configure.
17235 #
17236 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17237 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17238 # following values.
17239
17240 _ACEOF
17241
17242 # The following way of writing the cache mishandles newlines in values,
17243 # but we know of no workaround that is simple, portable, and efficient.
17244 # So, don't put newlines in cache variables' values.
17245 # Ultrix sh set writes to stderr and can't be redirected directly,
17246 # and sets the high bit in the cache file unless we assign to the vars.
17247 {
17248   (set) 2>&1 |
17249     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17250     *ac_space=\ *)
17251       # `set' does not quote correctly, so add quotes (double-quote
17252       # substitution turns \\\\ into \\, and sed turns \\ into \).
17253       sed -n \
17254         "s/'/'\\\\''/g;
17255           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17256       ;;
17257     *)
17258       # `set' quotes correctly as required by POSIX, so do not add quotes.
17259       sed -n \
17260         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17261       ;;
17262     esac;
17263 } |
17264   sed '
17265      t clear
17266      : clear
17267      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17268      t end
17269      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17270      : end' >>confcache
17271 if cmp -s $cache_file confcache; then :; else
17272   if test -w $cache_file; then
17273     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17274     cat confcache >$cache_file
17275   else
17276     echo "not updating unwritable cache $cache_file"
17277   fi
17278 fi
17279 rm -f confcache
17280
17281 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17282 # Let make expand exec_prefix.
17283 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17284
17285 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17286 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17287 # trailing colons and then remove the whole line if VPATH becomes empty
17288 # (actually we leave an empty line to preserve line numbers).
17289 if test "x$srcdir" = x.; then
17290   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17291 s/:*\$(srcdir):*/:/;
17292 s/:*\${srcdir}:*/:/;
17293 s/:*@srcdir@:*/:/;
17294 s/^\([^=]*=[    ]*\):*/\1/;
17295 s/:*$//;
17296 s/^[^=]*=[      ]*$//;
17297 }'
17298 fi
17299
17300 DEFS=-DHAVE_CONFIG_H
17301
17302 : ${CONFIG_STATUS=./config.status}
17303 ac_clean_files_save=$ac_clean_files
17304 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17305 { echo "$as_me:17305: creating $CONFIG_STATUS" >&5
17306 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17307 cat >$CONFIG_STATUS <<_ACEOF
17308 #! $SHELL
17309 # Generated automatically by configure.
17310 # Run this file to recreate the current configuration.
17311 # Compiler output produced by configure, useful for debugging
17312 # configure, is in config.log if it exists.
17313
17314 debug=false
17315 SHELL=\${CONFIG_SHELL-$SHELL}
17316 ac_cs_invocation="\$0 \$@"
17317
17318 _ACEOF
17319
17320 cat >>$CONFIG_STATUS <<\_ACEOF
17321 # Be Bourne compatible
17322 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17323   emulate sh
17324   NULLCMD=:
17325 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17326   set -o posix
17327 fi
17328
17329 # Name of the executable.
17330 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17331
17332 if expr a : '\(a\)' >/dev/null 2>&1; then
17333   as_expr=expr
17334 else
17335   as_expr=false
17336 fi
17337
17338 rm -f conf$$ conf$$.exe conf$$.file
17339 echo >conf$$.file
17340 if ln -s conf$$.file conf$$ 2>/dev/null; then
17341   # We could just check for DJGPP; but this test a) works b) is more generic
17342   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17343   if test -f conf$$.exe; then
17344     # Don't use ln at all; we don't have any links
17345     as_ln_s='cp -p'
17346   else
17347     as_ln_s='ln -s'
17348   fi
17349 elif ln conf$$.file conf$$ 2>/dev/null; then
17350   as_ln_s=ln
17351 else
17352   as_ln_s='cp -p'
17353 fi
17354 rm -f conf$$ conf$$.exe conf$$.file
17355
17356 as_executable_p="test -f"
17357
17358 # Support unset when possible.
17359 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17360   as_unset=unset
17361 else
17362   as_unset=false
17363 fi
17364
17365 # NLS nuisances.
17366 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17367 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17368 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17369 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17370 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17371 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17372 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17373 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17374
17375 # IFS
17376 # We need space, tab and new line, in precisely that order.
17377 as_nl='
17378 '
17379 IFS="   $as_nl"
17380
17381 # CDPATH.
17382 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17383
17384 exec 6>&1
17385
17386 _ACEOF
17387
17388 # Files that config.status was made for.
17389 if test -n "$ac_config_files"; then
17390   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17391 fi
17392
17393 if test -n "$ac_config_headers"; then
17394   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17395 fi
17396
17397 if test -n "$ac_config_links"; then
17398   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17399 fi
17400
17401 if test -n "$ac_config_commands"; then
17402   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17403 fi
17404
17405 cat >>$CONFIG_STATUS <<\EOF
17406
17407 ac_cs_usage="\
17408 \`$as_me' instantiates files from templates according to the
17409 current configuration.
17410
17411 Usage: $0 [OPTIONS] [FILE]...
17412
17413   -h, --help       print this help, then exit
17414   -V, --version    print version number, then exit
17415   -d, --debug      don't remove temporary files
17416       --recheck    update $as_me by reconfiguring in the same conditions
17417   --file=FILE[:TEMPLATE]
17418                    instantiate the configuration file FILE
17419   --header=FILE[:TEMPLATE]
17420                    instantiate the configuration header FILE
17421
17422 Configuration files:
17423 $config_files
17424
17425 Configuration headers:
17426 $config_headers
17427
17428 Configuration commands:
17429 $config_commands
17430
17431 Report bugs to <bug-autoconf@gnu.org>."
17432 EOF
17433
17434 cat >>$CONFIG_STATUS <<EOF
17435 ac_cs_version="\\
17436 config.status
17437 configured by $0, generated by GNU Autoconf 2.52.20081225,
17438   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17439
17440 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17441 Free Software Foundation, Inc.
17442 This config.status script is free software; the Free Software Foundation
17443 gives unlimited permission to copy, distribute and modify it."
17444 srcdir=$srcdir
17445 INSTALL="$INSTALL"
17446 EOF
17447
17448 cat >>$CONFIG_STATUS <<\EOF
17449 # If no file are specified by the user, then we need to provide default
17450 # value.  By we need to know if files were specified by the user.
17451 ac_need_defaults=:
17452 while test $# != 0
17453 do
17454   case $1 in
17455   --*=*)
17456     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17457     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17458     shift
17459     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17460     shift
17461     ;;
17462   -*);;
17463   *) # This is not an option, so the user has probably given explicit
17464      # arguments.
17465      ac_need_defaults=false;;
17466   esac
17467
17468   case $1 in
17469   # Handling of the options.
17470 EOF
17471 cat >>$CONFIG_STATUS <<EOF
17472   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17473     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17474     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17475 EOF
17476 cat >>$CONFIG_STATUS <<\EOF
17477   --version | --vers* | -V )
17478     echo "$ac_cs_version"; exit 0 ;;
17479   --he | --h)
17480     # Conflict between --help and --header
17481     { { echo "$as_me:17481: error: ambiguous option: $1
17482 Try \`$0 --help' for more information." >&5
17483 echo "$as_me: error: ambiguous option: $1
17484 Try \`$0 --help' for more information." >&2;}
17485    { (exit 1); exit 1; }; };;
17486   --help | --hel | -h )
17487     echo "$ac_cs_usage"; exit 0 ;;
17488   --debug | --d* | -d )
17489     debug=: ;;
17490   --file | --fil | --fi | --f )
17491     shift
17492     CONFIG_FILES="$CONFIG_FILES $1"
17493     ac_need_defaults=false;;
17494   --header | --heade | --head | --hea )
17495     shift
17496     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17497     ac_need_defaults=false;;
17498
17499   # This is an error.
17500   -*) { { echo "$as_me:17500: error: unrecognized option: $1
17501 Try \`$0 --help' for more information." >&5
17502 echo "$as_me: error: unrecognized option: $1
17503 Try \`$0 --help' for more information." >&2;}
17504    { (exit 1); exit 1; }; } ;;
17505
17506   *) ac_config_targets="$ac_config_targets $1" ;;
17507
17508   esac
17509   shift
17510 done
17511
17512 exec 5>>config.log
17513 cat >&5 << _ACEOF
17514
17515 ## ----------------------- ##
17516 ## Running config.status.  ##
17517 ## ----------------------- ##
17518
17519 This file was extended by $as_me 2.52.20081225, executed with
17520   CONFIG_FILES    = $CONFIG_FILES
17521   CONFIG_HEADERS  = $CONFIG_HEADERS
17522   CONFIG_LINKS    = $CONFIG_LINKS
17523   CONFIG_COMMANDS = $CONFIG_COMMANDS
17524   > $ac_cs_invocation
17525 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17526
17527 _ACEOF
17528 EOF
17529
17530 cat >>$CONFIG_STATUS <<EOF
17531 #
17532 # INIT-COMMANDS section.
17533 #
17534
17535 ### Special initialization commands, used to pass information from the
17536 ### configuration-run into config.status
17537
17538 AWK="$AWK"
17539 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17540 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17541 ECHO_LINK="$ECHO_LINK"
17542 LDCONFIG="$LDCONFIG"
17543 LIB_NAME="$LIB_NAME"
17544 LIB_SUBSETS="$LIB_SUBSETS"
17545 LIB_SUFFIX="$LIB_SUFFIX"
17546 LIB_TRACING="$LIB_TRACING"
17547 MAKE_TERMINFO="$MAKE_TERMINFO"
17548 NCURSES_MAJOR="$NCURSES_MAJOR"
17549 NCURSES_MINOR="$NCURSES_MINOR"
17550 NCURSES_OSPEED="$NCURSES_OSPEED"
17551 NCURSES_PATCH="$NCURSES_PATCH"
17552 SRC_SUBDIRS="$SRC_SUBDIRS"
17553 TERMINFO="$TERMINFO"
17554 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17555 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17556 TICS_NAME="$TICS_NAME"
17557 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17558 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17559 TINFO_NAME="$TINFO_NAME"
17560 TINFO_SUFFIX="$TINFO_SUFFIX"
17561 WITH_CURSES_H="$with_curses_h"
17562 WITH_ECHO="$with_echo"
17563 WITH_OVERWRITE="$with_overwrite"
17564 cf_LIST_MODELS="$cf_list_models"
17565 cf_cv_abi_version="$cf_cv_abi_version"
17566 cf_cv_do_relink="$cf_cv_do_relink"
17567 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17568 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17569 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17570 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17571 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17572 cf_cv_rel_version="$cf_cv_rel_version"
17573 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17574 cf_cv_shared_soname='$cf_cv_shared_soname'
17575 cf_cv_shlib_version="$cf_cv_shlib_version"
17576 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17577 cf_cv_system_name="$cf_cv_system_name"
17578 cf_with_cxx_binding="$cf_with_cxx_binding"
17579 cf_with_manpages="$cf_with_manpages"
17580 host="$host"
17581 target="$target"
17582
17583 EOF
17584
17585 cat >>$CONFIG_STATUS <<\EOF
17586 for ac_config_target in $ac_config_targets
17587 do
17588   case "$ac_config_target" in
17589   # Handling of arguments.
17590   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17591   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17592   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17593   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17594   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17595   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17596   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17597   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17598   *) { { echo "$as_me:17598: error: invalid argument: $ac_config_target" >&5
17599 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17600    { (exit 1); exit 1; }; };;
17601   esac
17602 done
17603
17604 # If the user did not use the arguments to specify the items to instantiate,
17605 # then the envvar interface is used.  Set only those that are not.
17606 # We use the long form for the default assignment because of an extremely
17607 # bizarre bug on SunOS 4.1.3.
17608 if $ac_need_defaults; then
17609   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17610   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17611   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17612 fi
17613
17614 # Create a temporary directory, and hook for its removal unless debugging.
17615 $debug ||
17616 {
17617   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17618   trap '{ (exit 1); exit 1; }' 1 2 13 15
17619 }
17620
17621 # Create a (secure) tmp directory for tmp files.
17622 : ${TMPDIR=/tmp}
17623 {
17624   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17625   test -n "$tmp" && test -d "$tmp"
17626 }  ||
17627 {
17628   tmp=$TMPDIR/cs$$-$RANDOM
17629   (umask 077 && mkdir $tmp)
17630 } ||
17631 {
17632    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17633    { (exit 1); exit 1; }
17634 }
17635
17636 EOF
17637
17638 cat >>$CONFIG_STATUS <<EOF
17639
17640 #
17641 # CONFIG_FILES section.
17642 #
17643
17644 # No need to generate the scripts if there are no CONFIG_FILES.
17645 # This happens for instance when ./config.status config.h
17646 if test -n "\$CONFIG_FILES"; then
17647   # Protect against being on the right side of a sed subst in config.status.
17648   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17649    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17650 s,@SHELL@,$SHELL,;t t
17651 s,@exec_prefix@,$exec_prefix,;t t
17652 s,@prefix@,$prefix,;t t
17653 s,@program_transform_name@,$program_transform_name,;t t
17654 s,@bindir@,$bindir,;t t
17655 s,@sbindir@,$sbindir,;t t
17656 s,@libexecdir@,$libexecdir,;t t
17657 s,@datadir@,$datadir,;t t
17658 s,@sysconfdir@,$sysconfdir,;t t
17659 s,@sharedstatedir@,$sharedstatedir,;t t
17660 s,@localstatedir@,$localstatedir,;t t
17661 s,@libdir@,$libdir,;t t
17662 s,@includedir@,$includedir,;t t
17663 s,@oldincludedir@,$oldincludedir,;t t
17664 s,@infodir@,$infodir,;t t
17665 s,@mandir@,$mandir,;t t
17666 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17667 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17668 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17669 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17670 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17671 s,@build_alias@,$build_alias,;t t
17672 s,@host_alias@,$host_alias,;t t
17673 s,@target_alias@,$target_alias,;t t
17674 s,@ECHO_C@,$ECHO_C,;t t
17675 s,@ECHO_N@,$ECHO_N,;t t
17676 s,@ECHO_T@,$ECHO_T,;t t
17677 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17678 s,@DEFS@,$DEFS,;t t
17679 s,@LIBS@,$LIBS,;t t
17680 s,@top_builddir@,$top_builddir,;t t
17681 s,@EGREP@,$EGREP,;t t
17682 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17683 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17684 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17685 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17686 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17687 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17688 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17689 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17690 s,@build@,$build,;t t
17691 s,@build_cpu@,$build_cpu,;t t
17692 s,@build_vendor@,$build_vendor,;t t
17693 s,@build_os@,$build_os,;t t
17694 s,@host@,$host,;t t
17695 s,@host_cpu@,$host_cpu,;t t
17696 s,@host_vendor@,$host_vendor,;t t
17697 s,@host_os@,$host_os,;t t
17698 s,@target@,$target,;t t
17699 s,@target_cpu@,$target_cpu,;t t
17700 s,@target_vendor@,$target_vendor,;t t
17701 s,@target_os@,$target_os,;t t
17702 s,@CC@,$CC,;t t
17703 s,@CFLAGS@,$CFLAGS,;t t
17704 s,@LDFLAGS@,$LDFLAGS,;t t
17705 s,@CPPFLAGS@,$CPPFLAGS,;t t
17706 s,@ac_ct_CC@,$ac_ct_CC,;t t
17707 s,@EXEEXT@,$EXEEXT,;t t
17708 s,@OBJEXT@,$OBJEXT,;t t
17709 s,@CPP@,$CPP,;t t
17710 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17711 s,@PROG_EXT@,$PROG_EXT,;t t
17712 s,@LDCONFIG@,$LDCONFIG,;t t
17713 s,@CXX@,$CXX,;t t
17714 s,@CXXFLAGS@,$CXXFLAGS,;t t
17715 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17716 s,@AWK@,$AWK,;t t
17717 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17718 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17719 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17720 s,@LINT@,$LINT,;t t
17721 s,@LINT_OPTS@,$LINT_OPTS,;t t
17722 s,@LN_S@,$LN_S,;t t
17723 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17724 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17725 s,@SET_MAKE@,$SET_MAKE,;t t
17726 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17727 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17728 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17729 s,@RANLIB@,$RANLIB,;t t
17730 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17731 s,@LD@,$LD,;t t
17732 s,@ac_ct_LD@,$ac_ct_LD,;t t
17733 s,@AR@,$AR,;t t
17734 s,@ac_ct_AR@,$ac_ct_AR,;t t
17735 s,@ARFLAGS@,$ARFLAGS,;t t
17736 s,@DESTDIR@,$DESTDIR,;t t
17737 s,@BUILD_CC@,$BUILD_CC,;t t
17738 s,@BUILD_CPP@,$BUILD_CPP,;t t
17739 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17740 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17741 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17742 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17743 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17744 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17745 s,@cf_list_models@,$cf_list_models,;t t
17746 s,@LIBTOOL@,$LIBTOOL,;t t
17747 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17748 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17749 s,@LIB_CREATE@,$LIB_CREATE,;t t
17750 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17751 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17752 s,@LIB_PREP@,$LIB_PREP,;t t
17753 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17754 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17755 s,@LIB_LINK@,$LIB_LINK,;t t
17756 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17757 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17758 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17759 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17760 s,@TICS_NAME@,$TICS_NAME,;t t
17761 s,@TINFO_NAME@,$TINFO_NAME,;t t
17762 s,@LIB_NAME@,$LIB_NAME,;t t
17763 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17764 s,@CC_G_OPT@,$CC_G_OPT,;t t
17765 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17766 s,@LD_MODEL@,$LD_MODEL,;t t
17767 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17768 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17769 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17770 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17771 s,@LINK_PROGS@,$LINK_PROGS,;t t
17772 s,@LINK_TESTS@,$LINK_TESTS,;t t
17773 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17774 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17775 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17776 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17777 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17778 s,@PATHSEP@,$PATHSEP,;t t
17779 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17780 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17781 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17782 s,@TERMINFO@,$TERMINFO,;t t
17783 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17784 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17785 s,@TERMPATH@,$TERMPATH,;t t
17786 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17787 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17788 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17789 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17790 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17791 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17792 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17793 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17794 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17795 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17796 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17797 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17798 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17799 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17800 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17801 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17802 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17803 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17804 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17805 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17806 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17807 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17808 s,@PTHREAD@,$PTHREAD,;t t
17809 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17810 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17811 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17812 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17813 s,@ECHO_LINK@,$ECHO_LINK,;t t
17814 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17815 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17816 s,@ADA_TRACE@,$ADA_TRACE,;t t
17817 s,@MATH_LIB@,$MATH_LIB,;t t
17818 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17819 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17820 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17821 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17822 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17823 s,@TEST_LIBS@,$TEST_LIBS,;t t
17824 s,@CXXCPP@,$CXXCPP,;t t
17825 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17826 s,@CXX_AR@,$CXX_AR,;t t
17827 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17828 s,@CXXLIBS@,$CXXLIBS,;t t
17829 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17830 s,@gnat_exists@,$gnat_exists,;t t
17831 s,@M4_exists@,$M4_exists,;t t
17832 s,@cf_ada_make@,$cf_ada_make,;t t
17833 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17834 s,@cf_ada_package@,$cf_ada_package,;t t
17835 s,@ADAFLAGS@,$ADAFLAGS,;t t
17836 s,@cf_compile_generics@,$cf_compile_generics,;t t
17837 s,@cf_generic_objects@,$cf_generic_objects,;t t
17838 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17839 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17840 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17841 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17842 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17843 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17844 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17845 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17846 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17847 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17848 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17849 s,@TICS_ARGS@,$TICS_ARGS,;t t
17850 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17851 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17852 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17853 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17854 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17855 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17856 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17857 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17858 s,@TICS_LIST@,$TICS_LIST,;t t
17859 s,@TINFO_LIST@,$TINFO_LIST,;t t
17860 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17861 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17862 s,@TEST_ARGS@,$TEST_ARGS,;t t
17863 s,@TEST_DEPS@,$TEST_DEPS,;t t
17864 s,@TEST_ARG2@,$TEST_ARG2,;t t
17865 s,@TEST_DEP2@,$TEST_DEP2,;t t
17866 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17867 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17868 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17869 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17870 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17871 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17872 CEOF
17873
17874 EOF
17875
17876   cat >>$CONFIG_STATUS <<\EOF
17877   # Split the substitutions into bite-sized pieces for seds with
17878   # small command number limits, like on Digital OSF/1 and HP-UX.
17879   ac_max_sed_lines=48
17880   ac_sed_frag=1 # Number of current file.
17881   ac_beg=1 # First line for current file.
17882   ac_end=$ac_max_sed_lines # Line after last line for current file.
17883   ac_more_lines=:
17884   ac_sed_cmds=
17885   while $ac_more_lines; do
17886     if test $ac_beg -gt 1; then
17887       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17888     else
17889       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17890     fi
17891     if test ! -s $tmp/subs.frag; then
17892       ac_more_lines=false
17893     else
17894       # The purpose of the label and of the branching condition is to
17895       # speed up the sed processing (if there are no `@' at all, there
17896       # is no need to browse any of the substitutions).
17897       # These are the two extra sed commands mentioned above.
17898       (echo ':t
17899   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17900       if test -z "$ac_sed_cmds"; then
17901         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17902       else
17903         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
17904       fi
17905       ac_sed_frag=`expr $ac_sed_frag + 1`
17906       ac_beg=$ac_end
17907       ac_end=`expr $ac_end + $ac_max_sed_lines`
17908     fi
17909   done
17910   if test -z "$ac_sed_cmds"; then
17911     ac_sed_cmds=cat
17912   fi
17913 fi # test -n "$CONFIG_FILES"
17914
17915 EOF
17916 cat >>$CONFIG_STATUS <<\EOF
17917 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
17918   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
17919   case $ac_file in
17920   - | *:- | *:-:* ) # input from stdin
17921         cat >$tmp/stdin
17922         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17923         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17924   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
17925         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
17926   * )   ac_file_in=$ac_file.in ;;
17927   esac
17928
17929   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
17930   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17931          X"$ac_file" : 'X\(//\)[^/]' \| \
17932          X"$ac_file" : 'X\(//\)$' \| \
17933          X"$ac_file" : 'X\(/\)' \| \
17934          .     : '\(.\)' 2>/dev/null ||
17935 echo X"$ac_file" |
17936     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
17937           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
17938           /^X\(\/\/\)$/{ s//\1/; q; }
17939           /^X\(\/\).*/{ s//\1/; q; }
17940           s/.*/./; q'`
17941   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
17942     { case "$ac_dir" in
17943   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
17944   *)                      as_incr_dir=.;;
17945 esac
17946 as_dummy="$ac_dir"
17947 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
17948   case $as_mkdir_dir in
17949     # Skip DOS drivespec
17950     ?:) as_incr_dir=$as_mkdir_dir ;;
17951     *)
17952       as_incr_dir=$as_incr_dir/$as_mkdir_dir
17953       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
17954     ;;
17955   esac
17956 done; }
17957
17958     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
17959     # A "../" for each directory in $ac_dir_suffix.
17960     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
17961   else
17962     ac_dir_suffix= ac_dots=
17963   fi
17964
17965   case $srcdir in
17966   .)  ac_srcdir=.
17967       if test -z "$ac_dots"; then
17968          ac_top_srcdir=.
17969       else
17970          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
17971       fi ;;
17972   [\\/]* | ?:[\\/]* )
17973       ac_srcdir=$srcdir$ac_dir_suffix;
17974       ac_top_srcdir=$srcdir ;;
17975   *) # Relative path.
17976     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
17977     ac_top_srcdir=$ac_dots$srcdir ;;
17978   esac
17979
17980   case $INSTALL in
17981   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
17982   *) ac_INSTALL=$ac_dots$INSTALL ;;
17983   esac
17984
17985   if test x"$ac_file" != x-; then
17986     { echo "$as_me:17986: creating $ac_file" >&5
17987 echo "$as_me: creating $ac_file" >&6;}
17988     rm -f "$ac_file"
17989   fi
17990   # Let's still pretend it is `configure' which instantiates (i.e., don't
17991   # use $as_me), people would be surprised to read:
17992   #    /* config.h.  Generated automatically by config.status.  */
17993   configure_input="Generated automatically from `echo $ac_file_in |
17994                                                  sed 's,.*/,,'` by configure."
17995
17996   # First look for the input files in the build tree, otherwise in the
17997   # src tree.
17998   ac_file_inputs=`IFS=:
17999     for f in $ac_file_in; do
18000       case $f in
18001       -) echo $tmp/stdin ;;
18002       [\\/$]*)
18003          # Absolute (can't be DOS-style, as IFS=:)
18004          test -f "$f" || { { echo "$as_me:18004: error: cannot find input file: $f" >&5
18005 echo "$as_me: error: cannot find input file: $f" >&2;}
18006    { (exit 1); exit 1; }; }
18007          echo $f;;
18008       *) # Relative
18009          if test -f "$f"; then
18010            # Build tree
18011            echo $f
18012          elif test -f "$srcdir/$f"; then
18013            # Source tree
18014            echo $srcdir/$f
18015          else
18016            # /dev/null tree
18017            { { echo "$as_me:18017: error: cannot find input file: $f" >&5
18018 echo "$as_me: error: cannot find input file: $f" >&2;}
18019    { (exit 1); exit 1; }; }
18020          fi;;
18021       esac
18022     done` || { (exit 1); exit 1; }
18023 EOF
18024 cat >>$CONFIG_STATUS <<EOF
18025   sed "$ac_vpsub
18026 $extrasub
18027 EOF
18028 cat >>$CONFIG_STATUS <<\EOF
18029 :t
18030 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18031 s,@configure_input@,$configure_input,;t t
18032 s,@srcdir@,$ac_srcdir,;t t
18033 s,@top_srcdir@,$ac_top_srcdir,;t t
18034 s,@INSTALL@,$ac_INSTALL,;t t
18035 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18036   rm -f $tmp/stdin
18037   if test x"$ac_file" != x-; then
18038     mv $tmp/out $ac_file
18039   else
18040     cat $tmp/out
18041     rm -f $tmp/out
18042   fi
18043
18044 done
18045 EOF
18046 cat >>$CONFIG_STATUS <<\EOF
18047
18048 #
18049 # CONFIG_HEADER section.
18050 #
18051
18052 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18053 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18054 #
18055 # ac_d sets the value in "#define NAME VALUE" lines.
18056 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18057 ac_dB='[        ].*$,\1#\2'
18058 ac_dC=' '
18059 ac_dD=',;t'
18060 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18061 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18062 ac_iB='\([      ]\),\1#\2define\3'
18063 ac_iC=' '
18064 ac_iD='\4,;t'
18065 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18066 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18067 ac_uB='$,\1#\2define\3'
18068 ac_uC=' '
18069 ac_uD=',;t'
18070
18071 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18072   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18073   case $ac_file in
18074   - | *:- | *:-:* ) # input from stdin
18075         cat >$tmp/stdin
18076         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18077         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18078   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18079         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18080   * )   ac_file_in=$ac_file.in ;;
18081   esac
18082
18083   test x"$ac_file" != x- && { echo "$as_me:18083: creating $ac_file" >&5
18084 echo "$as_me: creating $ac_file" >&6;}
18085
18086   # First look for the input files in the build tree, otherwise in the
18087   # src tree.
18088   ac_file_inputs=`IFS=:
18089     for f in $ac_file_in; do
18090       case $f in
18091       -) echo $tmp/stdin ;;
18092       [\\/$]*)
18093          # Absolute (can't be DOS-style, as IFS=:)
18094          test -f "$f" || { { echo "$as_me:18094: error: cannot find input file: $f" >&5
18095 echo "$as_me: error: cannot find input file: $f" >&2;}
18096    { (exit 1); exit 1; }; }
18097          echo $f;;
18098       *) # Relative
18099          if test -f "$f"; then
18100            # Build tree
18101            echo $f
18102          elif test -f "$srcdir/$f"; then
18103            # Source tree
18104            echo $srcdir/$f
18105          else
18106            # /dev/null tree
18107            { { echo "$as_me:18107: error: cannot find input file: $f" >&5
18108 echo "$as_me: error: cannot find input file: $f" >&2;}
18109    { (exit 1); exit 1; }; }
18110          fi;;
18111       esac
18112     done` || { (exit 1); exit 1; }
18113   # Remove the trailing spaces.
18114   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18115
18116 EOF
18117
18118 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18119 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18120 # be either 'cat' or 'sort'.
18121 cat confdefs.h | uniq >conftest.vals
18122
18123 # Break up conftest.vals because some shells have a limit on
18124 # the size of here documents, and old seds have small limits too.
18125
18126 rm -f conftest.tail
18127 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18128 while grep . conftest.vals >/dev/null
18129 do
18130   # Write chunks of a limited-size here document to conftest.frag.
18131   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18132   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18133   echo 'CEOF' >> $CONFIG_STATUS
18134   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18135   rm -f conftest.vals
18136   mv conftest.tail conftest.vals
18137 done
18138 rm -f conftest.vals
18139
18140 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18141 # marker @DEFS@.
18142 echo '  cat >> conftest.edit <<CEOF
18143 /@DEFS@/r conftest.frag
18144 /@DEFS@/d
18145 CEOF
18146 sed -f conftest.edit $tmp/in > $tmp/out
18147 rm -f $tmp/in
18148 mv $tmp/out $tmp/in
18149 rm -f conftest.edit conftest.frag
18150 ' >> $CONFIG_STATUS
18151
18152 cat >>$CONFIG_STATUS <<\EOF
18153   # Let's still pretend it is `configure' which instantiates (i.e., don't
18154   # use $as_me), people would be surprised to read:
18155   #    /* config.h.  Generated automatically by config.status.  */
18156   if test x"$ac_file" = x-; then
18157     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18158   else
18159     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18160   fi
18161   cat $tmp/in >>$tmp/config.h
18162   rm -f $tmp/in
18163   if test x"$ac_file" != x-; then
18164     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18165       { echo "$as_me:18165: $ac_file is unchanged" >&5
18166 echo "$as_me: $ac_file is unchanged" >&6;}
18167     else
18168       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18169          X"$ac_file" : 'X\(//\)[^/]' \| \
18170          X"$ac_file" : 'X\(//\)$' \| \
18171          X"$ac_file" : 'X\(/\)' \| \
18172          .     : '\(.\)' 2>/dev/null ||
18173 echo X"$ac_file" |
18174     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18175           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18176           /^X\(\/\/\)$/{ s//\1/; q; }
18177           /^X\(\/\).*/{ s//\1/; q; }
18178           s/.*/./; q'`
18179       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18180         { case "$ac_dir" in
18181   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18182   *)                      as_incr_dir=.;;
18183 esac
18184 as_dummy="$ac_dir"
18185 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18186   case $as_mkdir_dir in
18187     # Skip DOS drivespec
18188     ?:) as_incr_dir=$as_mkdir_dir ;;
18189     *)
18190       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18191       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18192     ;;
18193   esac
18194 done; }
18195
18196       fi
18197       rm -f $ac_file
18198       mv $tmp/config.h $ac_file
18199     fi
18200   else
18201     cat $tmp/config.h
18202     rm -f $tmp/config.h
18203   fi
18204 done
18205 EOF
18206 cat >>$CONFIG_STATUS <<\EOF
18207
18208 #
18209 # CONFIG_COMMANDS section.
18210 #
18211 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18212   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18213   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18214
18215   case $ac_dest in
18216     default )
18217
18218 for cf_dir in test
18219 do
18220         if test ! -d $srcdir/$cf_dir; then
18221                 continue
18222         elif test -f $srcdir/$cf_dir/programs; then
18223                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18224         fi
18225 done
18226
18227         case $cf_cv_system_name in #(vi
18228         OS/2*|os2*) #(vi
18229         LIB_PREFIX=''
18230         ;;
18231         *)      LIB_PREFIX='lib'
18232         ;;
18233         esac
18234 cf_prefix=$LIB_PREFIX
18235
18236 if test $cf_cv_shlib_version = cygdll ; then
18237         TINFO_NAME=$TINFO_ARG_SUFFIX
18238         TINFO_SUFFIX=.dll
18239 fi
18240
18241 for cf_dir in $SRC_SUBDIRS
18242 do
18243         if test ! -d $srcdir/$cf_dir ; then
18244                 continue
18245         elif test -f $srcdir/$cf_dir/modules; then
18246
18247                 SHARED_LIB=
18248                 LIBS_TO_MAKE=
18249                 for cf_item in $cf_LIST_MODELS
18250                 do
18251
18252         case $cf_item in #(vi
18253         libtool) #(vi
18254                 cf_suffix='.la'
18255                 cf_depsuf=$cf_suffix
18256                 ;;
18257         normal) #(vi
18258                 cf_suffix='.a'
18259                 cf_depsuf=$cf_suffix
18260                 ;;
18261         debug) #(vi
18262                 cf_suffix='_g.a'
18263                 cf_depsuf=$cf_suffix
18264                 ;;
18265         profile) #(vi
18266                 cf_suffix='_p.a'
18267                 cf_depsuf=$cf_suffix
18268                 ;;
18269         shared) #(vi
18270                 case $cf_cv_system_name in
18271                 aix[56]*) #(vi
18272                         cf_suffix='.a'
18273                         cf_depsuf=$cf_suffix
18274                         ;;
18275                 cygwin*) #(vi
18276                         cf_suffix='.dll'
18277                         cf_depsuf='.dll.a'
18278                         ;;
18279                 darwin*) #(vi
18280                         cf_suffix='.dylib'
18281                         cf_depsuf=$cf_suffix
18282                         ;;
18283                 hpux*) #(vi
18284                         case $target in
18285                         ia64*) #(vi
18286                                 cf_suffix='.so'
18287                                 cf_depsuf=$cf_suffix
18288                                 ;;
18289                         *) #(vi
18290                                 cf_suffix='.sl'
18291                                 cf_depsuf=$cf_suffix
18292                                 ;;
18293                         esac
18294                         ;;
18295                 *)      cf_suffix='.so'
18296                         cf_depsuf=$cf_suffix
18297                         ;;
18298                 esac
18299         esac
18300         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18301         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18302
18303                         if test $cf_item = shared ; then
18304                         if test "$cf_cv_do_symlinks" = yes ; then
18305                                 case "$cf_cv_shlib_version" in #(vi
18306                                 rel) #(vi
18307                                         case "$cf_cv_system_name" in #(vi
18308                                         darwin*)
18309                                         case .${LIB_SUFFIX} in
18310                                         .w*)
18311                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18312                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18313                                                 ;;
18314                                         *)
18315                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18316                                                 ;;
18317                                         esac
18318                                         ;; #(vi
18319                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18320                                         esac
18321                                         ;;
18322                                 abi)
18323                                         case "$cf_cv_system_name" in #(vi
18324                                         darwin*)
18325                                         case .${LIB_SUFFIX} in
18326                                         .w*)
18327                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18328                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18329                                                 ;;
18330                                         *)
18331                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18332                                                 ;;
18333                                         esac
18334                                         ;; #(vi
18335                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18336                                         esac
18337                                         ;;
18338                                 esac
18339                         fi
18340                         # cygwin needs import library, and has unique naming convention
18341                         # use autodetected ${cf_prefix} for import lib and static lib, but
18342                         # use 'cyg' prefix for shared lib.
18343                         if test $cf_cv_shlib_version = cygdll ; then
18344                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18345                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18346                                 continue
18347                         fi
18348                         fi
18349                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18350                 done
18351
18352                 if test $cf_dir = ncurses ; then
18353                         cf_subsets="$LIB_SUBSETS"
18354                         cf_r_parts="$cf_subsets"
18355                         cf_liblist="$LIBS_TO_MAKE"
18356
18357                         while test -n "$cf_r_parts"
18358                         do
18359                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18360                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18361                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18362                                         cf_item=
18363                                         case $cf_l_parts in #(vi
18364                                         *termlib*) #(vi
18365                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18366                                                 ;;
18367                                         *ticlib*)
18368                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18369                                                 ;;
18370                                         *)
18371                                                 break
18372                                                 ;;
18373                                         esac
18374                                         if test -n "$cf_item"; then
18375                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18376                                         fi
18377                                 else
18378                                         break
18379                                 fi
18380                         done
18381                 else
18382                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18383                 fi
18384
18385                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18386                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18387                         $cf_dir/Makefile >$cf_dir/Makefile.out
18388                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18389
18390                 $AWK -f $srcdir/mk-0th.awk \
18391                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18392                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18393
18394                 for cf_subset in $cf_subsets
18395                 do
18396                         cf_subdirs=
18397                         for cf_item in $cf_LIST_MODELS
18398                         do
18399                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18400
18401 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18402
18403         case $cf_item in #(vi
18404         libtool) #(vi
18405                 cf_suffix='.la'
18406                 cf_depsuf=$cf_suffix
18407                 ;;
18408         normal) #(vi
18409                 cf_suffix='.a'
18410                 cf_depsuf=$cf_suffix
18411                 ;;
18412         debug) #(vi
18413                 cf_suffix='_g.a'
18414                 cf_depsuf=$cf_suffix
18415                 ;;
18416         profile) #(vi
18417                 cf_suffix='_p.a'
18418                 cf_depsuf=$cf_suffix
18419                 ;;
18420         shared) #(vi
18421                 case $cf_cv_system_name in
18422                 aix[56]*) #(vi
18423                         cf_suffix='.a'
18424                         cf_depsuf=$cf_suffix
18425                         ;;
18426                 cygwin*) #(vi
18427                         cf_suffix='.dll'
18428                         cf_depsuf='.dll.a'
18429                         ;;
18430                 darwin*) #(vi
18431                         cf_suffix='.dylib'
18432                         cf_depsuf=$cf_suffix
18433                         ;;
18434                 hpux*) #(vi
18435                         case $target in
18436                         ia64*) #(vi
18437                                 cf_suffix='.so'
18438                                 cf_depsuf=$cf_suffix
18439                                 ;;
18440                         *) #(vi
18441                                 cf_suffix='.sl'
18442                                 cf_depsuf=$cf_suffix
18443                                 ;;
18444                         esac
18445                         ;;
18446                 *)      cf_suffix='.so'
18447                         cf_depsuf=$cf_suffix
18448                         ;;
18449                 esac
18450         esac
18451         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18452         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18453
18454         case $cf_item in
18455         libtool) cf_subdir='obj_lo'  ;;
18456         normal)  cf_subdir='objects' ;;
18457         debug)   cf_subdir='obj_g' ;;
18458         profile) cf_subdir='obj_p' ;;
18459         shared)
18460                 case $cf_cv_system_name in #(vi
18461                 cygwin) #(vi
18462                         cf_subdir='objects' ;;
18463                 *)
18464                         cf_subdir='obj_s' ;;
18465                 esac
18466         esac
18467
18468                         # Test for case where we build libtinfo with a different name.
18469                         cf_libname=$cf_dir
18470                         if test $cf_dir = ncurses ; then
18471                                 case $cf_subset in
18472                                 *base*)
18473                                         cf_libname=${cf_libname}$LIB_SUFFIX
18474                                         ;;
18475                                 *termlib*)
18476                                         cf_libname=$TINFO_LIB_SUFFIX
18477                                         ;;
18478                                 ticlib*)
18479                                         cf_libname=$TICS_LIB_SUFFIX
18480                                         ;;
18481                                 esac
18482                         else
18483                                 cf_libname=${cf_libname}$LIB_SUFFIX
18484                         fi
18485                         if test -n "${DFT_ARG_SUFFIX}" ; then
18486                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18487                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18488                         fi
18489
18490                         # These dependencies really are for development, not
18491                         # builds, but they are useful in porting, too.
18492                         cf_depend="../include/ncurses_cfg.h"
18493                         if test "$srcdir" = "."; then
18494                                 cf_reldir="."
18495                         else
18496                                 cf_reldir="\${srcdir}"
18497                         fi
18498
18499                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18500                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18501                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18502                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18503                         fi
18504
18505                         cf_dir_suffix=
18506                         old_cf_suffix="$cf_suffix"
18507                         if test "$cf_cv_shlib_version_infix" = yes ; then
18508                         if test -n "$LIB_SUFFIX" ; then
18509                                 case $LIB_SUFFIX in
18510                                 w*)
18511                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18512                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18513                                         cf_dir_suffix=w
18514                                         ;;
18515                                 esac
18516                         fi
18517                         fi
18518
18519                         $AWK -f $srcdir/mk-1st.awk \
18520                                 name=${cf_libname}${cf_dir_suffix} \
18521                                 traces=$LIB_TRACING \
18522                                 MODEL=$cf_ITEM \
18523                                 model=$cf_subdir \
18524                                 prefix=$cf_prefix \
18525                                 suffix=$cf_suffix \
18526                                 subset=$cf_subset \
18527                                 TermlibRoot=$TINFO_NAME \
18528                                 TermlibSuffix=$TINFO_SUFFIX \
18529                                 ShlibVer=$cf_cv_shlib_version \
18530                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18531                                 ReLink=${cf_cv_do_relink-no} \
18532                                 DoLinks=$cf_cv_do_symlinks \
18533                                 rmSoLocs=$cf_cv_rm_so_locs \
18534                                 ldconfig="$LDCONFIG" \
18535                                 overwrite=$WITH_OVERWRITE \
18536                                 depend="$cf_depend" \
18537                                 host="$host" \
18538                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18539
18540                         cf_suffix="$old_cf_suffix"
18541
18542                         for cf_subdir2 in $cf_subdirs lib
18543                         do
18544                                 test $cf_subdir = $cf_subdir2 && break
18545                         done
18546                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18547                         $AWK -f $srcdir/mk-2nd.awk \
18548                                 name=$cf_dir \
18549                                 traces=$LIB_TRACING \
18550                                 MODEL=$cf_ITEM \
18551                                 model=$cf_subdir \
18552                                 subset=$cf_subset \
18553                                 srcdir=$srcdir \
18554                                 echo=$WITH_ECHO \
18555                                 crenames=$cf_cv_prog_CC_c_o \
18556                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18557                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18558                         cf_subdirs="$cf_subdirs $cf_subdir"
18559                         done
18560                 done
18561         fi
18562
18563         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18564 done
18565
18566 for cf_dir in $SRC_SUBDIRS
18567 do
18568         if test ! -d $srcdir/$cf_dir ; then
18569                 continue
18570         fi
18571
18572         if test -f $cf_dir/Makefile ; then
18573                 case "$cf_dir" in
18574                 Ada95) #(vi
18575                         echo 'libs \' >> Makefile
18576                         echo 'install.libs \' >> Makefile
18577                         echo 'uninstall.libs ::' >> Makefile
18578                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18579                         ;;
18580                 esac
18581         fi
18582
18583         if test -f $srcdir/$cf_dir/modules; then
18584                 echo >> Makefile
18585                 if test -f $srcdir/$cf_dir/headers; then
18586 cat >> Makefile <<CF_EOF
18587 install.includes \\
18588 uninstall.includes \\
18589 CF_EOF
18590                 fi
18591 if test "$cf_dir" != "c++" ; then
18592 echo 'lint \' >> Makefile
18593 fi
18594 cat >> Makefile <<CF_EOF
18595 libs \\
18596 lintlib \\
18597 install.libs \\
18598 uninstall.libs \\
18599 install.$cf_dir \\
18600 uninstall.$cf_dir ::
18601         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18602 CF_EOF
18603         elif test -f $srcdir/$cf_dir/headers; then
18604 cat >> Makefile <<CF_EOF
18605
18606 libs \\
18607 install.libs \\
18608 uninstall.libs \\
18609 install.includes \\
18610 uninstall.includes ::
18611         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18612 CF_EOF
18613 fi
18614 done
18615
18616 cat >> Makefile <<CF_EOF
18617
18618 install.libs uninstall.libs \\
18619 install.data uninstall.data ::
18620 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18621 CF_EOF
18622
18623 if test "x$cf_with_manpages" = xyes; then
18624 cat >> Makefile <<CF_EOF
18625
18626 install.man \\
18627 uninstall.man ::
18628         cd man && \${MAKE} \${CF_MFLAGS} \$@
18629 CF_EOF
18630 fi
18631
18632 cat >> Makefile <<CF_EOF
18633
18634 distclean ::
18635         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18636         rm -f headers.sh headers.sed mk_shared_lib.sh
18637         rm -f edit_man.* man_alias.*
18638         rm -rf \${DIRS_TO_MAKE}
18639 CF_EOF
18640
18641 # Special case: tack's manpage lives in its own directory.
18642 if test "x$cf_with_manpages" = xyes; then
18643 if test -d tack ; then
18644 if test -f $srcdir/$tack.h; then
18645 cat >> Makefile <<CF_EOF
18646
18647 install.man \\
18648 uninstall.man ::
18649         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18650 CF_EOF
18651 fi
18652 fi
18653 fi
18654
18655 rm -f headers.sed headers.sh
18656
18657 echo creating headers.sh
18658 cat >headers.sh <<CF_EOF
18659 #! /bin/sh
18660 # This shell script is generated by the 'configure' script.  It is invoked in a
18661 # subdirectory of the build tree.  It generates a sed-script in the parent
18662 # directory that is used to adjust includes for header files that reside in a
18663 # subdirectory of /usr/include, etc.
18664 PRG=""
18665 while test \$# != 3
18666 do
18667 PRG="\$PRG \$1"; shift
18668 done
18669 DST=\$1
18670 REF=\$2
18671 SRC=\$3
18672 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18673 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18674 echo installing \$SRC in \$DST
18675 CF_EOF
18676
18677 if test $WITH_CURSES_H = yes; then
18678         cat >>headers.sh <<CF_EOF
18679 case \$DST in
18680 /*/include/*)
18681         END=\`basename \$DST\`
18682         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18683         do
18684                 NAME=\`basename \$i\`
18685                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18686         done
18687         ;;
18688 *)
18689         echo "" >> \$TMPSED
18690         ;;
18691 esac
18692 CF_EOF
18693
18694 else
18695         cat >>headers.sh <<CF_EOF
18696 case \$DST in
18697 /*/include/*)
18698         END=\`basename \$DST\`
18699         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18700         do
18701                 NAME=\`basename \$i\`
18702                 if test "\$NAME" = "curses.h"
18703                 then
18704                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18705                         NAME=ncurses.h
18706                 fi
18707                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18708         done
18709         ;;
18710 *)
18711         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18712         ;;
18713 esac
18714 CF_EOF
18715 fi
18716 cat >>headers.sh <<CF_EOF
18717 rm -f \$TMPSRC
18718 sed -f \$TMPSED \$SRC > \$TMPSRC
18719 NAME=\`basename \$SRC\`
18720 CF_EOF
18721 if test $WITH_CURSES_H != yes; then
18722         cat >>headers.sh <<CF_EOF
18723 test "\$NAME" = "curses.h" && NAME=ncurses.h
18724 CF_EOF
18725 fi
18726 cat >>headers.sh <<CF_EOF
18727 # Just in case someone gzip'd manpages, remove the conflicting copy.
18728 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18729
18730 eval \$PRG \$TMPSRC \$DST/\$NAME
18731 rm -f \$TMPSRC \$TMPSED
18732 CF_EOF
18733
18734 chmod 0755 headers.sh
18735
18736 for cf_dir in $SRC_SUBDIRS
18737 do
18738         if test ! -d $srcdir/$cf_dir ; then
18739                 continue
18740         fi
18741
18742         if test -f $srcdir/$cf_dir/headers; then
18743                 $AWK -f $srcdir/mk-hdr.awk \
18744                         subset="$LIB_SUBSETS" \
18745                         compat="$WITH_CURSES_H" \
18746                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18747         fi
18748
18749         if test -f $srcdir/$cf_dir/modules; then
18750                 if test "$cf_dir" != "c++" ; then
18751                         cat >>$cf_dir/Makefile <<"CF_EOF"
18752 depend : ${AUTO_SRC}
18753         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18754
18755 # DO NOT DELETE THIS LINE -- make depend depends on it.
18756 CF_EOF
18757                 fi
18758         fi
18759 done
18760
18761  ;;
18762   esac
18763 done
18764 EOF
18765
18766 cat >>$CONFIG_STATUS <<\EOF
18767
18768 { (exit 0); exit 0; }
18769 EOF
18770 chmod +x $CONFIG_STATUS
18771 ac_clean_files=$ac_clean_files_save
18772
18773 # configure is writing to config.log, and then calls config.status.
18774 # config.status does its own redirection, appending to config.log.
18775 # Unfortunately, on DOS this fails, as config.log is still kept open
18776 # by configure, so config.status won't be able to write to it; its
18777 # output is simply discarded.  So we exec the FD to /dev/null,
18778 # effectively closing config.log, so it can be properly (re)opened and
18779 # appended to by config.status.  When coming back to configure, we
18780 # need to make the FD available again.
18781 if test "$no_create" != yes; then
18782   ac_cs_success=:
18783   exec 5>/dev/null
18784   $SHELL $CONFIG_STATUS || ac_cs_success=false
18785   exec 5>>config.log
18786   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18787   # would make configure fail if this is the last instruction.
18788   $ac_cs_success || { (exit 1); exit 1; }
18789 fi
18790 ${MAKE-make} preinstall