]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20090728
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.472 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       disable experimental SCREEN-extensions
770   --enable-const          compile with extra/non-standard const
771   --enable-ext-colors     compile for 256-color support
772   --enable-ext-mouse      compile for extended mouse-encoding
773   --enable-no-padding     compile with $NCURSES_NO_PADDING code
774   --enable-signed-char    compile using signed Boolean's in term.h
775   --enable-sigwinch       compile with SIGWINCH handler
776   --enable-tcap-names     compile with user-definable terminal capabilities
777 Development Code:
778   --without-develop       disable development options
779   --enable-hard-tabs      compile with hard-tabs code
780   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
781 Experimental Code:
782   --disable-assumed-color do not assume anything about default-colors
783   --disable-hashmap       compile without hashmap scrolling-optimization
784   --enable-colorfgbg      compile with $COLORFGBG code
785   --with-pthread          use POSIX thread library
786   --enable-weak-symbols   enable weak-symbols for pthreads
787   --enable-reentrant      compile with experimental reentrant code
788   --with-wrap-prefix=XXX  override prefix used for public variables
789   --enable-safe-sprintf   compile with experimental safe-sprintf code
790   --disable-scroll-hints  compile without scroll-hints code
791   --enable-wgetch-events  compile with experimental wgetch-events code
792 Testing/development Options:
793   --enable-echo           build: display "compiling" commands (default)
794   --enable-warnings       build: turn on GCC compiler warnings
795   --enable-assertions     test: turn on generation of assertion code
796   --with-dmalloc          test: use Gray Watson's dmalloc library
797   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
798   --with-valgrind         test: use valgrind
799   --disable-leaks         test: free permanent memory, analyze leaks
800   --enable-expanded       test: generate functions for certain macros
801   --disable-macros        test: use functions rather than macros
802   --with-trace            test: add trace() function to all models of ncurses
803 Ada95 Binding Options:
804   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
805   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
806   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
807
808 Some influential environment variables:
809   CC          C compiler command
810   CFLAGS      C compiler flags
811   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
812               nonstandard directory <lib dir>
813   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
814               headers in a nonstandard directory <include dir>
815   CPP         C preprocessor
816   CXX         C++ compiler command
817   CXXFLAGS    C++ compiler flags
818   CXXCPP      C++ preprocessor
819
820 Use these variables to override the choices made by `configure' or to help
821 it to find libraries and programs with nonstandard names/locations.
822
823 EOF
824 fi
825
826 if test "$ac_init_help" = "recursive"; then
827   # If there are subdirs, report their specific --help.
828   ac_popdir=`pwd`
829   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
830     cd $ac_subdir
831     # A "../" for each directory in /$ac_subdir.
832     ac_dots=`echo $ac_subdir |
833              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
834
835     case $srcdir in
836     .) # No --srcdir option.  We are building in place.
837       ac_sub_srcdir=$srcdir ;;
838     [\\/]* | ?:[\\/]* ) # Absolute path.
839       ac_sub_srcdir=$srcdir/$ac_subdir ;;
840     *) # Relative path.
841       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
842     esac
843
844     # Check for guested configure; otherwise get Cygnus style configure.
845     if test -f $ac_sub_srcdir/configure.gnu; then
846       echo
847       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
848     elif test -f $ac_sub_srcdir/configure; then
849       echo
850       $SHELL $ac_sub_srcdir/configure  --help=recursive
851     elif test -f $ac_sub_srcdir/configure.ac ||
852            test -f $ac_sub_srcdir/configure.in; then
853       echo
854       $ac_configure --help
855     else
856       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
857     fi
858     cd $ac_popdir
859   done
860 fi
861
862 test -n "$ac_init_help" && exit 0
863 if $ac_init_version; then
864   cat <<\EOF
865
866 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
867 Free Software Foundation, Inc.
868 This configure script is free software; the Free Software Foundation
869 gives unlimited permission to copy, distribute and modify it.
870 EOF
871   exit 0
872 fi
873 exec 5>config.log
874 cat >&5 <<EOF
875 This file contains any messages produced by compilers while
876 running configure, to aid debugging if configure makes a mistake.
877
878 It was created by $as_me, which was
879 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
880
881   $ $0 $@
882
883 EOF
884 {
885 cat <<_ASUNAME
886 ## ---------- ##
887 ## Platform.  ##
888 ## ---------- ##
889
890 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
891 uname -m = `(uname -m) 2>/dev/null || echo unknown`
892 uname -r = `(uname -r) 2>/dev/null || echo unknown`
893 uname -s = `(uname -s) 2>/dev/null || echo unknown`
894 uname -v = `(uname -v) 2>/dev/null || echo unknown`
895
896 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
897 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
898
899 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
900 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
901 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
902 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
903 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
904 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
905 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
906
907 PATH = $PATH
908
909 _ASUNAME
910 } >&5
911
912 cat >&5 <<EOF
913 ## ------------ ##
914 ## Core tests.  ##
915 ## ------------ ##
916
917 EOF
918
919 # Keep a trace of the command line.
920 # Strip out --no-create and --no-recursion so they do not pile up.
921 # Also quote any args containing shell meta-characters.
922 ac_configure_args=
923 ac_sep=
924 for ac_arg
925 do
926   case $ac_arg in
927   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
928   | --no-cr | --no-c) ;;
929   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
930   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
931   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
932     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
933     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
934     ac_sep=" " ;;
935   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
936      ac_sep=" " ;;
937   esac
938   # Get rid of the leading space.
939 done
940
941 # When interrupted or exit'd, cleanup temporary files, and complete
942 # config.log.  We remove comments because anyway the quotes in there
943 # would cause problems or look ugly.
944 trap 'exit_status=$?
945   # Save into config.log some information that might help in debugging.
946   echo >&5
947   echo "## ----------------- ##" >&5
948   echo "## Cache variables.  ##" >&5
949   echo "## ----------------- ##" >&5
950   echo >&5
951   # The following way of writing the cache mishandles newlines in values,
952 {
953   (set) 2>&1 |
954     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
955     *ac_space=\ *)
956       sed -n \
957         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
958           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
959       ;;
960     *)
961       sed -n \
962         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
963       ;;
964     esac;
965 } >&5
966   sed "/^$/d" confdefs.h >conftest.log
967   if test -s conftest.log; then
968     echo >&5
969     echo "## ------------ ##" >&5
970     echo "## confdefs.h.  ##" >&5
971     echo "## ------------ ##" >&5
972     echo >&5
973     cat conftest.log >&5
974   fi
975   (echo; echo) >&5
976   test "$ac_signal" != 0 &&
977     echo "$as_me: caught signal $ac_signal" >&5
978   echo "$as_me: exit $exit_status" >&5
979   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
980     exit $exit_status
981      ' 0
982 for ac_signal in 1 2 13 15; do
983   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
984 done
985 ac_signal=0
986
987 # confdefs.h avoids OS command line length limits that DEFS can exceed.
988 rm -rf conftest* confdefs.h
989 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
990 echo >confdefs.h
991
992 # Let the site file select an alternate cache file if it wants to.
993 # Prefer explicitly selected file to automatically selected ones.
994 if test -z "$CONFIG_SITE"; then
995   if test "x$prefix" != xNONE; then
996     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
997   else
998     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
999   fi
1000 fi
1001 for ac_site_file in $CONFIG_SITE; do
1002   if test -r "$ac_site_file"; then
1003     { echo "$as_me:1003: loading site script $ac_site_file" >&5
1004 echo "$as_me: loading site script $ac_site_file" >&6;}
1005     cat "$ac_site_file" >&5
1006     . "$ac_site_file"
1007   fi
1008 done
1009
1010 if test -r "$cache_file"; then
1011   # Some versions of bash will fail to source /dev/null (special
1012   # files actually), so we avoid doing that.
1013   if test -f "$cache_file"; then
1014     { echo "$as_me:1014: loading cache $cache_file" >&5
1015 echo "$as_me: loading cache $cache_file" >&6;}
1016     case $cache_file in
1017       [\\/]* | ?:[\\/]* ) . $cache_file;;
1018       *)                      . ./$cache_file;;
1019     esac
1020   fi
1021 else
1022   { echo "$as_me:1022: creating cache $cache_file" >&5
1023 echo "$as_me: creating cache $cache_file" >&6;}
1024   >$cache_file
1025 fi
1026
1027 # Check that the precious variables saved in the cache have kept the same
1028 # value.
1029 ac_cache_corrupted=false
1030 for ac_var in `(set) 2>&1 |
1031                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1032   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1033   eval ac_new_set=\$ac_env_${ac_var}_set
1034   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1035   eval ac_new_val="\$ac_env_${ac_var}_value"
1036   case $ac_old_set,$ac_new_set in
1037     set,)
1038       { echo "$as_me:1038: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1039 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1040       ac_cache_corrupted=: ;;
1041     ,set)
1042       { echo "$as_me:1042: error: \`$ac_var' was not set in the previous run" >&5
1043 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1044       ac_cache_corrupted=: ;;
1045     ,);;
1046     *)
1047       if test "x$ac_old_val" != "x$ac_new_val"; then
1048         { echo "$as_me:1048: error: \`$ac_var' has changed since the previous run:" >&5
1049 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1050         { echo "$as_me:1050:   former value:  $ac_old_val" >&5
1051 echo "$as_me:   former value:  $ac_old_val" >&2;}
1052         { echo "$as_me:1052:   current value: $ac_new_val" >&5
1053 echo "$as_me:   current value: $ac_new_val" >&2;}
1054         ac_cache_corrupted=:
1055       fi;;
1056   esac
1057   # Pass precious variables to config.status.  It doesn't matter if
1058   # we pass some twice (in addition to the command line arguments).
1059   if test "$ac_new_set" = set; then
1060     case $ac_new_val in
1061     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1062       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1063       ac_configure_args="$ac_configure_args '$ac_arg'"
1064       ;;
1065     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1066        ;;
1067     esac
1068   fi
1069 done
1070 if $ac_cache_corrupted; then
1071   { echo "$as_me:1071: error: changes in the environment can compromise the build" >&5
1072 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1073   { { echo "$as_me:1073: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1074 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1075    { (exit 1); exit 1; }; }
1076 fi
1077
1078 ac_ext=c
1079 ac_cpp='$CPP $CPPFLAGS'
1080 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1081 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1082 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1083 ac_main_return=return
1084
1085 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1086   *c*,-n*) ECHO_N= ECHO_C='
1087 ' ECHO_T='      ' ;;
1088   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1089   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1090 esac
1091 echo "#! $SHELL" >conftest.sh
1092 echo  "exit 0"   >>conftest.sh
1093 chmod +x conftest.sh
1094 if { (echo "$as_me:1094: PATH=\".;.\"; conftest.sh") >&5
1095   (PATH=".;."; conftest.sh) 2>&5
1096   ac_status=$?
1097   echo "$as_me:1097: \$? = $ac_status" >&5
1098   (exit $ac_status); }; then
1099   ac_path_separator=';'
1100 else
1101   ac_path_separator=:
1102 fi
1103 PATH_SEPARATOR="$ac_path_separator"
1104 rm -f conftest.sh
1105
1106 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1107
1108 top_builddir=`pwd`
1109
1110 echo "$as_me:1110: checking for egrep" >&5
1111 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1112 if test "${ac_cv_prog_egrep+set}" = set; then
1113   echo $ECHO_N "(cached) $ECHO_C" >&6
1114 else
1115   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1116     then ac_cv_prog_egrep='grep -E'
1117     else ac_cv_prog_egrep='egrep'
1118     fi
1119 fi
1120 echo "$as_me:1120: result: $ac_cv_prog_egrep" >&5
1121 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1122  EGREP=$ac_cv_prog_egrep
1123
1124 test -z "$EGREP" && { { echo "$as_me:1124: error: No egrep program found" >&5
1125 echo "$as_me: error: No egrep program found" >&2;}
1126    { (exit 1); exit 1; }; }
1127
1128 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1129 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1130 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 cf_cv_abi_version=${NCURSES_MAJOR}
1132 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1133 cf_cv_timestamp=`date`
1134 echo "$as_me:1134: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1135 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1136
1137 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1138
1139 # Check whether --with-rel-version or --without-rel-version was given.
1140 if test "${with_rel_version+set}" = set; then
1141   withval="$with_rel_version"
1142   { echo "$as_me:1142: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1143 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1144  cf_cv_rel_version=$withval
1145 fi;
1146
1147  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1148  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1149
1150 if test -n "$NCURSES_MAJOR" ; then
1151   case $NCURSES_MAJOR in #(vi
1152   [0-9]*) #(vi
1153         ;;
1154   *)
1155         { { echo "$as_me:1155: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1156 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1157    { (exit 1); exit 1; }; }
1158         ;;
1159   esac
1160 else
1161   { { echo "$as_me:1161: error: Release major-version value is empty" >&5
1162 echo "$as_me: error: Release major-version value is empty" >&2;}
1163    { (exit 1); exit 1; }; }
1164 fi
1165
1166 if test -n "$NCURSES_MINOR" ; then
1167   case $NCURSES_MINOR in #(vi
1168   [0-9]*) #(vi
1169         ;;
1170   *)
1171         { { echo "$as_me:1171: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1172 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1173    { (exit 1); exit 1; }; }
1174         ;;
1175   esac
1176 else
1177   { { echo "$as_me:1177: error: Release minor-version value is empty" >&5
1178 echo "$as_me: error: Release minor-version value is empty" >&2;}
1179    { (exit 1); exit 1; }; }
1180 fi
1181
1182 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1183
1184 # Check whether --with-abi-version or --without-abi-version was given.
1185 if test "${with_abi_version+set}" = set; then
1186   withval="$with_abi_version"
1187   { echo "$as_me:1187: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1188 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1189  cf_cv_abi_version=$withval
1190 fi;
1191
1192 if test -n "$cf_cv_abi_version" ; then
1193   case $cf_cv_abi_version in #(vi
1194   [0-9]*) #(vi
1195         ;;
1196   *)
1197         { { echo "$as_me:1197: error: ABI version is not a number: $cf_cv_abi_version" >&5
1198 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1199    { (exit 1); exit 1; }; }
1200         ;;
1201   esac
1202 else
1203   { { echo "$as_me:1203: error: ABI version value is empty" >&5
1204 echo "$as_me: error: ABI version value is empty" >&2;}
1205    { (exit 1); exit 1; }; }
1206 fi
1207
1208 ac_aux_dir=
1209 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1210   if test -f $ac_dir/install-sh; then
1211     ac_aux_dir=$ac_dir
1212     ac_install_sh="$ac_aux_dir/install-sh -c"
1213     break
1214   elif test -f $ac_dir/install.sh; then
1215     ac_aux_dir=$ac_dir
1216     ac_install_sh="$ac_aux_dir/install.sh -c"
1217     break
1218   elif test -f $ac_dir/shtool; then
1219     ac_aux_dir=$ac_dir
1220     ac_install_sh="$ac_aux_dir/shtool install -c"
1221     break
1222   fi
1223 done
1224 if test -z "$ac_aux_dir"; then
1225   { { echo "$as_me:1225: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1226 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1227    { (exit 1); exit 1; }; }
1228 fi
1229 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1230 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1231 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1232
1233 # Make sure we can run config.sub.
1234 $ac_config_sub sun4 >/dev/null 2>&1 ||
1235   { { echo "$as_me:1235: error: cannot run $ac_config_sub" >&5
1236 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1237    { (exit 1); exit 1; }; }
1238
1239 echo "$as_me:1239: checking build system type" >&5
1240 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1241 if test "${ac_cv_build+set}" = set; then
1242   echo $ECHO_N "(cached) $ECHO_C" >&6
1243 else
1244   ac_cv_build_alias=$build_alias
1245 test -z "$ac_cv_build_alias" &&
1246   ac_cv_build_alias=`$ac_config_guess`
1247 test -z "$ac_cv_build_alias" &&
1248   { { echo "$as_me:1248: error: cannot guess build type; you must specify one" >&5
1249 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1250    { (exit 1); exit 1; }; }
1251 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1252   { { echo "$as_me:1252: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1253 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1254    { (exit 1); exit 1; }; }
1255
1256 fi
1257 echo "$as_me:1257: result: $ac_cv_build" >&5
1258 echo "${ECHO_T}$ac_cv_build" >&6
1259 build=$ac_cv_build
1260 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1261 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1262 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1263
1264 echo "$as_me:1264: checking host system type" >&5
1265 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1266 if test "${ac_cv_host+set}" = set; then
1267   echo $ECHO_N "(cached) $ECHO_C" >&6
1268 else
1269   ac_cv_host_alias=$host_alias
1270 test -z "$ac_cv_host_alias" &&
1271   ac_cv_host_alias=$ac_cv_build_alias
1272 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1273   { { echo "$as_me:1273: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1274 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1275    { (exit 1); exit 1; }; }
1276
1277 fi
1278 echo "$as_me:1278: result: $ac_cv_host" >&5
1279 echo "${ECHO_T}$ac_cv_host" >&6
1280 host=$ac_cv_host
1281 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1282 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1283 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1284
1285 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1286         echo "$as_me:1286: checking target system type" >&5
1287 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1288 if test "${ac_cv_target+set}" = set; then
1289   echo $ECHO_N "(cached) $ECHO_C" >&6
1290 else
1291   ac_cv_target_alias=$target_alias
1292 test "x$ac_cv_target_alias" = "x" &&
1293   ac_cv_target_alias=$ac_cv_host_alias
1294 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1295   { { echo "$as_me:1295: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1296 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1297    { (exit 1); exit 1; }; }
1298
1299 fi
1300 echo "$as_me:1300: result: $ac_cv_target" >&5
1301 echo "${ECHO_T}$ac_cv_target" >&6
1302 target=$ac_cv_target
1303 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1304 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1305 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1306
1307 # The aliases save the names the user supplied, while $host etc.
1308 # will get canonicalized.
1309 test -n "$target_alias" &&
1310   test "$program_prefix$program_suffix$program_transform_name" = \
1311     NONENONEs,x,x, &&
1312   program_prefix=${target_alias}-
1313         system_name="$host_os"
1314 else
1315         system_name="`(uname -s -r) 2>/dev/null`"
1316         if test -z "$system_name" ; then
1317                 system_name="`(hostname) 2>/dev/null`"
1318         fi
1319 fi
1320 test -n "$system_name" && cat >>confdefs.h <<EOF
1321 #define SYSTEM_NAME "$system_name"
1322 EOF
1323
1324 if test "${cf_cv_system_name+set}" = set; then
1325   echo $ECHO_N "(cached) $ECHO_C" >&6
1326 else
1327   cf_cv_system_name="$system_name"
1328 fi
1329
1330 test -z "$system_name" && system_name="$cf_cv_system_name"
1331 test -n "$cf_cv_system_name" && echo "$as_me:1331: result: Configuring for $cf_cv_system_name" >&5
1332 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1333
1334 if test ".$system_name" != ".$cf_cv_system_name" ; then
1335         echo "$as_me:1335: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1336 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1337         { { echo "$as_me:1337: error: \"Please remove config.cache and try again.\"" >&5
1338 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1339    { (exit 1); exit 1; }; }
1340 fi
1341
1342 # Check whether --with-system-type or --without-system-type was given.
1343 if test "${with_system_type+set}" = set; then
1344   withval="$with_system_type"
1345   { echo "$as_me:1345: WARNING: overriding system type to $withval" >&5
1346 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1347  cf_cv_system_name=$withval
1348 fi;
1349
1350 ###     Save the given $CFLAGS to allow user-override.
1351 cf_user_CFLAGS="$CFLAGS"
1352
1353 ###     Default install-location
1354
1355 echo "$as_me:1355: checking for prefix" >&5
1356 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1357 if test "x$prefix" = "xNONE" ; then
1358         case "$cf_cv_system_name" in
1359                 # non-vendor systems don't have a conflict
1360         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1361                 prefix=/usr
1362                 ;;
1363         *)      prefix=$ac_default_prefix
1364                 ;;
1365         esac
1366 fi
1367 echo "$as_me:1367: result: $prefix" >&5
1368 echo "${ECHO_T}$prefix" >&6
1369
1370 if test "x$prefix" = "xNONE" ; then
1371 echo "$as_me:1371: checking for default include-directory" >&5
1372 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1373 test -n "$verbose" && echo 1>&6
1374 for cf_symbol in \
1375         $includedir \
1376         $includedir/ncurses \
1377         $prefix/include \
1378         $prefix/include/ncurses \
1379         /usr/local/include \
1380         /usr/local/include/ncurses \
1381         /usr/include \
1382         /usr/include/ncurses
1383 do
1384         cf_dir=`eval echo $cf_symbol`
1385         if test -f $cf_dir/curses.h ; then
1386         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1387                 includedir="$cf_symbol"
1388                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1389                 break
1390         fi
1391         fi
1392         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1393 done
1394 echo "$as_me:1394: result: $includedir" >&5
1395 echo "${ECHO_T}$includedir" >&6
1396 fi
1397
1398 ###     Checks for programs.
1399 ac_ext=c
1400 ac_cpp='$CPP $CPPFLAGS'
1401 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1402 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1403 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1404 ac_main_return=return
1405 if test -n "$ac_tool_prefix"; then
1406   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1407 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1408 echo "$as_me:1408: checking for $ac_word" >&5
1409 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410 if test "${ac_cv_prog_CC+set}" = set; then
1411   echo $ECHO_N "(cached) $ECHO_C" >&6
1412 else
1413   if test -n "$CC"; then
1414   ac_cv_prog_CC="$CC" # Let the user override the test.
1415 else
1416   ac_save_IFS=$IFS; IFS=$ac_path_separator
1417 ac_dummy="$PATH"
1418 for ac_dir in $ac_dummy; do
1419   IFS=$ac_save_IFS
1420   test -z "$ac_dir" && ac_dir=.
1421   $as_executable_p "$ac_dir/$ac_word" || continue
1422 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1423 echo "$as_me:1423: found $ac_dir/$ac_word" >&5
1424 break
1425 done
1426
1427 fi
1428 fi
1429 CC=$ac_cv_prog_CC
1430 if test -n "$CC"; then
1431   echo "$as_me:1431: result: $CC" >&5
1432 echo "${ECHO_T}$CC" >&6
1433 else
1434   echo "$as_me:1434: result: no" >&5
1435 echo "${ECHO_T}no" >&6
1436 fi
1437
1438 fi
1439 if test -z "$ac_cv_prog_CC"; then
1440   ac_ct_CC=$CC
1441   # Extract the first word of "gcc", so it can be a program name with args.
1442 set dummy gcc; ac_word=$2
1443 echo "$as_me:1443: checking for $ac_word" >&5
1444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1445 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1446   echo $ECHO_N "(cached) $ECHO_C" >&6
1447 else
1448   if test -n "$ac_ct_CC"; then
1449   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1450 else
1451   ac_save_IFS=$IFS; IFS=$ac_path_separator
1452 ac_dummy="$PATH"
1453 for ac_dir in $ac_dummy; do
1454   IFS=$ac_save_IFS
1455   test -z "$ac_dir" && ac_dir=.
1456   $as_executable_p "$ac_dir/$ac_word" || continue
1457 ac_cv_prog_ac_ct_CC="gcc"
1458 echo "$as_me:1458: found $ac_dir/$ac_word" >&5
1459 break
1460 done
1461
1462 fi
1463 fi
1464 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1465 if test -n "$ac_ct_CC"; then
1466   echo "$as_me:1466: result: $ac_ct_CC" >&5
1467 echo "${ECHO_T}$ac_ct_CC" >&6
1468 else
1469   echo "$as_me:1469: result: no" >&5
1470 echo "${ECHO_T}no" >&6
1471 fi
1472
1473   CC=$ac_ct_CC
1474 else
1475   CC="$ac_cv_prog_CC"
1476 fi
1477
1478 if test -z "$CC"; then
1479   if test -n "$ac_tool_prefix"; then
1480   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1481 set dummy ${ac_tool_prefix}cc; ac_word=$2
1482 echo "$as_me:1482: checking for $ac_word" >&5
1483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1484 if test "${ac_cv_prog_CC+set}" = set; then
1485   echo $ECHO_N "(cached) $ECHO_C" >&6
1486 else
1487   if test -n "$CC"; then
1488   ac_cv_prog_CC="$CC" # Let the user override the test.
1489 else
1490   ac_save_IFS=$IFS; IFS=$ac_path_separator
1491 ac_dummy="$PATH"
1492 for ac_dir in $ac_dummy; do
1493   IFS=$ac_save_IFS
1494   test -z "$ac_dir" && ac_dir=.
1495   $as_executable_p "$ac_dir/$ac_word" || continue
1496 ac_cv_prog_CC="${ac_tool_prefix}cc"
1497 echo "$as_me:1497: found $ac_dir/$ac_word" >&5
1498 break
1499 done
1500
1501 fi
1502 fi
1503 CC=$ac_cv_prog_CC
1504 if test -n "$CC"; then
1505   echo "$as_me:1505: result: $CC" >&5
1506 echo "${ECHO_T}$CC" >&6
1507 else
1508   echo "$as_me:1508: result: no" >&5
1509 echo "${ECHO_T}no" >&6
1510 fi
1511
1512 fi
1513 if test -z "$ac_cv_prog_CC"; then
1514   ac_ct_CC=$CC
1515   # Extract the first word of "cc", so it can be a program name with args.
1516 set dummy cc; ac_word=$2
1517 echo "$as_me:1517: checking for $ac_word" >&5
1518 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1519 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1520   echo $ECHO_N "(cached) $ECHO_C" >&6
1521 else
1522   if test -n "$ac_ct_CC"; then
1523   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1524 else
1525   ac_save_IFS=$IFS; IFS=$ac_path_separator
1526 ac_dummy="$PATH"
1527 for ac_dir in $ac_dummy; do
1528   IFS=$ac_save_IFS
1529   test -z "$ac_dir" && ac_dir=.
1530   $as_executable_p "$ac_dir/$ac_word" || continue
1531 ac_cv_prog_ac_ct_CC="cc"
1532 echo "$as_me:1532: found $ac_dir/$ac_word" >&5
1533 break
1534 done
1535
1536 fi
1537 fi
1538 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1539 if test -n "$ac_ct_CC"; then
1540   echo "$as_me:1540: result: $ac_ct_CC" >&5
1541 echo "${ECHO_T}$ac_ct_CC" >&6
1542 else
1543   echo "$as_me:1543: result: no" >&5
1544 echo "${ECHO_T}no" >&6
1545 fi
1546
1547   CC=$ac_ct_CC
1548 else
1549   CC="$ac_cv_prog_CC"
1550 fi
1551
1552 fi
1553 if test -z "$CC"; then
1554   # Extract the first word of "cc", so it can be a program name with args.
1555 set dummy cc; ac_word=$2
1556 echo "$as_me:1556: checking for $ac_word" >&5
1557 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1558 if test "${ac_cv_prog_CC+set}" = set; then
1559   echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561   if test -n "$CC"; then
1562   ac_cv_prog_CC="$CC" # Let the user override the test.
1563 else
1564   ac_prog_rejected=no
1565   ac_save_IFS=$IFS; IFS=$ac_path_separator
1566 ac_dummy="$PATH"
1567 for ac_dir in $ac_dummy; do
1568   IFS=$ac_save_IFS
1569   test -z "$ac_dir" && ac_dir=.
1570   $as_executable_p "$ac_dir/$ac_word" || continue
1571 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1572   ac_prog_rejected=yes
1573   continue
1574 fi
1575 ac_cv_prog_CC="cc"
1576 echo "$as_me:1576: found $ac_dir/$ac_word" >&5
1577 break
1578 done
1579
1580 if test $ac_prog_rejected = yes; then
1581   # We found a bogon in the path, so make sure we never use it.
1582   set dummy $ac_cv_prog_CC
1583   shift
1584   if test $# != 0; then
1585     # We chose a different compiler from the bogus one.
1586     # However, it has the same basename, so the bogon will be chosen
1587     # first if we set CC to just the basename; use the full file name.
1588     shift
1589     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1590     shift
1591     ac_cv_prog_CC="$@"
1592   fi
1593 fi
1594 fi
1595 fi
1596 CC=$ac_cv_prog_CC
1597 if test -n "$CC"; then
1598   echo "$as_me:1598: result: $CC" >&5
1599 echo "${ECHO_T}$CC" >&6
1600 else
1601   echo "$as_me:1601: result: no" >&5
1602 echo "${ECHO_T}no" >&6
1603 fi
1604
1605 fi
1606 if test -z "$CC"; then
1607   if test -n "$ac_tool_prefix"; then
1608   for ac_prog in cl
1609   do
1610     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1611 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1612 echo "$as_me:1612: checking for $ac_word" >&5
1613 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1614 if test "${ac_cv_prog_CC+set}" = set; then
1615   echo $ECHO_N "(cached) $ECHO_C" >&6
1616 else
1617   if test -n "$CC"; then
1618   ac_cv_prog_CC="$CC" # Let the user override the test.
1619 else
1620   ac_save_IFS=$IFS; IFS=$ac_path_separator
1621 ac_dummy="$PATH"
1622 for ac_dir in $ac_dummy; do
1623   IFS=$ac_save_IFS
1624   test -z "$ac_dir" && ac_dir=.
1625   $as_executable_p "$ac_dir/$ac_word" || continue
1626 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1627 echo "$as_me:1627: found $ac_dir/$ac_word" >&5
1628 break
1629 done
1630
1631 fi
1632 fi
1633 CC=$ac_cv_prog_CC
1634 if test -n "$CC"; then
1635   echo "$as_me:1635: result: $CC" >&5
1636 echo "${ECHO_T}$CC" >&6
1637 else
1638   echo "$as_me:1638: result: no" >&5
1639 echo "${ECHO_T}no" >&6
1640 fi
1641
1642     test -n "$CC" && break
1643   done
1644 fi
1645 if test -z "$CC"; then
1646   ac_ct_CC=$CC
1647   for ac_prog in cl
1648 do
1649   # Extract the first word of "$ac_prog", so it can be a program name with args.
1650 set dummy $ac_prog; ac_word=$2
1651 echo "$as_me:1651: checking for $ac_word" >&5
1652 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1653 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1654   echo $ECHO_N "(cached) $ECHO_C" >&6
1655 else
1656   if test -n "$ac_ct_CC"; then
1657   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1658 else
1659   ac_save_IFS=$IFS; IFS=$ac_path_separator
1660 ac_dummy="$PATH"
1661 for ac_dir in $ac_dummy; do
1662   IFS=$ac_save_IFS
1663   test -z "$ac_dir" && ac_dir=.
1664   $as_executable_p "$ac_dir/$ac_word" || continue
1665 ac_cv_prog_ac_ct_CC="$ac_prog"
1666 echo "$as_me:1666: found $ac_dir/$ac_word" >&5
1667 break
1668 done
1669
1670 fi
1671 fi
1672 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1673 if test -n "$ac_ct_CC"; then
1674   echo "$as_me:1674: result: $ac_ct_CC" >&5
1675 echo "${ECHO_T}$ac_ct_CC" >&6
1676 else
1677   echo "$as_me:1677: result: no" >&5
1678 echo "${ECHO_T}no" >&6
1679 fi
1680
1681   test -n "$ac_ct_CC" && break
1682 done
1683
1684   CC=$ac_ct_CC
1685 fi
1686
1687 fi
1688
1689 test -z "$CC" && { { echo "$as_me:1689: error: no acceptable cc found in \$PATH" >&5
1690 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1691    { (exit 1); exit 1; }; }
1692
1693 # Provide some information about the compiler.
1694 echo "$as_me:1694:" \
1695      "checking for C compiler version" >&5
1696 ac_compiler=`set X $ac_compile; echo $2`
1697 { (eval echo "$as_me:1697: \"$ac_compiler --version </dev/null >&5\"") >&5
1698   (eval $ac_compiler --version </dev/null >&5) 2>&5
1699   ac_status=$?
1700   echo "$as_me:1700: \$? = $ac_status" >&5
1701   (exit $ac_status); }
1702 { (eval echo "$as_me:1702: \"$ac_compiler -v </dev/null >&5\"") >&5
1703   (eval $ac_compiler -v </dev/null >&5) 2>&5
1704   ac_status=$?
1705   echo "$as_me:1705: \$? = $ac_status" >&5
1706   (exit $ac_status); }
1707 { (eval echo "$as_me:1707: \"$ac_compiler -V </dev/null >&5\"") >&5
1708   (eval $ac_compiler -V </dev/null >&5) 2>&5
1709   ac_status=$?
1710   echo "$as_me:1710: \$? = $ac_status" >&5
1711   (exit $ac_status); }
1712
1713 cat >conftest.$ac_ext <<_ACEOF
1714 #line 1714 "configure"
1715 #include "confdefs.h"
1716
1717 int
1718 main ()
1719 {
1720
1721   ;
1722   return 0;
1723 }
1724 _ACEOF
1725 ac_clean_files_save=$ac_clean_files
1726 ac_clean_files="$ac_clean_files a.out a.exe"
1727 # Try to create an executable without -o first, disregard a.out.
1728 # It will help us diagnose broken compilers, and finding out an intuition
1729 # of exeext.
1730 echo "$as_me:1730: checking for C compiler default output" >&5
1731 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1732 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1733 if { (eval echo "$as_me:1733: \"$ac_link_default\"") >&5
1734   (eval $ac_link_default) 2>&5
1735   ac_status=$?
1736   echo "$as_me:1736: \$? = $ac_status" >&5
1737   (exit $ac_status); }; then
1738   # Find the output, starting from the most likely.  This scheme is
1739 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1740 # resort.
1741 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1742                 ls a.out conftest 2>/dev/null;
1743                 ls a.* conftest.* 2>/dev/null`; do
1744   case $ac_file in
1745     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1746     a.out ) # We found the default executable, but exeext='' is most
1747             # certainly right.
1748             break;;
1749     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1750           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1751           export ac_cv_exeext
1752           break;;
1753     * ) break;;
1754   esac
1755 done
1756 else
1757   echo "$as_me: failed program was:" >&5
1758 cat conftest.$ac_ext >&5
1759 { { echo "$as_me:1759: error: C compiler cannot create executables" >&5
1760 echo "$as_me: error: C compiler cannot create executables" >&2;}
1761    { (exit 77); exit 77; }; }
1762 fi
1763
1764 ac_exeext=$ac_cv_exeext
1765 echo "$as_me:1765: result: $ac_file" >&5
1766 echo "${ECHO_T}$ac_file" >&6
1767
1768 # Check the compiler produces executables we can run.  If not, either
1769 # the compiler is broken, or we cross compile.
1770 echo "$as_me:1770: checking whether the C compiler works" >&5
1771 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1772 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1773 # If not cross compiling, check that we can run a simple program.
1774 if test "$cross_compiling" != yes; then
1775   if { ac_try='./$ac_file'
1776   { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1777   (eval $ac_try) 2>&5
1778   ac_status=$?
1779   echo "$as_me:1779: \$? = $ac_status" >&5
1780   (exit $ac_status); }; }; then
1781     cross_compiling=no
1782   else
1783     if test "$cross_compiling" = maybe; then
1784         cross_compiling=yes
1785     else
1786         { { echo "$as_me:1786: error: cannot run C compiled programs.
1787 If you meant to cross compile, use \`--host'." >&5
1788 echo "$as_me: error: cannot run C compiled programs.
1789 If you meant to cross compile, use \`--host'." >&2;}
1790    { (exit 1); exit 1; }; }
1791     fi
1792   fi
1793 fi
1794 echo "$as_me:1794: result: yes" >&5
1795 echo "${ECHO_T}yes" >&6
1796
1797 rm -f a.out a.exe conftest$ac_cv_exeext
1798 ac_clean_files=$ac_clean_files_save
1799 # Check the compiler produces executables we can run.  If not, either
1800 # the compiler is broken, or we cross compile.
1801 echo "$as_me:1801: checking whether we are cross compiling" >&5
1802 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1803 echo "$as_me:1803: result: $cross_compiling" >&5
1804 echo "${ECHO_T}$cross_compiling" >&6
1805
1806 echo "$as_me:1806: checking for executable suffix" >&5
1807 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1808 if { (eval echo "$as_me:1808: \"$ac_link\"") >&5
1809   (eval $ac_link) 2>&5
1810   ac_status=$?
1811   echo "$as_me:1811: \$? = $ac_status" >&5
1812   (exit $ac_status); }; then
1813   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1814 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1815 # work properly (i.e., refer to `conftest.exe'), while it won't with
1816 # `rm'.
1817 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1818   case $ac_file in
1819     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1820     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1821           export ac_cv_exeext
1822           break;;
1823     * ) break;;
1824   esac
1825 done
1826 else
1827   { { echo "$as_me:1827: error: cannot compute EXEEXT: cannot compile and link" >&5
1828 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1829    { (exit 1); exit 1; }; }
1830 fi
1831
1832 rm -f conftest$ac_cv_exeext
1833 echo "$as_me:1833: result: $ac_cv_exeext" >&5
1834 echo "${ECHO_T}$ac_cv_exeext" >&6
1835
1836 rm -f conftest.$ac_ext
1837 EXEEXT=$ac_cv_exeext
1838 ac_exeext=$EXEEXT
1839 echo "$as_me:1839: checking for object suffix" >&5
1840 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1841 if test "${ac_cv_objext+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   cat >conftest.$ac_ext <<_ACEOF
1845 #line 1845 "configure"
1846 #include "confdefs.h"
1847
1848 int
1849 main ()
1850 {
1851
1852   ;
1853   return 0;
1854 }
1855 _ACEOF
1856 rm -f conftest.o conftest.obj
1857 if { (eval echo "$as_me:1857: \"$ac_compile\"") >&5
1858   (eval $ac_compile) 2>&5
1859   ac_status=$?
1860   echo "$as_me:1860: \$? = $ac_status" >&5
1861   (exit $ac_status); }; then
1862   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1863   case $ac_file in
1864     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1865     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1866        break;;
1867   esac
1868 done
1869 else
1870   echo "$as_me: failed program was:" >&5
1871 cat conftest.$ac_ext >&5
1872 { { echo "$as_me:1872: error: cannot compute OBJEXT: cannot compile" >&5
1873 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1874    { (exit 1); exit 1; }; }
1875 fi
1876
1877 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1878 fi
1879 echo "$as_me:1879: result: $ac_cv_objext" >&5
1880 echo "${ECHO_T}$ac_cv_objext" >&6
1881 OBJEXT=$ac_cv_objext
1882 ac_objext=$OBJEXT
1883 echo "$as_me:1883: checking whether we are using the GNU C compiler" >&5
1884 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1885 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1886   echo $ECHO_N "(cached) $ECHO_C" >&6
1887 else
1888   cat >conftest.$ac_ext <<_ACEOF
1889 #line 1889 "configure"
1890 #include "confdefs.h"
1891
1892 int
1893 main ()
1894 {
1895 #ifndef __GNUC__
1896        choke me
1897 #endif
1898
1899   ;
1900   return 0;
1901 }
1902 _ACEOF
1903 rm -f conftest.$ac_objext
1904 if { (eval echo "$as_me:1904: \"$ac_compile\"") >&5
1905   (eval $ac_compile) 2>&5
1906   ac_status=$?
1907   echo "$as_me:1907: \$? = $ac_status" >&5
1908   (exit $ac_status); } &&
1909          { ac_try='test -s conftest.$ac_objext'
1910   { (eval echo "$as_me:1910: \"$ac_try\"") >&5
1911   (eval $ac_try) 2>&5
1912   ac_status=$?
1913   echo "$as_me:1913: \$? = $ac_status" >&5
1914   (exit $ac_status); }; }; then
1915   ac_compiler_gnu=yes
1916 else
1917   echo "$as_me: failed program was:" >&5
1918 cat conftest.$ac_ext >&5
1919 ac_compiler_gnu=no
1920 fi
1921 rm -f conftest.$ac_objext conftest.$ac_ext
1922 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1923
1924 fi
1925 echo "$as_me:1925: result: $ac_cv_c_compiler_gnu" >&5
1926 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1927 GCC=`test $ac_compiler_gnu = yes && echo yes`
1928 ac_test_CFLAGS=${CFLAGS+set}
1929 ac_save_CFLAGS=$CFLAGS
1930 CFLAGS="-g"
1931 echo "$as_me:1931: checking whether $CC accepts -g" >&5
1932 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1933 if test "${ac_cv_prog_cc_g+set}" = set; then
1934   echo $ECHO_N "(cached) $ECHO_C" >&6
1935 else
1936   cat >conftest.$ac_ext <<_ACEOF
1937 #line 1937 "configure"
1938 #include "confdefs.h"
1939
1940 int
1941 main ()
1942 {
1943
1944   ;
1945   return 0;
1946 }
1947 _ACEOF
1948 rm -f conftest.$ac_objext
1949 if { (eval echo "$as_me:1949: \"$ac_compile\"") >&5
1950   (eval $ac_compile) 2>&5
1951   ac_status=$?
1952   echo "$as_me:1952: \$? = $ac_status" >&5
1953   (exit $ac_status); } &&
1954          { ac_try='test -s conftest.$ac_objext'
1955   { (eval echo "$as_me:1955: \"$ac_try\"") >&5
1956   (eval $ac_try) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit $ac_status); }; }; then
1960   ac_cv_prog_cc_g=yes
1961 else
1962   echo "$as_me: failed program was:" >&5
1963 cat conftest.$ac_ext >&5
1964 ac_cv_prog_cc_g=no
1965 fi
1966 rm -f conftest.$ac_objext conftest.$ac_ext
1967 fi
1968 echo "$as_me:1968: result: $ac_cv_prog_cc_g" >&5
1969 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1970 if test "$ac_test_CFLAGS" = set; then
1971   CFLAGS=$ac_save_CFLAGS
1972 elif test $ac_cv_prog_cc_g = yes; then
1973   if test "$GCC" = yes; then
1974     CFLAGS="-g -O2"
1975   else
1976     CFLAGS="-g"
1977   fi
1978 else
1979   if test "$GCC" = yes; then
1980     CFLAGS="-O2"
1981   else
1982     CFLAGS=
1983   fi
1984 fi
1985 # Some people use a C++ compiler to compile C.  Since we use `exit',
1986 # in C++ we need to declare it.  In case someone uses the same compiler
1987 # for both compiling C and C++ we need to have the C++ compiler decide
1988 # the declaration of exit, since it's the most demanding environment.
1989 cat >conftest.$ac_ext <<_ACEOF
1990 #ifndef __cplusplus
1991   choke me
1992 #endif
1993 _ACEOF
1994 rm -f conftest.$ac_objext
1995 if { (eval echo "$as_me:1995: \"$ac_compile\"") >&5
1996   (eval $ac_compile) 2>&5
1997   ac_status=$?
1998   echo "$as_me:1998: \$? = $ac_status" >&5
1999   (exit $ac_status); } &&
2000          { ac_try='test -s conftest.$ac_objext'
2001   { (eval echo "$as_me:2001: \"$ac_try\"") >&5
2002   (eval $ac_try) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit $ac_status); }; }; then
2006   for ac_declaration in \
2007    ''\
2008    '#include <stdlib.h>' \
2009    'extern "C" void std::exit (int) throw (); using std::exit;' \
2010    'extern "C" void std::exit (int); using std::exit;' \
2011    'extern "C" void exit (int) throw ();' \
2012    'extern "C" void exit (int);' \
2013    'void exit (int);'
2014 do
2015   cat >conftest.$ac_ext <<_ACEOF
2016 #line 2016 "configure"
2017 #include "confdefs.h"
2018 #include <stdlib.h>
2019 $ac_declaration
2020 int
2021 main ()
2022 {
2023 exit (42);
2024   ;
2025   return 0;
2026 }
2027 _ACEOF
2028 rm -f conftest.$ac_objext
2029 if { (eval echo "$as_me:2029: \"$ac_compile\"") >&5
2030   (eval $ac_compile) 2>&5
2031   ac_status=$?
2032   echo "$as_me:2032: \$? = $ac_status" >&5
2033   (exit $ac_status); } &&
2034          { ac_try='test -s conftest.$ac_objext'
2035   { (eval echo "$as_me:2035: \"$ac_try\"") >&5
2036   (eval $ac_try) 2>&5
2037   ac_status=$?
2038   echo "$as_me:2038: \$? = $ac_status" >&5
2039   (exit $ac_status); }; }; then
2040   :
2041 else
2042   echo "$as_me: failed program was:" >&5
2043 cat conftest.$ac_ext >&5
2044 continue
2045 fi
2046 rm -f conftest.$ac_objext conftest.$ac_ext
2047   cat >conftest.$ac_ext <<_ACEOF
2048 #line 2048 "configure"
2049 #include "confdefs.h"
2050 $ac_declaration
2051 int
2052 main ()
2053 {
2054 exit (42);
2055   ;
2056   return 0;
2057 }
2058 _ACEOF
2059 rm -f conftest.$ac_objext
2060 if { (eval echo "$as_me:2060: \"$ac_compile\"") >&5
2061   (eval $ac_compile) 2>&5
2062   ac_status=$?
2063   echo "$as_me:2063: \$? = $ac_status" >&5
2064   (exit $ac_status); } &&
2065          { ac_try='test -s conftest.$ac_objext'
2066   { (eval echo "$as_me:2066: \"$ac_try\"") >&5
2067   (eval $ac_try) 2>&5
2068   ac_status=$?
2069   echo "$as_me:2069: \$? = $ac_status" >&5
2070   (exit $ac_status); }; }; then
2071   break
2072 else
2073   echo "$as_me: failed program was:" >&5
2074 cat conftest.$ac_ext >&5
2075 fi
2076 rm -f conftest.$ac_objext conftest.$ac_ext
2077 done
2078 rm -f conftest*
2079 if test -n "$ac_declaration"; then
2080   echo '#ifdef __cplusplus' >>confdefs.h
2081   echo $ac_declaration      >>confdefs.h
2082   echo '#endif'             >>confdefs.h
2083 fi
2084
2085 else
2086   echo "$as_me: failed program was:" >&5
2087 cat conftest.$ac_ext >&5
2088 fi
2089 rm -f conftest.$ac_objext conftest.$ac_ext
2090 ac_ext=c
2091 ac_cpp='$CPP $CPPFLAGS'
2092 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2093 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2094 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2095 ac_main_return=return
2096
2097 GCC_VERSION=none
2098 if test "$GCC" = yes ; then
2099         echo "$as_me:2099: checking version of $CC" >&5
2100 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2101         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2102         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2103         echo "$as_me:2103: result: $GCC_VERSION" >&5
2104 echo "${ECHO_T}$GCC_VERSION" >&6
2105 fi
2106
2107 ac_ext=c
2108 ac_cpp='$CPP $CPPFLAGS'
2109 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2110 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2111 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2112 ac_main_return=return
2113 echo "$as_me:2113: checking how to run the C preprocessor" >&5
2114 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2115 # On Suns, sometimes $CPP names a directory.
2116 if test -n "$CPP" && test -d "$CPP"; then
2117   CPP=
2118 fi
2119 if test -z "$CPP"; then
2120   if test "${ac_cv_prog_CPP+set}" = set; then
2121   echo $ECHO_N "(cached) $ECHO_C" >&6
2122 else
2123       # Double quotes because CPP needs to be expanded
2124     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2125     do
2126       ac_preproc_ok=false
2127 for ac_c_preproc_warn_flag in '' yes
2128 do
2129   # Use a header file that comes with gcc, so configuring glibc
2130   # with a fresh cross-compiler works.
2131   # On the NeXT, cc -E runs the code through the compiler's parser,
2132   # not just through cpp. "Syntax error" is here to catch this case.
2133   cat >conftest.$ac_ext <<_ACEOF
2134 #line 2134 "configure"
2135 #include "confdefs.h"
2136 #include <assert.h>
2137                      Syntax error
2138 _ACEOF
2139 if { (eval echo "$as_me:2139: \"$ac_cpp conftest.$ac_ext\"") >&5
2140   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2141   ac_status=$?
2142   egrep -v '^ *\+' conftest.er1 >conftest.err
2143   rm -f conftest.er1
2144   cat conftest.err >&5
2145   echo "$as_me:2145: \$? = $ac_status" >&5
2146   (exit $ac_status); } >/dev/null; then
2147   if test -s conftest.err; then
2148     ac_cpp_err=$ac_c_preproc_warn_flag
2149   else
2150     ac_cpp_err=
2151   fi
2152 else
2153   ac_cpp_err=yes
2154 fi
2155 if test -z "$ac_cpp_err"; then
2156   :
2157 else
2158   echo "$as_me: failed program was:" >&5
2159   cat conftest.$ac_ext >&5
2160   # Broken: fails on valid input.
2161 continue
2162 fi
2163 rm -f conftest.err conftest.$ac_ext
2164
2165   # OK, works on sane cases.  Now check whether non-existent headers
2166   # can be detected and how.
2167   cat >conftest.$ac_ext <<_ACEOF
2168 #line 2168 "configure"
2169 #include "confdefs.h"
2170 #include <ac_nonexistent.h>
2171 _ACEOF
2172 if { (eval echo "$as_me:2172: \"$ac_cpp conftest.$ac_ext\"") >&5
2173   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2174   ac_status=$?
2175   egrep -v '^ *\+' conftest.er1 >conftest.err
2176   rm -f conftest.er1
2177   cat conftest.err >&5
2178   echo "$as_me:2178: \$? = $ac_status" >&5
2179   (exit $ac_status); } >/dev/null; then
2180   if test -s conftest.err; then
2181     ac_cpp_err=$ac_c_preproc_warn_flag
2182   else
2183     ac_cpp_err=
2184   fi
2185 else
2186   ac_cpp_err=yes
2187 fi
2188 if test -z "$ac_cpp_err"; then
2189   # Broken: success on invalid input.
2190 continue
2191 else
2192   echo "$as_me: failed program was:" >&5
2193   cat conftest.$ac_ext >&5
2194   # Passes both tests.
2195 ac_preproc_ok=:
2196 break
2197 fi
2198 rm -f conftest.err conftest.$ac_ext
2199
2200 done
2201 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2202 rm -f conftest.err conftest.$ac_ext
2203 if $ac_preproc_ok; then
2204   break
2205 fi
2206
2207     done
2208     ac_cv_prog_CPP=$CPP
2209
2210 fi
2211   CPP=$ac_cv_prog_CPP
2212 else
2213   ac_cv_prog_CPP=$CPP
2214 fi
2215 echo "$as_me:2215: result: $CPP" >&5
2216 echo "${ECHO_T}$CPP" >&6
2217 ac_preproc_ok=false
2218 for ac_c_preproc_warn_flag in '' yes
2219 do
2220   # Use a header file that comes with gcc, so configuring glibc
2221   # with a fresh cross-compiler works.
2222   # On the NeXT, cc -E runs the code through the compiler's parser,
2223   # not just through cpp. "Syntax error" is here to catch this case.
2224   cat >conftest.$ac_ext <<_ACEOF
2225 #line 2225 "configure"
2226 #include "confdefs.h"
2227 #include <assert.h>
2228                      Syntax error
2229 _ACEOF
2230 if { (eval echo "$as_me:2230: \"$ac_cpp conftest.$ac_ext\"") >&5
2231   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2232   ac_status=$?
2233   egrep -v '^ *\+' conftest.er1 >conftest.err
2234   rm -f conftest.er1
2235   cat conftest.err >&5
2236   echo "$as_me:2236: \$? = $ac_status" >&5
2237   (exit $ac_status); } >/dev/null; then
2238   if test -s conftest.err; then
2239     ac_cpp_err=$ac_c_preproc_warn_flag
2240   else
2241     ac_cpp_err=
2242   fi
2243 else
2244   ac_cpp_err=yes
2245 fi
2246 if test -z "$ac_cpp_err"; then
2247   :
2248 else
2249   echo "$as_me: failed program was:" >&5
2250   cat conftest.$ac_ext >&5
2251   # Broken: fails on valid input.
2252 continue
2253 fi
2254 rm -f conftest.err conftest.$ac_ext
2255
2256   # OK, works on sane cases.  Now check whether non-existent headers
2257   # can be detected and how.
2258   cat >conftest.$ac_ext <<_ACEOF
2259 #line 2259 "configure"
2260 #include "confdefs.h"
2261 #include <ac_nonexistent.h>
2262 _ACEOF
2263 if { (eval echo "$as_me:2263: \"$ac_cpp conftest.$ac_ext\"") >&5
2264   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2265   ac_status=$?
2266   egrep -v '^ *\+' conftest.er1 >conftest.err
2267   rm -f conftest.er1
2268   cat conftest.err >&5
2269   echo "$as_me:2269: \$? = $ac_status" >&5
2270   (exit $ac_status); } >/dev/null; then
2271   if test -s conftest.err; then
2272     ac_cpp_err=$ac_c_preproc_warn_flag
2273   else
2274     ac_cpp_err=
2275   fi
2276 else
2277   ac_cpp_err=yes
2278 fi
2279 if test -z "$ac_cpp_err"; then
2280   # Broken: success on invalid input.
2281 continue
2282 else
2283   echo "$as_me: failed program was:" >&5
2284   cat conftest.$ac_ext >&5
2285   # Passes both tests.
2286 ac_preproc_ok=:
2287 break
2288 fi
2289 rm -f conftest.err conftest.$ac_ext
2290
2291 done
2292 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2293 rm -f conftest.err conftest.$ac_ext
2294 if $ac_preproc_ok; then
2295   :
2296 else
2297   { { echo "$as_me:2297: error: C preprocessor \"$CPP\" fails sanity check" >&5
2298 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2299    { (exit 1); exit 1; }; }
2300 fi
2301
2302 ac_ext=c
2303 ac_cpp='$CPP $CPPFLAGS'
2304 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2305 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2306 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2307 ac_main_return=return
2308
2309 if test $ac_cv_c_compiler_gnu = yes; then
2310     echo "$as_me:2310: checking whether $CC needs -traditional" >&5
2311 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2312 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2313   echo $ECHO_N "(cached) $ECHO_C" >&6
2314 else
2315     ac_pattern="Autoconf.*'x'"
2316   cat >conftest.$ac_ext <<_ACEOF
2317 #line 2317 "configure"
2318 #include "confdefs.h"
2319 #include <sgtty.h>
2320 int Autoconf = TIOCGETP;
2321 _ACEOF
2322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2323   egrep "$ac_pattern" >/dev/null 2>&1; then
2324   ac_cv_prog_gcc_traditional=yes
2325 else
2326   ac_cv_prog_gcc_traditional=no
2327 fi
2328 rm -f conftest*
2329
2330   if test $ac_cv_prog_gcc_traditional = no; then
2331     cat >conftest.$ac_ext <<_ACEOF
2332 #line 2332 "configure"
2333 #include "confdefs.h"
2334 #include <termio.h>
2335 int Autoconf = TCGETA;
2336 _ACEOF
2337 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2338   egrep "$ac_pattern" >/dev/null 2>&1; then
2339   ac_cv_prog_gcc_traditional=yes
2340 fi
2341 rm -f conftest*
2342
2343   fi
2344 fi
2345 echo "$as_me:2345: result: $ac_cv_prog_gcc_traditional" >&5
2346 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2347   if test $ac_cv_prog_gcc_traditional = yes; then
2348     CC="$CC -traditional"
2349   fi
2350 fi
2351
2352 echo "$as_me:2352: checking whether $CC understands -c and -o together" >&5
2353 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2354 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2355   echo $ECHO_N "(cached) $ECHO_C" >&6
2356 else
2357
2358 cat > conftest.$ac_ext <<CF_EOF
2359 #include <stdio.h>
2360 int main()
2361 {
2362         ${cf_cv_main_return:-return}(0);
2363 }
2364 CF_EOF
2365 # We do the test twice because some compilers refuse to overwrite an
2366 # existing .o file with -o, though they will create one.
2367 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2368 if { (eval echo "$as_me:2368: \"$ac_try\"") >&5
2369   (eval $ac_try) 2>&5
2370   ac_status=$?
2371   echo "$as_me:2371: \$? = $ac_status" >&5
2372   (exit $ac_status); } &&
2373   test -f conftest2.$ac_objext && { (eval echo "$as_me:2373: \"$ac_try\"") >&5
2374   (eval $ac_try) 2>&5
2375   ac_status=$?
2376   echo "$as_me:2376: \$? = $ac_status" >&5
2377   (exit $ac_status); };
2378 then
2379   eval cf_cv_prog_CC_c_o=yes
2380 else
2381   eval cf_cv_prog_CC_c_o=no
2382 fi
2383 rm -f conftest*
2384
2385 fi
2386 if test $cf_cv_prog_CC_c_o = yes; then
2387   echo "$as_me:2387: result: yes" >&5
2388 echo "${ECHO_T}yes" >&6
2389 else
2390   echo "$as_me:2390: result: no" >&5
2391 echo "${ECHO_T}no" >&6
2392 fi
2393
2394 echo "$as_me:2394: checking for POSIXized ISC" >&5
2395 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2396 if test -d /etc/conf/kconfig.d &&
2397    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2398 then
2399   echo "$as_me:2399: result: yes" >&5
2400 echo "${ECHO_T}yes" >&6
2401   ISC=yes # If later tests want to check for ISC.
2402
2403 cat >>confdefs.h <<\EOF
2404 #define _POSIX_SOURCE 1
2405 EOF
2406
2407   if test "$GCC" = yes; then
2408     CC="$CC -posix"
2409   else
2410     CC="$CC -Xp"
2411   fi
2412 else
2413   echo "$as_me:2413: result: no" >&5
2414 echo "${ECHO_T}no" >&6
2415   ISC=
2416 fi
2417
2418 echo "$as_me:2418: checking for ${CC-cc} option to accept ANSI C" >&5
2419 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2420 if test "${cf_cv_ansi_cc+set}" = set; then
2421   echo $ECHO_N "(cached) $ECHO_C" >&6
2422 else
2423
2424 cf_cv_ansi_cc=no
2425 cf_save_CFLAGS="$CFLAGS"
2426 cf_save_CPPFLAGS="$CPPFLAGS"
2427 # Don't try gcc -ansi; that turns off useful extensions and
2428 # breaks some systems' header files.
2429 # AIX                   -qlanglvl=ansi
2430 # Ultrix and OSF/1      -std1
2431 # HP-UX                 -Aa -D_HPUX_SOURCE
2432 # SVR4                  -Xc
2433 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2434 for cf_arg in "-DCC_HAS_PROTOS" \
2435         "" \
2436         -qlanglvl=ansi \
2437         -std1 \
2438         -Ae \
2439         "-Aa -D_HPUX_SOURCE" \
2440         -Xc
2441 do
2442
2443 cf_fix_cppflags=no
2444 cf_new_cflags=
2445 cf_new_cppflags=
2446 cf_new_extra_cppflags=
2447
2448 for cf_add_cflags in $cf_arg
2449 do
2450 case $cf_fix_cppflags in
2451 no)
2452         case $cf_add_cflags in #(vi
2453         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2454                 case $cf_add_cflags in
2455                 -D*)
2456                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2457
2458                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2459                         && test -z "${cf_tst_cflags}" \
2460                         && cf_fix_cppflags=yes
2461
2462                         if test $cf_fix_cppflags = yes ; then
2463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2464                                 continue
2465                         elif test "${cf_tst_cflags}" = "\"'" ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         fi
2469                         ;;
2470                 esac
2471                 case "$CPPFLAGS" in
2472                 *$cf_add_cflags) #(vi
2473                         ;;
2474                 *) #(vi
2475                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2476                         ;;
2477                 esac
2478                 ;;
2479         *)
2480                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2481                 ;;
2482         esac
2483         ;;
2484 yes)
2485         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2486
2487         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2488
2489         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2490         && test -z "${cf_tst_cflags}" \
2491         && cf_fix_cppflags=no
2492         ;;
2493 esac
2494 done
2495
2496 if test -n "$cf_new_cflags" ; then
2497
2498         CFLAGS="$CFLAGS $cf_new_cflags"
2499 fi
2500
2501 if test -n "$cf_new_cppflags" ; then
2502
2503         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2504 fi
2505
2506 if test -n "$cf_new_extra_cppflags" ; then
2507
2508         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2509 fi
2510
2511         cat >conftest.$ac_ext <<_ACEOF
2512 #line 2512 "configure"
2513 #include "confdefs.h"
2514
2515 #ifndef CC_HAS_PROTOS
2516 #if !defined(__STDC__) || (__STDC__ != 1)
2517 choke me
2518 #endif
2519 #endif
2520
2521 int
2522 main ()
2523 {
2524
2525         int test (int i, double x);
2526         struct s1 {int (*f) (int a);};
2527         struct s2 {int (*f) (double a);};
2528   ;
2529   return 0;
2530 }
2531 _ACEOF
2532 rm -f conftest.$ac_objext
2533 if { (eval echo "$as_me:2533: \"$ac_compile\"") >&5
2534   (eval $ac_compile) 2>&5
2535   ac_status=$?
2536   echo "$as_me:2536: \$? = $ac_status" >&5
2537   (exit $ac_status); } &&
2538          { ac_try='test -s conftest.$ac_objext'
2539   { (eval echo "$as_me:2539: \"$ac_try\"") >&5
2540   (eval $ac_try) 2>&5
2541   ac_status=$?
2542   echo "$as_me:2542: \$? = $ac_status" >&5
2543   (exit $ac_status); }; }; then
2544   cf_cv_ansi_cc="$cf_arg"; break
2545 else
2546   echo "$as_me: failed program was:" >&5
2547 cat conftest.$ac_ext >&5
2548 fi
2549 rm -f conftest.$ac_objext conftest.$ac_ext
2550 done
2551 CFLAGS="$cf_save_CFLAGS"
2552 CPPFLAGS="$cf_save_CPPFLAGS"
2553
2554 fi
2555 echo "$as_me:2555: result: $cf_cv_ansi_cc" >&5
2556 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2557
2558 if test "$cf_cv_ansi_cc" != "no"; then
2559 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2560
2561 cf_fix_cppflags=no
2562 cf_new_cflags=
2563 cf_new_cppflags=
2564 cf_new_extra_cppflags=
2565
2566 for cf_add_cflags in $cf_cv_ansi_cc
2567 do
2568 case $cf_fix_cppflags in
2569 no)
2570         case $cf_add_cflags in #(vi
2571         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2572                 case $cf_add_cflags in
2573                 -D*)
2574                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2575
2576                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2577                         && test -z "${cf_tst_cflags}" \
2578                         && cf_fix_cppflags=yes
2579
2580                         if test $cf_fix_cppflags = yes ; then
2581                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2582                                 continue
2583                         elif test "${cf_tst_cflags}" = "\"'" ; then
2584                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2585                                 continue
2586                         fi
2587                         ;;
2588                 esac
2589                 case "$CPPFLAGS" in
2590                 *$cf_add_cflags) #(vi
2591                         ;;
2592                 *) #(vi
2593                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2594                         ;;
2595                 esac
2596                 ;;
2597         *)
2598                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2599                 ;;
2600         esac
2601         ;;
2602 yes)
2603         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2604
2605         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2606
2607         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2608         && test -z "${cf_tst_cflags}" \
2609         && cf_fix_cppflags=no
2610         ;;
2611 esac
2612 done
2613
2614 if test -n "$cf_new_cflags" ; then
2615
2616         CFLAGS="$CFLAGS $cf_new_cflags"
2617 fi
2618
2619 if test -n "$cf_new_cppflags" ; then
2620
2621         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2622 fi
2623
2624 if test -n "$cf_new_extra_cppflags" ; then
2625
2626         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2627 fi
2628
2629 else
2630         cat >>confdefs.h <<\EOF
2631 #define CC_HAS_PROTOS 1
2632 EOF
2633
2634 fi
2635 fi
2636
2637 if test "$cf_cv_ansi_cc" = "no"; then
2638         { { echo "$as_me:2638: error: Your compiler does not appear to recognize prototypes.
2639 You have the following choices:
2640         a. adjust your compiler options
2641         b. get an up-to-date compiler
2642         c. use a wrapper such as unproto" >&5
2643 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2644 You have the following choices:
2645         a. adjust your compiler options
2646         b. get an up-to-date compiler
2647         c. use a wrapper such as unproto" >&2;}
2648    { (exit 1); exit 1; }; }
2649 fi
2650
2651 case $cf_cv_system_name in
2652 os2*)
2653     CFLAGS="$CFLAGS -Zmt"
2654     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2655     CXXFLAGS="$CXXFLAGS -Zmt"
2656     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2657     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2658     ac_cv_exeext=.exe
2659     ;;
2660 esac
2661
2662 PROG_EXT="$EXEEXT"
2663
2664 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2665 #define PROG_EXT "$PROG_EXT"
2666 EOF
2667
2668 if test "$cross_compiling" = yes ; then
2669   LDCONFIG=:
2670 else
2671 case "$cf_cv_system_name" in #(vi
2672 dragonfly*|freebsd*) #(vi
2673   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2674   ;;
2675 *) LDPATH=$PATH:/sbin:/usr/sbin
2676   # Extract the first word of "ldconfig", so it can be a program name with args.
2677 set dummy ldconfig; ac_word=$2
2678 echo "$as_me:2678: checking for $ac_word" >&5
2679 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2680 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2681   echo $ECHO_N "(cached) $ECHO_C" >&6
2682 else
2683   case $LDCONFIG in
2684   [\\/]* | ?:[\\/]*)
2685   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2686   ;;
2687   *)
2688   ac_save_IFS=$IFS; IFS=$ac_path_separator
2689 ac_dummy="$LDPATH"
2690 for ac_dir in $ac_dummy; do
2691   IFS=$ac_save_IFS
2692   test -z "$ac_dir" && ac_dir=.
2693   if $as_executable_p "$ac_dir/$ac_word"; then
2694    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2695    echo "$as_me:2695: found $ac_dir/$ac_word" >&5
2696    break
2697 fi
2698 done
2699
2700   ;;
2701 esac
2702 fi
2703 LDCONFIG=$ac_cv_path_LDCONFIG
2704
2705 if test -n "$LDCONFIG"; then
2706   echo "$as_me:2706: result: $LDCONFIG" >&5
2707 echo "${ECHO_T}$LDCONFIG" >&6
2708 else
2709   echo "$as_me:2709: result: no" >&5
2710 echo "${ECHO_T}no" >&6
2711 fi
2712
2713   ;;
2714 esac
2715 fi
2716
2717 echo "$as_me:2717: checking if you want to ensure bool is consistent with C++" >&5
2718 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2719
2720 # Check whether --with-cxx or --without-cxx was given.
2721 if test "${with_cxx+set}" = set; then
2722   withval="$with_cxx"
2723   cf_with_cxx=$withval
2724 else
2725   cf_with_cxx=yes
2726 fi;
2727 echo "$as_me:2727: result: $cf_with_cxx" >&5
2728 echo "${ECHO_T}$cf_with_cxx" >&6
2729 if test "X$cf_with_cxx" = Xno ; then
2730         CXX=""
2731         GXX=""
2732 else
2733         # with autoconf 2.13, we can change the error to a warning:
2734                 ac_ext=cc
2735 ac_cpp='$CXXCPP $CPPFLAGS'
2736 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2737 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2738 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2739 ac_main_return=return
2740 if test -n "$ac_tool_prefix"; then
2741   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2742   do
2743     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2744 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2745 echo "$as_me:2745: checking for $ac_word" >&5
2746 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2747 if test "${ac_cv_prog_CXX+set}" = set; then
2748   echo $ECHO_N "(cached) $ECHO_C" >&6
2749 else
2750   if test -n "$CXX"; then
2751   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2752 else
2753   ac_save_IFS=$IFS; IFS=$ac_path_separator
2754 ac_dummy="$PATH"
2755 for ac_dir in $ac_dummy; do
2756   IFS=$ac_save_IFS
2757   test -z "$ac_dir" && ac_dir=.
2758   $as_executable_p "$ac_dir/$ac_word" || continue
2759 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2760 echo "$as_me:2760: found $ac_dir/$ac_word" >&5
2761 break
2762 done
2763
2764 fi
2765 fi
2766 CXX=$ac_cv_prog_CXX
2767 if test -n "$CXX"; then
2768   echo "$as_me:2768: result: $CXX" >&5
2769 echo "${ECHO_T}$CXX" >&6
2770 else
2771   echo "$as_me:2771: result: no" >&5
2772 echo "${ECHO_T}no" >&6
2773 fi
2774
2775     test -n "$CXX" && break
2776   done
2777 fi
2778 if test -z "$CXX"; then
2779   ac_ct_CXX=$CXX
2780   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2781 do
2782   # Extract the first word of "$ac_prog", so it can be a program name with args.
2783 set dummy $ac_prog; ac_word=$2
2784 echo "$as_me:2784: checking for $ac_word" >&5
2785 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2786 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2787   echo $ECHO_N "(cached) $ECHO_C" >&6
2788 else
2789   if test -n "$ac_ct_CXX"; then
2790   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2791 else
2792   ac_save_IFS=$IFS; IFS=$ac_path_separator
2793 ac_dummy="$PATH"
2794 for ac_dir in $ac_dummy; do
2795   IFS=$ac_save_IFS
2796   test -z "$ac_dir" && ac_dir=.
2797   $as_executable_p "$ac_dir/$ac_word" || continue
2798 ac_cv_prog_ac_ct_CXX="$ac_prog"
2799 echo "$as_me:2799: found $ac_dir/$ac_word" >&5
2800 break
2801 done
2802
2803 fi
2804 fi
2805 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2806 if test -n "$ac_ct_CXX"; then
2807   echo "$as_me:2807: result: $ac_ct_CXX" >&5
2808 echo "${ECHO_T}$ac_ct_CXX" >&6
2809 else
2810   echo "$as_me:2810: result: no" >&5
2811 echo "${ECHO_T}no" >&6
2812 fi
2813
2814   test -n "$ac_ct_CXX" && break
2815 done
2816 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2817
2818   CXX=$ac_ct_CXX
2819 fi
2820
2821 # Provide some information about the compiler.
2822 echo "$as_me:2822:" \
2823      "checking for C++ compiler version" >&5
2824 ac_compiler=`set X $ac_compile; echo $2`
2825 { (eval echo "$as_me:2825: \"$ac_compiler --version </dev/null >&5\"") >&5
2826   (eval $ac_compiler --version </dev/null >&5) 2>&5
2827   ac_status=$?
2828   echo "$as_me:2828: \$? = $ac_status" >&5
2829   (exit $ac_status); }
2830 { (eval echo "$as_me:2830: \"$ac_compiler -v </dev/null >&5\"") >&5
2831   (eval $ac_compiler -v </dev/null >&5) 2>&5
2832   ac_status=$?
2833   echo "$as_me:2833: \$? = $ac_status" >&5
2834   (exit $ac_status); }
2835 { (eval echo "$as_me:2835: \"$ac_compiler -V </dev/null >&5\"") >&5
2836   (eval $ac_compiler -V </dev/null >&5) 2>&5
2837   ac_status=$?
2838   echo "$as_me:2838: \$? = $ac_status" >&5
2839   (exit $ac_status); }
2840
2841 echo "$as_me:2841: checking whether we are using the GNU C++ compiler" >&5
2842 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2843 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2844   echo $ECHO_N "(cached) $ECHO_C" >&6
2845 else
2846   cat >conftest.$ac_ext <<_ACEOF
2847 #line 2847 "configure"
2848 #include "confdefs.h"
2849
2850 int
2851 main ()
2852 {
2853 #ifndef __GNUC__
2854        choke me
2855 #endif
2856
2857   ;
2858   return 0;
2859 }
2860 _ACEOF
2861 rm -f conftest.$ac_objext
2862 if { (eval echo "$as_me:2862: \"$ac_compile\"") >&5
2863   (eval $ac_compile) 2>&5
2864   ac_status=$?
2865   echo "$as_me:2865: \$? = $ac_status" >&5
2866   (exit $ac_status); } &&
2867          { ac_try='test -s conftest.$ac_objext'
2868   { (eval echo "$as_me:2868: \"$ac_try\"") >&5
2869   (eval $ac_try) 2>&5
2870   ac_status=$?
2871   echo "$as_me:2871: \$? = $ac_status" >&5
2872   (exit $ac_status); }; }; then
2873   ac_compiler_gnu=yes
2874 else
2875   echo "$as_me: failed program was:" >&5
2876 cat conftest.$ac_ext >&5
2877 ac_compiler_gnu=no
2878 fi
2879 rm -f conftest.$ac_objext conftest.$ac_ext
2880 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2881
2882 fi
2883 echo "$as_me:2883: result: $ac_cv_cxx_compiler_gnu" >&5
2884 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2885 GXX=`test $ac_compiler_gnu = yes && echo yes`
2886 ac_test_CXXFLAGS=${CXXFLAGS+set}
2887 ac_save_CXXFLAGS=$CXXFLAGS
2888 CXXFLAGS="-g"
2889 echo "$as_me:2889: checking whether $CXX accepts -g" >&5
2890 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2891 if test "${ac_cv_prog_cxx_g+set}" = set; then
2892   echo $ECHO_N "(cached) $ECHO_C" >&6
2893 else
2894   cat >conftest.$ac_ext <<_ACEOF
2895 #line 2895 "configure"
2896 #include "confdefs.h"
2897
2898 int
2899 main ()
2900 {
2901
2902   ;
2903   return 0;
2904 }
2905 _ACEOF
2906 rm -f conftest.$ac_objext
2907 if { (eval echo "$as_me:2907: \"$ac_compile\"") >&5
2908   (eval $ac_compile) 2>&5
2909   ac_status=$?
2910   echo "$as_me:2910: \$? = $ac_status" >&5
2911   (exit $ac_status); } &&
2912          { ac_try='test -s conftest.$ac_objext'
2913   { (eval echo "$as_me:2913: \"$ac_try\"") >&5
2914   (eval $ac_try) 2>&5
2915   ac_status=$?
2916   echo "$as_me:2916: \$? = $ac_status" >&5
2917   (exit $ac_status); }; }; then
2918   ac_cv_prog_cxx_g=yes
2919 else
2920   echo "$as_me: failed program was:" >&5
2921 cat conftest.$ac_ext >&5
2922 ac_cv_prog_cxx_g=no
2923 fi
2924 rm -f conftest.$ac_objext conftest.$ac_ext
2925 fi
2926 echo "$as_me:2926: result: $ac_cv_prog_cxx_g" >&5
2927 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2928 if test "$ac_test_CXXFLAGS" = set; then
2929   CXXFLAGS=$ac_save_CXXFLAGS
2930 elif test $ac_cv_prog_cxx_g = yes; then
2931   if test "$GXX" = yes; then
2932     CXXFLAGS="-g -O2"
2933   else
2934     CXXFLAGS="-g"
2935   fi
2936 else
2937   if test "$GXX" = yes; then
2938     CXXFLAGS="-O2"
2939   else
2940     CXXFLAGS=
2941   fi
2942 fi
2943 for ac_declaration in \
2944    ''\
2945    '#include <stdlib.h>' \
2946    'extern "C" void std::exit (int) throw (); using std::exit;' \
2947    'extern "C" void std::exit (int); using std::exit;' \
2948    'extern "C" void exit (int) throw ();' \
2949    'extern "C" void exit (int);' \
2950    'void exit (int);'
2951 do
2952   cat >conftest.$ac_ext <<_ACEOF
2953 #line 2953 "configure"
2954 #include "confdefs.h"
2955 #include <stdlib.h>
2956 $ac_declaration
2957 int
2958 main ()
2959 {
2960 exit (42);
2961   ;
2962   return 0;
2963 }
2964 _ACEOF
2965 rm -f conftest.$ac_objext
2966 if { (eval echo "$as_me:2966: \"$ac_compile\"") >&5
2967   (eval $ac_compile) 2>&5
2968   ac_status=$?
2969   echo "$as_me:2969: \$? = $ac_status" >&5
2970   (exit $ac_status); } &&
2971          { ac_try='test -s conftest.$ac_objext'
2972   { (eval echo "$as_me:2972: \"$ac_try\"") >&5
2973   (eval $ac_try) 2>&5
2974   ac_status=$?
2975   echo "$as_me:2975: \$? = $ac_status" >&5
2976   (exit $ac_status); }; }; then
2977   :
2978 else
2979   echo "$as_me: failed program was:" >&5
2980 cat conftest.$ac_ext >&5
2981 continue
2982 fi
2983 rm -f conftest.$ac_objext conftest.$ac_ext
2984   cat >conftest.$ac_ext <<_ACEOF
2985 #line 2985 "configure"
2986 #include "confdefs.h"
2987 $ac_declaration
2988 int
2989 main ()
2990 {
2991 exit (42);
2992   ;
2993   return 0;
2994 }
2995 _ACEOF
2996 rm -f conftest.$ac_objext
2997 if { (eval echo "$as_me:2997: \"$ac_compile\"") >&5
2998   (eval $ac_compile) 2>&5
2999   ac_status=$?
3000   echo "$as_me:3000: \$? = $ac_status" >&5
3001   (exit $ac_status); } &&
3002          { ac_try='test -s conftest.$ac_objext'
3003   { (eval echo "$as_me:3003: \"$ac_try\"") >&5
3004   (eval $ac_try) 2>&5
3005   ac_status=$?
3006   echo "$as_me:3006: \$? = $ac_status" >&5
3007   (exit $ac_status); }; }; then
3008   break
3009 else
3010   echo "$as_me: failed program was:" >&5
3011 cat conftest.$ac_ext >&5
3012 fi
3013 rm -f conftest.$ac_objext conftest.$ac_ext
3014 done
3015 rm -f conftest*
3016 if test -n "$ac_declaration"; then
3017   echo '#ifdef __cplusplus' >>confdefs.h
3018   echo $ac_declaration      >>confdefs.h
3019   echo '#endif'             >>confdefs.h
3020 fi
3021
3022 ac_ext=c
3023 ac_cpp='$CPP $CPPFLAGS'
3024 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3025 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3026 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3027 ac_main_return=return
3028
3029                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3030         if test "$CXX" = "g++" ; then
3031                 # Extract the first word of "g++", so it can be a program name with args.
3032 set dummy g++; ac_word=$2
3033 echo "$as_me:3033: checking for $ac_word" >&5
3034 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3035 if test "${ac_cv_path_CXX+set}" = set; then
3036   echo $ECHO_N "(cached) $ECHO_C" >&6
3037 else
3038   case $CXX in
3039   [\\/]* | ?:[\\/]*)
3040   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3041   ;;
3042   *)
3043   ac_save_IFS=$IFS; IFS=$ac_path_separator
3044 ac_dummy="$PATH"
3045 for ac_dir in $ac_dummy; do
3046   IFS=$ac_save_IFS
3047   test -z "$ac_dir" && ac_dir=.
3048   if $as_executable_p "$ac_dir/$ac_word"; then
3049    ac_cv_path_CXX="$ac_dir/$ac_word"
3050    echo "$as_me:3050: found $ac_dir/$ac_word" >&5
3051    break
3052 fi
3053 done
3054
3055   ;;
3056 esac
3057 fi
3058 CXX=$ac_cv_path_CXX
3059
3060 if test -n "$CXX"; then
3061   echo "$as_me:3061: result: $CXX" >&5
3062 echo "${ECHO_T}$CXX" >&6
3063 else
3064   echo "$as_me:3064: result: no" >&5
3065 echo "${ECHO_T}no" >&6
3066 fi
3067
3068         fi
3069         if test "$CXX" = "g++" ; then
3070                 { echo "$as_me:3070: WARNING: ignoring hardcoded g++" >&5
3071 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3072                 cf_with_cxx=no; CXX=""; GXX="";
3073         fi
3074 fi
3075
3076 GXX_VERSION=none
3077 if test "$GXX" = yes; then
3078         echo "$as_me:3078: checking version of g++" >&5
3079 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3080         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3081         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3082         echo "$as_me:3082: result: $GXX_VERSION" >&5
3083 echo "${ECHO_T}$GXX_VERSION" >&6
3084 fi
3085
3086 case $GXX_VERSION in
3087 1*|2.[0-6]*)
3088         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3089         # cf_cxx_library=no
3090         { echo "$as_me:3090: WARNING: templates do not work" >&5
3091 echo "$as_me: WARNING: templates do not work" >&2;}
3092         ;;
3093 esac
3094
3095 echo "$as_me:3095: checking if you want to build C++ binding and demo" >&5
3096 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3097
3098 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3099 if test "${with_cxx_binding+set}" = set; then
3100   withval="$with_cxx_binding"
3101   cf_with_cxx_binding=$withval
3102 else
3103   cf_with_cxx_binding=$cf_with_cxx
3104 fi;
3105 echo "$as_me:3105: result: $cf_with_cxx_binding" >&5
3106 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3107
3108 echo "$as_me:3108: checking if you want to build with Ada95" >&5
3109 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3110
3111 # Check whether --with-ada or --without-ada was given.
3112 if test "${with_ada+set}" = set; then
3113   withval="$with_ada"
3114   cf_with_ada=$withval
3115 else
3116   cf_with_ada=yes
3117 fi;
3118 echo "$as_me:3118: result: $cf_with_ada" >&5
3119 echo "${ECHO_T}$cf_with_ada" >&6
3120
3121 echo "$as_me:3121: checking if you want to install manpages" >&5
3122 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3123
3124 # Check whether --with-manpages or --without-manpages was given.
3125 if test "${with_manpages+set}" = set; then
3126   withval="$with_manpages"
3127   cf_with_manpages=$withval
3128 else
3129   cf_with_manpages=yes
3130 fi;
3131 echo "$as_me:3131: result: $cf_with_manpages" >&5
3132 echo "${ECHO_T}$cf_with_manpages" >&6
3133
3134 echo "$as_me:3134: checking if you want to build programs such as tic" >&5
3135 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3136
3137 # Check whether --with-progs or --without-progs was given.
3138 if test "${with_progs+set}" = set; then
3139   withval="$with_progs"
3140   cf_with_progs=$withval
3141 else
3142   cf_with_progs=yes
3143 fi;
3144 echo "$as_me:3144: result: $cf_with_progs" >&5
3145 echo "${ECHO_T}$cf_with_progs" >&6
3146
3147 echo "$as_me:3147: checking if you wish to install curses.h" >&5
3148 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3149
3150 # Check whether --with-curses-h or --without-curses-h was given.
3151 if test "${with_curses_h+set}" = set; then
3152   withval="$with_curses_h"
3153   with_curses_h=$withval
3154 else
3155   with_curses_h=yes
3156 fi;
3157 echo "$as_me:3157: result: $with_curses_h" >&5
3158 echo "${ECHO_T}$with_curses_h" >&6
3159
3160 modules_to_build="ncurses"
3161 if test "X$cf_with_progs" != Xno ; then
3162 modules_to_build="$modules_to_build progs tack"
3163 fi
3164 modules_to_build="$modules_to_build panel menu form"
3165
3166 test "$program_prefix" != NONE &&
3167   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3168 # Use a double $ so make ignores it.
3169 test "$program_suffix" != NONE &&
3170   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3171 # Double any \ or $.  echo might interpret backslashes.
3172 # By default was `s,x,x', remove it if useless.
3173 cat <<\_ACEOF >conftest.sed
3174 s/[\\$]/&&/g;s/;s,x,x,$//
3175 _ACEOF
3176 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3177 rm conftest.sed
3178
3179 for ac_prog in mawk gawk nawk awk
3180 do
3181   # Extract the first word of "$ac_prog", so it can be a program name with args.
3182 set dummy $ac_prog; ac_word=$2
3183 echo "$as_me:3183: checking for $ac_word" >&5
3184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3185 if test "${ac_cv_prog_AWK+set}" = set; then
3186   echo $ECHO_N "(cached) $ECHO_C" >&6
3187 else
3188   if test -n "$AWK"; then
3189   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3190 else
3191   ac_save_IFS=$IFS; IFS=$ac_path_separator
3192 ac_dummy="$PATH"
3193 for ac_dir in $ac_dummy; do
3194   IFS=$ac_save_IFS
3195   test -z "$ac_dir" && ac_dir=.
3196   $as_executable_p "$ac_dir/$ac_word" || continue
3197 ac_cv_prog_AWK="$ac_prog"
3198 echo "$as_me:3198: found $ac_dir/$ac_word" >&5
3199 break
3200 done
3201
3202 fi
3203 fi
3204 AWK=$ac_cv_prog_AWK
3205 if test -n "$AWK"; then
3206   echo "$as_me:3206: result: $AWK" >&5
3207 echo "${ECHO_T}$AWK" >&6
3208 else
3209   echo "$as_me:3209: result: no" >&5
3210 echo "${ECHO_T}no" >&6
3211 fi
3212
3213   test -n "$AWK" && break
3214 done
3215
3216 test -z "$AWK" && { { echo "$as_me:3216: error: No awk program found" >&5
3217 echo "$as_me: error: No awk program found" >&2;}
3218    { (exit 1); exit 1; }; }
3219
3220 echo "$as_me:3220: checking for egrep" >&5
3221 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3222 if test "${ac_cv_prog_egrep+set}" = set; then
3223   echo $ECHO_N "(cached) $ECHO_C" >&6
3224 else
3225   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3226     then ac_cv_prog_egrep='grep -E'
3227     else ac_cv_prog_egrep='egrep'
3228     fi
3229 fi
3230 echo "$as_me:3230: result: $ac_cv_prog_egrep" >&5
3231 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3232  EGREP=$ac_cv_prog_egrep
3233
3234 test -z "$EGREP" && { { echo "$as_me:3234: error: No egrep program found" >&5
3235 echo "$as_me: error: No egrep program found" >&2;}
3236    { (exit 1); exit 1; }; }
3237
3238 # Find a good install program.  We prefer a C program (faster),
3239 # so one script is as good as another.  But avoid the broken or
3240 # incompatible versions:
3241 # SysV /etc/install, /usr/sbin/install
3242 # SunOS /usr/etc/install
3243 # IRIX /sbin/install
3244 # AIX /bin/install
3245 # AmigaOS /C/install, which installs bootblocks on floppy discs
3246 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3247 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3248 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3249 # ./install, which can be erroneously created by make from ./install.sh.
3250 echo "$as_me:3250: checking for a BSD compatible install" >&5
3251 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3252 if test -z "$INSTALL"; then
3253 if test "${ac_cv_path_install+set}" = set; then
3254   echo $ECHO_N "(cached) $ECHO_C" >&6
3255 else
3256     ac_save_IFS=$IFS; IFS=$ac_path_separator
3257   for ac_dir in $PATH; do
3258     IFS=$ac_save_IFS
3259     # Account for people who put trailing slashes in PATH elements.
3260     case $ac_dir/ in
3261     / | ./ | .// | /cC/* \
3262     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3263     | /usr/ucb/* ) ;;
3264     *)
3265       # OSF1 and SCO ODT 3.0 have their own names for install.
3266       # Don't use installbsd from OSF since it installs stuff as root
3267       # by default.
3268       for ac_prog in ginstall scoinst install; do
3269         if $as_executable_p "$ac_dir/$ac_prog"; then
3270           if test $ac_prog = install &&
3271             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3272             # AIX install.  It has an incompatible calling convention.
3273             :
3274           elif test $ac_prog = install &&
3275             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3276             # program-specific install script used by HP pwplus--don't use.
3277             :
3278           else
3279             ac_cv_path_install="$ac_dir/$ac_prog -c"
3280             break 2
3281           fi
3282         fi
3283       done
3284       ;;
3285     esac
3286   done
3287
3288 fi
3289   if test "${ac_cv_path_install+set}" = set; then
3290     INSTALL=$ac_cv_path_install
3291   else
3292     # As a last resort, use the slow shell script.  We don't cache a
3293     # path for INSTALL within a source directory, because that will
3294     # break other packages using the cache if that directory is
3295     # removed, or if the path is relative.
3296     INSTALL=$ac_install_sh
3297   fi
3298 fi
3299 echo "$as_me:3299: result: $INSTALL" >&5
3300 echo "${ECHO_T}$INSTALL" >&6
3301
3302 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3303 # It thinks the first close brace ends the variable substitution.
3304 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3305
3306 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3307
3308 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3309
3310 case $INSTALL in
3311 /*)
3312   ;;
3313 *)
3314   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3315   test -z "$cf_dir" && cf_dir=.
3316   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3317   ;;
3318 esac
3319
3320 for ac_prog in tdlint lint alint
3321 do
3322   # Extract the first word of "$ac_prog", so it can be a program name with args.
3323 set dummy $ac_prog; ac_word=$2
3324 echo "$as_me:3324: checking for $ac_word" >&5
3325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3326 if test "${ac_cv_prog_LINT+set}" = set; then
3327   echo $ECHO_N "(cached) $ECHO_C" >&6
3328 else
3329   if test -n "$LINT"; then
3330   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3331 else
3332   ac_save_IFS=$IFS; IFS=$ac_path_separator
3333 ac_dummy="$PATH"
3334 for ac_dir in $ac_dummy; do
3335   IFS=$ac_save_IFS
3336   test -z "$ac_dir" && ac_dir=.
3337   $as_executable_p "$ac_dir/$ac_word" || continue
3338 ac_cv_prog_LINT="$ac_prog"
3339 echo "$as_me:3339: found $ac_dir/$ac_word" >&5
3340 break
3341 done
3342
3343 fi
3344 fi
3345 LINT=$ac_cv_prog_LINT
3346 if test -n "$LINT"; then
3347   echo "$as_me:3347: result: $LINT" >&5
3348 echo "${ECHO_T}$LINT" >&6
3349 else
3350   echo "$as_me:3350: result: no" >&5
3351 echo "${ECHO_T}no" >&6
3352 fi
3353
3354   test -n "$LINT" && break
3355 done
3356
3357 echo "$as_me:3357: checking whether ln -s works" >&5
3358 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3359 LN_S=$as_ln_s
3360 if test "$LN_S" = "ln -s"; then
3361   echo "$as_me:3361: result: yes" >&5
3362 echo "${ECHO_T}yes" >&6
3363 else
3364   echo "$as_me:3364: result: no, using $LN_S" >&5
3365 echo "${ECHO_T}no, using $LN_S" >&6
3366 fi
3367
3368 echo "$as_me:3368: checking for long file names" >&5
3369 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3370 if test "${ac_cv_sys_long_file_names+set}" = set; then
3371   echo $ECHO_N "(cached) $ECHO_C" >&6
3372 else
3373   ac_cv_sys_long_file_names=yes
3374 # Test for long file names in all the places we know might matter:
3375 #      .                the current directory, where building will happen
3376 #      $prefix/lib      where we will be installing things
3377 #      $exec_prefix/lib likewise
3378 # eval it to expand exec_prefix.
3379 #      $TMPDIR          if set, where it might want to write temporary files
3380 # if $TMPDIR is not set:
3381 #      /tmp             where it might want to write temporary files
3382 #      /var/tmp         likewise
3383 #      /usr/tmp         likewise
3384 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3385   ac_tmpdirs=$TMPDIR
3386 else
3387   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3388 fi
3389 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3390   test -d $ac_dir || continue
3391   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3392   ac_xdir=$ac_dir/cf$$
3393   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3394   ac_tf1=$ac_xdir/conftest9012345
3395   ac_tf2=$ac_xdir/conftest9012346
3396   (echo 1 >$ac_tf1) 2>/dev/null
3397   (echo 2 >$ac_tf2) 2>/dev/null
3398   ac_val=`cat $ac_tf1 2>/dev/null`
3399   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3400     ac_cv_sys_long_file_names=no
3401     rm -rf $ac_xdir 2>/dev/null
3402     break
3403   fi
3404   rm -rf $ac_xdir 2>/dev/null
3405 done
3406 fi
3407 echo "$as_me:3407: result: $ac_cv_sys_long_file_names" >&5
3408 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3409 if test $ac_cv_sys_long_file_names = yes; then
3410
3411 cat >>confdefs.h <<\EOF
3412 #define HAVE_LONG_FILE_NAMES 1
3413 EOF
3414
3415 fi
3416
3417 # if we find pkg-config, check if we should install the ".pc" files.
3418
3419 echo "$as_me:3419: checking if you want to use pkg-config" >&5
3420 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3421
3422 # Check whether --with-pkg-config or --without-pkg-config was given.
3423 if test "${with_pkg_config+set}" = set; then
3424   withval="$with_pkg_config"
3425   cf_pkg_config=$withval
3426 else
3427   cf_pkg_config=yes
3428 fi;
3429 echo "$as_me:3429: result: $cf_pkg_config" >&5
3430 echo "${ECHO_T}$cf_pkg_config" >&6
3431
3432 case $cf_pkg_config in #(vi
3433 no) #(vi
3434         PKG_CONFIG=none
3435         ;;
3436 yes) #(vi
3437         # Extract the first word of "pkg-config", so it can be a program name with args.
3438 set dummy pkg-config; ac_word=$2
3439 echo "$as_me:3439: checking for $ac_word" >&5
3440 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3441 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3442   echo $ECHO_N "(cached) $ECHO_C" >&6
3443 else
3444   case $PKG_CONFIG in
3445   [\\/]* | ?:[\\/]*)
3446   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3447   ;;
3448   *)
3449   ac_save_IFS=$IFS; IFS=$ac_path_separator
3450 ac_dummy="$PATH"
3451 for ac_dir in $ac_dummy; do
3452   IFS=$ac_save_IFS
3453   test -z "$ac_dir" && ac_dir=.
3454   if $as_executable_p "$ac_dir/$ac_word"; then
3455    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3456    echo "$as_me:3456: found $ac_dir/$ac_word" >&5
3457    break
3458 fi
3459 done
3460
3461   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3462   ;;
3463 esac
3464 fi
3465 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3466
3467 if test -n "$PKG_CONFIG"; then
3468   echo "$as_me:3468: result: $PKG_CONFIG" >&5
3469 echo "${ECHO_T}$PKG_CONFIG" >&6
3470 else
3471   echo "$as_me:3471: result: no" >&5
3472 echo "${ECHO_T}no" >&6
3473 fi
3474
3475         ;;
3476 *)
3477         PKG_CONFIG=$withval
3478         ;;
3479 esac
3480
3481 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3482 if test "$PKG_CONFIG" != none ; then
3483
3484 if test "x$prefix" != xNONE; then
3485   cf_path_syntax="$prefix"
3486 else
3487   cf_path_syntax="$ac_default_prefix"
3488 fi
3489
3490 case ".$PKG_CONFIG" in #(vi
3491 .\$\(*\)*|.\'*\'*) #(vi
3492   ;;
3493 ..|./*|.\\*) #(vi
3494   ;;
3495 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3496   ;;
3497 .\${*prefix}*) #(vi
3498   eval PKG_CONFIG="$PKG_CONFIG"
3499   case ".$PKG_CONFIG" in #(vi
3500   .NONE/*)
3501     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3502     ;;
3503   esac
3504   ;; #(vi
3505 .no|.NONE/*)
3506   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3507   ;;
3508 *)
3509   { { echo "$as_me:3509: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3510 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3511    { (exit 1); exit 1; }; }
3512   ;;
3513 esac
3514
3515 fi
3516
3517 if test "$PKG_CONFIG" != no ; then
3518         echo "$as_me:3518: checking if we should install .pc files for $PKG_CONFIG" >&5
3519 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3520
3521         # Leave this as something that can be overridden in the environment.
3522         if test -z "$PKG_CONFIG_LIBDIR" ; then
3523                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3524         fi
3525
3526         if test -d "$PKG_CONFIG_LIBDIR" ; then
3527
3528 # Check whether --enable-pc-files or --disable-pc-files was given.
3529 if test "${enable_pc_files+set}" = set; then
3530   enableval="$enable_pc_files"
3531   enable_pc_files=$enableval
3532 else
3533   enable_pc_files=no
3534 fi;
3535                 echo "$as_me:3535: result: $enable_pc_files" >&5
3536 echo "${ECHO_T}$enable_pc_files" >&6
3537         else
3538                 echo "$as_me:3538: result: no" >&5
3539 echo "${ECHO_T}no" >&6
3540                 { echo "$as_me:3540: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3541 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3542                 enable_pc_files=no
3543         fi
3544 fi
3545
3546 echo "$as_me:3546: checking if we should assume mixed-case filenames" >&5
3547 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3548
3549 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3550 if test "${enable_mixed_case+set}" = set; then
3551   enableval="$enable_mixed_case"
3552   enable_mixedcase=$enableval
3553 else
3554   enable_mixedcase=auto
3555 fi;
3556 echo "$as_me:3556: result: $enable_mixedcase" >&5
3557 echo "${ECHO_T}$enable_mixedcase" >&6
3558 if test "$enable_mixedcase" = "auto" ; then
3559
3560 echo "$as_me:3560: checking if filesystem supports mixed-case filenames" >&5
3561 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3562 if test "${cf_cv_mixedcase+set}" = set; then
3563   echo $ECHO_N "(cached) $ECHO_C" >&6
3564 else
3565
3566 if test "$cross_compiling" = yes ; then
3567         case $target_alias in #(vi
3568         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3569                 cf_cv_mixedcase=no
3570                 ;;
3571         *)
3572                 cf_cv_mixedcase=yes
3573                 ;;
3574         esac
3575 else
3576         rm -f conftest CONFTEST
3577         echo test >conftest
3578         if test -f CONFTEST ; then
3579                 cf_cv_mixedcase=no
3580         else
3581                 cf_cv_mixedcase=yes
3582         fi
3583         rm -f conftest CONFTEST
3584 fi
3585
3586 fi
3587 echo "$as_me:3587: result: $cf_cv_mixedcase" >&5
3588 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3589 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3590 #define MIXEDCASE_FILENAMES 1
3591 EOF
3592
3593 else
3594     cf_cv_mixedcase=$enable_mixedcase
3595     if test "$enable_mixedcase" = "yes" ; then
3596         cat >>confdefs.h <<\EOF
3597 #define MIXEDCASE_FILENAMES 1
3598 EOF
3599
3600     fi
3601 fi
3602
3603 # do this after mixed-case option (tags/TAGS is not as important as tic).
3604 echo "$as_me:3604: checking whether ${MAKE-make} sets \${MAKE}" >&5
3605 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3606 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3607 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3608   echo $ECHO_N "(cached) $ECHO_C" >&6
3609 else
3610   cat >conftest.make <<\EOF
3611 all:
3612         @echo 'ac_maketemp="${MAKE}"'
3613 EOF
3614 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3615 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3616 if test -n "$ac_maketemp"; then
3617   eval ac_cv_prog_make_${ac_make}_set=yes
3618 else
3619   eval ac_cv_prog_make_${ac_make}_set=no
3620 fi
3621 rm -f conftest.make
3622 fi
3623 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3624   echo "$as_me:3624: result: yes" >&5
3625 echo "${ECHO_T}yes" >&6
3626   SET_MAKE=
3627 else
3628   echo "$as_me:3628: result: no" >&5
3629 echo "${ECHO_T}no" >&6
3630   SET_MAKE="MAKE=${MAKE-make}"
3631 fi
3632
3633 # Extract the first word of "ctags", so it can be a program name with args.
3634 set dummy ctags; ac_word=$2
3635 echo "$as_me:3635: checking for $ac_word" >&5
3636 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3637 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3638   echo $ECHO_N "(cached) $ECHO_C" >&6
3639 else
3640   if test -n "$MAKE_LOWER_TAGS"; then
3641   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3642 else
3643   ac_save_IFS=$IFS; IFS=$ac_path_separator
3644 ac_dummy="$PATH"
3645 for ac_dir in $ac_dummy; do
3646   IFS=$ac_save_IFS
3647   test -z "$ac_dir" && ac_dir=.
3648   $as_executable_p "$ac_dir/$ac_word" || continue
3649 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3650 echo "$as_me:3650: found $ac_dir/$ac_word" >&5
3651 break
3652 done
3653
3654   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3655 fi
3656 fi
3657 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3658 if test -n "$MAKE_LOWER_TAGS"; then
3659   echo "$as_me:3659: result: $MAKE_LOWER_TAGS" >&5
3660 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3661 else
3662   echo "$as_me:3662: result: no" >&5
3663 echo "${ECHO_T}no" >&6
3664 fi
3665
3666 if test "$cf_cv_mixedcase" = yes ; then
3667         # Extract the first word of "etags", so it can be a program name with args.
3668 set dummy etags; ac_word=$2
3669 echo "$as_me:3669: checking for $ac_word" >&5
3670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3671 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3672   echo $ECHO_N "(cached) $ECHO_C" >&6
3673 else
3674   if test -n "$MAKE_UPPER_TAGS"; then
3675   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3676 else
3677   ac_save_IFS=$IFS; IFS=$ac_path_separator
3678 ac_dummy="$PATH"
3679 for ac_dir in $ac_dummy; do
3680   IFS=$ac_save_IFS
3681   test -z "$ac_dir" && ac_dir=.
3682   $as_executable_p "$ac_dir/$ac_word" || continue
3683 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3684 echo "$as_me:3684: found $ac_dir/$ac_word" >&5
3685 break
3686 done
3687
3688   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3689 fi
3690 fi
3691 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3692 if test -n "$MAKE_UPPER_TAGS"; then
3693   echo "$as_me:3693: result: $MAKE_UPPER_TAGS" >&5
3694 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3695 else
3696   echo "$as_me:3696: result: no" >&5
3697 echo "${ECHO_T}no" >&6
3698 fi
3699
3700 else
3701         MAKE_UPPER_TAGS=no
3702 fi
3703
3704 if test "$MAKE_UPPER_TAGS" = yes ; then
3705         MAKE_UPPER_TAGS=
3706 else
3707         MAKE_UPPER_TAGS="#"
3708 fi
3709
3710 if test "$MAKE_LOWER_TAGS" = yes ; then
3711         MAKE_LOWER_TAGS=
3712 else
3713         MAKE_LOWER_TAGS="#"
3714 fi
3715
3716 echo "$as_me:3716: checking for makeflags variable" >&5
3717 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3718 if test "${cf_cv_makeflags+set}" = set; then
3719   echo $ECHO_N "(cached) $ECHO_C" >&6
3720 else
3721
3722         cf_cv_makeflags=''
3723         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3724         do
3725                 cat >cf_makeflags.tmp <<CF_EOF
3726 SHELL = /bin/sh
3727 all :
3728         @ echo '.$cf_option'
3729 CF_EOF
3730                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3731                 case "$cf_result" in
3732                 .*k)
3733                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3734                         case "$cf_result" in
3735                         .*CC=*) cf_cv_makeflags=
3736                                 ;;
3737                         *)      cf_cv_makeflags=$cf_option
3738                                 ;;
3739                         esac
3740                         break
3741                         ;;
3742                 .-)     ;;
3743                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3744                         ;;
3745                 esac
3746         done
3747         rm -f cf_makeflags.tmp
3748
3749 fi
3750 echo "$as_me:3750: result: $cf_cv_makeflags" >&5
3751 echo "${ECHO_T}$cf_cv_makeflags" >&6
3752
3753 if test -n "$ac_tool_prefix"; then
3754   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3755 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3756 echo "$as_me:3756: checking for $ac_word" >&5
3757 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3758 if test "${ac_cv_prog_RANLIB+set}" = set; then
3759   echo $ECHO_N "(cached) $ECHO_C" >&6
3760 else
3761   if test -n "$RANLIB"; then
3762   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3763 else
3764   ac_save_IFS=$IFS; IFS=$ac_path_separator
3765 ac_dummy="$PATH"
3766 for ac_dir in $ac_dummy; do
3767   IFS=$ac_save_IFS
3768   test -z "$ac_dir" && ac_dir=.
3769   $as_executable_p "$ac_dir/$ac_word" || continue
3770 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3771 echo "$as_me:3771: found $ac_dir/$ac_word" >&5
3772 break
3773 done
3774
3775 fi
3776 fi
3777 RANLIB=$ac_cv_prog_RANLIB
3778 if test -n "$RANLIB"; then
3779   echo "$as_me:3779: result: $RANLIB" >&5
3780 echo "${ECHO_T}$RANLIB" >&6
3781 else
3782   echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784 fi
3785
3786 fi
3787 if test -z "$ac_cv_prog_RANLIB"; then
3788   ac_ct_RANLIB=$RANLIB
3789   # Extract the first word of "ranlib", so it can be a program name with args.
3790 set dummy ranlib; ac_word=$2
3791 echo "$as_me:3791: checking for $ac_word" >&5
3792 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3793 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3794   echo $ECHO_N "(cached) $ECHO_C" >&6
3795 else
3796   if test -n "$ac_ct_RANLIB"; then
3797   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3798 else
3799   ac_save_IFS=$IFS; IFS=$ac_path_separator
3800 ac_dummy="$PATH"
3801 for ac_dir in $ac_dummy; do
3802   IFS=$ac_save_IFS
3803   test -z "$ac_dir" && ac_dir=.
3804   $as_executable_p "$ac_dir/$ac_word" || continue
3805 ac_cv_prog_ac_ct_RANLIB="ranlib"
3806 echo "$as_me:3806: found $ac_dir/$ac_word" >&5
3807 break
3808 done
3809
3810   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3811 fi
3812 fi
3813 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3814 if test -n "$ac_ct_RANLIB"; then
3815   echo "$as_me:3815: result: $ac_ct_RANLIB" >&5
3816 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3817 else
3818   echo "$as_me:3818: result: no" >&5
3819 echo "${ECHO_T}no" >&6
3820 fi
3821
3822   RANLIB=$ac_ct_RANLIB
3823 else
3824   RANLIB="$ac_cv_prog_RANLIB"
3825 fi
3826
3827 if test -n "$ac_tool_prefix"; then
3828   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3829 set dummy ${ac_tool_prefix}ld; ac_word=$2
3830 echo "$as_me:3830: checking for $ac_word" >&5
3831 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3832 if test "${ac_cv_prog_LD+set}" = set; then
3833   echo $ECHO_N "(cached) $ECHO_C" >&6
3834 else
3835   if test -n "$LD"; then
3836   ac_cv_prog_LD="$LD" # Let the user override the test.
3837 else
3838   ac_save_IFS=$IFS; IFS=$ac_path_separator
3839 ac_dummy="$PATH"
3840 for ac_dir in $ac_dummy; do
3841   IFS=$ac_save_IFS
3842   test -z "$ac_dir" && ac_dir=.
3843   $as_executable_p "$ac_dir/$ac_word" || continue
3844 ac_cv_prog_LD="${ac_tool_prefix}ld"
3845 echo "$as_me:3845: found $ac_dir/$ac_word" >&5
3846 break
3847 done
3848
3849 fi
3850 fi
3851 LD=$ac_cv_prog_LD
3852 if test -n "$LD"; then
3853   echo "$as_me:3853: result: $LD" >&5
3854 echo "${ECHO_T}$LD" >&6
3855 else
3856   echo "$as_me:3856: result: no" >&5
3857 echo "${ECHO_T}no" >&6
3858 fi
3859
3860 fi
3861 if test -z "$ac_cv_prog_LD"; then
3862   ac_ct_LD=$LD
3863   # Extract the first word of "ld", so it can be a program name with args.
3864 set dummy ld; ac_word=$2
3865 echo "$as_me:3865: checking for $ac_word" >&5
3866 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3867 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3868   echo $ECHO_N "(cached) $ECHO_C" >&6
3869 else
3870   if test -n "$ac_ct_LD"; then
3871   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3872 else
3873   ac_save_IFS=$IFS; IFS=$ac_path_separator
3874 ac_dummy="$PATH"
3875 for ac_dir in $ac_dummy; do
3876   IFS=$ac_save_IFS
3877   test -z "$ac_dir" && ac_dir=.
3878   $as_executable_p "$ac_dir/$ac_word" || continue
3879 ac_cv_prog_ac_ct_LD="ld"
3880 echo "$as_me:3880: found $ac_dir/$ac_word" >&5
3881 break
3882 done
3883
3884   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3885 fi
3886 fi
3887 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3888 if test -n "$ac_ct_LD"; then
3889   echo "$as_me:3889: result: $ac_ct_LD" >&5
3890 echo "${ECHO_T}$ac_ct_LD" >&6
3891 else
3892   echo "$as_me:3892: result: no" >&5
3893 echo "${ECHO_T}no" >&6
3894 fi
3895
3896   LD=$ac_ct_LD
3897 else
3898   LD="$ac_cv_prog_LD"
3899 fi
3900
3901 if test -n "$ac_tool_prefix"; then
3902   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3903 set dummy ${ac_tool_prefix}ar; ac_word=$2
3904 echo "$as_me:3904: checking for $ac_word" >&5
3905 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3906 if test "${ac_cv_prog_AR+set}" = set; then
3907   echo $ECHO_N "(cached) $ECHO_C" >&6
3908 else
3909   if test -n "$AR"; then
3910   ac_cv_prog_AR="$AR" # Let the user override the test.
3911 else
3912   ac_save_IFS=$IFS; IFS=$ac_path_separator
3913 ac_dummy="$PATH"
3914 for ac_dir in $ac_dummy; do
3915   IFS=$ac_save_IFS
3916   test -z "$ac_dir" && ac_dir=.
3917   $as_executable_p "$ac_dir/$ac_word" || continue
3918 ac_cv_prog_AR="${ac_tool_prefix}ar"
3919 echo "$as_me:3919: found $ac_dir/$ac_word" >&5
3920 break
3921 done
3922
3923 fi
3924 fi
3925 AR=$ac_cv_prog_AR
3926 if test -n "$AR"; then
3927   echo "$as_me:3927: result: $AR" >&5
3928 echo "${ECHO_T}$AR" >&6
3929 else
3930   echo "$as_me:3930: result: no" >&5
3931 echo "${ECHO_T}no" >&6
3932 fi
3933
3934 fi
3935 if test -z "$ac_cv_prog_AR"; then
3936   ac_ct_AR=$AR
3937   # Extract the first word of "ar", so it can be a program name with args.
3938 set dummy ar; ac_word=$2
3939 echo "$as_me:3939: checking for $ac_word" >&5
3940 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3941 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3942   echo $ECHO_N "(cached) $ECHO_C" >&6
3943 else
3944   if test -n "$ac_ct_AR"; then
3945   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3946 else
3947   ac_save_IFS=$IFS; IFS=$ac_path_separator
3948 ac_dummy="$PATH"
3949 for ac_dir in $ac_dummy; do
3950   IFS=$ac_save_IFS
3951   test -z "$ac_dir" && ac_dir=.
3952   $as_executable_p "$ac_dir/$ac_word" || continue
3953 ac_cv_prog_ac_ct_AR="ar"
3954 echo "$as_me:3954: found $ac_dir/$ac_word" >&5
3955 break
3956 done
3957
3958   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3959 fi
3960 fi
3961 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3962 if test -n "$ac_ct_AR"; then
3963   echo "$as_me:3963: result: $ac_ct_AR" >&5
3964 echo "${ECHO_T}$ac_ct_AR" >&6
3965 else
3966   echo "$as_me:3966: result: no" >&5
3967 echo "${ECHO_T}no" >&6
3968 fi
3969
3970   AR=$ac_ct_AR
3971 else
3972   AR="$ac_cv_prog_AR"
3973 fi
3974
3975 if test -n "$ac_tool_prefix"; then
3976   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3977 set dummy ${ac_tool_prefix}ar; ac_word=$2
3978 echo "$as_me:3978: checking for $ac_word" >&5
3979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3980 if test "${ac_cv_prog_AR+set}" = set; then
3981   echo $ECHO_N "(cached) $ECHO_C" >&6
3982 else
3983   if test -n "$AR"; then
3984   ac_cv_prog_AR="$AR" # Let the user override the test.
3985 else
3986   ac_save_IFS=$IFS; IFS=$ac_path_separator
3987 ac_dummy="$PATH"
3988 for ac_dir in $ac_dummy; do
3989   IFS=$ac_save_IFS
3990   test -z "$ac_dir" && ac_dir=.
3991   $as_executable_p "$ac_dir/$ac_word" || continue
3992 ac_cv_prog_AR="${ac_tool_prefix}ar"
3993 echo "$as_me:3993: found $ac_dir/$ac_word" >&5
3994 break
3995 done
3996
3997 fi
3998 fi
3999 AR=$ac_cv_prog_AR
4000 if test -n "$AR"; then
4001   echo "$as_me:4001: result: $AR" >&5
4002 echo "${ECHO_T}$AR" >&6
4003 else
4004   echo "$as_me:4004: result: no" >&5
4005 echo "${ECHO_T}no" >&6
4006 fi
4007
4008 fi
4009 if test -z "$ac_cv_prog_AR"; then
4010   ac_ct_AR=$AR
4011   # Extract the first word of "ar", so it can be a program name with args.
4012 set dummy ar; ac_word=$2
4013 echo "$as_me:4013: checking for $ac_word" >&5
4014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4015 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4016   echo $ECHO_N "(cached) $ECHO_C" >&6
4017 else
4018   if test -n "$ac_ct_AR"; then
4019   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4020 else
4021   ac_save_IFS=$IFS; IFS=$ac_path_separator
4022 ac_dummy="$PATH"
4023 for ac_dir in $ac_dummy; do
4024   IFS=$ac_save_IFS
4025   test -z "$ac_dir" && ac_dir=.
4026   $as_executable_p "$ac_dir/$ac_word" || continue
4027 ac_cv_prog_ac_ct_AR="ar"
4028 echo "$as_me:4028: found $ac_dir/$ac_word" >&5
4029 break
4030 done
4031
4032   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4033 fi
4034 fi
4035 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4036 if test -n "$ac_ct_AR"; then
4037   echo "$as_me:4037: result: $ac_ct_AR" >&5
4038 echo "${ECHO_T}$ac_ct_AR" >&6
4039 else
4040   echo "$as_me:4040: result: no" >&5
4041 echo "${ECHO_T}no" >&6
4042 fi
4043
4044   AR=$ac_ct_AR
4045 else
4046   AR="$ac_cv_prog_AR"
4047 fi
4048
4049 echo "$as_me:4049: checking for options to update archives" >&5
4050 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4051 if test "${cf_cv_ar_flags+set}" = set; then
4052   echo $ECHO_N "(cached) $ECHO_C" >&6
4053 else
4054
4055         cf_cv_ar_flags=unknown
4056         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4057         do
4058                 rm -f conftest.$ac_cv_objext
4059                 rm -f conftest.a
4060
4061                 cat >conftest.$ac_ext <<EOF
4062 #line 4062 "configure"
4063 int     testdata[3] = { 123, 456, 789 };
4064 EOF
4065                 if { (eval echo "$as_me:4065: \"$ac_compile\"") >&5
4066   (eval $ac_compile) 2>&5
4067   ac_status=$?
4068   echo "$as_me:4068: \$? = $ac_status" >&5
4069   (exit $ac_status); } ; then
4070                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4071                         if test -f conftest.a ; then
4072                                 cf_cv_ar_flags=$cf_ar_flags
4073                                 break
4074                         fi
4075                 else
4076                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4077
4078 echo "${as_me-configure}:4078: testing cannot compile test-program ..." 1>&5
4079
4080                         break
4081                 fi
4082         done
4083         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4084
4085 fi
4086 echo "$as_me:4086: result: $cf_cv_ar_flags" >&5
4087 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4088 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4089 ARFLAGS=$cf_cv_ar_flags
4090
4091 echo "$as_me:4091: checking if you have specified an install-prefix" >&5
4092 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4093
4094 # Check whether --with-install-prefix or --without-install-prefix was given.
4095 if test "${with_install_prefix+set}" = set; then
4096   withval="$with_install_prefix"
4097   case "$withval" in #(vi
4098         yes|no) #(vi
4099                 ;;
4100         *)      DESTDIR="$withval"
4101                 ;;
4102         esac
4103 fi;
4104 echo "$as_me:4104: result: $DESTDIR" >&5
4105 echo "${ECHO_T}$DESTDIR" >&6
4106
4107 ###############################################################################
4108
4109 # If we're cross-compiling, allow the user to override the tools and their
4110 # options.  The configure script is oriented toward identifying the host
4111 # compiler, etc., but we need a build compiler to generate parts of the source.
4112
4113 if test "$cross_compiling" = yes ; then
4114
4115         # defaults that we might want to override
4116         : ${BUILD_CFLAGS:=''}
4117         : ${BUILD_CPPFLAGS:=''}
4118         : ${BUILD_LDFLAGS:=''}
4119         : ${BUILD_LIBS:=''}
4120         : ${BUILD_EXEEXT:='$x'}
4121         : ${BUILD_OBJEXT:='o'}
4122
4123 # Check whether --with-build-cc or --without-build-cc was given.
4124 if test "${with_build_cc+set}" = set; then
4125   withval="$with_build_cc"
4126   BUILD_CC="$withval"
4127 else
4128   for ac_prog in gcc cc cl
4129 do
4130   # Extract the first word of "$ac_prog", so it can be a program name with args.
4131 set dummy $ac_prog; ac_word=$2
4132 echo "$as_me:4132: checking for $ac_word" >&5
4133 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4134 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4135   echo $ECHO_N "(cached) $ECHO_C" >&6
4136 else
4137   if test -n "$BUILD_CC"; then
4138   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4139 else
4140   ac_save_IFS=$IFS; IFS=$ac_path_separator
4141 ac_dummy="$PATH"
4142 for ac_dir in $ac_dummy; do
4143   IFS=$ac_save_IFS
4144   test -z "$ac_dir" && ac_dir=.
4145   $as_executable_p "$ac_dir/$ac_word" || continue
4146 ac_cv_prog_BUILD_CC="$ac_prog"
4147 echo "$as_me:4147: found $ac_dir/$ac_word" >&5
4148 break
4149 done
4150
4151 fi
4152 fi
4153 BUILD_CC=$ac_cv_prog_BUILD_CC
4154 if test -n "$BUILD_CC"; then
4155   echo "$as_me:4155: result: $BUILD_CC" >&5
4156 echo "${ECHO_T}$BUILD_CC" >&6
4157 else
4158   echo "$as_me:4158: result: no" >&5
4159 echo "${ECHO_T}no" >&6
4160 fi
4161
4162   test -n "$BUILD_CC" && break
4163 done
4164
4165 fi;
4166         echo "$as_me:4166: checking for native build C compiler" >&5
4167 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4168         echo "$as_me:4168: result: $BUILD_CC" >&5
4169 echo "${ECHO_T}$BUILD_CC" >&6
4170
4171         echo "$as_me:4171: checking for native build C preprocessor" >&5
4172 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4173
4174 # Check whether --with-build-cpp or --without-build-cpp was given.
4175 if test "${with_build_cpp+set}" = set; then
4176   withval="$with_build_cpp"
4177   BUILD_CPP="$withval"
4178 else
4179   BUILD_CPP='${BUILD_CC} -E'
4180 fi;
4181         echo "$as_me:4181: result: $BUILD_CPP" >&5
4182 echo "${ECHO_T}$BUILD_CPP" >&6
4183
4184         echo "$as_me:4184: checking for native build C flags" >&5
4185 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4186
4187 # Check whether --with-build-cflags or --without-build-cflags was given.
4188 if test "${with_build_cflags+set}" = set; then
4189   withval="$with_build_cflags"
4190   BUILD_CFLAGS="$withval"
4191 fi;
4192         echo "$as_me:4192: result: $BUILD_CFLAGS" >&5
4193 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4194
4195         echo "$as_me:4195: checking for native build C preprocessor-flags" >&5
4196 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4197
4198 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4199 if test "${with_build_cppflags+set}" = set; then
4200   withval="$with_build_cppflags"
4201   BUILD_CPPFLAGS="$withval"
4202 fi;
4203         echo "$as_me:4203: result: $BUILD_CPPFLAGS" >&5
4204 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4205
4206         echo "$as_me:4206: checking for native build linker-flags" >&5
4207 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4208
4209 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4210 if test "${with_build_ldflags+set}" = set; then
4211   withval="$with_build_ldflags"
4212   BUILD_LDFLAGS="$withval"
4213 fi;
4214         echo "$as_me:4214: result: $BUILD_LDFLAGS" >&5
4215 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4216
4217         echo "$as_me:4217: checking for native build linker-libraries" >&5
4218 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4219
4220 # Check whether --with-build-libs or --without-build-libs was given.
4221 if test "${with_build_libs+set}" = set; then
4222   withval="$with_build_libs"
4223   BUILD_LIBS="$withval"
4224 fi;
4225         echo "$as_me:4225: result: $BUILD_LIBS" >&5
4226 echo "${ECHO_T}$BUILD_LIBS" >&6
4227
4228         # this assumes we're on Unix.
4229         BUILD_EXEEXT=
4230         BUILD_OBJEXT=o
4231
4232         : ${BUILD_CC:='${CC}'}
4233
4234         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4235                 { { echo "$as_me:4235: error: Cross-build requires two compilers.
4236 Use --with-build-cc to specify the native compiler." >&5
4237 echo "$as_me: error: Cross-build requires two compilers.
4238 Use --with-build-cc to specify the native compiler." >&2;}
4239    { (exit 1); exit 1; }; }
4240         fi
4241
4242 else
4243         : ${BUILD_CC:='${CC}'}
4244         : ${BUILD_CPP:='${CPP}'}
4245         : ${BUILD_CFLAGS:='${CFLAGS}'}
4246         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4247         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4248         : ${BUILD_LIBS:='${LIBS}'}
4249         : ${BUILD_EXEEXT:='$x'}
4250         : ${BUILD_OBJEXT:='o'}
4251 fi
4252
4253 ###############################################################################
4254
4255 ### Options to allow the user to specify the set of libraries which are used.
4256 ### Use "--without-normal --with-shared" to allow the default model to be
4257 ### shared, for example.
4258 cf_list_models=""
4259
4260 LIBTOOL=
4261
4262 # common library maintenance symbols that are convenient for libtool scripts:
4263 LIB_CREATE='${AR} -cr'
4264 LIB_OBJECT='${OBJECTS}'
4265 LIB_SUFFIX=.a
4266 LIB_PREP="$RANLIB"
4267
4268 # symbols used to prop libtool up to enable it to determine what it should be
4269 # doing:
4270 LIB_CLEAN=
4271 LIB_COMPILE=
4272 LIB_LINK='${CC}'
4273 LIB_INSTALL=
4274 LIB_UNINSTALL=
4275
4276 echo "$as_me:4276: checking if you want to build libraries with libtool" >&5
4277 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4278
4279 # Check whether --with-libtool or --without-libtool was given.
4280 if test "${with_libtool+set}" = set; then
4281   withval="$with_libtool"
4282   with_libtool=$withval
4283 else
4284   with_libtool=no
4285 fi;
4286 echo "$as_me:4286: result: $with_libtool" >&5
4287 echo "${ECHO_T}$with_libtool" >&6
4288 if test "$with_libtool" != "no"; then
4289
4290         if test "$with_libtool" != "yes" ; then
4291
4292 if test "x$prefix" != xNONE; then
4293   cf_path_syntax="$prefix"
4294 else
4295   cf_path_syntax="$ac_default_prefix"
4296 fi
4297
4298 case ".$with_libtool" in #(vi
4299 .\$\(*\)*|.\'*\'*) #(vi
4300   ;;
4301 ..|./*|.\\*) #(vi
4302   ;;
4303 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4304   ;;
4305 .\${*prefix}*) #(vi
4306   eval with_libtool="$with_libtool"
4307   case ".$with_libtool" in #(vi
4308   .NONE/*)
4309     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4310     ;;
4311   esac
4312   ;; #(vi
4313 .no|.NONE/*)
4314   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4315   ;;
4316 *)
4317   { { echo "$as_me:4317: error: expected a pathname, not \"$with_libtool\"" >&5
4318 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4319    { (exit 1); exit 1; }; }
4320   ;;
4321 esac
4322
4323                 LIBTOOL=$with_libtool
4324         else
4325                 # Extract the first word of "libtool", so it can be a program name with args.
4326 set dummy libtool; ac_word=$2
4327 echo "$as_me:4327: checking for $ac_word" >&5
4328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4329 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4330   echo $ECHO_N "(cached) $ECHO_C" >&6
4331 else
4332   case $LIBTOOL in
4333   [\\/]* | ?:[\\/]*)
4334   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4335   ;;
4336   *)
4337   ac_save_IFS=$IFS; IFS=$ac_path_separator
4338 ac_dummy="$PATH"
4339 for ac_dir in $ac_dummy; do
4340   IFS=$ac_save_IFS
4341   test -z "$ac_dir" && ac_dir=.
4342   if $as_executable_p "$ac_dir/$ac_word"; then
4343    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4344    echo "$as_me:4344: found $ac_dir/$ac_word" >&5
4345    break
4346 fi
4347 done
4348
4349   ;;
4350 esac
4351 fi
4352 LIBTOOL=$ac_cv_path_LIBTOOL
4353
4354 if test -n "$LIBTOOL"; then
4355   echo "$as_me:4355: result: $LIBTOOL" >&5
4356 echo "${ECHO_T}$LIBTOOL" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362         fi
4363         if test -z "$LIBTOOL" ; then
4364                 { { echo "$as_me:4364: error: Cannot find libtool" >&5
4365 echo "$as_me: error: Cannot find libtool" >&2;}
4366    { (exit 1); exit 1; }; }
4367         fi
4368         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4369         LIB_OBJECT='${OBJECTS:.o=.lo}'
4370         LIB_SUFFIX=.la
4371         LIB_CLEAN='${LIBTOOL} --mode=clean'
4372         LIB_COMPILE='${LIBTOOL} --mode=compile'
4373         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4374         LIB_INSTALL='${LIBTOOL} --mode=install'
4375         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4376         LIB_PREP=:
4377
4378         # Show the version of libtool
4379         echo "$as_me:4379: checking version of libtool" >&5
4380 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4381
4382         # Save the version in a cache variable - this is not entirely a good
4383         # thing, but the version string from libtool is very ugly, and for
4384         # bug reports it might be useful to have the original string. "("
4385         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.].*//'`
4386         echo "$as_me:4386: result: $cf_cv_libtool_version" >&5
4387 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4388         if test -z "$cf_cv_libtool_version" ; then
4389                 { { echo "$as_me:4389: error: This is not GNU libtool" >&5
4390 echo "$as_me: error: This is not GNU libtool" >&2;}
4391    { (exit 1); exit 1; }; }
4392         fi
4393
4394         # special hack to add -no-undefined (which libtool should do for itself)
4395         LT_UNDEF=
4396         case "$cf_cv_system_name" in #(vi
4397         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4398                 LT_UNDEF=-no-undefined
4399                 ;;
4400         esac
4401
4402         # special hack to add --tag option for C++ compiler
4403         case $cf_cv_libtool_version in #(vi
4404         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4405                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4406                 LIBTOOL="$LIBTOOL --tag=CC"
4407                 ;;
4408         *)
4409                 LIBTOOL_CXX="$LIBTOOL"
4410                 ;;
4411         esac
4412 else
4413         LIBTOOL=""
4414         LIBTOOL_CXX=""
4415 fi
4416
4417 test -z "$LIBTOOL" && ECHO_LT=
4418
4419 if test "$with_libtool" != "no" ; then
4420
4421 cf_list_models="$cf_list_models libtool"
4422
4423 else
4424
4425 echo "$as_me:4425: checking if you want to build shared libraries" >&5
4426 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4427
4428 # Check whether --with-shared or --without-shared was given.
4429 if test "${with_shared+set}" = set; then
4430   withval="$with_shared"
4431   with_shared=$withval
4432 else
4433   with_shared=no
4434 fi;
4435 echo "$as_me:4435: result: $with_shared" >&5
4436 echo "${ECHO_T}$with_shared" >&6
4437 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4438
4439 echo "$as_me:4439: checking if you want to build static libraries" >&5
4440 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4441
4442 # Check whether --with-normal or --without-normal was given.
4443 if test "${with_normal+set}" = set; then
4444   withval="$with_normal"
4445   with_normal=$withval
4446 else
4447   with_normal=yes
4448 fi;
4449 echo "$as_me:4449: result: $with_normal" >&5
4450 echo "${ECHO_T}$with_normal" >&6
4451 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4452
4453 echo "$as_me:4453: checking if you want to build debug libraries" >&5
4454 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4455
4456 # Check whether --with-debug or --without-debug was given.
4457 if test "${with_debug+set}" = set; then
4458   withval="$with_debug"
4459   with_debug=$withval
4460 else
4461   with_debug=yes
4462 fi;
4463 echo "$as_me:4463: result: $with_debug" >&5
4464 echo "${ECHO_T}$with_debug" >&6
4465 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4466
4467 echo "$as_me:4467: checking if you want to build profiling libraries" >&5
4468 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4469
4470 # Check whether --with-profile or --without-profile was given.
4471 if test "${with_profile+set}" = set; then
4472   withval="$with_profile"
4473   with_profile=$withval
4474 else
4475   with_profile=no
4476 fi;
4477 echo "$as_me:4477: result: $with_profile" >&5
4478 echo "${ECHO_T}$with_profile" >&6
4479 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4480
4481 fi
4482
4483 ###############################################################################
4484
4485 echo "$as_me:4485: checking for specified models" >&5
4486 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4487 test -z "$cf_list_models" && cf_list_models=normal
4488 test "$with_libtool" != "no" && cf_list_models=libtool
4489 echo "$as_me:4489: result: $cf_list_models" >&5
4490 echo "${ECHO_T}$cf_list_models" >&6
4491
4492 ### Use the first model as the default, and save its suffix for use in building
4493 ### up test-applications.
4494 echo "$as_me:4494: checking for default model" >&5
4495 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4496 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4497 echo "$as_me:4497: result: $DFT_LWR_MODEL" >&5
4498 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4499
4500 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4501
4502 TICS_NAME=tic
4503
4504 TINFO_NAME=tinfo
4505
4506 LIB_NAME=ncurses
4507
4508 LIB_DIR=../lib
4509 LIB_2ND=../../lib
4510
4511         case $cf_cv_system_name in #(vi
4512         OS/2*|os2*) #(vi
4513         LIB_PREFIX=''
4514         ;;
4515         *)      LIB_PREFIX='lib'
4516         ;;
4517         esac
4518 cf_prefix=$LIB_PREFIX
4519
4520 LIB_PREFIX=$cf_prefix
4521
4522 LIB_SUFFIX=
4523
4524 ###############################################################################
4525
4526 echo "$as_me:4526: checking if you want to build a separate terminfo library" >&5
4527 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4528
4529 # Check whether --with-termlib or --without-termlib was given.
4530 if test "${with_termlib+set}" = set; then
4531   withval="$with_termlib"
4532   with_termlib=$withval
4533 else
4534   with_termlib=no
4535 fi;
4536 echo "$as_me:4536: result: $with_termlib" >&5
4537 echo "${ECHO_T}$with_termlib" >&6
4538
4539 echo "$as_me:4539: checking if you want to build a separate tic library" >&5
4540 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4541
4542 # Check whether --with-ticlib or --without-ticlib was given.
4543 if test "${with_ticlib+set}" = set; then
4544   withval="$with_ticlib"
4545   with_ticlib=$withval
4546 else
4547   with_ticlib=no
4548 fi;
4549 echo "$as_me:4549: result: $with_ticlib" >&5
4550 echo "${ECHO_T}$with_ticlib" >&6
4551
4552 ### Checks for special libraries, must be done up-front.
4553 SHLIB_LIST=""
4554
4555 echo "$as_me:4555: checking if you want to link with the GPM mouse library" >&5
4556 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4557
4558 # Check whether --with-gpm or --without-gpm was given.
4559 if test "${with_gpm+set}" = set; then
4560   withval="$with_gpm"
4561   with_gpm=$withval
4562 else
4563   with_gpm=maybe
4564 fi;
4565 echo "$as_me:4565: result: $with_gpm" >&5
4566 echo "${ECHO_T}$with_gpm" >&6
4567
4568 if test "$with_gpm" != no ; then
4569         echo "$as_me:4569: checking for gpm.h" >&5
4570 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4571 if test "${ac_cv_header_gpm_h+set}" = set; then
4572   echo $ECHO_N "(cached) $ECHO_C" >&6
4573 else
4574   cat >conftest.$ac_ext <<_ACEOF
4575 #line 4575 "configure"
4576 #include "confdefs.h"
4577 #include <gpm.h>
4578 _ACEOF
4579 if { (eval echo "$as_me:4579: \"$ac_cpp conftest.$ac_ext\"") >&5
4580   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4581   ac_status=$?
4582   egrep -v '^ *\+' conftest.er1 >conftest.err
4583   rm -f conftest.er1
4584   cat conftest.err >&5
4585   echo "$as_me:4585: \$? = $ac_status" >&5
4586   (exit $ac_status); } >/dev/null; then
4587   if test -s conftest.err; then
4588     ac_cpp_err=$ac_c_preproc_warn_flag
4589   else
4590     ac_cpp_err=
4591   fi
4592 else
4593   ac_cpp_err=yes
4594 fi
4595 if test -z "$ac_cpp_err"; then
4596   ac_cv_header_gpm_h=yes
4597 else
4598   echo "$as_me: failed program was:" >&5
4599   cat conftest.$ac_ext >&5
4600   ac_cv_header_gpm_h=no
4601 fi
4602 rm -f conftest.err conftest.$ac_ext
4603 fi
4604 echo "$as_me:4604: result: $ac_cv_header_gpm_h" >&5
4605 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4606 if test $ac_cv_header_gpm_h = yes; then
4607
4608                 cat >>confdefs.h <<\EOF
4609 #define HAVE_GPM_H 1
4610 EOF
4611
4612                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4613                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4614
4615 echo "${as_me-configure}:4615: testing assuming we really have GPM library ..." 1>&5
4616
4617                         cat >>confdefs.h <<\EOF
4618 #define HAVE_LIBGPM 1
4619 EOF
4620
4621                 else
4622                         echo "$as_me:4622: checking for Gpm_Open in -lgpm" >&5
4623 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4624 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4625   echo $ECHO_N "(cached) $ECHO_C" >&6
4626 else
4627   ac_check_lib_save_LIBS=$LIBS
4628 LIBS="-lgpm  $LIBS"
4629 cat >conftest.$ac_ext <<_ACEOF
4630 #line 4630 "configure"
4631 #include "confdefs.h"
4632
4633 /* Override any gcc2 internal prototype to avoid an error.  */
4634 #ifdef __cplusplus
4635 extern "C"
4636 #endif
4637 /* We use char because int might match the return type of a gcc2
4638    builtin and then its argument prototype would still apply.  */
4639 char Gpm_Open ();
4640 int
4641 main ()
4642 {
4643 Gpm_Open ();
4644   ;
4645   return 0;
4646 }
4647 _ACEOF
4648 rm -f conftest.$ac_objext conftest$ac_exeext
4649 if { (eval echo "$as_me:4649: \"$ac_link\"") >&5
4650   (eval $ac_link) 2>&5
4651   ac_status=$?
4652   echo "$as_me:4652: \$? = $ac_status" >&5
4653   (exit $ac_status); } &&
4654          { ac_try='test -s conftest$ac_exeext'
4655   { (eval echo "$as_me:4655: \"$ac_try\"") >&5
4656   (eval $ac_try) 2>&5
4657   ac_status=$?
4658   echo "$as_me:4658: \$? = $ac_status" >&5
4659   (exit $ac_status); }; }; then
4660   ac_cv_lib_gpm_Gpm_Open=yes
4661 else
4662   echo "$as_me: failed program was:" >&5
4663 cat conftest.$ac_ext >&5
4664 ac_cv_lib_gpm_Gpm_Open=no
4665 fi
4666 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4667 LIBS=$ac_check_lib_save_LIBS
4668 fi
4669 echo "$as_me:4669: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4670 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4671 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4672   :
4673 else
4674
4675                                 { { echo "$as_me:4675: error: Cannot link with GPM library" >&5
4676 echo "$as_me: error: Cannot link with GPM library" >&2;}
4677    { (exit 1); exit 1; }; }
4678                 fi
4679                 with_gpm=yes
4680
4681 fi
4682
4683 else
4684
4685                 test "$with_gpm" != maybe && { echo "$as_me:4685: WARNING: Cannot find GPM header" >&5
4686 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4687                 with_gpm=no
4688
4689 fi
4690
4691 fi
4692
4693 if test "$with_gpm" != no ; then
4694         echo "$as_me:4694: checking if you want to load GPM dynamically" >&5
4695 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4696
4697 # Check whether --with-dlsym or --without-dlsym was given.
4698 if test "${with_dlsym+set}" = set; then
4699   withval="$with_dlsym"
4700   with_dlsym=$withval
4701 else
4702   with_dlsym=yes
4703 fi;
4704         echo "$as_me:4704: result: $with_dlsym" >&5
4705 echo "${ECHO_T}$with_dlsym" >&6
4706         if test "$with_dlsym" = yes ; then
4707
4708 cf_have_dlsym=no
4709 echo "$as_me:4709: checking for dlsym" >&5
4710 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4711 if test "${ac_cv_func_dlsym+set}" = set; then
4712   echo $ECHO_N "(cached) $ECHO_C" >&6
4713 else
4714   cat >conftest.$ac_ext <<_ACEOF
4715 #line 4715 "configure"
4716 #include "confdefs.h"
4717 /* System header to define __stub macros and hopefully few prototypes,
4718     which can conflict with char dlsym (); below.  */
4719 #include <assert.h>
4720 /* Override any gcc2 internal prototype to avoid an error.  */
4721 #ifdef __cplusplus
4722 extern "C"
4723 #endif
4724 /* We use char because int might match the return type of a gcc2
4725    builtin and then its argument prototype would still apply.  */
4726 char dlsym ();
4727 char (*f) ();
4728
4729 int
4730 main ()
4731 {
4732 /* The GNU C library defines this for functions which it implements
4733     to always fail with ENOSYS.  Some functions are actually named
4734     something starting with __ and the normal name is an alias.  */
4735 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4736 choke me
4737 #else
4738 f = dlsym;
4739 #endif
4740
4741   ;
4742   return 0;
4743 }
4744 _ACEOF
4745 rm -f conftest.$ac_objext conftest$ac_exeext
4746 if { (eval echo "$as_me:4746: \"$ac_link\"") >&5
4747   (eval $ac_link) 2>&5
4748   ac_status=$?
4749   echo "$as_me:4749: \$? = $ac_status" >&5
4750   (exit $ac_status); } &&
4751          { ac_try='test -s conftest$ac_exeext'
4752   { (eval echo "$as_me:4752: \"$ac_try\"") >&5
4753   (eval $ac_try) 2>&5
4754   ac_status=$?
4755   echo "$as_me:4755: \$? = $ac_status" >&5
4756   (exit $ac_status); }; }; then
4757   ac_cv_func_dlsym=yes
4758 else
4759   echo "$as_me: failed program was:" >&5
4760 cat conftest.$ac_ext >&5
4761 ac_cv_func_dlsym=no
4762 fi
4763 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4764 fi
4765 echo "$as_me:4765: result: $ac_cv_func_dlsym" >&5
4766 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4767 if test $ac_cv_func_dlsym = yes; then
4768   cf_have_dlsym=yes
4769 else
4770
4771 cf_have_libdl=no
4772 echo "$as_me:4772: checking for dlsym in -ldl" >&5
4773 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4774 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4775   echo $ECHO_N "(cached) $ECHO_C" >&6
4776 else
4777   ac_check_lib_save_LIBS=$LIBS
4778 LIBS="-ldl  $LIBS"
4779 cat >conftest.$ac_ext <<_ACEOF
4780 #line 4780 "configure"
4781 #include "confdefs.h"
4782
4783 /* Override any gcc2 internal prototype to avoid an error.  */
4784 #ifdef __cplusplus
4785 extern "C"
4786 #endif
4787 /* We use char because int might match the return type of a gcc2
4788    builtin and then its argument prototype would still apply.  */
4789 char dlsym ();
4790 int
4791 main ()
4792 {
4793 dlsym ();
4794   ;
4795   return 0;
4796 }
4797 _ACEOF
4798 rm -f conftest.$ac_objext conftest$ac_exeext
4799 if { (eval echo "$as_me:4799: \"$ac_link\"") >&5
4800   (eval $ac_link) 2>&5
4801   ac_status=$?
4802   echo "$as_me:4802: \$? = $ac_status" >&5
4803   (exit $ac_status); } &&
4804          { ac_try='test -s conftest$ac_exeext'
4805   { (eval echo "$as_me:4805: \"$ac_try\"") >&5
4806   (eval $ac_try) 2>&5
4807   ac_status=$?
4808   echo "$as_me:4808: \$? = $ac_status" >&5
4809   (exit $ac_status); }; }; then
4810   ac_cv_lib_dl_dlsym=yes
4811 else
4812   echo "$as_me: failed program was:" >&5
4813 cat conftest.$ac_ext >&5
4814 ac_cv_lib_dl_dlsym=no
4815 fi
4816 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4817 LIBS=$ac_check_lib_save_LIBS
4818 fi
4819 echo "$as_me:4819: result: $ac_cv_lib_dl_dlsym" >&5
4820 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4821 if test $ac_cv_lib_dl_dlsym = yes; then
4822
4823         cf_have_dlsym=yes
4824         cf_have_libdl=yes
4825 fi
4826
4827 fi
4828
4829 if test "$cf_have_dlsym" = yes ; then
4830         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4831
4832         echo "$as_me:4832: checking whether able to link to dl*() functions" >&5
4833 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4834         cat >conftest.$ac_ext <<_ACEOF
4835 #line 4835 "configure"
4836 #include "confdefs.h"
4837 #include <dlfcn.h>
4838 int
4839 main ()
4840 {
4841
4842                 void *obj;
4843                 if ((obj = dlopen("filename", 0)) != 0) {
4844                         if (dlsym(obj, "symbolname") == 0) {
4845                         dlclose(obj);
4846                         }
4847                 }
4848   ;
4849   return 0;
4850 }
4851 _ACEOF
4852 rm -f conftest.$ac_objext conftest$ac_exeext
4853 if { (eval echo "$as_me:4853: \"$ac_link\"") >&5
4854   (eval $ac_link) 2>&5
4855   ac_status=$?
4856   echo "$as_me:4856: \$? = $ac_status" >&5
4857   (exit $ac_status); } &&
4858          { ac_try='test -s conftest$ac_exeext'
4859   { (eval echo "$as_me:4859: \"$ac_try\"") >&5
4860   (eval $ac_try) 2>&5
4861   ac_status=$?
4862   echo "$as_me:4862: \$? = $ac_status" >&5
4863   (exit $ac_status); }; }; then
4864
4865                 cat >>confdefs.h <<\EOF
4866 #define HAVE_LIBDL 1
4867 EOF
4868
4869 else
4870   echo "$as_me: failed program was:" >&5
4871 cat conftest.$ac_ext >&5
4872
4873                 { { echo "$as_me:4873: error: Cannot link test program for libdl" >&5
4874 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4875    { (exit 1); exit 1; }; }
4876 fi
4877 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4878         echo "$as_me:4878: result: ok" >&5
4879 echo "${ECHO_T}ok" >&6
4880 else
4881         { { echo "$as_me:4881: error: Cannot find dlsym function" >&5
4882 echo "$as_me: error: Cannot find dlsym function" >&2;}
4883    { (exit 1); exit 1; }; }
4884 fi
4885
4886                 if test "$with_gpm" != yes ; then
4887                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4888
4889 echo "${as_me-configure}:4889: testing assuming soname for gpm is $with_gpm ..." 1>&5
4890
4891                         cf_cv_gpm_soname="$with_gpm"
4892                 else
4893
4894 echo "$as_me:4894: checking for soname of gpm library" >&5
4895 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4896 if test "${cf_cv_gpm_soname+set}" = set; then
4897   echo $ECHO_N "(cached) $ECHO_C" >&6
4898 else
4899
4900 cf_cv_gpm_soname=unknown
4901 if test "$cross_compiling" != yes ; then
4902 cat >conftest.$ac_ext <<CF_EOF
4903 #include <gpm.h>
4904 int main()
4905 {
4906 if (Gpm_Open(0,0)) Gpm_Close();
4907         ${cf_cv_main_return:-return}(0);
4908 }
4909 CF_EOF
4910 cf_save_LIBS="$LIBS"
4911         LIBS="-lgpm $LIBS"
4912         if { (eval echo "$as_me:4912: \"$ac_compile\"") >&5
4913   (eval $ac_compile) 2>&5
4914   ac_status=$?
4915   echo "$as_me:4915: \$? = $ac_status" >&5
4916   (exit $ac_status); } ; then
4917                 if { (eval echo "$as_me:4917: \"$ac_link\"") >&5
4918   (eval $ac_link) 2>&5
4919   ac_status=$?
4920   echo "$as_me:4920: \$? = $ac_status" >&5
4921   (exit $ac_status); } ; then
4922                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4923                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4924                 fi
4925         fi
4926 rm -f conftest*
4927 LIBS="$cf_save_LIBS"
4928 fi
4929
4930 fi
4931 echo "$as_me:4931: result: $cf_cv_gpm_soname" >&5
4932 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4933
4934                 fi
4935                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4936 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4937 EOF
4938
4939                 SHLIB_LIST="-ldl $SHLIB_LIST"
4940         else
4941                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4942         fi
4943         cat >>confdefs.h <<\EOF
4944 #define HAVE_LIBGPM 1
4945 EOF
4946
4947 echo "$as_me:4947: checking for Gpm_Wgetch in -lgpm" >&5
4948 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4949 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4950   echo $ECHO_N "(cached) $ECHO_C" >&6
4951 else
4952   ac_check_lib_save_LIBS=$LIBS
4953 LIBS="-lgpm  $LIBS"
4954 cat >conftest.$ac_ext <<_ACEOF
4955 #line 4955 "configure"
4956 #include "confdefs.h"
4957
4958 /* Override any gcc2 internal prototype to avoid an error.  */
4959 #ifdef __cplusplus
4960 extern "C"
4961 #endif
4962 /* We use char because int might match the return type of a gcc2
4963    builtin and then its argument prototype would still apply.  */
4964 char Gpm_Wgetch ();
4965 int
4966 main ()
4967 {
4968 Gpm_Wgetch ();
4969   ;
4970   return 0;
4971 }
4972 _ACEOF
4973 rm -f conftest.$ac_objext conftest$ac_exeext
4974 if { (eval echo "$as_me:4974: \"$ac_link\"") >&5
4975   (eval $ac_link) 2>&5
4976   ac_status=$?
4977   echo "$as_me:4977: \$? = $ac_status" >&5
4978   (exit $ac_status); } &&
4979          { ac_try='test -s conftest$ac_exeext'
4980   { (eval echo "$as_me:4980: \"$ac_try\"") >&5
4981   (eval $ac_try) 2>&5
4982   ac_status=$?
4983   echo "$as_me:4983: \$? = $ac_status" >&5
4984   (exit $ac_status); }; }; then
4985   ac_cv_lib_gpm_Gpm_Wgetch=yes
4986 else
4987   echo "$as_me: failed program was:" >&5
4988 cat conftest.$ac_ext >&5
4989 ac_cv_lib_gpm_Gpm_Wgetch=no
4990 fi
4991 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4992 LIBS=$ac_check_lib_save_LIBS
4993 fi
4994 echo "$as_me:4994: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
4995 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
4996 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
4997
4998 echo "$as_me:4998: checking if GPM is weakly bound to curses library" >&5
4999 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5000 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003
5004 cf_cv_check_gpm_wgetch=unknown
5005 if test "$cross_compiling" != yes ; then
5006
5007 cat >conftest.$ac_ext <<CF_EOF
5008 #include <gpm.h>
5009 int main()
5010 {
5011         Gpm_Wgetch();
5012         ${cf_cv_main_return:-return}(0);
5013 }
5014 CF_EOF
5015
5016         cf_save_LIBS="$LIBS"
5017         # This only works if we can look at the symbol table.  If a shared
5018         # library is stripped for install, we cannot use that.  So we're forced
5019         # to rely on the static library, noting that some packagers may not
5020         # include it.
5021         LIBS="-static -lgpm -dynamic $LIBS"
5022         if { (eval echo "$as_me:5022: \"$ac_compile\"") >&5
5023   (eval $ac_compile) 2>&5
5024   ac_status=$?
5025   echo "$as_me:5025: \$? = $ac_status" >&5
5026   (exit $ac_status); } ; then
5027                 if { (eval echo "$as_me:5027: \"$ac_link\"") >&5
5028   (eval $ac_link) 2>&5
5029   ac_status=$?
5030   echo "$as_me:5030: \$? = $ac_status" >&5
5031   (exit $ac_status); } ; then
5032                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5033                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5034                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5035                 fi
5036         fi
5037         rm -f conftest*
5038         LIBS="$cf_save_LIBS"
5039 fi
5040
5041 fi
5042 echo "$as_me:5042: result: $cf_cv_check_gpm_wgetch" >&5
5043 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5044
5045 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5046         { echo "$as_me:5046: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5047 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5048 fi
5049
5050 fi
5051
5052 fi
5053
5054 # not everyone has "test -c"
5055 if test -c /dev/sysmouse 2>/dev/null ; then
5056 echo "$as_me:5056: checking if you want to use sysmouse" >&5
5057 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5058
5059 # Check whether --with-sysmouse or --without-sysmouse was given.
5060 if test "${with_sysmouse+set}" = set; then
5061   withval="$with_sysmouse"
5062   cf_with_sysmouse=$withval
5063 else
5064   cf_with_sysmouse=maybe
5065 fi;
5066         if test "$cf_with_sysmouse" != no ; then
5067         cat >conftest.$ac_ext <<_ACEOF
5068 #line 5068 "configure"
5069 #include "confdefs.h"
5070
5071 #include <osreldate.h>
5072 #if (__FreeBSD_version >= 400017)
5073 #include <sys/consio.h>
5074 #include <sys/fbio.h>
5075 #else
5076 #include <machine/console.h>
5077 #endif
5078
5079 int
5080 main ()
5081 {
5082
5083         struct mouse_info the_mouse;
5084         ioctl(0, CONS_MOUSECTL, &the_mouse);
5085
5086   ;
5087   return 0;
5088 }
5089 _ACEOF
5090 rm -f conftest.$ac_objext
5091 if { (eval echo "$as_me:5091: \"$ac_compile\"") >&5
5092   (eval $ac_compile) 2>&5
5093   ac_status=$?
5094   echo "$as_me:5094: \$? = $ac_status" >&5
5095   (exit $ac_status); } &&
5096          { ac_try='test -s conftest.$ac_objext'
5097   { (eval echo "$as_me:5097: \"$ac_try\"") >&5
5098   (eval $ac_try) 2>&5
5099   ac_status=$?
5100   echo "$as_me:5100: \$? = $ac_status" >&5
5101   (exit $ac_status); }; }; then
5102   cf_with_sysmouse=yes
5103 else
5104   echo "$as_me: failed program was:" >&5
5105 cat conftest.$ac_ext >&5
5106 cf_with_sysmouse=no
5107 fi
5108 rm -f conftest.$ac_objext conftest.$ac_ext
5109         fi
5110 echo "$as_me:5110: result: $cf_with_sysmouse" >&5
5111 echo "${ECHO_T}$cf_with_sysmouse" >&6
5112 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5113 #define USE_SYSMOUSE 1
5114 EOF
5115
5116 fi
5117
5118 if test X"$CC_G_OPT" = X"" ; then
5119         CC_G_OPT='-g'
5120         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5121 fi
5122
5123 if test X"$CXX_G_OPT" = X"" ; then
5124         CXX_G_OPT='-g'
5125         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5126 fi
5127
5128 echo "$as_me:5128: checking for default loader flags" >&5
5129 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5130 case $DFT_LWR_MODEL in
5131 libtool) LD_MODEL=''   ;;
5132 normal)  LD_MODEL=''   ;;
5133 debug)   LD_MODEL=$CC_G_OPT ;;
5134 profile) LD_MODEL='-pg';;
5135 shared)  LD_MODEL=''   ;;
5136 esac
5137 echo "$as_me:5137: result: $LD_MODEL" >&5
5138 echo "${ECHO_T}$LD_MODEL" >&6
5139
5140 case $DFT_LWR_MODEL in
5141 shared)
5142
5143 echo "$as_me:5143: checking if rpath option should be used" >&5
5144 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5145
5146 # Check whether --enable-rpath or --disable-rpath was given.
5147 if test "${enable_rpath+set}" = set; then
5148   enableval="$enable_rpath"
5149   cf_cv_ld_rpath=$enableval
5150 else
5151   cf_cv_ld_rpath=no
5152 fi;
5153 echo "$as_me:5153: result: $cf_cv_ld_rpath" >&5
5154 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5155
5156 echo "$as_me:5156: checking if shared libraries should be relinked during install" >&5
5157 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5158
5159 # Check whether --enable-relink or --disable-relink was given.
5160 if test "${enable_relink+set}" = set; then
5161   enableval="$enable_relink"
5162   cf_cv_do_relink=$enableval
5163 else
5164   cf_cv_do_relink=yes
5165 fi;
5166 echo "$as_me:5166: result: $cf_cv_do_relink" >&5
5167 echo "${ECHO_T}$cf_cv_do_relink" >&6
5168         ;;
5169 esac
5170
5171         LOCAL_LDFLAGS=
5172         LOCAL_LDFLAGS2=
5173         LD_RPATH_OPT=
5174         LD_SHARED_OPTS=
5175         INSTALL_LIB="-m 644"
5176
5177         cf_cv_do_symlinks=no
5178
5179         echo "$as_me:5179: checking if release/abi version should be used for shared libs" >&5
5180 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5181
5182 # Check whether --with-shlib-version or --without-shlib-version was given.
5183 if test "${with_shlib_version+set}" = set; then
5184   withval="$with_shlib_version"
5185   test -z "$withval" && withval=auto
5186         case $withval in #(vi
5187         yes) #(vi
5188                 cf_cv_shlib_version=auto
5189                 ;;
5190         rel|abi|auto|no) #(vi
5191                 cf_cv_shlib_version=$withval
5192                 ;;
5193         *)
5194                 { { echo "$as_me:5194: error: option value must be one of: rel, abi, auto or no" >&5
5195 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5196    { (exit 1); exit 1; }; }
5197                 ;;
5198         esac
5199
5200 else
5201   cf_cv_shlib_version=auto
5202 fi;
5203         echo "$as_me:5203: result: $cf_cv_shlib_version" >&5
5204 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5205
5206         cf_cv_rm_so_locs=no
5207
5208         # Some less-capable ports of gcc support only -fpic
5209         CC_SHARED_OPTS=
5210         if test "$GCC" = yes
5211         then
5212                 echo "$as_me:5212: checking which $CC option to use" >&5
5213 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5214                 cf_save_CFLAGS="$CFLAGS"
5215                 for CC_SHARED_OPTS in -fPIC -fpic ''
5216                 do
5217                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5218                         cat >conftest.$ac_ext <<_ACEOF
5219 #line 5219 "configure"
5220 #include "confdefs.h"
5221 #include <stdio.h>
5222 int
5223 main ()
5224 {
5225 int x = 1
5226   ;
5227   return 0;
5228 }
5229 _ACEOF
5230 rm -f conftest.$ac_objext
5231 if { (eval echo "$as_me:5231: \"$ac_compile\"") >&5
5232   (eval $ac_compile) 2>&5
5233   ac_status=$?
5234   echo "$as_me:5234: \$? = $ac_status" >&5
5235   (exit $ac_status); } &&
5236          { ac_try='test -s conftest.$ac_objext'
5237   { (eval echo "$as_me:5237: \"$ac_try\"") >&5
5238   (eval $ac_try) 2>&5
5239   ac_status=$?
5240   echo "$as_me:5240: \$? = $ac_status" >&5
5241   (exit $ac_status); }; }; then
5242   break
5243 else
5244   echo "$as_me: failed program was:" >&5
5245 cat conftest.$ac_ext >&5
5246 fi
5247 rm -f conftest.$ac_objext conftest.$ac_ext
5248                 done
5249                 echo "$as_me:5249: result: $CC_SHARED_OPTS" >&5
5250 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5251                 CFLAGS="$cf_save_CFLAGS"
5252         fi
5253
5254         cf_cv_shlib_version_infix=no
5255
5256         case $cf_cv_system_name in
5257         aix[56]*)
5258                 if test "$GCC" = yes; then
5259                         CC_SHARED_OPTS=
5260                         MK_SHARED_LIB="$(CC) -shared"
5261                 fi
5262                 ;;
5263         beos*)
5264                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5265                 ;;
5266         cygwin*)
5267                 CC_SHARED_OPTS=
5268                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5269                 cf_cv_shlib_version=cygdll
5270                 cf_cv_shlib_version_infix=cygdll
5271                 cat >mk_shared_lib.sh <<-CF_EOF
5272                 #!/bin/sh
5273                 SHARED_LIB=\$1
5274                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5275                 shift
5276                 cat <<-EOF
5277                 Linking shared library
5278                 ** SHARED_LIB \$SHARED_LIB
5279                 ** IMPORT_LIB \$IMPORT_LIB
5280 EOF
5281                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5282 CF_EOF
5283                 chmod +x mk_shared_lib.sh
5284                 ;;
5285         darwin*)
5286                 EXTRA_CFLAGS="-no-cpp-precomp"
5287                 CC_SHARED_OPTS="-dynamic"
5288                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5289                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5290                 cf_cv_shlib_version_infix=yes
5291                 echo "$as_me:5291: checking if ld -search_paths_first works" >&5
5292 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5293 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5294   echo $ECHO_N "(cached) $ECHO_C" >&6
5295 else
5296
5297                         cf_save_LDFLAGS=$LDFLAGS
5298                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5299                         cat >conftest.$ac_ext <<_ACEOF
5300 #line 5300 "configure"
5301 #include "confdefs.h"
5302
5303 int
5304 main ()
5305 {
5306 int i;
5307   ;
5308   return 0;
5309 }
5310 _ACEOF
5311 rm -f conftest.$ac_objext conftest$ac_exeext
5312 if { (eval echo "$as_me:5312: \"$ac_link\"") >&5
5313   (eval $ac_link) 2>&5
5314   ac_status=$?
5315   echo "$as_me:5315: \$? = $ac_status" >&5
5316   (exit $ac_status); } &&
5317          { ac_try='test -s conftest$ac_exeext'
5318   { (eval echo "$as_me:5318: \"$ac_try\"") >&5
5319   (eval $ac_try) 2>&5
5320   ac_status=$?
5321   echo "$as_me:5321: \$? = $ac_status" >&5
5322   (exit $ac_status); }; }; then
5323   cf_cv_ldflags_search_paths_first=yes
5324 else
5325   echo "$as_me: failed program was:" >&5
5326 cat conftest.$ac_ext >&5
5327 cf_cv_ldflags_search_paths_first=no
5328 fi
5329 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5330                                 LDFLAGS=$cf_save_LDFLAGS
5331 fi
5332 echo "$as_me:5332: result: $cf_cv_ldflags_search_paths_first" >&5
5333 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5334                 if test $cf_cv_ldflags_search_paths_first = yes; then
5335                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5336                 fi
5337                 ;;
5338         hpux*)
5339                 # (tested with gcc 2.7.2 -- I don't have c89)
5340                 if test "$GCC" = yes; then
5341                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5342                 else
5343                         CC_SHARED_OPTS='+Z'
5344                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5345                 fi
5346                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5347                 # HP-UX shared libraries must be executable, and should be
5348                 # readonly to exploit a quirk in the memory manager.
5349                 INSTALL_LIB="-m 555"
5350                 ;;
5351         irix*)
5352                 if test "$cf_cv_ld_rpath" = yes ; then
5353                         if test "$GCC" = yes; then
5354                                 LD_RPATH_OPT="-Wl,-rpath,"
5355                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5356                         else
5357                                 LD_RPATH_OPT="-rpath "
5358                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5359                         fi
5360                 fi
5361                 # tested with IRIX 5.2 and 'cc'.
5362                 if test "$GCC" != yes; then
5363                         CC_SHARED_OPTS='-KPIC'
5364                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5365                 else
5366                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5367                 fi
5368                 cf_cv_rm_so_locs=yes
5369                 ;;
5370         linux*|gnu*|k*bsd*-gnu)
5371                 if test "$DFT_LWR_MODEL" = "shared" ; then
5372                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5373                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5374                 fi
5375                 if test "$cf_cv_ld_rpath" = yes ; then
5376                         LD_RPATH_OPT="-Wl,-rpath,"
5377                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5378                 fi
5379
5380         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5381         if test "$cf_cv_shlib_version" = rel; then
5382                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5383         else
5384                 cf_cv_shared_soname='`basename $@`'
5385         fi
5386
5387                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5388                 ;;
5389         openbsd[2-9].*)
5390                 if test "$DFT_LWR_MODEL" = "shared" ; then
5391                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5392                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5393                 fi
5394                 if test "$cf_cv_ld_rpath" = yes ; then
5395                         LD_RPATH_OPT="-Wl,-rpath,"
5396                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5397                 fi
5398                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5399
5400         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5401         if test "$cf_cv_shlib_version" = rel; then
5402                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5403         else
5404                 cf_cv_shared_soname='`basename $@`'
5405         fi
5406
5407                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5408                 ;;
5409         nto-qnx*|openbsd*|freebsd[12].*)
5410                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5411                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5412                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5413                 ;;
5414         freebsd*)
5415                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5416                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5417                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5418                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5419                         LD_RPATH_OPT="-rpath "
5420                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5421                 fi
5422
5423         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5424         if test "$cf_cv_shlib_version" = rel; then
5425                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5426         else
5427                 cf_cv_shared_soname='`basename $@`'
5428         fi
5429
5430                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5431                 ;;
5432         netbsd*)
5433                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5434                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5435                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5436                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5437                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5438                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5439                         if test "$cf_cv_shlib_version" = auto; then
5440                         if test -f /usr/libexec/ld.elf_so; then
5441                                 cf_cv_shlib_version=abi
5442                         else
5443                                 cf_cv_shlib_version=rel
5444                         fi
5445                         fi
5446
5447         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5448         if test "$cf_cv_shlib_version" = rel; then
5449                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5450         else
5451                 cf_cv_shared_soname='`basename $@`'
5452         fi
5453
5454                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5455                 else
5456                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5457                 fi
5458                 ;;
5459         osf*|mls+*)
5460                 # tested with OSF/1 V3.2 and 'cc'
5461                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5462                 # link with shared libs).
5463                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5464                 case $host_os in
5465                 osf4*)
5466                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5467                         ;;
5468                 esac
5469                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5470                 if test "$DFT_LWR_MODEL" = "shared" ; then
5471                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5472                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5473                 fi
5474                 if test "$cf_cv_ld_rpath" = yes ; then
5475                         LD_RPATH_OPT="-rpath"
5476                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5477                 fi
5478                 cf_cv_rm_so_locs=yes
5479                 ;;
5480         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5481                 # tested with osr5.0.5
5482                 if test "$GCC" != yes; then
5483                         CC_SHARED_OPTS='-belf -KPIC'
5484                 fi
5485                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5486                 if test "$cf_cv_ld_rpath" = yes ; then
5487                         # only way is to set LD_RUN_PATH but no switch for it
5488                         RUN_PATH=$libdir
5489                 fi
5490                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5491                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5492                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5493                 ;;
5494         sunos4*)
5495                 # tested with SunOS 4.1.1 and gcc 2.7.0
5496                 if test "$GCC" != yes; then
5497                         CC_SHARED_OPTS='-KPIC'
5498                 fi
5499                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5500                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5501                 ;;
5502         solaris2*)
5503                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5504                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5505                 if test "$DFT_LWR_MODEL" = "shared" ; then
5506                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5507                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5508                 fi
5509                 if test "$cf_cv_ld_rpath" = yes ; then
5510                         LD_RPATH_OPT="-R"
5511                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5512                 fi
5513
5514         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5515         if test "$cf_cv_shlib_version" = rel; then
5516                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5517         else
5518                 cf_cv_shared_soname='`basename $@`'
5519         fi
5520
5521                 if test "$GCC" != yes; then
5522                         cf_save_CFLAGS="$CFLAGS"
5523                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5524                         do
5525                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5526                                 cat >conftest.$ac_ext <<_ACEOF
5527 #line 5527 "configure"
5528 #include "confdefs.h"
5529 #include <stdio.h>
5530 int
5531 main ()
5532 {
5533 printf("Hello\n");
5534   ;
5535   return 0;
5536 }
5537 _ACEOF
5538 rm -f conftest.$ac_objext
5539 if { (eval echo "$as_me:5539: \"$ac_compile\"") >&5
5540   (eval $ac_compile) 2>&5
5541   ac_status=$?
5542   echo "$as_me:5542: \$? = $ac_status" >&5
5543   (exit $ac_status); } &&
5544          { ac_try='test -s conftest.$ac_objext'
5545   { (eval echo "$as_me:5545: \"$ac_try\"") >&5
5546   (eval $ac_try) 2>&5
5547   ac_status=$?
5548   echo "$as_me:5548: \$? = $ac_status" >&5
5549   (exit $ac_status); }; }; then
5550   break
5551 else
5552   echo "$as_me: failed program was:" >&5
5553 cat conftest.$ac_ext >&5
5554 fi
5555 rm -f conftest.$ac_objext conftest.$ac_ext
5556                         done
5557                         CFLAGS="$cf_save_CFLAGS"
5558                         CC_SHARED_OPTS=$cf_shared_opts
5559                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5560                 else
5561                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5562                 fi
5563                 ;;
5564         sysv5uw7*|unix_sv*)
5565                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5566                 if test "$GCC" != yes; then
5567                         CC_SHARED_OPTS='-KPIC'
5568                 fi
5569                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5570                 ;;
5571         *)
5572                 CC_SHARED_OPTS='unknown'
5573                 MK_SHARED_LIB='echo unknown'
5574                 ;;
5575         esac
5576
5577         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5578         case "$cf_cv_shlib_version" in #(vi
5579         rel|abi)
5580                 case "$MK_SHARED_LIB" in #(vi
5581                 *'-o $@')
5582                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5583                         ;;
5584                 *)
5585                         { echo "$as_me:5585: WARNING: ignored --with-shlib-version" >&5
5586 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5587                         ;;
5588                 esac
5589                 ;;
5590         esac
5591
5592         if test -n "$LD_RPATH_OPT" ; then
5593                 echo "$as_me:5593: checking if we need a space after rpath option" >&5
5594 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5595                 cf_save_LIBS="$LIBS"
5596                 LIBS="$LIBS ${LD_RPATH_OPT}$libdir"
5597                 cat >conftest.$ac_ext <<_ACEOF
5598 #line 5598 "configure"
5599 #include "confdefs.h"
5600
5601 int
5602 main ()
5603 {
5604
5605   ;
5606   return 0;
5607 }
5608 _ACEOF
5609 rm -f conftest.$ac_objext conftest$ac_exeext
5610 if { (eval echo "$as_me:5610: \"$ac_link\"") >&5
5611   (eval $ac_link) 2>&5
5612   ac_status=$?
5613   echo "$as_me:5613: \$? = $ac_status" >&5
5614   (exit $ac_status); } &&
5615          { ac_try='test -s conftest$ac_exeext'
5616   { (eval echo "$as_me:5616: \"$ac_try\"") >&5
5617   (eval $ac_try) 2>&5
5618   ac_status=$?
5619   echo "$as_me:5619: \$? = $ac_status" >&5
5620   (exit $ac_status); }; }; then
5621   cf_rpath_space=no
5622 else
5623   echo "$as_me: failed program was:" >&5
5624 cat conftest.$ac_ext >&5
5625 cf_rpath_space=yes
5626 fi
5627 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5628                 LIBS="$cf_save_LIBS"
5629                 echo "$as_me:5629: result: $cf_rpath_space" >&5
5630 echo "${ECHO_T}$cf_rpath_space" >&6
5631                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5632                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5633         fi
5634
5635 if test "$CC_SHARED_OPTS" = "unknown"; then
5636         for model in $cf_list_models; do
5637                 if test "$model" = "shared"; then
5638                         { { echo "$as_me:5638: error: Shared libraries are not supported in this version" >&5
5639 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5640    { (exit 1); exit 1; }; }
5641                 fi
5642         done
5643 fi
5644
5645 ###############################################################################
5646
5647 ###     use option --disable-overwrite to leave out the link to -lcurses
5648 echo "$as_me:5648: checking if you wish to install ncurses overwriting curses" >&5
5649 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5650
5651 # Check whether --enable-overwrite or --disable-overwrite was given.
5652 if test "${enable_overwrite+set}" = set; then
5653   enableval="$enable_overwrite"
5654   with_overwrite=$enableval
5655 else
5656   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5657 fi;
5658 echo "$as_me:5658: result: $with_overwrite" >&5
5659 echo "${ECHO_T}$with_overwrite" >&6
5660
5661 echo "$as_me:5661: checking if external terminfo-database is used" >&5
5662 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5663
5664 # Check whether --enable-database or --disable-database was given.
5665 if test "${enable_database+set}" = set; then
5666   enableval="$enable_database"
5667   use_database=$enableval
5668 else
5669   use_database=yes
5670 fi;
5671 echo "$as_me:5671: result: $use_database" >&5
5672 echo "${ECHO_T}$use_database" >&6
5673
5674 case $host_os in #(vi
5675 os2*) #(vi
5676         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5677         ;;
5678 *) #(vi
5679         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5680         ;;
5681 esac
5682
5683         case $cf_cv_system_name in
5684         os2*)   PATH_SEPARATOR=';'  ;;
5685         *)      PATH_SEPARATOR=':'  ;;
5686         esac
5687
5688 if test "$use_database" != no ; then
5689         cat >>confdefs.h <<\EOF
5690 #define USE_DATABASE 1
5691 EOF
5692
5693         echo "$as_me:5693: checking which terminfo source-file will be installed" >&5
5694 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5695
5696 # Check whether --enable-database or --disable-database was given.
5697 if test "${enable_database+set}" = set; then
5698   enableval="$enable_database"
5699   TERMINFO_SRC=$withval
5700 fi;
5701         echo "$as_me:5701: result: $TERMINFO_SRC" >&5
5702 echo "${ECHO_T}$TERMINFO_SRC" >&6
5703
5704         echo "$as_me:5704: checking whether to use hashed database instead of directory/tree" >&5
5705 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5706
5707 # Check whether --with-hashed-db or --without-hashed-db was given.
5708 if test "${with_hashed_db+set}" = set; then
5709   withval="$with_hashed_db"
5710
5711 else
5712   with_hashed_db=no
5713 fi;
5714         echo "$as_me:5714: result: $with_hashed_db" >&5
5715 echo "${ECHO_T}$with_hashed_db" >&6
5716 else
5717         with_hashed_db=no
5718 fi
5719
5720 echo "$as_me:5720: checking for list of fallback descriptions" >&5
5721 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5722
5723 # Check whether --with-fallbacks or --without-fallbacks was given.
5724 if test "${with_fallbacks+set}" = set; then
5725   withval="$with_fallbacks"
5726   with_fallback=$withval
5727 else
5728   with_fallback=
5729 fi;
5730 echo "$as_me:5730: result: $with_fallback" >&5
5731 echo "${ECHO_T}$with_fallback" >&6
5732 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5733
5734 echo "$as_me:5734: checking if you want modern xterm or antique" >&5
5735 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5736
5737 # Check whether --with-xterm-new or --without-xterm-new was given.
5738 if test "${with_xterm_new+set}" = set; then
5739   withval="$with_xterm_new"
5740   with_xterm_new=$withval
5741 else
5742   with_xterm_new=yes
5743 fi;
5744 case $with_xterm_new in
5745 no)     with_xterm_new=xterm-old;;
5746 *)      with_xterm_new=xterm-new;;
5747 esac
5748 echo "$as_me:5748: result: $with_xterm_new" >&5
5749 echo "${ECHO_T}$with_xterm_new" >&6
5750 WHICH_XTERM=$with_xterm_new
5751
5752 MAKE_TERMINFO=
5753 if test "$use_database" = no ; then
5754         TERMINFO="${datadir}/terminfo"
5755         MAKE_TERMINFO="#"
5756 else
5757
5758 echo "$as_me:5758: checking for list of terminfo directories" >&5
5759 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5760
5761 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5762 if test "${with_terminfo_dirs+set}" = set; then
5763   withval="$with_terminfo_dirs"
5764
5765 else
5766   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5767 fi;
5768 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5769 cf_dst_path=
5770 for cf_src_path in $withval
5771 do
5772
5773 if test "x$prefix" != xNONE; then
5774   cf_path_syntax="$prefix"
5775 else
5776   cf_path_syntax="$ac_default_prefix"
5777 fi
5778
5779 case ".$cf_src_path" in #(vi
5780 .\$\(*\)*|.\'*\'*) #(vi
5781   ;;
5782 ..|./*|.\\*) #(vi
5783   ;;
5784 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5785   ;;
5786 .\${*prefix}*) #(vi
5787   eval cf_src_path="$cf_src_path"
5788   case ".$cf_src_path" in #(vi
5789   .NONE/*)
5790     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5791     ;;
5792   esac
5793   ;; #(vi
5794 .no|.NONE/*)
5795   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5796   ;;
5797 *)
5798   { { echo "$as_me:5798: error: expected a pathname, not \"$cf_src_path\"" >&5
5799 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5800    { (exit 1); exit 1; }; }
5801   ;;
5802 esac
5803
5804   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5805   cf_dst_path="${cf_dst_path}${cf_src_path}"
5806 done
5807 IFS="$ac_save_ifs"
5808
5809 eval 'TERMINFO_DIRS="$cf_dst_path"'
5810
5811 echo "$as_me:5811: result: $TERMINFO_DIRS" >&5
5812 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5813 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5814 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5815 EOF
5816
5817 echo "$as_me:5817: checking for default terminfo directory" >&5
5818 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5819
5820 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5821 if test "${with_default_terminfo_dir+set}" = set; then
5822   withval="$with_default_terminfo_dir"
5823
5824 else
5825   withval="${TERMINFO-${datadir}/terminfo}"
5826 fi; if test -n "${datadir}/terminfo" ; then
5827
5828 if test "x$prefix" != xNONE; then
5829   cf_path_syntax="$prefix"
5830 else
5831   cf_path_syntax="$ac_default_prefix"
5832 fi
5833
5834 case ".$withval" in #(vi
5835 .\$\(*\)*|.\'*\'*) #(vi
5836   ;;
5837 ..|./*|.\\*) #(vi
5838   ;;
5839 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5840   ;;
5841 .\${*prefix}*) #(vi
5842   eval withval="$withval"
5843   case ".$withval" in #(vi
5844   .NONE/*)
5845     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5846     ;;
5847   esac
5848   ;; #(vi
5849 .no|.NONE/*)
5850   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5851   ;;
5852 *)
5853   { { echo "$as_me:5853: error: expected a pathname, not \"$withval\"" >&5
5854 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5855    { (exit 1); exit 1; }; }
5856   ;;
5857 esac
5858
5859 fi
5860 TERMINFO="$withval"
5861
5862 echo "$as_me:5862: result: $TERMINFO" >&5
5863 echo "${ECHO_T}$TERMINFO" >&6
5864 cat >>confdefs.h <<EOF
5865 #define TERMINFO "$TERMINFO"
5866 EOF
5867
5868 fi
5869
5870 ###     use option --disable-big-core to make tic run on small machines
5871 ###     We need 4Mb, check if we can allocate 50% more than that.
5872 echo "$as_me:5872: checking if big-core option selected" >&5
5873 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5874
5875 # Check whether --enable-big-core or --disable-big-core was given.
5876 if test "${enable_big_core+set}" = set; then
5877   enableval="$enable_big_core"
5878   with_big_core=$enableval
5879 else
5880   if test "$cross_compiling" = yes; then
5881   with_big_core=no
5882 else
5883   cat >conftest.$ac_ext <<_ACEOF
5884 #line 5884 "configure"
5885 #include "confdefs.h"
5886
5887 #include <stdlib.h>
5888 #include <string.h>
5889 int main() {
5890         unsigned long n = 6000000L;
5891         char *s = malloc(n);
5892         if (s != 0)
5893                 s[0] = s[n-1] = 0;
5894         ${cf_cv_main_return:-return}(s == 0);
5895 }
5896 _ACEOF
5897 rm -f conftest$ac_exeext
5898 if { (eval echo "$as_me:5898: \"$ac_link\"") >&5
5899   (eval $ac_link) 2>&5
5900   ac_status=$?
5901   echo "$as_me:5901: \$? = $ac_status" >&5
5902   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5903   { (eval echo "$as_me:5903: \"$ac_try\"") >&5
5904   (eval $ac_try) 2>&5
5905   ac_status=$?
5906   echo "$as_me:5906: \$? = $ac_status" >&5
5907   (exit $ac_status); }; }; then
5908   with_big_core=yes
5909 else
5910   echo "$as_me: program exited with status $ac_status" >&5
5911 echo "$as_me: failed program was:" >&5
5912 cat conftest.$ac_ext >&5
5913 with_big_core=no
5914 fi
5915 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5916 fi
5917 fi;
5918 echo "$as_me:5918: result: $with_big_core" >&5
5919 echo "${ECHO_T}$with_big_core" >&6
5920 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5921 #define HAVE_BIG_CORE 1
5922 EOF
5923
5924 ### ISO C only guarantees 512-char strings, we have tables which load faster
5925 ### when constructed using "big" strings.  More than the C compiler, the awk
5926 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5927 echo "$as_me:5927: checking if big-strings option selected" >&5
5928 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5929
5930 # Check whether --enable-big-strings or --disable-big-strings was given.
5931 if test "${enable_big_strings+set}" = set; then
5932   enableval="$enable_big_strings"
5933   with_big_strings=$enableval
5934 else
5935
5936         case x$AWK in #(vi
5937         x)
5938                 eval with_big_strings=no
5939                 ;;
5940         *) #(vi
5941                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5942                         | $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
5943                         eval with_big_strings=yes
5944                 else
5945                         eval with_big_strings=no
5946                 fi
5947                 ;;
5948         esac
5949
5950 fi;
5951 echo "$as_me:5951: result: $with_big_strings" >&5
5952 echo "${ECHO_T}$with_big_strings" >&6
5953
5954 USE_BIG_STRINGS=0
5955 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5956
5957 ###     use option --enable-termcap to compile in the termcap fallback support
5958 echo "$as_me:5958: checking if you want termcap-fallback support" >&5
5959 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5960
5961 # Check whether --enable-termcap or --disable-termcap was given.
5962 if test "${enable_termcap+set}" = set; then
5963   enableval="$enable_termcap"
5964   with_termcap=$enableval
5965 else
5966   with_termcap=no
5967 fi;
5968 echo "$as_me:5968: result: $with_termcap" >&5
5969 echo "${ECHO_T}$with_termcap" >&6
5970
5971 if test "$with_termcap" != "yes" ; then
5972         if test "$use_database" = no ; then
5973                 if test -z "$with_fallback" ; then
5974                         { { echo "$as_me:5974: error: You have disabled the database w/o specifying fallbacks" >&5
5975 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5976    { (exit 1); exit 1; }; }
5977                 fi
5978         fi
5979         cat >>confdefs.h <<\EOF
5980 #define PURE_TERMINFO 1
5981 EOF
5982
5983 else
5984
5985 if test "$with_ticlib" != no ; then
5986         { { echo "$as_me:5986: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
5987 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
5988    { (exit 1); exit 1; }; }
5989 fi
5990
5991 cat >>confdefs.h <<\EOF
5992 #define USE_TERMCAP 1
5993 EOF
5994
5995 echo "$as_me:5995: checking for list of termcap files" >&5
5996 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
5997
5998 # Check whether --with-termpath or --without-termpath was given.
5999 if test "${with_termpath+set}" = set; then
6000   withval="$with_termpath"
6001
6002 else
6003   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6004 fi;
6005 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6006 cf_dst_path=
6007 for cf_src_path in $withval
6008 do
6009
6010 if test "x$prefix" != xNONE; then
6011   cf_path_syntax="$prefix"
6012 else
6013   cf_path_syntax="$ac_default_prefix"
6014 fi
6015
6016 case ".$cf_src_path" in #(vi
6017 .\$\(*\)*|.\'*\'*) #(vi
6018   ;;
6019 ..|./*|.\\*) #(vi
6020   ;;
6021 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6022   ;;
6023 .\${*prefix}*) #(vi
6024   eval cf_src_path="$cf_src_path"
6025   case ".$cf_src_path" in #(vi
6026   .NONE/*)
6027     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6028     ;;
6029   esac
6030   ;; #(vi
6031 .no|.NONE/*)
6032   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6033   ;;
6034 *)
6035   { { echo "$as_me:6035: error: expected a pathname, not \"$cf_src_path\"" >&5
6036 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6037    { (exit 1); exit 1; }; }
6038   ;;
6039 esac
6040
6041   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6042   cf_dst_path="${cf_dst_path}${cf_src_path}"
6043 done
6044 IFS="$ac_save_ifs"
6045
6046 eval 'TERMPATH="$cf_dst_path"'
6047
6048 echo "$as_me:6048: result: $TERMPATH" >&5
6049 echo "${ECHO_T}$TERMPATH" >&6
6050 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6051 #define TERMPATH "$TERMPATH"
6052 EOF
6053
6054 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6055 echo "$as_me:6055: checking if fast termcap-loader is needed" >&5
6056 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6057
6058 # Check whether --enable-getcap or --disable-getcap was given.
6059 if test "${enable_getcap+set}" = set; then
6060   enableval="$enable_getcap"
6061   with_getcap=$enableval
6062 else
6063   with_getcap=no
6064 fi;
6065 echo "$as_me:6065: result: $with_getcap" >&5
6066 echo "${ECHO_T}$with_getcap" >&6
6067 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6068 #define USE_GETCAP 1
6069 EOF
6070
6071 echo "$as_me:6071: checking if translated termcaps will be cached in ~/.terminfo" >&5
6072 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6073
6074 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6075 if test "${enable_getcap_cache+set}" = set; then
6076   enableval="$enable_getcap_cache"
6077   with_getcap_cache=$enableval
6078 else
6079   with_getcap_cache=no
6080 fi;
6081 echo "$as_me:6081: result: $with_getcap_cache" >&5
6082 echo "${ECHO_T}$with_getcap_cache" >&6
6083 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6084 #define USE_GETCAP_CACHE 1
6085 EOF
6086
6087 fi
6088
6089 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6090 echo "$as_me:6090: checking if ~/.terminfo is wanted" >&5
6091 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6092
6093 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6094 if test "${enable_home_terminfo+set}" = set; then
6095   enableval="$enable_home_terminfo"
6096   with_home_terminfo=$enableval
6097 else
6098   with_home_terminfo=yes
6099 fi;
6100 echo "$as_me:6100: result: $with_home_terminfo" >&5
6101 echo "${ECHO_T}$with_home_terminfo" >&6
6102 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6103 #define USE_HOME_TERMINFO 1
6104 EOF
6105
6106 echo "$as_me:6106: checking if you want to use restricted environment when running as root" >&5
6107 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6108
6109 # Check whether --enable-root-environ or --disable-root-environ was given.
6110 if test "${enable_root_environ+set}" = set; then
6111   enableval="$enable_root_environ"
6112   with_root_environ=$enableval
6113 else
6114   with_root_environ=yes
6115 fi;
6116 echo "$as_me:6116: result: $with_root_environ" >&5
6117 echo "${ECHO_T}$with_root_environ" >&6
6118 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6119 #define USE_ROOT_ENVIRON 1
6120 EOF
6121
6122 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6123 ###   to reduce storage requirements for the terminfo database.
6124
6125 for ac_func in \
6126         remove \
6127         unlink
6128 do
6129 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6130 echo "$as_me:6130: checking for $ac_func" >&5
6131 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6132 if eval "test \"\${$as_ac_var+set}\" = set"; then
6133   echo $ECHO_N "(cached) $ECHO_C" >&6
6134 else
6135   cat >conftest.$ac_ext <<_ACEOF
6136 #line 6136 "configure"
6137 #include "confdefs.h"
6138 /* System header to define __stub macros and hopefully few prototypes,
6139     which can conflict with char $ac_func (); below.  */
6140 #include <assert.h>
6141 /* Override any gcc2 internal prototype to avoid an error.  */
6142 #ifdef __cplusplus
6143 extern "C"
6144 #endif
6145 /* We use char because int might match the return type of a gcc2
6146    builtin and then its argument prototype would still apply.  */
6147 char $ac_func ();
6148 char (*f) ();
6149
6150 int
6151 main ()
6152 {
6153 /* The GNU C library defines this for functions which it implements
6154     to always fail with ENOSYS.  Some functions are actually named
6155     something starting with __ and the normal name is an alias.  */
6156 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6157 choke me
6158 #else
6159 f = $ac_func;
6160 #endif
6161
6162   ;
6163   return 0;
6164 }
6165 _ACEOF
6166 rm -f conftest.$ac_objext conftest$ac_exeext
6167 if { (eval echo "$as_me:6167: \"$ac_link\"") >&5
6168   (eval $ac_link) 2>&5
6169   ac_status=$?
6170   echo "$as_me:6170: \$? = $ac_status" >&5
6171   (exit $ac_status); } &&
6172          { ac_try='test -s conftest$ac_exeext'
6173   { (eval echo "$as_me:6173: \"$ac_try\"") >&5
6174   (eval $ac_try) 2>&5
6175   ac_status=$?
6176   echo "$as_me:6176: \$? = $ac_status" >&5
6177   (exit $ac_status); }; }; then
6178   eval "$as_ac_var=yes"
6179 else
6180   echo "$as_me: failed program was:" >&5
6181 cat conftest.$ac_ext >&5
6182 eval "$as_ac_var=no"
6183 fi
6184 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6185 fi
6186 echo "$as_me:6186: result: `eval echo '${'$as_ac_var'}'`" >&5
6187 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6188 if test `eval echo '${'$as_ac_var'}'` = yes; then
6189   cat >>confdefs.h <<EOF
6190 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6191 EOF
6192
6193 fi
6194 done
6195
6196 if test "$cross_compiling" = yes ; then
6197
6198 for ac_func in \
6199                 link \
6200                 symlink
6201 do
6202 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6203 echo "$as_me:6203: checking for $ac_func" >&5
6204 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6205 if eval "test \"\${$as_ac_var+set}\" = set"; then
6206   echo $ECHO_N "(cached) $ECHO_C" >&6
6207 else
6208   cat >conftest.$ac_ext <<_ACEOF
6209 #line 6209 "configure"
6210 #include "confdefs.h"
6211 /* System header to define __stub macros and hopefully few prototypes,
6212     which can conflict with char $ac_func (); below.  */
6213 #include <assert.h>
6214 /* Override any gcc2 internal prototype to avoid an error.  */
6215 #ifdef __cplusplus
6216 extern "C"
6217 #endif
6218 /* We use char because int might match the return type of a gcc2
6219    builtin and then its argument prototype would still apply.  */
6220 char $ac_func ();
6221 char (*f) ();
6222
6223 int
6224 main ()
6225 {
6226 /* The GNU C library defines this for functions which it implements
6227     to always fail with ENOSYS.  Some functions are actually named
6228     something starting with __ and the normal name is an alias.  */
6229 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6230 choke me
6231 #else
6232 f = $ac_func;
6233 #endif
6234
6235   ;
6236   return 0;
6237 }
6238 _ACEOF
6239 rm -f conftest.$ac_objext conftest$ac_exeext
6240 if { (eval echo "$as_me:6240: \"$ac_link\"") >&5
6241   (eval $ac_link) 2>&5
6242   ac_status=$?
6243   echo "$as_me:6243: \$? = $ac_status" >&5
6244   (exit $ac_status); } &&
6245          { ac_try='test -s conftest$ac_exeext'
6246   { (eval echo "$as_me:6246: \"$ac_try\"") >&5
6247   (eval $ac_try) 2>&5
6248   ac_status=$?
6249   echo "$as_me:6249: \$? = $ac_status" >&5
6250   (exit $ac_status); }; }; then
6251   eval "$as_ac_var=yes"
6252 else
6253   echo "$as_me: failed program was:" >&5
6254 cat conftest.$ac_ext >&5
6255 eval "$as_ac_var=no"
6256 fi
6257 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6258 fi
6259 echo "$as_me:6259: result: `eval echo '${'$as_ac_var'}'`" >&5
6260 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6261 if test `eval echo '${'$as_ac_var'}'` = yes; then
6262   cat >>confdefs.h <<EOF
6263 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6264 EOF
6265
6266 fi
6267 done
6268
6269 else
6270         echo "$as_me:6270: checking if link/symlink functions work" >&5
6271 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6272 if test "${cf_cv_link_funcs+set}" = set; then
6273   echo $ECHO_N "(cached) $ECHO_C" >&6
6274 else
6275
6276                 cf_cv_link_funcs=
6277                 for cf_func in link symlink ; do
6278                         if test "$cross_compiling" = yes; then
6279
6280                         eval 'ac_cv_func_'$cf_func'=error'
6281 else
6282   cat >conftest.$ac_ext <<_ACEOF
6283 #line 6283 "configure"
6284 #include "confdefs.h"
6285
6286 #include <sys/types.h>
6287 #include <sys/stat.h>
6288 #ifdef HAVE_UNISTD_H
6289 #include <unistd.h>
6290 #endif
6291 int main()
6292 {
6293         int fail = 0;
6294         char *src = "config.log";
6295         char *dst = "conftest.chk";
6296         struct stat src_sb;
6297         struct stat dst_sb;
6298
6299         stat(src, &src_sb);
6300         fail = ($cf_func("config.log", "conftest.chk") < 0)
6301             || (stat(dst, &dst_sb) < 0)
6302             || (dst_sb.st_mtime != src_sb.st_mtime);
6303 #ifdef HAVE_UNLINK
6304         unlink(dst);
6305 #else
6306         remove(dst);
6307 #endif
6308         ${cf_cv_main_return:-return} (fail);
6309 }
6310
6311 _ACEOF
6312 rm -f conftest$ac_exeext
6313 if { (eval echo "$as_me:6313: \"$ac_link\"") >&5
6314   (eval $ac_link) 2>&5
6315   ac_status=$?
6316   echo "$as_me:6316: \$? = $ac_status" >&5
6317   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6318   { (eval echo "$as_me:6318: \"$ac_try\"") >&5
6319   (eval $ac_try) 2>&5
6320   ac_status=$?
6321   echo "$as_me:6321: \$? = $ac_status" >&5
6322   (exit $ac_status); }; }; then
6323
6324                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6325                         eval 'ac_cv_func_'$cf_func'=yes'
6326 else
6327   echo "$as_me: program exited with status $ac_status" >&5
6328 echo "$as_me: failed program was:" >&5
6329 cat conftest.$ac_ext >&5
6330
6331                         eval 'ac_cv_func_'$cf_func'=no'
6332 fi
6333 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6334 fi
6335                 done
6336                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6337
6338 fi
6339 echo "$as_me:6339: result: $cf_cv_link_funcs" >&5
6340 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6341         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6342 #define HAVE_LINK 1
6343 EOF
6344
6345         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6346 #define HAVE_SYMLINK 1
6347 EOF
6348
6349 fi
6350
6351 with_links=no
6352 with_symlinks=no
6353
6354 # soft links (symbolic links) are useful for some systems where hard links do
6355 # not work, or to make it simpler to copy terminfo trees around.
6356 if test "$ac_cv_func_symlink" = yes ; then
6357     echo "$as_me:6357: checking if tic should use symbolic links" >&5
6358 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6359
6360 # Check whether --enable-symlinks or --disable-symlinks was given.
6361 if test "${enable_symlinks+set}" = set; then
6362   enableval="$enable_symlinks"
6363   with_symlinks=$enableval
6364 else
6365   with_symlinks=no
6366 fi;
6367     echo "$as_me:6367: result: $with_symlinks" >&5
6368 echo "${ECHO_T}$with_symlinks" >&6
6369 fi
6370
6371 # If we have hard links and did not choose to use soft links instead, there is
6372 # no reason to make this choice optional - use the hard links.
6373 if test "$with_symlinks" = no ; then
6374     echo "$as_me:6374: checking if tic should use hard links" >&5
6375 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6376     if test "$ac_cv_func_link" = yes ; then
6377         with_links=yes
6378     else
6379         with_links=no
6380     fi
6381     echo "$as_me:6381: result: $with_links" >&5
6382 echo "${ECHO_T}$with_links" >&6
6383 fi
6384
6385 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6386 #define USE_LINKS 1
6387 EOF
6388
6389 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6390 #define USE_SYMLINKS 1
6391 EOF
6392
6393 ###   use option --enable-broken-linker to force on use of broken-linker support
6394 echo "$as_me:6394: checking if you want broken-linker support code" >&5
6395 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6396
6397 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6398 if test "${enable_broken_linker+set}" = set; then
6399   enableval="$enable_broken_linker"
6400   with_broken_linker=$enableval
6401 else
6402   with_broken_linker=${BROKEN_LINKER-no}
6403 fi;
6404 echo "$as_me:6404: result: $with_broken_linker" >&5
6405 echo "${ECHO_T}$with_broken_linker" >&6
6406
6407 BROKEN_LINKER=0
6408 if test "$with_broken_linker" = yes ; then
6409         cat >>confdefs.h <<\EOF
6410 #define BROKEN_LINKER 1
6411 EOF
6412
6413         BROKEN_LINKER=1
6414 elif test "$DFT_LWR_MODEL" = shared ; then
6415         case $cf_cv_system_name in #(vi
6416         cygwin*)
6417                 cat >>confdefs.h <<\EOF
6418 #define BROKEN_LINKER 1
6419 EOF
6420
6421                 BROKEN_LINKER=1
6422                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6423
6424 echo "${as_me-configure}:6424: testing cygwin linker is broken anyway ..." 1>&5
6425
6426                 ;;
6427         esac
6428 fi
6429
6430 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6431 echo "$as_me:6431: checking if tputs should process BSD-style prefix padding" >&5
6432 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6433
6434 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6435 if test "${enable_bsdpad+set}" = set; then
6436   enableval="$enable_bsdpad"
6437   with_bsdpad=$enableval
6438 else
6439   with_bsdpad=no
6440 fi;
6441 echo "$as_me:6441: result: $with_bsdpad" >&5
6442 echo "${ECHO_T}$with_bsdpad" >&6
6443 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6444 #define BSD_TPUTS 1
6445 EOF
6446
6447 ###   use option --enable-widec to turn on use of wide-character support
6448 NCURSES_CH_T=chtype
6449 NCURSES_LIBUTF8=0
6450
6451 NEED_WCHAR_H=0
6452 NCURSES_MBSTATE_T=0
6453 NCURSES_WCHAR_T=0
6454 NCURSES_WINT_T=0
6455
6456 # Check to define _XOPEN_SOURCE "automatically"
6457
6458 echo "$as_me:6458: checking if $CC -U and -D options work together" >&5
6459 echo $ECHO_N "checking if $CC -U and -D options work together... $ECHO_C" >&6
6460 if test "${cf_cv_cc_u_d_options+set}" = set; then
6461   echo $ECHO_N "(cached) $ECHO_C" >&6
6462 else
6463
6464         cf_save_CPPFLAGS="$CPPFLAGS"
6465         CPPFLAGS="-UU_D_OPTIONS -DU_D_OPTIONS -DD_U_OPTIONS -UD_U_OPTIONS"
6466         cat >conftest.$ac_ext <<_ACEOF
6467 #line 6467 "configure"
6468 #include "confdefs.h"
6469
6470 int
6471 main ()
6472 {
6473
6474 #ifndef U_D_OPTIONS
6475 make an undefined-error
6476 #endif
6477 #ifdef  D_U_OPTIONS
6478 make a defined-error
6479 #endif
6480
6481   ;
6482   return 0;
6483 }
6484 _ACEOF
6485 rm -f conftest.$ac_objext
6486 if { (eval echo "$as_me:6486: \"$ac_compile\"") >&5
6487   (eval $ac_compile) 2>&5
6488   ac_status=$?
6489   echo "$as_me:6489: \$? = $ac_status" >&5
6490   (exit $ac_status); } &&
6491          { ac_try='test -s conftest.$ac_objext'
6492   { (eval echo "$as_me:6492: \"$ac_try\"") >&5
6493   (eval $ac_try) 2>&5
6494   ac_status=$?
6495   echo "$as_me:6495: \$? = $ac_status" >&5
6496   (exit $ac_status); }; }; then
6497
6498         cf_cv_cc_u_d_options=yes
6499 else
6500   echo "$as_me: failed program was:" >&5
6501 cat conftest.$ac_ext >&5
6502
6503         cf_cv_cc_u_d_options=no
6504 fi
6505 rm -f conftest.$ac_objext conftest.$ac_ext
6506         CPPFLAGS="$cf_save_CPPFLAGS"
6507
6508 fi
6509 echo "$as_me:6509: result: $cf_cv_cc_u_d_options" >&5
6510 echo "${ECHO_T}$cf_cv_cc_u_d_options" >&6
6511
6512 cf_XOPEN_SOURCE=500
6513 cf_POSIX_C_SOURCE=199506L
6514
6515 case $host_os in #(vi
6516 aix[456]*) #(vi
6517         CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE"
6518         ;;
6519 freebsd*|dragonfly*) #(vi
6520         # 5.x headers associate
6521         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6522         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6523         cf_POSIX_C_SOURCE=200112L
6524         cf_XOPEN_SOURCE=600
6525         CPPFLAGS="$CPPFLAGS -D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6526         ;;
6527 hpux11*) #(vi
6528         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6529         ;;
6530 hpux*) #(vi
6531         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE"
6532         ;;
6533 irix[56].*) #(vi
6534         CPPFLAGS="$CPPFLAGS -D_SGI_SOURCE"
6535         ;;
6536 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6537
6538 echo "$as_me:6538: checking if we must define _GNU_SOURCE" >&5
6539 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6540 if test "${cf_cv_gnu_source+set}" = set; then
6541   echo $ECHO_N "(cached) $ECHO_C" >&6
6542 else
6543
6544 cat >conftest.$ac_ext <<_ACEOF
6545 #line 6545 "configure"
6546 #include "confdefs.h"
6547 #include <sys/types.h>
6548 int
6549 main ()
6550 {
6551
6552 #ifndef _XOPEN_SOURCE
6553 make an error
6554 #endif
6555   ;
6556   return 0;
6557 }
6558 _ACEOF
6559 rm -f conftest.$ac_objext
6560 if { (eval echo "$as_me:6560: \"$ac_compile\"") >&5
6561   (eval $ac_compile) 2>&5
6562   ac_status=$?
6563   echo "$as_me:6563: \$? = $ac_status" >&5
6564   (exit $ac_status); } &&
6565          { ac_try='test -s conftest.$ac_objext'
6566   { (eval echo "$as_me:6566: \"$ac_try\"") >&5
6567   (eval $ac_try) 2>&5
6568   ac_status=$?
6569   echo "$as_me:6569: \$? = $ac_status" >&5
6570   (exit $ac_status); }; }; then
6571   cf_cv_gnu_source=no
6572 else
6573   echo "$as_me: failed program was:" >&5
6574 cat conftest.$ac_ext >&5
6575 cf_save="$CPPFLAGS"
6576          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6577          cat >conftest.$ac_ext <<_ACEOF
6578 #line 6578 "configure"
6579 #include "confdefs.h"
6580 #include <sys/types.h>
6581 int
6582 main ()
6583 {
6584
6585 #ifdef _XOPEN_SOURCE
6586 make an error
6587 #endif
6588   ;
6589   return 0;
6590 }
6591 _ACEOF
6592 rm -f conftest.$ac_objext
6593 if { (eval echo "$as_me:6593: \"$ac_compile\"") >&5
6594   (eval $ac_compile) 2>&5
6595   ac_status=$?
6596   echo "$as_me:6596: \$? = $ac_status" >&5
6597   (exit $ac_status); } &&
6598          { ac_try='test -s conftest.$ac_objext'
6599   { (eval echo "$as_me:6599: \"$ac_try\"") >&5
6600   (eval $ac_try) 2>&5
6601   ac_status=$?
6602   echo "$as_me:6602: \$? = $ac_status" >&5
6603   (exit $ac_status); }; }; then
6604   cf_cv_gnu_source=no
6605 else
6606   echo "$as_me: failed program was:" >&5
6607 cat conftest.$ac_ext >&5
6608 cf_cv_gnu_source=yes
6609 fi
6610 rm -f conftest.$ac_objext conftest.$ac_ext
6611         CPPFLAGS="$cf_save"
6612
6613 fi
6614 rm -f conftest.$ac_objext conftest.$ac_ext
6615
6616 fi
6617 echo "$as_me:6617: result: $cf_cv_gnu_source" >&5
6618 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6619 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6620
6621         ;;
6622 mirbsd*) #(vi
6623         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6624         ;;
6625 netbsd*) #(vi
6626         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6627         ;;
6628 openbsd*) #(vi
6629         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6630         ;;
6631 osf[45]*) #(vi
6632         CPPFLAGS="$CPPFLAGS -D_OSF_SOURCE"
6633         ;;
6634 nto-qnx*) #(vi
6635         CPPFLAGS="$CPPFLAGS -D_QNX_SOURCE"
6636         ;;
6637 sco*) #(vi
6638         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6639         ;;
6640 solaris*) #(vi
6641         CPPFLAGS="$CPPFLAGS -D__EXTENSIONS__"
6642         ;;
6643 *)
6644         echo "$as_me:6644: checking if we should define _XOPEN_SOURCE" >&5
6645 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6646 if test "${cf_cv_xopen_source+set}" = set; then
6647   echo $ECHO_N "(cached) $ECHO_C" >&6
6648 else
6649
6650         cat >conftest.$ac_ext <<_ACEOF
6651 #line 6651 "configure"
6652 #include "confdefs.h"
6653 #include <sys/types.h>
6654 int
6655 main ()
6656 {
6657
6658 #ifndef _XOPEN_SOURCE
6659 make an error
6660 #endif
6661   ;
6662   return 0;
6663 }
6664 _ACEOF
6665 rm -f conftest.$ac_objext
6666 if { (eval echo "$as_me:6666: \"$ac_compile\"") >&5
6667   (eval $ac_compile) 2>&5
6668   ac_status=$?
6669   echo "$as_me:6669: \$? = $ac_status" >&5
6670   (exit $ac_status); } &&
6671          { ac_try='test -s conftest.$ac_objext'
6672   { (eval echo "$as_me:6672: \"$ac_try\"") >&5
6673   (eval $ac_try) 2>&5
6674   ac_status=$?
6675   echo "$as_me:6675: \$? = $ac_status" >&5
6676   (exit $ac_status); }; }; then
6677   cf_cv_xopen_source=no
6678 else
6679   echo "$as_me: failed program was:" >&5
6680 cat conftest.$ac_ext >&5
6681 cf_save="$CPPFLAGS"
6682          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6683          cat >conftest.$ac_ext <<_ACEOF
6684 #line 6684 "configure"
6685 #include "confdefs.h"
6686 #include <sys/types.h>
6687 int
6688 main ()
6689 {
6690
6691 #ifdef _XOPEN_SOURCE
6692 make an error
6693 #endif
6694   ;
6695   return 0;
6696 }
6697 _ACEOF
6698 rm -f conftest.$ac_objext
6699 if { (eval echo "$as_me:6699: \"$ac_compile\"") >&5
6700   (eval $ac_compile) 2>&5
6701   ac_status=$?
6702   echo "$as_me:6702: \$? = $ac_status" >&5
6703   (exit $ac_status); } &&
6704          { ac_try='test -s conftest.$ac_objext'
6705   { (eval echo "$as_me:6705: \"$ac_try\"") >&5
6706   (eval $ac_try) 2>&5
6707   ac_status=$?
6708   echo "$as_me:6708: \$? = $ac_status" >&5
6709   (exit $ac_status); }; }; then
6710   cf_cv_xopen_source=no
6711 else
6712   echo "$as_me: failed program was:" >&5
6713 cat conftest.$ac_ext >&5
6714 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6715 fi
6716 rm -f conftest.$ac_objext conftest.$ac_ext
6717         CPPFLAGS="$cf_save"
6718
6719 fi
6720 rm -f conftest.$ac_objext conftest.$ac_ext
6721
6722 fi
6723 echo "$as_me:6723: result: $cf_cv_xopen_source" >&5
6724 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6725         if test "$cf_cv_xopen_source" != no ; then
6726
6727 # remove _XOPEN_SOURCE symbol from $CFLAGS
6728 CFLAGS=`echo "$CFLAGS" | \
6729         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6730                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6731
6732 # remove _XOPEN_SOURCE symbol from $CPPFLAGS
6733 CPPFLAGS=`echo "$CPPFLAGS" | \
6734         sed     -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?[         ]/ /g' \
6735                 -e 's/-[UD]_XOPEN_SOURCE\(=[^   ]*\)\?$//g'`
6736
6737                 test "$cf_cv_cc_u_d_options" = yes && \
6738                         CPPFLAGS="$CPPFLAGS -U_XOPEN_SOURCE"
6739                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_cv_xopen_source"
6740         fi
6741
6742 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6743
6744 cf_save_CFLAGS="$CFLAGS"
6745 cf_save_CPPFLAGS="$CPPFLAGS"
6746
6747 # remove _POSIX_C_SOURCE symbol from $cf_save_CFLAGS
6748 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6749         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6750                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6751
6752 # remove _POSIX_C_SOURCE symbol from $cf_save_CPPFLAGS
6753 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6754         sed     -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?[         ]/ /g' \
6755                 -e 's/-[UD]_POSIX_C_SOURCE\(=[^         ]*\)\?$//g'`
6756
6757 echo "$as_me:6757: checking if we should define _POSIX_C_SOURCE" >&5
6758 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6759 if test "${cf_cv_posix_c_source+set}" = set; then
6760   echo $ECHO_N "(cached) $ECHO_C" >&6
6761 else
6762
6763 echo "${as_me-configure}:6763: testing if the symbol is already defined go no further ..." 1>&5
6764
6765         cat >conftest.$ac_ext <<_ACEOF
6766 #line 6766 "configure"
6767 #include "confdefs.h"
6768 #include <sys/types.h>
6769 int
6770 main ()
6771 {
6772
6773 #ifndef _POSIX_C_SOURCE
6774 make an error
6775 #endif
6776   ;
6777   return 0;
6778 }
6779 _ACEOF
6780 rm -f conftest.$ac_objext
6781 if { (eval echo "$as_me:6781: \"$ac_compile\"") >&5
6782   (eval $ac_compile) 2>&5
6783   ac_status=$?
6784   echo "$as_me:6784: \$? = $ac_status" >&5
6785   (exit $ac_status); } &&
6786          { ac_try='test -s conftest.$ac_objext'
6787   { (eval echo "$as_me:6787: \"$ac_try\"") >&5
6788   (eval $ac_try) 2>&5
6789   ac_status=$?
6790   echo "$as_me:6790: \$? = $ac_status" >&5
6791   (exit $ac_status); }; }; then
6792   cf_cv_posix_c_source=no
6793 else
6794   echo "$as_me: failed program was:" >&5
6795 cat conftest.$ac_ext >&5
6796 cf_want_posix_source=no
6797          case .$cf_POSIX_C_SOURCE in #(vi
6798          .[12]??*) #(vi
6799                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6800                 ;;
6801          .2) #(vi
6802                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6803                 cf_want_posix_source=yes
6804                 ;;
6805          .*)
6806                 cf_want_posix_source=yes
6807                 ;;
6808          esac
6809          if test "$cf_want_posix_source" = yes ; then
6810                 cat >conftest.$ac_ext <<_ACEOF
6811 #line 6811 "configure"
6812 #include "confdefs.h"
6813 #include <sys/types.h>
6814 int
6815 main ()
6816 {
6817
6818 #ifdef _POSIX_SOURCE
6819 make an error
6820 #endif
6821   ;
6822   return 0;
6823 }
6824 _ACEOF
6825 rm -f conftest.$ac_objext
6826 if { (eval echo "$as_me:6826: \"$ac_compile\"") >&5
6827   (eval $ac_compile) 2>&5
6828   ac_status=$?
6829   echo "$as_me:6829: \$? = $ac_status" >&5
6830   (exit $ac_status); } &&
6831          { ac_try='test -s conftest.$ac_objext'
6832   { (eval echo "$as_me:6832: \"$ac_try\"") >&5
6833   (eval $ac_try) 2>&5
6834   ac_status=$?
6835   echo "$as_me:6835: \$? = $ac_status" >&5
6836   (exit $ac_status); }; }; then
6837   :
6838 else
6839   echo "$as_me: failed program was:" >&5
6840 cat conftest.$ac_ext >&5
6841 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6842 fi
6843 rm -f conftest.$ac_objext conftest.$ac_ext
6844          fi
6845
6846 echo "${as_me-configure}:6846: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6847
6848          CFLAGS="$cf_trim_CFLAGS"
6849          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6850
6851 echo "${as_me-configure}:6851: testing if the second compile does not leave our definition intact error ..." 1>&5
6852
6853          cat >conftest.$ac_ext <<_ACEOF
6854 #line 6854 "configure"
6855 #include "confdefs.h"
6856 #include <sys/types.h>
6857 int
6858 main ()
6859 {
6860
6861 #ifndef _POSIX_C_SOURCE
6862 make an error
6863 #endif
6864   ;
6865   return 0;
6866 }
6867 _ACEOF
6868 rm -f conftest.$ac_objext
6869 if { (eval echo "$as_me:6869: \"$ac_compile\"") >&5
6870   (eval $ac_compile) 2>&5
6871   ac_status=$?
6872   echo "$as_me:6872: \$? = $ac_status" >&5
6873   (exit $ac_status); } &&
6874          { ac_try='test -s conftest.$ac_objext'
6875   { (eval echo "$as_me:6875: \"$ac_try\"") >&5
6876   (eval $ac_try) 2>&5
6877   ac_status=$?
6878   echo "$as_me:6878: \$? = $ac_status" >&5
6879   (exit $ac_status); }; }; then
6880   :
6881 else
6882   echo "$as_me: failed program was:" >&5
6883 cat conftest.$ac_ext >&5
6884 cf_cv_posix_c_source=no
6885 fi
6886 rm -f conftest.$ac_objext conftest.$ac_ext
6887          CFLAGS="$cf_save_CFLAGS"
6888          CPPFLAGS="$cf_save_CPPFLAGS"
6889
6890 fi
6891 rm -f conftest.$ac_objext conftest.$ac_ext
6892
6893 fi
6894 echo "$as_me:6894: result: $cf_cv_posix_c_source" >&5
6895 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6896
6897 if test "$cf_cv_posix_c_source" != no ; then
6898         CFLAGS="$cf_trim_CFLAGS"
6899         CPPFLAGS="$cf_trim_CPPFLAGS"
6900         if test "$cf_cv_cc_u_d_options" = yes ; then
6901                 cf_temp_posix_c_source=`echo "$cf_cv_posix_c_source" | \
6902                                 sed -e 's/-D/-U/g' -e 's/=[^    ]*//g'`
6903                 CPPFLAGS="$CPPFLAGS $cf_temp_posix_c_source"
6904         fi
6905         CPPFLAGS="$CPPFLAGS $cf_cv_posix_c_source"
6906 fi
6907
6908         ;;
6909 esac
6910
6911 # Work around breakage on OS X
6912
6913 echo "$as_me:6913: checking if SIGWINCH is defined" >&5
6914 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
6915 if test "${cf_cv_define_sigwinch+set}" = set; then
6916   echo $ECHO_N "(cached) $ECHO_C" >&6
6917 else
6918
6919         cat >conftest.$ac_ext <<_ACEOF
6920 #line 6920 "configure"
6921 #include "confdefs.h"
6922
6923 #include <sys/types.h>
6924 #include <sys/signal.h>
6925
6926 int
6927 main ()
6928 {
6929 int x = SIGWINCH
6930   ;
6931   return 0;
6932 }
6933 _ACEOF
6934 rm -f conftest.$ac_objext
6935 if { (eval echo "$as_me:6935: \"$ac_compile\"") >&5
6936   (eval $ac_compile) 2>&5
6937   ac_status=$?
6938   echo "$as_me:6938: \$? = $ac_status" >&5
6939   (exit $ac_status); } &&
6940          { ac_try='test -s conftest.$ac_objext'
6941   { (eval echo "$as_me:6941: \"$ac_try\"") >&5
6942   (eval $ac_try) 2>&5
6943   ac_status=$?
6944   echo "$as_me:6944: \$? = $ac_status" >&5
6945   (exit $ac_status); }; }; then
6946   cf_cv_define_sigwinch=yes
6947 else
6948   echo "$as_me: failed program was:" >&5
6949 cat conftest.$ac_ext >&5
6950 cat >conftest.$ac_ext <<_ACEOF
6951 #line 6951 "configure"
6952 #include "confdefs.h"
6953
6954 #undef _XOPEN_SOURCE
6955 #undef _POSIX_SOURCE
6956 #undef _POSIX_C_SOURCE
6957 #include <sys/types.h>
6958 #include <sys/signal.h>
6959
6960 int
6961 main ()
6962 {
6963 int x = SIGWINCH
6964   ;
6965   return 0;
6966 }
6967 _ACEOF
6968 rm -f conftest.$ac_objext
6969 if { (eval echo "$as_me:6969: \"$ac_compile\"") >&5
6970   (eval $ac_compile) 2>&5
6971   ac_status=$?
6972   echo "$as_me:6972: \$? = $ac_status" >&5
6973   (exit $ac_status); } &&
6974          { ac_try='test -s conftest.$ac_objext'
6975   { (eval echo "$as_me:6975: \"$ac_try\"") >&5
6976   (eval $ac_try) 2>&5
6977   ac_status=$?
6978   echo "$as_me:6978: \$? = $ac_status" >&5
6979   (exit $ac_status); }; }; then
6980   cf_cv_define_sigwinch=maybe
6981 else
6982   echo "$as_me: failed program was:" >&5
6983 cat conftest.$ac_ext >&5
6984 cf_cv_define_sigwinch=no
6985 fi
6986 rm -f conftest.$ac_objext conftest.$ac_ext
6987
6988 fi
6989 rm -f conftest.$ac_objext conftest.$ac_ext
6990
6991 fi
6992 echo "$as_me:6992: result: $cf_cv_define_sigwinch" >&5
6993 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
6994
6995 if test "$cf_cv_define_sigwinch" = maybe ; then
6996 echo "$as_me:6996: checking for actual SIGWINCH definition" >&5
6997 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
6998 if test "${cf_cv_fixup_sigwinch+set}" = set; then
6999   echo $ECHO_N "(cached) $ECHO_C" >&6
7000 else
7001
7002 cf_cv_fixup_sigwinch=unknown
7003 cf_sigwinch=32
7004 while test $cf_sigwinch != 1
7005 do
7006         cat >conftest.$ac_ext <<_ACEOF
7007 #line 7007 "configure"
7008 #include "confdefs.h"
7009
7010 #undef _XOPEN_SOURCE
7011 #undef _POSIX_SOURCE
7012 #undef _POSIX_C_SOURCE
7013 #include <sys/types.h>
7014 #include <sys/signal.h>
7015
7016 int
7017 main ()
7018 {
7019
7020 #if SIGWINCH != $cf_sigwinch
7021 make an error
7022 #endif
7023 int x = SIGWINCH
7024   ;
7025   return 0;
7026 }
7027 _ACEOF
7028 rm -f conftest.$ac_objext
7029 if { (eval echo "$as_me:7029: \"$ac_compile\"") >&5
7030   (eval $ac_compile) 2>&5
7031   ac_status=$?
7032   echo "$as_me:7032: \$? = $ac_status" >&5
7033   (exit $ac_status); } &&
7034          { ac_try='test -s conftest.$ac_objext'
7035   { (eval echo "$as_me:7035: \"$ac_try\"") >&5
7036   (eval $ac_try) 2>&5
7037   ac_status=$?
7038   echo "$as_me:7038: \$? = $ac_status" >&5
7039   (exit $ac_status); }; }; then
7040   cf_cv_fixup_sigwinch=$cf_sigwinch
7041          break
7042 else
7043   echo "$as_me: failed program was:" >&5
7044 cat conftest.$ac_ext >&5
7045 fi
7046 rm -f conftest.$ac_objext conftest.$ac_ext
7047
7048 cf_sigwinch=`expr $cf_sigwinch - 1`
7049 done
7050
7051 fi
7052 echo "$as_me:7052: result: $cf_cv_fixup_sigwinch" >&5
7053 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7054
7055         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7056                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7057         fi
7058 fi
7059
7060 # Checks for CODESET support.
7061
7062   echo "$as_me:7062: checking for nl_langinfo and CODESET" >&5
7063 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7064 if test "${am_cv_langinfo_codeset+set}" = set; then
7065   echo $ECHO_N "(cached) $ECHO_C" >&6
7066 else
7067   cat >conftest.$ac_ext <<_ACEOF
7068 #line 7068 "configure"
7069 #include "confdefs.h"
7070 #include <langinfo.h>
7071 int
7072 main ()
7073 {
7074 char* cs = nl_langinfo(CODESET);
7075   ;
7076   return 0;
7077 }
7078 _ACEOF
7079 rm -f conftest.$ac_objext conftest$ac_exeext
7080 if { (eval echo "$as_me:7080: \"$ac_link\"") >&5
7081   (eval $ac_link) 2>&5
7082   ac_status=$?
7083   echo "$as_me:7083: \$? = $ac_status" >&5
7084   (exit $ac_status); } &&
7085          { ac_try='test -s conftest$ac_exeext'
7086   { (eval echo "$as_me:7086: \"$ac_try\"") >&5
7087   (eval $ac_try) 2>&5
7088   ac_status=$?
7089   echo "$as_me:7089: \$? = $ac_status" >&5
7090   (exit $ac_status); }; }; then
7091   am_cv_langinfo_codeset=yes
7092 else
7093   echo "$as_me: failed program was:" >&5
7094 cat conftest.$ac_ext >&5
7095 am_cv_langinfo_codeset=no
7096 fi
7097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7098
7099 fi
7100 echo "$as_me:7100: result: $am_cv_langinfo_codeset" >&5
7101 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7102   if test $am_cv_langinfo_codeset = yes; then
7103
7104 cat >>confdefs.h <<\EOF
7105 #define HAVE_LANGINFO_CODESET 1
7106 EOF
7107
7108   fi
7109
7110 # use these variables to work around a defect in gcc's fixincludes.
7111 NCURSES_OK_WCHAR_T=
7112 NCURSES_OK_WINT_T=
7113
7114 echo "$as_me:7114: checking if you want wide-character code" >&5
7115 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7116
7117 # Check whether --enable-widec or --disable-widec was given.
7118 if test "${enable_widec+set}" = set; then
7119   enableval="$enable_widec"
7120   with_widec=$enableval
7121 else
7122   with_widec=no
7123 fi;
7124 echo "$as_me:7124: result: $with_widec" >&5
7125 echo "${ECHO_T}$with_widec" >&6
7126 if test "$with_widec" = yes ; then
7127         LIB_SUFFIX="w${LIB_SUFFIX}"
7128         cat >>confdefs.h <<\EOF
7129 #define USE_WIDEC_SUPPORT 1
7130 EOF
7131
7132 echo "$as_me:7132: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7133 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7134 cat >conftest.$ac_ext <<_ACEOF
7135 #line 7135 "configure"
7136 #include "confdefs.h"
7137 #include <sys/types.h>
7138
7139 int
7140 main ()
7141 {
7142
7143 #ifndef _XOPEN_SOURCE_EXTENDED
7144 make an error
7145 #endif
7146   ;
7147   return 0;
7148 }
7149 _ACEOF
7150 rm -f conftest.$ac_objext
7151 if { (eval echo "$as_me:7151: \"$ac_compile\"") >&5
7152   (eval $ac_compile) 2>&5
7153   ac_status=$?
7154   echo "$as_me:7154: \$? = $ac_status" >&5
7155   (exit $ac_status); } &&
7156          { ac_try='test -s conftest.$ac_objext'
7157   { (eval echo "$as_me:7157: \"$ac_try\"") >&5
7158   (eval $ac_try) 2>&5
7159   ac_status=$?
7160   echo "$as_me:7160: \$? = $ac_status" >&5
7161   (exit $ac_status); }; }; then
7162   cf_result=no
7163 else
7164   echo "$as_me: failed program was:" >&5
7165 cat conftest.$ac_ext >&5
7166 cf_result=yes
7167 fi
7168 rm -f conftest.$ac_objext conftest.$ac_ext
7169 echo "$as_me:7169: result: $cf_result" >&5
7170 echo "${ECHO_T}$cf_result" >&6
7171
7172 if test "$cf_result" = yes ; then
7173         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7174 elif test "x" != "x" ; then
7175         echo "$as_me:7175: checking checking for compatible value versus " >&5
7176 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7177         cat >conftest.$ac_ext <<_ACEOF
7178 #line 7178 "configure"
7179 #include "confdefs.h"
7180 #include <sys/types.h>
7181
7182 int
7183 main ()
7184 {
7185
7186 #if _XOPEN_SOURCE_EXTENDED- < 0
7187 make an error
7188 #endif
7189   ;
7190   return 0;
7191 }
7192 _ACEOF
7193 rm -f conftest.$ac_objext
7194 if { (eval echo "$as_me:7194: \"$ac_compile\"") >&5
7195   (eval $ac_compile) 2>&5
7196   ac_status=$?
7197   echo "$as_me:7197: \$? = $ac_status" >&5
7198   (exit $ac_status); } &&
7199          { ac_try='test -s conftest.$ac_objext'
7200   { (eval echo "$as_me:7200: \"$ac_try\"") >&5
7201   (eval $ac_try) 2>&5
7202   ac_status=$?
7203   echo "$as_me:7203: \$? = $ac_status" >&5
7204   (exit $ac_status); }; }; then
7205   cf_result=yes
7206 else
7207   echo "$as_me: failed program was:" >&5
7208 cat conftest.$ac_ext >&5
7209 cf_result=no
7210 fi
7211 rm -f conftest.$ac_objext conftest.$ac_ext
7212         echo "$as_me:7212: result: $cf_result" >&5
7213 echo "${ECHO_T}$cf_result" >&6
7214         if test "$cf_result" = no ; then
7215                 # perhaps we can override it - try...
7216                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7217         fi
7218 fi
7219
7220         # with_overwrite=no
7221         NCURSES_CH_T=cchar_t
7222
7223 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7224 do
7225 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7226 echo "$as_me:7226: checking for $ac_func" >&5
7227 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7228 if eval "test \"\${$as_ac_var+set}\" = set"; then
7229   echo $ECHO_N "(cached) $ECHO_C" >&6
7230 else
7231   cat >conftest.$ac_ext <<_ACEOF
7232 #line 7232 "configure"
7233 #include "confdefs.h"
7234 /* System header to define __stub macros and hopefully few prototypes,
7235     which can conflict with char $ac_func (); below.  */
7236 #include <assert.h>
7237 /* Override any gcc2 internal prototype to avoid an error.  */
7238 #ifdef __cplusplus
7239 extern "C"
7240 #endif
7241 /* We use char because int might match the return type of a gcc2
7242    builtin and then its argument prototype would still apply.  */
7243 char $ac_func ();
7244 char (*f) ();
7245
7246 int
7247 main ()
7248 {
7249 /* The GNU C library defines this for functions which it implements
7250     to always fail with ENOSYS.  Some functions are actually named
7251     something starting with __ and the normal name is an alias.  */
7252 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7253 choke me
7254 #else
7255 f = $ac_func;
7256 #endif
7257
7258   ;
7259   return 0;
7260 }
7261 _ACEOF
7262 rm -f conftest.$ac_objext conftest$ac_exeext
7263 if { (eval echo "$as_me:7263: \"$ac_link\"") >&5
7264   (eval $ac_link) 2>&5
7265   ac_status=$?
7266   echo "$as_me:7266: \$? = $ac_status" >&5
7267   (exit $ac_status); } &&
7268          { ac_try='test -s conftest$ac_exeext'
7269   { (eval echo "$as_me:7269: \"$ac_try\"") >&5
7270   (eval $ac_try) 2>&5
7271   ac_status=$?
7272   echo "$as_me:7272: \$? = $ac_status" >&5
7273   (exit $ac_status); }; }; then
7274   eval "$as_ac_var=yes"
7275 else
7276   echo "$as_me: failed program was:" >&5
7277 cat conftest.$ac_ext >&5
7278 eval "$as_ac_var=no"
7279 fi
7280 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7281 fi
7282 echo "$as_me:7282: result: `eval echo '${'$as_ac_var'}'`" >&5
7283 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7284 if test `eval echo '${'$as_ac_var'}'` = yes; then
7285   cat >>confdefs.h <<EOF
7286 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7287 EOF
7288
7289 fi
7290 done
7291
7292         if test "$ac_cv_func_putwc" != yes ; then
7293
7294 echo "$as_me:7294: checking for multibyte character support" >&5
7295 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7296 if test "${cf_cv_utf8_lib+set}" = set; then
7297   echo $ECHO_N "(cached) $ECHO_C" >&6
7298 else
7299
7300         cf_save_LIBS="$LIBS"
7301         cat >conftest.$ac_ext <<_ACEOF
7302 #line 7302 "configure"
7303 #include "confdefs.h"
7304
7305 #include <stdlib.h>
7306 int
7307 main ()
7308 {
7309 putwc(0,0);
7310   ;
7311   return 0;
7312 }
7313 _ACEOF
7314 rm -f conftest.$ac_objext conftest$ac_exeext
7315 if { (eval echo "$as_me:7315: \"$ac_link\"") >&5
7316   (eval $ac_link) 2>&5
7317   ac_status=$?
7318   echo "$as_me:7318: \$? = $ac_status" >&5
7319   (exit $ac_status); } &&
7320          { ac_try='test -s conftest$ac_exeext'
7321   { (eval echo "$as_me:7321: \"$ac_try\"") >&5
7322   (eval $ac_try) 2>&5
7323   ac_status=$?
7324   echo "$as_me:7324: \$? = $ac_status" >&5
7325   (exit $ac_status); }; }; then
7326   cf_cv_utf8_lib=yes
7327 else
7328   echo "$as_me: failed program was:" >&5
7329 cat conftest.$ac_ext >&5
7330
7331 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7332 # will be set on completion of the AC_TRY_LINK below.
7333 cf_cv_header_path_utf8=
7334 cf_cv_library_path_utf8=
7335
7336 echo "${as_me-configure}:7336: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7337
7338 cat >conftest.$ac_ext <<_ACEOF
7339 #line 7339 "configure"
7340 #include "confdefs.h"
7341
7342 #include <libutf8.h>
7343 int
7344 main ()
7345 {
7346 putwc(0,0);
7347   ;
7348   return 0;
7349 }
7350 _ACEOF
7351 rm -f conftest.$ac_objext conftest$ac_exeext
7352 if { (eval echo "$as_me:7352: \"$ac_link\"") >&5
7353   (eval $ac_link) 2>&5
7354   ac_status=$?
7355   echo "$as_me:7355: \$? = $ac_status" >&5
7356   (exit $ac_status); } &&
7357          { ac_try='test -s conftest$ac_exeext'
7358   { (eval echo "$as_me:7358: \"$ac_try\"") >&5
7359   (eval $ac_try) 2>&5
7360   ac_status=$?
7361   echo "$as_me:7361: \$? = $ac_status" >&5
7362   (exit $ac_status); }; }; then
7363   cf_cv_find_linkage_utf8=yes
7364 else
7365   echo "$as_me: failed program was:" >&5
7366 cat conftest.$ac_ext >&5
7367
7368     cf_cv_find_linkage_utf8=no
7369
7370     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7371
7372 echo "${as_me-configure}:7372: testing find linkage for utf8 library ..." 1>&5
7373
7374 echo "${as_me-configure}:7374: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7375
7376     cf_save_CPPFLAGS="$CPPFLAGS"
7377     cf_test_CPPFLAGS="$CPPFLAGS"
7378
7379 cf_header_path_list=""
7380 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7381         for cf_header_path in $CPPFLAGS $CFLAGS
7382         do
7383                 case $cf_header_path in #(vi
7384                 -I*)
7385                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7386
7387 test "$cf_header_path" != "NONE" && \
7388 test -d "$cf_header_path" && \
7389  {
7390         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7391         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7392         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7393         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7394         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7395         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7396 }
7397
7398                         cf_header_path_list="$cf_header_path_list $cf_search"
7399                         ;;
7400                 esac
7401         done
7402 fi
7403
7404 cf_search=""
7405
7406 test "/usr" != "$prefix" && \
7407 test -d "/usr" && \
7408 (test $prefix = NONE || test -d $prefix) && {
7409         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7410         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7411         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7412         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7413         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7414         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7415 }
7416
7417 test "$prefix" != "NONE" && \
7418 test -d "$prefix" && \
7419  {
7420         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7421         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7422         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7423         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7424         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7425         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7426 }
7427
7428 test "/usr/local" != "$prefix" && \
7429 test -d "/usr/local" && \
7430 (test $prefix = NONE || test -d $prefix) && {
7431         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7432         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7433         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7434         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7435         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7436         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7437 }
7438
7439 test "/opt" != "$prefix" && \
7440 test -d "/opt" && \
7441 (test $prefix = NONE || test -d $prefix) && {
7442         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7443         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7444         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7445         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7446         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7447         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7448 }
7449
7450 test "$HOME" != "$prefix" && \
7451 test -d "$HOME" && \
7452 (test $prefix = NONE || test -d $prefix) && {
7453         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7454         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7455         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7456         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7457         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7458         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7459 }
7460
7461 test "$includedir" != NONE && \
7462 test "$includedir" != "/usr/include" && \
7463 test -d "$includedir" && {
7464         test -d $includedir &&    cf_search="$cf_search $includedir"
7465         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7466 }
7467
7468 test "$oldincludedir" != NONE && \
7469 test "$oldincludedir" != "/usr/include" && \
7470 test -d "$oldincludedir" && {
7471         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7472         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7473 }
7474
7475 cf_search="$cf_header_path_list $cf_search"
7476
7477     for cf_cv_header_path_utf8 in $cf_search
7478     do
7479       if test -d $cf_cv_header_path_utf8 ; then
7480         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7481
7482 echo "${as_me-configure}:7482: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7483
7484         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7485         cat >conftest.$ac_ext <<_ACEOF
7486 #line 7486 "configure"
7487 #include "confdefs.h"
7488
7489 #include <libutf8.h>
7490 int
7491 main ()
7492 {
7493 putwc(0,0);
7494   ;
7495   return 0;
7496 }
7497 _ACEOF
7498 rm -f conftest.$ac_objext
7499 if { (eval echo "$as_me:7499: \"$ac_compile\"") >&5
7500   (eval $ac_compile) 2>&5
7501   ac_status=$?
7502   echo "$as_me:7502: \$? = $ac_status" >&5
7503   (exit $ac_status); } &&
7504          { ac_try='test -s conftest.$ac_objext'
7505   { (eval echo "$as_me:7505: \"$ac_try\"") >&5
7506   (eval $ac_try) 2>&5
7507   ac_status=$?
7508   echo "$as_me:7508: \$? = $ac_status" >&5
7509   (exit $ac_status); }; }; then
7510
7511             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7512
7513 echo "${as_me-configure}:7513: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7514
7515             cf_cv_find_linkage_utf8=maybe
7516             cf_test_CPPFLAGS="$CPPFLAGS"
7517             break
7518 else
7519   echo "$as_me: failed program was:" >&5
7520 cat conftest.$ac_ext >&5
7521
7522             CPPFLAGS="$cf_save_CPPFLAGS"
7523
7524 fi
7525 rm -f conftest.$ac_objext conftest.$ac_ext
7526       fi
7527     done
7528
7529     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7530
7531 echo "${as_me-configure}:7531: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7532
7533       cf_save_LIBS="$LIBS"
7534       cf_save_LDFLAGS="$LDFLAGS"
7535
7536       if test "$cf_cv_find_linkage_utf8" != yes ; then
7537
7538 cf_library_path_list=""
7539 if test -n "${LDFLAGS}${LIBS}" ; then
7540         for cf_library_path in $LDFLAGS $LIBS
7541         do
7542                 case $cf_library_path in #(vi
7543                 -L*)
7544                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7545
7546 test "$cf_library_path" != "NONE" && \
7547 test -d "$cf_library_path" && \
7548  {
7549         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7550         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7551         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7552         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7553         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7554         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7555 }
7556
7557                         cf_library_path_list="$cf_library_path_list $cf_search"
7558                         ;;
7559                 esac
7560         done
7561 fi
7562
7563 cf_search=""
7564
7565 test "/usr" != "$prefix" && \
7566 test -d "/usr" && \
7567 (test $prefix = NONE || test -d $prefix) && {
7568         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7569         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7570         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7571         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7572         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7573         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7574 }
7575
7576 test "$prefix" != "NONE" && \
7577 test -d "$prefix" && \
7578  {
7579         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7580         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7581         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7582         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7583         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7584         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7585 }
7586
7587 test "/usr/local" != "$prefix" && \
7588 test -d "/usr/local" && \
7589 (test $prefix = NONE || test -d $prefix) && {
7590         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7591         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7592         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7593         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7594         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7595         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7596 }
7597
7598 test "/opt" != "$prefix" && \
7599 test -d "/opt" && \
7600 (test $prefix = NONE || test -d $prefix) && {
7601         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7602         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7603         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7604         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7605         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7606         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7607 }
7608
7609 test "$HOME" != "$prefix" && \
7610 test -d "$HOME" && \
7611 (test $prefix = NONE || test -d $prefix) && {
7612         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7613         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7614         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7615         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7616         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7617         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7618 }
7619
7620 cf_search="$cf_library_path_list $cf_search"
7621
7622         for cf_cv_library_path_utf8 in $cf_search
7623         do
7624           if test -d $cf_cv_library_path_utf8 ; then
7625             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7626
7627 echo "${as_me-configure}:7627: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7628
7629             CPPFLAGS="$cf_test_CPPFLAGS"
7630             LIBS="-lutf8  $cf_save_LIBS"
7631             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7632             cat >conftest.$ac_ext <<_ACEOF
7633 #line 7633 "configure"
7634 #include "confdefs.h"
7635
7636 #include <libutf8.h>
7637 int
7638 main ()
7639 {
7640 putwc(0,0);
7641   ;
7642   return 0;
7643 }
7644 _ACEOF
7645 rm -f conftest.$ac_objext conftest$ac_exeext
7646 if { (eval echo "$as_me:7646: \"$ac_link\"") >&5
7647   (eval $ac_link) 2>&5
7648   ac_status=$?
7649   echo "$as_me:7649: \$? = $ac_status" >&5
7650   (exit $ac_status); } &&
7651          { ac_try='test -s conftest$ac_exeext'
7652   { (eval echo "$as_me:7652: \"$ac_try\"") >&5
7653   (eval $ac_try) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit $ac_status); }; }; then
7657
7658                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7659
7660 echo "${as_me-configure}:7660: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7661
7662                 cf_cv_find_linkage_utf8=yes
7663                 cf_cv_library_file_utf8="-lutf8"
7664                 break
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat conftest.$ac_ext >&5
7668
7669                 CPPFLAGS="$cf_save_CPPFLAGS"
7670                 LIBS="$cf_save_LIBS"
7671                 LDFLAGS="$cf_save_LDFLAGS"
7672
7673 fi
7674 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7675           fi
7676         done
7677         LIBS="$cf_save_LIBS"
7678         CPPFLAGS="$cf_save_CPPFLAGS"
7679         LDFLAGS="$cf_save_LDFLAGS"
7680       fi
7681
7682     else
7683       cf_cv_find_linkage_utf8=no
7684     fi
7685
7686 fi
7687 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7688
7689 if test "$cf_cv_find_linkage_utf8" = yes ; then
7690 cf_cv_utf8_lib=add-on
7691 else
7692 cf_cv_utf8_lib=no
7693 fi
7694
7695 fi
7696 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7697 fi
7698 echo "$as_me:7698: result: $cf_cv_utf8_lib" >&5
7699 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7700
7701 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7702 # ncurses/ncursesw:
7703 if test "$cf_cv_utf8_lib" = "add-on" ; then
7704         cat >>confdefs.h <<\EOF
7705 #define HAVE_LIBUTF8_H 1
7706 EOF
7707
7708 if test -n "$cf_cv_header_path_utf8" ; then
7709   for cf_add_incdir in $cf_cv_header_path_utf8
7710   do
7711         while test $cf_add_incdir != /usr/include
7712         do
7713           if test -d $cf_add_incdir
7714           then
7715                 cf_have_incdir=no
7716                 if test -n "$CFLAGS$CPPFLAGS" ; then
7717                   # a loop is needed to ensure we can add subdirs of existing dirs
7718                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7719                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7720                           cf_have_incdir=yes; break
7721                         fi
7722                   done
7723                 fi
7724
7725                 if test "$cf_have_incdir" = no ; then
7726                   if test "$cf_add_incdir" = /usr/local/include ; then
7727                         if test "$GCC" = yes
7728                         then
7729                           cf_save_CPPFLAGS=$CPPFLAGS
7730                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7731                           cat >conftest.$ac_ext <<_ACEOF
7732 #line 7732 "configure"
7733 #include "confdefs.h"
7734 #include <stdio.h>
7735 int
7736 main ()
7737 {
7738 printf("Hello")
7739   ;
7740   return 0;
7741 }
7742 _ACEOF
7743 rm -f conftest.$ac_objext
7744 if { (eval echo "$as_me:7744: \"$ac_compile\"") >&5
7745   (eval $ac_compile) 2>&5
7746   ac_status=$?
7747   echo "$as_me:7747: \$? = $ac_status" >&5
7748   (exit $ac_status); } &&
7749          { ac_try='test -s conftest.$ac_objext'
7750   { (eval echo "$as_me:7750: \"$ac_try\"") >&5
7751   (eval $ac_try) 2>&5
7752   ac_status=$?
7753   echo "$as_me:7753: \$? = $ac_status" >&5
7754   (exit $ac_status); }; }; then
7755   :
7756 else
7757   echo "$as_me: failed program was:" >&5
7758 cat conftest.$ac_ext >&5
7759 cf_have_incdir=yes
7760 fi
7761 rm -f conftest.$ac_objext conftest.$ac_ext
7762                           CPPFLAGS=$cf_save_CPPFLAGS
7763                         fi
7764                   fi
7765                 fi
7766
7767                 if test "$cf_have_incdir" = no ; then
7768                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7769
7770 echo "${as_me-configure}:7770: testing adding $cf_add_incdir to include-path ..." 1>&5
7771
7772                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7773
7774                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7775                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7776                   cf_add_incdir="$cf_top_incdir"
7777                 else
7778                   break
7779                 fi
7780           fi
7781         done
7782   done
7783 fi
7784
7785 if test -n "$cf_cv_library_path_utf8" ; then
7786   for cf_add_libdir in $cf_cv_library_path_utf8
7787   do
7788     if test $cf_add_libdir = /usr/lib ; then
7789       :
7790     elif test -d $cf_add_libdir
7791     then
7792       cf_have_libdir=no
7793       if test -n "$LDFLAGS$LIBS" ; then
7794         # a loop is needed to ensure we can add subdirs of existing dirs
7795         for cf_test_libdir in $LDFLAGS $LIBS ; do
7796           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
7797             cf_have_libdir=yes; break
7798           fi
7799         done
7800       fi
7801       if test "$cf_have_libdir" = no ; then
7802         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
7803
7804 echo "${as_me-configure}:7804: testing adding $cf_add_libdir to library-path ..." 1>&5
7805
7806         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
7807       fi
7808     fi
7809   done
7810 fi
7811
7812         LIBS="-lutf8 $LIBS"
7813 fi
7814
7815                 if test "$cf_cv_utf8_lib" != no ; then
7816                         NCURSES_LIBUTF8=1
7817                 fi
7818         fi
7819
7820 # This is needed on Tru64 5.0 to declare mbstate_t
7821 echo "$as_me:7821: checking if we must include wchar.h to declare mbstate_t" >&5
7822 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
7823 if test "${cf_cv_mbstate_t+set}" = set; then
7824   echo $ECHO_N "(cached) $ECHO_C" >&6
7825 else
7826
7827 cat >conftest.$ac_ext <<_ACEOF
7828 #line 7828 "configure"
7829 #include "confdefs.h"
7830
7831 #include <stdlib.h>
7832 #include <stdarg.h>
7833 #include <stdio.h>
7834 #ifdef HAVE_LIBUTF8_H
7835 #include <libutf8.h>
7836 #endif
7837 int
7838 main ()
7839 {
7840 mbstate_t state
7841   ;
7842   return 0;
7843 }
7844 _ACEOF
7845 rm -f conftest.$ac_objext
7846 if { (eval echo "$as_me:7846: \"$ac_compile\"") >&5
7847   (eval $ac_compile) 2>&5
7848   ac_status=$?
7849   echo "$as_me:7849: \$? = $ac_status" >&5
7850   (exit $ac_status); } &&
7851          { ac_try='test -s conftest.$ac_objext'
7852   { (eval echo "$as_me:7852: \"$ac_try\"") >&5
7853   (eval $ac_try) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit $ac_status); }; }; then
7857   cf_cv_mbstate_t=no
7858 else
7859   echo "$as_me: failed program was:" >&5
7860 cat conftest.$ac_ext >&5
7861 cat >conftest.$ac_ext <<_ACEOF
7862 #line 7862 "configure"
7863 #include "confdefs.h"
7864
7865 #include <stdlib.h>
7866 #include <stdarg.h>
7867 #include <stdio.h>
7868 #include <wchar.h>
7869 #ifdef HAVE_LIBUTF8_H
7870 #include <libutf8.h>
7871 #endif
7872 int
7873 main ()
7874 {
7875 mbstate_t value
7876   ;
7877   return 0;
7878 }
7879 _ACEOF
7880 rm -f conftest.$ac_objext
7881 if { (eval echo "$as_me:7881: \"$ac_compile\"") >&5
7882   (eval $ac_compile) 2>&5
7883   ac_status=$?
7884   echo "$as_me:7884: \$? = $ac_status" >&5
7885   (exit $ac_status); } &&
7886          { ac_try='test -s conftest.$ac_objext'
7887   { (eval echo "$as_me:7887: \"$ac_try\"") >&5
7888   (eval $ac_try) 2>&5
7889   ac_status=$?
7890   echo "$as_me:7890: \$? = $ac_status" >&5
7891   (exit $ac_status); }; }; then
7892   cf_cv_mbstate_t=yes
7893 else
7894   echo "$as_me: failed program was:" >&5
7895 cat conftest.$ac_ext >&5
7896 cf_cv_mbstate_t=unknown
7897 fi
7898 rm -f conftest.$ac_objext conftest.$ac_ext
7899 fi
7900 rm -f conftest.$ac_objext conftest.$ac_ext
7901 fi
7902 echo "$as_me:7902: result: $cf_cv_mbstate_t" >&5
7903 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
7904
7905 if test "$cf_cv_mbstate_t" = yes ; then
7906         cat >>confdefs.h <<\EOF
7907 #define NEED_WCHAR_H 1
7908 EOF
7909
7910         NEED_WCHAR_H=1
7911 fi
7912
7913 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
7914 if test "$cf_cv_mbstate_t" = unknown ; then
7915         NCURSES_MBSTATE_T=1
7916 fi
7917
7918 # This is needed on Tru64 5.0 to declare wchar_t
7919 echo "$as_me:7919: checking if we must include wchar.h to declare wchar_t" >&5
7920 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
7921 if test "${cf_cv_wchar_t+set}" = set; then
7922   echo $ECHO_N "(cached) $ECHO_C" >&6
7923 else
7924
7925 cat >conftest.$ac_ext <<_ACEOF
7926 #line 7926 "configure"
7927 #include "confdefs.h"
7928
7929 #include <stdlib.h>
7930 #include <stdarg.h>
7931 #include <stdio.h>
7932 #ifdef HAVE_LIBUTF8_H
7933 #include <libutf8.h>
7934 #endif
7935 int
7936 main ()
7937 {
7938 wchar_t state
7939   ;
7940   return 0;
7941 }
7942 _ACEOF
7943 rm -f conftest.$ac_objext
7944 if { (eval echo "$as_me:7944: \"$ac_compile\"") >&5
7945   (eval $ac_compile) 2>&5
7946   ac_status=$?
7947   echo "$as_me:7947: \$? = $ac_status" >&5
7948   (exit $ac_status); } &&
7949          { ac_try='test -s conftest.$ac_objext'
7950   { (eval echo "$as_me:7950: \"$ac_try\"") >&5
7951   (eval $ac_try) 2>&5
7952   ac_status=$?
7953   echo "$as_me:7953: \$? = $ac_status" >&5
7954   (exit $ac_status); }; }; then
7955   cf_cv_wchar_t=no
7956 else
7957   echo "$as_me: failed program was:" >&5
7958 cat conftest.$ac_ext >&5
7959 cat >conftest.$ac_ext <<_ACEOF
7960 #line 7960 "configure"
7961 #include "confdefs.h"
7962
7963 #include <stdlib.h>
7964 #include <stdarg.h>
7965 #include <stdio.h>
7966 #include <wchar.h>
7967 #ifdef HAVE_LIBUTF8_H
7968 #include <libutf8.h>
7969 #endif
7970 int
7971 main ()
7972 {
7973 wchar_t value
7974   ;
7975   return 0;
7976 }
7977 _ACEOF
7978 rm -f conftest.$ac_objext
7979 if { (eval echo "$as_me:7979: \"$ac_compile\"") >&5
7980   (eval $ac_compile) 2>&5
7981   ac_status=$?
7982   echo "$as_me:7982: \$? = $ac_status" >&5
7983   (exit $ac_status); } &&
7984          { ac_try='test -s conftest.$ac_objext'
7985   { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986   (eval $ac_try) 2>&5
7987   ac_status=$?
7988   echo "$as_me:7988: \$? = $ac_status" >&5
7989   (exit $ac_status); }; }; then
7990   cf_cv_wchar_t=yes
7991 else
7992   echo "$as_me: failed program was:" >&5
7993 cat conftest.$ac_ext >&5
7994 cf_cv_wchar_t=unknown
7995 fi
7996 rm -f conftest.$ac_objext conftest.$ac_ext
7997 fi
7998 rm -f conftest.$ac_objext conftest.$ac_ext
7999 fi
8000 echo "$as_me:8000: result: $cf_cv_wchar_t" >&5
8001 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8002
8003 if test "$cf_cv_wchar_t" = yes ; then
8004         cat >>confdefs.h <<\EOF
8005 #define NEED_WCHAR_H 1
8006 EOF
8007
8008         NEED_WCHAR_H=1
8009 fi
8010
8011 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8012 if test "$cf_cv_wchar_t" = unknown ; then
8013         NCURSES_WCHAR_T=1
8014 fi
8015
8016 # if we find wchar_t in either place, use substitution to provide a fallback.
8017 if test "$cf_cv_wchar_t" != unknown ; then
8018         NCURSES_OK_WCHAR_T=1
8019 fi
8020
8021 # This is needed on Tru64 5.0 to declare wint_t
8022 echo "$as_me:8022: checking if we must include wchar.h to declare wint_t" >&5
8023 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8024 if test "${cf_cv_wint_t+set}" = set; then
8025   echo $ECHO_N "(cached) $ECHO_C" >&6
8026 else
8027
8028 cat >conftest.$ac_ext <<_ACEOF
8029 #line 8029 "configure"
8030 #include "confdefs.h"
8031
8032 #include <stdlib.h>
8033 #include <stdarg.h>
8034 #include <stdio.h>
8035 #ifdef HAVE_LIBUTF8_H
8036 #include <libutf8.h>
8037 #endif
8038 int
8039 main ()
8040 {
8041 wint_t state
8042   ;
8043   return 0;
8044 }
8045 _ACEOF
8046 rm -f conftest.$ac_objext
8047 if { (eval echo "$as_me:8047: \"$ac_compile\"") >&5
8048   (eval $ac_compile) 2>&5
8049   ac_status=$?
8050   echo "$as_me:8050: \$? = $ac_status" >&5
8051   (exit $ac_status); } &&
8052          { ac_try='test -s conftest.$ac_objext'
8053   { (eval echo "$as_me:8053: \"$ac_try\"") >&5
8054   (eval $ac_try) 2>&5
8055   ac_status=$?
8056   echo "$as_me:8056: \$? = $ac_status" >&5
8057   (exit $ac_status); }; }; then
8058   cf_cv_wint_t=no
8059 else
8060   echo "$as_me: failed program was:" >&5
8061 cat conftest.$ac_ext >&5
8062 cat >conftest.$ac_ext <<_ACEOF
8063 #line 8063 "configure"
8064 #include "confdefs.h"
8065
8066 #include <stdlib.h>
8067 #include <stdarg.h>
8068 #include <stdio.h>
8069 #include <wchar.h>
8070 #ifdef HAVE_LIBUTF8_H
8071 #include <libutf8.h>
8072 #endif
8073 int
8074 main ()
8075 {
8076 wint_t value
8077   ;
8078   return 0;
8079 }
8080 _ACEOF
8081 rm -f conftest.$ac_objext
8082 if { (eval echo "$as_me:8082: \"$ac_compile\"") >&5
8083   (eval $ac_compile) 2>&5
8084   ac_status=$?
8085   echo "$as_me:8085: \$? = $ac_status" >&5
8086   (exit $ac_status); } &&
8087          { ac_try='test -s conftest.$ac_objext'
8088   { (eval echo "$as_me:8088: \"$ac_try\"") >&5
8089   (eval $ac_try) 2>&5
8090   ac_status=$?
8091   echo "$as_me:8091: \$? = $ac_status" >&5
8092   (exit $ac_status); }; }; then
8093   cf_cv_wint_t=yes
8094 else
8095   echo "$as_me: failed program was:" >&5
8096 cat conftest.$ac_ext >&5
8097 cf_cv_wint_t=unknown
8098 fi
8099 rm -f conftest.$ac_objext conftest.$ac_ext
8100 fi
8101 rm -f conftest.$ac_objext conftest.$ac_ext
8102 fi
8103 echo "$as_me:8103: result: $cf_cv_wint_t" >&5
8104 echo "${ECHO_T}$cf_cv_wint_t" >&6
8105
8106 if test "$cf_cv_wint_t" = yes ; then
8107         cat >>confdefs.h <<\EOF
8108 #define NEED_WCHAR_H 1
8109 EOF
8110
8111         NEED_WCHAR_H=1
8112 fi
8113
8114 # if we do not find wint_t in either place, use substitution to provide a fallback.
8115 if test "$cf_cv_wint_t" = unknown ; then
8116         NCURSES_WINT_T=1
8117 fi
8118
8119 # if we find wint_t in either place, use substitution to provide a fallback.
8120 if test "$cf_cv_wint_t" != unknown ; then
8121         NCURSES_OK_WINT_T=1
8122 fi
8123
8124         if test "$NCURSES_MBSTATE_T" != 0; then
8125                 cat >>confdefs.h <<\EOF
8126 #define NEED_MBSTATE_T_DEF 1
8127 EOF
8128
8129         fi
8130 fi
8131
8132 ###   use option --disable-lp64 to allow long chtype
8133 case $cf_cv_abi_version in
8134 [345]*)
8135         default_with_lp64=no
8136         ;;
8137 *)
8138         default_with_lp64=yes
8139         ;;
8140 esac
8141
8142 echo "$as_me:8142: checking whether to enable _LP64 definition in curses.h" >&5
8143 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8144
8145 # Check whether --enable-lp64 or --disable-lp64 was given.
8146 if test "${enable_lp64+set}" = set; then
8147   enableval="$enable_lp64"
8148   with_lp64=$enableval
8149 else
8150   with_lp64=$default_with_lp64
8151 fi;
8152 echo "$as_me:8152: result: $with_lp64" >&5
8153 echo "${ECHO_T}$with_lp64" >&6
8154
8155 if test "$with_lp64" = yes ; then
8156         cf_cv_enable_lp64=1
8157 else
8158         cf_cv_enable_lp64=0
8159 fi
8160
8161 # Check whether --enable-largefile or --disable-largefile was given.
8162 if test "${enable_largefile+set}" = set; then
8163   enableval="$enable_largefile"
8164
8165 fi;
8166 if test "$enable_largefile" != no; then
8167
8168   echo "$as_me:8168: checking for special C compiler options needed for large files" >&5
8169 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8170 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8171   echo $ECHO_N "(cached) $ECHO_C" >&6
8172 else
8173   ac_cv_sys_largefile_CC=no
8174      if test "$GCC" != yes; then
8175        ac_save_CC=$CC
8176        while :; do
8177          # IRIX 6.2 and later do not support large files by default,
8178          # so use the C compiler's -n32 option if that helps.
8179          cat >conftest.$ac_ext <<_ACEOF
8180 #line 8180 "configure"
8181 #include "confdefs.h"
8182 #include <sys/types.h>
8183  /* Check that off_t can represent 2**63 - 1 correctly.
8184     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8185     since some C++ compilers masquerading as C compilers
8186     incorrectly reject 9223372036854775807.  */
8187 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8188   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8189                        && LARGE_OFF_T % 2147483647 == 1)
8190                       ? 1 : -1];
8191 int
8192 main ()
8193 {
8194
8195   ;
8196   return 0;
8197 }
8198 _ACEOF
8199          rm -f conftest.$ac_objext
8200 if { (eval echo "$as_me:8200: \"$ac_compile\"") >&5
8201   (eval $ac_compile) 2>&5
8202   ac_status=$?
8203   echo "$as_me:8203: \$? = $ac_status" >&5
8204   (exit $ac_status); } &&
8205          { ac_try='test -s conftest.$ac_objext'
8206   { (eval echo "$as_me:8206: \"$ac_try\"") >&5
8207   (eval $ac_try) 2>&5
8208   ac_status=$?
8209   echo "$as_me:8209: \$? = $ac_status" >&5
8210   (exit $ac_status); }; }; then
8211   break
8212 else
8213   echo "$as_me: failed program was:" >&5
8214 cat conftest.$ac_ext >&5
8215 fi
8216 rm -f conftest.$ac_objext
8217          CC="$CC -n32"
8218          rm -f conftest.$ac_objext
8219 if { (eval echo "$as_me:8219: \"$ac_compile\"") >&5
8220   (eval $ac_compile) 2>&5
8221   ac_status=$?
8222   echo "$as_me:8222: \$? = $ac_status" >&5
8223   (exit $ac_status); } &&
8224          { ac_try='test -s conftest.$ac_objext'
8225   { (eval echo "$as_me:8225: \"$ac_try\"") >&5
8226   (eval $ac_try) 2>&5
8227   ac_status=$?
8228   echo "$as_me:8228: \$? = $ac_status" >&5
8229   (exit $ac_status); }; }; then
8230   ac_cv_sys_largefile_CC=' -n32'; break
8231 else
8232   echo "$as_me: failed program was:" >&5
8233 cat conftest.$ac_ext >&5
8234 fi
8235 rm -f conftest.$ac_objext
8236          break
8237        done
8238        CC=$ac_save_CC
8239        rm -f conftest.$ac_ext
8240     fi
8241 fi
8242 echo "$as_me:8242: result: $ac_cv_sys_largefile_CC" >&5
8243 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8244   if test "$ac_cv_sys_largefile_CC" != no; then
8245     CC=$CC$ac_cv_sys_largefile_CC
8246   fi
8247
8248   echo "$as_me:8248: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8249 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8250 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8251   echo $ECHO_N "(cached) $ECHO_C" >&6
8252 else
8253   while :; do
8254   ac_cv_sys_file_offset_bits=no
8255   cat >conftest.$ac_ext <<_ACEOF
8256 #line 8256 "configure"
8257 #include "confdefs.h"
8258 #include <sys/types.h>
8259  /* Check that off_t can represent 2**63 - 1 correctly.
8260     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8261     since some C++ compilers masquerading as C compilers
8262     incorrectly reject 9223372036854775807.  */
8263 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8264   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8265                        && LARGE_OFF_T % 2147483647 == 1)
8266                       ? 1 : -1];
8267 int
8268 main ()
8269 {
8270
8271   ;
8272   return 0;
8273 }
8274 _ACEOF
8275 rm -f conftest.$ac_objext
8276 if { (eval echo "$as_me:8276: \"$ac_compile\"") >&5
8277   (eval $ac_compile) 2>&5
8278   ac_status=$?
8279   echo "$as_me:8279: \$? = $ac_status" >&5
8280   (exit $ac_status); } &&
8281          { ac_try='test -s conftest.$ac_objext'
8282   { (eval echo "$as_me:8282: \"$ac_try\"") >&5
8283   (eval $ac_try) 2>&5
8284   ac_status=$?
8285   echo "$as_me:8285: \$? = $ac_status" >&5
8286   (exit $ac_status); }; }; then
8287   break
8288 else
8289   echo "$as_me: failed program was:" >&5
8290 cat conftest.$ac_ext >&5
8291 fi
8292 rm -f conftest.$ac_objext conftest.$ac_ext
8293   cat >conftest.$ac_ext <<_ACEOF
8294 #line 8294 "configure"
8295 #include "confdefs.h"
8296 #define _FILE_OFFSET_BITS 64
8297 #include <sys/types.h>
8298  /* Check that off_t can represent 2**63 - 1 correctly.
8299     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8300     since some C++ compilers masquerading as C compilers
8301     incorrectly reject 9223372036854775807.  */
8302 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8303   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8304                        && LARGE_OFF_T % 2147483647 == 1)
8305                       ? 1 : -1];
8306 int
8307 main ()
8308 {
8309
8310   ;
8311   return 0;
8312 }
8313 _ACEOF
8314 rm -f conftest.$ac_objext
8315 if { (eval echo "$as_me:8315: \"$ac_compile\"") >&5
8316   (eval $ac_compile) 2>&5
8317   ac_status=$?
8318   echo "$as_me:8318: \$? = $ac_status" >&5
8319   (exit $ac_status); } &&
8320          { ac_try='test -s conftest.$ac_objext'
8321   { (eval echo "$as_me:8321: \"$ac_try\"") >&5
8322   (eval $ac_try) 2>&5
8323   ac_status=$?
8324   echo "$as_me:8324: \$? = $ac_status" >&5
8325   (exit $ac_status); }; }; then
8326   ac_cv_sys_file_offset_bits=64; break
8327 else
8328   echo "$as_me: failed program was:" >&5
8329 cat conftest.$ac_ext >&5
8330 fi
8331 rm -f conftest.$ac_objext conftest.$ac_ext
8332   break
8333 done
8334 fi
8335 echo "$as_me:8335: result: $ac_cv_sys_file_offset_bits" >&5
8336 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8337 if test "$ac_cv_sys_file_offset_bits" != no; then
8338
8339 cat >>confdefs.h <<EOF
8340 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8341 EOF
8342
8343 fi
8344 rm -f conftest*
8345   echo "$as_me:8345: checking for _LARGE_FILES value needed for large files" >&5
8346 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8347 if test "${ac_cv_sys_large_files+set}" = set; then
8348   echo $ECHO_N "(cached) $ECHO_C" >&6
8349 else
8350   while :; do
8351   ac_cv_sys_large_files=no
8352   cat >conftest.$ac_ext <<_ACEOF
8353 #line 8353 "configure"
8354 #include "confdefs.h"
8355 #include <sys/types.h>
8356  /* Check that off_t can represent 2**63 - 1 correctly.
8357     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8358     since some C++ compilers masquerading as C compilers
8359     incorrectly reject 9223372036854775807.  */
8360 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8361   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8362                        && LARGE_OFF_T % 2147483647 == 1)
8363                       ? 1 : -1];
8364 int
8365 main ()
8366 {
8367
8368   ;
8369   return 0;
8370 }
8371 _ACEOF
8372 rm -f conftest.$ac_objext
8373 if { (eval echo "$as_me:8373: \"$ac_compile\"") >&5
8374   (eval $ac_compile) 2>&5
8375   ac_status=$?
8376   echo "$as_me:8376: \$? = $ac_status" >&5
8377   (exit $ac_status); } &&
8378          { ac_try='test -s conftest.$ac_objext'
8379   { (eval echo "$as_me:8379: \"$ac_try\"") >&5
8380   (eval $ac_try) 2>&5
8381   ac_status=$?
8382   echo "$as_me:8382: \$? = $ac_status" >&5
8383   (exit $ac_status); }; }; then
8384   break
8385 else
8386   echo "$as_me: failed program was:" >&5
8387 cat conftest.$ac_ext >&5
8388 fi
8389 rm -f conftest.$ac_objext conftest.$ac_ext
8390   cat >conftest.$ac_ext <<_ACEOF
8391 #line 8391 "configure"
8392 #include "confdefs.h"
8393 #define _LARGE_FILES 1
8394 #include <sys/types.h>
8395  /* Check that off_t can represent 2**63 - 1 correctly.
8396     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8397     since some C++ compilers masquerading as C compilers
8398     incorrectly reject 9223372036854775807.  */
8399 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8400   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8401                        && LARGE_OFF_T % 2147483647 == 1)
8402                       ? 1 : -1];
8403 int
8404 main ()
8405 {
8406
8407   ;
8408   return 0;
8409 }
8410 _ACEOF
8411 rm -f conftest.$ac_objext
8412 if { (eval echo "$as_me:8412: \"$ac_compile\"") >&5
8413   (eval $ac_compile) 2>&5
8414   ac_status=$?
8415   echo "$as_me:8415: \$? = $ac_status" >&5
8416   (exit $ac_status); } &&
8417          { ac_try='test -s conftest.$ac_objext'
8418   { (eval echo "$as_me:8418: \"$ac_try\"") >&5
8419   (eval $ac_try) 2>&5
8420   ac_status=$?
8421   echo "$as_me:8421: \$? = $ac_status" >&5
8422   (exit $ac_status); }; }; then
8423   ac_cv_sys_large_files=1; break
8424 else
8425   echo "$as_me: failed program was:" >&5
8426 cat conftest.$ac_ext >&5
8427 fi
8428 rm -f conftest.$ac_objext conftest.$ac_ext
8429   break
8430 done
8431 fi
8432 echo "$as_me:8432: result: $ac_cv_sys_large_files" >&5
8433 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8434 if test "$ac_cv_sys_large_files" != no; then
8435
8436 cat >>confdefs.h <<EOF
8437 #define _LARGE_FILES $ac_cv_sys_large_files
8438 EOF
8439
8440 fi
8441 rm -f conftest*
8442 fi
8443
8444     if test "$enable_largefile" != no ; then
8445         echo "$as_me:8445: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8446 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8447 if test "${ac_cv_sys_largefile_source+set}" = set; then
8448   echo $ECHO_N "(cached) $ECHO_C" >&6
8449 else
8450   while :; do
8451   ac_cv_sys_largefile_source=no
8452   cat >conftest.$ac_ext <<_ACEOF
8453 #line 8453 "configure"
8454 #include "confdefs.h"
8455 #include <stdio.h>
8456 int
8457 main ()
8458 {
8459 return !fseeko;
8460   ;
8461   return 0;
8462 }
8463 _ACEOF
8464 rm -f conftest.$ac_objext
8465 if { (eval echo "$as_me:8465: \"$ac_compile\"") >&5
8466   (eval $ac_compile) 2>&5
8467   ac_status=$?
8468   echo "$as_me:8468: \$? = $ac_status" >&5
8469   (exit $ac_status); } &&
8470          { ac_try='test -s conftest.$ac_objext'
8471   { (eval echo "$as_me:8471: \"$ac_try\"") >&5
8472   (eval $ac_try) 2>&5
8473   ac_status=$?
8474   echo "$as_me:8474: \$? = $ac_status" >&5
8475   (exit $ac_status); }; }; then
8476   break
8477 else
8478   echo "$as_me: failed program was:" >&5
8479 cat conftest.$ac_ext >&5
8480 fi
8481 rm -f conftest.$ac_objext conftest.$ac_ext
8482   cat >conftest.$ac_ext <<_ACEOF
8483 #line 8483 "configure"
8484 #include "confdefs.h"
8485 #define _LARGEFILE_SOURCE 1
8486 #include <stdio.h>
8487 int
8488 main ()
8489 {
8490 return !fseeko;
8491   ;
8492   return 0;
8493 }
8494 _ACEOF
8495 rm -f conftest.$ac_objext
8496 if { (eval echo "$as_me:8496: \"$ac_compile\"") >&5
8497   (eval $ac_compile) 2>&5
8498   ac_status=$?
8499   echo "$as_me:8499: \$? = $ac_status" >&5
8500   (exit $ac_status); } &&
8501          { ac_try='test -s conftest.$ac_objext'
8502   { (eval echo "$as_me:8502: \"$ac_try\"") >&5
8503   (eval $ac_try) 2>&5
8504   ac_status=$?
8505   echo "$as_me:8505: \$? = $ac_status" >&5
8506   (exit $ac_status); }; }; then
8507   ac_cv_sys_largefile_source=1; break
8508 else
8509   echo "$as_me: failed program was:" >&5
8510 cat conftest.$ac_ext >&5
8511 fi
8512 rm -f conftest.$ac_objext conftest.$ac_ext
8513   break
8514 done
8515 fi
8516 echo "$as_me:8516: result: $ac_cv_sys_largefile_source" >&5
8517 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8518 if test "$ac_cv_sys_largefile_source" != no; then
8519
8520 cat >>confdefs.h <<EOF
8521 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8522 EOF
8523
8524 fi
8525 rm -f conftest*
8526
8527 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8528 # in glibc 2.1.3, but that breaks too many other things.
8529 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8530 echo "$as_me:8530: checking for fseeko" >&5
8531 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8532 if test "${ac_cv_func_fseeko+set}" = set; then
8533   echo $ECHO_N "(cached) $ECHO_C" >&6
8534 else
8535   cat >conftest.$ac_ext <<_ACEOF
8536 #line 8536 "configure"
8537 #include "confdefs.h"
8538 #include <stdio.h>
8539 int
8540 main ()
8541 {
8542 return fseeko && fseeko (stdin, 0, 0);
8543   ;
8544   return 0;
8545 }
8546 _ACEOF
8547 rm -f conftest.$ac_objext conftest$ac_exeext
8548 if { (eval echo "$as_me:8548: \"$ac_link\"") >&5
8549   (eval $ac_link) 2>&5
8550   ac_status=$?
8551   echo "$as_me:8551: \$? = $ac_status" >&5
8552   (exit $ac_status); } &&
8553          { ac_try='test -s conftest$ac_exeext'
8554   { (eval echo "$as_me:8554: \"$ac_try\"") >&5
8555   (eval $ac_try) 2>&5
8556   ac_status=$?
8557   echo "$as_me:8557: \$? = $ac_status" >&5
8558   (exit $ac_status); }; }; then
8559   ac_cv_func_fseeko=yes
8560 else
8561   echo "$as_me: failed program was:" >&5
8562 cat conftest.$ac_ext >&5
8563 ac_cv_func_fseeko=no
8564 fi
8565 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8566 fi
8567 echo "$as_me:8567: result: $ac_cv_func_fseeko" >&5
8568 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8569 if test $ac_cv_func_fseeko = yes; then
8570
8571 cat >>confdefs.h <<\EOF
8572 #define HAVE_FSEEKO 1
8573 EOF
8574
8575 fi
8576
8577         # Normally we would collect these definitions in the config.h,
8578         # but (like _XOPEN_SOURCE), some environments rely on having these
8579         # defined before any of the system headers are included.  Another
8580         # case comes up with C++, e.g., on AIX the compiler compiles the
8581         # header files by themselves before looking at the body files it is
8582         # told to compile.  For ncurses, those header files do not include
8583         # the config.h
8584         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8585         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8586         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8587
8588         echo "$as_me:8588: checking whether to use struct dirent64" >&5
8589 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8590 if test "${cf_cv_struct_dirent64+set}" = set; then
8591   echo $ECHO_N "(cached) $ECHO_C" >&6
8592 else
8593
8594                 cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597
8598 #include <sys/types.h>
8599 #include <dirent.h>
8600
8601 int
8602 main ()
8603 {
8604
8605                 /* if transitional largefile support is setup, this is true */
8606                 extern struct dirent64 * readdir(DIR *);
8607                 struct dirent64 *x = readdir((DIR *)0);
8608                 struct dirent *y = readdir((DIR *)0);
8609                 int z = x - y;
8610
8611   ;
8612   return 0;
8613 }
8614 _ACEOF
8615 rm -f conftest.$ac_objext
8616 if { (eval echo "$as_me:8616: \"$ac_compile\"") >&5
8617   (eval $ac_compile) 2>&5
8618   ac_status=$?
8619   echo "$as_me:8619: \$? = $ac_status" >&5
8620   (exit $ac_status); } &&
8621          { ac_try='test -s conftest.$ac_objext'
8622   { (eval echo "$as_me:8622: \"$ac_try\"") >&5
8623   (eval $ac_try) 2>&5
8624   ac_status=$?
8625   echo "$as_me:8625: \$? = $ac_status" >&5
8626   (exit $ac_status); }; }; then
8627   cf_cv_struct_dirent64=yes
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8631 cf_cv_struct_dirent64=no
8632 fi
8633 rm -f conftest.$ac_objext conftest.$ac_ext
8634
8635 fi
8636 echo "$as_me:8636: result: $cf_cv_struct_dirent64" >&5
8637 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8638         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8639 #define HAVE_STRUCT_DIRENT64 1
8640 EOF
8641
8642     fi
8643
8644 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8645 echo "$as_me:8645: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8646 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8647
8648 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8649 if test "${enable_tparm_varargs+set}" = set; then
8650   enableval="$enable_tparm_varargs"
8651   with_tparm_varargs=$enableval
8652 else
8653   with_tparm_varargs=yes
8654 fi;
8655 echo "$as_me:8655: result: $with_tparm_varargs" >&5
8656 echo "${ECHO_T}$with_tparm_varargs" >&6
8657 NCURSES_TPARM_VARARGS=0
8658 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8659
8660 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8661 if test "$with_ticlib" != no ; then
8662 echo "$as_me:8662: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8663 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8664
8665 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8666 if test "${enable_tic_depends+set}" = set; then
8667   enableval="$enable_tic_depends"
8668   with_tic_depends=$enableval
8669 else
8670   with_tic_depends=yes
8671 fi;
8672 echo "$as_me:8672: result: $with_tic_depends" >&5
8673 echo "${ECHO_T}$with_tic_depends" >&6
8674 else
8675         with_tic_depends=no
8676 fi
8677
8678 ###   use option --with-bool to override bool's type
8679 echo "$as_me:8679: checking for type of bool" >&5
8680 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8681
8682 # Check whether --with-bool or --without-bool was given.
8683 if test "${with_bool+set}" = set; then
8684   withval="$with_bool"
8685   NCURSES_BOOL="$withval"
8686 else
8687   NCURSES_BOOL=auto
8688 fi;
8689 echo "$as_me:8689: result: $NCURSES_BOOL" >&5
8690 echo "${ECHO_T}$NCURSES_BOOL" >&6
8691
8692 echo "$as_me:8692: checking for alternate terminal capabilities file" >&5
8693 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8694
8695 # Check whether --with-caps or --without-caps was given.
8696 if test "${with_caps+set}" = set; then
8697   withval="$with_caps"
8698   TERMINFO_CAPS=Caps.$withval
8699 else
8700   TERMINFO_CAPS=Caps
8701 fi;
8702 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8703 echo "$as_me:8703: result: $TERMINFO_CAPS" >&5
8704 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8705
8706 ###   use option --with-chtype to override chtype's type
8707 echo "$as_me:8707: checking for type of chtype" >&5
8708 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8709
8710 # Check whether --with-chtype or --without-chtype was given.
8711 if test "${with_chtype+set}" = set; then
8712   withval="$with_chtype"
8713   NCURSES_CHTYPE="$withval"
8714 else
8715   NCURSES_CHTYPE=auto
8716 fi;
8717 echo "$as_me:8717: result: $NCURSES_CHTYPE" >&5
8718 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8719
8720 ###   use option --with-ospeed to override ospeed's type
8721 echo "$as_me:8721: checking for type of ospeed" >&5
8722 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8723
8724 # Check whether --with-ospeed or --without-ospeed was given.
8725 if test "${with_ospeed+set}" = set; then
8726   withval="$with_ospeed"
8727   NCURSES_OSPEED="$withval"
8728 else
8729   NCURSES_OSPEED=short
8730 fi;
8731 echo "$as_me:8731: result: $NCURSES_OSPEED" >&5
8732 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8733
8734 ###   use option --with-mmask-t to override mmask_t's type
8735 echo "$as_me:8735: checking for type of mmask_t" >&5
8736 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8737
8738 # Check whether --with-mmask-t or --without-mmask-t was given.
8739 if test "${with_mmask_t+set}" = set; then
8740   withval="$with_mmask_t"
8741   NCURSES_MMASK_T="$withval"
8742 else
8743   NCURSES_MMASK_T=auto
8744 fi;
8745 echo "$as_me:8745: result: $NCURSES_MMASK_T" >&5
8746 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8747
8748 ###   use option --with-ccharw-max to override CCHARW_MAX size
8749 echo "$as_me:8749: checking for size CCHARW_MAX" >&5
8750 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
8751
8752 # Check whether --with-ccharw-max or --without-ccharw-max was given.
8753 if test "${with_ccharw_max+set}" = set; then
8754   withval="$with_ccharw_max"
8755   NCURSES_CCHARW_MAX="$withval"
8756 else
8757   NCURSES_CCHARW_MAX=5
8758 fi;
8759 echo "$as_me:8759: result: $NCURSES_CCHARW_MAX" >&5
8760 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
8761
8762 ### Enable compiling-in rcs id's
8763 echo "$as_me:8763: checking if RCS identifiers should be compiled-in" >&5
8764 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8765
8766 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8767 if test "${with_rcs_ids+set}" = set; then
8768   withval="$with_rcs_ids"
8769   with_rcs_ids=$withval
8770 else
8771   with_rcs_ids=no
8772 fi;
8773 echo "$as_me:8773: result: $with_rcs_ids" >&5
8774 echo "${ECHO_T}$with_rcs_ids" >&6
8775 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8776 #define USE_RCS_IDS 1
8777 EOF
8778
8779 ###############################################################################
8780
8781 echo "$as_me:8781: checking format of man-pages" >&5
8782 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8783
8784 # Check whether --with-manpage-format or --without-manpage-format was given.
8785 if test "${with_manpage_format+set}" = set; then
8786   withval="$with_manpage_format"
8787   MANPAGE_FORMAT=$withval
8788 else
8789   MANPAGE_FORMAT=unknown
8790 fi;
8791
8792 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8793 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8794
8795 cf_unknown=
8796
8797 case $MANPAGE_FORMAT in
8798 unknown)
8799   if test -z "$MANPATH" ; then
8800     MANPATH="/usr/man:/usr/share/man"
8801   fi
8802
8803   # look for the 'date' man-page (it's most likely to be installed!)
8804   MANPAGE_FORMAT=
8805   cf_preform=no
8806   cf_catonly=yes
8807   cf_example=date
8808
8809   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
8810   for cf_dir in $MANPATH; do
8811     test -z "$cf_dir" && cf_dir=/usr/man
8812     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
8813     do
8814       cf_test=`echo $cf_name | sed -e 's/*//'`
8815       if test "x$cf_test" = "x$cf_name" ; then
8816
8817         case "$cf_name" in
8818         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
8819         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
8820         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
8821         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
8822         esac
8823
8824         case "$cf_name" in
8825         $cf_dir/man*)
8826           cf_catonly=no
8827           ;;
8828         $cf_dir/cat*)
8829           cf_preform=yes
8830           ;;
8831         esac
8832         break
8833       fi
8834
8835       # if we found a match in either man* or cat*, stop looking
8836       if test -n "$MANPAGE_FORMAT" ; then
8837         cf_found=no
8838         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
8839         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
8840         case "$cf_name" in
8841         $cf_dir/cat*)
8842           cf_found=yes
8843           ;;
8844         esac
8845         test $cf_found=yes && break
8846       fi
8847     done
8848     # only check the first directory in $MANPATH where we find manpages
8849     if test -n "$MANPAGE_FORMAT" ; then
8850        break
8851     fi
8852   done
8853   # if we did not find the example, just assume it is normal
8854   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
8855   IFS="$ac_save_ifs"
8856   ;;
8857 *)
8858   for cf_option in $MANPAGE_FORMAT; do
8859      case $cf_option in #(vi
8860      gzip|compress|BSDI|normal|formatted|catonly)
8861        ;;
8862      *)
8863        cf_unknown="$cf_unknown $cf_option"
8864        ;;
8865      esac
8866   done
8867   ;;
8868 esac
8869
8870 echo "$as_me:8870: result: $MANPAGE_FORMAT" >&5
8871 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
8872 if test -n "$cf_unknown" ; then
8873   { echo "$as_me:8873: WARNING: Unexpected manpage-format $cf_unknown" >&5
8874 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
8875 fi
8876
8877 echo "$as_me:8877: checking for manpage renaming" >&5
8878 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
8879
8880 # Check whether --with-manpage-renames or --without-manpage-renames was given.
8881 if test "${with_manpage_renames+set}" = set; then
8882   withval="$with_manpage_renames"
8883   MANPAGE_RENAMES=$withval
8884 else
8885   MANPAGE_RENAMES=yes
8886 fi;
8887
8888 case ".$MANPAGE_RENAMES" in #(vi
8889 .no) #(vi
8890   ;;
8891 .|.yes)
8892   # Debian 'man' program?
8893   if test -f /etc/debian_version ; then
8894     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
8895   else
8896     MANPAGE_RENAMES=no
8897   fi
8898   ;;
8899 esac
8900
8901 if test "$MANPAGE_RENAMES" != no ; then
8902   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
8903     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
8904   elif test ! -f $MANPAGE_RENAMES ; then
8905     { { echo "$as_me:8905: error: not a filename: $MANPAGE_RENAMES" >&5
8906 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
8907    { (exit 1); exit 1; }; }
8908   fi
8909
8910   test ! -d man && mkdir man
8911
8912   # Construct a sed-script to perform renaming within man-pages
8913   if test -n "$MANPAGE_RENAMES" ; then
8914     test ! -d man && mkdir man
8915     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
8916   fi
8917 fi
8918
8919 echo "$as_me:8919: result: $MANPAGE_RENAMES" >&5
8920 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
8921
8922 echo "$as_me:8922: checking if manpage aliases will be installed" >&5
8923 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
8924
8925 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
8926 if test "${with_manpage_aliases+set}" = set; then
8927   withval="$with_manpage_aliases"
8928   MANPAGE_ALIASES=$withval
8929 else
8930   MANPAGE_ALIASES=yes
8931 fi;
8932
8933 echo "$as_me:8933: result: $MANPAGE_ALIASES" >&5
8934 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
8935
8936 if test "$LN_S" = "ln -s"; then
8937         cf_use_symlinks=yes
8938 else
8939         cf_use_symlinks=no
8940 fi
8941
8942 MANPAGE_SYMLINKS=no
8943 if test "$MANPAGE_ALIASES" = yes ; then
8944 echo "$as_me:8944: checking if manpage symlinks should be used" >&5
8945 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
8946
8947 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
8948 if test "${with_manpage_symlinks+set}" = set; then
8949   withval="$with_manpage_symlinks"
8950   MANPAGE_SYMLINKS=$withval
8951 else
8952   MANPAGE_SYMLINKS=$cf_use_symlinks
8953 fi;
8954
8955 if test "$$cf_use_symlinks" = no; then
8956 if test "$MANPAGE_SYMLINKS" = yes ; then
8957         { echo "$as_me:8957: WARNING: cannot make symlinks" >&5
8958 echo "$as_me: WARNING: cannot make symlinks" >&2;}
8959         MANPAGE_SYMLINKS=no
8960 fi
8961 fi
8962
8963 echo "$as_me:8963: result: $MANPAGE_SYMLINKS" >&5
8964 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
8965 fi
8966
8967 echo "$as_me:8967: checking for manpage tbl" >&5
8968 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
8969
8970 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
8971 if test "${with_manpage_tbl+set}" = set; then
8972   withval="$with_manpage_tbl"
8973   MANPAGE_TBL=$withval
8974 else
8975   MANPAGE_TBL=no
8976 fi;
8977
8978 echo "$as_me:8978: result: $MANPAGE_TBL" >&5
8979 echo "${ECHO_T}$MANPAGE_TBL" >&6
8980
8981   if test "$prefix" = "NONE" ; then
8982      cf_prefix="$ac_default_prefix"
8983   else
8984      cf_prefix="$prefix"
8985   fi
8986
8987   case "$MANPAGE_FORMAT" in # (vi
8988   *catonly*) # (vi
8989     cf_format=yes
8990     cf_inboth=no
8991     ;;
8992   *formatted*) # (vi
8993     cf_format=yes
8994     cf_inboth=yes
8995     ;;
8996   *)
8997     cf_format=no
8998     cf_inboth=no
8999     ;;
9000   esac
9001
9002 test ! -d man && mkdir man
9003
9004 cf_so_strip=
9005 cf_compress=
9006 case "$MANPAGE_FORMAT" in #(vi
9007 *compress*) #(vi
9008         cf_so_strip="Z"
9009         cf_compress=compress
9010   ;;
9011 *gzip*) #(vi
9012         cf_so_strip="gz"
9013         cf_compress=gzip
9014   ;;
9015 esac
9016
9017 cf_edit_man=./edit_man.sh
9018 cf_man_alias=`pwd`/man_alias.sed
9019
9020 cat >$cf_edit_man <<CF_EOF
9021 #! /bin/sh
9022 # this script is generated by the configure-script CF_MAN_PAGES macro.
9023
9024 prefix="$cf_prefix"
9025 datadir="$datadir"
9026
9027 NCURSES_MAJOR="$NCURSES_MAJOR"
9028 NCURSES_MINOR="$NCURSES_MINOR"
9029 NCURSES_PATCH="$NCURSES_PATCH"
9030
9031 NCURSES_OSPEED="$NCURSES_OSPEED"
9032 TERMINFO="$TERMINFO"
9033
9034 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9035
9036 INSTALL="$INSTALL"
9037 INSTALL_DATA="$INSTALL_DATA"
9038
9039 transform="$program_transform_name"
9040
9041 TMP=\${TMPDIR-/tmp}/man\$\$
9042 trap "rm -f \$TMP" 0 1 2 5 15
9043
9044 form=\$1
9045 shift || exit 1
9046
9047 verb=\$1
9048 shift || exit 1
9049
9050 mandir=\$1
9051 shift || exit 1
9052
9053 srcdir=\$1
9054 top_srcdir=\$srcdir/..
9055 shift || exit 1
9056
9057 if test "\$form" = normal ; then
9058         if test "$cf_format" = yes ; then
9059         if test "$cf_inboth" = no ; then
9060                 sh \$0 format \$verb \$mandir \$srcdir \$*
9061                 exit $?
9062         fi
9063         fi
9064         cf_subdir=\$mandir/man
9065         cf_tables=$MANPAGE_TBL
9066 else
9067         cf_subdir=\$mandir/cat
9068         cf_tables=yes
9069 fi
9070
9071 # process the list of source-files
9072 for i in \$* ; do
9073 case \$i in #(vi
9074 *.orig|*.rej) ;; #(vi
9075 *.[0-9]*)
9076         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9077         if test \$verb = installing ; then
9078         if test ! -d \$cf_subdir\${section} ; then
9079                 \$MKDIRS \$cf_subdir\$section
9080         fi
9081         fi
9082
9083         # replace variables in man page
9084         if test ! -f $cf_man_alias ; then
9085 cat >>$cf_man_alias <<-CF_EOF2
9086                 s,@DATADIR@,\$datadir,g
9087                 s,@TERMINFO@,\$TERMINFO,g
9088                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9089                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9090                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9091                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9092 CF_EOF
9093
9094         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9095         do
9096                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9097                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9098 cat >>$cf_edit_man <<-CF_EOF
9099                 s,@$cf_NAME@,$cf_name,
9100 CF_EOF
9101         done
9102
9103 cat >>$cf_edit_man <<CF_EOF
9104 CF_EOF2
9105                 echo "...made $cf_man_alias"
9106         fi
9107
9108         aliases=
9109         cf_source=\`basename \$i\`
9110         inalias=\$cf_source
9111         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9112         if test ! -f \$inalias ; then
9113                 echo .. skipped \$cf_source
9114                 continue
9115         fi
9116 CF_EOF
9117
9118 if test "$MANPAGE_ALIASES" != no ; then
9119 cat >>$cf_edit_man <<CF_EOF
9120         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9121 CF_EOF
9122 fi
9123
9124 if test "$MANPAGE_RENAMES" = no ; then
9125 cat >>$cf_edit_man <<CF_EOF
9126         # perform program transformations for section 1 man pages
9127         if test \$section = 1 ; then
9128                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9129         else
9130                 cf_target=\$cf_subdir\${section}/\$cf_source
9131         fi
9132 CF_EOF
9133 else
9134 cat >>$cf_edit_man <<CF_EOF
9135         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9136         if test -z "\$cf_target" ; then
9137                 echo '? missing rename for '\$cf_source
9138                 cf_target="\$cf_source"
9139         fi
9140         cf_target="\$cf_subdir\${section}/\${cf_target}"
9141
9142 CF_EOF
9143 fi
9144
9145 cat >>$cf_edit_man <<CF_EOF
9146         sed     -f $cf_man_alias \\
9147 CF_EOF
9148
9149 if test -f $MANPAGE_RENAMES ; then
9150 cat >>$cf_edit_man <<CF_EOF
9151                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9152 CF_EOF
9153 else
9154 cat >>$cf_edit_man <<CF_EOF
9155                 < \$i >\$TMP
9156 CF_EOF
9157 fi
9158
9159 cat >>$cf_edit_man <<CF_EOF
9160 if test \$cf_tables = yes ; then
9161         tbl \$TMP >\$TMP.out
9162         mv \$TMP.out \$TMP
9163 fi
9164 CF_EOF
9165
9166 if test $with_curses_h != yes ; then
9167 cat >>$cf_edit_man <<CF_EOF
9168         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9169         mv \$TMP.out \$TMP
9170 CF_EOF
9171 fi
9172
9173 cat >>$cf_edit_man <<CF_EOF
9174         if test \$form = format ; then
9175                 nroff -man \$TMP >\$TMP.out
9176                 mv \$TMP.out \$TMP
9177         fi
9178 CF_EOF
9179
9180 if test -n "$cf_compress" ; then
9181 cat >>$cf_edit_man <<CF_EOF
9182         if test \$verb = installing ; then
9183         if ( $cf_compress -f \$TMP )
9184         then
9185                 mv \$TMP.$cf_so_strip \$TMP
9186         fi
9187         fi
9188         cf_target="\$cf_target.$cf_so_strip"
9189 CF_EOF
9190 fi
9191
9192 case "$MANPAGE_FORMAT" in #(vi
9193 *BSDI*)
9194 cat >>$cf_edit_man <<CF_EOF
9195         if test \$form = format ; then
9196                 # BSDI installs only .0 suffixes in the cat directories
9197                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9198         fi
9199 CF_EOF
9200   ;;
9201 esac
9202
9203 cat >>$cf_edit_man <<CF_EOF
9204         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9205         if test \$verb = installing ; then
9206                 echo \$verb \$cf_target
9207                 \$INSTALL_DATA \$TMP \$cf_target
9208                 test -d \$cf_subdir\${section} &&
9209                 test -n "\$aliases" && (
9210                         cd \$cf_subdir\${section} && (
9211                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9212                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9213                                 cf_target=\`basename \$cf_target\`
9214                                 for cf_alias in \$aliases
9215                                 do
9216                                         if test \$section = 1 ; then
9217                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9218                                         fi
9219
9220                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9221                                                 if test -f \$cf_alias\${suffix} ; then
9222                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9223                                                         then
9224                                                                 continue
9225                                                         fi
9226                                                 fi
9227                                                 echo .. \$verb alias \$cf_alias\${suffix}
9228                                                 rm -f \$cf_alias\${suffix}
9229                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9230                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9231                                                 echo ".so \$cf_source" >\$TMP
9232 CF_EOF
9233 if test -n "$cf_compress" ; then
9234 cat >>$cf_edit_man <<CF_EOF
9235                                                 if test -n "$cf_so_strip" ; then
9236                                                         $cf_compress -f \$TMP
9237                                                         mv \$TMP.$cf_so_strip \$TMP
9238                                                 fi
9239 CF_EOF
9240 fi
9241 cat >>$cf_edit_man <<CF_EOF
9242                                                 echo .. \$verb alias \$cf_alias\${suffix}
9243                                                 rm -f \$cf_alias\${suffix}
9244                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9245                                         fi
9246                                 done
9247                         )
9248                 )
9249         elif test \$verb = removing ; then
9250                 test -f \$cf_target && (
9251                         echo \$verb \$cf_target
9252                         rm -f \$cf_target
9253                 )
9254                 test -d \$cf_subdir\${section} &&
9255                 test -n "\$aliases" && (
9256                         cd \$cf_subdir\${section} && (
9257                                 for cf_alias in \$aliases
9258                                 do
9259                                         if test \$section = 1 ; then
9260                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9261                                         fi
9262
9263                                         echo .. \$verb alias \$cf_alias\${suffix}
9264                                         rm -f \$cf_alias\${suffix}
9265                                 done
9266                         )
9267                 )
9268         else
9269 #               echo ".hy 0"
9270                 cat \$TMP
9271         fi
9272         ;;
9273 esac
9274 done
9275
9276 if test $cf_inboth = yes ; then
9277 if test \$form != format ; then
9278         sh \$0 format \$verb \$mandir \$srcdir \$*
9279 fi
9280 fi
9281
9282 exit 0
9283 CF_EOF
9284 chmod 755 $cf_edit_man
9285
9286 ###############################################################################
9287
9288 ### Note that some functions (such as const) are normally disabled anyway.
9289 echo "$as_me:9289: checking if you want to build with function extensions" >&5
9290 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9291
9292 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9293 if test "${enable_ext_funcs+set}" = set; then
9294   enableval="$enable_ext_funcs"
9295   with_ext_funcs=$enableval
9296 else
9297   with_ext_funcs=yes
9298 fi;
9299 echo "$as_me:9299: result: $with_ext_funcs" >&5
9300 echo "${ECHO_T}$with_ext_funcs" >&6
9301 if test "$with_ext_funcs" = yes ; then
9302         NCURSES_EXT_FUNCS=1
9303         cat >>confdefs.h <<\EOF
9304 #define HAVE_CURSES_VERSION 1
9305 EOF
9306
9307         cat >>confdefs.h <<\EOF
9308 #define HAVE_HAS_KEY 1
9309 EOF
9310
9311         cat >>confdefs.h <<\EOF
9312 #define HAVE_RESIZETERM 1
9313 EOF
9314
9315         cat >>confdefs.h <<\EOF
9316 #define HAVE_RESIZE_TERM 1
9317 EOF
9318
9319         cat >>confdefs.h <<\EOF
9320 #define HAVE_USE_DEFAULT_COLORS 1
9321 EOF
9322
9323         cat >>confdefs.h <<\EOF
9324 #define HAVE_WRESIZE 1
9325 EOF
9326
9327         cat >>confdefs.h <<\EOF
9328 #define NCURSES_EXT_FUNCS 1
9329 EOF
9330
9331         GENERATED_EXT_FUNCS=generated
9332 else
9333         NCURSES_EXT_FUNCS=0
9334         GENERATED_EXT_FUNCS=
9335 fi
9336
9337 echo "$as_me:9337: checking if you want to build with experimental SCREEN extensions" >&5
9338 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9339
9340 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9341 if test "${enable_sp_funcs+set}" = set; then
9342   enableval="$enable_sp_funcs"
9343   with_sp_funcs=$enableval
9344 else
9345   with_sp_funcs=no
9346 fi;
9347 echo "$as_me:9347: result: $with_sp_funcs" >&5
9348 echo "${ECHO_T}$with_sp_funcs" >&6
9349 if test "$with_sp_funcs" = yes ; then
9350         NCURSES_SP_FUNCS=1
9351         cat >>confdefs.h <<\EOF
9352 #define NCURSES_SP_FUNCS 1
9353 EOF
9354
9355         GENERATED_SP_FUNCS=generated
9356 else
9357         NCURSES_SP_FUNCS=0
9358         GENERATED_SP_FUNCS=
9359 fi
9360
9361 ###   use option --enable-const to turn on use of const beyond that in XSI.
9362 echo "$as_me:9362: checking for extended use of const keyword" >&5
9363 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9364
9365 # Check whether --enable-const or --disable-const was given.
9366 if test "${enable_const+set}" = set; then
9367   enableval="$enable_const"
9368   with_ext_const=$enableval
9369 else
9370   with_ext_const=no
9371 fi;
9372 echo "$as_me:9372: result: $with_ext_const" >&5
9373 echo "${ECHO_T}$with_ext_const" >&6
9374 NCURSES_CONST='/*nothing*/'
9375 if test "$with_ext_const" = yes ; then
9376         NCURSES_CONST=const
9377 fi
9378
9379 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9380 echo "$as_me:9380: checking if you want to use extended colors" >&5
9381 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9382
9383 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9384 if test "${enable_ext_colors+set}" = set; then
9385   enableval="$enable_ext_colors"
9386   with_ext_colors=$enableval
9387 else
9388   with_ext_colors=no
9389 fi;
9390 echo "$as_me:9390: result: $with_ext_colors" >&5
9391 echo "${ECHO_T}$with_ext_colors" >&6
9392 NCURSES_EXT_COLORS=0
9393 if test "$with_ext_colors" = yes ; then
9394         if test "$with_widec" != yes ; then
9395                 { { echo "$as_me:9395: error: This option applies only to wide-character library" >&5
9396 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9397    { (exit 1); exit 1; }; }
9398         else
9399                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9400
9401 if test "${with_abi_version+set}" != set; then
9402         case $cf_cv_rel_version in
9403         5.*)
9404                 cf_cv_rel_version=6.0
9405                 cf_cv_abi_version=6
9406                 { echo "$as_me:9406: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9407 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9408                 ;;
9409         esac
9410 fi
9411
9412         fi
9413         NCURSES_EXT_COLORS=1
9414         cat >>confdefs.h <<\EOF
9415 #define NCURSES_EXT_COLORS 1
9416 EOF
9417
9418 fi
9419
9420 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9421 echo "$as_me:9421: checking if you want to use extended mouse encoding" >&5
9422 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9423
9424 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9425 if test "${enable_ext_mouse+set}" = set; then
9426   enableval="$enable_ext_mouse"
9427   with_ext_mouse=$enableval
9428 else
9429   with_ext_mouse=no
9430 fi;
9431 echo "$as_me:9431: result: $with_ext_mouse" >&5
9432 echo "${ECHO_T}$with_ext_mouse" >&6
9433 NCURSES_MOUSE_VERSION=1
9434 if test "$with_ext_mouse" = yes ; then
9435         NCURSES_MOUSE_VERSION=2
9436
9437 if test "${with_abi_version+set}" != set; then
9438         case $cf_cv_rel_version in
9439         5.*)
9440                 cf_cv_rel_version=6.0
9441                 cf_cv_abi_version=6
9442                 { echo "$as_me:9442: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9443 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9444                 ;;
9445         esac
9446 fi
9447
9448 fi
9449
9450 echo "$as_me:9450: checking if you want \$NCURSES_NO_PADDING code" >&5
9451 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9452
9453 # Check whether --enable-no-padding or --disable-no-padding was given.
9454 if test "${enable_no_padding+set}" = set; then
9455   enableval="$enable_no_padding"
9456   with_no_padding=$enableval
9457 else
9458   with_no_padding=$with_ext_funcs
9459 fi;
9460 echo "$as_me:9460: result: $with_no_padding" >&5
9461 echo "${ECHO_T}$with_no_padding" >&6
9462 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9463 #define NCURSES_NO_PADDING 1
9464 EOF
9465
9466 echo "$as_me:9466: checking for ANSI C header files" >&5
9467 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9468 if test "${ac_cv_header_stdc+set}" = set; then
9469   echo $ECHO_N "(cached) $ECHO_C" >&6
9470 else
9471   cat >conftest.$ac_ext <<_ACEOF
9472 #line 9472 "configure"
9473 #include "confdefs.h"
9474 #include <stdlib.h>
9475 #include <stdarg.h>
9476 #include <string.h>
9477 #include <float.h>
9478
9479 _ACEOF
9480 if { (eval echo "$as_me:9480: \"$ac_cpp conftest.$ac_ext\"") >&5
9481   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9482   ac_status=$?
9483   egrep -v '^ *\+' conftest.er1 >conftest.err
9484   rm -f conftest.er1
9485   cat conftest.err >&5
9486   echo "$as_me:9486: \$? = $ac_status" >&5
9487   (exit $ac_status); } >/dev/null; then
9488   if test -s conftest.err; then
9489     ac_cpp_err=$ac_c_preproc_warn_flag
9490   else
9491     ac_cpp_err=
9492   fi
9493 else
9494   ac_cpp_err=yes
9495 fi
9496 if test -z "$ac_cpp_err"; then
9497   ac_cv_header_stdc=yes
9498 else
9499   echo "$as_me: failed program was:" >&5
9500   cat conftest.$ac_ext >&5
9501   ac_cv_header_stdc=no
9502 fi
9503 rm -f conftest.err conftest.$ac_ext
9504
9505 if test $ac_cv_header_stdc = yes; then
9506   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9507   cat >conftest.$ac_ext <<_ACEOF
9508 #line 9508 "configure"
9509 #include "confdefs.h"
9510 #include <string.h>
9511
9512 _ACEOF
9513 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9514   egrep "memchr" >/dev/null 2>&1; then
9515   :
9516 else
9517   ac_cv_header_stdc=no
9518 fi
9519 rm -f conftest*
9520
9521 fi
9522
9523 if test $ac_cv_header_stdc = yes; then
9524   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9525   cat >conftest.$ac_ext <<_ACEOF
9526 #line 9526 "configure"
9527 #include "confdefs.h"
9528 #include <stdlib.h>
9529
9530 _ACEOF
9531 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9532   egrep "free" >/dev/null 2>&1; then
9533   :
9534 else
9535   ac_cv_header_stdc=no
9536 fi
9537 rm -f conftest*
9538
9539 fi
9540
9541 if test $ac_cv_header_stdc = yes; then
9542   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9543   if test "$cross_compiling" = yes; then
9544   :
9545 else
9546   cat >conftest.$ac_ext <<_ACEOF
9547 #line 9547 "configure"
9548 #include "confdefs.h"
9549 #include <ctype.h>
9550 #if ((' ' & 0x0FF) == 0x020)
9551 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9552 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9553 #else
9554 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9555                      || ('j' <= (c) && (c) <= 'r') \
9556                      || ('s' <= (c) && (c) <= 'z'))
9557 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9558 #endif
9559
9560 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9561 int
9562 main ()
9563 {
9564   int i;
9565   for (i = 0; i < 256; i++)
9566     if (XOR (islower (i), ISLOWER (i))
9567         || toupper (i) != TOUPPER (i))
9568       $ac_main_return(2);
9569   $ac_main_return (0);
9570 }
9571 _ACEOF
9572 rm -f conftest$ac_exeext
9573 if { (eval echo "$as_me:9573: \"$ac_link\"") >&5
9574   (eval $ac_link) 2>&5
9575   ac_status=$?
9576   echo "$as_me:9576: \$? = $ac_status" >&5
9577   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9578   { (eval echo "$as_me:9578: \"$ac_try\"") >&5
9579   (eval $ac_try) 2>&5
9580   ac_status=$?
9581   echo "$as_me:9581: \$? = $ac_status" >&5
9582   (exit $ac_status); }; }; then
9583   :
9584 else
9585   echo "$as_me: program exited with status $ac_status" >&5
9586 echo "$as_me: failed program was:" >&5
9587 cat conftest.$ac_ext >&5
9588 ac_cv_header_stdc=no
9589 fi
9590 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9591 fi
9592 fi
9593 fi
9594 echo "$as_me:9594: result: $ac_cv_header_stdc" >&5
9595 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9596 if test $ac_cv_header_stdc = yes; then
9597
9598 cat >>confdefs.h <<\EOF
9599 #define STDC_HEADERS 1
9600 EOF
9601
9602 fi
9603
9604 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9605
9606 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9607                   inttypes.h stdint.h unistd.h
9608 do
9609 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9610 echo "$as_me:9610: checking for $ac_header" >&5
9611 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9612 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9613   echo $ECHO_N "(cached) $ECHO_C" >&6
9614 else
9615   cat >conftest.$ac_ext <<_ACEOF
9616 #line 9616 "configure"
9617 #include "confdefs.h"
9618 $ac_includes_default
9619 #include <$ac_header>
9620 _ACEOF
9621 rm -f conftest.$ac_objext
9622 if { (eval echo "$as_me:9622: \"$ac_compile\"") >&5
9623   (eval $ac_compile) 2>&5
9624   ac_status=$?
9625   echo "$as_me:9625: \$? = $ac_status" >&5
9626   (exit $ac_status); } &&
9627          { ac_try='test -s conftest.$ac_objext'
9628   { (eval echo "$as_me:9628: \"$ac_try\"") >&5
9629   (eval $ac_try) 2>&5
9630   ac_status=$?
9631   echo "$as_me:9631: \$? = $ac_status" >&5
9632   (exit $ac_status); }; }; then
9633   eval "$as_ac_Header=yes"
9634 else
9635   echo "$as_me: failed program was:" >&5
9636 cat conftest.$ac_ext >&5
9637 eval "$as_ac_Header=no"
9638 fi
9639 rm -f conftest.$ac_objext conftest.$ac_ext
9640 fi
9641 echo "$as_me:9641: result: `eval echo '${'$as_ac_Header'}'`" >&5
9642 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9643 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9644   cat >>confdefs.h <<EOF
9645 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9646 EOF
9647
9648 fi
9649 done
9650
9651 echo "$as_me:9651: checking for signed char" >&5
9652 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9653 if test "${ac_cv_type_signed_char+set}" = set; then
9654   echo $ECHO_N "(cached) $ECHO_C" >&6
9655 else
9656   cat >conftest.$ac_ext <<_ACEOF
9657 #line 9657 "configure"
9658 #include "confdefs.h"
9659 $ac_includes_default
9660 int
9661 main ()
9662 {
9663 if ((signed char *) 0)
9664   return 0;
9665 if (sizeof (signed char))
9666   return 0;
9667   ;
9668   return 0;
9669 }
9670 _ACEOF
9671 rm -f conftest.$ac_objext
9672 if { (eval echo "$as_me:9672: \"$ac_compile\"") >&5
9673   (eval $ac_compile) 2>&5
9674   ac_status=$?
9675   echo "$as_me:9675: \$? = $ac_status" >&5
9676   (exit $ac_status); } &&
9677          { ac_try='test -s conftest.$ac_objext'
9678   { (eval echo "$as_me:9678: \"$ac_try\"") >&5
9679   (eval $ac_try) 2>&5
9680   ac_status=$?
9681   echo "$as_me:9681: \$? = $ac_status" >&5
9682   (exit $ac_status); }; }; then
9683   ac_cv_type_signed_char=yes
9684 else
9685   echo "$as_me: failed program was:" >&5
9686 cat conftest.$ac_ext >&5
9687 ac_cv_type_signed_char=no
9688 fi
9689 rm -f conftest.$ac_objext conftest.$ac_ext
9690 fi
9691 echo "$as_me:9691: result: $ac_cv_type_signed_char" >&5
9692 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9693
9694 echo "$as_me:9694: checking size of signed char" >&5
9695 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9696 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699   if test "$ac_cv_type_signed_char" = yes; then
9700   if test "$cross_compiling" = yes; then
9701   # Depending upon the size, compute the lo and hi bounds.
9702 cat >conftest.$ac_ext <<_ACEOF
9703 #line 9703 "configure"
9704 #include "confdefs.h"
9705 $ac_includes_default
9706 int
9707 main ()
9708 {
9709 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9710   ;
9711   return 0;
9712 }
9713 _ACEOF
9714 rm -f conftest.$ac_objext
9715 if { (eval echo "$as_me:9715: \"$ac_compile\"") >&5
9716   (eval $ac_compile) 2>&5
9717   ac_status=$?
9718   echo "$as_me:9718: \$? = $ac_status" >&5
9719   (exit $ac_status); } &&
9720          { ac_try='test -s conftest.$ac_objext'
9721   { (eval echo "$as_me:9721: \"$ac_try\"") >&5
9722   (eval $ac_try) 2>&5
9723   ac_status=$?
9724   echo "$as_me:9724: \$? = $ac_status" >&5
9725   (exit $ac_status); }; }; then
9726   ac_lo=0 ac_mid=0
9727   while :; do
9728     cat >conftest.$ac_ext <<_ACEOF
9729 #line 9729 "configure"
9730 #include "confdefs.h"
9731 $ac_includes_default
9732 int
9733 main ()
9734 {
9735 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9736   ;
9737   return 0;
9738 }
9739 _ACEOF
9740 rm -f conftest.$ac_objext
9741 if { (eval echo "$as_me:9741: \"$ac_compile\"") >&5
9742   (eval $ac_compile) 2>&5
9743   ac_status=$?
9744   echo "$as_me:9744: \$? = $ac_status" >&5
9745   (exit $ac_status); } &&
9746          { ac_try='test -s conftest.$ac_objext'
9747   { (eval echo "$as_me:9747: \"$ac_try\"") >&5
9748   (eval $ac_try) 2>&5
9749   ac_status=$?
9750   echo "$as_me:9750: \$? = $ac_status" >&5
9751   (exit $ac_status); }; }; then
9752   ac_hi=$ac_mid; break
9753 else
9754   echo "$as_me: failed program was:" >&5
9755 cat conftest.$ac_ext >&5
9756 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9757 fi
9758 rm -f conftest.$ac_objext conftest.$ac_ext
9759   done
9760 else
9761   echo "$as_me: failed program was:" >&5
9762 cat conftest.$ac_ext >&5
9763 ac_hi=-1 ac_mid=-1
9764   while :; do
9765     cat >conftest.$ac_ext <<_ACEOF
9766 #line 9766 "configure"
9767 #include "confdefs.h"
9768 $ac_includes_default
9769 int
9770 main ()
9771 {
9772 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
9773   ;
9774   return 0;
9775 }
9776 _ACEOF
9777 rm -f conftest.$ac_objext
9778 if { (eval echo "$as_me:9778: \"$ac_compile\"") >&5
9779   (eval $ac_compile) 2>&5
9780   ac_status=$?
9781   echo "$as_me:9781: \$? = $ac_status" >&5
9782   (exit $ac_status); } &&
9783          { ac_try='test -s conftest.$ac_objext'
9784   { (eval echo "$as_me:9784: \"$ac_try\"") >&5
9785   (eval $ac_try) 2>&5
9786   ac_status=$?
9787   echo "$as_me:9787: \$? = $ac_status" >&5
9788   (exit $ac_status); }; }; then
9789   ac_lo=$ac_mid; break
9790 else
9791   echo "$as_me: failed program was:" >&5
9792 cat conftest.$ac_ext >&5
9793 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
9794 fi
9795 rm -f conftest.$ac_objext conftest.$ac_ext
9796   done
9797 fi
9798 rm -f conftest.$ac_objext conftest.$ac_ext
9799 # Binary search between lo and hi bounds.
9800 while test "x$ac_lo" != "x$ac_hi"; do
9801   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9802   cat >conftest.$ac_ext <<_ACEOF
9803 #line 9803 "configure"
9804 #include "confdefs.h"
9805 $ac_includes_default
9806 int
9807 main ()
9808 {
9809 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9810   ;
9811   return 0;
9812 }
9813 _ACEOF
9814 rm -f conftest.$ac_objext
9815 if { (eval echo "$as_me:9815: \"$ac_compile\"") >&5
9816   (eval $ac_compile) 2>&5
9817   ac_status=$?
9818   echo "$as_me:9818: \$? = $ac_status" >&5
9819   (exit $ac_status); } &&
9820          { ac_try='test -s conftest.$ac_objext'
9821   { (eval echo "$as_me:9821: \"$ac_try\"") >&5
9822   (eval $ac_try) 2>&5
9823   ac_status=$?
9824   echo "$as_me:9824: \$? = $ac_status" >&5
9825   (exit $ac_status); }; }; then
9826   ac_hi=$ac_mid
9827 else
9828   echo "$as_me: failed program was:" >&5
9829 cat conftest.$ac_ext >&5
9830 ac_lo=`expr $ac_mid + 1`
9831 fi
9832 rm -f conftest.$ac_objext conftest.$ac_ext
9833 done
9834 ac_cv_sizeof_signed_char=$ac_lo
9835 else
9836   if test "$cross_compiling" = yes; then
9837   { { echo "$as_me:9837: error: cannot run test program while cross compiling" >&5
9838 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
9839    { (exit 1); exit 1; }; }
9840 else
9841   cat >conftest.$ac_ext <<_ACEOF
9842 #line 9842 "configure"
9843 #include "confdefs.h"
9844 $ac_includes_default
9845 int
9846 main ()
9847 {
9848 FILE *f = fopen ("conftest.val", "w");
9849 if (!f)
9850   $ac_main_return (1);
9851 fprintf (f, "%d", (sizeof (signed char)));
9852 fclose (f);
9853   ;
9854   return 0;
9855 }
9856 _ACEOF
9857 rm -f conftest$ac_exeext
9858 if { (eval echo "$as_me:9858: \"$ac_link\"") >&5
9859   (eval $ac_link) 2>&5
9860   ac_status=$?
9861   echo "$as_me:9861: \$? = $ac_status" >&5
9862   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9863   { (eval echo "$as_me:9863: \"$ac_try\"") >&5
9864   (eval $ac_try) 2>&5
9865   ac_status=$?
9866   echo "$as_me:9866: \$? = $ac_status" >&5
9867   (exit $ac_status); }; }; then
9868   ac_cv_sizeof_signed_char=`cat conftest.val`
9869 else
9870   echo "$as_me: program exited with status $ac_status" >&5
9871 echo "$as_me: failed program was:" >&5
9872 cat conftest.$ac_ext >&5
9873 fi
9874 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9875 fi
9876 fi
9877 rm -f conftest.val
9878 else
9879   ac_cv_sizeof_signed_char=0
9880 fi
9881 fi
9882 echo "$as_me:9882: result: $ac_cv_sizeof_signed_char" >&5
9883 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
9884 cat >>confdefs.h <<EOF
9885 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
9886 EOF
9887
9888 if test "$ac_cv_sizeof_signed_char" = 1 ; then
9889         NCURSES_SBOOL="signed char"
9890 else
9891         NCURSES_SBOOL="char"
9892 fi
9893 echo "$as_me:9893: checking if you want to use signed Boolean array in term.h" >&5
9894 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
9895
9896 # Check whether --enable-signed-char or --disable-signed-char was given.
9897 if test "${enable_signed_char+set}" = set; then
9898   enableval="$enable_signed_char"
9899   with_signed_char=$enableval
9900 else
9901   with_signed_char=no
9902 fi;
9903 echo "$as_me:9903: result: $with_signed_char" >&5
9904 echo "${ECHO_T}$with_signed_char" >&6
9905 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
9906
9907 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
9908 echo "$as_me:9908: checking if you want SIGWINCH handler" >&5
9909 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
9910
9911 # Check whether --enable-sigwinch or --disable-sigwinch was given.
9912 if test "${enable_sigwinch+set}" = set; then
9913   enableval="$enable_sigwinch"
9914   with_sigwinch=$enableval
9915 else
9916   with_sigwinch=$with_ext_funcs
9917 fi;
9918 echo "$as_me:9918: result: $with_sigwinch" >&5
9919 echo "${ECHO_T}$with_sigwinch" >&6
9920 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
9921 #define USE_SIGWINCH 1
9922 EOF
9923
9924 ###   use option --enable-tcap-names to allow user to define new capabilities
9925 echo "$as_me:9925: checking if you want user-definable terminal capabilities like termcap" >&5
9926 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
9927
9928 # Check whether --enable-tcap-names or --disable-tcap-names was given.
9929 if test "${enable_tcap_names+set}" = set; then
9930   enableval="$enable_tcap_names"
9931   with_tcap_names=$enableval
9932 else
9933   with_tcap_names=$with_ext_funcs
9934 fi;
9935 echo "$as_me:9935: result: $with_tcap_names" >&5
9936 echo "${ECHO_T}$with_tcap_names" >&6
9937 NCURSES_XNAMES=0
9938 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
9939
9940 ###############################################################################
9941 # These options are relatively safe to experiment with.
9942
9943 echo "$as_me:9943: checking if you want all development code" >&5
9944 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
9945
9946 # Check whether --with-develop or --without-develop was given.
9947 if test "${with_develop+set}" = set; then
9948   withval="$with_develop"
9949   with_develop=$withval
9950 else
9951   with_develop=no
9952 fi;
9953 echo "$as_me:9953: result: $with_develop" >&5
9954 echo "${ECHO_T}$with_develop" >&6
9955
9956 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
9957 echo "$as_me:9957: checking if you want hard-tabs code" >&5
9958 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
9959
9960 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
9961 if test "${enable_hard_tabs+set}" = set; then
9962   enableval="$enable_hard_tabs"
9963
9964 else
9965   enable_hard_tabs=$with_develop
9966 fi;
9967 echo "$as_me:9967: result: $enable_hard_tabs" >&5
9968 echo "${ECHO_T}$enable_hard_tabs" >&6
9969 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
9970 #define USE_HARD_TABS 1
9971 EOF
9972
9973 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
9974 echo "$as_me:9974: checking if you want limited support for xmc" >&5
9975 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
9976
9977 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
9978 if test "${enable_xmc_glitch+set}" = set; then
9979   enableval="$enable_xmc_glitch"
9980
9981 else
9982   enable_xmc_glitch=$with_develop
9983 fi;
9984 echo "$as_me:9984: result: $enable_xmc_glitch" >&5
9985 echo "${ECHO_T}$enable_xmc_glitch" >&6
9986 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
9987 #define USE_XMC_SUPPORT 1
9988 EOF
9989
9990 ###############################################################################
9991 # These are just experimental, probably should not be in a package:
9992
9993 echo "$as_me:9993: checking if you do not want to assume colors are white-on-black" >&5
9994 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
9995
9996 # Check whether --enable-assumed-color or --disable-assumed-color was given.
9997 if test "${enable_assumed_color+set}" = set; then
9998   enableval="$enable_assumed_color"
9999   with_assumed_color=$enableval
10000 else
10001   with_assumed_color=yes
10002 fi;
10003 echo "$as_me:10003: result: $with_assumed_color" >&5
10004 echo "${ECHO_T}$with_assumed_color" >&6
10005 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10006 #define USE_ASSUMED_COLOR 1
10007 EOF
10008
10009 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10010 echo "$as_me:10010: checking if you want hashmap scrolling-optimization code" >&5
10011 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10012
10013 # Check whether --enable-hashmap or --disable-hashmap was given.
10014 if test "${enable_hashmap+set}" = set; then
10015   enableval="$enable_hashmap"
10016   with_hashmap=$enableval
10017 else
10018   with_hashmap=yes
10019 fi;
10020 echo "$as_me:10020: result: $with_hashmap" >&5
10021 echo "${ECHO_T}$with_hashmap" >&6
10022 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10023 #define USE_HASHMAP 1
10024 EOF
10025
10026 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10027 echo "$as_me:10027: checking if you want colorfgbg code" >&5
10028 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10029
10030 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10031 if test "${enable_colorfgbg+set}" = set; then
10032   enableval="$enable_colorfgbg"
10033   with_colorfgbg=$enableval
10034 else
10035   with_colorfgbg=no
10036 fi;
10037 echo "$as_me:10037: result: $with_colorfgbg" >&5
10038 echo "${ECHO_T}$with_colorfgbg" >&6
10039 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10040 #define USE_COLORFGBG 1
10041 EOF
10042
10043 # This is still experimental (20080329), but should ultimately be moved to
10044 # the script-block --with-normal, etc.
10045
10046 echo "$as_me:10046: checking if you want to link with the pthread library" >&5
10047 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10048
10049 # Check whether --with-pthread or --without-pthread was given.
10050 if test "${with_pthread+set}" = set; then
10051   withval="$with_pthread"
10052   with_pthread=$withval
10053 else
10054   with_pthread=no
10055 fi;
10056 echo "$as_me:10056: result: $with_pthread" >&5
10057 echo "${ECHO_T}$with_pthread" >&6
10058
10059 if test "$with_pthread" != no ; then
10060     echo "$as_me:10060: checking for pthread.h" >&5
10061 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10062 if test "${ac_cv_header_pthread_h+set}" = set; then
10063   echo $ECHO_N "(cached) $ECHO_C" >&6
10064 else
10065   cat >conftest.$ac_ext <<_ACEOF
10066 #line 10066 "configure"
10067 #include "confdefs.h"
10068 #include <pthread.h>
10069 _ACEOF
10070 if { (eval echo "$as_me:10070: \"$ac_cpp conftest.$ac_ext\"") >&5
10071   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10072   ac_status=$?
10073   egrep -v '^ *\+' conftest.er1 >conftest.err
10074   rm -f conftest.er1
10075   cat conftest.err >&5
10076   echo "$as_me:10076: \$? = $ac_status" >&5
10077   (exit $ac_status); } >/dev/null; then
10078   if test -s conftest.err; then
10079     ac_cpp_err=$ac_c_preproc_warn_flag
10080   else
10081     ac_cpp_err=
10082   fi
10083 else
10084   ac_cpp_err=yes
10085 fi
10086 if test -z "$ac_cpp_err"; then
10087   ac_cv_header_pthread_h=yes
10088 else
10089   echo "$as_me: failed program was:" >&5
10090   cat conftest.$ac_ext >&5
10091   ac_cv_header_pthread_h=no
10092 fi
10093 rm -f conftest.err conftest.$ac_ext
10094 fi
10095 echo "$as_me:10095: result: $ac_cv_header_pthread_h" >&5
10096 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10097 if test $ac_cv_header_pthread_h = yes; then
10098
10099         cat >>confdefs.h <<\EOF
10100 #define HAVE_PTHREADS_H 1
10101 EOF
10102
10103         echo "$as_me:10103: checking if we can link with the pthread library" >&5
10104 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10105         cf_save_LIBS="$LIBS"
10106         LIBS="-lpthread $LIBS"
10107         cat >conftest.$ac_ext <<_ACEOF
10108 #line 10108 "configure"
10109 #include "confdefs.h"
10110
10111 #include <pthread.h>
10112
10113 int
10114 main ()
10115 {
10116
10117         int rc = pthread_create(0,0,0,0);
10118
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 rm -f conftest.$ac_objext conftest$ac_exeext
10124 if { (eval echo "$as_me:10124: \"$ac_link\"") >&5
10125   (eval $ac_link) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit $ac_status); } &&
10129          { ac_try='test -s conftest$ac_exeext'
10130   { (eval echo "$as_me:10130: \"$ac_try\"") >&5
10131   (eval $ac_try) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit $ac_status); }; }; then
10135   with_pthread=yes
10136 else
10137   echo "$as_me: failed program was:" >&5
10138 cat conftest.$ac_ext >&5
10139 with_pthread=no
10140 fi
10141 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10142         LIBS="$cf_save_LIBS"
10143         echo "$as_me:10143: result: $with_pthread" >&5
10144 echo "${ECHO_T}$with_pthread" >&6
10145
10146         if test "$with_pthread" = yes ; then
10147             LIBS="-lpthread $LIBS"
10148             cat >>confdefs.h <<\EOF
10149 #define HAVE_LIBPTHREADS 1
10150 EOF
10151
10152         else
10153             { { echo "$as_me:10153: error: Cannot link with pthread library" >&5
10154 echo "$as_me: error: Cannot link with pthread library" >&2;}
10155    { (exit 1); exit 1; }; }
10156         fi
10157
10158 fi
10159
10160 fi
10161
10162 echo "$as_me:10162: checking if you want to use weak-symbols for pthreads" >&5
10163 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10164
10165 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10166 if test "${enable_weak_symbols+set}" = set; then
10167   enableval="$enable_weak_symbols"
10168   use_weak_symbols=$withval
10169 else
10170   use_weak_symbols=no
10171 fi;
10172 echo "$as_me:10172: result: $use_weak_symbols" >&5
10173 echo "${ECHO_T}$use_weak_symbols" >&6
10174 if test "$use_weak_symbols" = yes ; then
10175
10176 echo "$as_me:10176: checking if $CC supports weak symbols" >&5
10177 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10178 if test "${cf_cv_weak_symbols+set}" = set; then
10179   echo $ECHO_N "(cached) $ECHO_C" >&6
10180 else
10181
10182 cat >conftest.$ac_ext <<_ACEOF
10183 #line 10183 "configure"
10184 #include "confdefs.h"
10185
10186 #include <stdio.h>
10187 int
10188 main ()
10189 {
10190
10191 #if defined(__GNUC__)
10192 #  if defined __USE_ISOC99
10193 #    define _cat_pragma(exp)    _Pragma(#exp)
10194 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10195 #  else
10196 #    define _weak_pragma(exp)
10197 #  endif
10198 #  define _declare(name)        __extension__ extern __typeof__(name) name
10199 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10200 #endif
10201
10202 weak_symbol(fopen);
10203
10204   ;
10205   return 0;
10206 }
10207 _ACEOF
10208 rm -f conftest.$ac_objext
10209 if { (eval echo "$as_me:10209: \"$ac_compile\"") >&5
10210   (eval $ac_compile) 2>&5
10211   ac_status=$?
10212   echo "$as_me:10212: \$? = $ac_status" >&5
10213   (exit $ac_status); } &&
10214          { ac_try='test -s conftest.$ac_objext'
10215   { (eval echo "$as_me:10215: \"$ac_try\"") >&5
10216   (eval $ac_try) 2>&5
10217   ac_status=$?
10218   echo "$as_me:10218: \$? = $ac_status" >&5
10219   (exit $ac_status); }; }; then
10220   cf_cv_weak_symbols=yes
10221 else
10222   echo "$as_me: failed program was:" >&5
10223 cat conftest.$ac_ext >&5
10224 cf_cv_weak_symbols=no
10225 fi
10226 rm -f conftest.$ac_objext conftest.$ac_ext
10227
10228 fi
10229 echo "$as_me:10229: result: $cf_cv_weak_symbols" >&5
10230 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10231
10232 else
10233     cf_cv_weak_symbols=no
10234 fi
10235
10236 if test $cf_cv_weak_symbols = yes ; then
10237     cat >>confdefs.h <<\EOF
10238 #define USE_WEAK_SYMBOLS 1
10239 EOF
10240
10241 fi
10242
10243 PTHREAD=
10244 if test "$with_pthread" = "yes" ; then
10245     cat >>confdefs.h <<\EOF
10246 #define USE_PTHREADS 1
10247 EOF
10248
10249     enable_reentrant=yes
10250     if test $cf_cv_weak_symbols = yes ; then
10251         PTHREAD=-lpthread
10252     fi
10253 fi
10254
10255 # Reentrant code has to be opaque; there's little advantage to making ncurses
10256 # opaque outside of that, so there is no --enable-opaque option.  We can use
10257 # this option without --with-pthreads, but this will be always set for
10258 # pthreads.
10259 echo "$as_me:10259: checking if you want experimental reentrant code" >&5
10260 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10261
10262 # Check whether --enable-reentrant or --disable-reentrant was given.
10263 if test "${enable_reentrant+set}" = set; then
10264   enableval="$enable_reentrant"
10265   with_reentrant=$enableval
10266 else
10267   with_reentrant=no
10268 fi;
10269 echo "$as_me:10269: result: $with_reentrant" >&5
10270 echo "${ECHO_T}$with_reentrant" >&6
10271 if test "$with_reentrant" = yes ; then
10272         cf_cv_enable_reentrant=1
10273         cf_cv_enable_opaque="NCURSES_INTERNALS"
10274         NCURSES_OPAQUE=1
10275         NCURSES_SIZE_T=int
10276         if test $cf_cv_weak_symbols = yes ; then
10277
10278 # remove pthread library from $LIBS
10279 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10280
10281         else
10282                 LIB_SUFFIX="t${LIB_SUFFIX}"
10283         fi
10284         cat >>confdefs.h <<\EOF
10285 #define USE_REENTRANT 1
10286 EOF
10287
10288 if test "${with_abi_version+set}" != set; then
10289         case $cf_cv_rel_version in
10290         5.*)
10291                 cf_cv_rel_version=6.0
10292                 cf_cv_abi_version=6
10293                 { echo "$as_me:10293: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10294 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10295                 ;;
10296         esac
10297 fi
10298
10299 else
10300         cf_cv_enable_reentrant=0
10301         cf_cv_enable_opaque="NCURSES_OPAQUE"
10302         NCURSES_OPAQUE=0
10303         NCURSES_SIZE_T=short
10304 fi
10305
10306 ### Allow using a different wrap-prefix
10307 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10308         echo "$as_me:10308: checking for prefix used to wrap public variables" >&5
10309 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10310
10311 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10312 if test "${with_wrap_prefix+set}" = set; then
10313   withval="$with_wrap_prefix"
10314   NCURSES_WRAP_PREFIX=$withval
10315 else
10316   NCURSES_WRAP_PREFIX=_nc_
10317 fi;
10318         echo "$as_me:10318: result: $NCURSES_WRAP_PREFIX" >&5
10319 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10320 else
10321         NCURSES_WRAP_PREFIX=_nc_
10322 fi
10323
10324 cat >>confdefs.h <<EOF
10325 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10326 EOF
10327
10328 echo "$as_me:10328: checking if you want experimental safe-sprintf code" >&5
10329 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10330
10331 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10332 if test "${enable_safe_sprintf+set}" = set; then
10333   enableval="$enable_safe_sprintf"
10334   with_safe_sprintf=$enableval
10335 else
10336   with_safe_sprintf=no
10337 fi;
10338 echo "$as_me:10338: result: $with_safe_sprintf" >&5
10339 echo "${ECHO_T}$with_safe_sprintf" >&6
10340 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10341 #define USE_SAFE_SPRINTF 1
10342 EOF
10343
10344 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10345 # when hashmap is used scroll hints are useless
10346 if test "$with_hashmap" = no ; then
10347 echo "$as_me:10347: checking if you want to experiment without scrolling-hints code" >&5
10348 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10349
10350 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10351 if test "${enable_scroll_hints+set}" = set; then
10352   enableval="$enable_scroll_hints"
10353   with_scroll_hints=$enableval
10354 else
10355   with_scroll_hints=yes
10356 fi;
10357 echo "$as_me:10357: result: $with_scroll_hints" >&5
10358 echo "${ECHO_T}$with_scroll_hints" >&6
10359 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10360 #define USE_SCROLL_HINTS 1
10361 EOF
10362
10363 fi
10364
10365 echo "$as_me:10365: checking if you want experimental wgetch-events code" >&5
10366 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10367
10368 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10369 if test "${enable_wgetch_events+set}" = set; then
10370   enableval="$enable_wgetch_events"
10371   with_wgetch_events=$enableval
10372 else
10373   with_wgetch_events=no
10374 fi;
10375 echo "$as_me:10375: result: $with_wgetch_events" >&5
10376 echo "${ECHO_T}$with_wgetch_events" >&6
10377 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10378 #define NCURSES_WGETCH_EVENTS 1
10379 EOF
10380
10381 ###############################################################################
10382
10383 ###     use option --disable-echo to suppress full display compiling commands
10384 echo "$as_me:10384: checking if you want to display full commands during build" >&5
10385 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10386
10387 # Check whether --enable-echo or --disable-echo was given.
10388 if test "${enable_echo+set}" = set; then
10389   enableval="$enable_echo"
10390   with_echo=$enableval
10391 else
10392   with_echo=yes
10393 fi;
10394 if test "$with_echo" = yes; then
10395         ECHO_LINK=
10396 else
10397         ECHO_LINK='@ echo linking $@ ... ;'
10398         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10399         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10400 fi
10401 echo "$as_me:10401: result: $with_echo" >&5
10402 echo "${ECHO_T}$with_echo" >&6
10403
10404 ###     use option --enable-warnings to turn on all gcc warnings
10405 echo "$as_me:10405: checking if you want to see compiler warnings" >&5
10406 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10407
10408 # Check whether --enable-warnings or --disable-warnings was given.
10409 if test "${enable_warnings+set}" = set; then
10410   enableval="$enable_warnings"
10411   with_warnings=$enableval
10412 fi;
10413 echo "$as_me:10413: result: $with_warnings" >&5
10414 echo "${ECHO_T}$with_warnings" >&6
10415
10416 if test "x$with_warnings" = "xyes"; then
10417         ADAFLAGS="$ADAFLAGS -gnatg"
10418
10419 INTEL_COMPILER=no
10420
10421 if test "$GCC" = yes ; then
10422         case $host_os in
10423         linux*|gnu*)
10424                 echo "$as_me:10424: checking if this is really Intel C compiler" >&5
10425 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10426                 cf_save_CFLAGS="$CFLAGS"
10427                 CFLAGS="$CFLAGS -no-gcc"
10428                 cat >conftest.$ac_ext <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431
10432 int
10433 main ()
10434 {
10435
10436 #ifdef __INTEL_COMPILER
10437 #else
10438 make an error
10439 #endif
10440
10441   ;
10442   return 0;
10443 }
10444 _ACEOF
10445 rm -f conftest.$ac_objext
10446 if { (eval echo "$as_me:10446: \"$ac_compile\"") >&5
10447   (eval $ac_compile) 2>&5
10448   ac_status=$?
10449   echo "$as_me:10449: \$? = $ac_status" >&5
10450   (exit $ac_status); } &&
10451          { ac_try='test -s conftest.$ac_objext'
10452   { (eval echo "$as_me:10452: \"$ac_try\"") >&5
10453   (eval $ac_try) 2>&5
10454   ac_status=$?
10455   echo "$as_me:10455: \$? = $ac_status" >&5
10456   (exit $ac_status); }; }; then
10457   INTEL_COMPILER=yes
10458 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10459
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat conftest.$ac_ext >&5
10463 fi
10464 rm -f conftest.$ac_objext conftest.$ac_ext
10465                 CFLAGS="$cf_save_CFLAGS"
10466                 echo "$as_me:10466: result: $INTEL_COMPILER" >&5
10467 echo "${ECHO_T}$INTEL_COMPILER" >&6
10468                 ;;
10469         esac
10470 fi
10471
10472 cat > conftest.$ac_ext <<EOF
10473 #line 10473 "${as_me-configure}"
10474 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10475 EOF
10476
10477 if test "$INTEL_COMPILER" = yes
10478 then
10479 # The "-wdXXX" options suppress warnings:
10480 # remark #1419: external declaration in primary source file
10481 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10482 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10483 # remark #193: zero used for undefined preprocessing identifier
10484 # remark #593: variable "curs_sb_left_arrow" was set but never used
10485 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10486 # remark #869: parameter "tw" was never referenced
10487 # remark #981: operands are evaluated in unspecified order
10488 # warning #279: controlling expression is constant
10489
10490         { echo "$as_me:10490: checking for $CC warning options..." >&5
10491 echo "$as_me: checking for $CC warning options..." >&6;}
10492         cf_save_CFLAGS="$CFLAGS"
10493         EXTRA_CFLAGS="-Wall"
10494         for cf_opt in \
10495                 wd1419 \
10496                 wd1683 \
10497                 wd1684 \
10498                 wd193 \
10499                 wd593 \
10500                 wd279 \
10501                 wd810 \
10502                 wd869 \
10503                 wd981
10504         do
10505                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10506                 if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
10507   (eval $ac_compile) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit $ac_status); }; then
10511                         test -n "$verbose" && echo "$as_me:10511: result: ... -$cf_opt" >&5
10512 echo "${ECHO_T}... -$cf_opt" >&6
10513                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10514                 fi
10515         done
10516         CFLAGS="$cf_save_CFLAGS"
10517
10518 elif test "$GCC" = yes
10519 then
10520         { echo "$as_me:10520: checking for $CC warning options..." >&5
10521 echo "$as_me: checking for $CC warning options..." >&6;}
10522         cf_save_CFLAGS="$CFLAGS"
10523         EXTRA_CFLAGS="-W -Wall"
10524         cf_warn_CONST=""
10525         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10526         for cf_opt in \
10527                 Wbad-function-cast \
10528                 Wcast-align \
10529                 Wcast-qual \
10530                 Winline \
10531                 Wmissing-declarations \
10532                 Wmissing-prototypes \
10533                 Wnested-externs \
10534                 Wpointer-arith \
10535                 Wshadow \
10536                 Wstrict-prototypes \
10537                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10538         do
10539                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10540                 if { (eval echo "$as_me:10540: \"$ac_compile\"") >&5
10541   (eval $ac_compile) 2>&5
10542   ac_status=$?
10543   echo "$as_me:10543: \$? = $ac_status" >&5
10544   (exit $ac_status); }; then
10545                         test -n "$verbose" && echo "$as_me:10545: result: ... -$cf_opt" >&5
10546 echo "${ECHO_T}... -$cf_opt" >&6
10547                         case $cf_opt in #(vi
10548                         Wcast-qual) #(vi
10549                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10550                                 ;;
10551                         Winline) #(vi
10552                                 case $GCC_VERSION in
10553                                 [34].*)
10554                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10555
10556 echo "${as_me-configure}:10556: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10557
10558                                         continue;;
10559                                 esac
10560                                 ;;
10561                         esac
10562                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10563                 fi
10564         done
10565         CFLAGS="$cf_save_CFLAGS"
10566 fi
10567 rm -f conftest*
10568
10569         if test "$cf_with_cxx" = yes ; then
10570
10571 INTEL_CPLUSPLUS=no
10572
10573 if test "$GCC" = yes ; then
10574         case $host_os in
10575         linux*|gnu*)
10576                 echo "$as_me:10576: checking if this is really Intel C++ compiler" >&5
10577 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10578                 cf_save_CFLAGS="$CXXFLAGS"
10579                 CXXFLAGS="$CXXFLAGS -no-gcc"
10580                 cat >conftest.$ac_ext <<_ACEOF
10581 #line 10581 "configure"
10582 #include "confdefs.h"
10583
10584 int
10585 main ()
10586 {
10587
10588 #ifdef __INTEL_COMPILER
10589 #else
10590 make an error
10591 #endif
10592
10593   ;
10594   return 0;
10595 }
10596 _ACEOF
10597 rm -f conftest.$ac_objext
10598 if { (eval echo "$as_me:10598: \"$ac_compile\"") >&5
10599   (eval $ac_compile) 2>&5
10600   ac_status=$?
10601   echo "$as_me:10601: \$? = $ac_status" >&5
10602   (exit $ac_status); } &&
10603          { ac_try='test -s conftest.$ac_objext'
10604   { (eval echo "$as_me:10604: \"$ac_try\"") >&5
10605   (eval $ac_try) 2>&5
10606   ac_status=$?
10607   echo "$as_me:10607: \$? = $ac_status" >&5
10608   (exit $ac_status); }; }; then
10609   INTEL_CPLUSPLUS=yes
10610 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10611
10612 else
10613   echo "$as_me: failed program was:" >&5
10614 cat conftest.$ac_ext >&5
10615 fi
10616 rm -f conftest.$ac_objext conftest.$ac_ext
10617                 CXXFLAGS="$cf_save_CFLAGS"
10618                 echo "$as_me:10618: result: $INTEL_CPLUSPLUS" >&5
10619 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10620                 ;;
10621         esac
10622 fi
10623
10624 ac_ext=cc
10625 ac_cpp='$CXXCPP $CPPFLAGS'
10626 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10627 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10628 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10629 ac_main_return=return
10630
10631 cat > conftest.$ac_ext <<EOF
10632 #line 10632 "configure"
10633 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10634 EOF
10635
10636 if test "$INTEL_CPLUSPLUS" = yes
10637 then
10638 # The "-wdXXX" options suppress warnings:
10639 # remark #1419: external declaration in primary source file
10640 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10641 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10642 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10643 # remark #193: zero used for undefined preprocessing identifier
10644 # remark #593: variable "curs_sb_left_arrow" was set but never used
10645 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10646 # remark #869: parameter "tw" was never referenced
10647 # remark #981: operands are evaluated in unspecified order
10648 # warning #269: invalid format string conversion
10649
10650         { echo "$as_me:10650: checking for $CC warning options..." >&5
10651 echo "$as_me: checking for $CC warning options..." >&6;}
10652         cf_save_CXXFLAGS="$CXXFLAGS"
10653         EXTRA_CXXFLAGS="-Wall"
10654         for cf_opt in \
10655                 wd1419 \
10656                 wd1682 \
10657                 wd1683 \
10658                 wd1684 \
10659                 wd193 \
10660                 wd279 \
10661                 wd593 \
10662                 wd810 \
10663                 wd869 \
10664                 wd981
10665         do
10666                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10667                 if { (eval echo "$as_me:10667: \"$ac_compile\"") >&5
10668   (eval $ac_compile) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit $ac_status); }; then
10672                         test -n "$verbose" && echo "$as_me:10672: result: ... -$cf_opt" >&5
10673 echo "${ECHO_T}... -$cf_opt" >&6
10674                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10675                 fi
10676         done
10677         CXXFLAGS="$cf_save_CXXFLAGS"
10678
10679 elif test "$GXX" = yes
10680 then
10681         { echo "$as_me:10681: checking for $CXX warning options..." >&5
10682 echo "$as_me: checking for $CXX warning options..." >&6;}
10683         cf_save_CXXFLAGS="$CXXFLAGS"
10684         EXTRA_CXXFLAGS="-W -Wall"
10685         cf_gxx_extra_warnings=""
10686         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10687         case "$GCC_VERSION" in
10688         [1-2].*)
10689                 ;;
10690         *)
10691                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10692                 ;;
10693         esac
10694         for cf_opt in \
10695                 Wabi \
10696                 fabi-version=0 \
10697                 Woverloaded-virtual \
10698                 Wsign-promo \
10699                 Wsynth \
10700                 Wold-style-cast \
10701                 Wcast-align \
10702                 Wcast-qual \
10703                 Wmissing-prototypes \
10704                 Wpointer-arith \
10705                 Wshadow \
10706                 Wstrict-prototypes \
10707                 Wundef $cf_gxx_extra_warnings Wno-unused
10708         do
10709                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10710                 if { (eval echo "$as_me:10710: \"$ac_compile\"") >&5
10711   (eval $ac_compile) 2>&5
10712   ac_status=$?
10713   echo "$as_me:10713: \$? = $ac_status" >&5
10714   (exit $ac_status); }; then
10715                         test -n "$verbose" && echo "$as_me:10715: result: ... -$cf_opt" >&5
10716 echo "${ECHO_T}... -$cf_opt" >&6
10717                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10718                 else
10719                         test -n "$verbose" && echo "$as_me:10719: result: ... no -$cf_opt" >&5
10720 echo "${ECHO_T}... no -$cf_opt" >&6
10721                 fi
10722         done
10723         CXXFLAGS="$cf_save_CXXFLAGS"
10724 fi
10725
10726 rm -f conftest*
10727 ac_ext=c
10728 ac_cpp='$CPP $CPPFLAGS'
10729 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10730 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10731 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10732 ac_main_return=return
10733
10734         fi
10735 fi
10736
10737 if test "$GCC" = yes
10738 then
10739 cat > conftest.i <<EOF
10740 #ifndef GCC_PRINTF
10741 #define GCC_PRINTF 0
10742 #endif
10743 #ifndef GCC_SCANF
10744 #define GCC_SCANF 0
10745 #endif
10746 #ifndef GCC_NORETURN
10747 #define GCC_NORETURN /* nothing */
10748 #endif
10749 #ifndef GCC_UNUSED
10750 #define GCC_UNUSED /* nothing */
10751 #endif
10752 EOF
10753 if test "$GCC" = yes
10754 then
10755         { echo "$as_me:10755: checking for $CC __attribute__ directives..." >&5
10756 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
10757 cat > conftest.$ac_ext <<EOF
10758 #line 10758 "${as_me-configure}"
10759 #include "confdefs.h"
10760 #include "conftest.h"
10761 #include "conftest.i"
10762 #if     GCC_PRINTF
10763 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
10764 #else
10765 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
10766 #endif
10767 #if     GCC_SCANF
10768 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
10769 #else
10770 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
10771 #endif
10772 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
10773 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
10774 extern void foo(void) GCC_NORETURN;
10775 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
10776 EOF
10777         for cf_attribute in scanf printf unused noreturn
10778         do
10779
10780 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10781
10782                 cf_directive="__attribute__(($cf_attribute))"
10783                 echo "checking for $CC $cf_directive" 1>&5
10784                 case $cf_attribute in
10785                 scanf|printf)
10786                 cat >conftest.h <<EOF
10787 #define GCC_$cf_ATTRIBUTE 1
10788 EOF
10789                         ;;
10790                 *)
10791                 cat >conftest.h <<EOF
10792 #define GCC_$cf_ATTRIBUTE $cf_directive
10793 EOF
10794                         ;;
10795                 esac
10796                 if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
10797   (eval $ac_compile) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit $ac_status); }; then
10801                         test -n "$verbose" && echo "$as_me:10801: result: ... $cf_attribute" >&5
10802 echo "${ECHO_T}... $cf_attribute" >&6
10803                         cat conftest.h >>confdefs.h
10804                 fi
10805         done
10806 else
10807         fgrep define conftest.i >>confdefs.h
10808 fi
10809 rm -rf conftest*
10810 fi
10811
10812 ###     use option --enable-assertions to turn on generation of assertion code
10813 echo "$as_me:10813: checking if you want to enable runtime assertions" >&5
10814 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
10815
10816 # Check whether --enable-assertions or --disable-assertions was given.
10817 if test "${enable_assertions+set}" = set; then
10818   enableval="$enable_assertions"
10819   with_assertions=$enableval
10820 else
10821   with_assertions=no
10822 fi;
10823 echo "$as_me:10823: result: $with_assertions" >&5
10824 echo "${ECHO_T}$with_assertions" >&6
10825 if test -n "$GCC"
10826 then
10827         if test "$with_assertions" = no
10828         then
10829                 cat >>confdefs.h <<\EOF
10830 #define NDEBUG 1
10831 EOF
10832
10833                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
10834         else
10835                 ADAFLAGS="$ADAFLAGS -gnata"
10836         fi
10837 fi
10838
10839 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
10840
10841 echo "$as_me:10841: checking if you want to use dmalloc for testing" >&5
10842 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
10843
10844 # Check whether --with-dmalloc or --without-dmalloc was given.
10845 if test "${with_dmalloc+set}" = set; then
10846   withval="$with_dmalloc"
10847   cat >>confdefs.h <<\EOF
10848 #define USE_DMALLOC 1
10849 EOF
10850
10851         : ${with_cflags:=-g}
10852         : ${with_no_leaks:=yes}
10853          with_dmalloc=yes
10854 else
10855   with_dmalloc=
10856 fi;
10857 echo "$as_me:10857: result: ${with_dmalloc:-no}" >&5
10858 echo "${ECHO_T}${with_dmalloc:-no}" >&6
10859
10860 case .$with_cflags in #(vi
10861 .*-g*)
10862         case .$CFLAGS in #(vi
10863         .*-g*) #(vi
10864                 ;;
10865         *)
10866
10867 cf_fix_cppflags=no
10868 cf_new_cflags=
10869 cf_new_cppflags=
10870 cf_new_extra_cppflags=
10871
10872 for cf_add_cflags in -g
10873 do
10874 case $cf_fix_cppflags in
10875 no)
10876         case $cf_add_cflags in #(vi
10877         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
10878                 case $cf_add_cflags in
10879                 -D*)
10880                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10881
10882                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10883                         && test -z "${cf_tst_cflags}" \
10884                         && cf_fix_cppflags=yes
10885
10886                         if test $cf_fix_cppflags = yes ; then
10887                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10888                                 continue
10889                         elif test "${cf_tst_cflags}" = "\"'" ; then
10890                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10891                                 continue
10892                         fi
10893                         ;;
10894                 esac
10895                 case "$CPPFLAGS" in
10896                 *$cf_add_cflags) #(vi
10897                         ;;
10898                 *) #(vi
10899                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10900                         ;;
10901                 esac
10902                 ;;
10903         *)
10904                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10905                 ;;
10906         esac
10907         ;;
10908 yes)
10909         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10910
10911         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10912
10913         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
10914         && test -z "${cf_tst_cflags}" \
10915         && cf_fix_cppflags=no
10916         ;;
10917 esac
10918 done
10919
10920 if test -n "$cf_new_cflags" ; then
10921
10922         CFLAGS="$CFLAGS $cf_new_cflags"
10923 fi
10924
10925 if test -n "$cf_new_cppflags" ; then
10926
10927         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10928 fi
10929
10930 if test -n "$cf_new_extra_cppflags" ; then
10931
10932         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10933 fi
10934
10935                 ;;
10936         esac
10937         ;;
10938 esac
10939
10940 if test "$with_dmalloc" = yes ; then
10941         echo "$as_me:10941: checking for dmalloc.h" >&5
10942 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
10943 if test "${ac_cv_header_dmalloc_h+set}" = set; then
10944   echo $ECHO_N "(cached) $ECHO_C" >&6
10945 else
10946   cat >conftest.$ac_ext <<_ACEOF
10947 #line 10947 "configure"
10948 #include "confdefs.h"
10949 #include <dmalloc.h>
10950 _ACEOF
10951 if { (eval echo "$as_me:10951: \"$ac_cpp conftest.$ac_ext\"") >&5
10952   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10953   ac_status=$?
10954   egrep -v '^ *\+' conftest.er1 >conftest.err
10955   rm -f conftest.er1
10956   cat conftest.err >&5
10957   echo "$as_me:10957: \$? = $ac_status" >&5
10958   (exit $ac_status); } >/dev/null; then
10959   if test -s conftest.err; then
10960     ac_cpp_err=$ac_c_preproc_warn_flag
10961   else
10962     ac_cpp_err=
10963   fi
10964 else
10965   ac_cpp_err=yes
10966 fi
10967 if test -z "$ac_cpp_err"; then
10968   ac_cv_header_dmalloc_h=yes
10969 else
10970   echo "$as_me: failed program was:" >&5
10971   cat conftest.$ac_ext >&5
10972   ac_cv_header_dmalloc_h=no
10973 fi
10974 rm -f conftest.err conftest.$ac_ext
10975 fi
10976 echo "$as_me:10976: result: $ac_cv_header_dmalloc_h" >&5
10977 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
10978 if test $ac_cv_header_dmalloc_h = yes; then
10979
10980 echo "$as_me:10980: checking for dmalloc_debug in -ldmalloc" >&5
10981 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
10982 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
10983   echo $ECHO_N "(cached) $ECHO_C" >&6
10984 else
10985   ac_check_lib_save_LIBS=$LIBS
10986 LIBS="-ldmalloc  $LIBS"
10987 cat >conftest.$ac_ext <<_ACEOF
10988 #line 10988 "configure"
10989 #include "confdefs.h"
10990
10991 /* Override any gcc2 internal prototype to avoid an error.  */
10992 #ifdef __cplusplus
10993 extern "C"
10994 #endif
10995 /* We use char because int might match the return type of a gcc2
10996    builtin and then its argument prototype would still apply.  */
10997 char dmalloc_debug ();
10998 int
10999 main ()
11000 {
11001 dmalloc_debug ();
11002   ;
11003   return 0;
11004 }
11005 _ACEOF
11006 rm -f conftest.$ac_objext conftest$ac_exeext
11007 if { (eval echo "$as_me:11007: \"$ac_link\"") >&5
11008   (eval $ac_link) 2>&5
11009   ac_status=$?
11010   echo "$as_me:11010: \$? = $ac_status" >&5
11011   (exit $ac_status); } &&
11012          { ac_try='test -s conftest$ac_exeext'
11013   { (eval echo "$as_me:11013: \"$ac_try\"") >&5
11014   (eval $ac_try) 2>&5
11015   ac_status=$?
11016   echo "$as_me:11016: \$? = $ac_status" >&5
11017   (exit $ac_status); }; }; then
11018   ac_cv_lib_dmalloc_dmalloc_debug=yes
11019 else
11020   echo "$as_me: failed program was:" >&5
11021 cat conftest.$ac_ext >&5
11022 ac_cv_lib_dmalloc_dmalloc_debug=no
11023 fi
11024 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11025 LIBS=$ac_check_lib_save_LIBS
11026 fi
11027 echo "$as_me:11027: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11028 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11029 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11030   cat >>confdefs.h <<EOF
11031 #define HAVE_LIBDMALLOC 1
11032 EOF
11033
11034   LIBS="-ldmalloc $LIBS"
11035
11036 fi
11037
11038 fi
11039
11040 fi
11041
11042 echo "$as_me:11042: checking if you want to use dbmalloc for testing" >&5
11043 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11044
11045 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11046 if test "${with_dbmalloc+set}" = set; then
11047   withval="$with_dbmalloc"
11048   cat >>confdefs.h <<\EOF
11049 #define USE_DBMALLOC 1
11050 EOF
11051
11052         : ${with_cflags:=-g}
11053         : ${with_no_leaks:=yes}
11054          with_dbmalloc=yes
11055 else
11056   with_dbmalloc=
11057 fi;
11058 echo "$as_me:11058: result: ${with_dbmalloc:-no}" >&5
11059 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11060
11061 case .$with_cflags in #(vi
11062 .*-g*)
11063         case .$CFLAGS in #(vi
11064         .*-g*) #(vi
11065                 ;;
11066         *)
11067
11068 cf_fix_cppflags=no
11069 cf_new_cflags=
11070 cf_new_cppflags=
11071 cf_new_extra_cppflags=
11072
11073 for cf_add_cflags in -g
11074 do
11075 case $cf_fix_cppflags in
11076 no)
11077         case $cf_add_cflags in #(vi
11078         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11079                 case $cf_add_cflags in
11080                 -D*)
11081                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11082
11083                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11084                         && test -z "${cf_tst_cflags}" \
11085                         && cf_fix_cppflags=yes
11086
11087                         if test $cf_fix_cppflags = yes ; then
11088                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11089                                 continue
11090                         elif test "${cf_tst_cflags}" = "\"'" ; then
11091                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11092                                 continue
11093                         fi
11094                         ;;
11095                 esac
11096                 case "$CPPFLAGS" in
11097                 *$cf_add_cflags) #(vi
11098                         ;;
11099                 *) #(vi
11100                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11101                         ;;
11102                 esac
11103                 ;;
11104         *)
11105                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11106                 ;;
11107         esac
11108         ;;
11109 yes)
11110         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11111
11112         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11113
11114         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11115         && test -z "${cf_tst_cflags}" \
11116         && cf_fix_cppflags=no
11117         ;;
11118 esac
11119 done
11120
11121 if test -n "$cf_new_cflags" ; then
11122
11123         CFLAGS="$CFLAGS $cf_new_cflags"
11124 fi
11125
11126 if test -n "$cf_new_cppflags" ; then
11127
11128         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11129 fi
11130
11131 if test -n "$cf_new_extra_cppflags" ; then
11132
11133         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11134 fi
11135
11136                 ;;
11137         esac
11138         ;;
11139 esac
11140
11141 if test "$with_dbmalloc" = yes ; then
11142         echo "$as_me:11142: checking for dbmalloc.h" >&5
11143 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11144 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11145   echo $ECHO_N "(cached) $ECHO_C" >&6
11146 else
11147   cat >conftest.$ac_ext <<_ACEOF
11148 #line 11148 "configure"
11149 #include "confdefs.h"
11150 #include <dbmalloc.h>
11151 _ACEOF
11152 if { (eval echo "$as_me:11152: \"$ac_cpp conftest.$ac_ext\"") >&5
11153   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11154   ac_status=$?
11155   egrep -v '^ *\+' conftest.er1 >conftest.err
11156   rm -f conftest.er1
11157   cat conftest.err >&5
11158   echo "$as_me:11158: \$? = $ac_status" >&5
11159   (exit $ac_status); } >/dev/null; then
11160   if test -s conftest.err; then
11161     ac_cpp_err=$ac_c_preproc_warn_flag
11162   else
11163     ac_cpp_err=
11164   fi
11165 else
11166   ac_cpp_err=yes
11167 fi
11168 if test -z "$ac_cpp_err"; then
11169   ac_cv_header_dbmalloc_h=yes
11170 else
11171   echo "$as_me: failed program was:" >&5
11172   cat conftest.$ac_ext >&5
11173   ac_cv_header_dbmalloc_h=no
11174 fi
11175 rm -f conftest.err conftest.$ac_ext
11176 fi
11177 echo "$as_me:11177: result: $ac_cv_header_dbmalloc_h" >&5
11178 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11179 if test $ac_cv_header_dbmalloc_h = yes; then
11180
11181 echo "$as_me:11181: checking for debug_malloc in -ldbmalloc" >&5
11182 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11183 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11184   echo $ECHO_N "(cached) $ECHO_C" >&6
11185 else
11186   ac_check_lib_save_LIBS=$LIBS
11187 LIBS="-ldbmalloc  $LIBS"
11188 cat >conftest.$ac_ext <<_ACEOF
11189 #line 11189 "configure"
11190 #include "confdefs.h"
11191
11192 /* Override any gcc2 internal prototype to avoid an error.  */
11193 #ifdef __cplusplus
11194 extern "C"
11195 #endif
11196 /* We use char because int might match the return type of a gcc2
11197    builtin and then its argument prototype would still apply.  */
11198 char debug_malloc ();
11199 int
11200 main ()
11201 {
11202 debug_malloc ();
11203   ;
11204   return 0;
11205 }
11206 _ACEOF
11207 rm -f conftest.$ac_objext conftest$ac_exeext
11208 if { (eval echo "$as_me:11208: \"$ac_link\"") >&5
11209   (eval $ac_link) 2>&5
11210   ac_status=$?
11211   echo "$as_me:11211: \$? = $ac_status" >&5
11212   (exit $ac_status); } &&
11213          { ac_try='test -s conftest$ac_exeext'
11214   { (eval echo "$as_me:11214: \"$ac_try\"") >&5
11215   (eval $ac_try) 2>&5
11216   ac_status=$?
11217   echo "$as_me:11217: \$? = $ac_status" >&5
11218   (exit $ac_status); }; }; then
11219   ac_cv_lib_dbmalloc_debug_malloc=yes
11220 else
11221   echo "$as_me: failed program was:" >&5
11222 cat conftest.$ac_ext >&5
11223 ac_cv_lib_dbmalloc_debug_malloc=no
11224 fi
11225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11226 LIBS=$ac_check_lib_save_LIBS
11227 fi
11228 echo "$as_me:11228: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11229 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11230 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11231   cat >>confdefs.h <<EOF
11232 #define HAVE_LIBDBMALLOC 1
11233 EOF
11234
11235   LIBS="-ldbmalloc $LIBS"
11236
11237 fi
11238
11239 fi
11240
11241 fi
11242
11243 echo "$as_me:11243: checking if you want to use valgrind for testing" >&5
11244 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11245
11246 # Check whether --with-valgrind or --without-valgrind was given.
11247 if test "${with_valgrind+set}" = set; then
11248   withval="$with_valgrind"
11249   cat >>confdefs.h <<\EOF
11250 #define USE_VALGRIND 1
11251 EOF
11252
11253         : ${with_cflags:=-g}
11254         : ${with_no_leaks:=yes}
11255          with_valgrind=yes
11256 else
11257   with_valgrind=
11258 fi;
11259 echo "$as_me:11259: result: ${with_valgrind:-no}" >&5
11260 echo "${ECHO_T}${with_valgrind:-no}" >&6
11261
11262 case .$with_cflags in #(vi
11263 .*-g*)
11264         case .$CFLAGS in #(vi
11265         .*-g*) #(vi
11266                 ;;
11267         *)
11268
11269 cf_fix_cppflags=no
11270 cf_new_cflags=
11271 cf_new_cppflags=
11272 cf_new_extra_cppflags=
11273
11274 for cf_add_cflags in -g
11275 do
11276 case $cf_fix_cppflags in
11277 no)
11278         case $cf_add_cflags in #(vi
11279         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11280                 case $cf_add_cflags in
11281                 -D*)
11282                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11283
11284                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11285                         && test -z "${cf_tst_cflags}" \
11286                         && cf_fix_cppflags=yes
11287
11288                         if test $cf_fix_cppflags = yes ; then
11289                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11290                                 continue
11291                         elif test "${cf_tst_cflags}" = "\"'" ; then
11292                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11293                                 continue
11294                         fi
11295                         ;;
11296                 esac
11297                 case "$CPPFLAGS" in
11298                 *$cf_add_cflags) #(vi
11299                         ;;
11300                 *) #(vi
11301                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11302                         ;;
11303                 esac
11304                 ;;
11305         *)
11306                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11307                 ;;
11308         esac
11309         ;;
11310 yes)
11311         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11312
11313         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11314
11315         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11316         && test -z "${cf_tst_cflags}" \
11317         && cf_fix_cppflags=no
11318         ;;
11319 esac
11320 done
11321
11322 if test -n "$cf_new_cflags" ; then
11323
11324         CFLAGS="$CFLAGS $cf_new_cflags"
11325 fi
11326
11327 if test -n "$cf_new_cppflags" ; then
11328
11329         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11330 fi
11331
11332 if test -n "$cf_new_extra_cppflags" ; then
11333
11334         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11335 fi
11336
11337                 ;;
11338         esac
11339         ;;
11340 esac
11341
11342 echo "$as_me:11342: checking if you want to perform memory-leak testing" >&5
11343 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11344
11345 # Check whether --enable-leaks or --disable-leaks was given.
11346 if test "${enable_leaks+set}" = set; then
11347   enableval="$enable_leaks"
11348   with_no_leaks=yes
11349 else
11350   : ${with_no_leaks:=no}
11351 fi;
11352 echo "$as_me:11352: result: $with_no_leaks" >&5
11353 echo "${ECHO_T}$with_no_leaks" >&6
11354
11355 if test "$with_no_leaks" = yes ; then
11356         cat >>confdefs.h <<\EOF
11357 #define NO_LEAKS 1
11358 EOF
11359
11360 fi
11361
11362 cat >>confdefs.h <<\EOF
11363 #define HAVE_NC_ALLOC_H 1
11364 EOF
11365
11366 ###     use option --enable-expanded to generate certain macros as functions
11367
11368 # Check whether --enable-expanded or --disable-expanded was given.
11369 if test "${enable_expanded+set}" = set; then
11370   enableval="$enable_expanded"
11371   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11372 #define NCURSES_EXPANDED 1
11373 EOF
11374
11375 fi;
11376
11377 ###     use option --disable-macros to suppress macros in favor of functions
11378
11379 # Check whether --enable-macros or --disable-macros was given.
11380 if test "${enable_macros+set}" = set; then
11381   enableval="$enable_macros"
11382   test "$enableval" = no && cat >>confdefs.h <<\EOF
11383 #define NCURSES_NOMACROS 1
11384 EOF
11385
11386 fi;
11387
11388 # Normally we only add trace() to the debug-library.  Allow this to be
11389 # extended to all models of the ncurses library:
11390 cf_all_traces=no
11391 case "$CFLAGS $CPPFLAGS" in
11392 *-DTRACE*)
11393         cf_all_traces=yes
11394         ;;
11395 esac
11396
11397 echo "$as_me:11397: checking whether to add trace feature to all models" >&5
11398 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11399
11400 # Check whether --with-trace or --without-trace was given.
11401 if test "${with_trace+set}" = set; then
11402   withval="$with_trace"
11403   cf_with_trace=$withval
11404 else
11405   cf_with_trace=$cf_all_traces
11406 fi;
11407 echo "$as_me:11407: result: $cf_with_trace" >&5
11408 echo "${ECHO_T}$cf_with_trace" >&6
11409
11410 if test "$cf_with_trace" = yes ; then
11411         LIB_TRACING=all
11412         ADA_TRACE=TRUE
11413
11414 cf_fix_cppflags=no
11415 cf_new_cflags=
11416 cf_new_cppflags=
11417 cf_new_extra_cppflags=
11418
11419 for cf_add_cflags in -DTRACE
11420 do
11421 case $cf_fix_cppflags in
11422 no)
11423         case $cf_add_cflags in #(vi
11424         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11425                 case $cf_add_cflags in
11426                 -D*)
11427                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11428
11429                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11430                         && test -z "${cf_tst_cflags}" \
11431                         && cf_fix_cppflags=yes
11432
11433                         if test $cf_fix_cppflags = yes ; then
11434                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11435                                 continue
11436                         elif test "${cf_tst_cflags}" = "\"'" ; then
11437                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11438                                 continue
11439                         fi
11440                         ;;
11441                 esac
11442                 case "$CPPFLAGS" in
11443                 *$cf_add_cflags) #(vi
11444                         ;;
11445                 *) #(vi
11446                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11447                         ;;
11448                 esac
11449                 ;;
11450         *)
11451                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11452                 ;;
11453         esac
11454         ;;
11455 yes)
11456         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11457
11458         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11459
11460         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11461         && test -z "${cf_tst_cflags}" \
11462         && cf_fix_cppflags=no
11463         ;;
11464 esac
11465 done
11466
11467 if test -n "$cf_new_cflags" ; then
11468
11469         CFLAGS="$CFLAGS $cf_new_cflags"
11470 fi
11471
11472 if test -n "$cf_new_cppflags" ; then
11473
11474         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11475 fi
11476
11477 if test -n "$cf_new_extra_cppflags" ; then
11478
11479         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11480 fi
11481
11482 else
11483         LIB_TRACING=DEBUG
11484         ADA_TRACE=FALSE
11485 fi
11486
11487 ###     Checks for libraries.
11488 case $cf_cv_system_name in #(vi
11489 *mingw32*) #(vi
11490         ;;
11491 *)
11492 echo "$as_me:11492: checking for gettimeofday" >&5
11493 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11494 if test "${ac_cv_func_gettimeofday+set}" = set; then
11495   echo $ECHO_N "(cached) $ECHO_C" >&6
11496 else
11497   cat >conftest.$ac_ext <<_ACEOF
11498 #line 11498 "configure"
11499 #include "confdefs.h"
11500 /* System header to define __stub macros and hopefully few prototypes,
11501     which can conflict with char gettimeofday (); below.  */
11502 #include <assert.h>
11503 /* Override any gcc2 internal prototype to avoid an error.  */
11504 #ifdef __cplusplus
11505 extern "C"
11506 #endif
11507 /* We use char because int might match the return type of a gcc2
11508    builtin and then its argument prototype would still apply.  */
11509 char gettimeofday ();
11510 char (*f) ();
11511
11512 int
11513 main ()
11514 {
11515 /* The GNU C library defines this for functions which it implements
11516     to always fail with ENOSYS.  Some functions are actually named
11517     something starting with __ and the normal name is an alias.  */
11518 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11519 choke me
11520 #else
11521 f = gettimeofday;
11522 #endif
11523
11524   ;
11525   return 0;
11526 }
11527 _ACEOF
11528 rm -f conftest.$ac_objext conftest$ac_exeext
11529 if { (eval echo "$as_me:11529: \"$ac_link\"") >&5
11530   (eval $ac_link) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit $ac_status); } &&
11534          { ac_try='test -s conftest$ac_exeext'
11535   { (eval echo "$as_me:11535: \"$ac_try\"") >&5
11536   (eval $ac_try) 2>&5
11537   ac_status=$?
11538   echo "$as_me:11538: \$? = $ac_status" >&5
11539   (exit $ac_status); }; }; then
11540   ac_cv_func_gettimeofday=yes
11541 else
11542   echo "$as_me: failed program was:" >&5
11543 cat conftest.$ac_ext >&5
11544 ac_cv_func_gettimeofday=no
11545 fi
11546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11547 fi
11548 echo "$as_me:11548: result: $ac_cv_func_gettimeofday" >&5
11549 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11550 if test $ac_cv_func_gettimeofday = yes; then
11551   cat >>confdefs.h <<\EOF
11552 #define HAVE_GETTIMEOFDAY 1
11553 EOF
11554
11555 else
11556
11557 echo "$as_me:11557: checking for gettimeofday in -lbsd" >&5
11558 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11559 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11560   echo $ECHO_N "(cached) $ECHO_C" >&6
11561 else
11562   ac_check_lib_save_LIBS=$LIBS
11563 LIBS="-lbsd  $LIBS"
11564 cat >conftest.$ac_ext <<_ACEOF
11565 #line 11565 "configure"
11566 #include "confdefs.h"
11567
11568 /* Override any gcc2 internal prototype to avoid an error.  */
11569 #ifdef __cplusplus
11570 extern "C"
11571 #endif
11572 /* We use char because int might match the return type of a gcc2
11573    builtin and then its argument prototype would still apply.  */
11574 char gettimeofday ();
11575 int
11576 main ()
11577 {
11578 gettimeofday ();
11579   ;
11580   return 0;
11581 }
11582 _ACEOF
11583 rm -f conftest.$ac_objext conftest$ac_exeext
11584 if { (eval echo "$as_me:11584: \"$ac_link\"") >&5
11585   (eval $ac_link) 2>&5
11586   ac_status=$?
11587   echo "$as_me:11587: \$? = $ac_status" >&5
11588   (exit $ac_status); } &&
11589          { ac_try='test -s conftest$ac_exeext'
11590   { (eval echo "$as_me:11590: \"$ac_try\"") >&5
11591   (eval $ac_try) 2>&5
11592   ac_status=$?
11593   echo "$as_me:11593: \$? = $ac_status" >&5
11594   (exit $ac_status); }; }; then
11595   ac_cv_lib_bsd_gettimeofday=yes
11596 else
11597   echo "$as_me: failed program was:" >&5
11598 cat conftest.$ac_ext >&5
11599 ac_cv_lib_bsd_gettimeofday=no
11600 fi
11601 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11602 LIBS=$ac_check_lib_save_LIBS
11603 fi
11604 echo "$as_me:11604: result: $ac_cv_lib_bsd_gettimeofday" >&5
11605 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11606 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11607   cat >>confdefs.h <<\EOF
11608 #define HAVE_GETTIMEOFDAY 1
11609 EOF
11610
11611         LIBS="$LIBS -lbsd"
11612 fi
11613
11614 fi
11615         ;;
11616 esac
11617
11618 echo "$as_me:11618: checking if -lm needed for math functions" >&5
11619 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11620 if test "${cf_cv_need_libm+set}" = set; then
11621   echo $ECHO_N "(cached) $ECHO_C" >&6
11622 else
11623
11624         cat >conftest.$ac_ext <<_ACEOF
11625 #line 11625 "configure"
11626 #include "confdefs.h"
11627
11628         #include <stdio.h>
11629         #include <math.h>
11630
11631 int
11632 main ()
11633 {
11634 double x = rand(); printf("result = %g\n", sin(x))
11635   ;
11636   return 0;
11637 }
11638 _ACEOF
11639 rm -f conftest.$ac_objext conftest$ac_exeext
11640 if { (eval echo "$as_me:11640: \"$ac_link\"") >&5
11641   (eval $ac_link) 2>&5
11642   ac_status=$?
11643   echo "$as_me:11643: \$? = $ac_status" >&5
11644   (exit $ac_status); } &&
11645          { ac_try='test -s conftest$ac_exeext'
11646   { (eval echo "$as_me:11646: \"$ac_try\"") >&5
11647   (eval $ac_try) 2>&5
11648   ac_status=$?
11649   echo "$as_me:11649: \$? = $ac_status" >&5
11650   (exit $ac_status); }; }; then
11651   cf_cv_need_libm=no
11652 else
11653   echo "$as_me: failed program was:" >&5
11654 cat conftest.$ac_ext >&5
11655 cf_cv_need_libm=yes
11656 fi
11657 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11658 fi
11659 echo "$as_me:11659: result: $cf_cv_need_libm" >&5
11660 echo "${ECHO_T}$cf_cv_need_libm" >&6
11661 if test "$cf_cv_need_libm" = yes
11662 then
11663 MATH_LIB=-lm
11664 fi
11665
11666 ###     Checks for header files.
11667 echo "$as_me:11667: checking for ANSI C header files" >&5
11668 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11669 if test "${ac_cv_header_stdc+set}" = set; then
11670   echo $ECHO_N "(cached) $ECHO_C" >&6
11671 else
11672   cat >conftest.$ac_ext <<_ACEOF
11673 #line 11673 "configure"
11674 #include "confdefs.h"
11675 #include <stdlib.h>
11676 #include <stdarg.h>
11677 #include <string.h>
11678 #include <float.h>
11679
11680 _ACEOF
11681 if { (eval echo "$as_me:11681: \"$ac_cpp conftest.$ac_ext\"") >&5
11682   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11683   ac_status=$?
11684   egrep -v '^ *\+' conftest.er1 >conftest.err
11685   rm -f conftest.er1
11686   cat conftest.err >&5
11687   echo "$as_me:11687: \$? = $ac_status" >&5
11688   (exit $ac_status); } >/dev/null; then
11689   if test -s conftest.err; then
11690     ac_cpp_err=$ac_c_preproc_warn_flag
11691   else
11692     ac_cpp_err=
11693   fi
11694 else
11695   ac_cpp_err=yes
11696 fi
11697 if test -z "$ac_cpp_err"; then
11698   ac_cv_header_stdc=yes
11699 else
11700   echo "$as_me: failed program was:" >&5
11701   cat conftest.$ac_ext >&5
11702   ac_cv_header_stdc=no
11703 fi
11704 rm -f conftest.err conftest.$ac_ext
11705
11706 if test $ac_cv_header_stdc = yes; then
11707   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11708   cat >conftest.$ac_ext <<_ACEOF
11709 #line 11709 "configure"
11710 #include "confdefs.h"
11711 #include <string.h>
11712
11713 _ACEOF
11714 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11715   egrep "memchr" >/dev/null 2>&1; then
11716   :
11717 else
11718   ac_cv_header_stdc=no
11719 fi
11720 rm -f conftest*
11721
11722 fi
11723
11724 if test $ac_cv_header_stdc = yes; then
11725   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11726   cat >conftest.$ac_ext <<_ACEOF
11727 #line 11727 "configure"
11728 #include "confdefs.h"
11729 #include <stdlib.h>
11730
11731 _ACEOF
11732 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11733   egrep "free" >/dev/null 2>&1; then
11734   :
11735 else
11736   ac_cv_header_stdc=no
11737 fi
11738 rm -f conftest*
11739
11740 fi
11741
11742 if test $ac_cv_header_stdc = yes; then
11743   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11744   if test "$cross_compiling" = yes; then
11745   :
11746 else
11747   cat >conftest.$ac_ext <<_ACEOF
11748 #line 11748 "configure"
11749 #include "confdefs.h"
11750 #include <ctype.h>
11751 #if ((' ' & 0x0FF) == 0x020)
11752 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11753 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11754 #else
11755 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
11756                      || ('j' <= (c) && (c) <= 'r') \
11757                      || ('s' <= (c) && (c) <= 'z'))
11758 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11759 #endif
11760
11761 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11762 int
11763 main ()
11764 {
11765   int i;
11766   for (i = 0; i < 256; i++)
11767     if (XOR (islower (i), ISLOWER (i))
11768         || toupper (i) != TOUPPER (i))
11769       $ac_main_return(2);
11770   $ac_main_return (0);
11771 }
11772 _ACEOF
11773 rm -f conftest$ac_exeext
11774 if { (eval echo "$as_me:11774: \"$ac_link\"") >&5
11775   (eval $ac_link) 2>&5
11776   ac_status=$?
11777   echo "$as_me:11777: \$? = $ac_status" >&5
11778   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11779   { (eval echo "$as_me:11779: \"$ac_try\"") >&5
11780   (eval $ac_try) 2>&5
11781   ac_status=$?
11782   echo "$as_me:11782: \$? = $ac_status" >&5
11783   (exit $ac_status); }; }; then
11784   :
11785 else
11786   echo "$as_me: program exited with status $ac_status" >&5
11787 echo "$as_me: failed program was:" >&5
11788 cat conftest.$ac_ext >&5
11789 ac_cv_header_stdc=no
11790 fi
11791 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11792 fi
11793 fi
11794 fi
11795 echo "$as_me:11795: result: $ac_cv_header_stdc" >&5
11796 echo "${ECHO_T}$ac_cv_header_stdc" >&6
11797 if test $ac_cv_header_stdc = yes; then
11798
11799 cat >>confdefs.h <<\EOF
11800 #define STDC_HEADERS 1
11801 EOF
11802
11803 fi
11804
11805 ac_header_dirent=no
11806 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
11807   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
11808 echo "$as_me:11808: checking for $ac_hdr that defines DIR" >&5
11809 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
11810 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11811   echo $ECHO_N "(cached) $ECHO_C" >&6
11812 else
11813   cat >conftest.$ac_ext <<_ACEOF
11814 #line 11814 "configure"
11815 #include "confdefs.h"
11816 #include <sys/types.h>
11817 #include <$ac_hdr>
11818
11819 int
11820 main ()
11821 {
11822 if ((DIR *) 0)
11823 return 0;
11824   ;
11825   return 0;
11826 }
11827 _ACEOF
11828 rm -f conftest.$ac_objext
11829 if { (eval echo "$as_me:11829: \"$ac_compile\"") >&5
11830   (eval $ac_compile) 2>&5
11831   ac_status=$?
11832   echo "$as_me:11832: \$? = $ac_status" >&5
11833   (exit $ac_status); } &&
11834          { ac_try='test -s conftest.$ac_objext'
11835   { (eval echo "$as_me:11835: \"$ac_try\"") >&5
11836   (eval $ac_try) 2>&5
11837   ac_status=$?
11838   echo "$as_me:11838: \$? = $ac_status" >&5
11839   (exit $ac_status); }; }; then
11840   eval "$as_ac_Header=yes"
11841 else
11842   echo "$as_me: failed program was:" >&5
11843 cat conftest.$ac_ext >&5
11844 eval "$as_ac_Header=no"
11845 fi
11846 rm -f conftest.$ac_objext conftest.$ac_ext
11847 fi
11848 echo "$as_me:11848: result: `eval echo '${'$as_ac_Header'}'`" >&5
11849 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11850 if test `eval echo '${'$as_ac_Header'}'` = yes; then
11851   cat >>confdefs.h <<EOF
11852 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
11853 EOF
11854
11855 ac_header_dirent=$ac_hdr; break
11856 fi
11857
11858 done
11859 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
11860 if test $ac_header_dirent = dirent.h; then
11861   echo "$as_me:11861: checking for opendir in -ldir" >&5
11862 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
11863 if test "${ac_cv_lib_dir_opendir+set}" = set; then
11864   echo $ECHO_N "(cached) $ECHO_C" >&6
11865 else
11866   ac_check_lib_save_LIBS=$LIBS
11867 LIBS="-ldir  $LIBS"
11868 cat >conftest.$ac_ext <<_ACEOF
11869 #line 11869 "configure"
11870 #include "confdefs.h"
11871
11872 /* Override any gcc2 internal prototype to avoid an error.  */
11873 #ifdef __cplusplus
11874 extern "C"
11875 #endif
11876 /* We use char because int might match the return type of a gcc2
11877    builtin and then its argument prototype would still apply.  */
11878 char opendir ();
11879 int
11880 main ()
11881 {
11882 opendir ();
11883   ;
11884   return 0;
11885 }
11886 _ACEOF
11887 rm -f conftest.$ac_objext conftest$ac_exeext
11888 if { (eval echo "$as_me:11888: \"$ac_link\"") >&5
11889   (eval $ac_link) 2>&5
11890   ac_status=$?
11891   echo "$as_me:11891: \$? = $ac_status" >&5
11892   (exit $ac_status); } &&
11893          { ac_try='test -s conftest$ac_exeext'
11894   { (eval echo "$as_me:11894: \"$ac_try\"") >&5
11895   (eval $ac_try) 2>&5
11896   ac_status=$?
11897   echo "$as_me:11897: \$? = $ac_status" >&5
11898   (exit $ac_status); }; }; then
11899   ac_cv_lib_dir_opendir=yes
11900 else
11901   echo "$as_me: failed program was:" >&5
11902 cat conftest.$ac_ext >&5
11903 ac_cv_lib_dir_opendir=no
11904 fi
11905 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11906 LIBS=$ac_check_lib_save_LIBS
11907 fi
11908 echo "$as_me:11908: result: $ac_cv_lib_dir_opendir" >&5
11909 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
11910 if test $ac_cv_lib_dir_opendir = yes; then
11911   LIBS="$LIBS -ldir"
11912 fi
11913
11914 else
11915   echo "$as_me:11915: checking for opendir in -lx" >&5
11916 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
11917 if test "${ac_cv_lib_x_opendir+set}" = set; then
11918   echo $ECHO_N "(cached) $ECHO_C" >&6
11919 else
11920   ac_check_lib_save_LIBS=$LIBS
11921 LIBS="-lx  $LIBS"
11922 cat >conftest.$ac_ext <<_ACEOF
11923 #line 11923 "configure"
11924 #include "confdefs.h"
11925
11926 /* Override any gcc2 internal prototype to avoid an error.  */
11927 #ifdef __cplusplus
11928 extern "C"
11929 #endif
11930 /* We use char because int might match the return type of a gcc2
11931    builtin and then its argument prototype would still apply.  */
11932 char opendir ();
11933 int
11934 main ()
11935 {
11936 opendir ();
11937   ;
11938   return 0;
11939 }
11940 _ACEOF
11941 rm -f conftest.$ac_objext conftest$ac_exeext
11942 if { (eval echo "$as_me:11942: \"$ac_link\"") >&5
11943   (eval $ac_link) 2>&5
11944   ac_status=$?
11945   echo "$as_me:11945: \$? = $ac_status" >&5
11946   (exit $ac_status); } &&
11947          { ac_try='test -s conftest$ac_exeext'
11948   { (eval echo "$as_me:11948: \"$ac_try\"") >&5
11949   (eval $ac_try) 2>&5
11950   ac_status=$?
11951   echo "$as_me:11951: \$? = $ac_status" >&5
11952   (exit $ac_status); }; }; then
11953   ac_cv_lib_x_opendir=yes
11954 else
11955   echo "$as_me: failed program was:" >&5
11956 cat conftest.$ac_ext >&5
11957 ac_cv_lib_x_opendir=no
11958 fi
11959 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11960 LIBS=$ac_check_lib_save_LIBS
11961 fi
11962 echo "$as_me:11962: result: $ac_cv_lib_x_opendir" >&5
11963 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
11964 if test $ac_cv_lib_x_opendir = yes; then
11965   LIBS="$LIBS -lx"
11966 fi
11967
11968 fi
11969
11970 echo "$as_me:11970: checking whether time.h and sys/time.h may both be included" >&5
11971 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
11972 if test "${ac_cv_header_time+set}" = set; then
11973   echo $ECHO_N "(cached) $ECHO_C" >&6
11974 else
11975   cat >conftest.$ac_ext <<_ACEOF
11976 #line 11976 "configure"
11977 #include "confdefs.h"
11978 #include <sys/types.h>
11979 #include <sys/time.h>
11980 #include <time.h>
11981
11982 int
11983 main ()
11984 {
11985 if ((struct tm *) 0)
11986 return 0;
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f conftest.$ac_objext
11992 if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
11993   (eval $ac_compile) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit $ac_status); } &&
11997          { ac_try='test -s conftest.$ac_objext'
11998   { (eval echo "$as_me:11998: \"$ac_try\"") >&5
11999   (eval $ac_try) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit $ac_status); }; }; then
12003   ac_cv_header_time=yes
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat conftest.$ac_ext >&5
12007 ac_cv_header_time=no
12008 fi
12009 rm -f conftest.$ac_objext conftest.$ac_ext
12010 fi
12011 echo "$as_me:12011: result: $ac_cv_header_time" >&5
12012 echo "${ECHO_T}$ac_cv_header_time" >&6
12013 if test $ac_cv_header_time = yes; then
12014
12015 cat >>confdefs.h <<\EOF
12016 #define TIME_WITH_SYS_TIME 1
12017 EOF
12018
12019 fi
12020
12021 echo "$as_me:12021: checking for regular-expression headers" >&5
12022 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12023 if test "${cf_cv_regex+set}" = set; then
12024   echo $ECHO_N "(cached) $ECHO_C" >&6
12025 else
12026
12027 cat >conftest.$ac_ext <<_ACEOF
12028 #line 12028 "configure"
12029 #include "confdefs.h"
12030 #include <sys/types.h>
12031 #include <regex.h>
12032 int
12033 main ()
12034 {
12035
12036         regex_t *p;
12037         int x = regcomp(p, "", 0);
12038         int y = regexec(p, "", 0, 0, 0);
12039         regfree(p);
12040
12041   ;
12042   return 0;
12043 }
12044 _ACEOF
12045 rm -f conftest.$ac_objext conftest$ac_exeext
12046 if { (eval echo "$as_me:12046: \"$ac_link\"") >&5
12047   (eval $ac_link) 2>&5
12048   ac_status=$?
12049   echo "$as_me:12049: \$? = $ac_status" >&5
12050   (exit $ac_status); } &&
12051          { ac_try='test -s conftest$ac_exeext'
12052   { (eval echo "$as_me:12052: \"$ac_try\"") >&5
12053   (eval $ac_try) 2>&5
12054   ac_status=$?
12055   echo "$as_me:12055: \$? = $ac_status" >&5
12056   (exit $ac_status); }; }; then
12057   cf_cv_regex="regex.h"
12058 else
12059   echo "$as_me: failed program was:" >&5
12060 cat conftest.$ac_ext >&5
12061
12062         cat >conftest.$ac_ext <<_ACEOF
12063 #line 12063 "configure"
12064 #include "confdefs.h"
12065 #include <regexp.h>
12066 int
12067 main ()
12068 {
12069
12070                 char *p = compile("", "", "", 0);
12071                 int x = step("", "");
12072
12073   ;
12074   return 0;
12075 }
12076 _ACEOF
12077 rm -f conftest.$ac_objext conftest$ac_exeext
12078 if { (eval echo "$as_me:12078: \"$ac_link\"") >&5
12079   (eval $ac_link) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit $ac_status); } &&
12083          { ac_try='test -s conftest$ac_exeext'
12084   { (eval echo "$as_me:12084: \"$ac_try\"") >&5
12085   (eval $ac_try) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit $ac_status); }; }; then
12089   cf_cv_regex="regexp.h"
12090 else
12091   echo "$as_me: failed program was:" >&5
12092 cat conftest.$ac_ext >&5
12093
12094                 cf_save_LIBS="$LIBS"
12095                 LIBS="-lgen $LIBS"
12096                 cat >conftest.$ac_ext <<_ACEOF
12097 #line 12097 "configure"
12098 #include "confdefs.h"
12099 #include <regexpr.h>
12100 int
12101 main ()
12102 {
12103
12104                         char *p = compile("", "", "");
12105                         int x = step("", "");
12106
12107   ;
12108   return 0;
12109 }
12110 _ACEOF
12111 rm -f conftest.$ac_objext conftest$ac_exeext
12112 if { (eval echo "$as_me:12112: \"$ac_link\"") >&5
12113   (eval $ac_link) 2>&5
12114   ac_status=$?
12115   echo "$as_me:12115: \$? = $ac_status" >&5
12116   (exit $ac_status); } &&
12117          { ac_try='test -s conftest$ac_exeext'
12118   { (eval echo "$as_me:12118: \"$ac_try\"") >&5
12119   (eval $ac_try) 2>&5
12120   ac_status=$?
12121   echo "$as_me:12121: \$? = $ac_status" >&5
12122   (exit $ac_status); }; }; then
12123   cf_cv_regex="regexpr.h"
12124 else
12125   echo "$as_me: failed program was:" >&5
12126 cat conftest.$ac_ext >&5
12127 LIBS="$cf_save_LIBS"
12128 fi
12129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12130 fi
12131 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12132 fi
12133 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12134
12135 fi
12136
12137 echo "$as_me:12137: result: $cf_cv_regex" >&5
12138 echo "${ECHO_T}$cf_cv_regex" >&6
12139 case $cf_cv_regex in
12140         regex.h)   cat >>confdefs.h <<\EOF
12141 #define HAVE_REGEX_H_FUNCS 1
12142 EOF
12143  ;;
12144         regexp.h)  cat >>confdefs.h <<\EOF
12145 #define HAVE_REGEXP_H_FUNCS 1
12146 EOF
12147  ;;
12148         regexpr.h) cat >>confdefs.h <<\EOF
12149 #define HAVE_REGEXPR_H_FUNCS 1
12150 EOF
12151  ;;
12152 esac
12153
12154 for ac_header in \
12155 fcntl.h \
12156 getopt.h \
12157 limits.h \
12158 locale.h \
12159 poll.h \
12160 sys/bsdtypes.h \
12161 sys/ioctl.h \
12162 sys/param.h \
12163 sys/poll.h \
12164 sys/select.h \
12165 sys/time.h \
12166 sys/times.h \
12167 ttyent.h \
12168 unistd.h \
12169 wctype.h \
12170
12171 do
12172 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12173 echo "$as_me:12173: checking for $ac_header" >&5
12174 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12175 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12176   echo $ECHO_N "(cached) $ECHO_C" >&6
12177 else
12178   cat >conftest.$ac_ext <<_ACEOF
12179 #line 12179 "configure"
12180 #include "confdefs.h"
12181 #include <$ac_header>
12182 _ACEOF
12183 if { (eval echo "$as_me:12183: \"$ac_cpp conftest.$ac_ext\"") >&5
12184   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12185   ac_status=$?
12186   egrep -v '^ *\+' conftest.er1 >conftest.err
12187   rm -f conftest.er1
12188   cat conftest.err >&5
12189   echo "$as_me:12189: \$? = $ac_status" >&5
12190   (exit $ac_status); } >/dev/null; then
12191   if test -s conftest.err; then
12192     ac_cpp_err=$ac_c_preproc_warn_flag
12193   else
12194     ac_cpp_err=
12195   fi
12196 else
12197   ac_cpp_err=yes
12198 fi
12199 if test -z "$ac_cpp_err"; then
12200   eval "$as_ac_Header=yes"
12201 else
12202   echo "$as_me: failed program was:" >&5
12203   cat conftest.$ac_ext >&5
12204   eval "$as_ac_Header=no"
12205 fi
12206 rm -f conftest.err conftest.$ac_ext
12207 fi
12208 echo "$as_me:12208: result: `eval echo '${'$as_ac_Header'}'`" >&5
12209 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12210 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12211   cat >>confdefs.h <<EOF
12212 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12213 EOF
12214
12215 fi
12216 done
12217
12218 # check for ISC (this may also define _POSIX_SOURCE)
12219 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12220 if test "$ISC" = yes ; then
12221
12222 echo "$as_me:12222: checking for main in -lcposix" >&5
12223 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12224 if test "${ac_cv_lib_cposix_main+set}" = set; then
12225   echo $ECHO_N "(cached) $ECHO_C" >&6
12226 else
12227   ac_check_lib_save_LIBS=$LIBS
12228 LIBS="-lcposix  $LIBS"
12229 cat >conftest.$ac_ext <<_ACEOF
12230 #line 12230 "configure"
12231 #include "confdefs.h"
12232
12233 int
12234 main ()
12235 {
12236 main ();
12237   ;
12238   return 0;
12239 }
12240 _ACEOF
12241 rm -f conftest.$ac_objext conftest$ac_exeext
12242 if { (eval echo "$as_me:12242: \"$ac_link\"") >&5
12243   (eval $ac_link) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit $ac_status); } &&
12247          { ac_try='test -s conftest$ac_exeext'
12248   { (eval echo "$as_me:12248: \"$ac_try\"") >&5
12249   (eval $ac_try) 2>&5
12250   ac_status=$?
12251   echo "$as_me:12251: \$? = $ac_status" >&5
12252   (exit $ac_status); }; }; then
12253   ac_cv_lib_cposix_main=yes
12254 else
12255   echo "$as_me: failed program was:" >&5
12256 cat conftest.$ac_ext >&5
12257 ac_cv_lib_cposix_main=no
12258 fi
12259 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12260 LIBS=$ac_check_lib_save_LIBS
12261 fi
12262 echo "$as_me:12262: result: $ac_cv_lib_cposix_main" >&5
12263 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12264 if test $ac_cv_lib_cposix_main = yes; then
12265   cat >>confdefs.h <<EOF
12266 #define HAVE_LIBCPOSIX 1
12267 EOF
12268
12269   LIBS="-lcposix $LIBS"
12270
12271 fi
12272
12273         echo "$as_me:12273: checking for bzero in -linet" >&5
12274 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12275 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12276   echo $ECHO_N "(cached) $ECHO_C" >&6
12277 else
12278   ac_check_lib_save_LIBS=$LIBS
12279 LIBS="-linet  $LIBS"
12280 cat >conftest.$ac_ext <<_ACEOF
12281 #line 12281 "configure"
12282 #include "confdefs.h"
12283
12284 /* Override any gcc2 internal prototype to avoid an error.  */
12285 #ifdef __cplusplus
12286 extern "C"
12287 #endif
12288 /* We use char because int might match the return type of a gcc2
12289    builtin and then its argument prototype would still apply.  */
12290 char bzero ();
12291 int
12292 main ()
12293 {
12294 bzero ();
12295   ;
12296   return 0;
12297 }
12298 _ACEOF
12299 rm -f conftest.$ac_objext conftest$ac_exeext
12300 if { (eval echo "$as_me:12300: \"$ac_link\"") >&5
12301   (eval $ac_link) 2>&5
12302   ac_status=$?
12303   echo "$as_me:12303: \$? = $ac_status" >&5
12304   (exit $ac_status); } &&
12305          { ac_try='test -s conftest$ac_exeext'
12306   { (eval echo "$as_me:12306: \"$ac_try\"") >&5
12307   (eval $ac_try) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit $ac_status); }; }; then
12311   ac_cv_lib_inet_bzero=yes
12312 else
12313   echo "$as_me: failed program was:" >&5
12314 cat conftest.$ac_ext >&5
12315 ac_cv_lib_inet_bzero=no
12316 fi
12317 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12318 LIBS=$ac_check_lib_save_LIBS
12319 fi
12320 echo "$as_me:12320: result: $ac_cv_lib_inet_bzero" >&5
12321 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12322 if test $ac_cv_lib_inet_bzero = yes; then
12323   LIBS="$LIBS -linet"
12324 fi
12325 fi
12326
12327 echo "$as_me:12327: checking if sys/time.h works with sys/select.h" >&5
12328 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12329 if test "${cf_cv_sys_time_select+set}" = set; then
12330   echo $ECHO_N "(cached) $ECHO_C" >&6
12331 else
12332
12333 cat >conftest.$ac_ext <<_ACEOF
12334 #line 12334 "configure"
12335 #include "confdefs.h"
12336
12337 #include <sys/types.h>
12338 #ifdef HAVE_SYS_TIME_H
12339 #include <sys/time.h>
12340 #endif
12341 #ifdef HAVE_SYS_SELECT_H
12342 #include <sys/select.h>
12343 #endif
12344
12345 int
12346 main ()
12347 {
12348
12349   ;
12350   return 0;
12351 }
12352 _ACEOF
12353 rm -f conftest.$ac_objext
12354 if { (eval echo "$as_me:12354: \"$ac_compile\"") >&5
12355   (eval $ac_compile) 2>&5
12356   ac_status=$?
12357   echo "$as_me:12357: \$? = $ac_status" >&5
12358   (exit $ac_status); } &&
12359          { ac_try='test -s conftest.$ac_objext'
12360   { (eval echo "$as_me:12360: \"$ac_try\"") >&5
12361   (eval $ac_try) 2>&5
12362   ac_status=$?
12363   echo "$as_me:12363: \$? = $ac_status" >&5
12364   (exit $ac_status); }; }; then
12365   cf_cv_sys_time_select=yes
12366 else
12367   echo "$as_me: failed program was:" >&5
12368 cat conftest.$ac_ext >&5
12369 cf_cv_sys_time_select=no
12370 fi
12371 rm -f conftest.$ac_objext conftest.$ac_ext
12372
12373 fi
12374
12375 echo "$as_me:12375: result: $cf_cv_sys_time_select" >&5
12376 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12377 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12378 #define HAVE_SYS_TIME_SELECT 1
12379 EOF
12380
12381 ###     checks for compiler characteristics
12382 ac_ext=c
12383 ac_cpp='$CPP $CPPFLAGS'
12384 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12385 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12386 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12387 ac_main_return=return
12388
12389 echo "$as_me:12389: checking for $CC option to accept ANSI C" >&5
12390 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12391 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12392   echo $ECHO_N "(cached) $ECHO_C" >&6
12393 else
12394   ac_cv_prog_cc_stdc=no
12395 ac_save_CC=$CC
12396 cat >conftest.$ac_ext <<_ACEOF
12397 #line 12397 "configure"
12398 #include "confdefs.h"
12399 #include <stdarg.h>
12400 #include <stdio.h>
12401 #include <sys/types.h>
12402 #include <sys/stat.h>
12403 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12404 struct buf { int x; };
12405 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12406 static char *e (p, i)
12407      char **p;
12408      int i;
12409 {
12410   return p[i];
12411 }
12412 static char *f (char * (*g) (char **, int), char **p, ...)
12413 {
12414   char *s;
12415   va_list v;
12416   va_start (v,p);
12417   s = g (p, va_arg (v,int));
12418   va_end (v);
12419   return s;
12420 }
12421 int test (int i, double x);
12422 struct s1 {int (*f) (int a);};
12423 struct s2 {int (*f) (double a);};
12424 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12425 int argc;
12426 char **argv;
12427 int
12428 main ()
12429 {
12430 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12431   ;
12432   return 0;
12433 }
12434 _ACEOF
12435 # Don't try gcc -ansi; that turns off useful extensions and
12436 # breaks some systems' header files.
12437 # AIX                   -qlanglvl=ansi
12438 # Ultrix and OSF/1      -std1
12439 # HP-UX 10.20 and later -Ae
12440 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12441 # SVR4                  -Xc -D__EXTENSIONS__
12442 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12443 do
12444   CC="$ac_save_CC $ac_arg"
12445   rm -f conftest.$ac_objext
12446 if { (eval echo "$as_me:12446: \"$ac_compile\"") >&5
12447   (eval $ac_compile) 2>&5
12448   ac_status=$?
12449   echo "$as_me:12449: \$? = $ac_status" >&5
12450   (exit $ac_status); } &&
12451          { ac_try='test -s conftest.$ac_objext'
12452   { (eval echo "$as_me:12452: \"$ac_try\"") >&5
12453   (eval $ac_try) 2>&5
12454   ac_status=$?
12455   echo "$as_me:12455: \$? = $ac_status" >&5
12456   (exit $ac_status); }; }; then
12457   ac_cv_prog_cc_stdc=$ac_arg
12458 break
12459 else
12460   echo "$as_me: failed program was:" >&5
12461 cat conftest.$ac_ext >&5
12462 fi
12463 rm -f conftest.$ac_objext
12464 done
12465 rm -f conftest.$ac_ext conftest.$ac_objext
12466 CC=$ac_save_CC
12467
12468 fi
12469
12470 case "x$ac_cv_prog_cc_stdc" in
12471   x|xno)
12472     echo "$as_me:12472: result: none needed" >&5
12473 echo "${ECHO_T}none needed" >&6 ;;
12474   *)
12475     echo "$as_me:12475: result: $ac_cv_prog_cc_stdc" >&5
12476 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12477     CC="$CC $ac_cv_prog_cc_stdc" ;;
12478 esac
12479
12480 echo "$as_me:12480: checking for an ANSI C-conforming const" >&5
12481 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12482 if test "${ac_cv_c_const+set}" = set; then
12483   echo $ECHO_N "(cached) $ECHO_C" >&6
12484 else
12485   cat >conftest.$ac_ext <<_ACEOF
12486 #line 12486 "configure"
12487 #include "confdefs.h"
12488
12489 int
12490 main ()
12491 {
12492 /* FIXME: Include the comments suggested by Paul. */
12493 #ifndef __cplusplus
12494   /* Ultrix mips cc rejects this.  */
12495   typedef int charset[2];
12496   const charset x;
12497   /* SunOS 4.1.1 cc rejects this.  */
12498   char const *const *ccp;
12499   char **p;
12500   /* NEC SVR4.0.2 mips cc rejects this.  */
12501   struct point {int x, y;};
12502   static struct point const zero = {0,0};
12503   /* AIX XL C 1.02.0.0 rejects this.
12504      It does not let you subtract one const X* pointer from another in
12505      an arm of an if-expression whose if-part is not a constant
12506      expression */
12507   const char *g = "string";
12508   ccp = &g + (g ? g-g : 0);
12509   /* HPUX 7.0 cc rejects these. */
12510   ++ccp;
12511   p = (char**) ccp;
12512   ccp = (char const *const *) p;
12513   { /* SCO 3.2v4 cc rejects this.  */
12514     char *t;
12515     char const *s = 0 ? (char *) 0 : (char const *) 0;
12516
12517     *t++ = 0;
12518   }
12519   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12520     int x[] = {25, 17};
12521     const int *foo = &x[0];
12522     ++foo;
12523   }
12524   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12525     typedef const int *iptr;
12526     iptr p = 0;
12527     ++p;
12528   }
12529   { /* AIX XL C 1.02.0.0 rejects this saying
12530        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12531     struct s { int j; const int *ap[3]; };
12532     struct s *b; b->j = 5;
12533   }
12534   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12535     const int foo = 10;
12536   }
12537 #endif
12538
12539   ;
12540   return 0;
12541 }
12542 _ACEOF
12543 rm -f conftest.$ac_objext
12544 if { (eval echo "$as_me:12544: \"$ac_compile\"") >&5
12545   (eval $ac_compile) 2>&5
12546   ac_status=$?
12547   echo "$as_me:12547: \$? = $ac_status" >&5
12548   (exit $ac_status); } &&
12549          { ac_try='test -s conftest.$ac_objext'
12550   { (eval echo "$as_me:12550: \"$ac_try\"") >&5
12551   (eval $ac_try) 2>&5
12552   ac_status=$?
12553   echo "$as_me:12553: \$? = $ac_status" >&5
12554   (exit $ac_status); }; }; then
12555   ac_cv_c_const=yes
12556 else
12557   echo "$as_me: failed program was:" >&5
12558 cat conftest.$ac_ext >&5
12559 ac_cv_c_const=no
12560 fi
12561 rm -f conftest.$ac_objext conftest.$ac_ext
12562 fi
12563 echo "$as_me:12563: result: $ac_cv_c_const" >&5
12564 echo "${ECHO_T}$ac_cv_c_const" >&6
12565 if test $ac_cv_c_const = no; then
12566
12567 cat >>confdefs.h <<\EOF
12568 #define const
12569 EOF
12570
12571 fi
12572
12573 echo "$as_me:12573: checking for inline" >&5
12574 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12575 if test "${ac_cv_c_inline+set}" = set; then
12576   echo $ECHO_N "(cached) $ECHO_C" >&6
12577 else
12578   ac_cv_c_inline=no
12579 for ac_kw in inline __inline__ __inline; do
12580   cat >conftest.$ac_ext <<_ACEOF
12581 #line 12581 "configure"
12582 #include "confdefs.h"
12583 #ifndef __cplusplus
12584 static $ac_kw int static_foo () {return 0; }
12585 $ac_kw int foo () {return 0; }
12586 #endif
12587
12588 _ACEOF
12589 rm -f conftest.$ac_objext
12590 if { (eval echo "$as_me:12590: \"$ac_compile\"") >&5
12591   (eval $ac_compile) 2>&5
12592   ac_status=$?
12593   echo "$as_me:12593: \$? = $ac_status" >&5
12594   (exit $ac_status); } &&
12595          { ac_try='test -s conftest.$ac_objext'
12596   { (eval echo "$as_me:12596: \"$ac_try\"") >&5
12597   (eval $ac_try) 2>&5
12598   ac_status=$?
12599   echo "$as_me:12599: \$? = $ac_status" >&5
12600   (exit $ac_status); }; }; then
12601   ac_cv_c_inline=$ac_kw; break
12602 else
12603   echo "$as_me: failed program was:" >&5
12604 cat conftest.$ac_ext >&5
12605 fi
12606 rm -f conftest.$ac_objext conftest.$ac_ext
12607 done
12608
12609 fi
12610 echo "$as_me:12610: result: $ac_cv_c_inline" >&5
12611 echo "${ECHO_T}$ac_cv_c_inline" >&6
12612 case $ac_cv_c_inline in
12613   inline | yes) ;;
12614   no)
12615 cat >>confdefs.h <<\EOF
12616 #define inline
12617 EOF
12618  ;;
12619   *)  cat >>confdefs.h <<EOF
12620 #define inline $ac_cv_c_inline
12621 EOF
12622  ;;
12623 esac
12624
12625 NCURSES_INLINE=
12626 if test "$ac_cv_c_inline" != no ; then
12627   NCURSES_INLINE=inline
12628   if test "$INTEL_COMPILER" = yes
12629   then
12630     :
12631   elif test "$GCC" = yes
12632   then
12633     echo "$as_me:12633: checking if gcc supports options to tune inlining" >&5
12634 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12635 if test "${cf_cv_gcc_inline+set}" = set; then
12636   echo $ECHO_N "(cached) $ECHO_C" >&6
12637 else
12638
12639       cf_save_CFLAGS=$CFLAGS
12640       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12641       cat >conftest.$ac_ext <<_ACEOF
12642 #line 12642 "configure"
12643 #include "confdefs.h"
12644 inline int foo(void) { return 1; }
12645 int
12646 main ()
12647 {
12648 ${cf_cv_main_return:-return} foo()
12649   ;
12650   return 0;
12651 }
12652 _ACEOF
12653 rm -f conftest.$ac_objext
12654 if { (eval echo "$as_me:12654: \"$ac_compile\"") >&5
12655   (eval $ac_compile) 2>&5
12656   ac_status=$?
12657   echo "$as_me:12657: \$? = $ac_status" >&5
12658   (exit $ac_status); } &&
12659          { ac_try='test -s conftest.$ac_objext'
12660   { (eval echo "$as_me:12660: \"$ac_try\"") >&5
12661   (eval $ac_try) 2>&5
12662   ac_status=$?
12663   echo "$as_me:12663: \$? = $ac_status" >&5
12664   (exit $ac_status); }; }; then
12665   cf_cv_gcc_inline=yes
12666 else
12667   echo "$as_me: failed program was:" >&5
12668 cat conftest.$ac_ext >&5
12669 cf_cv_gcc_inline=no
12670 fi
12671 rm -f conftest.$ac_objext conftest.$ac_ext
12672       CFLAGS=$cf_save_CFLAGS
12673
12674 fi
12675 echo "$as_me:12675: result: $cf_cv_gcc_inline" >&5
12676 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12677     if test "$cf_cv_gcc_inline" = yes ; then
12678
12679 cf_fix_cppflags=no
12680 cf_new_cflags=
12681 cf_new_cppflags=
12682 cf_new_extra_cppflags=
12683
12684 for cf_add_cflags in --param max-inline-insns-single=1200
12685 do
12686 case $cf_fix_cppflags in
12687 no)
12688         case $cf_add_cflags in #(vi
12689         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12690                 case $cf_add_cflags in
12691                 -D*)
12692                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12693
12694                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12695                         && test -z "${cf_tst_cflags}" \
12696                         && cf_fix_cppflags=yes
12697
12698                         if test $cf_fix_cppflags = yes ; then
12699                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12700                                 continue
12701                         elif test "${cf_tst_cflags}" = "\"'" ; then
12702                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12703                                 continue
12704                         fi
12705                         ;;
12706                 esac
12707                 case "$CPPFLAGS" in
12708                 *$cf_add_cflags) #(vi
12709                         ;;
12710                 *) #(vi
12711                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12712                         ;;
12713                 esac
12714                 ;;
12715         *)
12716                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12717                 ;;
12718         esac
12719         ;;
12720 yes)
12721         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12722
12723         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12724
12725         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12726         && test -z "${cf_tst_cflags}" \
12727         && cf_fix_cppflags=no
12728         ;;
12729 esac
12730 done
12731
12732 if test -n "$cf_new_cflags" ; then
12733
12734         CFLAGS="$CFLAGS $cf_new_cflags"
12735 fi
12736
12737 if test -n "$cf_new_cppflags" ; then
12738
12739         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12740 fi
12741
12742 if test -n "$cf_new_extra_cppflags" ; then
12743
12744         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12745 fi
12746
12747     fi
12748   fi
12749 fi
12750
12751 echo "$as_me:12751: checking for signal global datatype" >&5
12752 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
12753 if test "${cf_cv_sig_atomic_t+set}" = set; then
12754   echo $ECHO_N "(cached) $ECHO_C" >&6
12755 else
12756
12757         for cf_type in \
12758                 "volatile sig_atomic_t" \
12759                 "sig_atomic_t" \
12760                 "int"
12761         do
12762         cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765
12766 #include <sys/types.h>
12767 #include <signal.h>
12768 #include <stdio.h>
12769
12770 extern $cf_type x;
12771 $cf_type x;
12772 static void handler(int sig)
12773 {
12774         x = 5;
12775 }
12776 int
12777 main ()
12778 {
12779 signal(SIGINT, handler);
12780                  x = 1
12781   ;
12782   return 0;
12783 }
12784 _ACEOF
12785 rm -f conftest.$ac_objext
12786 if { (eval echo "$as_me:12786: \"$ac_compile\"") >&5
12787   (eval $ac_compile) 2>&5
12788   ac_status=$?
12789   echo "$as_me:12789: \$? = $ac_status" >&5
12790   (exit $ac_status); } &&
12791          { ac_try='test -s conftest.$ac_objext'
12792   { (eval echo "$as_me:12792: \"$ac_try\"") >&5
12793   (eval $ac_try) 2>&5
12794   ac_status=$?
12795   echo "$as_me:12795: \$? = $ac_status" >&5
12796   (exit $ac_status); }; }; then
12797   cf_cv_sig_atomic_t=$cf_type
12798 else
12799   echo "$as_me: failed program was:" >&5
12800 cat conftest.$ac_ext >&5
12801 cf_cv_sig_atomic_t=no
12802 fi
12803 rm -f conftest.$ac_objext conftest.$ac_ext
12804                 test "$cf_cv_sig_atomic_t" != no && break
12805         done
12806
12807 fi
12808
12809 echo "$as_me:12809: result: $cf_cv_sig_atomic_t" >&5
12810 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
12811 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
12812 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
12813 EOF
12814
12815 if test $NCURSES_CHTYPE = auto ; then
12816
12817 echo "$as_me:12817: checking for type of chtype" >&5
12818 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
12819 if test "${cf_cv_typeof_chtype+set}" = set; then
12820   echo $ECHO_N "(cached) $ECHO_C" >&6
12821 else
12822
12823                 if test "$cross_compiling" = yes; then
12824   cf_cv_typeof_chtype=long
12825 else
12826   cat >conftest.$ac_ext <<_ACEOF
12827 #line 12827 "configure"
12828 #include "confdefs.h"
12829
12830 #define WANT_BITS 31
12831 #include <stdio.h>
12832 int main()
12833 {
12834         FILE *fp = fopen("cf_test.out", "w");
12835         if (fp != 0) {
12836                 char *result = "long";
12837                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
12838                         int n;
12839                         unsigned int x, y;
12840                         for (n = 0; n < WANT_BITS; n++) {
12841                                 x = (1 << n);
12842                                 y = (x >> n);
12843                                 if (y != 1 || x == 0) {
12844                                         x = 0;
12845                                         break;
12846                                 }
12847                         }
12848                         /*
12849                          * If x is nonzero, an int is big enough for the bits
12850                          * that we want.
12851                          */
12852                         result = (x != 0) ? "int" : "long";
12853                 }
12854                 fputs(result, fp);
12855                 fclose(fp);
12856         }
12857         ${cf_cv_main_return:-return}(0);
12858 }
12859
12860 _ACEOF
12861 rm -f conftest$ac_exeext
12862 if { (eval echo "$as_me:12862: \"$ac_link\"") >&5
12863   (eval $ac_link) 2>&5
12864   ac_status=$?
12865   echo "$as_me:12865: \$? = $ac_status" >&5
12866   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12867   { (eval echo "$as_me:12867: \"$ac_try\"") >&5
12868   (eval $ac_try) 2>&5
12869   ac_status=$?
12870   echo "$as_me:12870: \$? = $ac_status" >&5
12871   (exit $ac_status); }; }; then
12872   cf_cv_typeof_chtype=`cat cf_test.out`
12873 else
12874   echo "$as_me: program exited with status $ac_status" >&5
12875 echo "$as_me: failed program was:" >&5
12876 cat conftest.$ac_ext >&5
12877 cf_cv_typeof_chtype=long
12878 fi
12879 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12880 fi
12881                 rm -f cf_test.out
12882
12883 fi
12884
12885 echo "$as_me:12885: result: $cf_cv_typeof_chtype" >&5
12886 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
12887
12888 cat >>confdefs.h <<EOF
12889 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
12890 EOF
12891
12892 else
12893         cf_cv_typeof_chtype=$NCURSES_CHTYPE
12894 fi
12895 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
12896
12897 echo "$as_me:12897: checking if unsigned literals are legal" >&5
12898 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
12899 if test "${cf_cv_unsigned_literals+set}" = set; then
12900   echo $ECHO_N "(cached) $ECHO_C" >&6
12901 else
12902
12903         cat >conftest.$ac_ext <<_ACEOF
12904 #line 12904 "configure"
12905 #include "confdefs.h"
12906
12907 int
12908 main ()
12909 {
12910 long x = 1L + 1UL + 1U + 1
12911   ;
12912   return 0;
12913 }
12914 _ACEOF
12915 rm -f conftest.$ac_objext
12916 if { (eval echo "$as_me:12916: \"$ac_compile\"") >&5
12917   (eval $ac_compile) 2>&5
12918   ac_status=$?
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); } &&
12921          { ac_try='test -s conftest.$ac_objext'
12922   { (eval echo "$as_me:12922: \"$ac_try\"") >&5
12923   (eval $ac_try) 2>&5
12924   ac_status=$?
12925   echo "$as_me:12925: \$? = $ac_status" >&5
12926   (exit $ac_status); }; }; then
12927   cf_cv_unsigned_literals=yes
12928 else
12929   echo "$as_me: failed program was:" >&5
12930 cat conftest.$ac_ext >&5
12931 cf_cv_unsigned_literals=no
12932 fi
12933 rm -f conftest.$ac_objext conftest.$ac_ext
12934
12935 fi
12936
12937 echo "$as_me:12937: result: $cf_cv_unsigned_literals" >&5
12938 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
12939
12940 cf_cv_1UL="1"
12941 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
12942 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
12943
12944 if test $NCURSES_MMASK_T = auto ; then
12945         cf_cv_typeof_mmask_t=long
12946 else
12947         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
12948 fi
12949 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
12950
12951 ###     Checks for external-data
12952
12953 echo "$as_me:12953: checking if external errno is declared" >&5
12954 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
12955 if test "${cf_cv_dcl_errno+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958
12959     cat >conftest.$ac_ext <<_ACEOF
12960 #line 12960 "configure"
12961 #include "confdefs.h"
12962
12963 #ifdef HAVE_STDLIB_H
12964 #include <stdlib.h>
12965 #endif
12966 #include <stdio.h>
12967 #include <sys/types.h>
12968 #include <errno.h>
12969 int
12970 main ()
12971 {
12972 int x = (int) errno
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f conftest.$ac_objext
12978 if { (eval echo "$as_me:12978: \"$ac_compile\"") >&5
12979   (eval $ac_compile) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit $ac_status); } &&
12983          { ac_try='test -s conftest.$ac_objext'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit $ac_status); }; }; then
12989   cf_cv_dcl_errno=yes
12990 else
12991   echo "$as_me: failed program was:" >&5
12992 cat conftest.$ac_ext >&5
12993 cf_cv_dcl_errno=no
12994 fi
12995 rm -f conftest.$ac_objext conftest.$ac_ext
12996
12997 fi
12998 echo "$as_me:12998: result: $cf_cv_dcl_errno" >&5
12999 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13000
13001 if test "$cf_cv_dcl_errno" = no ; then
13002
13003 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13004
13005     cat >>confdefs.h <<EOF
13006 #define $cf_result 1
13007 EOF
13008
13009 fi
13010
13011 # It's possible (for near-UNIX clones) that the data doesn't exist
13012
13013 echo "$as_me:13013: checking if external errno exists" >&5
13014 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13015 if test "${cf_cv_have_errno+set}" = set; then
13016   echo $ECHO_N "(cached) $ECHO_C" >&6
13017 else
13018
13019     cat >conftest.$ac_ext <<_ACEOF
13020 #line 13020 "configure"
13021 #include "confdefs.h"
13022
13023 #undef errno
13024 extern int errno;
13025
13026 int
13027 main ()
13028 {
13029 errno = 2
13030   ;
13031   return 0;
13032 }
13033 _ACEOF
13034 rm -f conftest.$ac_objext conftest$ac_exeext
13035 if { (eval echo "$as_me:13035: \"$ac_link\"") >&5
13036   (eval $ac_link) 2>&5
13037   ac_status=$?
13038   echo "$as_me:13038: \$? = $ac_status" >&5
13039   (exit $ac_status); } &&
13040          { ac_try='test -s conftest$ac_exeext'
13041   { (eval echo "$as_me:13041: \"$ac_try\"") >&5
13042   (eval $ac_try) 2>&5
13043   ac_status=$?
13044   echo "$as_me:13044: \$? = $ac_status" >&5
13045   (exit $ac_status); }; }; then
13046   cf_cv_have_errno=yes
13047 else
13048   echo "$as_me: failed program was:" >&5
13049 cat conftest.$ac_ext >&5
13050 cf_cv_have_errno=no
13051 fi
13052 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13053
13054 fi
13055 echo "$as_me:13055: result: $cf_cv_have_errno" >&5
13056 echo "${ECHO_T}$cf_cv_have_errno" >&6
13057
13058 if test "$cf_cv_have_errno" = yes ; then
13059
13060 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13061
13062     cat >>confdefs.h <<EOF
13063 #define $cf_result 1
13064 EOF
13065
13066 fi
13067
13068 echo "$as_me:13068: checking if data-only library module links" >&5
13069 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13070 if test "${cf_cv_link_dataonly+set}" = set; then
13071   echo $ECHO_N "(cached) $ECHO_C" >&6
13072 else
13073
13074         rm -f conftest.a
13075         cat >conftest.$ac_ext <<EOF
13076 #line 13076 "configure"
13077 int     testdata[3] = { 123, 456, 789 };
13078 EOF
13079         if { (eval echo "$as_me:13079: \"$ac_compile\"") >&5
13080   (eval $ac_compile) 2>&5
13081   ac_status=$?
13082   echo "$as_me:13082: \$? = $ac_status" >&5
13083   (exit $ac_status); } ; then
13084                 mv conftest.o data.o && \
13085                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13086         fi
13087         rm -f conftest.$ac_ext data.o
13088         cat >conftest.$ac_ext <<EOF
13089 #line 13089 "configure"
13090 int     testfunc()
13091 {
13092 #if defined(NeXT)
13093         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13094 #else
13095         extern int testdata[3];
13096         return testdata[0] == 123
13097            &&  testdata[1] == 456
13098            &&  testdata[2] == 789;
13099 #endif
13100 }
13101 EOF
13102         if { (eval echo "$as_me:13102: \"$ac_compile\"") >&5
13103   (eval $ac_compile) 2>&5
13104   ac_status=$?
13105   echo "$as_me:13105: \$? = $ac_status" >&5
13106   (exit $ac_status); }; then
13107                 mv conftest.o func.o && \
13108                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13109         fi
13110         rm -f conftest.$ac_ext func.o
13111         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13112         cf_saveLIBS="$LIBS"
13113         LIBS="conftest.a $LIBS"
13114         if test "$cross_compiling" = yes; then
13115   cf_cv_link_dataonly=unknown
13116 else
13117   cat >conftest.$ac_ext <<_ACEOF
13118 #line 13118 "configure"
13119 #include "confdefs.h"
13120
13121         int main()
13122         {
13123                 extern int testfunc();
13124                 ${cf_cv_main_return:-return} (!testfunc());
13125         }
13126
13127 _ACEOF
13128 rm -f conftest$ac_exeext
13129 if { (eval echo "$as_me:13129: \"$ac_link\"") >&5
13130   (eval $ac_link) 2>&5
13131   ac_status=$?
13132   echo "$as_me:13132: \$? = $ac_status" >&5
13133   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13134   { (eval echo "$as_me:13134: \"$ac_try\"") >&5
13135   (eval $ac_try) 2>&5
13136   ac_status=$?
13137   echo "$as_me:13137: \$? = $ac_status" >&5
13138   (exit $ac_status); }; }; then
13139   cf_cv_link_dataonly=yes
13140 else
13141   echo "$as_me: program exited with status $ac_status" >&5
13142 echo "$as_me: failed program was:" >&5
13143 cat conftest.$ac_ext >&5
13144 cf_cv_link_dataonly=no
13145 fi
13146 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13147 fi
13148         LIBS="$cf_saveLIBS"
13149
13150 fi
13151
13152 echo "$as_me:13152: result: $cf_cv_link_dataonly" >&5
13153 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13154
13155 if test "$cf_cv_link_dataonly" = no ; then
13156         cat >>confdefs.h <<\EOF
13157 #define BROKEN_LINKER 1
13158 EOF
13159
13160         BROKEN_LINKER=1
13161 fi
13162
13163 ###     Checks for library functions.
13164
13165 for ac_func in \
13166 getcwd \
13167 getegid \
13168 geteuid \
13169 getttynam \
13170 issetugid \
13171 poll \
13172 remove \
13173 select \
13174 setbuf \
13175 setbuffer \
13176 setvbuf \
13177 sigaction \
13178 sigvec \
13179 strdup \
13180 strstr \
13181 tcgetpgrp \
13182 times \
13183 vsnprintf \
13184
13185 do
13186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13187 echo "$as_me:13187: checking for $ac_func" >&5
13188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13189 if eval "test \"\${$as_ac_var+set}\" = set"; then
13190   echo $ECHO_N "(cached) $ECHO_C" >&6
13191 else
13192   cat >conftest.$ac_ext <<_ACEOF
13193 #line 13193 "configure"
13194 #include "confdefs.h"
13195 /* System header to define __stub macros and hopefully few prototypes,
13196     which can conflict with char $ac_func (); below.  */
13197 #include <assert.h>
13198 /* Override any gcc2 internal prototype to avoid an error.  */
13199 #ifdef __cplusplus
13200 extern "C"
13201 #endif
13202 /* We use char because int might match the return type of a gcc2
13203    builtin and then its argument prototype would still apply.  */
13204 char $ac_func ();
13205 char (*f) ();
13206
13207 int
13208 main ()
13209 {
13210 /* The GNU C library defines this for functions which it implements
13211     to always fail with ENOSYS.  Some functions are actually named
13212     something starting with __ and the normal name is an alias.  */
13213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13214 choke me
13215 #else
13216 f = $ac_func;
13217 #endif
13218
13219   ;
13220   return 0;
13221 }
13222 _ACEOF
13223 rm -f conftest.$ac_objext conftest$ac_exeext
13224 if { (eval echo "$as_me:13224: \"$ac_link\"") >&5
13225   (eval $ac_link) 2>&5
13226   ac_status=$?
13227   echo "$as_me:13227: \$? = $ac_status" >&5
13228   (exit $ac_status); } &&
13229          { ac_try='test -s conftest$ac_exeext'
13230   { (eval echo "$as_me:13230: \"$ac_try\"") >&5
13231   (eval $ac_try) 2>&5
13232   ac_status=$?
13233   echo "$as_me:13233: \$? = $ac_status" >&5
13234   (exit $ac_status); }; }; then
13235   eval "$as_ac_var=yes"
13236 else
13237   echo "$as_me: failed program was:" >&5
13238 cat conftest.$ac_ext >&5
13239 eval "$as_ac_var=no"
13240 fi
13241 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13242 fi
13243 echo "$as_me:13243: result: `eval echo '${'$as_ac_var'}'`" >&5
13244 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13245 if test `eval echo '${'$as_ac_var'}'` = yes; then
13246   cat >>confdefs.h <<EOF
13247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13248 EOF
13249
13250 fi
13251 done
13252
13253 if test "$with_getcap" = "yes" ; then
13254
13255 echo "$as_me:13255: checking for terminal-capability database functions" >&5
13256 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13257 if test "${cf_cv_cgetent+set}" = set; then
13258   echo $ECHO_N "(cached) $ECHO_C" >&6
13259 else
13260
13261 cat >conftest.$ac_ext <<_ACEOF
13262 #line 13262 "configure"
13263 #include "confdefs.h"
13264
13265 #include <stdlib.h>
13266 int
13267 main ()
13268 {
13269
13270         char temp[128];
13271         char *buf = temp;
13272         char *db_array = temp;
13273         cgetent(&buf, /* int *, */ &db_array, "vt100");
13274         cgetcap(buf, "tc", '=');
13275         cgetmatch(buf, "tc");
13276
13277   ;
13278   return 0;
13279 }
13280 _ACEOF
13281 rm -f conftest.$ac_objext conftest$ac_exeext
13282 if { (eval echo "$as_me:13282: \"$ac_link\"") >&5
13283   (eval $ac_link) 2>&5
13284   ac_status=$?
13285   echo "$as_me:13285: \$? = $ac_status" >&5
13286   (exit $ac_status); } &&
13287          { ac_try='test -s conftest$ac_exeext'
13288   { (eval echo "$as_me:13288: \"$ac_try\"") >&5
13289   (eval $ac_try) 2>&5
13290   ac_status=$?
13291   echo "$as_me:13291: \$? = $ac_status" >&5
13292   (exit $ac_status); }; }; then
13293   cf_cv_cgetent=yes
13294 else
13295   echo "$as_me: failed program was:" >&5
13296 cat conftest.$ac_ext >&5
13297 cf_cv_cgetent=no
13298 fi
13299 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13300
13301 fi
13302
13303 echo "$as_me:13303: result: $cf_cv_cgetent" >&5
13304 echo "${ECHO_T}$cf_cv_cgetent" >&6
13305 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13306 #define HAVE_BSD_CGETENT 1
13307 EOF
13308
13309 fi
13310
13311 echo "$as_me:13311: checking for isascii" >&5
13312 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13313 if test "${cf_cv_have_isascii+set}" = set; then
13314   echo $ECHO_N "(cached) $ECHO_C" >&6
13315 else
13316
13317         cat >conftest.$ac_ext <<_ACEOF
13318 #line 13318 "configure"
13319 #include "confdefs.h"
13320 #include <ctype.h>
13321 int
13322 main ()
13323 {
13324 int x = isascii(' ')
13325   ;
13326   return 0;
13327 }
13328 _ACEOF
13329 rm -f conftest.$ac_objext conftest$ac_exeext
13330 if { (eval echo "$as_me:13330: \"$ac_link\"") >&5
13331   (eval $ac_link) 2>&5
13332   ac_status=$?
13333   echo "$as_me:13333: \$? = $ac_status" >&5
13334   (exit $ac_status); } &&
13335          { ac_try='test -s conftest$ac_exeext'
13336   { (eval echo "$as_me:13336: \"$ac_try\"") >&5
13337   (eval $ac_try) 2>&5
13338   ac_status=$?
13339   echo "$as_me:13339: \$? = $ac_status" >&5
13340   (exit $ac_status); }; }; then
13341   cf_cv_have_isascii=yes
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat conftest.$ac_ext >&5
13345 cf_cv_have_isascii=no
13346 fi
13347 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13348
13349 fi
13350 echo "$as_me:13350: result: $cf_cv_have_isascii" >&5
13351 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13352 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13353 #define HAVE_ISASCII 1
13354 EOF
13355
13356 if test "$ac_cv_func_sigaction" = yes; then
13357 echo "$as_me:13357: checking whether sigaction needs _POSIX_SOURCE" >&5
13358 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13359 cat >conftest.$ac_ext <<_ACEOF
13360 #line 13360 "configure"
13361 #include "confdefs.h"
13362
13363 #include <sys/types.h>
13364 #include <signal.h>
13365 int
13366 main ()
13367 {
13368 struct sigaction act
13369   ;
13370   return 0;
13371 }
13372 _ACEOF
13373 rm -f conftest.$ac_objext
13374 if { (eval echo "$as_me:13374: \"$ac_compile\"") >&5
13375   (eval $ac_compile) 2>&5
13376   ac_status=$?
13377   echo "$as_me:13377: \$? = $ac_status" >&5
13378   (exit $ac_status); } &&
13379          { ac_try='test -s conftest.$ac_objext'
13380   { (eval echo "$as_me:13380: \"$ac_try\"") >&5
13381   (eval $ac_try) 2>&5
13382   ac_status=$?
13383   echo "$as_me:13383: \$? = $ac_status" >&5
13384   (exit $ac_status); }; }; then
13385   sigact_bad=no
13386 else
13387   echo "$as_me: failed program was:" >&5
13388 cat conftest.$ac_ext >&5
13389
13390 cat >conftest.$ac_ext <<_ACEOF
13391 #line 13391 "configure"
13392 #include "confdefs.h"
13393
13394 #define _POSIX_SOURCE
13395 #include <sys/types.h>
13396 #include <signal.h>
13397 int
13398 main ()
13399 {
13400 struct sigaction act
13401   ;
13402   return 0;
13403 }
13404 _ACEOF
13405 rm -f conftest.$ac_objext
13406 if { (eval echo "$as_me:13406: \"$ac_compile\"") >&5
13407   (eval $ac_compile) 2>&5
13408   ac_status=$?
13409   echo "$as_me:13409: \$? = $ac_status" >&5
13410   (exit $ac_status); } &&
13411          { ac_try='test -s conftest.$ac_objext'
13412   { (eval echo "$as_me:13412: \"$ac_try\"") >&5
13413   (eval $ac_try) 2>&5
13414   ac_status=$?
13415   echo "$as_me:13415: \$? = $ac_status" >&5
13416   (exit $ac_status); }; }; then
13417   sigact_bad=yes
13418          cat >>confdefs.h <<\EOF
13419 #define SVR4_ACTION 1
13420 EOF
13421
13422 else
13423   echo "$as_me: failed program was:" >&5
13424 cat conftest.$ac_ext >&5
13425 sigact_bad=unknown
13426 fi
13427 rm -f conftest.$ac_objext conftest.$ac_ext
13428 fi
13429 rm -f conftest.$ac_objext conftest.$ac_ext
13430 echo "$as_me:13430: result: $sigact_bad" >&5
13431 echo "${ECHO_T}$sigact_bad" >&6
13432 fi
13433
13434 echo "$as_me:13434: checking if nanosleep really works" >&5
13435 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13436 if test "${cf_cv_func_nanosleep+set}" = set; then
13437   echo $ECHO_N "(cached) $ECHO_C" >&6
13438 else
13439
13440 if test "$cross_compiling" = yes; then
13441   cf_cv_func_nanosleep=unknown
13442 else
13443   cat >conftest.$ac_ext <<_ACEOF
13444 #line 13444 "configure"
13445 #include "confdefs.h"
13446
13447 #include <stdio.h>
13448 #include <errno.h>
13449 #include <time.h>
13450
13451 #ifdef HAVE_SYS_TIME_H
13452 #include <sys/time.h>
13453 #endif
13454
13455 int main() {
13456         struct timespec ts1, ts2;
13457         int code;
13458         ts1.tv_sec  = 0;
13459         ts1.tv_nsec = 750000000;
13460         ts2.tv_sec  = 0;
13461         ts2.tv_nsec = 0;
13462         errno = 0;
13463         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13464         ${cf_cv_main_return:-return}(code != 0);
13465 }
13466
13467 _ACEOF
13468 rm -f conftest$ac_exeext
13469 if { (eval echo "$as_me:13469: \"$ac_link\"") >&5
13470   (eval $ac_link) 2>&5
13471   ac_status=$?
13472   echo "$as_me:13472: \$? = $ac_status" >&5
13473   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13474   { (eval echo "$as_me:13474: \"$ac_try\"") >&5
13475   (eval $ac_try) 2>&5
13476   ac_status=$?
13477   echo "$as_me:13477: \$? = $ac_status" >&5
13478   (exit $ac_status); }; }; then
13479   cf_cv_func_nanosleep=yes
13480 else
13481   echo "$as_me: program exited with status $ac_status" >&5
13482 echo "$as_me: failed program was:" >&5
13483 cat conftest.$ac_ext >&5
13484 cf_cv_func_nanosleep=no
13485 fi
13486 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13487 fi
13488 fi
13489 echo "$as_me:13489: result: $cf_cv_func_nanosleep" >&5
13490 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13491
13492 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13493 #define HAVE_NANOSLEEP 1
13494 EOF
13495
13496 for ac_header in \
13497 termio.h \
13498 termios.h \
13499 unistd.h \
13500
13501 do
13502 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13503 echo "$as_me:13503: checking for $ac_header" >&5
13504 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13506   echo $ECHO_N "(cached) $ECHO_C" >&6
13507 else
13508   cat >conftest.$ac_ext <<_ACEOF
13509 #line 13509 "configure"
13510 #include "confdefs.h"
13511 #include <$ac_header>
13512 _ACEOF
13513 if { (eval echo "$as_me:13513: \"$ac_cpp conftest.$ac_ext\"") >&5
13514   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13515   ac_status=$?
13516   egrep -v '^ *\+' conftest.er1 >conftest.err
13517   rm -f conftest.er1
13518   cat conftest.err >&5
13519   echo "$as_me:13519: \$? = $ac_status" >&5
13520   (exit $ac_status); } >/dev/null; then
13521   if test -s conftest.err; then
13522     ac_cpp_err=$ac_c_preproc_warn_flag
13523   else
13524     ac_cpp_err=
13525   fi
13526 else
13527   ac_cpp_err=yes
13528 fi
13529 if test -z "$ac_cpp_err"; then
13530   eval "$as_ac_Header=yes"
13531 else
13532   echo "$as_me: failed program was:" >&5
13533   cat conftest.$ac_ext >&5
13534   eval "$as_ac_Header=no"
13535 fi
13536 rm -f conftest.err conftest.$ac_ext
13537 fi
13538 echo "$as_me:13538: result: `eval echo '${'$as_ac_Header'}'`" >&5
13539 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13540 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13541   cat >>confdefs.h <<EOF
13542 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13543 EOF
13544
13545 fi
13546 done
13547
13548 if test "$ISC" = yes ; then
13549
13550 for ac_header in sys/termio.h
13551 do
13552 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13553 echo "$as_me:13553: checking for $ac_header" >&5
13554 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13555 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13556   echo $ECHO_N "(cached) $ECHO_C" >&6
13557 else
13558   cat >conftest.$ac_ext <<_ACEOF
13559 #line 13559 "configure"
13560 #include "confdefs.h"
13561 #include <$ac_header>
13562 _ACEOF
13563 if { (eval echo "$as_me:13563: \"$ac_cpp conftest.$ac_ext\"") >&5
13564   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13565   ac_status=$?
13566   egrep -v '^ *\+' conftest.er1 >conftest.err
13567   rm -f conftest.er1
13568   cat conftest.err >&5
13569   echo "$as_me:13569: \$? = $ac_status" >&5
13570   (exit $ac_status); } >/dev/null; then
13571   if test -s conftest.err; then
13572     ac_cpp_err=$ac_c_preproc_warn_flag
13573   else
13574     ac_cpp_err=
13575   fi
13576 else
13577   ac_cpp_err=yes
13578 fi
13579 if test -z "$ac_cpp_err"; then
13580   eval "$as_ac_Header=yes"
13581 else
13582   echo "$as_me: failed program was:" >&5
13583   cat conftest.$ac_ext >&5
13584   eval "$as_ac_Header=no"
13585 fi
13586 rm -f conftest.err conftest.$ac_ext
13587 fi
13588 echo "$as_me:13588: result: `eval echo '${'$as_ac_Header'}'`" >&5
13589 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13590 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13591   cat >>confdefs.h <<EOF
13592 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13593 EOF
13594
13595 fi
13596 done
13597
13598 fi
13599 if test "$ac_cv_header_termios_h" = yes ; then
13600         case "$CFLAGS $CPPFLAGS" in
13601         *-D_POSIX_SOURCE*)
13602                 termios_bad=dunno ;;
13603         *)      termios_bad=maybe ;;
13604         esac
13605         if test "$termios_bad" = maybe ; then
13606         echo "$as_me:13606: checking whether termios.h needs _POSIX_SOURCE" >&5
13607 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13608         cat >conftest.$ac_ext <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611 #include <termios.h>
13612 int
13613 main ()
13614 {
13615 struct termios foo; int x = foo.c_iflag
13616   ;
13617   return 0;
13618 }
13619 _ACEOF
13620 rm -f conftest.$ac_objext
13621 if { (eval echo "$as_me:13621: \"$ac_compile\"") >&5
13622   (eval $ac_compile) 2>&5
13623   ac_status=$?
13624   echo "$as_me:13624: \$? = $ac_status" >&5
13625   (exit $ac_status); } &&
13626          { ac_try='test -s conftest.$ac_objext'
13627   { (eval echo "$as_me:13627: \"$ac_try\"") >&5
13628   (eval $ac_try) 2>&5
13629   ac_status=$?
13630   echo "$as_me:13630: \$? = $ac_status" >&5
13631   (exit $ac_status); }; }; then
13632   termios_bad=no
13633 else
13634   echo "$as_me: failed program was:" >&5
13635 cat conftest.$ac_ext >&5
13636
13637                 cat >conftest.$ac_ext <<_ACEOF
13638 #line 13638 "configure"
13639 #include "confdefs.h"
13640
13641 #define _POSIX_SOURCE
13642 #include <termios.h>
13643 int
13644 main ()
13645 {
13646 struct termios foo; int x = foo.c_iflag
13647   ;
13648   return 0;
13649 }
13650 _ACEOF
13651 rm -f conftest.$ac_objext
13652 if { (eval echo "$as_me:13652: \"$ac_compile\"") >&5
13653   (eval $ac_compile) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit $ac_status); } &&
13657          { ac_try='test -s conftest.$ac_objext'
13658   { (eval echo "$as_me:13658: \"$ac_try\"") >&5
13659   (eval $ac_try) 2>&5
13660   ac_status=$?
13661   echo "$as_me:13661: \$? = $ac_status" >&5
13662   (exit $ac_status); }; }; then
13663   termios_bad=unknown
13664 else
13665   echo "$as_me: failed program was:" >&5
13666 cat conftest.$ac_ext >&5
13667 termios_bad=yes cat >>confdefs.h <<\EOF
13668 #define SVR4_TERMIO 1
13669 EOF
13670
13671 fi
13672 rm -f conftest.$ac_objext conftest.$ac_ext
13673
13674 fi
13675 rm -f conftest.$ac_objext conftest.$ac_ext
13676         echo "$as_me:13676: result: $termios_bad" >&5
13677 echo "${ECHO_T}$termios_bad" >&6
13678         fi
13679 fi
13680
13681 echo "$as_me:13681: checking for tcgetattr" >&5
13682 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
13683 if test "${cf_cv_have_tcgetattr+set}" = set; then
13684   echo $ECHO_N "(cached) $ECHO_C" >&6
13685 else
13686
13687 cat >conftest.$ac_ext <<_ACEOF
13688 #line 13688 "configure"
13689 #include "confdefs.h"
13690
13691 #include <sys/types.h>
13692 #ifdef HAVE_UNISTD_H
13693 #include <unistd.h>
13694 #endif
13695 #ifdef HAVE_TERMIOS_H
13696 #include <termios.h>
13697 #define TTY struct termios
13698 #else
13699 #ifdef HAVE_TERMIO_H
13700 #include <termio.h>
13701 #define TTY struct termio
13702 #endif
13703 #endif
13704
13705 int
13706 main ()
13707 {
13708
13709 TTY foo;
13710 tcgetattr(1, &foo);
13711   ;
13712   return 0;
13713 }
13714 _ACEOF
13715 rm -f conftest.$ac_objext conftest$ac_exeext
13716 if { (eval echo "$as_me:13716: \"$ac_link\"") >&5
13717   (eval $ac_link) 2>&5
13718   ac_status=$?
13719   echo "$as_me:13719: \$? = $ac_status" >&5
13720   (exit $ac_status); } &&
13721          { ac_try='test -s conftest$ac_exeext'
13722   { (eval echo "$as_me:13722: \"$ac_try\"") >&5
13723   (eval $ac_try) 2>&5
13724   ac_status=$?
13725   echo "$as_me:13725: \$? = $ac_status" >&5
13726   (exit $ac_status); }; }; then
13727   cf_cv_have_tcgetattr=yes
13728 else
13729   echo "$as_me: failed program was:" >&5
13730 cat conftest.$ac_ext >&5
13731 cf_cv_have_tcgetattr=no
13732 fi
13733 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13734 fi
13735 echo "$as_me:13735: result: $cf_cv_have_tcgetattr" >&5
13736 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
13737 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
13738 #define HAVE_TCGETATTR 1
13739 EOF
13740
13741 echo "$as_me:13741: checking for vsscanf function or workaround" >&5
13742 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
13743 if test "${cf_cv_func_vsscanf+set}" = set; then
13744   echo $ECHO_N "(cached) $ECHO_C" >&6
13745 else
13746
13747 cat >conftest.$ac_ext <<_ACEOF
13748 #line 13748 "configure"
13749 #include "confdefs.h"
13750
13751 #include <stdarg.h>
13752 #include <stdio.h>
13753 int
13754 main ()
13755 {
13756
13757         va_list ap;
13758         vsscanf("from", "%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=vsscanf
13776 else
13777   echo "$as_me: failed program was:" >&5
13778 cat conftest.$ac_ext >&5
13779
13780 cat >conftest.$ac_ext <<_ACEOF
13781 #line 13781 "configure"
13782 #include "confdefs.h"
13783
13784 #include <stdarg.h>
13785 #include <stdio.h>
13786 int
13787 main ()
13788 {
13789
13790     FILE strbuf;
13791     char *str = "from";
13792
13793     strbuf._flag = _IOREAD;
13794     strbuf._ptr = strbuf._base = (unsigned char *) str;
13795     strbuf._cnt = strlen(str);
13796     strbuf._file = _NFILE;
13797     return (vfscanf(&strbuf, "%d", ap))
13798   ;
13799   return 0;
13800 }
13801 _ACEOF
13802 rm -f conftest.$ac_objext conftest$ac_exeext
13803 if { (eval echo "$as_me:13803: \"$ac_link\"") >&5
13804   (eval $ac_link) 2>&5
13805   ac_status=$?
13806   echo "$as_me:13806: \$? = $ac_status" >&5
13807   (exit $ac_status); } &&
13808          { ac_try='test -s conftest$ac_exeext'
13809   { (eval echo "$as_me:13809: \"$ac_try\"") >&5
13810   (eval $ac_try) 2>&5
13811   ac_status=$?
13812   echo "$as_me:13812: \$? = $ac_status" >&5
13813   (exit $ac_status); }; }; then
13814   cf_cv_func_vsscanf=vfscanf
13815 else
13816   echo "$as_me: failed program was:" >&5
13817 cat conftest.$ac_ext >&5
13818
13819 cat >conftest.$ac_ext <<_ACEOF
13820 #line 13820 "configure"
13821 #include "confdefs.h"
13822
13823 #include <stdarg.h>
13824 #include <stdio.h>
13825 int
13826 main ()
13827 {
13828
13829     FILE strbuf;
13830     char *str = "from";
13831
13832     strbuf._flag = _IOREAD;
13833     strbuf._ptr = strbuf._base = (unsigned char *) str;
13834     strbuf._cnt = strlen(str);
13835     strbuf._file = _NFILE;
13836     return (_doscan(&strbuf, "%d", ap))
13837   ;
13838   return 0;
13839 }
13840 _ACEOF
13841 rm -f conftest.$ac_objext conftest$ac_exeext
13842 if { (eval echo "$as_me:13842: \"$ac_link\"") >&5
13843   (eval $ac_link) 2>&5
13844   ac_status=$?
13845   echo "$as_me:13845: \$? = $ac_status" >&5
13846   (exit $ac_status); } &&
13847          { ac_try='test -s conftest$ac_exeext'
13848   { (eval echo "$as_me:13848: \"$ac_try\"") >&5
13849   (eval $ac_try) 2>&5
13850   ac_status=$?
13851   echo "$as_me:13851: \$? = $ac_status" >&5
13852   (exit $ac_status); }; }; then
13853   cf_cv_func_vsscanf=_doscan
13854 else
13855   echo "$as_me: failed program was:" >&5
13856 cat conftest.$ac_ext >&5
13857
13858 cf_cv_func_vsscanf=no
13859 fi
13860 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13861 fi
13862 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13863 fi
13864 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13865 fi
13866 echo "$as_me:13866: result: $cf_cv_func_vsscanf" >&5
13867 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
13868
13869 case $cf_cv_func_vsscanf in #(vi
13870 vsscanf) cat >>confdefs.h <<\EOF
13871 #define HAVE_VSSCANF 1
13872 EOF
13873 ;; #(vi
13874 vfscanf) cat >>confdefs.h <<\EOF
13875 #define HAVE_VFSCANF 1
13876 EOF
13877 ;; #(vi
13878 _doscan) cat >>confdefs.h <<\EOF
13879 #define HAVE__DOSCAN 1
13880 EOF
13881 ;;
13882 esac
13883
13884 echo "$as_me:13884: checking for working mkstemp" >&5
13885 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
13886 if test "${cf_cv_func_mkstemp+set}" = set; then
13887   echo $ECHO_N "(cached) $ECHO_C" >&6
13888 else
13889
13890 rm -f conftest*
13891 if test "$cross_compiling" = yes; then
13892   echo "$as_me:13892: checking for mkstemp" >&5
13893 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
13894 if test "${ac_cv_func_mkstemp+set}" = set; then
13895   echo $ECHO_N "(cached) $ECHO_C" >&6
13896 else
13897   cat >conftest.$ac_ext <<_ACEOF
13898 #line 13898 "configure"
13899 #include "confdefs.h"
13900 /* System header to define __stub macros and hopefully few prototypes,
13901     which can conflict with char mkstemp (); below.  */
13902 #include <assert.h>
13903 /* Override any gcc2 internal prototype to avoid an error.  */
13904 #ifdef __cplusplus
13905 extern "C"
13906 #endif
13907 /* We use char because int might match the return type of a gcc2
13908    builtin and then its argument prototype would still apply.  */
13909 char mkstemp ();
13910 char (*f) ();
13911
13912 int
13913 main ()
13914 {
13915 /* The GNU C library defines this for functions which it implements
13916     to always fail with ENOSYS.  Some functions are actually named
13917     something starting with __ and the normal name is an alias.  */
13918 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
13919 choke me
13920 #else
13921 f = mkstemp;
13922 #endif
13923
13924   ;
13925   return 0;
13926 }
13927 _ACEOF
13928 rm -f conftest.$ac_objext conftest$ac_exeext
13929 if { (eval echo "$as_me:13929: \"$ac_link\"") >&5
13930   (eval $ac_link) 2>&5
13931   ac_status=$?
13932   echo "$as_me:13932: \$? = $ac_status" >&5
13933   (exit $ac_status); } &&
13934          { ac_try='test -s conftest$ac_exeext'
13935   { (eval echo "$as_me:13935: \"$ac_try\"") >&5
13936   (eval $ac_try) 2>&5
13937   ac_status=$?
13938   echo "$as_me:13938: \$? = $ac_status" >&5
13939   (exit $ac_status); }; }; then
13940   ac_cv_func_mkstemp=yes
13941 else
13942   echo "$as_me: failed program was:" >&5
13943 cat conftest.$ac_ext >&5
13944 ac_cv_func_mkstemp=no
13945 fi
13946 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13947 fi
13948 echo "$as_me:13948: result: $ac_cv_func_mkstemp" >&5
13949 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
13950
13951 else
13952   cat >conftest.$ac_ext <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955
13956 #include <sys/types.h>
13957 #include <stdlib.h>
13958 #include <stdio.h>
13959 #include <string.h>
13960 #include <sys/stat.h>
13961 int main()
13962 {
13963         char *tmpl = "conftestXXXXXX";
13964         char name[2][80];
13965         int n;
13966         int result = 0;
13967         int fd;
13968         struct stat sb;
13969
13970         umask(077);
13971         for (n = 0; n < 2; ++n) {
13972                 strcpy(name[n], tmpl);
13973                 if ((fd = mkstemp(name[n])) >= 0) {
13974                         if (!strcmp(name[n], tmpl)
13975                          || stat(name[n], &sb) != 0
13976                          || (sb.st_mode & S_IFMT) != S_IFREG
13977                          || (sb.st_mode & 077) != 0) {
13978                                 result = 1;
13979                         }
13980                         close(fd);
13981                 }
13982         }
13983         if (result == 0
13984          && !strcmp(name[0], name[1]))
13985                 result = 1;
13986         ${cf_cv_main_return:-return}(result);
13987 }
13988
13989 _ACEOF
13990 rm -f conftest$ac_exeext
13991 if { (eval echo "$as_me:13991: \"$ac_link\"") >&5
13992   (eval $ac_link) 2>&5
13993   ac_status=$?
13994   echo "$as_me:13994: \$? = $ac_status" >&5
13995   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13996   { (eval echo "$as_me:13996: \"$ac_try\"") >&5
13997   (eval $ac_try) 2>&5
13998   ac_status=$?
13999   echo "$as_me:13999: \$? = $ac_status" >&5
14000   (exit $ac_status); }; }; then
14001   cf_cv_func_mkstemp=yes
14002
14003 else
14004   echo "$as_me: program exited with status $ac_status" >&5
14005 echo "$as_me: failed program was:" >&5
14006 cat conftest.$ac_ext >&5
14007 cf_cv_func_mkstemp=no
14008
14009 fi
14010 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14011 fi
14012
14013 fi
14014 echo "$as_me:14014: result: $cf_cv_func_mkstemp" >&5
14015 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14016 if test "$cf_cv_func_mkstemp" = yes ; then
14017         cat >>confdefs.h <<\EOF
14018 #define HAVE_MKSTEMP 1
14019 EOF
14020
14021 fi
14022
14023 # setup for prototype of fallback for vsscanf()
14024
14025 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14026         HAVE_VSSCANF=1
14027 else
14028         HAVE_VSSCANF=0
14029 fi
14030
14031 if test "$cross_compiling" = yes ; then
14032         { echo "$as_me:14032: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14033 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14034 else
14035         echo "$as_me:14035: checking whether setvbuf arguments are reversed" >&5
14036 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14037 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14038   echo $ECHO_N "(cached) $ECHO_C" >&6
14039 else
14040   if test "$cross_compiling" = yes; then
14041   { { echo "$as_me:14041: error: cannot run test program while cross compiling" >&5
14042 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14043    { (exit 1); exit 1; }; }
14044 else
14045   cat >conftest.$ac_ext <<_ACEOF
14046 #line 14046 "configure"
14047 #include "confdefs.h"
14048 #include <stdio.h>
14049 /* If setvbuf has the reversed format, exit 0. */
14050 int
14051 main ()
14052 {
14053   /* This call has the arguments reversed.
14054      A reversed system may check and see that the address of main
14055      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14056   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14057     $ac_main_return(1);
14058   putc('\r', stdout);
14059   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14060 }
14061 _ACEOF
14062 rm -f conftest$ac_exeext
14063 if { (eval echo "$as_me:14063: \"$ac_link\"") >&5
14064   (eval $ac_link) 2>&5
14065   ac_status=$?
14066   echo "$as_me:14066: \$? = $ac_status" >&5
14067   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14068   { (eval echo "$as_me:14068: \"$ac_try\"") >&5
14069   (eval $ac_try) 2>&5
14070   ac_status=$?
14071   echo "$as_me:14071: \$? = $ac_status" >&5
14072   (exit $ac_status); }; }; then
14073   ac_cv_func_setvbuf_reversed=yes
14074 else
14075   echo "$as_me: program exited with status $ac_status" >&5
14076 echo "$as_me: failed program was:" >&5
14077 cat conftest.$ac_ext >&5
14078 ac_cv_func_setvbuf_reversed=no
14079 fi
14080 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14081 fi
14082 rm -f core core.* *.core
14083 fi
14084 echo "$as_me:14084: result: $ac_cv_func_setvbuf_reversed" >&5
14085 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14086 if test $ac_cv_func_setvbuf_reversed = yes; then
14087
14088 cat >>confdefs.h <<\EOF
14089 #define SETVBUF_REVERSED 1
14090 EOF
14091
14092 fi
14093
14094 fi
14095 echo "$as_me:14095: checking return type of signal handlers" >&5
14096 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14097 if test "${ac_cv_type_signal+set}" = set; then
14098   echo $ECHO_N "(cached) $ECHO_C" >&6
14099 else
14100   cat >conftest.$ac_ext <<_ACEOF
14101 #line 14101 "configure"
14102 #include "confdefs.h"
14103 #include <sys/types.h>
14104 #include <signal.h>
14105 #ifdef signal
14106 # undef signal
14107 #endif
14108 #ifdef __cplusplus
14109 extern "C" void (*signal (int, void (*)(int)))(int);
14110 #else
14111 void (*signal ()) ();
14112 #endif
14113
14114 int
14115 main ()
14116 {
14117 int i;
14118   ;
14119   return 0;
14120 }
14121 _ACEOF
14122 rm -f conftest.$ac_objext
14123 if { (eval echo "$as_me:14123: \"$ac_compile\"") >&5
14124   (eval $ac_compile) 2>&5
14125   ac_status=$?
14126   echo "$as_me:14126: \$? = $ac_status" >&5
14127   (exit $ac_status); } &&
14128          { ac_try='test -s conftest.$ac_objext'
14129   { (eval echo "$as_me:14129: \"$ac_try\"") >&5
14130   (eval $ac_try) 2>&5
14131   ac_status=$?
14132   echo "$as_me:14132: \$? = $ac_status" >&5
14133   (exit $ac_status); }; }; then
14134   ac_cv_type_signal=void
14135 else
14136   echo "$as_me: failed program was:" >&5
14137 cat conftest.$ac_ext >&5
14138 ac_cv_type_signal=int
14139 fi
14140 rm -f conftest.$ac_objext conftest.$ac_ext
14141 fi
14142 echo "$as_me:14142: result: $ac_cv_type_signal" >&5
14143 echo "${ECHO_T}$ac_cv_type_signal" >&6
14144
14145 cat >>confdefs.h <<EOF
14146 #define RETSIGTYPE $ac_cv_type_signal
14147 EOF
14148
14149 echo "$as_me:14149: checking for type sigaction_t" >&5
14150 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14151 if test "${cf_cv_type_sigaction+set}" = set; then
14152   echo $ECHO_N "(cached) $ECHO_C" >&6
14153 else
14154
14155         cat >conftest.$ac_ext <<_ACEOF
14156 #line 14156 "configure"
14157 #include "confdefs.h"
14158
14159 #include <signal.h>
14160 int
14161 main ()
14162 {
14163 sigaction_t x
14164   ;
14165   return 0;
14166 }
14167 _ACEOF
14168 rm -f conftest.$ac_objext
14169 if { (eval echo "$as_me:14169: \"$ac_compile\"") >&5
14170   (eval $ac_compile) 2>&5
14171   ac_status=$?
14172   echo "$as_me:14172: \$? = $ac_status" >&5
14173   (exit $ac_status); } &&
14174          { ac_try='test -s conftest.$ac_objext'
14175   { (eval echo "$as_me:14175: \"$ac_try\"") >&5
14176   (eval $ac_try) 2>&5
14177   ac_status=$?
14178   echo "$as_me:14178: \$? = $ac_status" >&5
14179   (exit $ac_status); }; }; then
14180   cf_cv_type_sigaction=yes
14181 else
14182   echo "$as_me: failed program was:" >&5
14183 cat conftest.$ac_ext >&5
14184 cf_cv_type_sigaction=no
14185 fi
14186 rm -f conftest.$ac_objext conftest.$ac_ext
14187 fi
14188
14189 echo "$as_me:14189: result: $cf_cv_type_sigaction" >&5
14190 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14191 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14192 #define HAVE_TYPE_SIGACTION 1
14193 EOF
14194
14195 echo "$as_me:14195: checking declaration of size-change" >&5
14196 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14197 if test "${cf_cv_sizechange+set}" = set; then
14198   echo $ECHO_N "(cached) $ECHO_C" >&6
14199 else
14200
14201     cf_cv_sizechange=unknown
14202     cf_save_CPPFLAGS="$CPPFLAGS"
14203
14204 for cf_opts in "" "NEED_PTEM_H"
14205 do
14206
14207     CPPFLAGS="$cf_save_CPPFLAGS"
14208     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14209     cat >conftest.$ac_ext <<_ACEOF
14210 #line 14210 "configure"
14211 #include "confdefs.h"
14212 #include <sys/types.h>
14213 #ifdef HAVE_TERMIOS_H
14214 #include <termios.h>
14215 #else
14216 #ifdef HAVE_TERMIO_H
14217 #include <termio.h>
14218 #endif
14219 #endif
14220 #ifdef NEED_PTEM_H
14221 /* This is a workaround for SCO:  they neglected to define struct winsize in
14222  * termios.h -- it's only in termio.h and ptem.h
14223  */
14224 #include        <sys/stream.h>
14225 #include        <sys/ptem.h>
14226 #endif
14227 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14228 #include <sys/ioctl.h>
14229 #endif
14230
14231 int
14232 main ()
14233 {
14234
14235 #ifdef TIOCGSIZE
14236         struct ttysize win;     /* FIXME: what system is this? */
14237         int y = win.ts_lines;
14238         int x = win.ts_cols;
14239 #else
14240 #ifdef TIOCGWINSZ
14241         struct winsize win;
14242         int y = win.ws_row;
14243         int x = win.ws_col;
14244 #else
14245         no TIOCGSIZE or TIOCGWINSZ
14246 #endif /* TIOCGWINSZ */
14247 #endif /* TIOCGSIZE */
14248
14249   ;
14250   return 0;
14251 }
14252 _ACEOF
14253 rm -f conftest.$ac_objext
14254 if { (eval echo "$as_me:14254: \"$ac_compile\"") >&5
14255   (eval $ac_compile) 2>&5
14256   ac_status=$?
14257   echo "$as_me:14257: \$? = $ac_status" >&5
14258   (exit $ac_status); } &&
14259          { ac_try='test -s conftest.$ac_objext'
14260   { (eval echo "$as_me:14260: \"$ac_try\"") >&5
14261   (eval $ac_try) 2>&5
14262   ac_status=$?
14263   echo "$as_me:14263: \$? = $ac_status" >&5
14264   (exit $ac_status); }; }; then
14265   cf_cv_sizechange=yes
14266 else
14267   echo "$as_me: failed program was:" >&5
14268 cat conftest.$ac_ext >&5
14269 cf_cv_sizechange=no
14270 fi
14271 rm -f conftest.$ac_objext conftest.$ac_ext
14272
14273         CPPFLAGS="$cf_save_CPPFLAGS"
14274         if test "$cf_cv_sizechange" = yes ; then
14275                 echo "size-change succeeded ($cf_opts)" >&5
14276                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14277                 break
14278         fi
14279 done
14280
14281 fi
14282 echo "$as_me:14282: result: $cf_cv_sizechange" >&5
14283 echo "${ECHO_T}$cf_cv_sizechange" >&6
14284 if test "$cf_cv_sizechange" != no ; then
14285         cat >>confdefs.h <<\EOF
14286 #define HAVE_SIZECHANGE 1
14287 EOF
14288
14289         case $cf_cv_sizechange in #(vi
14290         NEED*)
14291                 cat >>confdefs.h <<EOF
14292 #define $cf_cv_sizechange  1
14293 EOF
14294
14295                 ;;
14296         esac
14297 fi
14298
14299 echo "$as_me:14299: checking for memmove" >&5
14300 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14301 if test "${ac_cv_func_memmove+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304   cat >conftest.$ac_ext <<_ACEOF
14305 #line 14305 "configure"
14306 #include "confdefs.h"
14307 /* System header to define __stub macros and hopefully few prototypes,
14308     which can conflict with char memmove (); below.  */
14309 #include <assert.h>
14310 /* Override any gcc2 internal prototype to avoid an error.  */
14311 #ifdef __cplusplus
14312 extern "C"
14313 #endif
14314 /* We use char because int might match the return type of a gcc2
14315    builtin and then its argument prototype would still apply.  */
14316 char memmove ();
14317 char (*f) ();
14318
14319 int
14320 main ()
14321 {
14322 /* The GNU C library defines this for functions which it implements
14323     to always fail with ENOSYS.  Some functions are actually named
14324     something starting with __ and the normal name is an alias.  */
14325 #if defined (__stub_memmove) || defined (__stub___memmove)
14326 choke me
14327 #else
14328 f = memmove;
14329 #endif
14330
14331   ;
14332   return 0;
14333 }
14334 _ACEOF
14335 rm -f conftest.$ac_objext conftest$ac_exeext
14336 if { (eval echo "$as_me:14336: \"$ac_link\"") >&5
14337   (eval $ac_link) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit $ac_status); } &&
14341          { ac_try='test -s conftest$ac_exeext'
14342   { (eval echo "$as_me:14342: \"$ac_try\"") >&5
14343   (eval $ac_try) 2>&5
14344   ac_status=$?
14345   echo "$as_me:14345: \$? = $ac_status" >&5
14346   (exit $ac_status); }; }; then
14347   ac_cv_func_memmove=yes
14348 else
14349   echo "$as_me: failed program was:" >&5
14350 cat conftest.$ac_ext >&5
14351 ac_cv_func_memmove=no
14352 fi
14353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14354 fi
14355 echo "$as_me:14355: result: $ac_cv_func_memmove" >&5
14356 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14357 if test $ac_cv_func_memmove = yes; then
14358   :
14359 else
14360
14361 echo "$as_me:14361: checking for bcopy" >&5
14362 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14363 if test "${ac_cv_func_bcopy+set}" = set; then
14364   echo $ECHO_N "(cached) $ECHO_C" >&6
14365 else
14366   cat >conftest.$ac_ext <<_ACEOF
14367 #line 14367 "configure"
14368 #include "confdefs.h"
14369 /* System header to define __stub macros and hopefully few prototypes,
14370     which can conflict with char bcopy (); below.  */
14371 #include <assert.h>
14372 /* Override any gcc2 internal prototype to avoid an error.  */
14373 #ifdef __cplusplus
14374 extern "C"
14375 #endif
14376 /* We use char because int might match the return type of a gcc2
14377    builtin and then its argument prototype would still apply.  */
14378 char bcopy ();
14379 char (*f) ();
14380
14381 int
14382 main ()
14383 {
14384 /* The GNU C library defines this for functions which it implements
14385     to always fail with ENOSYS.  Some functions are actually named
14386     something starting with __ and the normal name is an alias.  */
14387 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14388 choke me
14389 #else
14390 f = bcopy;
14391 #endif
14392
14393   ;
14394   return 0;
14395 }
14396 _ACEOF
14397 rm -f conftest.$ac_objext conftest$ac_exeext
14398 if { (eval echo "$as_me:14398: \"$ac_link\"") >&5
14399   (eval $ac_link) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); } &&
14403          { ac_try='test -s conftest$ac_exeext'
14404   { (eval echo "$as_me:14404: \"$ac_try\"") >&5
14405   (eval $ac_try) 2>&5
14406   ac_status=$?
14407   echo "$as_me:14407: \$? = $ac_status" >&5
14408   (exit $ac_status); }; }; then
14409   ac_cv_func_bcopy=yes
14410 else
14411   echo "$as_me: failed program was:" >&5
14412 cat conftest.$ac_ext >&5
14413 ac_cv_func_bcopy=no
14414 fi
14415 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14416 fi
14417 echo "$as_me:14417: result: $ac_cv_func_bcopy" >&5
14418 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14419 if test $ac_cv_func_bcopy = yes; then
14420
14421         echo "$as_me:14421: checking if bcopy does overlapping moves" >&5
14422 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14423 if test "${cf_cv_good_bcopy+set}" = set; then
14424   echo $ECHO_N "(cached) $ECHO_C" >&6
14425 else
14426
14427                 if test "$cross_compiling" = yes; then
14428   cf_cv_good_bcopy=unknown
14429 else
14430   cat >conftest.$ac_ext <<_ACEOF
14431 #line 14431 "configure"
14432 #include "confdefs.h"
14433
14434 int main() {
14435         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14436         char temp[40];
14437         bcopy(data, temp, sizeof(data));
14438         bcopy(temp+10, temp, 15);
14439         bcopy(temp+5, temp+15, 10);
14440         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14441 }
14442
14443 _ACEOF
14444 rm -f conftest$ac_exeext
14445 if { (eval echo "$as_me:14445: \"$ac_link\"") >&5
14446   (eval $ac_link) 2>&5
14447   ac_status=$?
14448   echo "$as_me:14448: \$? = $ac_status" >&5
14449   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14450   { (eval echo "$as_me:14450: \"$ac_try\"") >&5
14451   (eval $ac_try) 2>&5
14452   ac_status=$?
14453   echo "$as_me:14453: \$? = $ac_status" >&5
14454   (exit $ac_status); }; }; then
14455   cf_cv_good_bcopy=yes
14456 else
14457   echo "$as_me: program exited with status $ac_status" >&5
14458 echo "$as_me: failed program was:" >&5
14459 cat conftest.$ac_ext >&5
14460 cf_cv_good_bcopy=no
14461 fi
14462 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14463 fi
14464
14465 fi
14466 echo "$as_me:14466: result: $cf_cv_good_bcopy" >&5
14467 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14468
14469 else
14470   cf_cv_good_bcopy=no
14471 fi
14472
14473         if test "$cf_cv_good_bcopy" = yes ; then
14474                 cat >>confdefs.h <<\EOF
14475 #define USE_OK_BCOPY 1
14476 EOF
14477
14478         else
14479                 cat >>confdefs.h <<\EOF
14480 #define USE_MY_MEMMOVE 1
14481 EOF
14482
14483         fi
14484
14485 fi
14486
14487 echo "$as_me:14487: checking if poll really works" >&5
14488 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14489 if test "${cf_cv_working_poll+set}" = set; then
14490   echo $ECHO_N "(cached) $ECHO_C" >&6
14491 else
14492
14493 if test "$cross_compiling" = yes; then
14494   cf_cv_working_poll=unknown
14495 else
14496   cat >conftest.$ac_ext <<_ACEOF
14497 #line 14497 "configure"
14498 #include "confdefs.h"
14499
14500 #include <stdio.h>
14501 #ifdef HAVE_POLL_H
14502 #include <poll.h>
14503 #else
14504 #include <sys/poll.h>
14505 #endif
14506 int main() {
14507         struct pollfd myfds;
14508         int ret;
14509
14510         myfds.fd = 0;
14511         myfds.events = POLLIN;
14512
14513         ret = poll(&myfds, 1, 100);
14514         ${cf_cv_main_return:-return}(ret != 0);
14515 }
14516 _ACEOF
14517 rm -f conftest$ac_exeext
14518 if { (eval echo "$as_me:14518: \"$ac_link\"") >&5
14519   (eval $ac_link) 2>&5
14520   ac_status=$?
14521   echo "$as_me:14521: \$? = $ac_status" >&5
14522   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14523   { (eval echo "$as_me:14523: \"$ac_try\"") >&5
14524   (eval $ac_try) 2>&5
14525   ac_status=$?
14526   echo "$as_me:14526: \$? = $ac_status" >&5
14527   (exit $ac_status); }; }; then
14528   cf_cv_working_poll=yes
14529 else
14530   echo "$as_me: program exited with status $ac_status" >&5
14531 echo "$as_me: failed program was:" >&5
14532 cat conftest.$ac_ext >&5
14533 cf_cv_working_poll=no
14534 fi
14535 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14536 fi
14537 fi
14538 echo "$as_me:14538: result: $cf_cv_working_poll" >&5
14539 echo "${ECHO_T}$cf_cv_working_poll" >&6
14540 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14541 #define HAVE_WORKING_POLL 1
14542 EOF
14543
14544 # special check for test/ditto.c
14545
14546 echo "$as_me:14546: checking for openpty in -lutil" >&5
14547 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14548 if test "${ac_cv_lib_util_openpty+set}" = set; then
14549   echo $ECHO_N "(cached) $ECHO_C" >&6
14550 else
14551   ac_check_lib_save_LIBS=$LIBS
14552 LIBS="-lutil  $LIBS"
14553 cat >conftest.$ac_ext <<_ACEOF
14554 #line 14554 "configure"
14555 #include "confdefs.h"
14556
14557 /* Override any gcc2 internal prototype to avoid an error.  */
14558 #ifdef __cplusplus
14559 extern "C"
14560 #endif
14561 /* We use char because int might match the return type of a gcc2
14562    builtin and then its argument prototype would still apply.  */
14563 char openpty ();
14564 int
14565 main ()
14566 {
14567 openpty ();
14568   ;
14569   return 0;
14570 }
14571 _ACEOF
14572 rm -f conftest.$ac_objext conftest$ac_exeext
14573 if { (eval echo "$as_me:14573: \"$ac_link\"") >&5
14574   (eval $ac_link) 2>&5
14575   ac_status=$?
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); } &&
14578          { ac_try='test -s conftest$ac_exeext'
14579   { (eval echo "$as_me:14579: \"$ac_try\"") >&5
14580   (eval $ac_try) 2>&5
14581   ac_status=$?
14582   echo "$as_me:14582: \$? = $ac_status" >&5
14583   (exit $ac_status); }; }; then
14584   ac_cv_lib_util_openpty=yes
14585 else
14586   echo "$as_me: failed program was:" >&5
14587 cat conftest.$ac_ext >&5
14588 ac_cv_lib_util_openpty=no
14589 fi
14590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14591 LIBS=$ac_check_lib_save_LIBS
14592 fi
14593 echo "$as_me:14593: result: $ac_cv_lib_util_openpty" >&5
14594 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14595 if test $ac_cv_lib_util_openpty = yes; then
14596   cf_cv_lib_util=yes
14597 else
14598   cf_cv_lib_util=no
14599 fi
14600
14601 echo "$as_me:14601: checking for openpty header" >&5
14602 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
14603 if test "${cf_cv_func_openpty+set}" = set; then
14604   echo $ECHO_N "(cached) $ECHO_C" >&6
14605 else
14606
14607     cf_save_LIBS="$LIBS"
14608     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
14609     for cf_header in pty.h libutil.h util.h
14610     do
14611     cat >conftest.$ac_ext <<_ACEOF
14612 #line 14612 "configure"
14613 #include "confdefs.h"
14614
14615 #include <$cf_header>
14616
14617 int
14618 main ()
14619 {
14620
14621     int x = openpty((int *)0, (int *)0, (char *)0,
14622                    (struct termios *)0, (struct winsize *)0);
14623
14624   ;
14625   return 0;
14626 }
14627 _ACEOF
14628 rm -f conftest.$ac_objext conftest$ac_exeext
14629 if { (eval echo "$as_me:14629: \"$ac_link\"") >&5
14630   (eval $ac_link) 2>&5
14631   ac_status=$?
14632   echo "$as_me:14632: \$? = $ac_status" >&5
14633   (exit $ac_status); } &&
14634          { ac_try='test -s conftest$ac_exeext'
14635   { (eval echo "$as_me:14635: \"$ac_try\"") >&5
14636   (eval $ac_try) 2>&5
14637   ac_status=$?
14638   echo "$as_me:14638: \$? = $ac_status" >&5
14639   (exit $ac_status); }; }; then
14640
14641         cf_cv_func_openpty=$cf_header
14642         break
14643
14644 else
14645   echo "$as_me: failed program was:" >&5
14646 cat conftest.$ac_ext >&5
14647
14648         cf_cv_func_openpty=no
14649
14650 fi
14651 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14652     done
14653     LIBS="$cf_save_LIBS"
14654
14655 fi
14656 echo "$as_me:14656: result: $cf_cv_func_openpty" >&5
14657 echo "${ECHO_T}$cf_cv_func_openpty" >&6
14658
14659 if test "$cf_cv_func_openpty" != no ; then
14660     cat >>confdefs.h <<EOF
14661 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
14662 EOF
14663
14664     cat >>confdefs.h <<\EOF
14665 #define USE_XTERM_PTY 1
14666 EOF
14667
14668     if test "$cf_cv_lib_util" = yes ; then
14669         TEST_LIBS="-lutil $TEST_LIBS"
14670     fi
14671 fi
14672
14673 if test "$with_hashed_db" != no ; then
14674         cat >>confdefs.h <<\EOF
14675 #define USE_HASHED_DB 1
14676 EOF
14677
14678 case $with_hashed_db in #(vi
14679 yes|*able*) #(vi
14680     ;;
14681 *)
14682     if test -d "$with_hashed_db" ; then
14683
14684 if test -n "$with_hashed_db/include" ; then
14685   for cf_add_incdir in $with_hashed_db/include
14686   do
14687         while test $cf_add_incdir != /usr/include
14688         do
14689           if test -d $cf_add_incdir
14690           then
14691                 cf_have_incdir=no
14692                 if test -n "$CFLAGS$CPPFLAGS" ; then
14693                   # a loop is needed to ensure we can add subdirs of existing dirs
14694                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14695                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14696                           cf_have_incdir=yes; break
14697                         fi
14698                   done
14699                 fi
14700
14701                 if test "$cf_have_incdir" = no ; then
14702                   if test "$cf_add_incdir" = /usr/local/include ; then
14703                         if test "$GCC" = yes
14704                         then
14705                           cf_save_CPPFLAGS=$CPPFLAGS
14706                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14707                           cat >conftest.$ac_ext <<_ACEOF
14708 #line 14708 "configure"
14709 #include "confdefs.h"
14710 #include <stdio.h>
14711 int
14712 main ()
14713 {
14714 printf("Hello")
14715   ;
14716   return 0;
14717 }
14718 _ACEOF
14719 rm -f conftest.$ac_objext
14720 if { (eval echo "$as_me:14720: \"$ac_compile\"") >&5
14721   (eval $ac_compile) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit $ac_status); } &&
14725          { ac_try='test -s conftest.$ac_objext'
14726   { (eval echo "$as_me:14726: \"$ac_try\"") >&5
14727   (eval $ac_try) 2>&5
14728   ac_status=$?
14729   echo "$as_me:14729: \$? = $ac_status" >&5
14730   (exit $ac_status); }; }; then
14731   :
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 cat conftest.$ac_ext >&5
14735 cf_have_incdir=yes
14736 fi
14737 rm -f conftest.$ac_objext conftest.$ac_ext
14738                           CPPFLAGS=$cf_save_CPPFLAGS
14739                         fi
14740                   fi
14741                 fi
14742
14743                 if test "$cf_have_incdir" = no ; then
14744                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
14745
14746 echo "${as_me-configure}:14746: testing adding $cf_add_incdir to include-path ..." 1>&5
14747
14748                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14749
14750                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14751                   test "$cf_top_incdir" = "$cf_add_incdir" && break
14752                   cf_add_incdir="$cf_top_incdir"
14753                 else
14754                   break
14755                 fi
14756           fi
14757         done
14758   done
14759 fi
14760
14761 if test -n "$with_hashed_db/lib" ; then
14762   for cf_add_libdir in $with_hashed_db/lib
14763   do
14764     if test $cf_add_libdir = /usr/lib ; then
14765       :
14766     elif test -d $cf_add_libdir
14767     then
14768       cf_have_libdir=no
14769       if test -n "$LDFLAGS$LIBS" ; then
14770         # a loop is needed to ensure we can add subdirs of existing dirs
14771         for cf_test_libdir in $LDFLAGS $LIBS ; do
14772           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14773             cf_have_libdir=yes; break
14774           fi
14775         done
14776       fi
14777       if test "$cf_have_libdir" = no ; then
14778         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
14779
14780 echo "${as_me-configure}:14780: testing adding $cf_add_libdir to library-path ..." 1>&5
14781
14782         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14783       fi
14784     fi
14785   done
14786 fi
14787
14788     fi
14789 esac
14790
14791 echo "$as_me:14791: checking for db.h" >&5
14792 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
14793 if test "${ac_cv_header_db_h+set}" = set; then
14794   echo $ECHO_N "(cached) $ECHO_C" >&6
14795 else
14796   cat >conftest.$ac_ext <<_ACEOF
14797 #line 14797 "configure"
14798 #include "confdefs.h"
14799 #include <db.h>
14800 _ACEOF
14801 if { (eval echo "$as_me:14801: \"$ac_cpp conftest.$ac_ext\"") >&5
14802   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14803   ac_status=$?
14804   egrep -v '^ *\+' conftest.er1 >conftest.err
14805   rm -f conftest.er1
14806   cat conftest.err >&5
14807   echo "$as_me:14807: \$? = $ac_status" >&5
14808   (exit $ac_status); } >/dev/null; then
14809   if test -s conftest.err; then
14810     ac_cpp_err=$ac_c_preproc_warn_flag
14811   else
14812     ac_cpp_err=
14813   fi
14814 else
14815   ac_cpp_err=yes
14816 fi
14817 if test -z "$ac_cpp_err"; then
14818   ac_cv_header_db_h=yes
14819 else
14820   echo "$as_me: failed program was:" >&5
14821   cat conftest.$ac_ext >&5
14822   ac_cv_header_db_h=no
14823 fi
14824 rm -f conftest.err conftest.$ac_ext
14825 fi
14826 echo "$as_me:14826: result: $ac_cv_header_db_h" >&5
14827 echo "${ECHO_T}$ac_cv_header_db_h" >&6
14828 if test $ac_cv_header_db_h = yes; then
14829
14830 echo "$as_me:14830: checking for version of db" >&5
14831 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
14832 if test "${cf_cv_hashed_db_version+set}" = set; then
14833   echo $ECHO_N "(cached) $ECHO_C" >&6
14834 else
14835
14836 cf_cv_hashed_db_version=unknown
14837
14838 for cf_db_version in 1 2 3 4 5
14839 do
14840
14841 echo "${as_me-configure}:14841: testing checking for db version $cf_db_version ..." 1>&5
14842
14843         cat >conftest.$ac_ext <<_ACEOF
14844 #line 14844 "configure"
14845 #include "confdefs.h"
14846
14847 $ac_includes_default
14848 #include <db.h>
14849
14850 #ifdef DB_VERSION_MAJOR
14851         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
14852 #if $cf_db_version == DB_VERSION_MAJOR
14853         /* ok */
14854 #else
14855         make an error
14856 #endif
14857 #else
14858 #if $cf_db_version == 1
14859         /* ok: assuming this is DB 1.8.5 */
14860 #else
14861         make an error
14862 #endif
14863 #endif
14864
14865 int
14866 main ()
14867 {
14868 DBT *foo = 0
14869   ;
14870   return 0;
14871 }
14872 _ACEOF
14873 rm -f conftest.$ac_objext
14874 if { (eval echo "$as_me:14874: \"$ac_compile\"") >&5
14875   (eval $ac_compile) 2>&5
14876   ac_status=$?
14877   echo "$as_me:14877: \$? = $ac_status" >&5
14878   (exit $ac_status); } &&
14879          { ac_try='test -s conftest.$ac_objext'
14880   { (eval echo "$as_me:14880: \"$ac_try\"") >&5
14881   (eval $ac_try) 2>&5
14882   ac_status=$?
14883   echo "$as_me:14883: \$? = $ac_status" >&5
14884   (exit $ac_status); }; }; then
14885
14886         cf_cv_hashed_db_version=$cf_db_version
14887         break
14888
14889 else
14890   echo "$as_me: failed program was:" >&5
14891 cat conftest.$ac_ext >&5
14892 fi
14893 rm -f conftest.$ac_objext conftest.$ac_ext
14894 done
14895
14896 fi
14897 echo "$as_me:14897: result: $cf_cv_hashed_db_version" >&5
14898 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
14899
14900 if test "$cf_cv_hashed_db_version" = unknown ; then
14901         { { echo "$as_me:14901: error: Cannot determine version of db" >&5
14902 echo "$as_me: error: Cannot determine version of db" >&2;}
14903    { (exit 1); exit 1; }; }
14904 else
14905
14906 echo "$as_me:14906: checking for db libraries" >&5
14907 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
14908 if test "${cf_cv_hashed_db_libs+set}" = set; then
14909   echo $ECHO_N "(cached) $ECHO_C" >&6
14910 else
14911
14912 cf_cv_hashed_db_libs=unknown
14913 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
14914 do
14915         cf_save_libs="$LIBS"
14916         if test -n "$cf_db_libs"; then
14917                 LIBS="-l$cf_db_libs $LIBS"
14918         fi
14919
14920 echo "${as_me-configure}:14920: testing checking for library "$cf_db_libs" ..." 1>&5
14921
14922         cat >conftest.$ac_ext <<_ACEOF
14923 #line 14923 "configure"
14924 #include "confdefs.h"
14925
14926 $ac_includes_default
14927 #include <db.h>
14928
14929 int
14930 main ()
14931 {
14932
14933         char *path = "/tmp/foo";
14934 #ifdef DB_VERSION_MAJOR
14935 #if DB_VERSION_MAJOR >= 4
14936         DB *result = 0;
14937         db_create(&result, NULL, 0);
14938         result->open(result,
14939                 NULL,
14940                 path,
14941                 path,
14942                 DB_HASH,
14943                 DB_CREATE,
14944                 0644);
14945 #elif DB_VERSION_MAJOR >= 3
14946         DB *result = 0;
14947         db_create(&result, NULL, 0);
14948         result->open(result,
14949                 path,
14950                 path,
14951                 DB_HASH,
14952                 DB_CREATE,
14953                 0644);
14954 #elif DB_VERSION_MAJOR >= 2
14955         DB *result = 0;
14956         db_open(path,
14957                 DB_HASH,
14958                 DB_CREATE,
14959                 0644,
14960                 (DB_ENV *) 0,
14961                 (DB_INFO *) 0,
14962                 &result);
14963 #endif /* DB_VERSION_MAJOR */
14964 #else
14965         DB *result = dbopen(path,
14966                      2,
14967                      0644,
14968                      DB_HASH,
14969                      0);
14970 #endif
14971         ${cf_cv_main_return:-return}(result != 0)
14972
14973   ;
14974   return 0;
14975 }
14976 _ACEOF
14977 rm -f conftest.$ac_objext conftest$ac_exeext
14978 if { (eval echo "$as_me:14978: \"$ac_link\"") >&5
14979   (eval $ac_link) 2>&5
14980   ac_status=$?
14981   echo "$as_me:14981: \$? = $ac_status" >&5
14982   (exit $ac_status); } &&
14983          { ac_try='test -s conftest$ac_exeext'
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
14990         if test -n "$cf_db_libs" ; then
14991                 cf_cv_hashed_db_libs=$cf_db_libs
14992         else
14993                 cf_cv_hashed_db_libs=default
14994         fi
14995         LIBS="$cf_save_libs"
14996         break
14997
14998 else
14999   echo "$as_me: failed program was:" >&5
15000 cat conftest.$ac_ext >&5
15001 fi
15002 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15003         LIBS="$cf_save_libs"
15004 done
15005
15006 fi
15007 echo "$as_me:15007: result: $cf_cv_hashed_db_libs" >&5
15008 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
15009
15010         if test "$cf_cv_hashed_db_libs" = unknown ; then
15011                 { { echo "$as_me:15011: error: Cannot determine library for db" >&5
15012 echo "$as_me: error: Cannot determine library for db" >&2;}
15013    { (exit 1); exit 1; }; }
15014         elif test "$cf_cv_hashed_db_libs" != default ; then
15015                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
15016         fi
15017 fi
15018
15019 else
15020
15021         { { echo "$as_me:15021: error: Cannot find db.h" >&5
15022 echo "$as_me: error: Cannot find db.h" >&2;}
15023    { (exit 1); exit 1; }; }
15024
15025 fi
15026
15027 fi
15028
15029 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15030         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15031         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15032 fi
15033
15034 # Just in case, check if the C compiler has a bool type.
15035
15036 echo "$as_me:15036: checking if we should include stdbool.h" >&5
15037 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15038
15039 if test "${cf_cv_header_stdbool_h+set}" = set; then
15040   echo $ECHO_N "(cached) $ECHO_C" >&6
15041 else
15042
15043         cat >conftest.$ac_ext <<_ACEOF
15044 #line 15044 "configure"
15045 #include "confdefs.h"
15046
15047 int
15048 main ()
15049 {
15050 bool foo = false
15051   ;
15052   return 0;
15053 }
15054 _ACEOF
15055 rm -f conftest.$ac_objext
15056 if { (eval echo "$as_me:15056: \"$ac_compile\"") >&5
15057   (eval $ac_compile) 2>&5
15058   ac_status=$?
15059   echo "$as_me:15059: \$? = $ac_status" >&5
15060   (exit $ac_status); } &&
15061          { ac_try='test -s conftest.$ac_objext'
15062   { (eval echo "$as_me:15062: \"$ac_try\"") >&5
15063   (eval $ac_try) 2>&5
15064   ac_status=$?
15065   echo "$as_me:15065: \$? = $ac_status" >&5
15066   (exit $ac_status); }; }; then
15067   cf_cv_header_stdbool_h=0
15068 else
15069   echo "$as_me: failed program was:" >&5
15070 cat conftest.$ac_ext >&5
15071 cat >conftest.$ac_ext <<_ACEOF
15072 #line 15072 "configure"
15073 #include "confdefs.h"
15074
15075 #ifndef __BEOS__
15076 #include <stdbool.h>
15077 #endif
15078
15079 int
15080 main ()
15081 {
15082 bool foo = false
15083   ;
15084   return 0;
15085 }
15086 _ACEOF
15087 rm -f conftest.$ac_objext
15088 if { (eval echo "$as_me:15088: \"$ac_compile\"") >&5
15089   (eval $ac_compile) 2>&5
15090   ac_status=$?
15091   echo "$as_me:15091: \$? = $ac_status" >&5
15092   (exit $ac_status); } &&
15093          { ac_try='test -s conftest.$ac_objext'
15094   { (eval echo "$as_me:15094: \"$ac_try\"") >&5
15095   (eval $ac_try) 2>&5
15096   ac_status=$?
15097   echo "$as_me:15097: \$? = $ac_status" >&5
15098   (exit $ac_status); }; }; then
15099   cf_cv_header_stdbool_h=1
15100 else
15101   echo "$as_me: failed program was:" >&5
15102 cat conftest.$ac_ext >&5
15103 cf_cv_header_stdbool_h=0
15104 fi
15105 rm -f conftest.$ac_objext conftest.$ac_ext
15106 fi
15107 rm -f conftest.$ac_objext conftest.$ac_ext
15108 fi
15109
15110 if test "$cf_cv_header_stdbool_h" = 1
15111 then    echo "$as_me:15111: result: yes" >&5
15112 echo "${ECHO_T}yes" >&6
15113 else    echo "$as_me:15113: result: no" >&5
15114 echo "${ECHO_T}no" >&6
15115 fi
15116
15117 echo "$as_me:15117: checking for builtin bool type" >&5
15118 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15119
15120 if test "${cf_cv_cc_bool_type+set}" = set; then
15121   echo $ECHO_N "(cached) $ECHO_C" >&6
15122 else
15123
15124         cat >conftest.$ac_ext <<_ACEOF
15125 #line 15125 "configure"
15126 #include "confdefs.h"
15127
15128 #include <stdio.h>
15129 #include <sys/types.h>
15130
15131 int
15132 main ()
15133 {
15134 bool x = false
15135   ;
15136   return 0;
15137 }
15138 _ACEOF
15139 rm -f conftest.$ac_objext
15140 if { (eval echo "$as_me:15140: \"$ac_compile\"") >&5
15141   (eval $ac_compile) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit $ac_status); } &&
15145          { ac_try='test -s conftest.$ac_objext'
15146   { (eval echo "$as_me:15146: \"$ac_try\"") >&5
15147   (eval $ac_try) 2>&5
15148   ac_status=$?
15149   echo "$as_me:15149: \$? = $ac_status" >&5
15150   (exit $ac_status); }; }; then
15151   cf_cv_cc_bool_type=1
15152 else
15153   echo "$as_me: failed program was:" >&5
15154 cat conftest.$ac_ext >&5
15155 cf_cv_cc_bool_type=0
15156 fi
15157 rm -f conftest.$ac_objext conftest.$ac_ext
15158
15159 fi
15160
15161 if test "$cf_cv_cc_bool_type" = 1
15162 then    echo "$as_me:15162: result: yes" >&5
15163 echo "${ECHO_T}yes" >&6
15164 else    echo "$as_me:15164: result: no" >&5
15165 echo "${ECHO_T}no" >&6
15166 fi
15167
15168 # Check for C++ compiler characteristics (and ensure that it's there!)
15169 if test -n "$CXX" ; then
15170         ac_ext=cc
15171 ac_cpp='$CXXCPP $CPPFLAGS'
15172 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15173 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15174 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15175 ac_main_return=return
15176
15177 if test -n "$GXX" ; then
15178 case $cf_cv_system_name in #(vi
15179 os2*) #(vi
15180         cf_stdcpp_libname=stdcpp
15181         ;;
15182 *)
15183         cf_stdcpp_libname=stdc++
15184         ;;
15185 esac
15186 echo "$as_me:15186: checking for library $cf_stdcpp_libname" >&5
15187 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15188 if test "${cf_cv_libstdcpp+set}" = set; then
15189   echo $ECHO_N "(cached) $ECHO_C" >&6
15190 else
15191
15192         cf_save="$LIBS"
15193         LIBS="$LIBS -l$cf_stdcpp_libname"
15194 cat >conftest.$ac_ext <<_ACEOF
15195 #line 15195 "configure"
15196 #include "confdefs.h"
15197
15198 #include <strstream.h>
15199 int
15200 main ()
15201 {
15202
15203 char buf[80];
15204 strstreambuf foo(buf, sizeof(buf))
15205
15206   ;
15207   return 0;
15208 }
15209 _ACEOF
15210 rm -f conftest.$ac_objext conftest$ac_exeext
15211 if { (eval echo "$as_me:15211: \"$ac_link\"") >&5
15212   (eval $ac_link) 2>&5
15213   ac_status=$?
15214   echo "$as_me:15214: \$? = $ac_status" >&5
15215   (exit $ac_status); } &&
15216          { ac_try='test -s conftest$ac_exeext'
15217   { (eval echo "$as_me:15217: \"$ac_try\"") >&5
15218   (eval $ac_try) 2>&5
15219   ac_status=$?
15220   echo "$as_me:15220: \$? = $ac_status" >&5
15221   (exit $ac_status); }; }; then
15222   cf_cv_libstdcpp=yes
15223 else
15224   echo "$as_me: failed program was:" >&5
15225 cat conftest.$ac_ext >&5
15226 cf_cv_libstdcpp=no
15227 fi
15228 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15229         LIBS="$cf_save"
15230
15231 fi
15232 echo "$as_me:15232: result: $cf_cv_libstdcpp" >&5
15233 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15234 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15235 fi
15236
15237         echo "$as_me:15237: checking whether $CXX understands -c and -o together" >&5
15238 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15239 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15240   echo $ECHO_N "(cached) $ECHO_C" >&6
15241 else
15242
15243 cat > conftest.$ac_ext <<CF_EOF
15244 #include <stdio.h>
15245 int main()
15246 {
15247         ${cf_cv_main_return:-return}(0);
15248 }
15249 CF_EOF
15250 # We do the test twice because some compilers refuse to overwrite an
15251 # existing .o file with -o, though they will create one.
15252 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15253 if { (eval echo "$as_me:15253: \"$ac_try\"") >&5
15254   (eval $ac_try) 2>&5
15255   ac_status=$?
15256   echo "$as_me:15256: \$? = $ac_status" >&5
15257   (exit $ac_status); } &&
15258   test -f conftest2.$ac_objext && { (eval echo "$as_me:15258: \"$ac_try\"") >&5
15259   (eval $ac_try) 2>&5
15260   ac_status=$?
15261   echo "$as_me:15261: \$? = $ac_status" >&5
15262   (exit $ac_status); };
15263 then
15264   eval cf_cv_prog_CXX_c_o=yes
15265 else
15266   eval cf_cv_prog_CXX_c_o=no
15267 fi
15268 rm -f conftest*
15269
15270 fi
15271 if test $cf_cv_prog_CXX_c_o = yes; then
15272   echo "$as_me:15272: result: yes" >&5
15273 echo "${ECHO_T}yes" >&6
15274 else
15275   echo "$as_me:15275: result: no" >&5
15276 echo "${ECHO_T}no" >&6
15277 fi
15278
15279         case $GXX_VERSION in
15280         1*|2.0-6*)
15281                 cf_cxx_library=yes
15282                 ;;
15283         *-2.7*|2.7*)
15284
15285 cf_cxx_library=unknown
15286 case $cf_cv_system_name in #(vi
15287 os2*) #(vi
15288         cf_gpp_libname=gpp
15289         ;;
15290 *)
15291         cf_gpp_libname=g++
15292         ;;
15293 esac
15294 if test "$GXX" = yes; then
15295         echo "$as_me:15295: checking for lib$cf_gpp_libname" >&5
15296 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
15297         cf_save="$LIBS"
15298         LIBS="$LIBS -l$cf_gpp_libname"
15299         cat >conftest.$ac_ext <<_ACEOF
15300 #line 15300 "configure"
15301 #include "confdefs.h"
15302
15303 #include <$cf_gpp_libname/builtin.h>
15304
15305 int
15306 main ()
15307 {
15308 two_arg_error_handler_t foo2 = lib_error_handler
15309   ;
15310   return 0;
15311 }
15312 _ACEOF
15313 rm -f conftest.$ac_objext conftest$ac_exeext
15314 if { (eval echo "$as_me:15314: \"$ac_link\"") >&5
15315   (eval $ac_link) 2>&5
15316   ac_status=$?
15317   echo "$as_me:15317: \$? = $ac_status" >&5
15318   (exit $ac_status); } &&
15319          { ac_try='test -s conftest$ac_exeext'
15320   { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15321   (eval $ac_try) 2>&5
15322   ac_status=$?
15323   echo "$as_me:15323: \$? = $ac_status" >&5
15324   (exit $ac_status); }; }; then
15325   cf_cxx_library=yes
15326          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15327          if test "$cf_gpp_libname" = cpp ; then
15328             cat >>confdefs.h <<\EOF
15329 #define HAVE_GPP_BUILTIN_H 1
15330 EOF
15331
15332          else
15333             cat >>confdefs.h <<\EOF
15334 #define HAVE_GXX_BUILTIN_H 1
15335 EOF
15336
15337          fi
15338 else
15339   echo "$as_me: failed program was:" >&5
15340 cat conftest.$ac_ext >&5
15341 cat >conftest.$ac_ext <<_ACEOF
15342 #line 15342 "configure"
15343 #include "confdefs.h"
15344
15345 #include <builtin.h>
15346
15347 int
15348 main ()
15349 {
15350 two_arg_error_handler_t foo2 = lib_error_handler
15351   ;
15352   return 0;
15353 }
15354 _ACEOF
15355 rm -f conftest.$ac_objext conftest$ac_exeext
15356 if { (eval echo "$as_me:15356: \"$ac_link\"") >&5
15357   (eval $ac_link) 2>&5
15358   ac_status=$?
15359   echo "$as_me:15359: \$? = $ac_status" >&5
15360   (exit $ac_status); } &&
15361          { ac_try='test -s conftest$ac_exeext'
15362   { (eval echo "$as_me:15362: \"$ac_try\"") >&5
15363   (eval $ac_try) 2>&5
15364   ac_status=$?
15365   echo "$as_me:15365: \$? = $ac_status" >&5
15366   (exit $ac_status); }; }; then
15367   cf_cxx_library=yes
15368          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
15369          cat >>confdefs.h <<\EOF
15370 #define HAVE_BUILTIN_H 1
15371 EOF
15372
15373 else
15374   echo "$as_me: failed program was:" >&5
15375 cat conftest.$ac_ext >&5
15376 cf_cxx_library=no
15377 fi
15378 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15379 fi
15380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15381         LIBS="$cf_save"
15382         echo "$as_me:15382: result: $cf_cxx_library" >&5
15383 echo "${ECHO_T}$cf_cxx_library" >&6
15384 fi
15385
15386                 ;;
15387         *)
15388                 cf_cxx_library=no
15389                 ;;
15390         esac
15391
15392         ac_ext=cc
15393 ac_cpp='$CXXCPP $CPPFLAGS'
15394 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15395 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15396 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15397 ac_main_return=return
15398 echo "$as_me:15398: checking how to run the C++ preprocessor" >&5
15399 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
15400 if test -z "$CXXCPP"; then
15401   if test "${ac_cv_prog_CXXCPP+set}" = set; then
15402   echo $ECHO_N "(cached) $ECHO_C" >&6
15403 else
15404       # Double quotes because CXXCPP needs to be expanded
15405     for CXXCPP in "$CXX -E" "/lib/cpp"
15406     do
15407       ac_preproc_ok=false
15408 for ac_cxx_preproc_warn_flag in '' yes
15409 do
15410   # Use a header file that comes with gcc, so configuring glibc
15411   # with a fresh cross-compiler works.
15412   # On the NeXT, cc -E runs the code through the compiler's parser,
15413   # not just through cpp. "Syntax error" is here to catch this case.
15414   cat >conftest.$ac_ext <<_ACEOF
15415 #line 15415 "configure"
15416 #include "confdefs.h"
15417 #include <assert.h>
15418                      Syntax error
15419 _ACEOF
15420 if { (eval echo "$as_me:15420: \"$ac_cpp conftest.$ac_ext\"") >&5
15421   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15422   ac_status=$?
15423   egrep -v '^ *\+' conftest.er1 >conftest.err
15424   rm -f conftest.er1
15425   cat conftest.err >&5
15426   echo "$as_me:15426: \$? = $ac_status" >&5
15427   (exit $ac_status); } >/dev/null; then
15428   if test -s conftest.err; then
15429     ac_cpp_err=$ac_cxx_preproc_warn_flag
15430   else
15431     ac_cpp_err=
15432   fi
15433 else
15434   ac_cpp_err=yes
15435 fi
15436 if test -z "$ac_cpp_err"; then
15437   :
15438 else
15439   echo "$as_me: failed program was:" >&5
15440   cat conftest.$ac_ext >&5
15441   # Broken: fails on valid input.
15442 continue
15443 fi
15444 rm -f conftest.err conftest.$ac_ext
15445
15446   # OK, works on sane cases.  Now check whether non-existent headers
15447   # can be detected and how.
15448   cat >conftest.$ac_ext <<_ACEOF
15449 #line 15449 "configure"
15450 #include "confdefs.h"
15451 #include <ac_nonexistent.h>
15452 _ACEOF
15453 if { (eval echo "$as_me:15453: \"$ac_cpp conftest.$ac_ext\"") >&5
15454   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15455   ac_status=$?
15456   egrep -v '^ *\+' conftest.er1 >conftest.err
15457   rm -f conftest.er1
15458   cat conftest.err >&5
15459   echo "$as_me:15459: \$? = $ac_status" >&5
15460   (exit $ac_status); } >/dev/null; then
15461   if test -s conftest.err; then
15462     ac_cpp_err=$ac_cxx_preproc_warn_flag
15463   else
15464     ac_cpp_err=
15465   fi
15466 else
15467   ac_cpp_err=yes
15468 fi
15469 if test -z "$ac_cpp_err"; then
15470   # Broken: success on invalid input.
15471 continue
15472 else
15473   echo "$as_me: failed program was:" >&5
15474   cat conftest.$ac_ext >&5
15475   # Passes both tests.
15476 ac_preproc_ok=:
15477 break
15478 fi
15479 rm -f conftest.err conftest.$ac_ext
15480
15481 done
15482 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15483 rm -f conftest.err conftest.$ac_ext
15484 if $ac_preproc_ok; then
15485   break
15486 fi
15487
15488     done
15489     ac_cv_prog_CXXCPP=$CXXCPP
15490
15491 fi
15492   CXXCPP=$ac_cv_prog_CXXCPP
15493 else
15494   ac_cv_prog_CXXCPP=$CXXCPP
15495 fi
15496 echo "$as_me:15496: result: $CXXCPP" >&5
15497 echo "${ECHO_T}$CXXCPP" >&6
15498 ac_preproc_ok=false
15499 for ac_cxx_preproc_warn_flag in '' yes
15500 do
15501   # Use a header file that comes with gcc, so configuring glibc
15502   # with a fresh cross-compiler works.
15503   # On the NeXT, cc -E runs the code through the compiler's parser,
15504   # not just through cpp. "Syntax error" is here to catch this case.
15505   cat >conftest.$ac_ext <<_ACEOF
15506 #line 15506 "configure"
15507 #include "confdefs.h"
15508 #include <assert.h>
15509                      Syntax error
15510 _ACEOF
15511 if { (eval echo "$as_me:15511: \"$ac_cpp conftest.$ac_ext\"") >&5
15512   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15513   ac_status=$?
15514   egrep -v '^ *\+' conftest.er1 >conftest.err
15515   rm -f conftest.er1
15516   cat conftest.err >&5
15517   echo "$as_me:15517: \$? = $ac_status" >&5
15518   (exit $ac_status); } >/dev/null; then
15519   if test -s conftest.err; then
15520     ac_cpp_err=$ac_cxx_preproc_warn_flag
15521   else
15522     ac_cpp_err=
15523   fi
15524 else
15525   ac_cpp_err=yes
15526 fi
15527 if test -z "$ac_cpp_err"; then
15528   :
15529 else
15530   echo "$as_me: failed program was:" >&5
15531   cat conftest.$ac_ext >&5
15532   # Broken: fails on valid input.
15533 continue
15534 fi
15535 rm -f conftest.err conftest.$ac_ext
15536
15537   # OK, works on sane cases.  Now check whether non-existent headers
15538   # can be detected and how.
15539   cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542 #include <ac_nonexistent.h>
15543 _ACEOF
15544 if { (eval echo "$as_me:15544: \"$ac_cpp conftest.$ac_ext\"") >&5
15545   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15546   ac_status=$?
15547   egrep -v '^ *\+' conftest.er1 >conftest.err
15548   rm -f conftest.er1
15549   cat conftest.err >&5
15550   echo "$as_me:15550: \$? = $ac_status" >&5
15551   (exit $ac_status); } >/dev/null; then
15552   if test -s conftest.err; then
15553     ac_cpp_err=$ac_cxx_preproc_warn_flag
15554   else
15555     ac_cpp_err=
15556   fi
15557 else
15558   ac_cpp_err=yes
15559 fi
15560 if test -z "$ac_cpp_err"; then
15561   # Broken: success on invalid input.
15562 continue
15563 else
15564   echo "$as_me: failed program was:" >&5
15565   cat conftest.$ac_ext >&5
15566   # Passes both tests.
15567 ac_preproc_ok=:
15568 break
15569 fi
15570 rm -f conftest.err conftest.$ac_ext
15571
15572 done
15573 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
15574 rm -f conftest.err conftest.$ac_ext
15575 if $ac_preproc_ok; then
15576   :
15577 else
15578   { { echo "$as_me:15578: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
15579 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
15580    { (exit 1); exit 1; }; }
15581 fi
15582
15583 ac_ext=cc
15584 ac_cpp='$CXXCPP $CPPFLAGS'
15585 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15586 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15587 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15588 ac_main_return=return
15589
15590 for ac_header in iostream typeinfo
15591 do
15592 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15593 echo "$as_me:15593: checking for $ac_header" >&5
15594 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15595 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15596   echo $ECHO_N "(cached) $ECHO_C" >&6
15597 else
15598   cat >conftest.$ac_ext <<_ACEOF
15599 #line 15599 "configure"
15600 #include "confdefs.h"
15601 #include <$ac_header>
15602 _ACEOF
15603 if { (eval echo "$as_me:15603: \"$ac_cpp conftest.$ac_ext\"") >&5
15604   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15605   ac_status=$?
15606   egrep -v '^ *\+' conftest.er1 >conftest.err
15607   rm -f conftest.er1
15608   cat conftest.err >&5
15609   echo "$as_me:15609: \$? = $ac_status" >&5
15610   (exit $ac_status); } >/dev/null; then
15611   if test -s conftest.err; then
15612     ac_cpp_err=$ac_cxx_preproc_warn_flag
15613   else
15614     ac_cpp_err=
15615   fi
15616 else
15617   ac_cpp_err=yes
15618 fi
15619 if test -z "$ac_cpp_err"; then
15620   eval "$as_ac_Header=yes"
15621 else
15622   echo "$as_me: failed program was:" >&5
15623   cat conftest.$ac_ext >&5
15624   eval "$as_ac_Header=no"
15625 fi
15626 rm -f conftest.err conftest.$ac_ext
15627 fi
15628 echo "$as_me:15628: result: `eval echo '${'$as_ac_Header'}'`" >&5
15629 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15630 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15631   cat >>confdefs.h <<EOF
15632 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15633 EOF
15634
15635 fi
15636 done
15637
15638     if test x"$ac_cv_header_iostream" = xyes ; then
15639         echo "$as_me:15639: checking if iostream uses std-namespace" >&5
15640 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
15641         cat >conftest.$ac_ext <<_ACEOF
15642 #line 15642 "configure"
15643 #include "confdefs.h"
15644
15645 #include <iostream>
15646 using std::endl;
15647 using std::cerr;
15648 int
15649 main ()
15650 {
15651
15652 cerr << "testing" << endl;
15653
15654   ;
15655   return 0;
15656 }
15657 _ACEOF
15658 rm -f conftest.$ac_objext
15659 if { (eval echo "$as_me:15659: \"$ac_compile\"") >&5
15660   (eval $ac_compile) 2>&5
15661   ac_status=$?
15662   echo "$as_me:15662: \$? = $ac_status" >&5
15663   (exit $ac_status); } &&
15664          { ac_try='test -s conftest.$ac_objext'
15665   { (eval echo "$as_me:15665: \"$ac_try\"") >&5
15666   (eval $ac_try) 2>&5
15667   ac_status=$?
15668   echo "$as_me:15668: \$? = $ac_status" >&5
15669   (exit $ac_status); }; }; then
15670   cf_iostream_namespace=yes
15671 else
15672   echo "$as_me: failed program was:" >&5
15673 cat conftest.$ac_ext >&5
15674 cf_iostream_namespace=no
15675 fi
15676 rm -f conftest.$ac_objext conftest.$ac_ext
15677         echo "$as_me:15677: result: $cf_iostream_namespace" >&5
15678 echo "${ECHO_T}$cf_iostream_namespace" >&6
15679         if test "$cf_iostream_namespace" = yes ; then
15680             cat >>confdefs.h <<\EOF
15681 #define IOSTREAM_NAMESPACE 1
15682 EOF
15683
15684         fi
15685     fi
15686
15687 echo "$as_me:15687: checking if we should include stdbool.h" >&5
15688 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15689
15690 if test "${cf_cv_header_stdbool_h+set}" = set; then
15691   echo $ECHO_N "(cached) $ECHO_C" >&6
15692 else
15693
15694         cat >conftest.$ac_ext <<_ACEOF
15695 #line 15695 "configure"
15696 #include "confdefs.h"
15697
15698 int
15699 main ()
15700 {
15701 bool foo = false
15702   ;
15703   return 0;
15704 }
15705 _ACEOF
15706 rm -f conftest.$ac_objext
15707 if { (eval echo "$as_me:15707: \"$ac_compile\"") >&5
15708   (eval $ac_compile) 2>&5
15709   ac_status=$?
15710   echo "$as_me:15710: \$? = $ac_status" >&5
15711   (exit $ac_status); } &&
15712          { ac_try='test -s conftest.$ac_objext'
15713   { (eval echo "$as_me:15713: \"$ac_try\"") >&5
15714   (eval $ac_try) 2>&5
15715   ac_status=$?
15716   echo "$as_me:15716: \$? = $ac_status" >&5
15717   (exit $ac_status); }; }; then
15718   cf_cv_header_stdbool_h=0
15719 else
15720   echo "$as_me: failed program was:" >&5
15721 cat conftest.$ac_ext >&5
15722 cat >conftest.$ac_ext <<_ACEOF
15723 #line 15723 "configure"
15724 #include "confdefs.h"
15725
15726 #ifndef __BEOS__
15727 #include <stdbool.h>
15728 #endif
15729
15730 int
15731 main ()
15732 {
15733 bool foo = false
15734   ;
15735   return 0;
15736 }
15737 _ACEOF
15738 rm -f conftest.$ac_objext
15739 if { (eval echo "$as_me:15739: \"$ac_compile\"") >&5
15740   (eval $ac_compile) 2>&5
15741   ac_status=$?
15742   echo "$as_me:15742: \$? = $ac_status" >&5
15743   (exit $ac_status); } &&
15744          { ac_try='test -s conftest.$ac_objext'
15745   { (eval echo "$as_me:15745: \"$ac_try\"") >&5
15746   (eval $ac_try) 2>&5
15747   ac_status=$?
15748   echo "$as_me:15748: \$? = $ac_status" >&5
15749   (exit $ac_status); }; }; then
15750   cf_cv_header_stdbool_h=1
15751 else
15752   echo "$as_me: failed program was:" >&5
15753 cat conftest.$ac_ext >&5
15754 cf_cv_header_stdbool_h=0
15755 fi
15756 rm -f conftest.$ac_objext conftest.$ac_ext
15757 fi
15758 rm -f conftest.$ac_objext conftest.$ac_ext
15759 fi
15760
15761 if test "$cf_cv_header_stdbool_h" = 1
15762 then    echo "$as_me:15762: result: yes" >&5
15763 echo "${ECHO_T}yes" >&6
15764 else    echo "$as_me:15764: result: no" >&5
15765 echo "${ECHO_T}no" >&6
15766 fi
15767
15768 echo "$as_me:15768: checking for builtin bool type" >&5
15769 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15770
15771 if test "${cf_cv_builtin_bool+set}" = set; then
15772   echo $ECHO_N "(cached) $ECHO_C" >&6
15773 else
15774
15775         cat >conftest.$ac_ext <<_ACEOF
15776 #line 15776 "configure"
15777 #include "confdefs.h"
15778
15779 #include <stdio.h>
15780 #include <sys/types.h>
15781
15782 int
15783 main ()
15784 {
15785 bool x = false
15786   ;
15787   return 0;
15788 }
15789 _ACEOF
15790 rm -f conftest.$ac_objext
15791 if { (eval echo "$as_me:15791: \"$ac_compile\"") >&5
15792   (eval $ac_compile) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); } &&
15796          { ac_try='test -s conftest.$ac_objext'
15797   { (eval echo "$as_me:15797: \"$ac_try\"") >&5
15798   (eval $ac_try) 2>&5
15799   ac_status=$?
15800   echo "$as_me:15800: \$? = $ac_status" >&5
15801   (exit $ac_status); }; }; then
15802   cf_cv_builtin_bool=1
15803 else
15804   echo "$as_me: failed program was:" >&5
15805 cat conftest.$ac_ext >&5
15806 cf_cv_builtin_bool=0
15807 fi
15808 rm -f conftest.$ac_objext conftest.$ac_ext
15809
15810 fi
15811
15812 if test "$cf_cv_builtin_bool" = 1
15813 then    echo "$as_me:15813: result: yes" >&5
15814 echo "${ECHO_T}yes" >&6
15815 else    echo "$as_me:15815: result: no" >&5
15816 echo "${ECHO_T}no" >&6
15817 fi
15818
15819 echo "$as_me:15819: checking for size of bool" >&5
15820 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
15821 if test "${cf_cv_type_of_bool+set}" = set; then
15822   echo $ECHO_N "(cached) $ECHO_C" >&6
15823 else
15824
15825         rm -f cf_test.out
15826         if test "$cross_compiling" = yes; then
15827   cf_cv_type_of_bool=unknown
15828 else
15829   cat >conftest.$ac_ext <<_ACEOF
15830 #line 15830 "configure"
15831 #include "confdefs.h"
15832
15833 #include <stdlib.h>
15834 #include <stdio.h>
15835
15836 #if defined(__cplusplus)
15837
15838 #ifdef HAVE_GXX_BUILTIN_H
15839 #include <g++/builtin.h>
15840 #elif HAVE_GPP_BUILTIN_H
15841 #include <gpp/builtin.h>
15842 #elif HAVE_BUILTIN_H
15843 #include <builtin.h>
15844 #endif
15845
15846 #else
15847
15848 #if $cf_cv_header_stdbool_h
15849 #include <stdbool.h>
15850 #endif
15851
15852 #endif
15853
15854 main()
15855 {
15856         FILE *fp = fopen("cf_test.out", "w");
15857         if (fp != 0) {
15858                 bool x = true;
15859                 if ((bool)(-x) >= 0)
15860                         fputs("unsigned ", fp);
15861                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
15862                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
15863                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
15864                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
15865                 fclose(fp);
15866         }
15867         ${cf_cv_main_return:-return}(0);
15868 }
15869
15870 _ACEOF
15871 rm -f conftest$ac_exeext
15872 if { (eval echo "$as_me:15872: \"$ac_link\"") >&5
15873   (eval $ac_link) 2>&5
15874   ac_status=$?
15875   echo "$as_me:15875: \$? = $ac_status" >&5
15876   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15877   { (eval echo "$as_me:15877: \"$ac_try\"") >&5
15878   (eval $ac_try) 2>&5
15879   ac_status=$?
15880   echo "$as_me:15880: \$? = $ac_status" >&5
15881   (exit $ac_status); }; }; then
15882   cf_cv_type_of_bool=`cat cf_test.out`
15883                  if test -z "$cf_cv_type_of_bool"; then
15884                    cf_cv_type_of_bool=unknown
15885                  fi
15886 else
15887   echo "$as_me: program exited with status $ac_status" >&5
15888 echo "$as_me: failed program was:" >&5
15889 cat conftest.$ac_ext >&5
15890 cf_cv_type_of_bool=unknown
15891 fi
15892 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15893 fi
15894
15895 fi
15896
15897         rm -f cf_test.out
15898 echo "$as_me:15898: result: $cf_cv_type_of_bool" >&5
15899 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
15900 if test "$cf_cv_type_of_bool" = unknown ; then
15901         case .$NCURSES_BOOL in #(vi
15902         .auto|.) NCURSES_BOOL=unsigned;;
15903         esac
15904         { echo "$as_me:15904: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
15905 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
15906         cf_cv_type_of_bool=$NCURSES_BOOL
15907 fi
15908
15909 echo "$as_me:15909: checking for special defines needed for etip.h" >&5
15910 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
15911 cf_save_CXXFLAGS="$CXXFLAGS"
15912 cf_result="none"
15913 for cf_math in "" MATH_H
15914 do
15915 for cf_excp in "" MATH_EXCEPTION
15916 do
15917         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
15918         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
15919         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
15920 cat >conftest.$ac_ext <<_ACEOF
15921 #line 15921 "configure"
15922 #include "confdefs.h"
15923
15924 #include <etip.h.in>
15925
15926 int
15927 main ()
15928 {
15929
15930   ;
15931   return 0;
15932 }
15933 _ACEOF
15934 rm -f conftest.$ac_objext
15935 if { (eval echo "$as_me:15935: \"$ac_compile\"") >&5
15936   (eval $ac_compile) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit $ac_status); } &&
15940          { ac_try='test -s conftest.$ac_objext'
15941   { (eval echo "$as_me:15941: \"$ac_try\"") >&5
15942   (eval $ac_try) 2>&5
15943   ac_status=$?
15944   echo "$as_me:15944: \$? = $ac_status" >&5
15945   (exit $ac_status); }; }; then
15946
15947         test -n "$cf_math" && cat >>confdefs.h <<EOF
15948 #define ETIP_NEEDS_${cf_math} 1
15949 EOF
15950
15951         test -n "$cf_excp" && cat >>confdefs.h <<EOF
15952 #define ETIP_NEEDS_${cf_excp} 1
15953 EOF
15954
15955         cf_result="$cf_math $cf_excp"
15956         break
15957
15958 else
15959   echo "$as_me: failed program was:" >&5
15960 cat conftest.$ac_ext >&5
15961 fi
15962 rm -f conftest.$ac_objext conftest.$ac_ext
15963 done
15964 done
15965 echo "$as_me:15965: result: $cf_result" >&5
15966 echo "${ECHO_T}$cf_result" >&6
15967 CXXFLAGS="$cf_save_CXXFLAGS"
15968
15969 if test -n "$CXX"; then
15970 echo "$as_me:15970: checking if $CXX accepts parameter initialization" >&5
15971 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
15972 if test "${cf_cv_cpp_param_init+set}" = set; then
15973   echo $ECHO_N "(cached) $ECHO_C" >&6
15974 else
15975
15976         ac_ext=cc
15977 ac_cpp='$CXXCPP $CPPFLAGS'
15978 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15979 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15980 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15981 ac_main_return=return
15982
15983         if test "$cross_compiling" = yes; then
15984   cf_cv_cpp_param_init=unknown
15985 else
15986   cat >conftest.$ac_ext <<_ACEOF
15987 #line 15987 "configure"
15988 #include "confdefs.h"
15989
15990 class TEST {
15991 private:
15992         int value;
15993 public:
15994         TEST(int x = 1);
15995         ~TEST();
15996 };
15997
15998 TEST::TEST(int x = 1)   // some compilers do not like second initializer
15999 {
16000         value = x;
16001 }
16002 void main() { }
16003
16004 _ACEOF
16005 rm -f conftest$ac_exeext
16006 if { (eval echo "$as_me:16006: \"$ac_link\"") >&5
16007   (eval $ac_link) 2>&5
16008   ac_status=$?
16009   echo "$as_me:16009: \$? = $ac_status" >&5
16010   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16011   { (eval echo "$as_me:16011: \"$ac_try\"") >&5
16012   (eval $ac_try) 2>&5
16013   ac_status=$?
16014   echo "$as_me:16014: \$? = $ac_status" >&5
16015   (exit $ac_status); }; }; then
16016   cf_cv_cpp_param_init=yes
16017 else
16018   echo "$as_me: program exited with status $ac_status" >&5
16019 echo "$as_me: failed program was:" >&5
16020 cat conftest.$ac_ext >&5
16021 cf_cv_cpp_param_init=no
16022 fi
16023 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16024 fi
16025         ac_ext=cc
16026 ac_cpp='$CXXCPP $CPPFLAGS'
16027 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16028 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16029 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16030 ac_main_return=return
16031
16032 fi
16033 echo "$as_me:16033: result: $cf_cv_cpp_param_init" >&5
16034 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16035 fi
16036 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16037 #define CPP_HAS_PARAM_INIT 1
16038 EOF
16039
16040 if test -n "$CXX"; then
16041
16042 echo "$as_me:16042: checking if $CXX accepts static_cast" >&5
16043 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16044 if test "${cf_cv_cpp_static_cast+set}" = set; then
16045   echo $ECHO_N "(cached) $ECHO_C" >&6
16046 else
16047
16048         ac_ext=cc
16049 ac_cpp='$CXXCPP $CPPFLAGS'
16050 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16051 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16052 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16053 ac_main_return=return
16054
16055         cat >conftest.$ac_ext <<_ACEOF
16056 #line 16056 "configure"
16057 #include "confdefs.h"
16058
16059 class NCursesPanel
16060 {
16061 public:
16062   NCursesPanel(int nlines,
16063                int ncols,
16064                int begin_y = 0,
16065                int begin_x = 0)
16066   {
16067   }
16068
16069   ~NCursesPanel();
16070 };
16071
16072 template<class T> class NCursesUserPanel : public NCursesPanel
16073 {
16074 public:
16075   NCursesUserPanel (int nlines,
16076                     int ncols,
16077                     int begin_y = 0,
16078                     int begin_x = 0,
16079                     const T* p_UserData = static_cast<T*>(0))
16080     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16081   {
16082   };
16083   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16084   {
16085   };
16086
16087   virtual ~NCursesUserPanel() {};
16088 };
16089
16090 int
16091 main ()
16092 {
16093
16094         const char* p_UserData = static_cast<char*>(0)
16095   ;
16096   return 0;
16097 }
16098 _ACEOF
16099 rm -f conftest.$ac_objext
16100 if { (eval echo "$as_me:16100: \"$ac_compile\"") >&5
16101   (eval $ac_compile) 2>&5
16102   ac_status=$?
16103   echo "$as_me:16103: \$? = $ac_status" >&5
16104   (exit $ac_status); } &&
16105          { ac_try='test -s conftest.$ac_objext'
16106   { (eval echo "$as_me:16106: \"$ac_try\"") >&5
16107   (eval $ac_try) 2>&5
16108   ac_status=$?
16109   echo "$as_me:16109: \$? = $ac_status" >&5
16110   (exit $ac_status); }; }; then
16111   cf_cv_cpp_static_cast=yes
16112 else
16113   echo "$as_me: failed program was:" >&5
16114 cat conftest.$ac_ext >&5
16115 cf_cv_cpp_static_cast=no
16116 fi
16117 rm -f conftest.$ac_objext conftest.$ac_ext
16118
16119         ac_ext=cc
16120 ac_cpp='$CXXCPP $CPPFLAGS'
16121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16123 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16124 ac_main_return=return
16125
16126 fi
16127 echo "$as_me:16127: result: $cf_cv_cpp_static_cast" >&5
16128 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16129
16130 fi
16131
16132 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16133 #define CPP_HAS_STATIC_CAST 1
16134 EOF
16135
16136         CXX_AR='$(AR)'
16137         CXX_ARFLAGS='$(ARFLAGS)'
16138         case $cf_cv_system_name in #(vi
16139         irix*) #(vi
16140             if test "$GXX" != yes ; then
16141                 CXX_AR='$(CXX)'
16142                 CXX_ARFLAGS='-ar -o'
16143             fi
16144             ;;
16145         sco3.2v5*) #(vi
16146             CXXLDFLAGS="-u main"
16147             ;;
16148         solaris2*)
16149             if test "$GXX" != yes ; then
16150                 CXX_AR='$(CXX)'
16151                 CXX_ARFLAGS='-xar -o'
16152             fi
16153             ;;
16154         esac
16155
16156 else
16157         cf_cxx_library=no
16158         cf_cv_builtin_bool=1
16159
16160         # Just because we are not configuring against C++ right now does not
16161         # mean that a user will not want to use C++.  Some distributors disable
16162         # the C++ portion of this configuration as a shortcut (or just to avoid
16163         # compiling the demo in the c++ directory).  So we need a reasonable
16164         # default for the 'bool' type.
16165         #
16166         # Caveat: since the storage of the bool type is not standardized, it
16167         # may change.
16168
16169         if test "$NCURSES_BOOL" != auto ; then
16170                 cf_cv_type_of_bool=$NCURSES_BOOL
16171                 cf_cv_header_stdbool_h=0
16172         else
16173                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16174
16175 echo "$as_me:16175: checking for size of bool" >&5
16176 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16177 if test "${cf_cv_type_of_bool+set}" = set; then
16178   echo $ECHO_N "(cached) $ECHO_C" >&6
16179 else
16180
16181         rm -f cf_test.out
16182         if test "$cross_compiling" = yes; then
16183   cf_cv_type_of_bool=unknown
16184 else
16185   cat >conftest.$ac_ext <<_ACEOF
16186 #line 16186 "configure"
16187 #include "confdefs.h"
16188
16189 #include <stdlib.h>
16190 #include <stdio.h>
16191
16192 #if defined(__cplusplus)
16193
16194 #ifdef HAVE_GXX_BUILTIN_H
16195 #include <g++/builtin.h>
16196 #elif HAVE_GPP_BUILTIN_H
16197 #include <gpp/builtin.h>
16198 #elif HAVE_BUILTIN_H
16199 #include <builtin.h>
16200 #endif
16201
16202 #else
16203
16204 #if $cf_cv_header_stdbool_h
16205 #include <stdbool.h>
16206 #endif
16207
16208 #endif
16209
16210 main()
16211 {
16212         FILE *fp = fopen("cf_test.out", "w");
16213         if (fp != 0) {
16214                 bool x = true;
16215                 if ((bool)(-x) >= 0)
16216                         fputs("unsigned ", fp);
16217                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16218                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16219                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16220                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16221                 fclose(fp);
16222         }
16223         ${cf_cv_main_return:-return}(0);
16224 }
16225
16226 _ACEOF
16227 rm -f conftest$ac_exeext
16228 if { (eval echo "$as_me:16228: \"$ac_link\"") >&5
16229   (eval $ac_link) 2>&5
16230   ac_status=$?
16231   echo "$as_me:16231: \$? = $ac_status" >&5
16232   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16233   { (eval echo "$as_me:16233: \"$ac_try\"") >&5
16234   (eval $ac_try) 2>&5
16235   ac_status=$?
16236   echo "$as_me:16236: \$? = $ac_status" >&5
16237   (exit $ac_status); }; }; then
16238   cf_cv_type_of_bool=`cat cf_test.out`
16239                  if test -z "$cf_cv_type_of_bool"; then
16240                    cf_cv_type_of_bool=unknown
16241                  fi
16242 else
16243   echo "$as_me: program exited with status $ac_status" >&5
16244 echo "$as_me: failed program was:" >&5
16245 cat conftest.$ac_ext >&5
16246 cf_cv_type_of_bool=unknown
16247 fi
16248 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16249 fi
16250
16251 fi
16252
16253         rm -f cf_test.out
16254 echo "$as_me:16254: result: $cf_cv_type_of_bool" >&5
16255 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16256 if test "$cf_cv_type_of_bool" = unknown ; then
16257         case .$NCURSES_BOOL in #(vi
16258         .auto|.) NCURSES_BOOL=unsigned;;
16259         esac
16260         { echo "$as_me:16260: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16261 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16262         cf_cv_type_of_bool=$NCURSES_BOOL
16263 fi
16264
16265                 else
16266                         echo "$as_me:16266: checking for fallback type of bool" >&5
16267 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16268                         case "$host_cpu" in #(vi
16269                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16270                         *)      cf_cv_type_of_bool=int  ;;
16271                         esac
16272                         echo "$as_me:16272: result: $cf_cv_type_of_bool" >&5
16273 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16274                 fi
16275         fi
16276 fi
16277
16278 # If the C compiler did not declare bool, and we did not determine that the C++
16279 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
16280 # ncurses library use the same type as C++ bool.  Note that this allows one to
16281 # specify the type of bool in a configure-script option and postpone
16282 # integration with the C++ compiler provided that the types are compatible.
16283 USE_CXX_BOOL=1
16284 if test $cf_cv_cc_bool_type = 1
16285 then
16286         # oops: C has a bool.  Unlikely, but C++ could differ.
16287         USE_CXX_BOOL=0
16288 elif test $cf_cv_builtin_bool = 0
16289 then
16290         # C++ has no bool
16291         USE_CXX_BOOL=0
16292 else
16293         # this is the normal case
16294         USE_CXX_BOOL='defined(__cplusplus)'
16295 fi
16296
16297 if test -f "${srcdir}/Ada95/Makefile.in" ; then
16298
16299 if test "$cf_with_ada" != "no" ; then
16300     if test "$with_libtool" != "no"; then
16301         { echo "$as_me:16301: WARNING: libtool does not support Ada - disabling feature" >&5
16302 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
16303         cf_with_ada=no
16304     fi
16305 fi
16306
16307 if test "$cf_with_ada" != "no" ; then
16308 cf_ada_make=gnatmake
16309 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
16310 set dummy $cf_ada_make; ac_word=$2
16311 echo "$as_me:16311: checking for $ac_word" >&5
16312 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16313 if test "${ac_cv_prog_gnat_exists+set}" = set; then
16314   echo $ECHO_N "(cached) $ECHO_C" >&6
16315 else
16316   if test -n "$gnat_exists"; then
16317   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
16318 else
16319   ac_save_IFS=$IFS; IFS=$ac_path_separator
16320 ac_dummy="$PATH"
16321 for ac_dir in $ac_dummy; do
16322   IFS=$ac_save_IFS
16323   test -z "$ac_dir" && ac_dir=.
16324   $as_executable_p "$ac_dir/$ac_word" || continue
16325 ac_cv_prog_gnat_exists="yes"
16326 echo "$as_me:16326: found $ac_dir/$ac_word" >&5
16327 break
16328 done
16329
16330   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
16331 fi
16332 fi
16333 gnat_exists=$ac_cv_prog_gnat_exists
16334 if test -n "$gnat_exists"; then
16335   echo "$as_me:16335: result: $gnat_exists" >&5
16336 echo "${ECHO_T}$gnat_exists" >&6
16337 else
16338   echo "$as_me:16338: result: no" >&5
16339 echo "${ECHO_T}no" >&6
16340 fi
16341
16342 if test "$ac_cv_prog_gnat_exists" = no; then
16343    cf_ada_make=
16344 else
16345
16346 echo "$as_me:16346: checking for gnat version" >&5
16347 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
16348 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
16349   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
16350 echo "$as_me:16350: result: $cf_gnat_version" >&5
16351 echo "${ECHO_T}$cf_gnat_version" >&6
16352
16353 case $cf_gnat_version in
16354   3.1[1-9]*|3.[2-9]*|[4-9].*)
16355     cf_cv_prog_gnat_correct=yes
16356     ;;
16357   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
16358      cf_cv_prog_gnat_correct=no
16359      ;;
16360 esac
16361 case $cf_gnat_version in
16362   3.[1-9]*|[4-9].*)
16363       cf_compile_generics=generics
16364       cf_generic_objects="\${GENOBJS}"
16365       ;;
16366   *)  cf_compile_generics=
16367       cf_generic_objects=
16368       ;;
16369 esac
16370
16371    # Extract the first word of "m4", so it can be a program name with args.
16372 set dummy m4; ac_word=$2
16373 echo "$as_me:16373: checking for $ac_word" >&5
16374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16375 if test "${ac_cv_prog_M4_exists+set}" = set; then
16376   echo $ECHO_N "(cached) $ECHO_C" >&6
16377 else
16378   if test -n "$M4_exists"; then
16379   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
16380 else
16381   ac_save_IFS=$IFS; IFS=$ac_path_separator
16382 ac_dummy="$PATH"
16383 for ac_dir in $ac_dummy; do
16384   IFS=$ac_save_IFS
16385   test -z "$ac_dir" && ac_dir=.
16386   $as_executable_p "$ac_dir/$ac_word" || continue
16387 ac_cv_prog_M4_exists="yes"
16388 echo "$as_me:16388: found $ac_dir/$ac_word" >&5
16389 break
16390 done
16391
16392   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
16393 fi
16394 fi
16395 M4_exists=$ac_cv_prog_M4_exists
16396 if test -n "$M4_exists"; then
16397   echo "$as_me:16397: result: $M4_exists" >&5
16398 echo "${ECHO_T}$M4_exists" >&6
16399 else
16400   echo "$as_me:16400: result: no" >&5
16401 echo "${ECHO_T}no" >&6
16402 fi
16403
16404    if test "$ac_cv_prog_M4_exists" = no; then
16405       cf_cv_prog_gnat_correct=no
16406       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
16407    fi
16408    if test "$cf_cv_prog_gnat_correct" = yes; then
16409       echo "$as_me:16409: checking if GNAT works" >&5
16410 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
16411
16412 rm -f conftest*
16413 cat >>conftest.ads <<CF_EOF
16414 procedure conftest;
16415 CF_EOF
16416 cat >>conftest.adb <<CF_EOF
16417 with Text_IO;
16418 with GNAT.OS_Lib;
16419 procedure conftest is
16420 begin
16421    Text_IO.Put ("Hello World");
16422    Text_IO.New_Line;
16423    GNAT.OS_Lib.OS_Exit (0);
16424 end conftest;
16425 CF_EOF
16426 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16427    if ( ./conftest 1>&5 2>&1 ) ; then
16428       cf_cv_prog_gnat_correct=yes
16429    else
16430       cf_cv_prog_gnat_correct=no
16431    fi
16432 else
16433    cf_cv_prog_gnat_correct=no
16434 fi
16435 rm -f conftest*
16436
16437       echo "$as_me:16437: result: $cf_cv_prog_gnat_correct" >&5
16438 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
16439    fi
16440 fi
16441 if test "$cf_cv_prog_gnat_correct" = yes; then
16442    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
16443
16444    echo "$as_me:16444: checking if GNAT pragma Unreferenced works" >&5
16445 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
16446
16447 rm -f conftest*
16448 cat >>conftest.ads <<CF_EOF
16449 procedure conftest;
16450 CF_EOF
16451 cat >>conftest.adb <<CF_EOF
16452 with Text_IO;
16453 with GNAT.OS_Lib;
16454 procedure conftest is
16455    test : Integer;
16456    pragma Unreferenced (test);
16457 begin
16458    test := 1;
16459    Text_IO.Put ("Hello World");
16460    Text_IO.New_Line;
16461    GNAT.OS_Lib.OS_Exit (0);
16462 end conftest;
16463 CF_EOF
16464 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
16465       cf_cv_pragma_unreferenced=yes
16466 else
16467    cf_cv_pragma_unreferenced=no
16468 fi
16469 rm -f conftest*
16470
16471    echo "$as_me:16471: result: $cf_cv_pragma_unreferenced" >&5
16472 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
16473
16474    # if the pragma is supported, use it (needed in the Trace code).
16475    if test $cf_cv_pragma_unreferenced = yes ; then
16476       PRAGMA_UNREF=TRUE
16477    else
16478       PRAGMA_UNREF=FALSE
16479    fi
16480
16481 # Check whether --with-ada-compiler or --without-ada-compiler was given.
16482 if test "${with_ada_compiler+set}" = set; then
16483   withval="$with_ada_compiler"
16484   cf_ada_compiler=$withval
16485 else
16486   cf_ada_compiler=gnatmake
16487 fi;
16488
16489    cf_ada_package=terminal_interface
16490
16491 # Check whether --with-ada-include or --without-ada-include was given.
16492 if test "${with_ada_include+set}" = set; then
16493   withval="$with_ada_include"
16494
16495 else
16496   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
16497 fi; if test -n "$prefix/lib/ada/adainclude" ; then
16498
16499 if test "x$prefix" != xNONE; then
16500   cf_path_syntax="$prefix"
16501 else
16502   cf_path_syntax="$ac_default_prefix"
16503 fi
16504
16505 case ".$withval" in #(vi
16506 .\$\(*\)*|.\'*\'*) #(vi
16507   ;;
16508 ..|./*|.\\*) #(vi
16509   ;;
16510 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16511   ;;
16512 .\${*prefix}*) #(vi
16513   eval withval="$withval"
16514   case ".$withval" in #(vi
16515   .NONE/*)
16516     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16517     ;;
16518   esac
16519   ;; #(vi
16520 .no|.NONE/*)
16521   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16522   ;;
16523 *)
16524   { { echo "$as_me:16524: error: expected a pathname, not \"$withval\"" >&5
16525 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16526    { (exit 1); exit 1; }; }
16527   ;;
16528 esac
16529
16530 fi
16531 ADA_INCLUDE="$withval"
16532
16533 # Check whether --with-ada-objects or --without-ada-objects was given.
16534 if test "${with_ada_objects+set}" = set; then
16535   withval="$with_ada_objects"
16536
16537 else
16538   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
16539 fi; if test -n "$prefix/lib/ada/adalib" ; then
16540
16541 if test "x$prefix" != xNONE; then
16542   cf_path_syntax="$prefix"
16543 else
16544   cf_path_syntax="$ac_default_prefix"
16545 fi
16546
16547 case ".$withval" in #(vi
16548 .\$\(*\)*|.\'*\'*) #(vi
16549   ;;
16550 ..|./*|.\\*) #(vi
16551   ;;
16552 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
16553   ;;
16554 .\${*prefix}*) #(vi
16555   eval withval="$withval"
16556   case ".$withval" in #(vi
16557   .NONE/*)
16558     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16559     ;;
16560   esac
16561   ;; #(vi
16562 .no|.NONE/*)
16563   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
16564   ;;
16565 *)
16566   { { echo "$as_me:16566: error: expected a pathname, not \"$withval\"" >&5
16567 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
16568    { (exit 1); exit 1; }; }
16569   ;;
16570 esac
16571
16572 fi
16573 ADA_OBJECTS="$withval"
16574
16575 fi
16576 fi
16577 else
16578    cf_with_ada=no
16579 fi
16580
16581 ### Construct the ncurses library-subsets, if any, from this set of keywords:
16582 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
16583 ###
16584 ### ticlib modules may be a separate library, otherwise contained in termlib.
16585 ### termlib modules may be a separate library, otherwise contained in ncurses.
16586 ###
16587 ### The of "+" or " " between the tokens controls the way the script
16588 ### chooses to split module lists into libraries.
16589 ###
16590 ### (see CF_LIB_RULES).
16591 echo "$as_me:16591: checking for library subsets" >&5
16592 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
16593 LIB_SUBSETS=
16594
16595 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
16596         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
16597         if test "$with_ticlib" != no ; then
16598                 LIB_SUBSETS="${LIB_SUBSETS} "
16599         else
16600                 LIB_SUBSETS="${LIB_SUBSETS}+"
16601         fi
16602 fi
16603
16604 LIB_SUBSETS="${LIB_SUBSETS}termlib+port_drivers"
16605
16606 case $cf_cv_system_name in #(vi
16607 *mingw32*) #(vi
16608         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
16609         ;;
16610 *) #(vi
16611         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
16612         ;;
16613 esac
16614
16615 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
16616 if test "$with_termlib" != no ; then
16617         LIB_SUBSETS="${LIB_SUBSETS} "
16618 else
16619         LIB_SUBSETS="${LIB_SUBSETS}+"
16620 fi
16621
16622 LIB_SUBSETS="${LIB_SUBSETS}base"
16623
16624 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
16625 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
16626
16627 echo "$as_me:16627: result: $LIB_SUBSETS" >&5
16628 echo "${ECHO_T}$LIB_SUBSETS" >&6
16629
16630 ### Construct the list of include-directories to be generated
16631
16632 CPPFLAGS="$CPPFLAGS -I. -I../include"
16633 if test "$srcdir" != "."; then
16634         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
16635 fi
16636 if test "$GCC" != yes; then
16637         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16638 elif test "$includedir" != "/usr/include"; then
16639         if test "$includedir" = '${prefix}/include' ; then
16640                 if test $prefix != /usr ; then
16641                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
16642                 fi
16643         else
16644                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
16645         fi
16646 fi
16647
16648 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
16649 if test "$srcdir" != "."; then
16650         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
16651 fi
16652 if test "$GCC" != yes; then
16653         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16654 elif test "$includedir" != "/usr/include"; then
16655         if test "$includedir" = '${prefix}/include' ; then
16656                 if test $prefix != /usr ; then
16657                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16658                 fi
16659         else
16660                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
16661         fi
16662 fi
16663
16664 ### Build up pieces for makefile rules
16665 echo "$as_me:16665: checking default library suffix" >&5
16666 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
16667
16668         case $DFT_LWR_MODEL in
16669         libtool) DFT_ARG_SUFFIX=''   ;;
16670         normal)  DFT_ARG_SUFFIX=''   ;;
16671         debug)   DFT_ARG_SUFFIX='_g' ;;
16672         profile) DFT_ARG_SUFFIX='_p' ;;
16673         shared)  DFT_ARG_SUFFIX=''   ;;
16674         esac
16675         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
16676 echo "$as_me:16676: result: $DFT_ARG_SUFFIX" >&5
16677 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
16678
16679 echo "$as_me:16679: checking default library-dependency suffix" >&5
16680 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
16681
16682         case $DFT_LWR_MODEL in #(vi
16683         libtool) #(vi
16684                 DFT_LIB_SUFFIX='.la'
16685                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16686                 ;;
16687         normal) #(vi
16688                 DFT_LIB_SUFFIX='.a'
16689                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16690                 ;;
16691         debug) #(vi
16692                 DFT_LIB_SUFFIX='_g.a'
16693                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16694                 ;;
16695         profile) #(vi
16696                 DFT_LIB_SUFFIX='_p.a'
16697                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16698                 ;;
16699         shared) #(vi
16700                 case $cf_cv_system_name in
16701                 aix[56]*) #(vi
16702                         DFT_LIB_SUFFIX='.a'
16703                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16704                         ;;
16705                 cygwin*) #(vi
16706                         DFT_LIB_SUFFIX='.dll'
16707                         DFT_DEP_SUFFIX='.dll.a'
16708                         ;;
16709                 darwin*) #(vi
16710                         DFT_LIB_SUFFIX='.dylib'
16711                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16712                         ;;
16713                 hpux*) #(vi
16714                         case $target in
16715                         ia64*) #(vi
16716                                 DFT_LIB_SUFFIX='.so'
16717                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16718                                 ;;
16719                         *) #(vi
16720                                 DFT_LIB_SUFFIX='.sl'
16721                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16722                                 ;;
16723                         esac
16724                         ;;
16725                 *)      DFT_LIB_SUFFIX='.so'
16726                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
16727                         ;;
16728                 esac
16729         esac
16730         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
16731         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
16732 echo "$as_me:16732: result: $DFT_DEP_SUFFIX" >&5
16733 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
16734
16735 echo "$as_me:16735: checking default object directory" >&5
16736 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
16737
16738         case $DFT_LWR_MODEL in
16739         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
16740         normal)  DFT_OBJ_SUBDIR='objects' ;;
16741         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
16742         profile) DFT_OBJ_SUBDIR='obj_p' ;;
16743         shared)
16744                 case $cf_cv_system_name in #(vi
16745                 cygwin) #(vi
16746                         DFT_OBJ_SUBDIR='objects' ;;
16747                 *)
16748                         DFT_OBJ_SUBDIR='obj_s' ;;
16749                 esac
16750         esac
16751 echo "$as_me:16751: result: $DFT_OBJ_SUBDIR" >&5
16752 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
16753
16754 # libtool thinks it can make c++ shared libraries (perhaps only g++)
16755 if test "$cf_with_cxx" = yes ; then
16756 echo "$as_me:16756: checking c++ library-dependency suffix" >&5
16757 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
16758 if test "$with_libtool" != "no"; then
16759         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
16760 else
16761
16762         case normal in #(vi
16763         libtool) #(vi
16764                 CXX_LIB_SUFFIX='.la'
16765                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16766                 ;;
16767         normal) #(vi
16768                 CXX_LIB_SUFFIX='.a'
16769                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16770                 ;;
16771         debug) #(vi
16772                 CXX_LIB_SUFFIX='_g.a'
16773                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16774                 ;;
16775         profile) #(vi
16776                 CXX_LIB_SUFFIX='_p.a'
16777                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16778                 ;;
16779         shared) #(vi
16780                 case $cf_cv_system_name in
16781                 aix[56]*) #(vi
16782                         CXX_LIB_SUFFIX='.a'
16783                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16784                         ;;
16785                 cygwin*) #(vi
16786                         CXX_LIB_SUFFIX='.dll'
16787                         CXX_DEP_SUFFIX='.dll.a'
16788                         ;;
16789                 darwin*) #(vi
16790                         CXX_LIB_SUFFIX='.dylib'
16791                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16792                         ;;
16793                 hpux*) #(vi
16794                         case $target in
16795                         ia64*) #(vi
16796                                 CXX_LIB_SUFFIX='.so'
16797                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16798                                 ;;
16799                         *) #(vi
16800                                 CXX_LIB_SUFFIX='.sl'
16801                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16802                                 ;;
16803                         esac
16804                         ;;
16805                 *)      CXX_LIB_SUFFIX='.so'
16806                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
16807                         ;;
16808                 esac
16809         esac
16810         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
16811         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
16812 fi
16813 echo "$as_me:16813: result: $CXX_LIB_SUFFIX" >&5
16814 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
16815
16816 fi
16817
16818 # do not want -ldl in build except as needed for -lncurses dependency
16819 if test "$with_dlsym" = yes ; then
16820 if test $DFT_LWR_MODEL = shared || \
16821    test $DFT_LWR_MODEL = libtool ; then
16822
16823 # remove dl library from $LIBS
16824 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
16825
16826 fi
16827 fi
16828 ### Set up low-level terminfo dependencies for makefiles.
16829
16830 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
16831 # do not need libdl
16832 TICS_LIST=
16833 if test "$with_dlsym" = yes ; then
16834
16835 # remove dl library from $SHLIB_LIST
16836 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
16837
16838 fi
16839
16840 if test "$with_ticlib" != no ; then
16841
16842         if test "$with_ticlib" != yes ; then
16843                 TICS_NAME=$with_ticlib
16844                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16845                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16846                 TICS_LIB_SUFFIX="${with_ticlib}"
16847         else
16848                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
16849                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
16850                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
16851         fi
16852         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
16853 else
16854         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16855 fi
16856
16857 if test "$with_termlib" != no ; then
16858
16859         if test "$with_termlib" != yes ; then
16860                 TINFO_NAME=$with_termlib
16861                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16862                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16863                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
16864                 TINFO_LIB_SUFFIX="${with_termlib}"
16865         else
16866                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16867                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
16868                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
16869                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
16870         fi
16871
16872         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16873         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
16874         if test "$DFT_LWR_MODEL" = "libtool"; then
16875                 TEST_ARGS="${TEST_DEPS}"
16876                 TEST_ARG2="${TEST_DEP2}"
16877                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16878                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
16879                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
16880         else
16881                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
16882                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
16883                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16884                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
16885                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
16886         fi
16887 else
16888         # the next lines are needed for linking libtic over libncurses
16889         TINFO_NAME=${LIB_NAME}
16890         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
16891         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
16892         if test "$with_tic_depends" = yes ; then
16893                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16894         else
16895                 TICS_LIST="$SHLIB_LIST"
16896         fi
16897
16898         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
16899 fi
16900
16901 if test "$DFT_LWR_MODEL" = shared ; then
16902         case $cf_cv_system_name in #(vi
16903         cygwin*)
16904                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
16905                 TINFO_SUFFIX=.dll
16906                 ;;
16907         esac
16908 fi
16909
16910 if test "$with_dlsym" = yes ; then
16911
16912 # remove dl library from $TICS_LIST
16913 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
16914
16915 fi
16916
16917 if test "$DFT_LWR_MODEL" = "libtool"; then
16918     OBJEXT=lo
16919 fi
16920
16921 # needed for Ada95
16922 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
16923
16924 case $DFT_LWR_MODEL in
16925 normal|debug|profile)
16926
16927 if test "$GCC" = yes ; then
16928         case $cf_cv_system_name in #(
16929         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
16930                 LDFLAGS_STATIC=
16931                 LDFLAGS_SHARED=
16932                 ;;
16933     *)  #( normally, except when broken
16934         LDFLAGS_STATIC=-static
16935         LDFLAGS_SHARED=-dynamic
16936         ;;
16937     esac
16938 else
16939         case $cf_cv_system_name in #(
16940         aix[456]*)      #( from ld manpage
16941                 LDFLAGS_STATIC=-bstatic
16942                 LDFLAGS_SHARED=-bdynamic
16943                 ;;
16944         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
16945                 # We could also use just "archive" and "shared".
16946                 LDFLAGS_STATIC=-Wl,-a,archive_shared
16947                 LDFLAGS_SHARED=-Wl,-a,shared_archive
16948                 ;;
16949         irix*)          #( from ld manpage IRIX64
16950                 LDFLAGS_STATIC=-Bstatic
16951                 LDFLAGS_SHARED=-Bdynamic
16952                 ;;
16953         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
16954                 # alternative "-oldstyle_liblookup" (not in cc manpage)
16955                 LDFLAGS_STATIC=-noso
16956                 LDFLAGS_SHARED=-so_archive
16957                 ;;
16958         solaris2*)
16959                 LDFLAGS_STATIC=-Bstatic
16960                 LDFLAGS_SHARED=-Bdynamic
16961                 ;;
16962         esac
16963 fi
16964
16965         ;;
16966 esac
16967
16968 echo "$as_me:16968: checking where we will install curses.h" >&5
16969 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
16970 test "$with_overwrite" = no && \
16971 test "x$includedir" = 'x${prefix}/include' && \
16972         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
16973 echo "$as_me:16973: result: $includedir" >&5
16974 echo "${ECHO_T}$includedir" >&6
16975
16976 ### Resolve a conflict between normal and wide-curses by forcing applications
16977 ### that will need libutf8 to add it to their configure script.
16978 if test "$with_overwrite" != no ; then
16979 if test "$NCURSES_LIBUTF8" = 1 ; then
16980         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
16981         { echo "$as_me:16981: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
16982 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
16983 fi
16984 fi
16985 WITH_OVERWRITE=$with_overwrite
16986
16987 # used to separate tack out of the tree
16988 NCURSES_TREE=
16989
16990 ### predefined stuff for the test programs
16991 cat >>confdefs.h <<\EOF
16992 #define HAVE_SLK_COLOR 1
16993 EOF
16994
16995 ### Construct the list of subdirectories for which we'll customize makefiles
16996 ### with the appropriate compile-rules.
16997
16998 echo "$as_me:16998: checking for src modules" >&5
16999 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
17000
17001 # dependencies and linker-arguments for test-programs
17002 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
17003 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
17004 if test "$DFT_LWR_MODEL" = "libtool"; then
17005         TEST_ARGS="${TEST_DEPS}"
17006         TEST_ARG2="${TEST_DEP2}"
17007 else
17008         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
17009         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
17010 fi
17011
17012 cf_cv_src_modules=
17013 for cf_dir in $modules_to_build
17014 do
17015         if test -f $srcdir/$cf_dir/modules; then
17016
17017                 # We may/may not have tack in the distribution, though the
17018                 # makefile is.
17019                 if test $cf_dir = tack ; then
17020                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17021                                 continue
17022                         fi
17023                 fi
17024
17025                 if test -z "$cf_cv_src_modules"; then
17026                         cf_cv_src_modules=$cf_dir
17027                 else
17028                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17029                 fi
17030
17031                 # Make the ncurses_cfg.h file record the library interface files as
17032                 # well.  These are header files that are the same name as their
17033                 # directory.  Ncurses is the only library that does not follow
17034                 # that pattern.
17035                 if test $cf_dir = tack ; then
17036                         continue
17037                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17038
17039 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17040
17041                         cat >>confdefs.h <<EOF
17042 #define HAVE_${cf_have_include}_H 1
17043 EOF
17044
17045                         cat >>confdefs.h <<EOF
17046 #define HAVE_LIB${cf_have_include} 1
17047 EOF
17048
17049                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17050                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17051                         if test "$DFT_LWR_MODEL" = "libtool"; then
17052                                 TEST_ARGS="${TEST_DEPS}"
17053                                 TEST_ARG2="${TEST_DEP2}"
17054                         else
17055                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17056                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17057                         fi
17058                 fi
17059         fi
17060 done
17061 echo "$as_me:17061: result: $cf_cv_src_modules" >&5
17062 echo "${ECHO_T}$cf_cv_src_modules" >&6
17063
17064 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17065 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17066
17067 SRC_SUBDIRS=
17068 if test "x$cf_with_manpages" != xno ; then
17069         SRC_SUBDIRS="$SRC_SUBDIRS man"
17070 fi
17071 SRC_SUBDIRS="$SRC_SUBDIRS include"
17072 for cf_dir in $cf_cv_src_modules
17073 do
17074         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17075 done
17076 SRC_SUBDIRS="$SRC_SUBDIRS test"
17077 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17078 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17079
17080 ADA_SUBDIRS=
17081 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17082         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17083         ADA_SUBDIRS="gen src samples"
17084 fi
17085
17086 SUB_MAKEFILES=
17087 for cf_dir in $SRC_SUBDIRS
17088 do
17089         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17090 done
17091
17092 if test -n "$ADA_SUBDIRS"; then
17093         for cf_dir in $ADA_SUBDIRS
17094         do
17095                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17096         done
17097
17098 fi
17099
17100 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17101    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17102 fi
17103
17104 DIRS_TO_MAKE="lib"
17105 for cf_item in $cf_list_models
17106 do
17107
17108         case $cf_item in
17109         libtool) cf_subdir='obj_lo'  ;;
17110         normal)  cf_subdir='objects' ;;
17111         debug)   cf_subdir='obj_g' ;;
17112         profile) cf_subdir='obj_p' ;;
17113         shared)
17114                 case $cf_cv_system_name in #(vi
17115                 cygwin) #(vi
17116                         cf_subdir='objects' ;;
17117                 *)
17118                         cf_subdir='obj_s' ;;
17119                 esac
17120         esac
17121
17122         for cf_item2 in $DIRS_TO_MAKE
17123         do
17124                 test $cf_item2 = $cf_subdir && break
17125         done
17126         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17127 done
17128 for cf_dir in $DIRS_TO_MAKE
17129 do
17130         test ! -d $cf_dir && mkdir $cf_dir
17131 done
17132
17133 cat >>confdefs.h <<EOF
17134 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17135 EOF
17136
17137 cat >>confdefs.h <<EOF
17138 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17139 EOF
17140
17141 ### Now that we're done running tests, add the compiler-warnings, if any
17142
17143 cf_fix_cppflags=no
17144 cf_new_cflags=
17145 cf_new_cppflags=
17146 cf_new_extra_cppflags=
17147
17148 for cf_add_cflags in $EXTRA_CFLAGS
17149 do
17150 case $cf_fix_cppflags in
17151 no)
17152         case $cf_add_cflags in #(vi
17153         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17154                 case $cf_add_cflags in
17155                 -D*)
17156                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17157
17158                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17159                         && test -z "${cf_tst_cflags}" \
17160                         && cf_fix_cppflags=yes
17161
17162                         if test $cf_fix_cppflags = yes ; then
17163                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17164                                 continue
17165                         elif test "${cf_tst_cflags}" = "\"'" ; then
17166                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17167                                 continue
17168                         fi
17169                         ;;
17170                 esac
17171                 case "$CPPFLAGS" in
17172                 *$cf_add_cflags) #(vi
17173                         ;;
17174                 *) #(vi
17175                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17176                         ;;
17177                 esac
17178                 ;;
17179         *)
17180                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17181                 ;;
17182         esac
17183         ;;
17184 yes)
17185         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17186
17187         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17188
17189         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17190         && test -z "${cf_tst_cflags}" \
17191         && cf_fix_cppflags=no
17192         ;;
17193 esac
17194 done
17195
17196 if test -n "$cf_new_cflags" ; then
17197
17198         CFLAGS="$CFLAGS $cf_new_cflags"
17199 fi
17200
17201 if test -n "$cf_new_cppflags" ; then
17202
17203         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17204 fi
17205
17206 if test -n "$cf_new_extra_cppflags" ; then
17207
17208         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17209 fi
17210
17211 ### If we're building with rpath, try to link non-standard libs that way too.
17212 if test "$DFT_LWR_MODEL" = "shared"; then
17213
17214 echo "$as_me:17214: checking for updated LDFLAGS" >&5
17215 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17216 if test -n "$LDFLAGS" ; then
17217 echo "$as_me:17217: result: maybe" >&5
17218 echo "${ECHO_T}maybe" >&6
17219 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17220
17221 echo "${as_me-configure}:17221: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17222
17223 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17224
17225 echo "${as_me-configure}:17225: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17226
17227 case "$EXTRA_LDFLAGS" in #(vi
17228 -Wl,-rpath,*) #(vi
17229         cf_rpath_hack="-Wl,-rpath,"
17230         ;;
17231 -R\ *)
17232         cf_rpath_hack="-R "
17233         ;;
17234 -R*)
17235         cf_rpath_hack="-R"
17236         ;;
17237 *)
17238         cf_rpath_hack=
17239         ;;
17240 esac
17241 if test -n "$cf_rpath_hack" ; then
17242         cf_rpath_dst=
17243         for cf_rpath_src in $LDFLAGS
17244         do
17245                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17246
17247 echo "${as_me-configure}:17247: testing Filtering $cf_rpath_src ..." 1>&5
17248
17249                 case $cf_rpath_src in #(vi
17250                 -L*) #(vi
17251                         if test "$cf_rpath_hack" = "-R " ; then
17252                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17253                         else
17254                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17255                         fi
17256                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17257
17258 echo "${as_me-configure}:17258: testing ...Filter $cf_rpath_tmp ..." 1>&5
17259
17260                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17261                         ;;
17262                 esac
17263                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17264         done
17265         LDFLAGS=$cf_rpath_dst
17266         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
17267
17268 echo "${as_me-configure}:17268: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
17269
17270         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17271
17272 echo "${as_me-configure}:17272: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17273
17274 fi
17275 else
17276 echo "$as_me:17276: result: no" >&5
17277 echo "${ECHO_T}no" >&6
17278 fi
17279
17280 fi
17281
17282 ### Define substitutions for header files to avoid name-pollution
17283
17284 if test "$cf_cv_have_tcgetattr" = yes ; then
17285         HAVE_TCGETATTR=1
17286 else
17287         HAVE_TCGETATTR=0
17288 fi
17289
17290 if test "$ac_cv_header_termio_h" = yes ; then
17291         HAVE_TERMIO_H=1
17292 else
17293         HAVE_TERMIO_H=0
17294 fi
17295
17296 if test "$ac_cv_header_termios_h" = yes ; then
17297         HAVE_TERMIOS_H=1
17298 else
17299         HAVE_TERMIOS_H=0
17300 fi
17301
17302 ################################################################################
17303 test "$use_database" = yes && \
17304 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
17305
17306 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
17307
17308 if test x"$enable_pc_files" = xyes ; then \
17309 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
17310 MAKE_PC_FILES=
17311 else
17312 MAKE_PC_FILES="#"
17313 fi
17314
17315 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h $SUB_MAKEFILES Makefile"
17316 ac_config_commands="$ac_config_commands default"
17317 cat >confcache <<\_ACEOF
17318 # This file is a shell script that caches the results of configure
17319 # tests run on this system so they can be shared between configure
17320 # scripts and configure runs, see configure's option --config-cache.
17321 # It is not useful on other systems.  If it contains results you don't
17322 # want to keep, you may remove or edit it.
17323 #
17324 # config.status only pays attention to the cache file if you give it
17325 # the --recheck option to rerun configure.
17326 #
17327 # `ac_cv_env_foo' variables (set or unset) will be overriden when
17328 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17329 # following values.
17330
17331 _ACEOF
17332
17333 # The following way of writing the cache mishandles newlines in values,
17334 # but we know of no workaround that is simple, portable, and efficient.
17335 # So, don't put newlines in cache variables' values.
17336 # Ultrix sh set writes to stderr and can't be redirected directly,
17337 # and sets the high bit in the cache file unless we assign to the vars.
17338 {
17339   (set) 2>&1 |
17340     case `(ac_space=' '; set | grep ac_space) 2>&1` in
17341     *ac_space=\ *)
17342       # `set' does not quote correctly, so add quotes (double-quote
17343       # substitution turns \\\\ into \\, and sed turns \\ into \).
17344       sed -n \
17345         "s/'/'\\\\''/g;
17346           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17347       ;;
17348     *)
17349       # `set' quotes correctly as required by POSIX, so do not add quotes.
17350       sed -n \
17351         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
17352       ;;
17353     esac;
17354 } |
17355   sed '
17356      t clear
17357      : clear
17358      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17359      t end
17360      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17361      : end' >>confcache
17362 if cmp -s $cache_file confcache; then :; else
17363   if test -w $cache_file; then
17364     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
17365     cat confcache >$cache_file
17366   else
17367     echo "not updating unwritable cache $cache_file"
17368   fi
17369 fi
17370 rm -f confcache
17371
17372 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17373 # Let make expand exec_prefix.
17374 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17375
17376 # VPATH may cause trouble with some makes, so we remove $(srcdir),
17377 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
17378 # trailing colons and then remove the whole line if VPATH becomes empty
17379 # (actually we leave an empty line to preserve line numbers).
17380 if test "x$srcdir" = x.; then
17381   ac_vpsub='/^[         ]*VPATH[        ]*=/{
17382 s/:*\$(srcdir):*/:/;
17383 s/:*\${srcdir}:*/:/;
17384 s/:*@srcdir@:*/:/;
17385 s/^\([^=]*=[    ]*\):*/\1/;
17386 s/:*$//;
17387 s/^[^=]*=[      ]*$//;
17388 }'
17389 fi
17390
17391 DEFS=-DHAVE_CONFIG_H
17392
17393 : ${CONFIG_STATUS=./config.status}
17394 ac_clean_files_save=$ac_clean_files
17395 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17396 { echo "$as_me:17396: creating $CONFIG_STATUS" >&5
17397 echo "$as_me: creating $CONFIG_STATUS" >&6;}
17398 cat >$CONFIG_STATUS <<_ACEOF
17399 #! $SHELL
17400 # Generated automatically by configure.
17401 # Run this file to recreate the current configuration.
17402 # Compiler output produced by configure, useful for debugging
17403 # configure, is in config.log if it exists.
17404
17405 debug=false
17406 SHELL=\${CONFIG_SHELL-$SHELL}
17407 ac_cs_invocation="\$0 \$@"
17408
17409 _ACEOF
17410
17411 cat >>$CONFIG_STATUS <<\_ACEOF
17412 # Be Bourne compatible
17413 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
17414   emulate sh
17415   NULLCMD=:
17416 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
17417   set -o posix
17418 fi
17419
17420 # Name of the executable.
17421 as_me=`echo "$0" |sed 's,.*[\\/],,'`
17422
17423 if expr a : '\(a\)' >/dev/null 2>&1; then
17424   as_expr=expr
17425 else
17426   as_expr=false
17427 fi
17428
17429 rm -f conf$$ conf$$.exe conf$$.file
17430 echo >conf$$.file
17431 if ln -s conf$$.file conf$$ 2>/dev/null; then
17432   # We could just check for DJGPP; but this test a) works b) is more generic
17433   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
17434   if test -f conf$$.exe; then
17435     # Don't use ln at all; we don't have any links
17436     as_ln_s='cp -p'
17437   else
17438     as_ln_s='ln -s'
17439   fi
17440 elif ln conf$$.file conf$$ 2>/dev/null; then
17441   as_ln_s=ln
17442 else
17443   as_ln_s='cp -p'
17444 fi
17445 rm -f conf$$ conf$$.exe conf$$.file
17446
17447 as_executable_p="test -f"
17448
17449 # Support unset when possible.
17450 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
17451   as_unset=unset
17452 else
17453   as_unset=false
17454 fi
17455
17456 # NLS nuisances.
17457 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
17458 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
17459 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
17460 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
17461 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
17462 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
17463 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
17464 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
17465
17466 # IFS
17467 # We need space, tab and new line, in precisely that order.
17468 as_nl='
17469 '
17470 IFS="   $as_nl"
17471
17472 # CDPATH.
17473 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
17474
17475 exec 6>&1
17476
17477 _ACEOF
17478
17479 # Files that config.status was made for.
17480 if test -n "$ac_config_files"; then
17481   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
17482 fi
17483
17484 if test -n "$ac_config_headers"; then
17485   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
17486 fi
17487
17488 if test -n "$ac_config_links"; then
17489   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
17490 fi
17491
17492 if test -n "$ac_config_commands"; then
17493   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
17494 fi
17495
17496 cat >>$CONFIG_STATUS <<\EOF
17497
17498 ac_cs_usage="\
17499 \`$as_me' instantiates files from templates according to the
17500 current configuration.
17501
17502 Usage: $0 [OPTIONS] [FILE]...
17503
17504   -h, --help       print this help, then exit
17505   -V, --version    print version number, then exit
17506   -d, --debug      don't remove temporary files
17507       --recheck    update $as_me by reconfiguring in the same conditions
17508   --file=FILE[:TEMPLATE]
17509                    instantiate the configuration file FILE
17510   --header=FILE[:TEMPLATE]
17511                    instantiate the configuration header FILE
17512
17513 Configuration files:
17514 $config_files
17515
17516 Configuration headers:
17517 $config_headers
17518
17519 Configuration commands:
17520 $config_commands
17521
17522 Report bugs to <bug-autoconf@gnu.org>."
17523 EOF
17524
17525 cat >>$CONFIG_STATUS <<EOF
17526 ac_cs_version="\\
17527 config.status
17528 configured by $0, generated by GNU Autoconf 2.52.20081225,
17529   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
17530
17531 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
17532 Free Software Foundation, Inc.
17533 This config.status script is free software; the Free Software Foundation
17534 gives unlimited permission to copy, distribute and modify it."
17535 srcdir=$srcdir
17536 INSTALL="$INSTALL"
17537 EOF
17538
17539 cat >>$CONFIG_STATUS <<\EOF
17540 # If no file are specified by the user, then we need to provide default
17541 # value.  By we need to know if files were specified by the user.
17542 ac_need_defaults=:
17543 while test $# != 0
17544 do
17545   case $1 in
17546   --*=*)
17547     ac_option=`expr "x$1" : 'x\([^=]*\)='`
17548     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
17549     shift
17550     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
17551     shift
17552     ;;
17553   -*);;
17554   *) # This is not an option, so the user has probably given explicit
17555      # arguments.
17556      ac_need_defaults=false;;
17557   esac
17558
17559   case $1 in
17560   # Handling of the options.
17561 EOF
17562 cat >>$CONFIG_STATUS <<EOF
17563   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
17564     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
17565     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
17566 EOF
17567 cat >>$CONFIG_STATUS <<\EOF
17568   --version | --vers* | -V )
17569     echo "$ac_cs_version"; exit 0 ;;
17570   --he | --h)
17571     # Conflict between --help and --header
17572     { { echo "$as_me:17572: error: ambiguous option: $1
17573 Try \`$0 --help' for more information." >&5
17574 echo "$as_me: error: ambiguous option: $1
17575 Try \`$0 --help' for more information." >&2;}
17576    { (exit 1); exit 1; }; };;
17577   --help | --hel | -h )
17578     echo "$ac_cs_usage"; exit 0 ;;
17579   --debug | --d* | -d )
17580     debug=: ;;
17581   --file | --fil | --fi | --f )
17582     shift
17583     CONFIG_FILES="$CONFIG_FILES $1"
17584     ac_need_defaults=false;;
17585   --header | --heade | --head | --hea )
17586     shift
17587     CONFIG_HEADERS="$CONFIG_HEADERS $1"
17588     ac_need_defaults=false;;
17589
17590   # This is an error.
17591   -*) { { echo "$as_me:17591: error: unrecognized option: $1
17592 Try \`$0 --help' for more information." >&5
17593 echo "$as_me: error: unrecognized option: $1
17594 Try \`$0 --help' for more information." >&2;}
17595    { (exit 1); exit 1; }; } ;;
17596
17597   *) ac_config_targets="$ac_config_targets $1" ;;
17598
17599   esac
17600   shift
17601 done
17602
17603 exec 5>>config.log
17604 cat >&5 << _ACEOF
17605
17606 ## ----------------------- ##
17607 ## Running config.status.  ##
17608 ## ----------------------- ##
17609
17610 This file was extended by $as_me 2.52.20081225, executed with
17611   CONFIG_FILES    = $CONFIG_FILES
17612   CONFIG_HEADERS  = $CONFIG_HEADERS
17613   CONFIG_LINKS    = $CONFIG_LINKS
17614   CONFIG_COMMANDS = $CONFIG_COMMANDS
17615   > $ac_cs_invocation
17616 on `(hostname || uname -n) 2>/dev/null | sed 1q`
17617
17618 _ACEOF
17619 EOF
17620
17621 cat >>$CONFIG_STATUS <<EOF
17622 #
17623 # INIT-COMMANDS section.
17624 #
17625
17626 ### Special initialization commands, used to pass information from the
17627 ### configuration-run into config.status
17628
17629 AWK="$AWK"
17630 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
17631 DFT_LWR_MODEL="$DFT_LWR_MODEL"
17632 ECHO_LINK="$ECHO_LINK"
17633 LDCONFIG="$LDCONFIG"
17634 LIB_NAME="$LIB_NAME"
17635 LIB_SUBSETS="$LIB_SUBSETS"
17636 LIB_SUFFIX="$LIB_SUFFIX"
17637 LIB_TRACING="$LIB_TRACING"
17638 MAKE_TERMINFO="$MAKE_TERMINFO"
17639 NCURSES_MAJOR="$NCURSES_MAJOR"
17640 NCURSES_MINOR="$NCURSES_MINOR"
17641 NCURSES_OSPEED="$NCURSES_OSPEED"
17642 NCURSES_PATCH="$NCURSES_PATCH"
17643 SRC_SUBDIRS="$SRC_SUBDIRS"
17644 TERMINFO="$TERMINFO"
17645 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
17646 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
17647 TICS_NAME="$TICS_NAME"
17648 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
17649 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
17650 TINFO_NAME="$TINFO_NAME"
17651 TINFO_SUFFIX="$TINFO_SUFFIX"
17652 WITH_CURSES_H="$with_curses_h"
17653 WITH_ECHO="$with_echo"
17654 WITH_OVERWRITE="$with_overwrite"
17655 cf_LIST_MODELS="$cf_list_models"
17656 cf_cv_abi_version="$cf_cv_abi_version"
17657 cf_cv_do_relink="$cf_cv_do_relink"
17658 cf_cv_do_symlinks="$cf_cv_do_symlinks"
17659 cf_cv_enable_lp64="$cf_cv_enable_lp64"
17660 cf_cv_enable_opaque="$cf_cv_enable_opaque"
17661 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
17662 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
17663 cf_cv_rel_version="$cf_cv_rel_version"
17664 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
17665 cf_cv_shared_soname='$cf_cv_shared_soname'
17666 cf_cv_shlib_version="$cf_cv_shlib_version"
17667 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
17668 cf_cv_system_name="$cf_cv_system_name"
17669 cf_with_cxx_binding="$cf_with_cxx_binding"
17670 cf_with_manpages="$cf_with_manpages"
17671 host="$host"
17672 target="$target"
17673
17674 EOF
17675
17676 cat >>$CONFIG_STATUS <<\EOF
17677 for ac_config_target in $ac_config_targets
17678 do
17679   case "$ac_config_target" in
17680   # Handling of arguments.
17681   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
17682   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
17683   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
17684   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
17685   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
17686   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
17687   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
17688   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
17689   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
17690   *) { { echo "$as_me:17690: error: invalid argument: $ac_config_target" >&5
17691 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
17692    { (exit 1); exit 1; }; };;
17693   esac
17694 done
17695
17696 # If the user did not use the arguments to specify the items to instantiate,
17697 # then the envvar interface is used.  Set only those that are not.
17698 # We use the long form for the default assignment because of an extremely
17699 # bizarre bug on SunOS 4.1.3.
17700 if $ac_need_defaults; then
17701   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
17702   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
17703   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
17704 fi
17705
17706 # Create a temporary directory, and hook for its removal unless debugging.
17707 $debug ||
17708 {
17709   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
17710   trap '{ (exit 1); exit 1; }' 1 2 13 15
17711 }
17712
17713 # Create a (secure) tmp directory for tmp files.
17714 : ${TMPDIR=/tmp}
17715 {
17716   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
17717   test -n "$tmp" && test -d "$tmp"
17718 }  ||
17719 {
17720   tmp=$TMPDIR/cs$$-$RANDOM
17721   (umask 077 && mkdir $tmp)
17722 } ||
17723 {
17724    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
17725    { (exit 1); exit 1; }
17726 }
17727
17728 EOF
17729
17730 cat >>$CONFIG_STATUS <<EOF
17731
17732 #
17733 # CONFIG_FILES section.
17734 #
17735
17736 # No need to generate the scripts if there are no CONFIG_FILES.
17737 # This happens for instance when ./config.status config.h
17738 if test -n "\$CONFIG_FILES"; then
17739   # Protect against being on the right side of a sed subst in config.status.
17740   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
17741    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
17742 s,@SHELL@,$SHELL,;t t
17743 s,@exec_prefix@,$exec_prefix,;t t
17744 s,@prefix@,$prefix,;t t
17745 s,@program_transform_name@,$program_transform_name,;t t
17746 s,@bindir@,$bindir,;t t
17747 s,@sbindir@,$sbindir,;t t
17748 s,@libexecdir@,$libexecdir,;t t
17749 s,@datadir@,$datadir,;t t
17750 s,@sysconfdir@,$sysconfdir,;t t
17751 s,@sharedstatedir@,$sharedstatedir,;t t
17752 s,@localstatedir@,$localstatedir,;t t
17753 s,@libdir@,$libdir,;t t
17754 s,@includedir@,$includedir,;t t
17755 s,@oldincludedir@,$oldincludedir,;t t
17756 s,@infodir@,$infodir,;t t
17757 s,@mandir@,$mandir,;t t
17758 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
17759 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
17760 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
17761 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
17762 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
17763 s,@build_alias@,$build_alias,;t t
17764 s,@host_alias@,$host_alias,;t t
17765 s,@target_alias@,$target_alias,;t t
17766 s,@ECHO_C@,$ECHO_C,;t t
17767 s,@ECHO_N@,$ECHO_N,;t t
17768 s,@ECHO_T@,$ECHO_T,;t t
17769 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
17770 s,@DEFS@,$DEFS,;t t
17771 s,@LIBS@,$LIBS,;t t
17772 s,@top_builddir@,$top_builddir,;t t
17773 s,@EGREP@,$EGREP,;t t
17774 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
17775 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
17776 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
17777 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
17778 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
17779 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
17780 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
17781 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
17782 s,@build@,$build,;t t
17783 s,@build_cpu@,$build_cpu,;t t
17784 s,@build_vendor@,$build_vendor,;t t
17785 s,@build_os@,$build_os,;t t
17786 s,@host@,$host,;t t
17787 s,@host_cpu@,$host_cpu,;t t
17788 s,@host_vendor@,$host_vendor,;t t
17789 s,@host_os@,$host_os,;t t
17790 s,@target@,$target,;t t
17791 s,@target_cpu@,$target_cpu,;t t
17792 s,@target_vendor@,$target_vendor,;t t
17793 s,@target_os@,$target_os,;t t
17794 s,@CC@,$CC,;t t
17795 s,@CFLAGS@,$CFLAGS,;t t
17796 s,@LDFLAGS@,$LDFLAGS,;t t
17797 s,@CPPFLAGS@,$CPPFLAGS,;t t
17798 s,@ac_ct_CC@,$ac_ct_CC,;t t
17799 s,@EXEEXT@,$EXEEXT,;t t
17800 s,@OBJEXT@,$OBJEXT,;t t
17801 s,@CPP@,$CPP,;t t
17802 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
17803 s,@PROG_EXT@,$PROG_EXT,;t t
17804 s,@LDCONFIG@,$LDCONFIG,;t t
17805 s,@CXX@,$CXX,;t t
17806 s,@CXXFLAGS@,$CXXFLAGS,;t t
17807 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
17808 s,@AWK@,$AWK,;t t
17809 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
17810 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
17811 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
17812 s,@LINT@,$LINT,;t t
17813 s,@LINT_OPTS@,$LINT_OPTS,;t t
17814 s,@LN_S@,$LN_S,;t t
17815 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
17816 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
17817 s,@SET_MAKE@,$SET_MAKE,;t t
17818 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
17819 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
17820 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
17821 s,@RANLIB@,$RANLIB,;t t
17822 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
17823 s,@LD@,$LD,;t t
17824 s,@ac_ct_LD@,$ac_ct_LD,;t t
17825 s,@AR@,$AR,;t t
17826 s,@ac_ct_AR@,$ac_ct_AR,;t t
17827 s,@ARFLAGS@,$ARFLAGS,;t t
17828 s,@DESTDIR@,$DESTDIR,;t t
17829 s,@BUILD_CC@,$BUILD_CC,;t t
17830 s,@BUILD_CPP@,$BUILD_CPP,;t t
17831 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
17832 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
17833 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
17834 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
17835 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
17836 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
17837 s,@cf_list_models@,$cf_list_models,;t t
17838 s,@LIBTOOL@,$LIBTOOL,;t t
17839 s,@LT_UNDEF@,$LT_UNDEF,;t t
17840 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
17841 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
17842 s,@LIB_CREATE@,$LIB_CREATE,;t t
17843 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
17844 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
17845 s,@LIB_PREP@,$LIB_PREP,;t t
17846 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
17847 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
17848 s,@LIB_LINK@,$LIB_LINK,;t t
17849 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
17850 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
17851 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
17852 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
17853 s,@TICS_NAME@,$TICS_NAME,;t t
17854 s,@TINFO_NAME@,$TINFO_NAME,;t t
17855 s,@LIB_NAME@,$LIB_NAME,;t t
17856 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
17857 s,@CC_G_OPT@,$CC_G_OPT,;t t
17858 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
17859 s,@LD_MODEL@,$LD_MODEL,;t t
17860 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
17861 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
17862 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
17863 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
17864 s,@LINK_PROGS@,$LINK_PROGS,;t t
17865 s,@LINK_TESTS@,$LINK_TESTS,;t t
17866 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
17867 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
17868 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
17869 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
17870 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
17871 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
17872 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
17873 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
17874 s,@TERMINFO@,$TERMINFO,;t t
17875 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
17876 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
17877 s,@TERMPATH@,$TERMPATH,;t t
17878 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
17879 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
17880 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
17881 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
17882 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
17883 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
17884 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
17885 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
17886 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
17887 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
17888 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
17889 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
17890 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
17891 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
17892 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
17893 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
17894 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
17895 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
17896 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
17897 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
17898 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
17899 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
17900 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
17901 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
17902 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
17903 s,@PTHREAD@,$PTHREAD,;t t
17904 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
17905 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
17906 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
17907 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
17908 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
17909 s,@ECHO_LINK@,$ECHO_LINK,;t t
17910 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
17911 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
17912 s,@ADA_TRACE@,$ADA_TRACE,;t t
17913 s,@MATH_LIB@,$MATH_LIB,;t t
17914 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
17915 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
17916 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
17917 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
17918 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
17919 s,@TEST_LIBS@,$TEST_LIBS,;t t
17920 s,@CXXCPP@,$CXXCPP,;t t
17921 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
17922 s,@CXX_AR@,$CXX_AR,;t t
17923 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
17924 s,@CXXLIBS@,$CXXLIBS,;t t
17925 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
17926 s,@gnat_exists@,$gnat_exists,;t t
17927 s,@M4_exists@,$M4_exists,;t t
17928 s,@cf_ada_make@,$cf_ada_make,;t t
17929 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
17930 s,@cf_ada_package@,$cf_ada_package,;t t
17931 s,@ADAFLAGS@,$ADAFLAGS,;t t
17932 s,@cf_compile_generics@,$cf_compile_generics,;t t
17933 s,@cf_generic_objects@,$cf_generic_objects,;t t
17934 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
17935 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
17936 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
17937 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
17938 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
17939 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
17940 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
17941 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
17942 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
17943 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
17944 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
17945 s,@TICS_ARGS@,$TICS_ARGS,;t t
17946 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
17947 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
17948 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
17949 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
17950 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
17951 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
17952 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
17953 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
17954 s,@TICS_LIST@,$TICS_LIST,;t t
17955 s,@TINFO_LIST@,$TINFO_LIST,;t t
17956 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
17957 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
17958 s,@TEST_ARGS@,$TEST_ARGS,;t t
17959 s,@TEST_DEPS@,$TEST_DEPS,;t t
17960 s,@TEST_ARG2@,$TEST_ARG2,;t t
17961 s,@TEST_DEP2@,$TEST_DEP2,;t t
17962 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
17963 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
17964 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
17965 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
17966 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
17967 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
17968 CEOF
17969
17970 EOF
17971
17972   cat >>$CONFIG_STATUS <<\EOF
17973   # Split the substitutions into bite-sized pieces for seds with
17974   # small command number limits, like on Digital OSF/1 and HP-UX.
17975   ac_max_sed_lines=48
17976   ac_sed_frag=1 # Number of current file.
17977   ac_beg=1 # First line for current file.
17978   ac_end=$ac_max_sed_lines # Line after last line for current file.
17979   ac_more_lines=:
17980   ac_sed_cmds=
17981   while $ac_more_lines; do
17982     if test $ac_beg -gt 1; then
17983       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17984     else
17985       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
17986     fi
17987     if test ! -s $tmp/subs.frag; then
17988       ac_more_lines=false
17989     else
17990       # The purpose of the label and of the branching condition is to
17991       # speed up the sed processing (if there are no `@' at all, there
17992       # is no need to browse any of the substitutions).
17993       # These are the two extra sed commands mentioned above.
17994       (echo ':t
17995   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
17996       if test -z "$ac_sed_cmds"; then
17997         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
17998       else
17999         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18000       fi
18001       ac_sed_frag=`expr $ac_sed_frag + 1`
18002       ac_beg=$ac_end
18003       ac_end=`expr $ac_end + $ac_max_sed_lines`
18004     fi
18005   done
18006   if test -z "$ac_sed_cmds"; then
18007     ac_sed_cmds=cat
18008   fi
18009 fi # test -n "$CONFIG_FILES"
18010
18011 EOF
18012 cat >>$CONFIG_STATUS <<\EOF
18013 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18014   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18015   case $ac_file in
18016   - | *:- | *:-:* ) # input from stdin
18017         cat >$tmp/stdin
18018         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18019         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18020   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18021         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18022   * )   ac_file_in=$ac_file.in ;;
18023   esac
18024
18025   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18026   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18027          X"$ac_file" : 'X\(//\)[^/]' \| \
18028          X"$ac_file" : 'X\(//\)$' \| \
18029          X"$ac_file" : 'X\(/\)' \| \
18030          .     : '\(.\)' 2>/dev/null ||
18031 echo X"$ac_file" |
18032     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18033           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18034           /^X\(\/\/\)$/{ s//\1/; q; }
18035           /^X\(\/\).*/{ s//\1/; q; }
18036           s/.*/./; q'`
18037   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18038     { case "$ac_dir" in
18039   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18040   *)                      as_incr_dir=.;;
18041 esac
18042 as_dummy="$ac_dir"
18043 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18044   case $as_mkdir_dir in
18045     # Skip DOS drivespec
18046     ?:) as_incr_dir=$as_mkdir_dir ;;
18047     *)
18048       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18049       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18050     ;;
18051   esac
18052 done; }
18053
18054     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18055     # A "../" for each directory in $ac_dir_suffix.
18056     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18057   else
18058     ac_dir_suffix= ac_dots=
18059   fi
18060
18061   case $srcdir in
18062   .)  ac_srcdir=.
18063       if test -z "$ac_dots"; then
18064          ac_top_srcdir=.
18065       else
18066          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18067       fi ;;
18068   [\\/]* | ?:[\\/]* )
18069       ac_srcdir=$srcdir$ac_dir_suffix;
18070       ac_top_srcdir=$srcdir ;;
18071   *) # Relative path.
18072     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18073     ac_top_srcdir=$ac_dots$srcdir ;;
18074   esac
18075
18076   case $INSTALL in
18077   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18078   *) ac_INSTALL=$ac_dots$INSTALL ;;
18079   esac
18080
18081   if test x"$ac_file" != x-; then
18082     { echo "$as_me:18082: creating $ac_file" >&5
18083 echo "$as_me: creating $ac_file" >&6;}
18084     rm -f "$ac_file"
18085   fi
18086   # Let's still pretend it is `configure' which instantiates (i.e., don't
18087   # use $as_me), people would be surprised to read:
18088   #    /* config.h.  Generated automatically by config.status.  */
18089   configure_input="Generated automatically from `echo $ac_file_in |
18090                                                  sed 's,.*/,,'` by configure."
18091
18092   # First look for the input files in the build tree, otherwise in the
18093   # src tree.
18094   ac_file_inputs=`IFS=:
18095     for f in $ac_file_in; do
18096       case $f in
18097       -) echo $tmp/stdin ;;
18098       [\\/$]*)
18099          # Absolute (can't be DOS-style, as IFS=:)
18100          test -f "$f" || { { echo "$as_me:18100: error: cannot find input file: $f" >&5
18101 echo "$as_me: error: cannot find input file: $f" >&2;}
18102    { (exit 1); exit 1; }; }
18103          echo $f;;
18104       *) # Relative
18105          if test -f "$f"; then
18106            # Build tree
18107            echo $f
18108          elif test -f "$srcdir/$f"; then
18109            # Source tree
18110            echo $srcdir/$f
18111          else
18112            # /dev/null tree
18113            { { echo "$as_me:18113: error: cannot find input file: $f" >&5
18114 echo "$as_me: error: cannot find input file: $f" >&2;}
18115    { (exit 1); exit 1; }; }
18116          fi;;
18117       esac
18118     done` || { (exit 1); exit 1; }
18119 EOF
18120 cat >>$CONFIG_STATUS <<EOF
18121   sed "$ac_vpsub
18122 $extrasub
18123 EOF
18124 cat >>$CONFIG_STATUS <<\EOF
18125 :t
18126 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18127 s,@configure_input@,$configure_input,;t t
18128 s,@srcdir@,$ac_srcdir,;t t
18129 s,@top_srcdir@,$ac_top_srcdir,;t t
18130 s,@INSTALL@,$ac_INSTALL,;t t
18131 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18132   rm -f $tmp/stdin
18133   if test x"$ac_file" != x-; then
18134     mv $tmp/out $ac_file
18135   else
18136     cat $tmp/out
18137     rm -f $tmp/out
18138   fi
18139
18140 done
18141 EOF
18142 cat >>$CONFIG_STATUS <<\EOF
18143
18144 #
18145 # CONFIG_HEADER section.
18146 #
18147
18148 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18149 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18150 #
18151 # ac_d sets the value in "#define NAME VALUE" lines.
18152 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18153 ac_dB='[        ].*$,\1#\2'
18154 ac_dC=' '
18155 ac_dD=',;t'
18156 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18157 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18158 ac_iB='\([      ]\),\1#\2define\3'
18159 ac_iC=' '
18160 ac_iD='\4,;t'
18161 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18162 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18163 ac_uB='$,\1#\2define\3'
18164 ac_uC=' '
18165 ac_uD=',;t'
18166
18167 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18168   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18169   case $ac_file in
18170   - | *:- | *:-:* ) # input from stdin
18171         cat >$tmp/stdin
18172         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18173         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18174   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18175         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18176   * )   ac_file_in=$ac_file.in ;;
18177   esac
18178
18179   test x"$ac_file" != x- && { echo "$as_me:18179: creating $ac_file" >&5
18180 echo "$as_me: creating $ac_file" >&6;}
18181
18182   # First look for the input files in the build tree, otherwise in the
18183   # src tree.
18184   ac_file_inputs=`IFS=:
18185     for f in $ac_file_in; do
18186       case $f in
18187       -) echo $tmp/stdin ;;
18188       [\\/$]*)
18189          # Absolute (can't be DOS-style, as IFS=:)
18190          test -f "$f" || { { echo "$as_me:18190: error: cannot find input file: $f" >&5
18191 echo "$as_me: error: cannot find input file: $f" >&2;}
18192    { (exit 1); exit 1; }; }
18193          echo $f;;
18194       *) # Relative
18195          if test -f "$f"; then
18196            # Build tree
18197            echo $f
18198          elif test -f "$srcdir/$f"; then
18199            # Source tree
18200            echo $srcdir/$f
18201          else
18202            # /dev/null tree
18203            { { echo "$as_me:18203: error: cannot find input file: $f" >&5
18204 echo "$as_me: error: cannot find input file: $f" >&2;}
18205    { (exit 1); exit 1; }; }
18206          fi;;
18207       esac
18208     done` || { (exit 1); exit 1; }
18209   # Remove the trailing spaces.
18210   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18211
18212 EOF
18213
18214 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18215 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18216 # be either 'cat' or 'sort'.
18217 cat confdefs.h | uniq >conftest.vals
18218
18219 # Break up conftest.vals because some shells have a limit on
18220 # the size of here documents, and old seds have small limits too.
18221
18222 rm -f conftest.tail
18223 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18224 while grep . conftest.vals >/dev/null
18225 do
18226   # Write chunks of a limited-size here document to conftest.frag.
18227   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18228   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18229   echo 'CEOF' >> $CONFIG_STATUS
18230   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18231   rm -f conftest.vals
18232   mv conftest.tail conftest.vals
18233 done
18234 rm -f conftest.vals
18235
18236 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18237 # marker @DEFS@.
18238 echo '  cat >> conftest.edit <<CEOF
18239 /@DEFS@/r conftest.frag
18240 /@DEFS@/d
18241 CEOF
18242 sed -f conftest.edit $tmp/in > $tmp/out
18243 rm -f $tmp/in
18244 mv $tmp/out $tmp/in
18245 rm -f conftest.edit conftest.frag
18246 ' >> $CONFIG_STATUS
18247
18248 cat >>$CONFIG_STATUS <<\EOF
18249   # Let's still pretend it is `configure' which instantiates (i.e., don't
18250   # use $as_me), people would be surprised to read:
18251   #    /* config.h.  Generated automatically by config.status.  */
18252   if test x"$ac_file" = x-; then
18253     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18254   else
18255     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18256   fi
18257   cat $tmp/in >>$tmp/config.h
18258   rm -f $tmp/in
18259   if test x"$ac_file" != x-; then
18260     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18261       { echo "$as_me:18261: $ac_file is unchanged" >&5
18262 echo "$as_me: $ac_file is unchanged" >&6;}
18263     else
18264       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18265          X"$ac_file" : 'X\(//\)[^/]' \| \
18266          X"$ac_file" : 'X\(//\)$' \| \
18267          X"$ac_file" : 'X\(/\)' \| \
18268          .     : '\(.\)' 2>/dev/null ||
18269 echo X"$ac_file" |
18270     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18271           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18272           /^X\(\/\/\)$/{ s//\1/; q; }
18273           /^X\(\/\).*/{ s//\1/; q; }
18274           s/.*/./; q'`
18275       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18276         { case "$ac_dir" in
18277   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18278   *)                      as_incr_dir=.;;
18279 esac
18280 as_dummy="$ac_dir"
18281 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18282   case $as_mkdir_dir in
18283     # Skip DOS drivespec
18284     ?:) as_incr_dir=$as_mkdir_dir ;;
18285     *)
18286       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18287       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18288     ;;
18289   esac
18290 done; }
18291
18292       fi
18293       rm -f $ac_file
18294       mv $tmp/config.h $ac_file
18295     fi
18296   else
18297     cat $tmp/config.h
18298     rm -f $tmp/config.h
18299   fi
18300 done
18301 EOF
18302 cat >>$CONFIG_STATUS <<\EOF
18303
18304 #
18305 # CONFIG_COMMANDS section.
18306 #
18307 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
18308   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
18309   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
18310
18311   case $ac_dest in
18312     default )
18313
18314 for cf_dir in test
18315 do
18316         if test ! -d $srcdir/$cf_dir; then
18317                 continue
18318         elif test -f $srcdir/$cf_dir/programs; then
18319                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
18320         fi
18321 done
18322
18323         case $cf_cv_system_name in #(vi
18324         OS/2*|os2*) #(vi
18325         LIB_PREFIX=''
18326         ;;
18327         *)      LIB_PREFIX='lib'
18328         ;;
18329         esac
18330 cf_prefix=$LIB_PREFIX
18331
18332 if test $cf_cv_shlib_version = cygdll ; then
18333         TINFO_NAME=$TINFO_ARG_SUFFIX
18334         TINFO_SUFFIX=.dll
18335 fi
18336
18337 for cf_dir in $SRC_SUBDIRS
18338 do
18339         if test ! -d $srcdir/$cf_dir ; then
18340                 continue
18341         elif test -f $srcdir/$cf_dir/modules; then
18342
18343                 SHARED_LIB=
18344                 LIBS_TO_MAKE=
18345                 for cf_item in $cf_LIST_MODELS
18346                 do
18347
18348         case $cf_item in #(vi
18349         libtool) #(vi
18350                 cf_suffix='.la'
18351                 cf_depsuf=$cf_suffix
18352                 ;;
18353         normal) #(vi
18354                 cf_suffix='.a'
18355                 cf_depsuf=$cf_suffix
18356                 ;;
18357         debug) #(vi
18358                 cf_suffix='_g.a'
18359                 cf_depsuf=$cf_suffix
18360                 ;;
18361         profile) #(vi
18362                 cf_suffix='_p.a'
18363                 cf_depsuf=$cf_suffix
18364                 ;;
18365         shared) #(vi
18366                 case $cf_cv_system_name in
18367                 aix[56]*) #(vi
18368                         cf_suffix='.a'
18369                         cf_depsuf=$cf_suffix
18370                         ;;
18371                 cygwin*) #(vi
18372                         cf_suffix='.dll'
18373                         cf_depsuf='.dll.a'
18374                         ;;
18375                 darwin*) #(vi
18376                         cf_suffix='.dylib'
18377                         cf_depsuf=$cf_suffix
18378                         ;;
18379                 hpux*) #(vi
18380                         case $target in
18381                         ia64*) #(vi
18382                                 cf_suffix='.so'
18383                                 cf_depsuf=$cf_suffix
18384                                 ;;
18385                         *) #(vi
18386                                 cf_suffix='.sl'
18387                                 cf_depsuf=$cf_suffix
18388                                 ;;
18389                         esac
18390                         ;;
18391                 *)      cf_suffix='.so'
18392                         cf_depsuf=$cf_suffix
18393                         ;;
18394                 esac
18395         esac
18396         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18397         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18398
18399                         if test $cf_item = shared ; then
18400                         if test "$cf_cv_do_symlinks" = yes ; then
18401                                 case "$cf_cv_shlib_version" in #(vi
18402                                 rel) #(vi
18403                                         case "$cf_cv_system_name" in #(vi
18404                                         darwin*)
18405                                         case .${LIB_SUFFIX} in
18406                                         .w*)
18407                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18408                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
18409                                                 ;;
18410                                         *)
18411                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
18412                                                 ;;
18413                                         esac
18414                                         ;; #(vi
18415                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
18416                                         esac
18417                                         ;;
18418                                 abi)
18419                                         case "$cf_cv_system_name" in #(vi
18420                                         darwin*)
18421                                         case .${LIB_SUFFIX} in
18422                                         .w*)
18423                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18424                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
18425                                                 ;;
18426                                         *)
18427                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
18428                                                 ;;
18429                                         esac
18430                                         ;; #(vi
18431                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
18432                                         esac
18433                                         ;;
18434                                 esac
18435                         fi
18436                         # cygwin needs import library, and has unique naming convention
18437                         # use autodetected ${cf_prefix} for import lib and static lib, but
18438                         # use 'cyg' prefix for shared lib.
18439                         if test $cf_cv_shlib_version = cygdll ; then
18440                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
18441                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
18442                                 continue
18443                         fi
18444                         fi
18445                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
18446                 done
18447
18448                 if test $cf_dir = ncurses ; then
18449                         cf_subsets="$LIB_SUBSETS"
18450                         cf_r_parts="$cf_subsets"
18451                         cf_liblist="$LIBS_TO_MAKE"
18452
18453                         while test -n "$cf_r_parts"
18454                         do
18455                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
18456                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
18457                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
18458                                         cf_item=
18459                                         case $cf_l_parts in #(vi
18460                                         *termlib*) #(vi
18461                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
18462                                                 ;;
18463                                         *ticlib*)
18464                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
18465                                                 ;;
18466                                         *)
18467                                                 break
18468                                                 ;;
18469                                         esac
18470                                         if test -n "$cf_item"; then
18471                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
18472                                         fi
18473                                 else
18474                                         break
18475                                 fi
18476                         done
18477                 else
18478                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
18479                 fi
18480
18481                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
18482                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
18483                         $cf_dir/Makefile >$cf_dir/Makefile.out
18484                 mv $cf_dir/Makefile.out $cf_dir/Makefile
18485
18486                 $AWK -f $srcdir/mk-0th.awk \
18487                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
18488                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18489
18490                 for cf_subset in $cf_subsets
18491                 do
18492                         cf_subdirs=
18493                         for cf_item in $cf_LIST_MODELS
18494                         do
18495                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
18496
18497 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18498
18499         case $cf_item in #(vi
18500         libtool) #(vi
18501                 cf_suffix='.la'
18502                 cf_depsuf=$cf_suffix
18503                 ;;
18504         normal) #(vi
18505                 cf_suffix='.a'
18506                 cf_depsuf=$cf_suffix
18507                 ;;
18508         debug) #(vi
18509                 cf_suffix='_g.a'
18510                 cf_depsuf=$cf_suffix
18511                 ;;
18512         profile) #(vi
18513                 cf_suffix='_p.a'
18514                 cf_depsuf=$cf_suffix
18515                 ;;
18516         shared) #(vi
18517                 case $cf_cv_system_name in
18518                 aix[56]*) #(vi
18519                         cf_suffix='.a'
18520                         cf_depsuf=$cf_suffix
18521                         ;;
18522                 cygwin*) #(vi
18523                         cf_suffix='.dll'
18524                         cf_depsuf='.dll.a'
18525                         ;;
18526                 darwin*) #(vi
18527                         cf_suffix='.dylib'
18528                         cf_depsuf=$cf_suffix
18529                         ;;
18530                 hpux*) #(vi
18531                         case $target in
18532                         ia64*) #(vi
18533                                 cf_suffix='.so'
18534                                 cf_depsuf=$cf_suffix
18535                                 ;;
18536                         *) #(vi
18537                                 cf_suffix='.sl'
18538                                 cf_depsuf=$cf_suffix
18539                                 ;;
18540                         esac
18541                         ;;
18542                 *)      cf_suffix='.so'
18543                         cf_depsuf=$cf_suffix
18544                         ;;
18545                 esac
18546         esac
18547         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
18548         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
18549
18550         case $cf_item in
18551         libtool) cf_subdir='obj_lo'  ;;
18552         normal)  cf_subdir='objects' ;;
18553         debug)   cf_subdir='obj_g' ;;
18554         profile) cf_subdir='obj_p' ;;
18555         shared)
18556                 case $cf_cv_system_name in #(vi
18557                 cygwin) #(vi
18558                         cf_subdir='objects' ;;
18559                 *)
18560                         cf_subdir='obj_s' ;;
18561                 esac
18562         esac
18563
18564                         # Test for case where we build libtinfo with a different name.
18565                         cf_libname=$cf_dir
18566                         if test $cf_dir = ncurses ; then
18567                                 case $cf_subset in
18568                                 *base*)
18569                                         cf_libname=${cf_libname}$LIB_SUFFIX
18570                                         ;;
18571                                 *termlib*)
18572                                         cf_libname=$TINFO_LIB_SUFFIX
18573                                         ;;
18574                                 ticlib*)
18575                                         cf_libname=$TICS_LIB_SUFFIX
18576                                         ;;
18577                                 esac
18578                         else
18579                                 cf_libname=${cf_libname}$LIB_SUFFIX
18580                         fi
18581                         if test -n "${DFT_ARG_SUFFIX}" ; then
18582                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
18583                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
18584                         fi
18585
18586                         # These dependencies really are for development, not
18587                         # builds, but they are useful in porting, too.
18588                         cf_depend="../include/ncurses_cfg.h"
18589                         if test "$srcdir" = "."; then
18590                                 cf_reldir="."
18591                         else
18592                                 cf_reldir="\${srcdir}"
18593                         fi
18594
18595                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
18596                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
18597                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
18598                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
18599                         fi
18600
18601                         cf_dir_suffix=
18602                         old_cf_suffix="$cf_suffix"
18603                         if test "$cf_cv_shlib_version_infix" = yes ; then
18604                         if test -n "$LIB_SUFFIX" ; then
18605                                 case $LIB_SUFFIX in
18606                                 w*)
18607                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
18608                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
18609                                         cf_dir_suffix=w
18610                                         ;;
18611                                 esac
18612                         fi
18613                         fi
18614
18615                         $AWK -f $srcdir/mk-1st.awk \
18616                                 name=${cf_libname}${cf_dir_suffix} \
18617                                 traces=$LIB_TRACING \
18618                                 MODEL=$cf_ITEM \
18619                                 model=$cf_subdir \
18620                                 prefix=$cf_prefix \
18621                                 suffix=$cf_suffix \
18622                                 subset=$cf_subset \
18623                                 TermlibRoot=$TINFO_NAME \
18624                                 TermlibSuffix=$TINFO_SUFFIX \
18625                                 ShlibVer=$cf_cv_shlib_version \
18626                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
18627                                 ReLink=${cf_cv_do_relink-no} \
18628                                 DoLinks=$cf_cv_do_symlinks \
18629                                 rmSoLocs=$cf_cv_rm_so_locs \
18630                                 ldconfig="$LDCONFIG" \
18631                                 overwrite=$WITH_OVERWRITE \
18632                                 depend="$cf_depend" \
18633                                 host="$host" \
18634                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18635
18636                         cf_suffix="$old_cf_suffix"
18637
18638                         for cf_subdir2 in $cf_subdirs lib
18639                         do
18640                                 test $cf_subdir = $cf_subdir2 && break
18641                         done
18642                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
18643                         $AWK -f $srcdir/mk-2nd.awk \
18644                                 name=$cf_dir \
18645                                 traces=$LIB_TRACING \
18646                                 MODEL=$cf_ITEM \
18647                                 model=$cf_subdir \
18648                                 subset=$cf_subset \
18649                                 srcdir=$srcdir \
18650                                 echo=$WITH_ECHO \
18651                                 crenames=$cf_cv_prog_CC_c_o \
18652                                 cxxrenames=$cf_cv_prog_CXX_c_o \
18653                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
18654                         cf_subdirs="$cf_subdirs $cf_subdir"
18655                         done
18656                 done
18657         fi
18658
18659         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
18660 done
18661
18662 for cf_dir in $SRC_SUBDIRS
18663 do
18664         if test ! -d $srcdir/$cf_dir ; then
18665                 continue
18666         fi
18667
18668         if test -f $cf_dir/Makefile ; then
18669                 case "$cf_dir" in
18670                 Ada95) #(vi
18671                         echo 'libs \' >> Makefile
18672                         echo 'install.libs \' >> Makefile
18673                         echo 'uninstall.libs ::' >> Makefile
18674                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
18675                         ;;
18676                 esac
18677         fi
18678
18679         if test -f $srcdir/$cf_dir/modules; then
18680                 echo >> Makefile
18681                 if test -f $srcdir/$cf_dir/headers; then
18682 cat >> Makefile <<CF_EOF
18683 install.includes \\
18684 uninstall.includes \\
18685 CF_EOF
18686                 fi
18687 if test "$cf_dir" != "c++" ; then
18688 echo 'lint \' >> Makefile
18689 fi
18690 cat >> Makefile <<CF_EOF
18691 libs \\
18692 lintlib \\
18693 install.libs \\
18694 uninstall.libs \\
18695 install.$cf_dir \\
18696 uninstall.$cf_dir ::
18697         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18698 CF_EOF
18699         elif test -f $srcdir/$cf_dir/headers; then
18700 cat >> Makefile <<CF_EOF
18701
18702 libs \\
18703 install.libs \\
18704 uninstall.libs \\
18705 install.includes \\
18706 uninstall.includes ::
18707         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
18708 CF_EOF
18709 fi
18710 done
18711
18712 cat >> Makefile <<CF_EOF
18713
18714 install.libs uninstall.libs \\
18715 install.data uninstall.data ::
18716 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
18717 CF_EOF
18718
18719 if test "x$cf_with_manpages" = xyes; then
18720 cat >> Makefile <<CF_EOF
18721
18722 install.man \\
18723 uninstall.man ::
18724         cd man && \${MAKE} \${CF_MFLAGS} \$@
18725 CF_EOF
18726 fi
18727
18728 cat >> Makefile <<CF_EOF
18729
18730 distclean ::
18731         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
18732         rm -f headers.sh headers.sed mk_shared_lib.sh
18733         rm -f edit_man.* man_alias.*
18734         rm -rf \${DIRS_TO_MAKE}
18735 CF_EOF
18736
18737 # Special case: tack's manpage lives in its own directory.
18738 if test "x$cf_with_manpages" = xyes; then
18739 if test -d tack ; then
18740 if test -f $srcdir/$tack.h; then
18741 cat >> Makefile <<CF_EOF
18742
18743 install.man \\
18744 uninstall.man ::
18745         cd tack && \${MAKE} \${CF_MFLAGS} \$@
18746 CF_EOF
18747 fi
18748 fi
18749 fi
18750
18751 rm -f headers.sed headers.sh
18752
18753 echo creating headers.sh
18754 cat >headers.sh <<CF_EOF
18755 #! /bin/sh
18756 # This shell script is generated by the 'configure' script.  It is invoked in a
18757 # subdirectory of the build tree.  It generates a sed-script in the parent
18758 # directory that is used to adjust includes for header files that reside in a
18759 # subdirectory of /usr/include, etc.
18760 PRG=""
18761 while test \$# != 3
18762 do
18763 PRG="\$PRG \$1"; shift
18764 done
18765 DST=\$1
18766 REF=\$2
18767 SRC=\$3
18768 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
18769 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
18770 echo installing \$SRC in \$DST
18771 CF_EOF
18772
18773 if test $WITH_CURSES_H = yes; then
18774         cat >>headers.sh <<CF_EOF
18775 case \$DST in
18776 /*/include/*)
18777         END=\`basename \$DST\`
18778         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18779         do
18780                 NAME=\`basename \$i\`
18781                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18782         done
18783         ;;
18784 *)
18785         echo "" >> \$TMPSED
18786         ;;
18787 esac
18788 CF_EOF
18789
18790 else
18791         cat >>headers.sh <<CF_EOF
18792 case \$DST in
18793 /*/include/*)
18794         END=\`basename \$DST\`
18795         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
18796         do
18797                 NAME=\`basename \$i\`
18798                 if test "\$NAME" = "curses.h"
18799                 then
18800                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18801                         NAME=ncurses.h
18802                 fi
18803                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
18804         done
18805         ;;
18806 *)
18807         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
18808         ;;
18809 esac
18810 CF_EOF
18811 fi
18812 cat >>headers.sh <<CF_EOF
18813 rm -f \$TMPSRC
18814 sed -f \$TMPSED \$SRC > \$TMPSRC
18815 NAME=\`basename \$SRC\`
18816 CF_EOF
18817 if test $WITH_CURSES_H != yes; then
18818         cat >>headers.sh <<CF_EOF
18819 test "\$NAME" = "curses.h" && NAME=ncurses.h
18820 CF_EOF
18821 fi
18822 cat >>headers.sh <<CF_EOF
18823 # Just in case someone gzip'd manpages, remove the conflicting copy.
18824 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
18825
18826 eval \$PRG \$TMPSRC \$DST/\$NAME
18827 rm -f \$TMPSRC \$TMPSED
18828 CF_EOF
18829
18830 chmod 0755 headers.sh
18831
18832 for cf_dir in $SRC_SUBDIRS
18833 do
18834         if test ! -d $srcdir/$cf_dir ; then
18835                 continue
18836         fi
18837
18838         if test -f $srcdir/$cf_dir/headers; then
18839                 $AWK -f $srcdir/mk-hdr.awk \
18840                         subset="$LIB_SUBSETS" \
18841                         compat="$WITH_CURSES_H" \
18842                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
18843         fi
18844
18845         if test -f $srcdir/$cf_dir/modules; then
18846                 if test "$cf_dir" != "c++" ; then
18847                         cat >>$cf_dir/Makefile <<"CF_EOF"
18848 depend : ${AUTO_SRC}
18849         makedepend -- ${CPPFLAGS} -- ${C_SRC}
18850
18851 # DO NOT DELETE THIS LINE -- make depend depends on it.
18852 CF_EOF
18853                 fi
18854         fi
18855 done
18856
18857  ;;
18858   esac
18859 done
18860 EOF
18861
18862 cat >>$CONFIG_STATUS <<\EOF
18863
18864 { (exit 0); exit 0; }
18865 EOF
18866 chmod +x $CONFIG_STATUS
18867 ac_clean_files=$ac_clean_files_save
18868
18869 # configure is writing to config.log, and then calls config.status.
18870 # config.status does its own redirection, appending to config.log.
18871 # Unfortunately, on DOS this fails, as config.log is still kept open
18872 # by configure, so config.status won't be able to write to it; its
18873 # output is simply discarded.  So we exec the FD to /dev/null,
18874 # effectively closing config.log, so it can be properly (re)opened and
18875 # appended to by config.status.  When coming back to configure, we
18876 # need to make the FD available again.
18877 if test "$no_create" != yes; then
18878   ac_cs_success=:
18879   exec 5>/dev/null
18880   $SHELL $CONFIG_STATUS || ac_cs_success=false
18881   exec 5>>config.log
18882   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18883   # would make configure fail if this is the last instruction.
18884   $ac_cs_success || { (exit 1); exit 1; }
18885 fi
18886 ${MAKE-make} preinstall