]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
85cafd9c11bc3bb00eb2455bd4ba4c67993e8269
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.481 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20081225.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --with-libtool          generate libraries with libtool
716   --with-shared           generate shared-libraries
717   --with-normal           generate normal-libraries (default)
718   --with-debug            generate debug-libraries (default)
719   --with-profile          generate profile-libraries
720   --with-termlib          generate separate terminfo library
721   --with-ticlib           generate separate tic library
722   --with-gpm              use Alessandro Rubini's GPM library
723   --without-dlsym         do not use dlsym() to load GPM dynamically
724   --with-sysmouse         use sysmouse (FreeBSD console)
725   --enable-rpath          use rpath option when generating shared libraries
726   --disable-relink        relink shared libraries during install
727   --with-shlib-version=X  Specify rel or abi version for shared libs
728 Fine-Tuning Your Configuration:
729   --disable-overwrite     leave out the link to -lcurses
730   --disable-database      do not use terminfo, only fallbacks/termcap
731   --with-database=XXX     specify terminfo source to install
732   --with-hashed-db        specify hashed-database library
733   --with-fallbacks=XXX    specify list of fallback terminal descriptions
734   --without-xterm-new     specify if xterm terminfo should be old version
735   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
736   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
737   --disable-big-core      assume machine has little memory
738   --disable-big-strings   assume compiler has only standard-size strings
739   --enable-termcap        compile in termcap fallback support
740   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
741   --enable-getcap         fast termcap load, no xrefs to terminfo
742   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
743   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
744   --disable-root-environ  restrict environment when running as root
745   --enable-symlinks       make tic use symbolic links not hard links
746   --enable-broken_linker  compile with broken-linker support code
747   --enable-bsdpad         recognize BSD-style prefix padding
748   --enable-widec          compile with wide-char/UTF-8 code
749   --disable-lp64          allow chtype to be long (ignore _LP64)
750   --disable-largefile     omit support for large files
751   --disable-tparm-varargs compile tparm() without varargs interface
752   --disable-tic-depends   link tic library without explicit dependency on ncurses library
753   --with-bool=TYPE        override fallback type of bool variable
754   --with-caps=alt         compile with alternate Caps file
755   --with-chtype=TYPE      override type of chtype
756   --with-ospeed=TYPE      override type of ospeed variable
757   --with-mmask-t=TYPE     override type of mmask_t
758   --with-ccharw-max=XXX   override size CCHARW_MAX
759   --with-rcs-ids          compile-in RCS identifiers
760 Options to Specify How Manpages are Installed:
761   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
762                           optionally formatted/catonly, e.g., gzip,formatted
763   --with-manpage-renames  specify manpage-renaming
764   --with-manpage-aliases  specify manpage-aliases using .so
765   --with-manpage-symlinks specify manpage-aliases using symlinks
766   --with-manpage-tbl      specify manpage processing with tbl
767 Extensions:
768   --disable-ext-funcs     disable function-extensions
769   --enable-sp-funcs       enable experimental SCREEN-extensions
770   --enable-term-driver    enable experimental terminal-driver
771   --enable-const          compile with extra/non-standard const
772   --enable-ext-colors     compile for 256-color support
773   --enable-ext-mouse      compile for extended mouse-encoding
774   --enable-no-padding     compile with $NCURSES_NO_PADDING code
775   --enable-signed-char    compile using signed Boolean's in term.h
776   --enable-sigwinch       compile with SIGWINCH handler
777   --enable-tcap-names     compile with user-definable terminal capabilities
778 Development Code:
779   --without-develop       disable development options
780   --enable-hard-tabs      compile with hard-tabs code
781   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
782 Experimental Code:
783   --disable-assumed-color do not assume anything about default-colors
784   --disable-hashmap       compile without hashmap scrolling-optimization
785   --enable-colorfgbg      compile-in experimental $COLORFGBG code
786   --enable-interop        compile-in experimental interop bindings
787   --with-pthread          use POSIX thread library
788   --enable-weak-symbols   enable weak-symbols for pthreads
789   --enable-reentrant      compile with experimental reentrant code
790   --with-wrap-prefix=XXX  override prefix used for public variables
791   --enable-safe-sprintf   compile with experimental safe-sprintf code
792   --disable-scroll-hints  compile without scroll-hints code
793   --enable-wgetch-events  compile with experimental wgetch-events code
794 Testing/development Options:
795   --enable-echo           build: display "compiling" commands (default)
796   --enable-warnings       build: turn on GCC compiler warnings
797   --enable-assertions     test: turn on generation of assertion code
798   --with-dmalloc          test: use Gray Watson's dmalloc library
799   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800   --with-valgrind         test: use valgrind
801   --disable-leaks         test: free permanent memory, analyze leaks
802   --enable-expanded       test: generate functions for certain macros
803   --disable-macros        test: use functions rather than macros
804   --with-trace            test: add trace() function to all models of ncurses
805 Ada95 Binding Options:
806   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
807   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/lib/ada/adainclude)
808   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
809
810 Some influential environment variables:
811   CC          C compiler command
812   CFLAGS      C compiler flags
813   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
814               nonstandard directory <lib dir>
815   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
816               headers in a nonstandard directory <include dir>
817   CPP         C preprocessor
818   CXX         C++ compiler command
819   CXXFLAGS    C++ compiler flags
820   CXXCPP      C++ preprocessor
821
822 Use these variables to override the choices made by `configure' or to help
823 it to find libraries and programs with nonstandard names/locations.
824
825 EOF
826 fi
827
828 if test "$ac_init_help" = "recursive"; then
829   # If there are subdirs, report their specific --help.
830   ac_popdir=`pwd`
831   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
832     cd $ac_subdir
833     # A "../" for each directory in /$ac_subdir.
834     ac_dots=`echo $ac_subdir |
835              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
836
837     case $srcdir in
838     .) # No --srcdir option.  We are building in place.
839       ac_sub_srcdir=$srcdir ;;
840     [\\/]* | ?:[\\/]* ) # Absolute path.
841       ac_sub_srcdir=$srcdir/$ac_subdir ;;
842     *) # Relative path.
843       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
844     esac
845
846     # Check for guested configure; otherwise get Cygnus style configure.
847     if test -f $ac_sub_srcdir/configure.gnu; then
848       echo
849       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
850     elif test -f $ac_sub_srcdir/configure; then
851       echo
852       $SHELL $ac_sub_srcdir/configure  --help=recursive
853     elif test -f $ac_sub_srcdir/configure.ac ||
854            test -f $ac_sub_srcdir/configure.in; then
855       echo
856       $ac_configure --help
857     else
858       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
859     fi
860     cd $ac_popdir
861   done
862 fi
863
864 test -n "$ac_init_help" && exit 0
865 if $ac_init_version; then
866   cat <<\EOF
867
868 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
869 Free Software Foundation, Inc.
870 This configure script is free software; the Free Software Foundation
871 gives unlimited permission to copy, distribute and modify it.
872 EOF
873   exit 0
874 fi
875 exec 5>config.log
876 cat >&5 <<EOF
877 This file contains any messages produced by compilers while
878 running configure, to aid debugging if configure makes a mistake.
879
880 It was created by $as_me, which was
881 generated by GNU Autoconf 2.52.20081225.  Invocation command line was
882
883   $ $0 $@
884
885 EOF
886 {
887 cat <<_ASUNAME
888 ## ---------- ##
889 ## Platform.  ##
890 ## ---------- ##
891
892 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
893 uname -m = `(uname -m) 2>/dev/null || echo unknown`
894 uname -r = `(uname -r) 2>/dev/null || echo unknown`
895 uname -s = `(uname -s) 2>/dev/null || echo unknown`
896 uname -v = `(uname -v) 2>/dev/null || echo unknown`
897
898 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
899 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
900
901 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
902 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
903 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
904 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
905 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
906 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
907 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
908
909 PATH = $PATH
910
911 _ASUNAME
912 } >&5
913
914 cat >&5 <<EOF
915 ## ------------ ##
916 ## Core tests.  ##
917 ## ------------ ##
918
919 EOF
920
921 # Keep a trace of the command line.
922 # Strip out --no-create and --no-recursion so they do not pile up.
923 # Also quote any args containing shell meta-characters.
924 ac_configure_args=
925 ac_sep=
926 for ac_arg
927 do
928   case $ac_arg in
929   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
930   | --no-cr | --no-c) ;;
931   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
932   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
933   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
934     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
935     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
936     ac_sep=" " ;;
937   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
938      ac_sep=" " ;;
939   esac
940   # Get rid of the leading space.
941 done
942
943 # When interrupted or exit'd, cleanup temporary files, and complete
944 # config.log.  We remove comments because anyway the quotes in there
945 # would cause problems or look ugly.
946 trap 'exit_status=$?
947   # Save into config.log some information that might help in debugging.
948   echo >&5
949   echo "## ----------------- ##" >&5
950   echo "## Cache variables.  ##" >&5
951   echo "## ----------------- ##" >&5
952   echo >&5
953   # The following way of writing the cache mishandles newlines in values,
954 {
955   (set) 2>&1 |
956     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
957     *ac_space=\ *)
958       sed -n \
959         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
960           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
961       ;;
962     *)
963       sed -n \
964         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
965       ;;
966     esac;
967 } >&5
968   sed "/^$/d" confdefs.h >conftest.log
969   if test -s conftest.log; then
970     echo >&5
971     echo "## ------------ ##" >&5
972     echo "## confdefs.h.  ##" >&5
973     echo "## ------------ ##" >&5
974     echo >&5
975     cat conftest.log >&5
976   fi
977   (echo; echo) >&5
978   test "$ac_signal" != 0 &&
979     echo "$as_me: caught signal $ac_signal" >&5
980   echo "$as_me: exit $exit_status" >&5
981   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
982     exit $exit_status
983      ' 0
984 for ac_signal in 1 2 13 15; do
985   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
986 done
987 ac_signal=0
988
989 # confdefs.h avoids OS command line length limits that DEFS can exceed.
990 rm -rf conftest* confdefs.h
991 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
992 echo >confdefs.h
993
994 # Let the site file select an alternate cache file if it wants to.
995 # Prefer explicitly selected file to automatically selected ones.
996 if test -z "$CONFIG_SITE"; then
997   if test "x$prefix" != xNONE; then
998     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
999   else
1000     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1001   fi
1002 fi
1003 for ac_site_file in $CONFIG_SITE; do
1004   if test -r "$ac_site_file"; then
1005     { echo "$as_me:1005: loading site script $ac_site_file" >&5
1006 echo "$as_me: loading site script $ac_site_file" >&6;}
1007     cat "$ac_site_file" >&5
1008     . "$ac_site_file"
1009   fi
1010 done
1011
1012 if test -r "$cache_file"; then
1013   # Some versions of bash will fail to source /dev/null (special
1014   # files actually), so we avoid doing that.
1015   if test -f "$cache_file"; then
1016     { echo "$as_me:1016: loading cache $cache_file" >&5
1017 echo "$as_me: loading cache $cache_file" >&6;}
1018     case $cache_file in
1019       [\\/]* | ?:[\\/]* ) . $cache_file;;
1020       *)                      . ./$cache_file;;
1021     esac
1022   fi
1023 else
1024   { echo "$as_me:1024: creating cache $cache_file" >&5
1025 echo "$as_me: creating cache $cache_file" >&6;}
1026   >$cache_file
1027 fi
1028
1029 # Check that the precious variables saved in the cache have kept the same
1030 # value.
1031 ac_cache_corrupted=false
1032 for ac_var in `(set) 2>&1 |
1033                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1034   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1035   eval ac_new_set=\$ac_env_${ac_var}_set
1036   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1037   eval ac_new_val="\$ac_env_${ac_var}_value"
1038   case $ac_old_set,$ac_new_set in
1039     set,)
1040       { echo "$as_me:1040: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1041 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1042       ac_cache_corrupted=: ;;
1043     ,set)
1044       { echo "$as_me:1044: error: \`$ac_var' was not set in the previous run" >&5
1045 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1046       ac_cache_corrupted=: ;;
1047     ,);;
1048     *)
1049       if test "x$ac_old_val" != "x$ac_new_val"; then
1050         { echo "$as_me:1050: error: \`$ac_var' has changed since the previous run:" >&5
1051 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1052         { echo "$as_me:1052:   former value:  $ac_old_val" >&5
1053 echo "$as_me:   former value:  $ac_old_val" >&2;}
1054         { echo "$as_me:1054:   current value: $ac_new_val" >&5
1055 echo "$as_me:   current value: $ac_new_val" >&2;}
1056         ac_cache_corrupted=:
1057       fi;;
1058   esac
1059   # Pass precious variables to config.status.  It doesn't matter if
1060   # we pass some twice (in addition to the command line arguments).
1061   if test "$ac_new_set" = set; then
1062     case $ac_new_val in
1063     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1064       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1065       ac_configure_args="$ac_configure_args '$ac_arg'"
1066       ;;
1067     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1068        ;;
1069     esac
1070   fi
1071 done
1072 if $ac_cache_corrupted; then
1073   { echo "$as_me:1073: error: changes in the environment can compromise the build" >&5
1074 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1075   { { echo "$as_me:1075: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1076 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1077    { (exit 1); exit 1; }; }
1078 fi
1079
1080 ac_ext=c
1081 ac_cpp='$CPP $CPPFLAGS'
1082 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1083 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1084 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1085 ac_main_return=return
1086
1087 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1088   *c*,-n*) ECHO_N= ECHO_C='
1089 ' ECHO_T='      ' ;;
1090   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1091   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1092 esac
1093 echo "#! $SHELL" >conftest.sh
1094 echo  "exit 0"   >>conftest.sh
1095 chmod +x conftest.sh
1096 if { (echo "$as_me:1096: PATH=\".;.\"; conftest.sh") >&5
1097   (PATH=".;."; conftest.sh) 2>&5
1098   ac_status=$?
1099   echo "$as_me:1099: \$? = $ac_status" >&5
1100   (exit $ac_status); }; then
1101   ac_path_separator=';'
1102 else
1103   ac_path_separator=:
1104 fi
1105 PATH_SEPARATOR="$ac_path_separator"
1106 rm -f conftest.sh
1107
1108 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1109
1110 top_builddir=`pwd`
1111
1112 echo "$as_me:1112: checking for egrep" >&5
1113 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1114 if test "${ac_cv_prog_egrep+set}" = set; then
1115   echo $ECHO_N "(cached) $ECHO_C" >&6
1116 else
1117   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1118     then ac_cv_prog_egrep='grep -E'
1119     else ac_cv_prog_egrep='egrep'
1120     fi
1121 fi
1122 echo "$as_me:1122: result: $ac_cv_prog_egrep" >&5
1123 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1124  EGREP=$ac_cv_prog_egrep
1125
1126 test -z "$EGREP" && { { echo "$as_me:1126: error: No egrep program found" >&5
1127 echo "$as_me: error: No egrep program found" >&2;}
1128    { (exit 1); exit 1; }; }
1129
1130 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1131 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1132 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1133 cf_cv_abi_version=${NCURSES_MAJOR}
1134 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1135 cf_cv_timestamp=`date`
1136 echo "$as_me:1136: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1137 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1138
1139 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1140
1141 # Check whether --with-rel-version or --without-rel-version was given.
1142 if test "${with_rel_version+set}" = set; then
1143   withval="$with_rel_version"
1144   { echo "$as_me:1144: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1145 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1146  cf_cv_rel_version=$withval
1147 fi;
1148
1149  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1150  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1151
1152 if test -n "$NCURSES_MAJOR" ; then
1153   case $NCURSES_MAJOR in #(vi
1154   [0-9]*) #(vi
1155         ;;
1156   *)
1157         { { echo "$as_me:1157: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1158 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1159    { (exit 1); exit 1; }; }
1160         ;;
1161   esac
1162 else
1163   { { echo "$as_me:1163: error: Release major-version value is empty" >&5
1164 echo "$as_me: error: Release major-version value is empty" >&2;}
1165    { (exit 1); exit 1; }; }
1166 fi
1167
1168 if test -n "$NCURSES_MINOR" ; then
1169   case $NCURSES_MINOR in #(vi
1170   [0-9]*) #(vi
1171         ;;
1172   *)
1173         { { echo "$as_me:1173: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1174 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1175    { (exit 1); exit 1; }; }
1176         ;;
1177   esac
1178 else
1179   { { echo "$as_me:1179: error: Release minor-version value is empty" >&5
1180 echo "$as_me: error: Release minor-version value is empty" >&2;}
1181    { (exit 1); exit 1; }; }
1182 fi
1183
1184 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1185
1186 # Check whether --with-abi-version or --without-abi-version was given.
1187 if test "${with_abi_version+set}" = set; then
1188   withval="$with_abi_version"
1189   { echo "$as_me:1189: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1190 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1191  cf_cv_abi_version=$withval
1192 fi;
1193
1194 if test -n "$cf_cv_abi_version" ; then
1195   case $cf_cv_abi_version in #(vi
1196   [0-9]*) #(vi
1197         ;;
1198   *)
1199         { { echo "$as_me:1199: error: ABI version is not a number: $cf_cv_abi_version" >&5
1200 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1201    { (exit 1); exit 1; }; }
1202         ;;
1203   esac
1204 else
1205   { { echo "$as_me:1205: error: ABI version value is empty" >&5
1206 echo "$as_me: error: ABI version value is empty" >&2;}
1207    { (exit 1); exit 1; }; }
1208 fi
1209
1210 ac_aux_dir=
1211 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1212   if test -f $ac_dir/install-sh; then
1213     ac_aux_dir=$ac_dir
1214     ac_install_sh="$ac_aux_dir/install-sh -c"
1215     break
1216   elif test -f $ac_dir/install.sh; then
1217     ac_aux_dir=$ac_dir
1218     ac_install_sh="$ac_aux_dir/install.sh -c"
1219     break
1220   elif test -f $ac_dir/shtool; then
1221     ac_aux_dir=$ac_dir
1222     ac_install_sh="$ac_aux_dir/shtool install -c"
1223     break
1224   fi
1225 done
1226 if test -z "$ac_aux_dir"; then
1227   { { echo "$as_me:1227: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1228 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1229    { (exit 1); exit 1; }; }
1230 fi
1231 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1232 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1233 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1234
1235 # Make sure we can run config.sub.
1236 $ac_config_sub sun4 >/dev/null 2>&1 ||
1237   { { echo "$as_me:1237: error: cannot run $ac_config_sub" >&5
1238 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1239    { (exit 1); exit 1; }; }
1240
1241 echo "$as_me:1241: checking build system type" >&5
1242 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1243 if test "${ac_cv_build+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   ac_cv_build_alias=$build_alias
1247 test -z "$ac_cv_build_alias" &&
1248   ac_cv_build_alias=`$ac_config_guess`
1249 test -z "$ac_cv_build_alias" &&
1250   { { echo "$as_me:1250: error: cannot guess build type; you must specify one" >&5
1251 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1252    { (exit 1); exit 1; }; }
1253 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1254   { { echo "$as_me:1254: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1255 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1256    { (exit 1); exit 1; }; }
1257
1258 fi
1259 echo "$as_me:1259: result: $ac_cv_build" >&5
1260 echo "${ECHO_T}$ac_cv_build" >&6
1261 build=$ac_cv_build
1262 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1263 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1264 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1265
1266 echo "$as_me:1266: checking host system type" >&5
1267 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1268 if test "${ac_cv_host+set}" = set; then
1269   echo $ECHO_N "(cached) $ECHO_C" >&6
1270 else
1271   ac_cv_host_alias=$host_alias
1272 test -z "$ac_cv_host_alias" &&
1273   ac_cv_host_alias=$ac_cv_build_alias
1274 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1275   { { echo "$as_me:1275: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1276 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1277    { (exit 1); exit 1; }; }
1278
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_host" >&5
1281 echo "${ECHO_T}$ac_cv_host" >&6
1282 host=$ac_cv_host
1283 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1284 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1285 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1286
1287 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1288         echo "$as_me:1288: checking target system type" >&5
1289 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1290 if test "${ac_cv_target+set}" = set; then
1291   echo $ECHO_N "(cached) $ECHO_C" >&6
1292 else
1293   ac_cv_target_alias=$target_alias
1294 test "x$ac_cv_target_alias" = "x" &&
1295   ac_cv_target_alias=$ac_cv_host_alias
1296 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1297   { { echo "$as_me:1297: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1298 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1299    { (exit 1); exit 1; }; }
1300
1301 fi
1302 echo "$as_me:1302: result: $ac_cv_target" >&5
1303 echo "${ECHO_T}$ac_cv_target" >&6
1304 target=$ac_cv_target
1305 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1306 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1307 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1308
1309 # The aliases save the names the user supplied, while $host etc.
1310 # will get canonicalized.
1311 test -n "$target_alias" &&
1312   test "$program_prefix$program_suffix$program_transform_name" = \
1313     NONENONEs,x,x, &&
1314   program_prefix=${target_alias}-
1315         system_name="$host_os"
1316 else
1317         system_name="`(uname -s -r) 2>/dev/null`"
1318         if test -z "$system_name" ; then
1319                 system_name="`(hostname) 2>/dev/null`"
1320         fi
1321 fi
1322 test -n "$system_name" && cat >>confdefs.h <<EOF
1323 #define SYSTEM_NAME "$system_name"
1324 EOF
1325
1326 if test "${cf_cv_system_name+set}" = set; then
1327   echo $ECHO_N "(cached) $ECHO_C" >&6
1328 else
1329   cf_cv_system_name="$system_name"
1330 fi
1331
1332 test -z "$system_name" && system_name="$cf_cv_system_name"
1333 test -n "$cf_cv_system_name" && echo "$as_me:1333: result: Configuring for $cf_cv_system_name" >&5
1334 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1335
1336 if test ".$system_name" != ".$cf_cv_system_name" ; then
1337         echo "$as_me:1337: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1338 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1339         { { echo "$as_me:1339: error: \"Please remove config.cache and try again.\"" >&5
1340 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1341    { (exit 1); exit 1; }; }
1342 fi
1343
1344 # Check whether --with-system-type or --without-system-type was given.
1345 if test "${with_system_type+set}" = set; then
1346   withval="$with_system_type"
1347   { echo "$as_me:1347: WARNING: overriding system type to $withval" >&5
1348 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1349  cf_cv_system_name=$withval
1350 fi;
1351
1352 ###     Save the given $CFLAGS to allow user-override.
1353 cf_user_CFLAGS="$CFLAGS"
1354
1355 ###     Default install-location
1356
1357 echo "$as_me:1357: checking for prefix" >&5
1358 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1359 if test "x$prefix" = "xNONE" ; then
1360         case "$cf_cv_system_name" in
1361                 # non-vendor systems don't have a conflict
1362         openbsd*|freebsd*|linux*|cygwin*|k*bsd*-gnu)
1363                 prefix=/usr
1364                 ;;
1365         *)      prefix=$ac_default_prefix
1366                 ;;
1367         esac
1368 fi
1369 echo "$as_me:1369: result: $prefix" >&5
1370 echo "${ECHO_T}$prefix" >&6
1371
1372 if test "x$prefix" = "xNONE" ; then
1373 echo "$as_me:1373: checking for default include-directory" >&5
1374 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1375 test -n "$verbose" && echo 1>&6
1376 for cf_symbol in \
1377         $includedir \
1378         $includedir/ncurses \
1379         $prefix/include \
1380         $prefix/include/ncurses \
1381         /usr/local/include \
1382         /usr/local/include/ncurses \
1383         /usr/include \
1384         /usr/include/ncurses
1385 do
1386         cf_dir=`eval echo $cf_symbol`
1387         if test -f $cf_dir/curses.h ; then
1388         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1389                 includedir="$cf_symbol"
1390                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1391                 break
1392         fi
1393         fi
1394         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1395 done
1396 echo "$as_me:1396: result: $includedir" >&5
1397 echo "${ECHO_T}$includedir" >&6
1398 fi
1399
1400 ###     Checks for programs.
1401 ac_ext=c
1402 ac_cpp='$CPP $CPPFLAGS'
1403 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1404 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1405 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1406 ac_main_return=return
1407 if test -n "$ac_tool_prefix"; then
1408   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1409 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1410 echo "$as_me:1410: checking for $ac_word" >&5
1411 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1412 if test "${ac_cv_prog_CC+set}" = set; then
1413   echo $ECHO_N "(cached) $ECHO_C" >&6
1414 else
1415   if test -n "$CC"; then
1416   ac_cv_prog_CC="$CC" # Let the user override the test.
1417 else
1418   ac_save_IFS=$IFS; IFS=$ac_path_separator
1419 ac_dummy="$PATH"
1420 for ac_dir in $ac_dummy; do
1421   IFS=$ac_save_IFS
1422   test -z "$ac_dir" && ac_dir=.
1423   $as_executable_p "$ac_dir/$ac_word" || continue
1424 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1425 echo "$as_me:1425: found $ac_dir/$ac_word" >&5
1426 break
1427 done
1428
1429 fi
1430 fi
1431 CC=$ac_cv_prog_CC
1432 if test -n "$CC"; then
1433   echo "$as_me:1433: result: $CC" >&5
1434 echo "${ECHO_T}$CC" >&6
1435 else
1436   echo "$as_me:1436: result: no" >&5
1437 echo "${ECHO_T}no" >&6
1438 fi
1439
1440 fi
1441 if test -z "$ac_cv_prog_CC"; then
1442   ac_ct_CC=$CC
1443   # Extract the first word of "gcc", so it can be a program name with args.
1444 set dummy gcc; ac_word=$2
1445 echo "$as_me:1445: checking for $ac_word" >&5
1446 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1447 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1448   echo $ECHO_N "(cached) $ECHO_C" >&6
1449 else
1450   if test -n "$ac_ct_CC"; then
1451   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1452 else
1453   ac_save_IFS=$IFS; IFS=$ac_path_separator
1454 ac_dummy="$PATH"
1455 for ac_dir in $ac_dummy; do
1456   IFS=$ac_save_IFS
1457   test -z "$ac_dir" && ac_dir=.
1458   $as_executable_p "$ac_dir/$ac_word" || continue
1459 ac_cv_prog_ac_ct_CC="gcc"
1460 echo "$as_me:1460: found $ac_dir/$ac_word" >&5
1461 break
1462 done
1463
1464 fi
1465 fi
1466 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1467 if test -n "$ac_ct_CC"; then
1468   echo "$as_me:1468: result: $ac_ct_CC" >&5
1469 echo "${ECHO_T}$ac_ct_CC" >&6
1470 else
1471   echo "$as_me:1471: result: no" >&5
1472 echo "${ECHO_T}no" >&6
1473 fi
1474
1475   CC=$ac_ct_CC
1476 else
1477   CC="$ac_cv_prog_CC"
1478 fi
1479
1480 if test -z "$CC"; then
1481   if test -n "$ac_tool_prefix"; then
1482   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1483 set dummy ${ac_tool_prefix}cc; ac_word=$2
1484 echo "$as_me:1484: checking for $ac_word" >&5
1485 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1486 if test "${ac_cv_prog_CC+set}" = set; then
1487   echo $ECHO_N "(cached) $ECHO_C" >&6
1488 else
1489   if test -n "$CC"; then
1490   ac_cv_prog_CC="$CC" # Let the user override the test.
1491 else
1492   ac_save_IFS=$IFS; IFS=$ac_path_separator
1493 ac_dummy="$PATH"
1494 for ac_dir in $ac_dummy; do
1495   IFS=$ac_save_IFS
1496   test -z "$ac_dir" && ac_dir=.
1497   $as_executable_p "$ac_dir/$ac_word" || continue
1498 ac_cv_prog_CC="${ac_tool_prefix}cc"
1499 echo "$as_me:1499: found $ac_dir/$ac_word" >&5
1500 break
1501 done
1502
1503 fi
1504 fi
1505 CC=$ac_cv_prog_CC
1506 if test -n "$CC"; then
1507   echo "$as_me:1507: result: $CC" >&5
1508 echo "${ECHO_T}$CC" >&6
1509 else
1510   echo "$as_me:1510: result: no" >&5
1511 echo "${ECHO_T}no" >&6
1512 fi
1513
1514 fi
1515 if test -z "$ac_cv_prog_CC"; then
1516   ac_ct_CC=$CC
1517   # Extract the first word of "cc", so it can be a program name with args.
1518 set dummy cc; ac_word=$2
1519 echo "$as_me:1519: checking for $ac_word" >&5
1520 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1521 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1522   echo $ECHO_N "(cached) $ECHO_C" >&6
1523 else
1524   if test -n "$ac_ct_CC"; then
1525   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1526 else
1527   ac_save_IFS=$IFS; IFS=$ac_path_separator
1528 ac_dummy="$PATH"
1529 for ac_dir in $ac_dummy; do
1530   IFS=$ac_save_IFS
1531   test -z "$ac_dir" && ac_dir=.
1532   $as_executable_p "$ac_dir/$ac_word" || continue
1533 ac_cv_prog_ac_ct_CC="cc"
1534 echo "$as_me:1534: found $ac_dir/$ac_word" >&5
1535 break
1536 done
1537
1538 fi
1539 fi
1540 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1541 if test -n "$ac_ct_CC"; then
1542   echo "$as_me:1542: result: $ac_ct_CC" >&5
1543 echo "${ECHO_T}$ac_ct_CC" >&6
1544 else
1545   echo "$as_me:1545: result: no" >&5
1546 echo "${ECHO_T}no" >&6
1547 fi
1548
1549   CC=$ac_ct_CC
1550 else
1551   CC="$ac_cv_prog_CC"
1552 fi
1553
1554 fi
1555 if test -z "$CC"; then
1556   # Extract the first word of "cc", so it can be a program name with args.
1557 set dummy cc; ac_word=$2
1558 echo "$as_me:1558: checking for $ac_word" >&5
1559 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1560 if test "${ac_cv_prog_CC+set}" = set; then
1561   echo $ECHO_N "(cached) $ECHO_C" >&6
1562 else
1563   if test -n "$CC"; then
1564   ac_cv_prog_CC="$CC" # Let the user override the test.
1565 else
1566   ac_prog_rejected=no
1567   ac_save_IFS=$IFS; IFS=$ac_path_separator
1568 ac_dummy="$PATH"
1569 for ac_dir in $ac_dummy; do
1570   IFS=$ac_save_IFS
1571   test -z "$ac_dir" && ac_dir=.
1572   $as_executable_p "$ac_dir/$ac_word" || continue
1573 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1574   ac_prog_rejected=yes
1575   continue
1576 fi
1577 ac_cv_prog_CC="cc"
1578 echo "$as_me:1578: found $ac_dir/$ac_word" >&5
1579 break
1580 done
1581
1582 if test $ac_prog_rejected = yes; then
1583   # We found a bogon in the path, so make sure we never use it.
1584   set dummy $ac_cv_prog_CC
1585   shift
1586   if test $# != 0; then
1587     # We chose a different compiler from the bogus one.
1588     # However, it has the same basename, so the bogon will be chosen
1589     # first if we set CC to just the basename; use the full file name.
1590     shift
1591     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1592     shift
1593     ac_cv_prog_CC="$@"
1594   fi
1595 fi
1596 fi
1597 fi
1598 CC=$ac_cv_prog_CC
1599 if test -n "$CC"; then
1600   echo "$as_me:1600: result: $CC" >&5
1601 echo "${ECHO_T}$CC" >&6
1602 else
1603   echo "$as_me:1603: result: no" >&5
1604 echo "${ECHO_T}no" >&6
1605 fi
1606
1607 fi
1608 if test -z "$CC"; then
1609   if test -n "$ac_tool_prefix"; then
1610   for ac_prog in cl
1611   do
1612     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1613 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1614 echo "$as_me:1614: checking for $ac_word" >&5
1615 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1616 if test "${ac_cv_prog_CC+set}" = set; then
1617   echo $ECHO_N "(cached) $ECHO_C" >&6
1618 else
1619   if test -n "$CC"; then
1620   ac_cv_prog_CC="$CC" # Let the user override the test.
1621 else
1622   ac_save_IFS=$IFS; IFS=$ac_path_separator
1623 ac_dummy="$PATH"
1624 for ac_dir in $ac_dummy; do
1625   IFS=$ac_save_IFS
1626   test -z "$ac_dir" && ac_dir=.
1627   $as_executable_p "$ac_dir/$ac_word" || continue
1628 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1629 echo "$as_me:1629: found $ac_dir/$ac_word" >&5
1630 break
1631 done
1632
1633 fi
1634 fi
1635 CC=$ac_cv_prog_CC
1636 if test -n "$CC"; then
1637   echo "$as_me:1637: result: $CC" >&5
1638 echo "${ECHO_T}$CC" >&6
1639 else
1640   echo "$as_me:1640: result: no" >&5
1641 echo "${ECHO_T}no" >&6
1642 fi
1643
1644     test -n "$CC" && break
1645   done
1646 fi
1647 if test -z "$CC"; then
1648   ac_ct_CC=$CC
1649   for ac_prog in cl
1650 do
1651   # Extract the first word of "$ac_prog", so it can be a program name with args.
1652 set dummy $ac_prog; ac_word=$2
1653 echo "$as_me:1653: checking for $ac_word" >&5
1654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1655 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1656   echo $ECHO_N "(cached) $ECHO_C" >&6
1657 else
1658   if test -n "$ac_ct_CC"; then
1659   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1660 else
1661   ac_save_IFS=$IFS; IFS=$ac_path_separator
1662 ac_dummy="$PATH"
1663 for ac_dir in $ac_dummy; do
1664   IFS=$ac_save_IFS
1665   test -z "$ac_dir" && ac_dir=.
1666   $as_executable_p "$ac_dir/$ac_word" || continue
1667 ac_cv_prog_ac_ct_CC="$ac_prog"
1668 echo "$as_me:1668: found $ac_dir/$ac_word" >&5
1669 break
1670 done
1671
1672 fi
1673 fi
1674 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1675 if test -n "$ac_ct_CC"; then
1676   echo "$as_me:1676: result: $ac_ct_CC" >&5
1677 echo "${ECHO_T}$ac_ct_CC" >&6
1678 else
1679   echo "$as_me:1679: result: no" >&5
1680 echo "${ECHO_T}no" >&6
1681 fi
1682
1683   test -n "$ac_ct_CC" && break
1684 done
1685
1686   CC=$ac_ct_CC
1687 fi
1688
1689 fi
1690
1691 test -z "$CC" && { { echo "$as_me:1691: error: no acceptable cc found in \$PATH" >&5
1692 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1693    { (exit 1); exit 1; }; }
1694
1695 # Provide some information about the compiler.
1696 echo "$as_me:1696:" \
1697      "checking for C compiler version" >&5
1698 ac_compiler=`set X $ac_compile; echo $2`
1699 { (eval echo "$as_me:1699: \"$ac_compiler --version </dev/null >&5\"") >&5
1700   (eval $ac_compiler --version </dev/null >&5) 2>&5
1701   ac_status=$?
1702   echo "$as_me:1702: \$? = $ac_status" >&5
1703   (exit $ac_status); }
1704 { (eval echo "$as_me:1704: \"$ac_compiler -v </dev/null >&5\"") >&5
1705   (eval $ac_compiler -v </dev/null >&5) 2>&5
1706   ac_status=$?
1707   echo "$as_me:1707: \$? = $ac_status" >&5
1708   (exit $ac_status); }
1709 { (eval echo "$as_me:1709: \"$ac_compiler -V </dev/null >&5\"") >&5
1710   (eval $ac_compiler -V </dev/null >&5) 2>&5
1711   ac_status=$?
1712   echo "$as_me:1712: \$? = $ac_status" >&5
1713   (exit $ac_status); }
1714
1715 cat >conftest.$ac_ext <<_ACEOF
1716 #line 1716 "configure"
1717 #include "confdefs.h"
1718
1719 int
1720 main ()
1721 {
1722
1723   ;
1724   return 0;
1725 }
1726 _ACEOF
1727 ac_clean_files_save=$ac_clean_files
1728 ac_clean_files="$ac_clean_files a.out a.exe"
1729 # Try to create an executable without -o first, disregard a.out.
1730 # It will help us diagnose broken compilers, and finding out an intuition
1731 # of exeext.
1732 echo "$as_me:1732: checking for C compiler default output" >&5
1733 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1734 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1735 if { (eval echo "$as_me:1735: \"$ac_link_default\"") >&5
1736   (eval $ac_link_default) 2>&5
1737   ac_status=$?
1738   echo "$as_me:1738: \$? = $ac_status" >&5
1739   (exit $ac_status); }; then
1740   # Find the output, starting from the most likely.  This scheme is
1741 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1742 # resort.
1743 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1744                 ls a.out conftest 2>/dev/null;
1745                 ls a.* conftest.* 2>/dev/null`; do
1746   case $ac_file in
1747     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1748     a.out ) # We found the default executable, but exeext='' is most
1749             # certainly right.
1750             break;;
1751     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1752           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1753           export ac_cv_exeext
1754           break;;
1755     * ) break;;
1756   esac
1757 done
1758 else
1759   echo "$as_me: failed program was:" >&5
1760 cat conftest.$ac_ext >&5
1761 { { echo "$as_me:1761: error: C compiler cannot create executables" >&5
1762 echo "$as_me: error: C compiler cannot create executables" >&2;}
1763    { (exit 77); exit 77; }; }
1764 fi
1765
1766 ac_exeext=$ac_cv_exeext
1767 echo "$as_me:1767: result: $ac_file" >&5
1768 echo "${ECHO_T}$ac_file" >&6
1769
1770 # Check the compiler produces executables we can run.  If not, either
1771 # the compiler is broken, or we cross compile.
1772 echo "$as_me:1772: checking whether the C compiler works" >&5
1773 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1774 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1775 # If not cross compiling, check that we can run a simple program.
1776 if test "$cross_compiling" != yes; then
1777   if { ac_try='./$ac_file'
1778   { (eval echo "$as_me:1778: \"$ac_try\"") >&5
1779   (eval $ac_try) 2>&5
1780   ac_status=$?
1781   echo "$as_me:1781: \$? = $ac_status" >&5
1782   (exit $ac_status); }; }; then
1783     cross_compiling=no
1784   else
1785     if test "$cross_compiling" = maybe; then
1786         cross_compiling=yes
1787     else
1788         { { echo "$as_me:1788: error: cannot run C compiled programs.
1789 If you meant to cross compile, use \`--host'." >&5
1790 echo "$as_me: error: cannot run C compiled programs.
1791 If you meant to cross compile, use \`--host'." >&2;}
1792    { (exit 1); exit 1; }; }
1793     fi
1794   fi
1795 fi
1796 echo "$as_me:1796: result: yes" >&5
1797 echo "${ECHO_T}yes" >&6
1798
1799 rm -f a.out a.exe conftest$ac_cv_exeext
1800 ac_clean_files=$ac_clean_files_save
1801 # Check the compiler produces executables we can run.  If not, either
1802 # the compiler is broken, or we cross compile.
1803 echo "$as_me:1803: checking whether we are cross compiling" >&5
1804 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1805 echo "$as_me:1805: result: $cross_compiling" >&5
1806 echo "${ECHO_T}$cross_compiling" >&6
1807
1808 echo "$as_me:1808: checking for executable suffix" >&5
1809 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1810 if { (eval echo "$as_me:1810: \"$ac_link\"") >&5
1811   (eval $ac_link) 2>&5
1812   ac_status=$?
1813   echo "$as_me:1813: \$? = $ac_status" >&5
1814   (exit $ac_status); }; then
1815   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1816 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1817 # work properly (i.e., refer to `conftest.exe'), while it won't with
1818 # `rm'.
1819 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1820   case $ac_file in
1821     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1822     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1823           export ac_cv_exeext
1824           break;;
1825     * ) break;;
1826   esac
1827 done
1828 else
1829   { { echo "$as_me:1829: error: cannot compute EXEEXT: cannot compile and link" >&5
1830 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1831    { (exit 1); exit 1; }; }
1832 fi
1833
1834 rm -f conftest$ac_cv_exeext
1835 echo "$as_me:1835: result: $ac_cv_exeext" >&5
1836 echo "${ECHO_T}$ac_cv_exeext" >&6
1837
1838 rm -f conftest.$ac_ext
1839 EXEEXT=$ac_cv_exeext
1840 ac_exeext=$EXEEXT
1841 echo "$as_me:1841: checking for object suffix" >&5
1842 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1843 if test "${ac_cv_objext+set}" = set; then
1844   echo $ECHO_N "(cached) $ECHO_C" >&6
1845 else
1846   cat >conftest.$ac_ext <<_ACEOF
1847 #line 1847 "configure"
1848 #include "confdefs.h"
1849
1850 int
1851 main ()
1852 {
1853
1854   ;
1855   return 0;
1856 }
1857 _ACEOF
1858 rm -f conftest.o conftest.obj
1859 if { (eval echo "$as_me:1859: \"$ac_compile\"") >&5
1860   (eval $ac_compile) 2>&5
1861   ac_status=$?
1862   echo "$as_me:1862: \$? = $ac_status" >&5
1863   (exit $ac_status); }; then
1864   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1865   case $ac_file in
1866     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1867     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1868        break;;
1869   esac
1870 done
1871 else
1872   echo "$as_me: failed program was:" >&5
1873 cat conftest.$ac_ext >&5
1874 { { echo "$as_me:1874: error: cannot compute OBJEXT: cannot compile" >&5
1875 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1876    { (exit 1); exit 1; }; }
1877 fi
1878
1879 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1880 fi
1881 echo "$as_me:1881: result: $ac_cv_objext" >&5
1882 echo "${ECHO_T}$ac_cv_objext" >&6
1883 OBJEXT=$ac_cv_objext
1884 ac_objext=$OBJEXT
1885 echo "$as_me:1885: checking whether we are using the GNU C compiler" >&5
1886 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1887 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1888   echo $ECHO_N "(cached) $ECHO_C" >&6
1889 else
1890   cat >conftest.$ac_ext <<_ACEOF
1891 #line 1891 "configure"
1892 #include "confdefs.h"
1893
1894 int
1895 main ()
1896 {
1897 #ifndef __GNUC__
1898        choke me
1899 #endif
1900
1901   ;
1902   return 0;
1903 }
1904 _ACEOF
1905 rm -f conftest.$ac_objext
1906 if { (eval echo "$as_me:1906: \"$ac_compile\"") >&5
1907   (eval $ac_compile) 2>&5
1908   ac_status=$?
1909   echo "$as_me:1909: \$? = $ac_status" >&5
1910   (exit $ac_status); } &&
1911          { ac_try='test -s conftest.$ac_objext'
1912   { (eval echo "$as_me:1912: \"$ac_try\"") >&5
1913   (eval $ac_try) 2>&5
1914   ac_status=$?
1915   echo "$as_me:1915: \$? = $ac_status" >&5
1916   (exit $ac_status); }; }; then
1917   ac_compiler_gnu=yes
1918 else
1919   echo "$as_me: failed program was:" >&5
1920 cat conftest.$ac_ext >&5
1921 ac_compiler_gnu=no
1922 fi
1923 rm -f conftest.$ac_objext conftest.$ac_ext
1924 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1925
1926 fi
1927 echo "$as_me:1927: result: $ac_cv_c_compiler_gnu" >&5
1928 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1929 GCC=`test $ac_compiler_gnu = yes && echo yes`
1930 ac_test_CFLAGS=${CFLAGS+set}
1931 ac_save_CFLAGS=$CFLAGS
1932 CFLAGS="-g"
1933 echo "$as_me:1933: checking whether $CC accepts -g" >&5
1934 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1935 if test "${ac_cv_prog_cc_g+set}" = set; then
1936   echo $ECHO_N "(cached) $ECHO_C" >&6
1937 else
1938   cat >conftest.$ac_ext <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main ()
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 rm -f conftest.$ac_objext
1951 if { (eval echo "$as_me:1951: \"$ac_compile\"") >&5
1952   (eval $ac_compile) 2>&5
1953   ac_status=$?
1954   echo "$as_me:1954: \$? = $ac_status" >&5
1955   (exit $ac_status); } &&
1956          { ac_try='test -s conftest.$ac_objext'
1957   { (eval echo "$as_me:1957: \"$ac_try\"") >&5
1958   (eval $ac_try) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit $ac_status); }; }; then
1962   ac_cv_prog_cc_g=yes
1963 else
1964   echo "$as_me: failed program was:" >&5
1965 cat conftest.$ac_ext >&5
1966 ac_cv_prog_cc_g=no
1967 fi
1968 rm -f conftest.$ac_objext conftest.$ac_ext
1969 fi
1970 echo "$as_me:1970: result: $ac_cv_prog_cc_g" >&5
1971 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1972 if test "$ac_test_CFLAGS" = set; then
1973   CFLAGS=$ac_save_CFLAGS
1974 elif test $ac_cv_prog_cc_g = yes; then
1975   if test "$GCC" = yes; then
1976     CFLAGS="-g -O2"
1977   else
1978     CFLAGS="-g"
1979   fi
1980 else
1981   if test "$GCC" = yes; then
1982     CFLAGS="-O2"
1983   else
1984     CFLAGS=
1985   fi
1986 fi
1987 # Some people use a C++ compiler to compile C.  Since we use `exit',
1988 # in C++ we need to declare it.  In case someone uses the same compiler
1989 # for both compiling C and C++ we need to have the C++ compiler decide
1990 # the declaration of exit, since it's the most demanding environment.
1991 cat >conftest.$ac_ext <<_ACEOF
1992 #ifndef __cplusplus
1993   choke me
1994 #endif
1995 _ACEOF
1996 rm -f conftest.$ac_objext
1997 if { (eval echo "$as_me:1997: \"$ac_compile\"") >&5
1998   (eval $ac_compile) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit $ac_status); } &&
2002          { ac_try='test -s conftest.$ac_objext'
2003   { (eval echo "$as_me:2003: \"$ac_try\"") >&5
2004   (eval $ac_try) 2>&5
2005   ac_status=$?
2006   echo "$as_me:2006: \$? = $ac_status" >&5
2007   (exit $ac_status); }; }; then
2008   for ac_declaration in \
2009    ''\
2010    '#include <stdlib.h>' \
2011    'extern "C" void std::exit (int) throw (); using std::exit;' \
2012    'extern "C" void std::exit (int); using std::exit;' \
2013    'extern "C" void exit (int) throw ();' \
2014    'extern "C" void exit (int);' \
2015    'void exit (int);'
2016 do
2017   cat >conftest.$ac_ext <<_ACEOF
2018 #line 2018 "configure"
2019 #include "confdefs.h"
2020 #include <stdlib.h>
2021 $ac_declaration
2022 int
2023 main ()
2024 {
2025 exit (42);
2026   ;
2027   return 0;
2028 }
2029 _ACEOF
2030 rm -f conftest.$ac_objext
2031 if { (eval echo "$as_me:2031: \"$ac_compile\"") >&5
2032   (eval $ac_compile) 2>&5
2033   ac_status=$?
2034   echo "$as_me:2034: \$? = $ac_status" >&5
2035   (exit $ac_status); } &&
2036          { ac_try='test -s conftest.$ac_objext'
2037   { (eval echo "$as_me:2037: \"$ac_try\"") >&5
2038   (eval $ac_try) 2>&5
2039   ac_status=$?
2040   echo "$as_me:2040: \$? = $ac_status" >&5
2041   (exit $ac_status); }; }; then
2042   :
2043 else
2044   echo "$as_me: failed program was:" >&5
2045 cat conftest.$ac_ext >&5
2046 continue
2047 fi
2048 rm -f conftest.$ac_objext conftest.$ac_ext
2049   cat >conftest.$ac_ext <<_ACEOF
2050 #line 2050 "configure"
2051 #include "confdefs.h"
2052 $ac_declaration
2053 int
2054 main ()
2055 {
2056 exit (42);
2057   ;
2058   return 0;
2059 }
2060 _ACEOF
2061 rm -f conftest.$ac_objext
2062 if { (eval echo "$as_me:2062: \"$ac_compile\"") >&5
2063   (eval $ac_compile) 2>&5
2064   ac_status=$?
2065   echo "$as_me:2065: \$? = $ac_status" >&5
2066   (exit $ac_status); } &&
2067          { ac_try='test -s conftest.$ac_objext'
2068   { (eval echo "$as_me:2068: \"$ac_try\"") >&5
2069   (eval $ac_try) 2>&5
2070   ac_status=$?
2071   echo "$as_me:2071: \$? = $ac_status" >&5
2072   (exit $ac_status); }; }; then
2073   break
2074 else
2075   echo "$as_me: failed program was:" >&5
2076 cat conftest.$ac_ext >&5
2077 fi
2078 rm -f conftest.$ac_objext conftest.$ac_ext
2079 done
2080 rm -f conftest*
2081 if test -n "$ac_declaration"; then
2082   echo '#ifdef __cplusplus' >>confdefs.h
2083   echo $ac_declaration      >>confdefs.h
2084   echo '#endif'             >>confdefs.h
2085 fi
2086
2087 else
2088   echo "$as_me: failed program was:" >&5
2089 cat conftest.$ac_ext >&5
2090 fi
2091 rm -f conftest.$ac_objext conftest.$ac_ext
2092 ac_ext=c
2093 ac_cpp='$CPP $CPPFLAGS'
2094 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2095 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2096 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2097 ac_main_return=return
2098
2099 GCC_VERSION=none
2100 if test "$GCC" = yes ; then
2101         echo "$as_me:2101: checking version of $CC" >&5
2102 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2103         GCC_VERSION="`${CC} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2104         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2105         echo "$as_me:2105: result: $GCC_VERSION" >&5
2106 echo "${ECHO_T}$GCC_VERSION" >&6
2107 fi
2108
2109 ac_ext=c
2110 ac_cpp='$CPP $CPPFLAGS'
2111 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2112 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2113 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2114 ac_main_return=return
2115 echo "$as_me:2115: checking how to run the C preprocessor" >&5
2116 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2117 # On Suns, sometimes $CPP names a directory.
2118 if test -n "$CPP" && test -d "$CPP"; then
2119   CPP=
2120 fi
2121 if test -z "$CPP"; then
2122   if test "${ac_cv_prog_CPP+set}" = set; then
2123   echo $ECHO_N "(cached) $ECHO_C" >&6
2124 else
2125       # Double quotes because CPP needs to be expanded
2126     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2127     do
2128       ac_preproc_ok=false
2129 for ac_c_preproc_warn_flag in '' yes
2130 do
2131   # Use a header file that comes with gcc, so configuring glibc
2132   # with a fresh cross-compiler works.
2133   # On the NeXT, cc -E runs the code through the compiler's parser,
2134   # not just through cpp. "Syntax error" is here to catch this case.
2135   cat >conftest.$ac_ext <<_ACEOF
2136 #line 2136 "configure"
2137 #include "confdefs.h"
2138 #include <assert.h>
2139                      Syntax error
2140 _ACEOF
2141 if { (eval echo "$as_me:2141: \"$ac_cpp conftest.$ac_ext\"") >&5
2142   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2143   ac_status=$?
2144   egrep -v '^ *\+' conftest.er1 >conftest.err
2145   rm -f conftest.er1
2146   cat conftest.err >&5
2147   echo "$as_me:2147: \$? = $ac_status" >&5
2148   (exit $ac_status); } >/dev/null; then
2149   if test -s conftest.err; then
2150     ac_cpp_err=$ac_c_preproc_warn_flag
2151   else
2152     ac_cpp_err=
2153   fi
2154 else
2155   ac_cpp_err=yes
2156 fi
2157 if test -z "$ac_cpp_err"; then
2158   :
2159 else
2160   echo "$as_me: failed program was:" >&5
2161   cat conftest.$ac_ext >&5
2162   # Broken: fails on valid input.
2163 continue
2164 fi
2165 rm -f conftest.err conftest.$ac_ext
2166
2167   # OK, works on sane cases.  Now check whether non-existent headers
2168   # can be detected and how.
2169   cat >conftest.$ac_ext <<_ACEOF
2170 #line 2170 "configure"
2171 #include "confdefs.h"
2172 #include <ac_nonexistent.h>
2173 _ACEOF
2174 if { (eval echo "$as_me:2174: \"$ac_cpp conftest.$ac_ext\"") >&5
2175   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2176   ac_status=$?
2177   egrep -v '^ *\+' conftest.er1 >conftest.err
2178   rm -f conftest.er1
2179   cat conftest.err >&5
2180   echo "$as_me:2180: \$? = $ac_status" >&5
2181   (exit $ac_status); } >/dev/null; then
2182   if test -s conftest.err; then
2183     ac_cpp_err=$ac_c_preproc_warn_flag
2184   else
2185     ac_cpp_err=
2186   fi
2187 else
2188   ac_cpp_err=yes
2189 fi
2190 if test -z "$ac_cpp_err"; then
2191   # Broken: success on invalid input.
2192 continue
2193 else
2194   echo "$as_me: failed program was:" >&5
2195   cat conftest.$ac_ext >&5
2196   # Passes both tests.
2197 ac_preproc_ok=:
2198 break
2199 fi
2200 rm -f conftest.err conftest.$ac_ext
2201
2202 done
2203 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2204 rm -f conftest.err conftest.$ac_ext
2205 if $ac_preproc_ok; then
2206   break
2207 fi
2208
2209     done
2210     ac_cv_prog_CPP=$CPP
2211
2212 fi
2213   CPP=$ac_cv_prog_CPP
2214 else
2215   ac_cv_prog_CPP=$CPP
2216 fi
2217 echo "$as_me:2217: result: $CPP" >&5
2218 echo "${ECHO_T}$CPP" >&6
2219 ac_preproc_ok=false
2220 for ac_c_preproc_warn_flag in '' yes
2221 do
2222   # Use a header file that comes with gcc, so configuring glibc
2223   # with a fresh cross-compiler works.
2224   # On the NeXT, cc -E runs the code through the compiler's parser,
2225   # not just through cpp. "Syntax error" is here to catch this case.
2226   cat >conftest.$ac_ext <<_ACEOF
2227 #line 2227 "configure"
2228 #include "confdefs.h"
2229 #include <assert.h>
2230                      Syntax error
2231 _ACEOF
2232 if { (eval echo "$as_me:2232: \"$ac_cpp conftest.$ac_ext\"") >&5
2233   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2234   ac_status=$?
2235   egrep -v '^ *\+' conftest.er1 >conftest.err
2236   rm -f conftest.er1
2237   cat conftest.err >&5
2238   echo "$as_me:2238: \$? = $ac_status" >&5
2239   (exit $ac_status); } >/dev/null; then
2240   if test -s conftest.err; then
2241     ac_cpp_err=$ac_c_preproc_warn_flag
2242   else
2243     ac_cpp_err=
2244   fi
2245 else
2246   ac_cpp_err=yes
2247 fi
2248 if test -z "$ac_cpp_err"; then
2249   :
2250 else
2251   echo "$as_me: failed program was:" >&5
2252   cat conftest.$ac_ext >&5
2253   # Broken: fails on valid input.
2254 continue
2255 fi
2256 rm -f conftest.err conftest.$ac_ext
2257
2258   # OK, works on sane cases.  Now check whether non-existent headers
2259   # can be detected and how.
2260   cat >conftest.$ac_ext <<_ACEOF
2261 #line 2261 "configure"
2262 #include "confdefs.h"
2263 #include <ac_nonexistent.h>
2264 _ACEOF
2265 if { (eval echo "$as_me:2265: \"$ac_cpp conftest.$ac_ext\"") >&5
2266   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2267   ac_status=$?
2268   egrep -v '^ *\+' conftest.er1 >conftest.err
2269   rm -f conftest.er1
2270   cat conftest.err >&5
2271   echo "$as_me:2271: \$? = $ac_status" >&5
2272   (exit $ac_status); } >/dev/null; then
2273   if test -s conftest.err; then
2274     ac_cpp_err=$ac_c_preproc_warn_flag
2275   else
2276     ac_cpp_err=
2277   fi
2278 else
2279   ac_cpp_err=yes
2280 fi
2281 if test -z "$ac_cpp_err"; then
2282   # Broken: success on invalid input.
2283 continue
2284 else
2285   echo "$as_me: failed program was:" >&5
2286   cat conftest.$ac_ext >&5
2287   # Passes both tests.
2288 ac_preproc_ok=:
2289 break
2290 fi
2291 rm -f conftest.err conftest.$ac_ext
2292
2293 done
2294 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2295 rm -f conftest.err conftest.$ac_ext
2296 if $ac_preproc_ok; then
2297   :
2298 else
2299   { { echo "$as_me:2299: error: C preprocessor \"$CPP\" fails sanity check" >&5
2300 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2301    { (exit 1); exit 1; }; }
2302 fi
2303
2304 ac_ext=c
2305 ac_cpp='$CPP $CPPFLAGS'
2306 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2307 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2308 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2309 ac_main_return=return
2310
2311 if test $ac_cv_c_compiler_gnu = yes; then
2312     echo "$as_me:2312: checking whether $CC needs -traditional" >&5
2313 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2314 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2315   echo $ECHO_N "(cached) $ECHO_C" >&6
2316 else
2317     ac_pattern="Autoconf.*'x'"
2318   cat >conftest.$ac_ext <<_ACEOF
2319 #line 2319 "configure"
2320 #include "confdefs.h"
2321 #include <sgtty.h>
2322 int Autoconf = TIOCGETP;
2323 _ACEOF
2324 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2325   egrep "$ac_pattern" >/dev/null 2>&1; then
2326   ac_cv_prog_gcc_traditional=yes
2327 else
2328   ac_cv_prog_gcc_traditional=no
2329 fi
2330 rm -f conftest*
2331
2332   if test $ac_cv_prog_gcc_traditional = no; then
2333     cat >conftest.$ac_ext <<_ACEOF
2334 #line 2334 "configure"
2335 #include "confdefs.h"
2336 #include <termio.h>
2337 int Autoconf = TCGETA;
2338 _ACEOF
2339 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2340   egrep "$ac_pattern" >/dev/null 2>&1; then
2341   ac_cv_prog_gcc_traditional=yes
2342 fi
2343 rm -f conftest*
2344
2345   fi
2346 fi
2347 echo "$as_me:2347: result: $ac_cv_prog_gcc_traditional" >&5
2348 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2349   if test $ac_cv_prog_gcc_traditional = yes; then
2350     CC="$CC -traditional"
2351   fi
2352 fi
2353
2354 echo "$as_me:2354: checking whether $CC understands -c and -o together" >&5
2355 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2356 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2357   echo $ECHO_N "(cached) $ECHO_C" >&6
2358 else
2359
2360 cat > conftest.$ac_ext <<CF_EOF
2361 #include <stdio.h>
2362 int main()
2363 {
2364         ${cf_cv_main_return:-return}(0);
2365 }
2366 CF_EOF
2367 # We do the test twice because some compilers refuse to overwrite an
2368 # existing .o file with -o, though they will create one.
2369 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2370 if { (eval echo "$as_me:2370: \"$ac_try\"") >&5
2371   (eval $ac_try) 2>&5
2372   ac_status=$?
2373   echo "$as_me:2373: \$? = $ac_status" >&5
2374   (exit $ac_status); } &&
2375   test -f conftest2.$ac_objext && { (eval echo "$as_me:2375: \"$ac_try\"") >&5
2376   (eval $ac_try) 2>&5
2377   ac_status=$?
2378   echo "$as_me:2378: \$? = $ac_status" >&5
2379   (exit $ac_status); };
2380 then
2381   eval cf_cv_prog_CC_c_o=yes
2382 else
2383   eval cf_cv_prog_CC_c_o=no
2384 fi
2385 rm -f conftest*
2386
2387 fi
2388 if test $cf_cv_prog_CC_c_o = yes; then
2389   echo "$as_me:2389: result: yes" >&5
2390 echo "${ECHO_T}yes" >&6
2391 else
2392   echo "$as_me:2392: result: no" >&5
2393 echo "${ECHO_T}no" >&6
2394 fi
2395
2396 echo "$as_me:2396: checking for POSIXized ISC" >&5
2397 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2398 if test -d /etc/conf/kconfig.d &&
2399    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2400 then
2401   echo "$as_me:2401: result: yes" >&5
2402 echo "${ECHO_T}yes" >&6
2403   ISC=yes # If later tests want to check for ISC.
2404
2405 cat >>confdefs.h <<\EOF
2406 #define _POSIX_SOURCE 1
2407 EOF
2408
2409   if test "$GCC" = yes; then
2410     CC="$CC -posix"
2411   else
2412     CC="$CC -Xp"
2413   fi
2414 else
2415   echo "$as_me:2415: result: no" >&5
2416 echo "${ECHO_T}no" >&6
2417   ISC=
2418 fi
2419
2420 echo "$as_me:2420: checking for ${CC-cc} option to accept ANSI C" >&5
2421 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6
2422 if test "${cf_cv_ansi_cc+set}" = set; then
2423   echo $ECHO_N "(cached) $ECHO_C" >&6
2424 else
2425
2426 cf_cv_ansi_cc=no
2427 cf_save_CFLAGS="$CFLAGS"
2428 cf_save_CPPFLAGS="$CPPFLAGS"
2429 # Don't try gcc -ansi; that turns off useful extensions and
2430 # breaks some systems' header files.
2431 # AIX                   -qlanglvl=ansi
2432 # Ultrix and OSF/1      -std1
2433 # HP-UX                 -Aa -D_HPUX_SOURCE
2434 # SVR4                  -Xc
2435 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2436 for cf_arg in "-DCC_HAS_PROTOS" \
2437         "" \
2438         -qlanglvl=ansi \
2439         -std1 \
2440         -Ae \
2441         "-Aa -D_HPUX_SOURCE" \
2442         -Xc
2443 do
2444
2445 cf_fix_cppflags=no
2446 cf_new_cflags=
2447 cf_new_cppflags=
2448 cf_new_extra_cppflags=
2449
2450 for cf_add_cflags in $cf_arg
2451 do
2452 case $cf_fix_cppflags in
2453 no)
2454         case $cf_add_cflags in #(vi
2455         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2456                 case $cf_add_cflags in
2457                 -D*)
2458                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2459
2460                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2461                                 && test -z "${cf_tst_cflags}" \
2462                                 && cf_fix_cppflags=yes
2463
2464                         if test $cf_fix_cppflags = yes ; then
2465                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2466                                 continue
2467                         elif test "${cf_tst_cflags}" = "\"'" ; then
2468                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2469                                 continue
2470                         fi
2471                         ;;
2472                 esac
2473                 case "$CPPFLAGS" in
2474                 *$cf_add_cflags) #(vi
2475                         ;;
2476                 *) #(vi
2477                         case $cf_add_cflags in #(vi
2478                         -D*)
2479                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2480
2481 CPPFLAGS=`echo "$CPPFLAGS" | \
2482         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2483                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2484
2485                                 ;;
2486                         esac
2487                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2488                         ;;
2489                 esac
2490                 ;;
2491         *)
2492                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2493                 ;;
2494         esac
2495         ;;
2496 yes)
2497         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2498
2499         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2500
2501         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2502                 && test -z "${cf_tst_cflags}" \
2503                 && cf_fix_cppflags=no
2504         ;;
2505 esac
2506 done
2507
2508 if test -n "$cf_new_cflags" ; then
2509
2510         CFLAGS="$CFLAGS $cf_new_cflags"
2511 fi
2512
2513 if test -n "$cf_new_cppflags" ; then
2514
2515         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2516 fi
2517
2518 if test -n "$cf_new_extra_cppflags" ; then
2519
2520         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2521 fi
2522
2523         cat >conftest.$ac_ext <<_ACEOF
2524 #line 2524 "configure"
2525 #include "confdefs.h"
2526
2527 #ifndef CC_HAS_PROTOS
2528 #if !defined(__STDC__) || (__STDC__ != 1)
2529 choke me
2530 #endif
2531 #endif
2532
2533 int
2534 main ()
2535 {
2536
2537         int test (int i, double x);
2538         struct s1 {int (*f) (int a);};
2539         struct s2 {int (*f) (double a);};
2540   ;
2541   return 0;
2542 }
2543 _ACEOF
2544 rm -f conftest.$ac_objext
2545 if { (eval echo "$as_me:2545: \"$ac_compile\"") >&5
2546   (eval $ac_compile) 2>&5
2547   ac_status=$?
2548   echo "$as_me:2548: \$? = $ac_status" >&5
2549   (exit $ac_status); } &&
2550          { ac_try='test -s conftest.$ac_objext'
2551   { (eval echo "$as_me:2551: \"$ac_try\"") >&5
2552   (eval $ac_try) 2>&5
2553   ac_status=$?
2554   echo "$as_me:2554: \$? = $ac_status" >&5
2555   (exit $ac_status); }; }; then
2556   cf_cv_ansi_cc="$cf_arg"; break
2557 else
2558   echo "$as_me: failed program was:" >&5
2559 cat conftest.$ac_ext >&5
2560 fi
2561 rm -f conftest.$ac_objext conftest.$ac_ext
2562 done
2563 CFLAGS="$cf_save_CFLAGS"
2564 CPPFLAGS="$cf_save_CPPFLAGS"
2565
2566 fi
2567 echo "$as_me:2567: result: $cf_cv_ansi_cc" >&5
2568 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2569
2570 if test "$cf_cv_ansi_cc" != "no"; then
2571 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2572
2573 cf_fix_cppflags=no
2574 cf_new_cflags=
2575 cf_new_cppflags=
2576 cf_new_extra_cppflags=
2577
2578 for cf_add_cflags in $cf_cv_ansi_cc
2579 do
2580 case $cf_fix_cppflags in
2581 no)
2582         case $cf_add_cflags in #(vi
2583         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2584                 case $cf_add_cflags in
2585                 -D*)
2586                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2587
2588                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2589                                 && test -z "${cf_tst_cflags}" \
2590                                 && cf_fix_cppflags=yes
2591
2592                         if test $cf_fix_cppflags = yes ; then
2593                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2594                                 continue
2595                         elif test "${cf_tst_cflags}" = "\"'" ; then
2596                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2597                                 continue
2598                         fi
2599                         ;;
2600                 esac
2601                 case "$CPPFLAGS" in
2602                 *$cf_add_cflags) #(vi
2603                         ;;
2604                 *) #(vi
2605                         case $cf_add_cflags in #(vi
2606                         -D*)
2607                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2608
2609 CPPFLAGS=`echo "$CPPFLAGS" | \
2610         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2611                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2612
2613                                 ;;
2614                         esac
2615                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2616                         ;;
2617                 esac
2618                 ;;
2619         *)
2620                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2621                 ;;
2622         esac
2623         ;;
2624 yes)
2625         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2626
2627         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2628
2629         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2630                 && test -z "${cf_tst_cflags}" \
2631                 && cf_fix_cppflags=no
2632         ;;
2633 esac
2634 done
2635
2636 if test -n "$cf_new_cflags" ; then
2637
2638         CFLAGS="$CFLAGS $cf_new_cflags"
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2644 fi
2645
2646 if test -n "$cf_new_extra_cppflags" ; then
2647
2648         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2649 fi
2650
2651 else
2652         cat >>confdefs.h <<\EOF
2653 #define CC_HAS_PROTOS 1
2654 EOF
2655
2656 fi
2657 fi
2658
2659 if test "$cf_cv_ansi_cc" = "no"; then
2660         { { echo "$as_me:2660: error: Your compiler does not appear to recognize prototypes.
2661 You have the following choices:
2662         a. adjust your compiler options
2663         b. get an up-to-date compiler
2664         c. use a wrapper such as unproto" >&5
2665 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2666 You have the following choices:
2667         a. adjust your compiler options
2668         b. get an up-to-date compiler
2669         c. use a wrapper such as unproto" >&2;}
2670    { (exit 1); exit 1; }; }
2671 fi
2672
2673 case $cf_cv_system_name in
2674 os2*)
2675     CFLAGS="$CFLAGS -Zmt"
2676     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2677     CXXFLAGS="$CXXFLAGS -Zmt"
2678     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2679     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2680     ac_cv_exeext=.exe
2681     ;;
2682 esac
2683
2684 PROG_EXT="$EXEEXT"
2685
2686 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2687 #define PROG_EXT "$PROG_EXT"
2688 EOF
2689
2690 if test "$cross_compiling" = yes ; then
2691   LDCONFIG=:
2692 else
2693 case "$cf_cv_system_name" in #(vi
2694 dragonfly*|freebsd*) #(vi
2695   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2696   ;;
2697 *) LDPATH=$PATH:/sbin:/usr/sbin
2698   # Extract the first word of "ldconfig", so it can be a program name with args.
2699 set dummy ldconfig; ac_word=$2
2700 echo "$as_me:2700: checking for $ac_word" >&5
2701 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2702 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2703   echo $ECHO_N "(cached) $ECHO_C" >&6
2704 else
2705   case $LDCONFIG in
2706   [\\/]* | ?:[\\/]*)
2707   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2708   ;;
2709   *)
2710   ac_save_IFS=$IFS; IFS=$ac_path_separator
2711 ac_dummy="$LDPATH"
2712 for ac_dir in $ac_dummy; do
2713   IFS=$ac_save_IFS
2714   test -z "$ac_dir" && ac_dir=.
2715   if $as_executable_p "$ac_dir/$ac_word"; then
2716    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2717    echo "$as_me:2717: found $ac_dir/$ac_word" >&5
2718    break
2719 fi
2720 done
2721
2722   ;;
2723 esac
2724 fi
2725 LDCONFIG=$ac_cv_path_LDCONFIG
2726
2727 if test -n "$LDCONFIG"; then
2728   echo "$as_me:2728: result: $LDCONFIG" >&5
2729 echo "${ECHO_T}$LDCONFIG" >&6
2730 else
2731   echo "$as_me:2731: result: no" >&5
2732 echo "${ECHO_T}no" >&6
2733 fi
2734
2735   ;;
2736 esac
2737 fi
2738
2739 echo "$as_me:2739: checking if you want to ensure bool is consistent with C++" >&5
2740 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2741
2742 # Check whether --with-cxx or --without-cxx was given.
2743 if test "${with_cxx+set}" = set; then
2744   withval="$with_cxx"
2745   cf_with_cxx=$withval
2746 else
2747   cf_with_cxx=yes
2748 fi;
2749 echo "$as_me:2749: result: $cf_with_cxx" >&5
2750 echo "${ECHO_T}$cf_with_cxx" >&6
2751 if test "X$cf_with_cxx" = Xno ; then
2752         CXX=""
2753         GXX=""
2754 else
2755         # with autoconf 2.13, we can change the error to a warning:
2756                 ac_ext=cc
2757 ac_cpp='$CXXCPP $CPPFLAGS'
2758 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2759 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2760 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2761 ac_main_return=return
2762 if test -n "$ac_tool_prefix"; then
2763   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2764   do
2765     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2766 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2767 echo "$as_me:2767: checking for $ac_word" >&5
2768 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2769 if test "${ac_cv_prog_CXX+set}" = set; then
2770   echo $ECHO_N "(cached) $ECHO_C" >&6
2771 else
2772   if test -n "$CXX"; then
2773   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2774 else
2775   ac_save_IFS=$IFS; IFS=$ac_path_separator
2776 ac_dummy="$PATH"
2777 for ac_dir in $ac_dummy; do
2778   IFS=$ac_save_IFS
2779   test -z "$ac_dir" && ac_dir=.
2780   $as_executable_p "$ac_dir/$ac_word" || continue
2781 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2782 echo "$as_me:2782: found $ac_dir/$ac_word" >&5
2783 break
2784 done
2785
2786 fi
2787 fi
2788 CXX=$ac_cv_prog_CXX
2789 if test -n "$CXX"; then
2790   echo "$as_me:2790: result: $CXX" >&5
2791 echo "${ECHO_T}$CXX" >&6
2792 else
2793   echo "$as_me:2793: result: no" >&5
2794 echo "${ECHO_T}no" >&6
2795 fi
2796
2797     test -n "$CXX" && break
2798   done
2799 fi
2800 if test -z "$CXX"; then
2801   ac_ct_CXX=$CXX
2802   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2803 do
2804   # Extract the first word of "$ac_prog", so it can be a program name with args.
2805 set dummy $ac_prog; ac_word=$2
2806 echo "$as_me:2806: checking for $ac_word" >&5
2807 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2808 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2809   echo $ECHO_N "(cached) $ECHO_C" >&6
2810 else
2811   if test -n "$ac_ct_CXX"; then
2812   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2813 else
2814   ac_save_IFS=$IFS; IFS=$ac_path_separator
2815 ac_dummy="$PATH"
2816 for ac_dir in $ac_dummy; do
2817   IFS=$ac_save_IFS
2818   test -z "$ac_dir" && ac_dir=.
2819   $as_executable_p "$ac_dir/$ac_word" || continue
2820 ac_cv_prog_ac_ct_CXX="$ac_prog"
2821 echo "$as_me:2821: found $ac_dir/$ac_word" >&5
2822 break
2823 done
2824
2825 fi
2826 fi
2827 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2828 if test -n "$ac_ct_CXX"; then
2829   echo "$as_me:2829: result: $ac_ct_CXX" >&5
2830 echo "${ECHO_T}$ac_ct_CXX" >&6
2831 else
2832   echo "$as_me:2832: result: no" >&5
2833 echo "${ECHO_T}no" >&6
2834 fi
2835
2836   test -n "$ac_ct_CXX" && break
2837 done
2838 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2839
2840   CXX=$ac_ct_CXX
2841 fi
2842
2843 # Provide some information about the compiler.
2844 echo "$as_me:2844:" \
2845      "checking for C++ compiler version" >&5
2846 ac_compiler=`set X $ac_compile; echo $2`
2847 { (eval echo "$as_me:2847: \"$ac_compiler --version </dev/null >&5\"") >&5
2848   (eval $ac_compiler --version </dev/null >&5) 2>&5
2849   ac_status=$?
2850   echo "$as_me:2850: \$? = $ac_status" >&5
2851   (exit $ac_status); }
2852 { (eval echo "$as_me:2852: \"$ac_compiler -v </dev/null >&5\"") >&5
2853   (eval $ac_compiler -v </dev/null >&5) 2>&5
2854   ac_status=$?
2855   echo "$as_me:2855: \$? = $ac_status" >&5
2856   (exit $ac_status); }
2857 { (eval echo "$as_me:2857: \"$ac_compiler -V </dev/null >&5\"") >&5
2858   (eval $ac_compiler -V </dev/null >&5) 2>&5
2859   ac_status=$?
2860   echo "$as_me:2860: \$? = $ac_status" >&5
2861   (exit $ac_status); }
2862
2863 echo "$as_me:2863: checking whether we are using the GNU C++ compiler" >&5
2864 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2865 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2866   echo $ECHO_N "(cached) $ECHO_C" >&6
2867 else
2868   cat >conftest.$ac_ext <<_ACEOF
2869 #line 2869 "configure"
2870 #include "confdefs.h"
2871
2872 int
2873 main ()
2874 {
2875 #ifndef __GNUC__
2876        choke me
2877 #endif
2878
2879   ;
2880   return 0;
2881 }
2882 _ACEOF
2883 rm -f conftest.$ac_objext
2884 if { (eval echo "$as_me:2884: \"$ac_compile\"") >&5
2885   (eval $ac_compile) 2>&5
2886   ac_status=$?
2887   echo "$as_me:2887: \$? = $ac_status" >&5
2888   (exit $ac_status); } &&
2889          { ac_try='test -s conftest.$ac_objext'
2890   { (eval echo "$as_me:2890: \"$ac_try\"") >&5
2891   (eval $ac_try) 2>&5
2892   ac_status=$?
2893   echo "$as_me:2893: \$? = $ac_status" >&5
2894   (exit $ac_status); }; }; then
2895   ac_compiler_gnu=yes
2896 else
2897   echo "$as_me: failed program was:" >&5
2898 cat conftest.$ac_ext >&5
2899 ac_compiler_gnu=no
2900 fi
2901 rm -f conftest.$ac_objext conftest.$ac_ext
2902 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
2903
2904 fi
2905 echo "$as_me:2905: result: $ac_cv_cxx_compiler_gnu" >&5
2906 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
2907 GXX=`test $ac_compiler_gnu = yes && echo yes`
2908 ac_test_CXXFLAGS=${CXXFLAGS+set}
2909 ac_save_CXXFLAGS=$CXXFLAGS
2910 CXXFLAGS="-g"
2911 echo "$as_me:2911: checking whether $CXX accepts -g" >&5
2912 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
2913 if test "${ac_cv_prog_cxx_g+set}" = set; then
2914   echo $ECHO_N "(cached) $ECHO_C" >&6
2915 else
2916   cat >conftest.$ac_ext <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919
2920 int
2921 main ()
2922 {
2923
2924   ;
2925   return 0;
2926 }
2927 _ACEOF
2928 rm -f conftest.$ac_objext
2929 if { (eval echo "$as_me:2929: \"$ac_compile\"") >&5
2930   (eval $ac_compile) 2>&5
2931   ac_status=$?
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit $ac_status); } &&
2934          { ac_try='test -s conftest.$ac_objext'
2935   { (eval echo "$as_me:2935: \"$ac_try\"") >&5
2936   (eval $ac_try) 2>&5
2937   ac_status=$?
2938   echo "$as_me:2938: \$? = $ac_status" >&5
2939   (exit $ac_status); }; }; then
2940   ac_cv_prog_cxx_g=yes
2941 else
2942   echo "$as_me: failed program was:" >&5
2943 cat conftest.$ac_ext >&5
2944 ac_cv_prog_cxx_g=no
2945 fi
2946 rm -f conftest.$ac_objext conftest.$ac_ext
2947 fi
2948 echo "$as_me:2948: result: $ac_cv_prog_cxx_g" >&5
2949 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
2950 if test "$ac_test_CXXFLAGS" = set; then
2951   CXXFLAGS=$ac_save_CXXFLAGS
2952 elif test $ac_cv_prog_cxx_g = yes; then
2953   if test "$GXX" = yes; then
2954     CXXFLAGS="-g -O2"
2955   else
2956     CXXFLAGS="-g"
2957   fi
2958 else
2959   if test "$GXX" = yes; then
2960     CXXFLAGS="-O2"
2961   else
2962     CXXFLAGS=
2963   fi
2964 fi
2965 for ac_declaration in \
2966    ''\
2967    '#include <stdlib.h>' \
2968    'extern "C" void std::exit (int) throw (); using std::exit;' \
2969    'extern "C" void std::exit (int); using std::exit;' \
2970    'extern "C" void exit (int) throw ();' \
2971    'extern "C" void exit (int);' \
2972    'void exit (int);'
2973 do
2974   cat >conftest.$ac_ext <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 #include <stdlib.h>
2978 $ac_declaration
2979 int
2980 main ()
2981 {
2982 exit (42);
2983   ;
2984   return 0;
2985 }
2986 _ACEOF
2987 rm -f conftest.$ac_objext
2988 if { (eval echo "$as_me:2988: \"$ac_compile\"") >&5
2989   (eval $ac_compile) 2>&5
2990   ac_status=$?
2991   echo "$as_me:2991: \$? = $ac_status" >&5
2992   (exit $ac_status); } &&
2993          { ac_try='test -s conftest.$ac_objext'
2994   { (eval echo "$as_me:2994: \"$ac_try\"") >&5
2995   (eval $ac_try) 2>&5
2996   ac_status=$?
2997   echo "$as_me:2997: \$? = $ac_status" >&5
2998   (exit $ac_status); }; }; then
2999   :
3000 else
3001   echo "$as_me: failed program was:" >&5
3002 cat conftest.$ac_ext >&5
3003 continue
3004 fi
3005 rm -f conftest.$ac_objext conftest.$ac_ext
3006   cat >conftest.$ac_ext <<_ACEOF
3007 #line 3007 "configure"
3008 #include "confdefs.h"
3009 $ac_declaration
3010 int
3011 main ()
3012 {
3013 exit (42);
3014   ;
3015   return 0;
3016 }
3017 _ACEOF
3018 rm -f conftest.$ac_objext
3019 if { (eval echo "$as_me:3019: \"$ac_compile\"") >&5
3020   (eval $ac_compile) 2>&5
3021   ac_status=$?
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit $ac_status); } &&
3024          { ac_try='test -s conftest.$ac_objext'
3025   { (eval echo "$as_me:3025: \"$ac_try\"") >&5
3026   (eval $ac_try) 2>&5
3027   ac_status=$?
3028   echo "$as_me:3028: \$? = $ac_status" >&5
3029   (exit $ac_status); }; }; then
3030   break
3031 else
3032   echo "$as_me: failed program was:" >&5
3033 cat conftest.$ac_ext >&5
3034 fi
3035 rm -f conftest.$ac_objext conftest.$ac_ext
3036 done
3037 rm -f conftest*
3038 if test -n "$ac_declaration"; then
3039   echo '#ifdef __cplusplus' >>confdefs.h
3040   echo $ac_declaration      >>confdefs.h
3041   echo '#endif'             >>confdefs.h
3042 fi
3043
3044 ac_ext=c
3045 ac_cpp='$CPP $CPPFLAGS'
3046 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3047 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3048 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3049 ac_main_return=return
3050
3051                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3052         if test "$CXX" = "g++" ; then
3053                 # Extract the first word of "g++", so it can be a program name with args.
3054 set dummy g++; ac_word=$2
3055 echo "$as_me:3055: checking for $ac_word" >&5
3056 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3057 if test "${ac_cv_path_CXX+set}" = set; then
3058   echo $ECHO_N "(cached) $ECHO_C" >&6
3059 else
3060   case $CXX in
3061   [\\/]* | ?:[\\/]*)
3062   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3063   ;;
3064   *)
3065   ac_save_IFS=$IFS; IFS=$ac_path_separator
3066 ac_dummy="$PATH"
3067 for ac_dir in $ac_dummy; do
3068   IFS=$ac_save_IFS
3069   test -z "$ac_dir" && ac_dir=.
3070   if $as_executable_p "$ac_dir/$ac_word"; then
3071    ac_cv_path_CXX="$ac_dir/$ac_word"
3072    echo "$as_me:3072: found $ac_dir/$ac_word" >&5
3073    break
3074 fi
3075 done
3076
3077   ;;
3078 esac
3079 fi
3080 CXX=$ac_cv_path_CXX
3081
3082 if test -n "$CXX"; then
3083   echo "$as_me:3083: result: $CXX" >&5
3084 echo "${ECHO_T}$CXX" >&6
3085 else
3086   echo "$as_me:3086: result: no" >&5
3087 echo "${ECHO_T}no" >&6
3088 fi
3089
3090         fi
3091         if test "$CXX" = "g++" ; then
3092                 { echo "$as_me:3092: WARNING: ignoring hardcoded g++" >&5
3093 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3094                 cf_with_cxx=no; CXX=""; GXX="";
3095         fi
3096 fi
3097
3098 GXX_VERSION=none
3099 if test "$GXX" = yes; then
3100         echo "$as_me:3100: checking version of g++" >&5
3101 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3102         GXX_VERSION="`${CXX-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3103         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3104         echo "$as_me:3104: result: $GXX_VERSION" >&5
3105 echo "${ECHO_T}$GXX_VERSION" >&6
3106 fi
3107
3108 case $GXX_VERSION in
3109 1*|2.[0-6]*)
3110         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3111         # cf_cxx_library=no
3112         { echo "$as_me:3112: WARNING: templates do not work" >&5
3113 echo "$as_me: WARNING: templates do not work" >&2;}
3114         ;;
3115 esac
3116
3117 echo "$as_me:3117: checking if you want to build C++ binding and demo" >&5
3118 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3119
3120 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3121 if test "${with_cxx_binding+set}" = set; then
3122   withval="$with_cxx_binding"
3123   cf_with_cxx_binding=$withval
3124 else
3125   cf_with_cxx_binding=$cf_with_cxx
3126 fi;
3127 echo "$as_me:3127: result: $cf_with_cxx_binding" >&5
3128 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3129
3130 echo "$as_me:3130: checking if you want to build with Ada95" >&5
3131 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3132
3133 # Check whether --with-ada or --without-ada was given.
3134 if test "${with_ada+set}" = set; then
3135   withval="$with_ada"
3136   cf_with_ada=$withval
3137 else
3138   cf_with_ada=yes
3139 fi;
3140 echo "$as_me:3140: result: $cf_with_ada" >&5
3141 echo "${ECHO_T}$cf_with_ada" >&6
3142
3143 echo "$as_me:3143: checking if you want to install manpages" >&5
3144 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3145
3146 # Check whether --with-manpages or --without-manpages was given.
3147 if test "${with_manpages+set}" = set; then
3148   withval="$with_manpages"
3149   cf_with_manpages=$withval
3150 else
3151   cf_with_manpages=yes
3152 fi;
3153 echo "$as_me:3153: result: $cf_with_manpages" >&5
3154 echo "${ECHO_T}$cf_with_manpages" >&6
3155
3156 echo "$as_me:3156: checking if you want to build programs such as tic" >&5
3157 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3158
3159 # Check whether --with-progs or --without-progs was given.
3160 if test "${with_progs+set}" = set; then
3161   withval="$with_progs"
3162   cf_with_progs=$withval
3163 else
3164   cf_with_progs=yes
3165 fi;
3166 echo "$as_me:3166: result: $cf_with_progs" >&5
3167 echo "${ECHO_T}$cf_with_progs" >&6
3168
3169 echo "$as_me:3169: checking if you wish to install curses.h" >&5
3170 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3171
3172 # Check whether --with-curses-h or --without-curses-h was given.
3173 if test "${with_curses_h+set}" = set; then
3174   withval="$with_curses_h"
3175   with_curses_h=$withval
3176 else
3177   with_curses_h=yes
3178 fi;
3179 echo "$as_me:3179: result: $with_curses_h" >&5
3180 echo "${ECHO_T}$with_curses_h" >&6
3181
3182 modules_to_build="ncurses"
3183 if test "X$cf_with_progs" != Xno ; then
3184 modules_to_build="$modules_to_build progs tack"
3185 fi
3186 modules_to_build="$modules_to_build panel menu form"
3187
3188 test "$program_prefix" != NONE &&
3189   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3190 # Use a double $ so make ignores it.
3191 test "$program_suffix" != NONE &&
3192   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3193 # Double any \ or $.  echo might interpret backslashes.
3194 # By default was `s,x,x', remove it if useless.
3195 cat <<\_ACEOF >conftest.sed
3196 s/[\\$]/&&/g;s/;s,x,x,$//
3197 _ACEOF
3198 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3199 rm conftest.sed
3200
3201 for ac_prog in mawk gawk nawk awk
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_AWK+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$AWK"; then
3211   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_AWK="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 AWK=$ac_cv_prog_AWK
3227 if test -n "$AWK"; then
3228   echo "$as_me:3228: result: $AWK" >&5
3229 echo "${ECHO_T}$AWK" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$AWK" && break
3236 done
3237
3238 test -z "$AWK" && { { echo "$as_me:3238: error: No awk program found" >&5
3239 echo "$as_me: error: No awk program found" >&2;}
3240    { (exit 1); exit 1; }; }
3241
3242 echo "$as_me:3242: checking for egrep" >&5
3243 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3244 if test "${ac_cv_prog_egrep+set}" = set; then
3245   echo $ECHO_N "(cached) $ECHO_C" >&6
3246 else
3247   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3248     then ac_cv_prog_egrep='grep -E'
3249     else ac_cv_prog_egrep='egrep'
3250     fi
3251 fi
3252 echo "$as_me:3252: result: $ac_cv_prog_egrep" >&5
3253 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3254  EGREP=$ac_cv_prog_egrep
3255
3256 test -z "$EGREP" && { { echo "$as_me:3256: error: No egrep program found" >&5
3257 echo "$as_me: error: No egrep program found" >&2;}
3258    { (exit 1); exit 1; }; }
3259
3260 # Find a good install program.  We prefer a C program (faster),
3261 # so one script is as good as another.  But avoid the broken or
3262 # incompatible versions:
3263 # SysV /etc/install, /usr/sbin/install
3264 # SunOS /usr/etc/install
3265 # IRIX /sbin/install
3266 # AIX /bin/install
3267 # AmigaOS /C/install, which installs bootblocks on floppy discs
3268 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3269 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3270 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3271 # ./install, which can be erroneously created by make from ./install.sh.
3272 echo "$as_me:3272: checking for a BSD compatible install" >&5
3273 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3274 if test -z "$INSTALL"; then
3275 if test "${ac_cv_path_install+set}" = set; then
3276   echo $ECHO_N "(cached) $ECHO_C" >&6
3277 else
3278     ac_save_IFS=$IFS; IFS=$ac_path_separator
3279   for ac_dir in $PATH; do
3280     IFS=$ac_save_IFS
3281     # Account for people who put trailing slashes in PATH elements.
3282     case $ac_dir/ in
3283     / | ./ | .// | /cC/* \
3284     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3285     | /usr/ucb/* ) ;;
3286     *)
3287       # OSF1 and SCO ODT 3.0 have their own names for install.
3288       # Don't use installbsd from OSF since it installs stuff as root
3289       # by default.
3290       for ac_prog in ginstall scoinst install; do
3291         if $as_executable_p "$ac_dir/$ac_prog"; then
3292           if test $ac_prog = install &&
3293             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3294             # AIX install.  It has an incompatible calling convention.
3295             :
3296           elif test $ac_prog = install &&
3297             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3298             # program-specific install script used by HP pwplus--don't use.
3299             :
3300           else
3301             ac_cv_path_install="$ac_dir/$ac_prog -c"
3302             break 2
3303           fi
3304         fi
3305       done
3306       ;;
3307     esac
3308   done
3309
3310 fi
3311   if test "${ac_cv_path_install+set}" = set; then
3312     INSTALL=$ac_cv_path_install
3313   else
3314     # As a last resort, use the slow shell script.  We don't cache a
3315     # path for INSTALL within a source directory, because that will
3316     # break other packages using the cache if that directory is
3317     # removed, or if the path is relative.
3318     INSTALL=$ac_install_sh
3319   fi
3320 fi
3321 echo "$as_me:3321: result: $INSTALL" >&5
3322 echo "${ECHO_T}$INSTALL" >&6
3323
3324 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3325 # It thinks the first close brace ends the variable substitution.
3326 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3327
3328 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3329
3330 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3331
3332 case $INSTALL in
3333 /*)
3334   ;;
3335 *)
3336   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3337   test -z "$cf_dir" && cf_dir=.
3338   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3339   ;;
3340 esac
3341
3342 for ac_prog in tdlint lint alint splint lclint
3343 do
3344   # Extract the first word of "$ac_prog", so it can be a program name with args.
3345 set dummy $ac_prog; ac_word=$2
3346 echo "$as_me:3346: checking for $ac_word" >&5
3347 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3348 if test "${ac_cv_prog_LINT+set}" = set; then
3349   echo $ECHO_N "(cached) $ECHO_C" >&6
3350 else
3351   if test -n "$LINT"; then
3352   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3353 else
3354   ac_save_IFS=$IFS; IFS=$ac_path_separator
3355 ac_dummy="$PATH"
3356 for ac_dir in $ac_dummy; do
3357   IFS=$ac_save_IFS
3358   test -z "$ac_dir" && ac_dir=.
3359   $as_executable_p "$ac_dir/$ac_word" || continue
3360 ac_cv_prog_LINT="$ac_prog"
3361 echo "$as_me:3361: found $ac_dir/$ac_word" >&5
3362 break
3363 done
3364
3365 fi
3366 fi
3367 LINT=$ac_cv_prog_LINT
3368 if test -n "$LINT"; then
3369   echo "$as_me:3369: result: $LINT" >&5
3370 echo "${ECHO_T}$LINT" >&6
3371 else
3372   echo "$as_me:3372: result: no" >&5
3373 echo "${ECHO_T}no" >&6
3374 fi
3375
3376   test -n "$LINT" && break
3377 done
3378
3379 echo "$as_me:3379: checking whether ln -s works" >&5
3380 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3381 LN_S=$as_ln_s
3382 if test "$LN_S" = "ln -s"; then
3383   echo "$as_me:3383: result: yes" >&5
3384 echo "${ECHO_T}yes" >&6
3385 else
3386   echo "$as_me:3386: result: no, using $LN_S" >&5
3387 echo "${ECHO_T}no, using $LN_S" >&6
3388 fi
3389
3390 echo "$as_me:3390: checking for long file names" >&5
3391 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3392 if test "${ac_cv_sys_long_file_names+set}" = set; then
3393   echo $ECHO_N "(cached) $ECHO_C" >&6
3394 else
3395   ac_cv_sys_long_file_names=yes
3396 # Test for long file names in all the places we know might matter:
3397 #      .                the current directory, where building will happen
3398 #      $prefix/lib      where we will be installing things
3399 #      $exec_prefix/lib likewise
3400 # eval it to expand exec_prefix.
3401 #      $TMPDIR          if set, where it might want to write temporary files
3402 # if $TMPDIR is not set:
3403 #      /tmp             where it might want to write temporary files
3404 #      /var/tmp         likewise
3405 #      /usr/tmp         likewise
3406 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3407   ac_tmpdirs=$TMPDIR
3408 else
3409   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3410 fi
3411 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3412   test -d $ac_dir || continue
3413   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3414   ac_xdir=$ac_dir/cf$$
3415   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3416   ac_tf1=$ac_xdir/conftest9012345
3417   ac_tf2=$ac_xdir/conftest9012346
3418   (echo 1 >$ac_tf1) 2>/dev/null
3419   (echo 2 >$ac_tf2) 2>/dev/null
3420   ac_val=`cat $ac_tf1 2>/dev/null`
3421   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3422     ac_cv_sys_long_file_names=no
3423     rm -rf $ac_xdir 2>/dev/null
3424     break
3425   fi
3426   rm -rf $ac_xdir 2>/dev/null
3427 done
3428 fi
3429 echo "$as_me:3429: result: $ac_cv_sys_long_file_names" >&5
3430 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3431 if test $ac_cv_sys_long_file_names = yes; then
3432
3433 cat >>confdefs.h <<\EOF
3434 #define HAVE_LONG_FILE_NAMES 1
3435 EOF
3436
3437 fi
3438
3439 # if we find pkg-config, check if we should install the ".pc" files.
3440
3441 echo "$as_me:3441: checking if you want to use pkg-config" >&5
3442 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3443
3444 # Check whether --with-pkg-config or --without-pkg-config was given.
3445 if test "${with_pkg_config+set}" = set; then
3446   withval="$with_pkg_config"
3447   cf_pkg_config=$withval
3448 else
3449   cf_pkg_config=yes
3450 fi;
3451 echo "$as_me:3451: result: $cf_pkg_config" >&5
3452 echo "${ECHO_T}$cf_pkg_config" >&6
3453
3454 case $cf_pkg_config in #(vi
3455 no) #(vi
3456         PKG_CONFIG=none
3457         ;;
3458 yes) #(vi
3459         # Extract the first word of "pkg-config", so it can be a program name with args.
3460 set dummy pkg-config; ac_word=$2
3461 echo "$as_me:3461: checking for $ac_word" >&5
3462 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3463 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3464   echo $ECHO_N "(cached) $ECHO_C" >&6
3465 else
3466   case $PKG_CONFIG in
3467   [\\/]* | ?:[\\/]*)
3468   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3469   ;;
3470   *)
3471   ac_save_IFS=$IFS; IFS=$ac_path_separator
3472 ac_dummy="$PATH"
3473 for ac_dir in $ac_dummy; do
3474   IFS=$ac_save_IFS
3475   test -z "$ac_dir" && ac_dir=.
3476   if $as_executable_p "$ac_dir/$ac_word"; then
3477    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3478    echo "$as_me:3478: found $ac_dir/$ac_word" >&5
3479    break
3480 fi
3481 done
3482
3483   test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="none"
3484   ;;
3485 esac
3486 fi
3487 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3488
3489 if test -n "$PKG_CONFIG"; then
3490   echo "$as_me:3490: result: $PKG_CONFIG" >&5
3491 echo "${ECHO_T}$PKG_CONFIG" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497         ;;
3498 *)
3499         PKG_CONFIG=$withval
3500         ;;
3501 esac
3502
3503 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3504 if test "$PKG_CONFIG" != none ; then
3505
3506 if test "x$prefix" != xNONE; then
3507   cf_path_syntax="$prefix"
3508 else
3509   cf_path_syntax="$ac_default_prefix"
3510 fi
3511
3512 case ".$PKG_CONFIG" in #(vi
3513 .\$\(*\)*|.\'*\'*) #(vi
3514   ;;
3515 ..|./*|.\\*) #(vi
3516   ;;
3517 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3518   ;;
3519 .\${*prefix}*) #(vi
3520   eval PKG_CONFIG="$PKG_CONFIG"
3521   case ".$PKG_CONFIG" in #(vi
3522   .NONE/*)
3523     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3524     ;;
3525   esac
3526   ;; #(vi
3527 .no|.NONE/*)
3528   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3529   ;;
3530 *)
3531   { { echo "$as_me:3531: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3532 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3533    { (exit 1); exit 1; }; }
3534   ;;
3535 esac
3536
3537 fi
3538
3539 if test "$PKG_CONFIG" != no ; then
3540         echo "$as_me:3540: checking if we should install .pc files for $PKG_CONFIG" >&5
3541 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3542
3543         # Leave this as something that can be overridden in the environment.
3544         if test -z "$PKG_CONFIG_LIBDIR" ; then
3545                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`/lib/pkgconfig
3546         fi
3547         PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3548         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3549
3550 # Check whether --enable-pc-files or --disable-pc-files was given.
3551 if test "${enable_pc_files+set}" = set; then
3552   enableval="$enable_pc_files"
3553   enable_pc_files=$enableval
3554 else
3555   enable_pc_files=no
3556 fi;
3557                 echo "$as_me:3557: result: $enable_pc_files" >&5
3558 echo "${ECHO_T}$enable_pc_files" >&6
3559         else
3560                 echo "$as_me:3560: result: no" >&5
3561 echo "${ECHO_T}no" >&6
3562                 { echo "$as_me:3562: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3563 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3564                 enable_pc_files=no
3565         fi
3566 fi
3567
3568 echo "$as_me:3568: checking if we should assume mixed-case filenames" >&5
3569 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3570
3571 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3572 if test "${enable_mixed_case+set}" = set; then
3573   enableval="$enable_mixed_case"
3574   enable_mixedcase=$enableval
3575 else
3576   enable_mixedcase=auto
3577 fi;
3578 echo "$as_me:3578: result: $enable_mixedcase" >&5
3579 echo "${ECHO_T}$enable_mixedcase" >&6
3580 if test "$enable_mixedcase" = "auto" ; then
3581
3582 echo "$as_me:3582: checking if filesystem supports mixed-case filenames" >&5
3583 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3584 if test "${cf_cv_mixedcase+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587
3588 if test "$cross_compiling" = yes ; then
3589         case $target_alias in #(vi
3590         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3591                 cf_cv_mixedcase=no
3592                 ;;
3593         *)
3594                 cf_cv_mixedcase=yes
3595                 ;;
3596         esac
3597 else
3598         rm -f conftest CONFTEST
3599         echo test >conftest
3600         if test -f CONFTEST ; then
3601                 cf_cv_mixedcase=no
3602         else
3603                 cf_cv_mixedcase=yes
3604         fi
3605         rm -f conftest CONFTEST
3606 fi
3607
3608 fi
3609 echo "$as_me:3609: result: $cf_cv_mixedcase" >&5
3610 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3611 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3612 #define MIXEDCASE_FILENAMES 1
3613 EOF
3614
3615 else
3616     cf_cv_mixedcase=$enable_mixedcase
3617     if test "$enable_mixedcase" = "yes" ; then
3618         cat >>confdefs.h <<\EOF
3619 #define MIXEDCASE_FILENAMES 1
3620 EOF
3621
3622     fi
3623 fi
3624
3625 # do this after mixed-case option (tags/TAGS is not as important as tic).
3626 echo "$as_me:3626: checking whether ${MAKE-make} sets \${MAKE}" >&5
3627 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3628 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3629 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3630   echo $ECHO_N "(cached) $ECHO_C" >&6
3631 else
3632   cat >conftest.make <<\EOF
3633 all:
3634         @echo 'ac_maketemp="${MAKE}"'
3635 EOF
3636 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3637 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3638 if test -n "$ac_maketemp"; then
3639   eval ac_cv_prog_make_${ac_make}_set=yes
3640 else
3641   eval ac_cv_prog_make_${ac_make}_set=no
3642 fi
3643 rm -f conftest.make
3644 fi
3645 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3646   echo "$as_me:3646: result: yes" >&5
3647 echo "${ECHO_T}yes" >&6
3648   SET_MAKE=
3649 else
3650   echo "$as_me:3650: result: no" >&5
3651 echo "${ECHO_T}no" >&6
3652   SET_MAKE="MAKE=${MAKE-make}"
3653 fi
3654
3655 # Extract the first word of "ctags", so it can be a program name with args.
3656 set dummy ctags; ac_word=$2
3657 echo "$as_me:3657: checking for $ac_word" >&5
3658 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3659 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3660   echo $ECHO_N "(cached) $ECHO_C" >&6
3661 else
3662   if test -n "$MAKE_LOWER_TAGS"; then
3663   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3664 else
3665   ac_save_IFS=$IFS; IFS=$ac_path_separator
3666 ac_dummy="$PATH"
3667 for ac_dir in $ac_dummy; do
3668   IFS=$ac_save_IFS
3669   test -z "$ac_dir" && ac_dir=.
3670   $as_executable_p "$ac_dir/$ac_word" || continue
3671 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3672 echo "$as_me:3672: found $ac_dir/$ac_word" >&5
3673 break
3674 done
3675
3676   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3677 fi
3678 fi
3679 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3680 if test -n "$MAKE_LOWER_TAGS"; then
3681   echo "$as_me:3681: result: $MAKE_LOWER_TAGS" >&5
3682 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3683 else
3684   echo "$as_me:3684: result: no" >&5
3685 echo "${ECHO_T}no" >&6
3686 fi
3687
3688 if test "$cf_cv_mixedcase" = yes ; then
3689         # Extract the first word of "etags", so it can be a program name with args.
3690 set dummy etags; ac_word=$2
3691 echo "$as_me:3691: checking for $ac_word" >&5
3692 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3693 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3694   echo $ECHO_N "(cached) $ECHO_C" >&6
3695 else
3696   if test -n "$MAKE_UPPER_TAGS"; then
3697   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3698 else
3699   ac_save_IFS=$IFS; IFS=$ac_path_separator
3700 ac_dummy="$PATH"
3701 for ac_dir in $ac_dummy; do
3702   IFS=$ac_save_IFS
3703   test -z "$ac_dir" && ac_dir=.
3704   $as_executable_p "$ac_dir/$ac_word" || continue
3705 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3706 echo "$as_me:3706: found $ac_dir/$ac_word" >&5
3707 break
3708 done
3709
3710   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3711 fi
3712 fi
3713 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3714 if test -n "$MAKE_UPPER_TAGS"; then
3715   echo "$as_me:3715: result: $MAKE_UPPER_TAGS" >&5
3716 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3717 else
3718   echo "$as_me:3718: result: no" >&5
3719 echo "${ECHO_T}no" >&6
3720 fi
3721
3722 else
3723         MAKE_UPPER_TAGS=no
3724 fi
3725
3726 if test "$MAKE_UPPER_TAGS" = yes ; then
3727         MAKE_UPPER_TAGS=
3728 else
3729         MAKE_UPPER_TAGS="#"
3730 fi
3731
3732 if test "$MAKE_LOWER_TAGS" = yes ; then
3733         MAKE_LOWER_TAGS=
3734 else
3735         MAKE_LOWER_TAGS="#"
3736 fi
3737
3738 echo "$as_me:3738: checking for makeflags variable" >&5
3739 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3740 if test "${cf_cv_makeflags+set}" = set; then
3741   echo $ECHO_N "(cached) $ECHO_C" >&6
3742 else
3743
3744         cf_cv_makeflags=''
3745         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3746         do
3747                 cat >cf_makeflags.tmp <<CF_EOF
3748 SHELL = /bin/sh
3749 all :
3750         @ echo '.$cf_option'
3751 CF_EOF
3752                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3753                 case "$cf_result" in
3754                 .*k)
3755                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3756                         case "$cf_result" in
3757                         .*CC=*) cf_cv_makeflags=
3758                                 ;;
3759                         *)      cf_cv_makeflags=$cf_option
3760                                 ;;
3761                         esac
3762                         break
3763                         ;;
3764                 .-)     ;;
3765                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3766                         ;;
3767                 esac
3768         done
3769         rm -f cf_makeflags.tmp
3770
3771 fi
3772 echo "$as_me:3772: result: $cf_cv_makeflags" >&5
3773 echo "${ECHO_T}$cf_cv_makeflags" >&6
3774
3775 if test -n "$ac_tool_prefix"; then
3776   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3777 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3778 echo "$as_me:3778: checking for $ac_word" >&5
3779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3780 if test "${ac_cv_prog_RANLIB+set}" = set; then
3781   echo $ECHO_N "(cached) $ECHO_C" >&6
3782 else
3783   if test -n "$RANLIB"; then
3784   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3785 else
3786   ac_save_IFS=$IFS; IFS=$ac_path_separator
3787 ac_dummy="$PATH"
3788 for ac_dir in $ac_dummy; do
3789   IFS=$ac_save_IFS
3790   test -z "$ac_dir" && ac_dir=.
3791   $as_executable_p "$ac_dir/$ac_word" || continue
3792 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3793 echo "$as_me:3793: found $ac_dir/$ac_word" >&5
3794 break
3795 done
3796
3797 fi
3798 fi
3799 RANLIB=$ac_cv_prog_RANLIB
3800 if test -n "$RANLIB"; then
3801   echo "$as_me:3801: result: $RANLIB" >&5
3802 echo "${ECHO_T}$RANLIB" >&6
3803 else
3804   echo "$as_me:3804: result: no" >&5
3805 echo "${ECHO_T}no" >&6
3806 fi
3807
3808 fi
3809 if test -z "$ac_cv_prog_RANLIB"; then
3810   ac_ct_RANLIB=$RANLIB
3811   # Extract the first word of "ranlib", so it can be a program name with args.
3812 set dummy ranlib; ac_word=$2
3813 echo "$as_me:3813: checking for $ac_word" >&5
3814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3815 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3816   echo $ECHO_N "(cached) $ECHO_C" >&6
3817 else
3818   if test -n "$ac_ct_RANLIB"; then
3819   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3820 else
3821   ac_save_IFS=$IFS; IFS=$ac_path_separator
3822 ac_dummy="$PATH"
3823 for ac_dir in $ac_dummy; do
3824   IFS=$ac_save_IFS
3825   test -z "$ac_dir" && ac_dir=.
3826   $as_executable_p "$ac_dir/$ac_word" || continue
3827 ac_cv_prog_ac_ct_RANLIB="ranlib"
3828 echo "$as_me:3828: found $ac_dir/$ac_word" >&5
3829 break
3830 done
3831
3832   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3833 fi
3834 fi
3835 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3836 if test -n "$ac_ct_RANLIB"; then
3837   echo "$as_me:3837: result: $ac_ct_RANLIB" >&5
3838 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3839 else
3840   echo "$as_me:3840: result: no" >&5
3841 echo "${ECHO_T}no" >&6
3842 fi
3843
3844   RANLIB=$ac_ct_RANLIB
3845 else
3846   RANLIB="$ac_cv_prog_RANLIB"
3847 fi
3848
3849 if test -n "$ac_tool_prefix"; then
3850   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3851 set dummy ${ac_tool_prefix}ld; ac_word=$2
3852 echo "$as_me:3852: checking for $ac_word" >&5
3853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3854 if test "${ac_cv_prog_LD+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   if test -n "$LD"; then
3858   ac_cv_prog_LD="$LD" # Let the user override the test.
3859 else
3860   ac_save_IFS=$IFS; IFS=$ac_path_separator
3861 ac_dummy="$PATH"
3862 for ac_dir in $ac_dummy; do
3863   IFS=$ac_save_IFS
3864   test -z "$ac_dir" && ac_dir=.
3865   $as_executable_p "$ac_dir/$ac_word" || continue
3866 ac_cv_prog_LD="${ac_tool_prefix}ld"
3867 echo "$as_me:3867: found $ac_dir/$ac_word" >&5
3868 break
3869 done
3870
3871 fi
3872 fi
3873 LD=$ac_cv_prog_LD
3874 if test -n "$LD"; then
3875   echo "$as_me:3875: result: $LD" >&5
3876 echo "${ECHO_T}$LD" >&6
3877 else
3878   echo "$as_me:3878: result: no" >&5
3879 echo "${ECHO_T}no" >&6
3880 fi
3881
3882 fi
3883 if test -z "$ac_cv_prog_LD"; then
3884   ac_ct_LD=$LD
3885   # Extract the first word of "ld", so it can be a program name with args.
3886 set dummy ld; ac_word=$2
3887 echo "$as_me:3887: checking for $ac_word" >&5
3888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3889 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$ac_ct_LD"; then
3893   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
3894 else
3895   ac_save_IFS=$IFS; IFS=$ac_path_separator
3896 ac_dummy="$PATH"
3897 for ac_dir in $ac_dummy; do
3898   IFS=$ac_save_IFS
3899   test -z "$ac_dir" && ac_dir=.
3900   $as_executable_p "$ac_dir/$ac_word" || continue
3901 ac_cv_prog_ac_ct_LD="ld"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3907 fi
3908 fi
3909 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3910 if test -n "$ac_ct_LD"; then
3911   echo "$as_me:3911: result: $ac_ct_LD" >&5
3912 echo "${ECHO_T}$ac_ct_LD" >&6
3913 else
3914   echo "$as_me:3914: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918   LD=$ac_ct_LD
3919 else
3920   LD="$ac_cv_prog_LD"
3921 fi
3922
3923 if test -n "$ac_tool_prefix"; then
3924   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}ar; ac_word=$2
3926 echo "$as_me:3926: checking for $ac_word" >&5
3927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3928 if test "${ac_cv_prog_AR+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$AR"; then
3932   ac_cv_prog_AR="$AR" # Let the user override the test.
3933 else
3934   ac_save_IFS=$IFS; IFS=$ac_path_separator
3935 ac_dummy="$PATH"
3936 for ac_dir in $ac_dummy; do
3937   IFS=$ac_save_IFS
3938   test -z "$ac_dir" && ac_dir=.
3939   $as_executable_p "$ac_dir/$ac_word" || continue
3940 ac_cv_prog_AR="${ac_tool_prefix}ar"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945 fi
3946 fi
3947 AR=$ac_cv_prog_AR
3948 if test -n "$AR"; then
3949   echo "$as_me:3949: result: $AR" >&5
3950 echo "${ECHO_T}$AR" >&6
3951 else
3952   echo "$as_me:3952: result: no" >&5
3953 echo "${ECHO_T}no" >&6
3954 fi
3955
3956 fi
3957 if test -z "$ac_cv_prog_AR"; then
3958   ac_ct_AR=$AR
3959   # Extract the first word of "ar", so it can be a program name with args.
3960 set dummy ar; ac_word=$2
3961 echo "$as_me:3961: checking for $ac_word" >&5
3962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3963 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3964   echo $ECHO_N "(cached) $ECHO_C" >&6
3965 else
3966   if test -n "$ac_ct_AR"; then
3967   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3968 else
3969   ac_save_IFS=$IFS; IFS=$ac_path_separator
3970 ac_dummy="$PATH"
3971 for ac_dir in $ac_dummy; do
3972   IFS=$ac_save_IFS
3973   test -z "$ac_dir" && ac_dir=.
3974   $as_executable_p "$ac_dir/$ac_word" || continue
3975 ac_cv_prog_ac_ct_AR="ar"
3976 echo "$as_me:3976: found $ac_dir/$ac_word" >&5
3977 break
3978 done
3979
3980   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3981 fi
3982 fi
3983 ac_ct_AR=$ac_cv_prog_ac_ct_AR
3984 if test -n "$ac_ct_AR"; then
3985   echo "$as_me:3985: result: $ac_ct_AR" >&5
3986 echo "${ECHO_T}$ac_ct_AR" >&6
3987 else
3988   echo "$as_me:3988: result: no" >&5
3989 echo "${ECHO_T}no" >&6
3990 fi
3991
3992   AR=$ac_ct_AR
3993 else
3994   AR="$ac_cv_prog_AR"
3995 fi
3996
3997 if test -n "$ac_tool_prefix"; then
3998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3999 set dummy ${ac_tool_prefix}ar; ac_word=$2
4000 echo "$as_me:4000: checking for $ac_word" >&5
4001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4002 if test "${ac_cv_prog_AR+set}" = set; then
4003   echo $ECHO_N "(cached) $ECHO_C" >&6
4004 else
4005   if test -n "$AR"; then
4006   ac_cv_prog_AR="$AR" # Let the user override the test.
4007 else
4008   ac_save_IFS=$IFS; IFS=$ac_path_separator
4009 ac_dummy="$PATH"
4010 for ac_dir in $ac_dummy; do
4011   IFS=$ac_save_IFS
4012   test -z "$ac_dir" && ac_dir=.
4013   $as_executable_p "$ac_dir/$ac_word" || continue
4014 ac_cv_prog_AR="${ac_tool_prefix}ar"
4015 echo "$as_me:4015: found $ac_dir/$ac_word" >&5
4016 break
4017 done
4018
4019 fi
4020 fi
4021 AR=$ac_cv_prog_AR
4022 if test -n "$AR"; then
4023   echo "$as_me:4023: result: $AR" >&5
4024 echo "${ECHO_T}$AR" >&6
4025 else
4026   echo "$as_me:4026: result: no" >&5
4027 echo "${ECHO_T}no" >&6
4028 fi
4029
4030 fi
4031 if test -z "$ac_cv_prog_AR"; then
4032   ac_ct_AR=$AR
4033   # Extract the first word of "ar", so it can be a program name with args.
4034 set dummy ar; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   if test -n "$ac_ct_AR"; then
4041   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4042 else
4043   ac_save_IFS=$IFS; IFS=$ac_path_separator
4044 ac_dummy="$PATH"
4045 for ac_dir in $ac_dummy; do
4046   IFS=$ac_save_IFS
4047   test -z "$ac_dir" && ac_dir=.
4048   $as_executable_p "$ac_dir/$ac_word" || continue
4049 ac_cv_prog_ac_ct_AR="ar"
4050 echo "$as_me:4050: found $ac_dir/$ac_word" >&5
4051 break
4052 done
4053
4054   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4055 fi
4056 fi
4057 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4058 if test -n "$ac_ct_AR"; then
4059   echo "$as_me:4059: result: $ac_ct_AR" >&5
4060 echo "${ECHO_T}$ac_ct_AR" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066   AR=$ac_ct_AR
4067 else
4068   AR="$ac_cv_prog_AR"
4069 fi
4070
4071 echo "$as_me:4071: checking for options to update archives" >&5
4072 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4073 if test "${cf_cv_ar_flags+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076
4077         cf_cv_ar_flags=unknown
4078         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4079         do
4080                 rm -f conftest.$ac_cv_objext
4081                 rm -f conftest.a
4082
4083                 cat >conftest.$ac_ext <<EOF
4084 #line 4084 "configure"
4085 int     testdata[3] = { 123, 456, 789 };
4086 EOF
4087                 if { (eval echo "$as_me:4087: \"$ac_compile\"") >&5
4088   (eval $ac_compile) 2>&5
4089   ac_status=$?
4090   echo "$as_me:4090: \$? = $ac_status" >&5
4091   (exit $ac_status); } ; then
4092                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4093                         if test -f conftest.a ; then
4094                                 cf_cv_ar_flags=$cf_ar_flags
4095                                 break
4096                         fi
4097                 else
4098                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4099
4100 echo "${as_me-configure}:4100: testing cannot compile test-program ..." 1>&5
4101
4102                         break
4103                 fi
4104         done
4105         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4106
4107 fi
4108 echo "$as_me:4108: result: $cf_cv_ar_flags" >&5
4109 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4110 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4111 ARFLAGS=$cf_cv_ar_flags
4112
4113 echo "$as_me:4113: checking if you have specified an install-prefix" >&5
4114 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4115
4116 # Check whether --with-install-prefix or --without-install-prefix was given.
4117 if test "${with_install_prefix+set}" = set; then
4118   withval="$with_install_prefix"
4119   case "$withval" in #(vi
4120         yes|no) #(vi
4121                 ;;
4122         *)      DESTDIR="$withval"
4123                 ;;
4124         esac
4125 fi;
4126 echo "$as_me:4126: result: $DESTDIR" >&5
4127 echo "${ECHO_T}$DESTDIR" >&6
4128
4129 ###############################################################################
4130
4131 # If we're cross-compiling, allow the user to override the tools and their
4132 # options.  The configure script is oriented toward identifying the host
4133 # compiler, etc., but we need a build compiler to generate parts of the source.
4134
4135 if test "$cross_compiling" = yes ; then
4136
4137         # defaults that we might want to override
4138         : ${BUILD_CFLAGS:=''}
4139         : ${BUILD_CPPFLAGS:=''}
4140         : ${BUILD_LDFLAGS:=''}
4141         : ${BUILD_LIBS:=''}
4142         : ${BUILD_EXEEXT:='$x'}
4143         : ${BUILD_OBJEXT:='o'}
4144
4145 # Check whether --with-build-cc or --without-build-cc was given.
4146 if test "${with_build_cc+set}" = set; then
4147   withval="$with_build_cc"
4148   BUILD_CC="$withval"
4149 else
4150   for ac_prog in gcc cc cl
4151 do
4152   # Extract the first word of "$ac_prog", so it can be a program name with args.
4153 set dummy $ac_prog; ac_word=$2
4154 echo "$as_me:4154: checking for $ac_word" >&5
4155 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4156 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4157   echo $ECHO_N "(cached) $ECHO_C" >&6
4158 else
4159   if test -n "$BUILD_CC"; then
4160   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4161 else
4162   ac_save_IFS=$IFS; IFS=$ac_path_separator
4163 ac_dummy="$PATH"
4164 for ac_dir in $ac_dummy; do
4165   IFS=$ac_save_IFS
4166   test -z "$ac_dir" && ac_dir=.
4167   $as_executable_p "$ac_dir/$ac_word" || continue
4168 ac_cv_prog_BUILD_CC="$ac_prog"
4169 echo "$as_me:4169: found $ac_dir/$ac_word" >&5
4170 break
4171 done
4172
4173 fi
4174 fi
4175 BUILD_CC=$ac_cv_prog_BUILD_CC
4176 if test -n "$BUILD_CC"; then
4177   echo "$as_me:4177: result: $BUILD_CC" >&5
4178 echo "${ECHO_T}$BUILD_CC" >&6
4179 else
4180   echo "$as_me:4180: result: no" >&5
4181 echo "${ECHO_T}no" >&6
4182 fi
4183
4184   test -n "$BUILD_CC" && break
4185 done
4186
4187 fi;
4188         echo "$as_me:4188: checking for native build C compiler" >&5
4189 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4190         echo "$as_me:4190: result: $BUILD_CC" >&5
4191 echo "${ECHO_T}$BUILD_CC" >&6
4192
4193         echo "$as_me:4193: checking for native build C preprocessor" >&5
4194 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4195
4196 # Check whether --with-build-cpp or --without-build-cpp was given.
4197 if test "${with_build_cpp+set}" = set; then
4198   withval="$with_build_cpp"
4199   BUILD_CPP="$withval"
4200 else
4201   BUILD_CPP='${BUILD_CC} -E'
4202 fi;
4203         echo "$as_me:4203: result: $BUILD_CPP" >&5
4204 echo "${ECHO_T}$BUILD_CPP" >&6
4205
4206         echo "$as_me:4206: checking for native build C flags" >&5
4207 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4208
4209 # Check whether --with-build-cflags or --without-build-cflags was given.
4210 if test "${with_build_cflags+set}" = set; then
4211   withval="$with_build_cflags"
4212   BUILD_CFLAGS="$withval"
4213 fi;
4214         echo "$as_me:4214: result: $BUILD_CFLAGS" >&5
4215 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4216
4217         echo "$as_me:4217: checking for native build C preprocessor-flags" >&5
4218 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4219
4220 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4221 if test "${with_build_cppflags+set}" = set; then
4222   withval="$with_build_cppflags"
4223   BUILD_CPPFLAGS="$withval"
4224 fi;
4225         echo "$as_me:4225: result: $BUILD_CPPFLAGS" >&5
4226 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4227
4228         echo "$as_me:4228: checking for native build linker-flags" >&5
4229 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4230
4231 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4232 if test "${with_build_ldflags+set}" = set; then
4233   withval="$with_build_ldflags"
4234   BUILD_LDFLAGS="$withval"
4235 fi;
4236         echo "$as_me:4236: result: $BUILD_LDFLAGS" >&5
4237 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4238
4239         echo "$as_me:4239: checking for native build linker-libraries" >&5
4240 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4241
4242 # Check whether --with-build-libs or --without-build-libs was given.
4243 if test "${with_build_libs+set}" = set; then
4244   withval="$with_build_libs"
4245   BUILD_LIBS="$withval"
4246 fi;
4247         echo "$as_me:4247: result: $BUILD_LIBS" >&5
4248 echo "${ECHO_T}$BUILD_LIBS" >&6
4249
4250         # this assumes we're on Unix.
4251         BUILD_EXEEXT=
4252         BUILD_OBJEXT=o
4253
4254         : ${BUILD_CC:='${CC}'}
4255
4256         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4257                 { { echo "$as_me:4257: error: Cross-build requires two compilers.
4258 Use --with-build-cc to specify the native compiler." >&5
4259 echo "$as_me: error: Cross-build requires two compilers.
4260 Use --with-build-cc to specify the native compiler." >&2;}
4261    { (exit 1); exit 1; }; }
4262         fi
4263
4264 else
4265         : ${BUILD_CC:='${CC}'}
4266         : ${BUILD_CPP:='${CPP}'}
4267         : ${BUILD_CFLAGS:='${CFLAGS}'}
4268         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4269         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4270         : ${BUILD_LIBS:='${LIBS}'}
4271         : ${BUILD_EXEEXT:='$x'}
4272         : ${BUILD_OBJEXT:='o'}
4273 fi
4274
4275 ###############################################################################
4276
4277 ### Options to allow the user to specify the set of libraries which are used.
4278 ### Use "--without-normal --with-shared" to allow the default model to be
4279 ### shared, for example.
4280 cf_list_models=""
4281
4282 LIBTOOL=
4283
4284 # common library maintenance symbols that are convenient for libtool scripts:
4285 LIB_CREATE='${AR} -cr'
4286 LIB_OBJECT='${OBJECTS}'
4287 LIB_SUFFIX=.a
4288 LIB_PREP="$RANLIB"
4289
4290 # symbols used to prop libtool up to enable it to determine what it should be
4291 # doing:
4292 LIB_CLEAN=
4293 LIB_COMPILE=
4294 LIB_LINK='${CC}'
4295 LIB_INSTALL=
4296 LIB_UNINSTALL=
4297
4298 echo "$as_me:4298: checking if you want to build libraries with libtool" >&5
4299 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4300
4301 # Check whether --with-libtool or --without-libtool was given.
4302 if test "${with_libtool+set}" = set; then
4303   withval="$with_libtool"
4304   with_libtool=$withval
4305 else
4306   with_libtool=no
4307 fi;
4308 echo "$as_me:4308: result: $with_libtool" >&5
4309 echo "${ECHO_T}$with_libtool" >&6
4310 if test "$with_libtool" != "no"; then
4311
4312         if test "$with_libtool" != "yes" ; then
4313
4314 if test "x$prefix" != xNONE; then
4315   cf_path_syntax="$prefix"
4316 else
4317   cf_path_syntax="$ac_default_prefix"
4318 fi
4319
4320 case ".$with_libtool" in #(vi
4321 .\$\(*\)*|.\'*\'*) #(vi
4322   ;;
4323 ..|./*|.\\*) #(vi
4324   ;;
4325 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4326   ;;
4327 .\${*prefix}*) #(vi
4328   eval with_libtool="$with_libtool"
4329   case ".$with_libtool" in #(vi
4330   .NONE/*)
4331     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4332     ;;
4333   esac
4334   ;; #(vi
4335 .no|.NONE/*)
4336   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4337   ;;
4338 *)
4339   { { echo "$as_me:4339: error: expected a pathname, not \"$with_libtool\"" >&5
4340 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4341    { (exit 1); exit 1; }; }
4342   ;;
4343 esac
4344
4345                 LIBTOOL=$with_libtool
4346         else
4347                 # Extract the first word of "libtool", so it can be a program name with args.
4348 set dummy libtool; ac_word=$2
4349 echo "$as_me:4349: checking for $ac_word" >&5
4350 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4351 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4352   echo $ECHO_N "(cached) $ECHO_C" >&6
4353 else
4354   case $LIBTOOL in
4355   [\\/]* | ?:[\\/]*)
4356   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4357   ;;
4358   *)
4359   ac_save_IFS=$IFS; IFS=$ac_path_separator
4360 ac_dummy="$PATH"
4361 for ac_dir in $ac_dummy; do
4362   IFS=$ac_save_IFS
4363   test -z "$ac_dir" && ac_dir=.
4364   if $as_executable_p "$ac_dir/$ac_word"; then
4365    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4366    echo "$as_me:4366: found $ac_dir/$ac_word" >&5
4367    break
4368 fi
4369 done
4370
4371   ;;
4372 esac
4373 fi
4374 LIBTOOL=$ac_cv_path_LIBTOOL
4375
4376 if test -n "$LIBTOOL"; then
4377   echo "$as_me:4377: result: $LIBTOOL" >&5
4378 echo "${ECHO_T}$LIBTOOL" >&6
4379 else
4380   echo "$as_me:4380: result: no" >&5
4381 echo "${ECHO_T}no" >&6
4382 fi
4383
4384         fi
4385         if test -z "$LIBTOOL" ; then
4386                 { { echo "$as_me:4386: error: Cannot find libtool" >&5
4387 echo "$as_me: error: Cannot find libtool" >&2;}
4388    { (exit 1); exit 1; }; }
4389         fi
4390         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4391         LIB_OBJECT='${OBJECTS:.o=.lo}'
4392         LIB_SUFFIX=.la
4393         LIB_CLEAN='${LIBTOOL} --mode=clean'
4394         LIB_COMPILE='${LIBTOOL} --mode=compile'
4395         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4396         LIB_INSTALL='${LIBTOOL} --mode=install'
4397         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4398         LIB_PREP=:
4399
4400         # Show the version of libtool
4401         echo "$as_me:4401: checking version of libtool" >&5
4402 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4403
4404         # Save the version in a cache variable - this is not entirely a good
4405         # thing, but the version string from libtool is very ugly, and for
4406         # bug reports it might be useful to have the original string. "("
4407         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.].*//'`
4408         echo "$as_me:4408: result: $cf_cv_libtool_version" >&5
4409 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4410         if test -z "$cf_cv_libtool_version" ; then
4411                 { { echo "$as_me:4411: error: This is not GNU libtool" >&5
4412 echo "$as_me: error: This is not GNU libtool" >&2;}
4413    { (exit 1); exit 1; }; }
4414         fi
4415
4416         # special hack to add -no-undefined (which libtool should do for itself)
4417         LT_UNDEF=
4418         case "$cf_cv_system_name" in #(vi
4419         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4420                 LT_UNDEF=-no-undefined
4421                 ;;
4422         esac
4423
4424         # special hack to add --tag option for C++ compiler
4425         case $cf_cv_libtool_version in #(vi
4426         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4427                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4428                 LIBTOOL="$LIBTOOL --tag=CC"
4429                 ;;
4430         *)
4431                 LIBTOOL_CXX="$LIBTOOL"
4432                 ;;
4433         esac
4434 else
4435         LIBTOOL=""
4436         LIBTOOL_CXX=""
4437 fi
4438
4439 test -z "$LIBTOOL" && ECHO_LT=
4440
4441 if test "$with_libtool" != "no" ; then
4442
4443 cf_list_models="$cf_list_models libtool"
4444
4445 else
4446
4447 echo "$as_me:4447: checking if you want to build shared libraries" >&5
4448 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4449
4450 # Check whether --with-shared or --without-shared was given.
4451 if test "${with_shared+set}" = set; then
4452   withval="$with_shared"
4453   with_shared=$withval
4454 else
4455   with_shared=no
4456 fi;
4457 echo "$as_me:4457: result: $with_shared" >&5
4458 echo "${ECHO_T}$with_shared" >&6
4459 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4460
4461 echo "$as_me:4461: checking if you want to build static libraries" >&5
4462 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4463
4464 # Check whether --with-normal or --without-normal was given.
4465 if test "${with_normal+set}" = set; then
4466   withval="$with_normal"
4467   with_normal=$withval
4468 else
4469   with_normal=yes
4470 fi;
4471 echo "$as_me:4471: result: $with_normal" >&5
4472 echo "${ECHO_T}$with_normal" >&6
4473 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4474
4475 echo "$as_me:4475: checking if you want to build debug libraries" >&5
4476 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4477
4478 # Check whether --with-debug or --without-debug was given.
4479 if test "${with_debug+set}" = set; then
4480   withval="$with_debug"
4481   with_debug=$withval
4482 else
4483   with_debug=yes
4484 fi;
4485 echo "$as_me:4485: result: $with_debug" >&5
4486 echo "${ECHO_T}$with_debug" >&6
4487 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4488
4489 echo "$as_me:4489: checking if you want to build profiling libraries" >&5
4490 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4491
4492 # Check whether --with-profile or --without-profile was given.
4493 if test "${with_profile+set}" = set; then
4494   withval="$with_profile"
4495   with_profile=$withval
4496 else
4497   with_profile=no
4498 fi;
4499 echo "$as_me:4499: result: $with_profile" >&5
4500 echo "${ECHO_T}$with_profile" >&6
4501 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4502
4503 fi
4504
4505 ###############################################################################
4506
4507 echo "$as_me:4507: checking for specified models" >&5
4508 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4509 test -z "$cf_list_models" && cf_list_models=normal
4510 test "$with_libtool" != "no" && cf_list_models=libtool
4511 echo "$as_me:4511: result: $cf_list_models" >&5
4512 echo "${ECHO_T}$cf_list_models" >&6
4513
4514 ### Use the first model as the default, and save its suffix for use in building
4515 ### up test-applications.
4516 echo "$as_me:4516: checking for default model" >&5
4517 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4518 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4519 echo "$as_me:4519: result: $DFT_LWR_MODEL" >&5
4520 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4521
4522 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4523
4524 TICS_NAME=tic
4525
4526 TINFO_NAME=tinfo
4527
4528 LIB_NAME=ncurses
4529
4530 LIB_DIR=../lib
4531 LIB_2ND=../../lib
4532
4533         case $cf_cv_system_name in #(vi
4534         OS/2*|os2*) #(vi
4535         LIB_PREFIX=''
4536         ;;
4537         *)      LIB_PREFIX='lib'
4538         ;;
4539         esac
4540 cf_prefix=$LIB_PREFIX
4541
4542 LIB_PREFIX=$cf_prefix
4543
4544 LIB_SUFFIX=
4545
4546 ###############################################################################
4547
4548 echo "$as_me:4548: checking if you want to build a separate terminfo library" >&5
4549 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4550
4551 # Check whether --with-termlib or --without-termlib was given.
4552 if test "${with_termlib+set}" = set; then
4553   withval="$with_termlib"
4554   with_termlib=$withval
4555 else
4556   with_termlib=no
4557 fi;
4558 echo "$as_me:4558: result: $with_termlib" >&5
4559 echo "${ECHO_T}$with_termlib" >&6
4560
4561 echo "$as_me:4561: checking if you want to build a separate tic library" >&5
4562 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4563
4564 # Check whether --with-ticlib or --without-ticlib was given.
4565 if test "${with_ticlib+set}" = set; then
4566   withval="$with_ticlib"
4567   with_ticlib=$withval
4568 else
4569   with_ticlib=no
4570 fi;
4571 echo "$as_me:4571: result: $with_ticlib" >&5
4572 echo "${ECHO_T}$with_ticlib" >&6
4573
4574 ### Checks for special libraries, must be done up-front.
4575 SHLIB_LIST=""
4576
4577 echo "$as_me:4577: checking if you want to link with the GPM mouse library" >&5
4578 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4579
4580 # Check whether --with-gpm or --without-gpm was given.
4581 if test "${with_gpm+set}" = set; then
4582   withval="$with_gpm"
4583   with_gpm=$withval
4584 else
4585   with_gpm=maybe
4586 fi;
4587 echo "$as_me:4587: result: $with_gpm" >&5
4588 echo "${ECHO_T}$with_gpm" >&6
4589
4590 if test "$with_gpm" != no ; then
4591         echo "$as_me:4591: checking for gpm.h" >&5
4592 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4593 if test "${ac_cv_header_gpm_h+set}" = set; then
4594   echo $ECHO_N "(cached) $ECHO_C" >&6
4595 else
4596   cat >conftest.$ac_ext <<_ACEOF
4597 #line 4597 "configure"
4598 #include "confdefs.h"
4599 #include <gpm.h>
4600 _ACEOF
4601 if { (eval echo "$as_me:4601: \"$ac_cpp conftest.$ac_ext\"") >&5
4602   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4603   ac_status=$?
4604   egrep -v '^ *\+' conftest.er1 >conftest.err
4605   rm -f conftest.er1
4606   cat conftest.err >&5
4607   echo "$as_me:4607: \$? = $ac_status" >&5
4608   (exit $ac_status); } >/dev/null; then
4609   if test -s conftest.err; then
4610     ac_cpp_err=$ac_c_preproc_warn_flag
4611   else
4612     ac_cpp_err=
4613   fi
4614 else
4615   ac_cpp_err=yes
4616 fi
4617 if test -z "$ac_cpp_err"; then
4618   ac_cv_header_gpm_h=yes
4619 else
4620   echo "$as_me: failed program was:" >&5
4621   cat conftest.$ac_ext >&5
4622   ac_cv_header_gpm_h=no
4623 fi
4624 rm -f conftest.err conftest.$ac_ext
4625 fi
4626 echo "$as_me:4626: result: $ac_cv_header_gpm_h" >&5
4627 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4628 if test $ac_cv_header_gpm_h = yes; then
4629
4630                 cat >>confdefs.h <<\EOF
4631 #define HAVE_GPM_H 1
4632 EOF
4633
4634                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4635                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4636
4637 echo "${as_me-configure}:4637: testing assuming we really have GPM library ..." 1>&5
4638
4639                         cat >>confdefs.h <<\EOF
4640 #define HAVE_LIBGPM 1
4641 EOF
4642
4643                 else
4644                         echo "$as_me:4644: checking for Gpm_Open in -lgpm" >&5
4645 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4646 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4647   echo $ECHO_N "(cached) $ECHO_C" >&6
4648 else
4649   ac_check_lib_save_LIBS=$LIBS
4650 LIBS="-lgpm  $LIBS"
4651 cat >conftest.$ac_ext <<_ACEOF
4652 #line 4652 "configure"
4653 #include "confdefs.h"
4654
4655 /* Override any gcc2 internal prototype to avoid an error.  */
4656 #ifdef __cplusplus
4657 extern "C"
4658 #endif
4659 /* We use char because int might match the return type of a gcc2
4660    builtin and then its argument prototype would still apply.  */
4661 char Gpm_Open ();
4662 int
4663 main ()
4664 {
4665 Gpm_Open ();
4666   ;
4667   return 0;
4668 }
4669 _ACEOF
4670 rm -f conftest.$ac_objext conftest$ac_exeext
4671 if { (eval echo "$as_me:4671: \"$ac_link\"") >&5
4672   (eval $ac_link) 2>&5
4673   ac_status=$?
4674   echo "$as_me:4674: \$? = $ac_status" >&5
4675   (exit $ac_status); } &&
4676          { ac_try='test -s conftest$ac_exeext'
4677   { (eval echo "$as_me:4677: \"$ac_try\"") >&5
4678   (eval $ac_try) 2>&5
4679   ac_status=$?
4680   echo "$as_me:4680: \$? = $ac_status" >&5
4681   (exit $ac_status); }; }; then
4682   ac_cv_lib_gpm_Gpm_Open=yes
4683 else
4684   echo "$as_me: failed program was:" >&5
4685 cat conftest.$ac_ext >&5
4686 ac_cv_lib_gpm_Gpm_Open=no
4687 fi
4688 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4689 LIBS=$ac_check_lib_save_LIBS
4690 fi
4691 echo "$as_me:4691: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4692 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4693 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4694   :
4695 else
4696
4697                                 { { echo "$as_me:4697: error: Cannot link with GPM library" >&5
4698 echo "$as_me: error: Cannot link with GPM library" >&2;}
4699    { (exit 1); exit 1; }; }
4700                 fi
4701                 with_gpm=yes
4702
4703 fi
4704
4705 else
4706
4707                 test "$with_gpm" != maybe && { echo "$as_me:4707: WARNING: Cannot find GPM header" >&5
4708 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4709                 with_gpm=no
4710
4711 fi
4712
4713 fi
4714
4715 if test "$with_gpm" != no ; then
4716         echo "$as_me:4716: checking if you want to load GPM dynamically" >&5
4717 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4718
4719 # Check whether --with-dlsym or --without-dlsym was given.
4720 if test "${with_dlsym+set}" = set; then
4721   withval="$with_dlsym"
4722   with_dlsym=$withval
4723 else
4724   with_dlsym=yes
4725 fi;
4726         echo "$as_me:4726: result: $with_dlsym" >&5
4727 echo "${ECHO_T}$with_dlsym" >&6
4728         if test "$with_dlsym" = yes ; then
4729
4730 cf_have_dlsym=no
4731 echo "$as_me:4731: checking for dlsym" >&5
4732 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4733 if test "${ac_cv_func_dlsym+set}" = set; then
4734   echo $ECHO_N "(cached) $ECHO_C" >&6
4735 else
4736   cat >conftest.$ac_ext <<_ACEOF
4737 #line 4737 "configure"
4738 #include "confdefs.h"
4739 /* System header to define __stub macros and hopefully few prototypes,
4740     which can conflict with char dlsym (); below.  */
4741 #include <assert.h>
4742 /* Override any gcc2 internal prototype to avoid an error.  */
4743 #ifdef __cplusplus
4744 extern "C"
4745 #endif
4746 /* We use char because int might match the return type of a gcc2
4747    builtin and then its argument prototype would still apply.  */
4748 char dlsym ();
4749 char (*f) ();
4750
4751 int
4752 main ()
4753 {
4754 /* The GNU C library defines this for functions which it implements
4755     to always fail with ENOSYS.  Some functions are actually named
4756     something starting with __ and the normal name is an alias.  */
4757 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4758 choke me
4759 #else
4760 f = dlsym;
4761 #endif
4762
4763   ;
4764   return 0;
4765 }
4766 _ACEOF
4767 rm -f conftest.$ac_objext conftest$ac_exeext
4768 if { (eval echo "$as_me:4768: \"$ac_link\"") >&5
4769   (eval $ac_link) 2>&5
4770   ac_status=$?
4771   echo "$as_me:4771: \$? = $ac_status" >&5
4772   (exit $ac_status); } &&
4773          { ac_try='test -s conftest$ac_exeext'
4774   { (eval echo "$as_me:4774: \"$ac_try\"") >&5
4775   (eval $ac_try) 2>&5
4776   ac_status=$?
4777   echo "$as_me:4777: \$? = $ac_status" >&5
4778   (exit $ac_status); }; }; then
4779   ac_cv_func_dlsym=yes
4780 else
4781   echo "$as_me: failed program was:" >&5
4782 cat conftest.$ac_ext >&5
4783 ac_cv_func_dlsym=no
4784 fi
4785 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4786 fi
4787 echo "$as_me:4787: result: $ac_cv_func_dlsym" >&5
4788 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4789 if test $ac_cv_func_dlsym = yes; then
4790   cf_have_dlsym=yes
4791 else
4792
4793 cf_have_libdl=no
4794 echo "$as_me:4794: checking for dlsym in -ldl" >&5
4795 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4796 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4797   echo $ECHO_N "(cached) $ECHO_C" >&6
4798 else
4799   ac_check_lib_save_LIBS=$LIBS
4800 LIBS="-ldl  $LIBS"
4801 cat >conftest.$ac_ext <<_ACEOF
4802 #line 4802 "configure"
4803 #include "confdefs.h"
4804
4805 /* Override any gcc2 internal prototype to avoid an error.  */
4806 #ifdef __cplusplus
4807 extern "C"
4808 #endif
4809 /* We use char because int might match the return type of a gcc2
4810    builtin and then its argument prototype would still apply.  */
4811 char dlsym ();
4812 int
4813 main ()
4814 {
4815 dlsym ();
4816   ;
4817   return 0;
4818 }
4819 _ACEOF
4820 rm -f conftest.$ac_objext conftest$ac_exeext
4821 if { (eval echo "$as_me:4821: \"$ac_link\"") >&5
4822   (eval $ac_link) 2>&5
4823   ac_status=$?
4824   echo "$as_me:4824: \$? = $ac_status" >&5
4825   (exit $ac_status); } &&
4826          { ac_try='test -s conftest$ac_exeext'
4827   { (eval echo "$as_me:4827: \"$ac_try\"") >&5
4828   (eval $ac_try) 2>&5
4829   ac_status=$?
4830   echo "$as_me:4830: \$? = $ac_status" >&5
4831   (exit $ac_status); }; }; then
4832   ac_cv_lib_dl_dlsym=yes
4833 else
4834   echo "$as_me: failed program was:" >&5
4835 cat conftest.$ac_ext >&5
4836 ac_cv_lib_dl_dlsym=no
4837 fi
4838 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4839 LIBS=$ac_check_lib_save_LIBS
4840 fi
4841 echo "$as_me:4841: result: $ac_cv_lib_dl_dlsym" >&5
4842 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4843 if test $ac_cv_lib_dl_dlsym = yes; then
4844
4845         cf_have_dlsym=yes
4846         cf_have_libdl=yes
4847 fi
4848
4849 fi
4850
4851 if test "$cf_have_dlsym" = yes ; then
4852         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4853
4854         echo "$as_me:4854: checking whether able to link to dl*() functions" >&5
4855 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4856         cat >conftest.$ac_ext <<_ACEOF
4857 #line 4857 "configure"
4858 #include "confdefs.h"
4859 #include <dlfcn.h>
4860 int
4861 main ()
4862 {
4863
4864                 void *obj;
4865                 if ((obj = dlopen("filename", 0)) != 0) {
4866                         if (dlsym(obj, "symbolname") == 0) {
4867                         dlclose(obj);
4868                         }
4869                 }
4870   ;
4871   return 0;
4872 }
4873 _ACEOF
4874 rm -f conftest.$ac_objext conftest$ac_exeext
4875 if { (eval echo "$as_me:4875: \"$ac_link\"") >&5
4876   (eval $ac_link) 2>&5
4877   ac_status=$?
4878   echo "$as_me:4878: \$? = $ac_status" >&5
4879   (exit $ac_status); } &&
4880          { ac_try='test -s conftest$ac_exeext'
4881   { (eval echo "$as_me:4881: \"$ac_try\"") >&5
4882   (eval $ac_try) 2>&5
4883   ac_status=$?
4884   echo "$as_me:4884: \$? = $ac_status" >&5
4885   (exit $ac_status); }; }; then
4886
4887                 cat >>confdefs.h <<\EOF
4888 #define HAVE_LIBDL 1
4889 EOF
4890
4891 else
4892   echo "$as_me: failed program was:" >&5
4893 cat conftest.$ac_ext >&5
4894
4895                 { { echo "$as_me:4895: error: Cannot link test program for libdl" >&5
4896 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4897    { (exit 1); exit 1; }; }
4898 fi
4899 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4900         echo "$as_me:4900: result: ok" >&5
4901 echo "${ECHO_T}ok" >&6
4902 else
4903         { { echo "$as_me:4903: error: Cannot find dlsym function" >&5
4904 echo "$as_me: error: Cannot find dlsym function" >&2;}
4905    { (exit 1); exit 1; }; }
4906 fi
4907
4908                 if test "$with_gpm" != yes ; then
4909                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4910
4911 echo "${as_me-configure}:4911: testing assuming soname for gpm is $with_gpm ..." 1>&5
4912
4913                         cf_cv_gpm_soname="$with_gpm"
4914                 else
4915
4916 echo "$as_me:4916: checking for soname of gpm library" >&5
4917 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4918 if test "${cf_cv_gpm_soname+set}" = set; then
4919   echo $ECHO_N "(cached) $ECHO_C" >&6
4920 else
4921
4922 cf_cv_gpm_soname=unknown
4923 if test "$cross_compiling" != yes ; then
4924 cat >conftest.$ac_ext <<CF_EOF
4925 #include <gpm.h>
4926 int main()
4927 {
4928 if (Gpm_Open(0,0)) Gpm_Close();
4929         ${cf_cv_main_return:-return}(0);
4930 }
4931 CF_EOF
4932 cf_save_LIBS="$LIBS"
4933         LIBS="-lgpm $LIBS"
4934         if { (eval echo "$as_me:4934: \"$ac_compile\"") >&5
4935   (eval $ac_compile) 2>&5
4936   ac_status=$?
4937   echo "$as_me:4937: \$? = $ac_status" >&5
4938   (exit $ac_status); } ; then
4939                 if { (eval echo "$as_me:4939: \"$ac_link\"") >&5
4940   (eval $ac_link) 2>&5
4941   ac_status=$?
4942   echo "$as_me:4942: \$? = $ac_status" >&5
4943   (exit $ac_status); } ; then
4944                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
4945                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
4946                 fi
4947         fi
4948 rm -f conftest*
4949 LIBS="$cf_save_LIBS"
4950 fi
4951
4952 fi
4953 echo "$as_me:4953: result: $cf_cv_gpm_soname" >&5
4954 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
4955
4956                 fi
4957                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
4958 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
4959 EOF
4960
4961                 SHLIB_LIST="-ldl $SHLIB_LIST"
4962         else
4963                 SHLIB_LIST="-lgpm $SHLIB_LIST"
4964         fi
4965         cat >>confdefs.h <<\EOF
4966 #define HAVE_LIBGPM 1
4967 EOF
4968
4969 echo "$as_me:4969: checking for Gpm_Wgetch in -lgpm" >&5
4970 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
4971 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
4972   echo $ECHO_N "(cached) $ECHO_C" >&6
4973 else
4974   ac_check_lib_save_LIBS=$LIBS
4975 LIBS="-lgpm  $LIBS"
4976 cat >conftest.$ac_ext <<_ACEOF
4977 #line 4977 "configure"
4978 #include "confdefs.h"
4979
4980 /* Override any gcc2 internal prototype to avoid an error.  */
4981 #ifdef __cplusplus
4982 extern "C"
4983 #endif
4984 /* We use char because int might match the return type of a gcc2
4985    builtin and then its argument prototype would still apply.  */
4986 char Gpm_Wgetch ();
4987 int
4988 main ()
4989 {
4990 Gpm_Wgetch ();
4991   ;
4992   return 0;
4993 }
4994 _ACEOF
4995 rm -f conftest.$ac_objext conftest$ac_exeext
4996 if { (eval echo "$as_me:4996: \"$ac_link\"") >&5
4997   (eval $ac_link) 2>&5
4998   ac_status=$?
4999   echo "$as_me:4999: \$? = $ac_status" >&5
5000   (exit $ac_status); } &&
5001          { ac_try='test -s conftest$ac_exeext'
5002   { (eval echo "$as_me:5002: \"$ac_try\"") >&5
5003   (eval $ac_try) 2>&5
5004   ac_status=$?
5005   echo "$as_me:5005: \$? = $ac_status" >&5
5006   (exit $ac_status); }; }; then
5007   ac_cv_lib_gpm_Gpm_Wgetch=yes
5008 else
5009   echo "$as_me: failed program was:" >&5
5010 cat conftest.$ac_ext >&5
5011 ac_cv_lib_gpm_Gpm_Wgetch=no
5012 fi
5013 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5014 LIBS=$ac_check_lib_save_LIBS
5015 fi
5016 echo "$as_me:5016: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5017 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5018 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5019
5020 echo "$as_me:5020: checking if GPM is weakly bound to curses library" >&5
5021 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5022 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5023   echo $ECHO_N "(cached) $ECHO_C" >&6
5024 else
5025
5026 cf_cv_check_gpm_wgetch=unknown
5027 if test "$cross_compiling" != yes ; then
5028
5029 cat >conftest.$ac_ext <<CF_EOF
5030 #include <gpm.h>
5031 int main()
5032 {
5033         Gpm_Wgetch();
5034         ${cf_cv_main_return:-return}(0);
5035 }
5036 CF_EOF
5037
5038         cf_save_LIBS="$LIBS"
5039         # This only works if we can look at the symbol table.  If a shared
5040         # library is stripped for install, we cannot use that.  So we're forced
5041         # to rely on the static library, noting that some packagers may not
5042         # include it.
5043         LIBS="-static -lgpm -dynamic $LIBS"
5044         if { (eval echo "$as_me:5044: \"$ac_compile\"") >&5
5045   (eval $ac_compile) 2>&5
5046   ac_status=$?
5047   echo "$as_me:5047: \$? = $ac_status" >&5
5048   (exit $ac_status); } ; then
5049                 if { (eval echo "$as_me:5049: \"$ac_link\"") >&5
5050   (eval $ac_link) 2>&5
5051   ac_status=$?
5052   echo "$as_me:5052: \$? = $ac_status" >&5
5053   (exit $ac_status); } ; then
5054                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5055                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5056                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5057                 fi
5058         fi
5059         rm -f conftest*
5060         LIBS="$cf_save_LIBS"
5061 fi
5062
5063 fi
5064 echo "$as_me:5064: result: $cf_cv_check_gpm_wgetch" >&5
5065 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5066
5067 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5068         { echo "$as_me:5068: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5069 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5070 fi
5071
5072 fi
5073
5074 fi
5075
5076 # not everyone has "test -c"
5077 if test -c /dev/sysmouse 2>/dev/null ; then
5078 echo "$as_me:5078: checking if you want to use sysmouse" >&5
5079 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5080
5081 # Check whether --with-sysmouse or --without-sysmouse was given.
5082 if test "${with_sysmouse+set}" = set; then
5083   withval="$with_sysmouse"
5084   cf_with_sysmouse=$withval
5085 else
5086   cf_with_sysmouse=maybe
5087 fi;
5088         if test "$cf_with_sysmouse" != no ; then
5089         cat >conftest.$ac_ext <<_ACEOF
5090 #line 5090 "configure"
5091 #include "confdefs.h"
5092
5093 #include <osreldate.h>
5094 #if (__FreeBSD_version >= 400017)
5095 #include <sys/consio.h>
5096 #include <sys/fbio.h>
5097 #else
5098 #include <machine/console.h>
5099 #endif
5100
5101 int
5102 main ()
5103 {
5104
5105         struct mouse_info the_mouse;
5106         ioctl(0, CONS_MOUSECTL, &the_mouse);
5107
5108   ;
5109   return 0;
5110 }
5111 _ACEOF
5112 rm -f conftest.$ac_objext
5113 if { (eval echo "$as_me:5113: \"$ac_compile\"") >&5
5114   (eval $ac_compile) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); } &&
5118          { ac_try='test -s conftest.$ac_objext'
5119   { (eval echo "$as_me:5119: \"$ac_try\"") >&5
5120   (eval $ac_try) 2>&5
5121   ac_status=$?
5122   echo "$as_me:5122: \$? = $ac_status" >&5
5123   (exit $ac_status); }; }; then
5124   cf_with_sysmouse=yes
5125 else
5126   echo "$as_me: failed program was:" >&5
5127 cat conftest.$ac_ext >&5
5128 cf_with_sysmouse=no
5129 fi
5130 rm -f conftest.$ac_objext conftest.$ac_ext
5131         fi
5132 echo "$as_me:5132: result: $cf_with_sysmouse" >&5
5133 echo "${ECHO_T}$cf_with_sysmouse" >&6
5134 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5135 #define USE_SYSMOUSE 1
5136 EOF
5137
5138 fi
5139
5140 if test X"$CC_G_OPT" = X"" ; then
5141         CC_G_OPT='-g'
5142         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5143 fi
5144
5145 if test X"$CXX_G_OPT" = X"" ; then
5146         CXX_G_OPT='-g'
5147         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5148 fi
5149
5150 echo "$as_me:5150: checking for default loader flags" >&5
5151 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5152 case $DFT_LWR_MODEL in
5153 libtool) LD_MODEL=''   ;;
5154 normal)  LD_MODEL=''   ;;
5155 debug)   LD_MODEL=$CC_G_OPT ;;
5156 profile) LD_MODEL='-pg';;
5157 shared)  LD_MODEL=''   ;;
5158 esac
5159 echo "$as_me:5159: result: $LD_MODEL" >&5
5160 echo "${ECHO_T}$LD_MODEL" >&6
5161
5162 case $DFT_LWR_MODEL in
5163 shared)
5164
5165 echo "$as_me:5165: checking if rpath option should be used" >&5
5166 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5167
5168 # Check whether --enable-rpath or --disable-rpath was given.
5169 if test "${enable_rpath+set}" = set; then
5170   enableval="$enable_rpath"
5171   cf_cv_ld_rpath=$enableval
5172 else
5173   cf_cv_ld_rpath=no
5174 fi;
5175 echo "$as_me:5175: result: $cf_cv_ld_rpath" >&5
5176 echo "${ECHO_T}$cf_cv_ld_rpath" >&6
5177
5178 echo "$as_me:5178: checking if shared libraries should be relinked during install" >&5
5179 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5180
5181 # Check whether --enable-relink or --disable-relink was given.
5182 if test "${enable_relink+set}" = set; then
5183   enableval="$enable_relink"
5184   cf_cv_do_relink=$enableval
5185 else
5186   cf_cv_do_relink=yes
5187 fi;
5188 echo "$as_me:5188: result: $cf_cv_do_relink" >&5
5189 echo "${ECHO_T}$cf_cv_do_relink" >&6
5190         ;;
5191 esac
5192
5193         LOCAL_LDFLAGS=
5194         LOCAL_LDFLAGS2=
5195         LD_RPATH_OPT=
5196         LD_SHARED_OPTS=
5197         INSTALL_LIB="-m 644"
5198
5199         cf_cv_do_symlinks=no
5200
5201         echo "$as_me:5201: checking if release/abi version should be used for shared libs" >&5
5202 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5203
5204 # Check whether --with-shlib-version or --without-shlib-version was given.
5205 if test "${with_shlib_version+set}" = set; then
5206   withval="$with_shlib_version"
5207   test -z "$withval" && withval=auto
5208         case $withval in #(vi
5209         yes) #(vi
5210                 cf_cv_shlib_version=auto
5211                 ;;
5212         rel|abi|auto|no) #(vi
5213                 cf_cv_shlib_version=$withval
5214                 ;;
5215         *)
5216                 { { echo "$as_me:5216: error: option value must be one of: rel, abi, auto or no" >&5
5217 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5218    { (exit 1); exit 1; }; }
5219                 ;;
5220         esac
5221
5222 else
5223   cf_cv_shlib_version=auto
5224 fi;
5225         echo "$as_me:5225: result: $cf_cv_shlib_version" >&5
5226 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5227
5228         cf_cv_rm_so_locs=no
5229
5230         # Some less-capable ports of gcc support only -fpic
5231         CC_SHARED_OPTS=
5232         if test "$GCC" = yes
5233         then
5234                 echo "$as_me:5234: checking which $CC option to use" >&5
5235 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5236                 cf_save_CFLAGS="$CFLAGS"
5237                 for CC_SHARED_OPTS in -fPIC -fpic ''
5238                 do
5239                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5240                         cat >conftest.$ac_ext <<_ACEOF
5241 #line 5241 "configure"
5242 #include "confdefs.h"
5243 #include <stdio.h>
5244 int
5245 main ()
5246 {
5247 int x = 1
5248   ;
5249   return 0;
5250 }
5251 _ACEOF
5252 rm -f conftest.$ac_objext
5253 if { (eval echo "$as_me:5253: \"$ac_compile\"") >&5
5254   (eval $ac_compile) 2>&5
5255   ac_status=$?
5256   echo "$as_me:5256: \$? = $ac_status" >&5
5257   (exit $ac_status); } &&
5258          { ac_try='test -s conftest.$ac_objext'
5259   { (eval echo "$as_me:5259: \"$ac_try\"") >&5
5260   (eval $ac_try) 2>&5
5261   ac_status=$?
5262   echo "$as_me:5262: \$? = $ac_status" >&5
5263   (exit $ac_status); }; }; then
5264   break
5265 else
5266   echo "$as_me: failed program was:" >&5
5267 cat conftest.$ac_ext >&5
5268 fi
5269 rm -f conftest.$ac_objext conftest.$ac_ext
5270                 done
5271                 echo "$as_me:5271: result: $CC_SHARED_OPTS" >&5
5272 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5273                 CFLAGS="$cf_save_CFLAGS"
5274         fi
5275
5276         cf_cv_shlib_version_infix=no
5277
5278         case $cf_cv_system_name in
5279         aix[56]*)
5280                 if test "$GCC" = yes; then
5281                         CC_SHARED_OPTS=
5282                         MK_SHARED_LIB="$(CC) -shared"
5283                 fi
5284                 ;;
5285         beos*)
5286                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5287                 ;;
5288         cygwin*)
5289                 CC_SHARED_OPTS=
5290                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5291                 cf_cv_shlib_version=cygdll
5292                 cf_cv_shlib_version_infix=cygdll
5293                 cat >mk_shared_lib.sh <<-CF_EOF
5294                 #!/bin/sh
5295                 SHARED_LIB=\$1
5296                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5297                 shift
5298                 cat <<-EOF
5299                 Linking shared library
5300                 ** SHARED_LIB \$SHARED_LIB
5301                 ** IMPORT_LIB \$IMPORT_LIB
5302 EOF
5303                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5304 CF_EOF
5305                 chmod +x mk_shared_lib.sh
5306                 ;;
5307         darwin*)
5308                 EXTRA_CFLAGS="-no-cpp-precomp"
5309                 CC_SHARED_OPTS="-dynamic"
5310                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5311                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5312                 cf_cv_shlib_version_infix=yes
5313                 echo "$as_me:5313: checking if ld -search_paths_first works" >&5
5314 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5315 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5316   echo $ECHO_N "(cached) $ECHO_C" >&6
5317 else
5318
5319                         cf_save_LDFLAGS=$LDFLAGS
5320                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5321                         cat >conftest.$ac_ext <<_ACEOF
5322 #line 5322 "configure"
5323 #include "confdefs.h"
5324
5325 int
5326 main ()
5327 {
5328 int i;
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333 rm -f conftest.$ac_objext conftest$ac_exeext
5334 if { (eval echo "$as_me:5334: \"$ac_link\"") >&5
5335   (eval $ac_link) 2>&5
5336   ac_status=$?
5337   echo "$as_me:5337: \$? = $ac_status" >&5
5338   (exit $ac_status); } &&
5339          { ac_try='test -s conftest$ac_exeext'
5340   { (eval echo "$as_me:5340: \"$ac_try\"") >&5
5341   (eval $ac_try) 2>&5
5342   ac_status=$?
5343   echo "$as_me:5343: \$? = $ac_status" >&5
5344   (exit $ac_status); }; }; then
5345   cf_cv_ldflags_search_paths_first=yes
5346 else
5347   echo "$as_me: failed program was:" >&5
5348 cat conftest.$ac_ext >&5
5349 cf_cv_ldflags_search_paths_first=no
5350 fi
5351 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5352                                 LDFLAGS=$cf_save_LDFLAGS
5353 fi
5354 echo "$as_me:5354: result: $cf_cv_ldflags_search_paths_first" >&5
5355 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5356                 if test $cf_cv_ldflags_search_paths_first = yes; then
5357                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5358                 fi
5359                 ;;
5360         hpux*)
5361                 # (tested with gcc 2.7.2 -- I don't have c89)
5362                 if test "$GCC" = yes; then
5363                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5364                 else
5365                         CC_SHARED_OPTS='+Z'
5366                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5367                 fi
5368                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5369                 # HP-UX shared libraries must be executable, and should be
5370                 # readonly to exploit a quirk in the memory manager.
5371                 INSTALL_LIB="-m 555"
5372                 ;;
5373         irix*)
5374                 if test "$cf_cv_ld_rpath" = yes ; then
5375                         if test "$GCC" = yes; then
5376                                 LD_RPATH_OPT="-Wl,-rpath,"
5377                                 EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5378                         else
5379                                 LD_RPATH_OPT="-rpath "
5380                                 EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5381                         fi
5382                 fi
5383                 # tested with IRIX 5.2 and 'cc'.
5384                 if test "$GCC" != yes; then
5385                         CC_SHARED_OPTS='-KPIC'
5386                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5387                 else
5388                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5389                 fi
5390                 cf_cv_rm_so_locs=yes
5391                 ;;
5392         linux*|gnu*|k*bsd*-gnu)
5393                 if test "$DFT_LWR_MODEL" = "shared" ; then
5394                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5395                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5396                 fi
5397                 if test "$cf_cv_ld_rpath" = yes ; then
5398                         LD_RPATH_OPT="-Wl,-rpath,"
5399                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5400                 fi
5401
5402         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5403         if test "$cf_cv_shlib_version" = rel; then
5404                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5405         else
5406                 cf_cv_shared_soname='`basename $@`'
5407         fi
5408
5409                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5410                 ;;
5411         openbsd[2-9].*)
5412                 if test "$DFT_LWR_MODEL" = "shared" ; then
5413                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5414                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5415                 fi
5416                 if test "$cf_cv_ld_rpath" = yes ; then
5417                         LD_RPATH_OPT="-Wl,-rpath,"
5418                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5419                 fi
5420                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5421
5422         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5423         if test "$cf_cv_shlib_version" = rel; then
5424                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5425         else
5426                 cf_cv_shared_soname='`basename $@`'
5427         fi
5428
5429                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5430                 ;;
5431         nto-qnx*|openbsd*|freebsd[12].*)
5432                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5433                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5434                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5435                 ;;
5436         freebsd*)
5437                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5438                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5439                         LOCAL_LDFLAGS="-rpath \$(LOCAL_LIBDIR)"
5440                         LOCAL_LDFLAGS2="-rpath \${libdir} $LOCAL_LDFLAGS"
5441                         LD_RPATH_OPT="-rpath "
5442                         EXTRA_LDFLAGS="-rpath \${libdir} $EXTRA_LDFLAGS"
5443                 fi
5444
5445         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5446         if test "$cf_cv_shlib_version" = rel; then
5447                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5448         else
5449                 cf_cv_shared_soname='`basename $@`'
5450         fi
5451
5452                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5453                 ;;
5454         netbsd*)
5455                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5456                 test "$cf_cv_ld_rpath" = yes && LD_RPATH_OPT="-Wl,-rpath,"
5457                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_ld_rpath" = yes ; then
5458                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5459                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5460                         EXTRA_LDFLAGS="-Wl,-rpath,\${libdir} $EXTRA_LDFLAGS"
5461                         if test "$cf_cv_shlib_version" = auto; then
5462                         if test -f /usr/libexec/ld.elf_so; then
5463                                 cf_cv_shlib_version=abi
5464                         else
5465                                 cf_cv_shlib_version=rel
5466                         fi
5467                         fi
5468
5469         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5470         if test "$cf_cv_shlib_version" = rel; then
5471                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5472         else
5473                 cf_cv_shared_soname='`basename $@`'
5474         fi
5475
5476                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5477                 else
5478                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5479                 fi
5480                 ;;
5481         osf*|mls+*)
5482                 # tested with OSF/1 V3.2 and 'cc'
5483                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5484                 # link with shared libs).
5485                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5486                 case $host_os in
5487                 osf4*)
5488                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5489                         ;;
5490                 esac
5491                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5492                 if test "$DFT_LWR_MODEL" = "shared" ; then
5493                         LOCAL_LDFLAGS="-Wl,-rpath,\$(LOCAL_LIBDIR)"
5494                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5495                 fi
5496                 if test "$cf_cv_ld_rpath" = yes ; then
5497                         LD_RPATH_OPT="-rpath"
5498                         # EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5499                 fi
5500                 cf_cv_rm_so_locs=yes
5501                 ;;
5502         sco3.2v5*)  # (also uw2* and UW7) hops 13-Apr-98
5503                 # tested with osr5.0.5
5504                 if test "$GCC" != yes; then
5505                         CC_SHARED_OPTS='-belf -KPIC'
5506                 fi
5507                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5508                 if test "$cf_cv_ld_rpath" = yes ; then
5509                         # only way is to set LD_RUN_PATH but no switch for it
5510                         RUN_PATH=$libdir
5511                 fi
5512                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5513                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5514                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5515                 ;;
5516         sunos4*)
5517                 # tested with SunOS 4.1.1 and gcc 2.7.0
5518                 if test "$GCC" != yes; then
5519                         CC_SHARED_OPTS='-KPIC'
5520                 fi
5521                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5522                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5523                 ;;
5524         solaris2*)
5525                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5526                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5527                 if test "$DFT_LWR_MODEL" = "shared" ; then
5528                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5529                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5530                 fi
5531                 if test "$cf_cv_ld_rpath" = yes ; then
5532                         LD_RPATH_OPT="-R"
5533                         EXTRA_LDFLAGS="$LOCAL_LDFLAGS $EXTRA_LDFLAGS"
5534                 fi
5535
5536         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5537         if test "$cf_cv_shlib_version" = rel; then
5538                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5539         else
5540                 cf_cv_shared_soname='`basename $@`'
5541         fi
5542
5543                 if test "$GCC" != yes; then
5544                         cf_save_CFLAGS="$CFLAGS"
5545                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5546                         do
5547                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5548                                 cat >conftest.$ac_ext <<_ACEOF
5549 #line 5549 "configure"
5550 #include "confdefs.h"
5551 #include <stdio.h>
5552 int
5553 main ()
5554 {
5555 printf("Hello\n");
5556   ;
5557   return 0;
5558 }
5559 _ACEOF
5560 rm -f conftest.$ac_objext
5561 if { (eval echo "$as_me:5561: \"$ac_compile\"") >&5
5562   (eval $ac_compile) 2>&5
5563   ac_status=$?
5564   echo "$as_me:5564: \$? = $ac_status" >&5
5565   (exit $ac_status); } &&
5566          { ac_try='test -s conftest.$ac_objext'
5567   { (eval echo "$as_me:5567: \"$ac_try\"") >&5
5568   (eval $ac_try) 2>&5
5569   ac_status=$?
5570   echo "$as_me:5570: \$? = $ac_status" >&5
5571   (exit $ac_status); }; }; then
5572   break
5573 else
5574   echo "$as_me: failed program was:" >&5
5575 cat conftest.$ac_ext >&5
5576 fi
5577 rm -f conftest.$ac_objext conftest.$ac_ext
5578                         done
5579                         CFLAGS="$cf_save_CFLAGS"
5580                         CC_SHARED_OPTS=$cf_shared_opts
5581                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5582                 else
5583                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5584                 fi
5585                 ;;
5586         sysv5uw7*|unix_sv*)
5587                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5588                 if test "$GCC" != yes; then
5589                         CC_SHARED_OPTS='-KPIC'
5590                 fi
5591                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5592                 ;;
5593         *)
5594                 CC_SHARED_OPTS='unknown'
5595                 MK_SHARED_LIB='echo unknown'
5596                 ;;
5597         esac
5598
5599         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5600         case "$cf_cv_shlib_version" in #(vi
5601         rel|abi)
5602                 case "$MK_SHARED_LIB" in #(vi
5603                 *'-o $@')
5604                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5605                         ;;
5606                 *)
5607                         { echo "$as_me:5607: WARNING: ignored --with-shlib-version" >&5
5608 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5609                         ;;
5610                 esac
5611                 ;;
5612         esac
5613
5614         if test -n "$LD_RPATH_OPT" ; then
5615                 echo "$as_me:5615: checking if we need a space after rpath option" >&5
5616 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5617                 cf_save_LIBS="$LIBS"
5618                 LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5619                 cat >conftest.$ac_ext <<_ACEOF
5620 #line 5620 "configure"
5621 #include "confdefs.h"
5622
5623 int
5624 main ()
5625 {
5626
5627   ;
5628   return 0;
5629 }
5630 _ACEOF
5631 rm -f conftest.$ac_objext conftest$ac_exeext
5632 if { (eval echo "$as_me:5632: \"$ac_link\"") >&5
5633   (eval $ac_link) 2>&5
5634   ac_status=$?
5635   echo "$as_me:5635: \$? = $ac_status" >&5
5636   (exit $ac_status); } &&
5637          { ac_try='test -s conftest$ac_exeext'
5638   { (eval echo "$as_me:5638: \"$ac_try\"") >&5
5639   (eval $ac_try) 2>&5
5640   ac_status=$?
5641   echo "$as_me:5641: \$? = $ac_status" >&5
5642   (exit $ac_status); }; }; then
5643   cf_rpath_space=no
5644 else
5645   echo "$as_me: failed program was:" >&5
5646 cat conftest.$ac_ext >&5
5647 cf_rpath_space=yes
5648 fi
5649 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5650                 LIBS="$cf_save_LIBS"
5651                 echo "$as_me:5651: result: $cf_rpath_space" >&5
5652 echo "${ECHO_T}$cf_rpath_space" >&6
5653                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5654                 MK_SHARED_LIB="$MK_SHARED_LIB $LD_RPATH_OPT\${libdir}"
5655         fi
5656
5657 if test "$CC_SHARED_OPTS" = "unknown"; then
5658         for model in $cf_list_models; do
5659                 if test "$model" = "shared"; then
5660                         { { echo "$as_me:5660: error: Shared libraries are not supported in this version" >&5
5661 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5662    { (exit 1); exit 1; }; }
5663                 fi
5664         done
5665 fi
5666
5667 ###############################################################################
5668
5669 ###     use option --disable-overwrite to leave out the link to -lcurses
5670 echo "$as_me:5670: checking if you wish to install ncurses overwriting curses" >&5
5671 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5672
5673 # Check whether --enable-overwrite or --disable-overwrite was given.
5674 if test "${enable_overwrite+set}" = set; then
5675   enableval="$enable_overwrite"
5676   with_overwrite=$enableval
5677 else
5678   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5679 fi;
5680 echo "$as_me:5680: result: $with_overwrite" >&5
5681 echo "${ECHO_T}$with_overwrite" >&6
5682
5683 echo "$as_me:5683: checking if external terminfo-database is used" >&5
5684 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5685
5686 # Check whether --enable-database or --disable-database was given.
5687 if test "${enable_database+set}" = set; then
5688   enableval="$enable_database"
5689   use_database=$enableval
5690 else
5691   use_database=yes
5692 fi;
5693 echo "$as_me:5693: result: $use_database" >&5
5694 echo "${ECHO_T}$use_database" >&6
5695
5696 case $host_os in #(vi
5697 os2*) #(vi
5698         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5699         ;;
5700 *) #(vi
5701         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5702         ;;
5703 esac
5704
5705         case $cf_cv_system_name in
5706         os2*)   PATH_SEPARATOR=';'  ;;
5707         *)      PATH_SEPARATOR=':'  ;;
5708         esac
5709
5710 if test "$use_database" != no ; then
5711         cat >>confdefs.h <<\EOF
5712 #define USE_DATABASE 1
5713 EOF
5714
5715         echo "$as_me:5715: checking which terminfo source-file will be installed" >&5
5716 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5717
5718 # Check whether --with-database or --without-database was given.
5719 if test "${with_database+set}" = set; then
5720   withval="$with_database"
5721   TERMINFO_SRC=$withval
5722 fi;
5723         echo "$as_me:5723: result: $TERMINFO_SRC" >&5
5724 echo "${ECHO_T}$TERMINFO_SRC" >&6
5725
5726         echo "$as_me:5726: checking whether to use hashed database instead of directory/tree" >&5
5727 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5728
5729 # Check whether --with-hashed-db or --without-hashed-db was given.
5730 if test "${with_hashed_db+set}" = set; then
5731   withval="$with_hashed_db"
5732
5733 else
5734   with_hashed_db=no
5735 fi;
5736         echo "$as_me:5736: result: $with_hashed_db" >&5
5737 echo "${ECHO_T}$with_hashed_db" >&6
5738 else
5739         with_hashed_db=no
5740 fi
5741
5742 echo "$as_me:5742: checking for list of fallback descriptions" >&5
5743 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5744
5745 # Check whether --with-fallbacks or --without-fallbacks was given.
5746 if test "${with_fallbacks+set}" = set; then
5747   withval="$with_fallbacks"
5748   with_fallback=$withval
5749 else
5750   with_fallback=
5751 fi;
5752 echo "$as_me:5752: result: $with_fallback" >&5
5753 echo "${ECHO_T}$with_fallback" >&6
5754 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5755
5756 echo "$as_me:5756: checking if you want modern xterm or antique" >&5
5757 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5758
5759 # Check whether --with-xterm-new or --without-xterm-new was given.
5760 if test "${with_xterm_new+set}" = set; then
5761   withval="$with_xterm_new"
5762   with_xterm_new=$withval
5763 else
5764   with_xterm_new=yes
5765 fi;
5766 case $with_xterm_new in
5767 no)     with_xterm_new=xterm-old;;
5768 *)      with_xterm_new=xterm-new;;
5769 esac
5770 echo "$as_me:5770: result: $with_xterm_new" >&5
5771 echo "${ECHO_T}$with_xterm_new" >&6
5772 WHICH_XTERM=$with_xterm_new
5773
5774 MAKE_TERMINFO=
5775 if test "$use_database" = no ; then
5776         TERMINFO="${datadir}/terminfo"
5777         MAKE_TERMINFO="#"
5778 else
5779
5780 echo "$as_me:5780: checking for list of terminfo directories" >&5
5781 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5782
5783 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5784 if test "${with_terminfo_dirs+set}" = set; then
5785   withval="$with_terminfo_dirs"
5786
5787 else
5788   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5789 fi;
5790 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5791 cf_dst_path=
5792 for cf_src_path in $withval
5793 do
5794
5795 if test "x$prefix" != xNONE; then
5796   cf_path_syntax="$prefix"
5797 else
5798   cf_path_syntax="$ac_default_prefix"
5799 fi
5800
5801 case ".$cf_src_path" in #(vi
5802 .\$\(*\)*|.\'*\'*) #(vi
5803   ;;
5804 ..|./*|.\\*) #(vi
5805   ;;
5806 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5807   ;;
5808 .\${*prefix}*) #(vi
5809   eval cf_src_path="$cf_src_path"
5810   case ".$cf_src_path" in #(vi
5811   .NONE/*)
5812     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5813     ;;
5814   esac
5815   ;; #(vi
5816 .no|.NONE/*)
5817   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5818   ;;
5819 *)
5820   { { echo "$as_me:5820: error: expected a pathname, not \"$cf_src_path\"" >&5
5821 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5822    { (exit 1); exit 1; }; }
5823   ;;
5824 esac
5825
5826   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5827   cf_dst_path="${cf_dst_path}${cf_src_path}"
5828 done
5829 IFS="$ac_save_ifs"
5830
5831 eval 'TERMINFO_DIRS="$cf_dst_path"'
5832
5833 echo "$as_me:5833: result: $TERMINFO_DIRS" >&5
5834 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5835 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5836 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5837 EOF
5838
5839 echo "$as_me:5839: checking for default terminfo directory" >&5
5840 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5841
5842 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5843 if test "${with_default_terminfo_dir+set}" = set; then
5844   withval="$with_default_terminfo_dir"
5845
5846 else
5847   withval="${TERMINFO-${datadir}/terminfo}"
5848 fi; if test -n "${datadir}/terminfo" ; then
5849
5850 if test "x$prefix" != xNONE; then
5851   cf_path_syntax="$prefix"
5852 else
5853   cf_path_syntax="$ac_default_prefix"
5854 fi
5855
5856 case ".$withval" in #(vi
5857 .\$\(*\)*|.\'*\'*) #(vi
5858   ;;
5859 ..|./*|.\\*) #(vi
5860   ;;
5861 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5862   ;;
5863 .\${*prefix}*) #(vi
5864   eval withval="$withval"
5865   case ".$withval" in #(vi
5866   .NONE/*)
5867     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5868     ;;
5869   esac
5870   ;; #(vi
5871 .no|.NONE/*)
5872   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5873   ;;
5874 *)
5875   { { echo "$as_me:5875: error: expected a pathname, not \"$withval\"" >&5
5876 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5877    { (exit 1); exit 1; }; }
5878   ;;
5879 esac
5880
5881 fi
5882 TERMINFO="$withval"
5883
5884 echo "$as_me:5884: result: $TERMINFO" >&5
5885 echo "${ECHO_T}$TERMINFO" >&6
5886 cat >>confdefs.h <<EOF
5887 #define TERMINFO "$TERMINFO"
5888 EOF
5889
5890 fi
5891
5892 ###     use option --disable-big-core to make tic run on small machines
5893 ###     We need 4Mb, check if we can allocate 50% more than that.
5894 echo "$as_me:5894: checking if big-core option selected" >&5
5895 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5896
5897 # Check whether --enable-big-core or --disable-big-core was given.
5898 if test "${enable_big_core+set}" = set; then
5899   enableval="$enable_big_core"
5900   with_big_core=$enableval
5901 else
5902   if test "$cross_compiling" = yes; then
5903   with_big_core=no
5904 else
5905   cat >conftest.$ac_ext <<_ACEOF
5906 #line 5906 "configure"
5907 #include "confdefs.h"
5908
5909 #include <stdlib.h>
5910 #include <string.h>
5911 int main() {
5912         unsigned long n = 6000000L;
5913         char *s = malloc(n);
5914         if (s != 0)
5915                 s[0] = s[n-1] = 0;
5916         ${cf_cv_main_return:-return}(s == 0);
5917 }
5918 _ACEOF
5919 rm -f conftest$ac_exeext
5920 if { (eval echo "$as_me:5920: \"$ac_link\"") >&5
5921   (eval $ac_link) 2>&5
5922   ac_status=$?
5923   echo "$as_me:5923: \$? = $ac_status" >&5
5924   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5925   { (eval echo "$as_me:5925: \"$ac_try\"") >&5
5926   (eval $ac_try) 2>&5
5927   ac_status=$?
5928   echo "$as_me:5928: \$? = $ac_status" >&5
5929   (exit $ac_status); }; }; then
5930   with_big_core=yes
5931 else
5932   echo "$as_me: program exited with status $ac_status" >&5
5933 echo "$as_me: failed program was:" >&5
5934 cat conftest.$ac_ext >&5
5935 with_big_core=no
5936 fi
5937 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5938 fi
5939 fi;
5940 echo "$as_me:5940: result: $with_big_core" >&5
5941 echo "${ECHO_T}$with_big_core" >&6
5942 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
5943 #define HAVE_BIG_CORE 1
5944 EOF
5945
5946 ### ISO C only guarantees 512-char strings, we have tables which load faster
5947 ### when constructed using "big" strings.  More than the C compiler, the awk
5948 ### program is a limit on most vendor UNIX systems.  Check that we can build.
5949 echo "$as_me:5949: checking if big-strings option selected" >&5
5950 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
5951
5952 # Check whether --enable-big-strings or --disable-big-strings was given.
5953 if test "${enable_big_strings+set}" = set; then
5954   enableval="$enable_big_strings"
5955   with_big_strings=$enableval
5956 else
5957
5958         case x$AWK in #(vi
5959         x)
5960                 eval with_big_strings=no
5961                 ;;
5962         *) #(vi
5963                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
5964                         | $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
5965                         eval with_big_strings=yes
5966                 else
5967                         eval with_big_strings=no
5968                 fi
5969                 ;;
5970         esac
5971
5972 fi;
5973 echo "$as_me:5973: result: $with_big_strings" >&5
5974 echo "${ECHO_T}$with_big_strings" >&6
5975
5976 USE_BIG_STRINGS=0
5977 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
5978
5979 ###     use option --enable-termcap to compile in the termcap fallback support
5980 echo "$as_me:5980: checking if you want termcap-fallback support" >&5
5981 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
5982
5983 # Check whether --enable-termcap or --disable-termcap was given.
5984 if test "${enable_termcap+set}" = set; then
5985   enableval="$enable_termcap"
5986   with_termcap=$enableval
5987 else
5988   with_termcap=no
5989 fi;
5990 echo "$as_me:5990: result: $with_termcap" >&5
5991 echo "${ECHO_T}$with_termcap" >&6
5992
5993 if test "$with_termcap" != "yes" ; then
5994         if test "$use_database" = no ; then
5995                 if test -z "$with_fallback" ; then
5996                         { { echo "$as_me:5996: error: You have disabled the database w/o specifying fallbacks" >&5
5997 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
5998    { (exit 1); exit 1; }; }
5999                 fi
6000         fi
6001         cat >>confdefs.h <<\EOF
6002 #define PURE_TERMINFO 1
6003 EOF
6004
6005 else
6006
6007 if test "$with_ticlib" != no ; then
6008         { { echo "$as_me:6008: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6009 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6010    { (exit 1); exit 1; }; }
6011 fi
6012
6013 cat >>confdefs.h <<\EOF
6014 #define USE_TERMCAP 1
6015 EOF
6016
6017 echo "$as_me:6017: checking for list of termcap files" >&5
6018 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6019
6020 # Check whether --with-termpath or --without-termpath was given.
6021 if test "${with_termpath+set}" = set; then
6022   withval="$with_termpath"
6023
6024 else
6025   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6026 fi;
6027 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6028 cf_dst_path=
6029 for cf_src_path in $withval
6030 do
6031
6032 if test "x$prefix" != xNONE; then
6033   cf_path_syntax="$prefix"
6034 else
6035   cf_path_syntax="$ac_default_prefix"
6036 fi
6037
6038 case ".$cf_src_path" in #(vi
6039 .\$\(*\)*|.\'*\'*) #(vi
6040   ;;
6041 ..|./*|.\\*) #(vi
6042   ;;
6043 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6044   ;;
6045 .\${*prefix}*) #(vi
6046   eval cf_src_path="$cf_src_path"
6047   case ".$cf_src_path" in #(vi
6048   .NONE/*)
6049     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6050     ;;
6051   esac
6052   ;; #(vi
6053 .no|.NONE/*)
6054   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6055   ;;
6056 *)
6057   { { echo "$as_me:6057: error: expected a pathname, not \"$cf_src_path\"" >&5
6058 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6059    { (exit 1); exit 1; }; }
6060   ;;
6061 esac
6062
6063   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6064   cf_dst_path="${cf_dst_path}${cf_src_path}"
6065 done
6066 IFS="$ac_save_ifs"
6067
6068 eval 'TERMPATH="$cf_dst_path"'
6069
6070 echo "$as_me:6070: result: $TERMPATH" >&5
6071 echo "${ECHO_T}$TERMPATH" >&6
6072 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6073 #define TERMPATH "$TERMPATH"
6074 EOF
6075
6076 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6077 echo "$as_me:6077: checking if fast termcap-loader is needed" >&5
6078 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6079
6080 # Check whether --enable-getcap or --disable-getcap was given.
6081 if test "${enable_getcap+set}" = set; then
6082   enableval="$enable_getcap"
6083   with_getcap=$enableval
6084 else
6085   with_getcap=no
6086 fi;
6087 echo "$as_me:6087: result: $with_getcap" >&5
6088 echo "${ECHO_T}$with_getcap" >&6
6089 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6090 #define USE_GETCAP 1
6091 EOF
6092
6093 echo "$as_me:6093: checking if translated termcaps will be cached in ~/.terminfo" >&5
6094 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6095
6096 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6097 if test "${enable_getcap_cache+set}" = set; then
6098   enableval="$enable_getcap_cache"
6099   with_getcap_cache=$enableval
6100 else
6101   with_getcap_cache=no
6102 fi;
6103 echo "$as_me:6103: result: $with_getcap_cache" >&5
6104 echo "${ECHO_T}$with_getcap_cache" >&6
6105 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6106 #define USE_GETCAP_CACHE 1
6107 EOF
6108
6109 fi
6110
6111 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6112 echo "$as_me:6112: checking if ~/.terminfo is wanted" >&5
6113 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6114
6115 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6116 if test "${enable_home_terminfo+set}" = set; then
6117   enableval="$enable_home_terminfo"
6118   with_home_terminfo=$enableval
6119 else
6120   with_home_terminfo=yes
6121 fi;
6122 echo "$as_me:6122: result: $with_home_terminfo" >&5
6123 echo "${ECHO_T}$with_home_terminfo" >&6
6124 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6125 #define USE_HOME_TERMINFO 1
6126 EOF
6127
6128 echo "$as_me:6128: checking if you want to use restricted environment when running as root" >&5
6129 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6130
6131 # Check whether --enable-root-environ or --disable-root-environ was given.
6132 if test "${enable_root_environ+set}" = set; then
6133   enableval="$enable_root_environ"
6134   with_root_environ=$enableval
6135 else
6136   with_root_environ=yes
6137 fi;
6138 echo "$as_me:6138: result: $with_root_environ" >&5
6139 echo "${ECHO_T}$with_root_environ" >&6
6140 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6141 #define USE_ROOT_ENVIRON 1
6142 EOF
6143
6144 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6145 ###   to reduce storage requirements for the terminfo database.
6146
6147 for ac_func in \
6148         remove \
6149         unlink
6150 do
6151 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6152 echo "$as_me:6152: checking for $ac_func" >&5
6153 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6154 if eval "test \"\${$as_ac_var+set}\" = set"; then
6155   echo $ECHO_N "(cached) $ECHO_C" >&6
6156 else
6157   cat >conftest.$ac_ext <<_ACEOF
6158 #line 6158 "configure"
6159 #include "confdefs.h"
6160 /* System header to define __stub macros and hopefully few prototypes,
6161     which can conflict with char $ac_func (); below.  */
6162 #include <assert.h>
6163 /* Override any gcc2 internal prototype to avoid an error.  */
6164 #ifdef __cplusplus
6165 extern "C"
6166 #endif
6167 /* We use char because int might match the return type of a gcc2
6168    builtin and then its argument prototype would still apply.  */
6169 char $ac_func ();
6170 char (*f) ();
6171
6172 int
6173 main ()
6174 {
6175 /* The GNU C library defines this for functions which it implements
6176     to always fail with ENOSYS.  Some functions are actually named
6177     something starting with __ and the normal name is an alias.  */
6178 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6179 choke me
6180 #else
6181 f = $ac_func;
6182 #endif
6183
6184   ;
6185   return 0;
6186 }
6187 _ACEOF
6188 rm -f conftest.$ac_objext conftest$ac_exeext
6189 if { (eval echo "$as_me:6189: \"$ac_link\"") >&5
6190   (eval $ac_link) 2>&5
6191   ac_status=$?
6192   echo "$as_me:6192: \$? = $ac_status" >&5
6193   (exit $ac_status); } &&
6194          { ac_try='test -s conftest$ac_exeext'
6195   { (eval echo "$as_me:6195: \"$ac_try\"") >&5
6196   (eval $ac_try) 2>&5
6197   ac_status=$?
6198   echo "$as_me:6198: \$? = $ac_status" >&5
6199   (exit $ac_status); }; }; then
6200   eval "$as_ac_var=yes"
6201 else
6202   echo "$as_me: failed program was:" >&5
6203 cat conftest.$ac_ext >&5
6204 eval "$as_ac_var=no"
6205 fi
6206 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6207 fi
6208 echo "$as_me:6208: result: `eval echo '${'$as_ac_var'}'`" >&5
6209 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6210 if test `eval echo '${'$as_ac_var'}'` = yes; then
6211   cat >>confdefs.h <<EOF
6212 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6213 EOF
6214
6215 fi
6216 done
6217
6218 if test "$cross_compiling" = yes ; then
6219
6220 for ac_func in \
6221                 link \
6222                 symlink
6223 do
6224 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6225 echo "$as_me:6225: checking for $ac_func" >&5
6226 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6227 if eval "test \"\${$as_ac_var+set}\" = set"; then
6228   echo $ECHO_N "(cached) $ECHO_C" >&6
6229 else
6230   cat >conftest.$ac_ext <<_ACEOF
6231 #line 6231 "configure"
6232 #include "confdefs.h"
6233 /* System header to define __stub macros and hopefully few prototypes,
6234     which can conflict with char $ac_func (); below.  */
6235 #include <assert.h>
6236 /* Override any gcc2 internal prototype to avoid an error.  */
6237 #ifdef __cplusplus
6238 extern "C"
6239 #endif
6240 /* We use char because int might match the return type of a gcc2
6241    builtin and then its argument prototype would still apply.  */
6242 char $ac_func ();
6243 char (*f) ();
6244
6245 int
6246 main ()
6247 {
6248 /* The GNU C library defines this for functions which it implements
6249     to always fail with ENOSYS.  Some functions are actually named
6250     something starting with __ and the normal name is an alias.  */
6251 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6252 choke me
6253 #else
6254 f = $ac_func;
6255 #endif
6256
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 rm -f conftest.$ac_objext conftest$ac_exeext
6262 if { (eval echo "$as_me:6262: \"$ac_link\"") >&5
6263   (eval $ac_link) 2>&5
6264   ac_status=$?
6265   echo "$as_me:6265: \$? = $ac_status" >&5
6266   (exit $ac_status); } &&
6267          { ac_try='test -s conftest$ac_exeext'
6268   { (eval echo "$as_me:6268: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit $ac_status); }; }; then
6273   eval "$as_ac_var=yes"
6274 else
6275   echo "$as_me: failed program was:" >&5
6276 cat conftest.$ac_ext >&5
6277 eval "$as_ac_var=no"
6278 fi
6279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6280 fi
6281 echo "$as_me:6281: result: `eval echo '${'$as_ac_var'}'`" >&5
6282 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6283 if test `eval echo '${'$as_ac_var'}'` = yes; then
6284   cat >>confdefs.h <<EOF
6285 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6286 EOF
6287
6288 fi
6289 done
6290
6291 else
6292         echo "$as_me:6292: checking if link/symlink functions work" >&5
6293 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6294 if test "${cf_cv_link_funcs+set}" = set; then
6295   echo $ECHO_N "(cached) $ECHO_C" >&6
6296 else
6297
6298                 cf_cv_link_funcs=
6299                 for cf_func in link symlink ; do
6300                         if test "$cross_compiling" = yes; then
6301
6302                         eval 'ac_cv_func_'$cf_func'=error'
6303 else
6304   cat >conftest.$ac_ext <<_ACEOF
6305 #line 6305 "configure"
6306 #include "confdefs.h"
6307
6308 #include <sys/types.h>
6309 #include <sys/stat.h>
6310 #ifdef HAVE_UNISTD_H
6311 #include <unistd.h>
6312 #endif
6313 int main()
6314 {
6315         int fail = 0;
6316         char *src = "config.log";
6317         char *dst = "conftest.chk";
6318         struct stat src_sb;
6319         struct stat dst_sb;
6320
6321         stat(src, &src_sb);
6322         fail = ($cf_func("config.log", "conftest.chk") < 0)
6323             || (stat(dst, &dst_sb) < 0)
6324             || (dst_sb.st_mtime != src_sb.st_mtime);
6325 #ifdef HAVE_UNLINK
6326         unlink(dst);
6327 #else
6328         remove(dst);
6329 #endif
6330         ${cf_cv_main_return:-return} (fail);
6331 }
6332
6333 _ACEOF
6334 rm -f conftest$ac_exeext
6335 if { (eval echo "$as_me:6335: \"$ac_link\"") >&5
6336   (eval $ac_link) 2>&5
6337   ac_status=$?
6338   echo "$as_me:6338: \$? = $ac_status" >&5
6339   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6340   { (eval echo "$as_me:6340: \"$ac_try\"") >&5
6341   (eval $ac_try) 2>&5
6342   ac_status=$?
6343   echo "$as_me:6343: \$? = $ac_status" >&5
6344   (exit $ac_status); }; }; then
6345
6346                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6347                         eval 'ac_cv_func_'$cf_func'=yes'
6348 else
6349   echo "$as_me: program exited with status $ac_status" >&5
6350 echo "$as_me: failed program was:" >&5
6351 cat conftest.$ac_ext >&5
6352
6353                         eval 'ac_cv_func_'$cf_func'=no'
6354 fi
6355 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6356 fi
6357                 done
6358                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6359
6360 fi
6361 echo "$as_me:6361: result: $cf_cv_link_funcs" >&5
6362 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6363         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6364 #define HAVE_LINK 1
6365 EOF
6366
6367         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6368 #define HAVE_SYMLINK 1
6369 EOF
6370
6371 fi
6372
6373 with_links=no
6374 with_symlinks=no
6375
6376 # soft links (symbolic links) are useful for some systems where hard links do
6377 # not work, or to make it simpler to copy terminfo trees around.
6378 if test "$ac_cv_func_symlink" = yes ; then
6379     echo "$as_me:6379: checking if tic should use symbolic links" >&5
6380 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6381
6382 # Check whether --enable-symlinks or --disable-symlinks was given.
6383 if test "${enable_symlinks+set}" = set; then
6384   enableval="$enable_symlinks"
6385   with_symlinks=$enableval
6386 else
6387   with_symlinks=no
6388 fi;
6389     echo "$as_me:6389: result: $with_symlinks" >&5
6390 echo "${ECHO_T}$with_symlinks" >&6
6391 fi
6392
6393 # If we have hard links and did not choose to use soft links instead, there is
6394 # no reason to make this choice optional - use the hard links.
6395 if test "$with_symlinks" = no ; then
6396     echo "$as_me:6396: checking if tic should use hard links" >&5
6397 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6398     if test "$ac_cv_func_link" = yes ; then
6399         with_links=yes
6400     else
6401         with_links=no
6402     fi
6403     echo "$as_me:6403: result: $with_links" >&5
6404 echo "${ECHO_T}$with_links" >&6
6405 fi
6406
6407 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6408 #define USE_LINKS 1
6409 EOF
6410
6411 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6412 #define USE_SYMLINKS 1
6413 EOF
6414
6415 ###   use option --enable-broken-linker to force on use of broken-linker support
6416 echo "$as_me:6416: checking if you want broken-linker support code" >&5
6417 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6418
6419 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6420 if test "${enable_broken_linker+set}" = set; then
6421   enableval="$enable_broken_linker"
6422   with_broken_linker=$enableval
6423 else
6424   with_broken_linker=${BROKEN_LINKER-no}
6425 fi;
6426 echo "$as_me:6426: result: $with_broken_linker" >&5
6427 echo "${ECHO_T}$with_broken_linker" >&6
6428
6429 BROKEN_LINKER=0
6430 if test "$with_broken_linker" = yes ; then
6431         cat >>confdefs.h <<\EOF
6432 #define BROKEN_LINKER 1
6433 EOF
6434
6435         BROKEN_LINKER=1
6436 elif test "$DFT_LWR_MODEL" = shared ; then
6437         case $cf_cv_system_name in #(vi
6438         cygwin*)
6439                 cat >>confdefs.h <<\EOF
6440 #define BROKEN_LINKER 1
6441 EOF
6442
6443                 BROKEN_LINKER=1
6444                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6445
6446 echo "${as_me-configure}:6446: testing cygwin linker is broken anyway ..." 1>&5
6447
6448                 ;;
6449         esac
6450 fi
6451
6452 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6453 echo "$as_me:6453: checking if tputs should process BSD-style prefix padding" >&5
6454 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6455
6456 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6457 if test "${enable_bsdpad+set}" = set; then
6458   enableval="$enable_bsdpad"
6459   with_bsdpad=$enableval
6460 else
6461   with_bsdpad=no
6462 fi;
6463 echo "$as_me:6463: result: $with_bsdpad" >&5
6464 echo "${ECHO_T}$with_bsdpad" >&6
6465 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6466 #define BSD_TPUTS 1
6467 EOF
6468
6469 ###   use option --enable-widec to turn on use of wide-character support
6470 NCURSES_CH_T=chtype
6471 NCURSES_LIBUTF8=0
6472
6473 NEED_WCHAR_H=0
6474 NCURSES_MBSTATE_T=0
6475 NCURSES_WCHAR_T=0
6476 NCURSES_WINT_T=0
6477
6478 # Check to define _XOPEN_SOURCE "automatically"
6479
6480 cf_XOPEN_SOURCE=500
6481 cf_POSIX_C_SOURCE=199506L
6482 cf_xopen_source=
6483
6484 case $host_os in #(vi
6485 aix[456]*) #(vi
6486         cf_xopen_source="-D_ALL_SOURCE"
6487         ;;
6488 darwin[0-8].*) #(vi
6489         cf_xopen_source="-D_APPLE_C_SOURCE"
6490         ;;
6491 darwin*) #(vi
6492         cf_xopen_source="-D_DARWIN_C_SOURCE"
6493         ;;
6494 freebsd*|dragonfly*) #(vi
6495         # 5.x headers associate
6496         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6497         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6498         cf_POSIX_C_SOURCE=200112L
6499         cf_XOPEN_SOURCE=600
6500         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6501         ;;
6502 hpux11*) #(vi
6503         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6504         ;;
6505 hpux*) #(vi
6506         cf_xopen_source="-D_HPUX_SOURCE"
6507         ;;
6508 irix[56].*) #(vi
6509         cf_xopen_source="-D_SGI_SOURCE"
6510         ;;
6511 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6512
6513 echo "$as_me:6513: checking if we must define _GNU_SOURCE" >&5
6514 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6515 if test "${cf_cv_gnu_source+set}" = set; then
6516   echo $ECHO_N "(cached) $ECHO_C" >&6
6517 else
6518
6519 cat >conftest.$ac_ext <<_ACEOF
6520 #line 6520 "configure"
6521 #include "confdefs.h"
6522 #include <sys/types.h>
6523 int
6524 main ()
6525 {
6526
6527 #ifndef _XOPEN_SOURCE
6528 make an error
6529 #endif
6530   ;
6531   return 0;
6532 }
6533 _ACEOF
6534 rm -f conftest.$ac_objext
6535 if { (eval echo "$as_me:6535: \"$ac_compile\"") >&5
6536   (eval $ac_compile) 2>&5
6537   ac_status=$?
6538   echo "$as_me:6538: \$? = $ac_status" >&5
6539   (exit $ac_status); } &&
6540          { ac_try='test -s conftest.$ac_objext'
6541   { (eval echo "$as_me:6541: \"$ac_try\"") >&5
6542   (eval $ac_try) 2>&5
6543   ac_status=$?
6544   echo "$as_me:6544: \$? = $ac_status" >&5
6545   (exit $ac_status); }; }; then
6546   cf_cv_gnu_source=no
6547 else
6548   echo "$as_me: failed program was:" >&5
6549 cat conftest.$ac_ext >&5
6550 cf_save="$CPPFLAGS"
6551          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6552          cat >conftest.$ac_ext <<_ACEOF
6553 #line 6553 "configure"
6554 #include "confdefs.h"
6555 #include <sys/types.h>
6556 int
6557 main ()
6558 {
6559
6560 #ifdef _XOPEN_SOURCE
6561 make an error
6562 #endif
6563   ;
6564   return 0;
6565 }
6566 _ACEOF
6567 rm -f conftest.$ac_objext
6568 if { (eval echo "$as_me:6568: \"$ac_compile\"") >&5
6569   (eval $ac_compile) 2>&5
6570   ac_status=$?
6571   echo "$as_me:6571: \$? = $ac_status" >&5
6572   (exit $ac_status); } &&
6573          { ac_try='test -s conftest.$ac_objext'
6574   { (eval echo "$as_me:6574: \"$ac_try\"") >&5
6575   (eval $ac_try) 2>&5
6576   ac_status=$?
6577   echo "$as_me:6577: \$? = $ac_status" >&5
6578   (exit $ac_status); }; }; then
6579   cf_cv_gnu_source=no
6580 else
6581   echo "$as_me: failed program was:" >&5
6582 cat conftest.$ac_ext >&5
6583 cf_cv_gnu_source=yes
6584 fi
6585 rm -f conftest.$ac_objext conftest.$ac_ext
6586         CPPFLAGS="$cf_save"
6587
6588 fi
6589 rm -f conftest.$ac_objext conftest.$ac_ext
6590
6591 fi
6592 echo "$as_me:6592: result: $cf_cv_gnu_source" >&5
6593 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6594 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6595
6596         ;;
6597 mirbsd*) #(vi
6598         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6599         ;;
6600 netbsd*) #(vi
6601         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6602         ;;
6603 openbsd*) #(vi
6604         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6605         ;;
6606 osf[45]*) #(vi
6607         cf_xopen_source="-D_OSF_SOURCE"
6608         ;;
6609 nto-qnx*) #(vi
6610         cf_xopen_source="-D_QNX_SOURCE"
6611         ;;
6612 sco*) #(vi
6613         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6614         ;;
6615 solaris*) #(vi
6616         cf_xopen_source="-D__EXTENSIONS__"
6617         ;;
6618 *)
6619         echo "$as_me:6619: checking if we should define _XOPEN_SOURCE" >&5
6620 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6621 if test "${cf_cv_xopen_source+set}" = set; then
6622   echo $ECHO_N "(cached) $ECHO_C" >&6
6623 else
6624
6625         cat >conftest.$ac_ext <<_ACEOF
6626 #line 6626 "configure"
6627 #include "confdefs.h"
6628 #include <sys/types.h>
6629 int
6630 main ()
6631 {
6632
6633 #ifndef _XOPEN_SOURCE
6634 make an error
6635 #endif
6636   ;
6637   return 0;
6638 }
6639 _ACEOF
6640 rm -f conftest.$ac_objext
6641 if { (eval echo "$as_me:6641: \"$ac_compile\"") >&5
6642   (eval $ac_compile) 2>&5
6643   ac_status=$?
6644   echo "$as_me:6644: \$? = $ac_status" >&5
6645   (exit $ac_status); } &&
6646          { ac_try='test -s conftest.$ac_objext'
6647   { (eval echo "$as_me:6647: \"$ac_try\"") >&5
6648   (eval $ac_try) 2>&5
6649   ac_status=$?
6650   echo "$as_me:6650: \$? = $ac_status" >&5
6651   (exit $ac_status); }; }; then
6652   cf_cv_xopen_source=no
6653 else
6654   echo "$as_me: failed program was:" >&5
6655 cat conftest.$ac_ext >&5
6656 cf_save="$CPPFLAGS"
6657          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6658          cat >conftest.$ac_ext <<_ACEOF
6659 #line 6659 "configure"
6660 #include "confdefs.h"
6661 #include <sys/types.h>
6662 int
6663 main ()
6664 {
6665
6666 #ifdef _XOPEN_SOURCE
6667 make an error
6668 #endif
6669   ;
6670   return 0;
6671 }
6672 _ACEOF
6673 rm -f conftest.$ac_objext
6674 if { (eval echo "$as_me:6674: \"$ac_compile\"") >&5
6675   (eval $ac_compile) 2>&5
6676   ac_status=$?
6677   echo "$as_me:6677: \$? = $ac_status" >&5
6678   (exit $ac_status); } &&
6679          { ac_try='test -s conftest.$ac_objext'
6680   { (eval echo "$as_me:6680: \"$ac_try\"") >&5
6681   (eval $ac_try) 2>&5
6682   ac_status=$?
6683   echo "$as_me:6683: \$? = $ac_status" >&5
6684   (exit $ac_status); }; }; then
6685   cf_cv_xopen_source=no
6686 else
6687   echo "$as_me: failed program was:" >&5
6688 cat conftest.$ac_ext >&5
6689 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6690 fi
6691 rm -f conftest.$ac_objext conftest.$ac_ext
6692         CPPFLAGS="$cf_save"
6693
6694 fi
6695 rm -f conftest.$ac_objext conftest.$ac_ext
6696
6697 fi
6698 echo "$as_me:6698: result: $cf_cv_xopen_source" >&5
6699 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6700         if test "$cf_cv_xopen_source" != no ; then
6701
6702 CFLAGS=`echo "$CFLAGS" | \
6703         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6704                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6705
6706 CPPFLAGS=`echo "$CPPFLAGS" | \
6707         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6708                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6709
6710                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6711
6712 cf_fix_cppflags=no
6713 cf_new_cflags=
6714 cf_new_cppflags=
6715 cf_new_extra_cppflags=
6716
6717 for cf_add_cflags in $cf_temp_xopen_source
6718 do
6719 case $cf_fix_cppflags in
6720 no)
6721         case $cf_add_cflags in #(vi
6722         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6723                 case $cf_add_cflags in
6724                 -D*)
6725                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6726
6727                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6728                                 && test -z "${cf_tst_cflags}" \
6729                                 && cf_fix_cppflags=yes
6730
6731                         if test $cf_fix_cppflags = yes ; then
6732                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6733                                 continue
6734                         elif test "${cf_tst_cflags}" = "\"'" ; then
6735                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6736                                 continue
6737                         fi
6738                         ;;
6739                 esac
6740                 case "$CPPFLAGS" in
6741                 *$cf_add_cflags) #(vi
6742                         ;;
6743                 *) #(vi
6744                         case $cf_add_cflags in #(vi
6745                         -D*)
6746                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6747
6748 CPPFLAGS=`echo "$CPPFLAGS" | \
6749         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6750                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6751
6752                                 ;;
6753                         esac
6754                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6755                         ;;
6756                 esac
6757                 ;;
6758         *)
6759                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6760                 ;;
6761         esac
6762         ;;
6763 yes)
6764         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6765
6766         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6767
6768         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6769                 && test -z "${cf_tst_cflags}" \
6770                 && cf_fix_cppflags=no
6771         ;;
6772 esac
6773 done
6774
6775 if test -n "$cf_new_cflags" ; then
6776
6777         CFLAGS="$CFLAGS $cf_new_cflags"
6778 fi
6779
6780 if test -n "$cf_new_cppflags" ; then
6781
6782         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6783 fi
6784
6785 if test -n "$cf_new_extra_cppflags" ; then
6786
6787         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6788 fi
6789
6790         fi
6791
6792 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6793
6794 cf_save_CFLAGS="$CFLAGS"
6795 cf_save_CPPFLAGS="$CPPFLAGS"
6796
6797 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6798         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6799                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6800
6801 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6802         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6803                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6804
6805 echo "$as_me:6805: checking if we should define _POSIX_C_SOURCE" >&5
6806 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6807 if test "${cf_cv_posix_c_source+set}" = set; then
6808   echo $ECHO_N "(cached) $ECHO_C" >&6
6809 else
6810
6811 echo "${as_me-configure}:6811: testing if the symbol is already defined go no further ..." 1>&5
6812
6813         cat >conftest.$ac_ext <<_ACEOF
6814 #line 6814 "configure"
6815 #include "confdefs.h"
6816 #include <sys/types.h>
6817 int
6818 main ()
6819 {
6820
6821 #ifndef _POSIX_C_SOURCE
6822 make an error
6823 #endif
6824   ;
6825   return 0;
6826 }
6827 _ACEOF
6828 rm -f conftest.$ac_objext
6829 if { (eval echo "$as_me:6829: \"$ac_compile\"") >&5
6830   (eval $ac_compile) 2>&5
6831   ac_status=$?
6832   echo "$as_me:6832: \$? = $ac_status" >&5
6833   (exit $ac_status); } &&
6834          { ac_try='test -s conftest.$ac_objext'
6835   { (eval echo "$as_me:6835: \"$ac_try\"") >&5
6836   (eval $ac_try) 2>&5
6837   ac_status=$?
6838   echo "$as_me:6838: \$? = $ac_status" >&5
6839   (exit $ac_status); }; }; then
6840   cf_cv_posix_c_source=no
6841 else
6842   echo "$as_me: failed program was:" >&5
6843 cat conftest.$ac_ext >&5
6844 cf_want_posix_source=no
6845          case .$cf_POSIX_C_SOURCE in #(vi
6846          .[12]??*) #(vi
6847                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6848                 ;;
6849          .2) #(vi
6850                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6851                 cf_want_posix_source=yes
6852                 ;;
6853          .*)
6854                 cf_want_posix_source=yes
6855                 ;;
6856          esac
6857          if test "$cf_want_posix_source" = yes ; then
6858                 cat >conftest.$ac_ext <<_ACEOF
6859 #line 6859 "configure"
6860 #include "confdefs.h"
6861 #include <sys/types.h>
6862 int
6863 main ()
6864 {
6865
6866 #ifdef _POSIX_SOURCE
6867 make an error
6868 #endif
6869   ;
6870   return 0;
6871 }
6872 _ACEOF
6873 rm -f conftest.$ac_objext
6874 if { (eval echo "$as_me:6874: \"$ac_compile\"") >&5
6875   (eval $ac_compile) 2>&5
6876   ac_status=$?
6877   echo "$as_me:6877: \$? = $ac_status" >&5
6878   (exit $ac_status); } &&
6879          { ac_try='test -s conftest.$ac_objext'
6880   { (eval echo "$as_me:6880: \"$ac_try\"") >&5
6881   (eval $ac_try) 2>&5
6882   ac_status=$?
6883   echo "$as_me:6883: \$? = $ac_status" >&5
6884   (exit $ac_status); }; }; then
6885   :
6886 else
6887   echo "$as_me: failed program was:" >&5
6888 cat conftest.$ac_ext >&5
6889 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6890 fi
6891 rm -f conftest.$ac_objext conftest.$ac_ext
6892          fi
6893
6894 echo "${as_me-configure}:6894: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6895
6896          CFLAGS="$cf_trim_CFLAGS"
6897          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
6898
6899 echo "${as_me-configure}:6899: testing if the second compile does not leave our definition intact error ..." 1>&5
6900
6901          cat >conftest.$ac_ext <<_ACEOF
6902 #line 6902 "configure"
6903 #include "confdefs.h"
6904 #include <sys/types.h>
6905 int
6906 main ()
6907 {
6908
6909 #ifndef _POSIX_C_SOURCE
6910 make an error
6911 #endif
6912   ;
6913   return 0;
6914 }
6915 _ACEOF
6916 rm -f conftest.$ac_objext
6917 if { (eval echo "$as_me:6917: \"$ac_compile\"") >&5
6918   (eval $ac_compile) 2>&5
6919   ac_status=$?
6920   echo "$as_me:6920: \$? = $ac_status" >&5
6921   (exit $ac_status); } &&
6922          { ac_try='test -s conftest.$ac_objext'
6923   { (eval echo "$as_me:6923: \"$ac_try\"") >&5
6924   (eval $ac_try) 2>&5
6925   ac_status=$?
6926   echo "$as_me:6926: \$? = $ac_status" >&5
6927   (exit $ac_status); }; }; then
6928   :
6929 else
6930   echo "$as_me: failed program was:" >&5
6931 cat conftest.$ac_ext >&5
6932 cf_cv_posix_c_source=no
6933 fi
6934 rm -f conftest.$ac_objext conftest.$ac_ext
6935          CFLAGS="$cf_save_CFLAGS"
6936          CPPFLAGS="$cf_save_CPPFLAGS"
6937
6938 fi
6939 rm -f conftest.$ac_objext conftest.$ac_ext
6940
6941 fi
6942 echo "$as_me:6942: result: $cf_cv_posix_c_source" >&5
6943 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
6944
6945 if test "$cf_cv_posix_c_source" != no ; then
6946         CFLAGS="$cf_trim_CFLAGS"
6947         CPPFLAGS="$cf_trim_CPPFLAGS"
6948
6949 cf_fix_cppflags=no
6950 cf_new_cflags=
6951 cf_new_cppflags=
6952 cf_new_extra_cppflags=
6953
6954 for cf_add_cflags in $cf_cv_posix_c_source
6955 do
6956 case $cf_fix_cppflags in
6957 no)
6958         case $cf_add_cflags in #(vi
6959         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6960                 case $cf_add_cflags in
6961                 -D*)
6962                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6963
6964                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6965                                 && test -z "${cf_tst_cflags}" \
6966                                 && cf_fix_cppflags=yes
6967
6968                         if test $cf_fix_cppflags = yes ; then
6969                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6970                                 continue
6971                         elif test "${cf_tst_cflags}" = "\"'" ; then
6972                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6973                                 continue
6974                         fi
6975                         ;;
6976                 esac
6977                 case "$CPPFLAGS" in
6978                 *$cf_add_cflags) #(vi
6979                         ;;
6980                 *) #(vi
6981                         case $cf_add_cflags in #(vi
6982                         -D*)
6983                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6984
6985 CPPFLAGS=`echo "$CPPFLAGS" | \
6986         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6987                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6988
6989                                 ;;
6990                         esac
6991                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6992                         ;;
6993                 esac
6994                 ;;
6995         *)
6996                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6997                 ;;
6998         esac
6999         ;;
7000 yes)
7001         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7002
7003         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7004
7005         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7006                 && test -z "${cf_tst_cflags}" \
7007                 && cf_fix_cppflags=no
7008         ;;
7009 esac
7010 done
7011
7012 if test -n "$cf_new_cflags" ; then
7013
7014         CFLAGS="$CFLAGS $cf_new_cflags"
7015 fi
7016
7017 if test -n "$cf_new_cppflags" ; then
7018
7019         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7020 fi
7021
7022 if test -n "$cf_new_extra_cppflags" ; then
7023
7024         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7025 fi
7026
7027 fi
7028
7029         ;;
7030 esac
7031
7032 if test -n "$cf_xopen_source" ; then
7033
7034 cf_fix_cppflags=no
7035 cf_new_cflags=
7036 cf_new_cppflags=
7037 cf_new_extra_cppflags=
7038
7039 for cf_add_cflags in $cf_xopen_source
7040 do
7041 case $cf_fix_cppflags in
7042 no)
7043         case $cf_add_cflags in #(vi
7044         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7045                 case $cf_add_cflags in
7046                 -D*)
7047                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7048
7049                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7050                                 && test -z "${cf_tst_cflags}" \
7051                                 && cf_fix_cppflags=yes
7052
7053                         if test $cf_fix_cppflags = yes ; then
7054                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7055                                 continue
7056                         elif test "${cf_tst_cflags}" = "\"'" ; then
7057                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7058                                 continue
7059                         fi
7060                         ;;
7061                 esac
7062                 case "$CPPFLAGS" in
7063                 *$cf_add_cflags) #(vi
7064                         ;;
7065                 *) #(vi
7066                         case $cf_add_cflags in #(vi
7067                         -D*)
7068                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7069
7070 CPPFLAGS=`echo "$CPPFLAGS" | \
7071         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7072                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7073
7074                                 ;;
7075                         esac
7076                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7077                         ;;
7078                 esac
7079                 ;;
7080         *)
7081                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7082                 ;;
7083         esac
7084         ;;
7085 yes)
7086         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7087
7088         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7089
7090         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7091                 && test -z "${cf_tst_cflags}" \
7092                 && cf_fix_cppflags=no
7093         ;;
7094 esac
7095 done
7096
7097 if test -n "$cf_new_cflags" ; then
7098
7099         CFLAGS="$CFLAGS $cf_new_cflags"
7100 fi
7101
7102 if test -n "$cf_new_cppflags" ; then
7103
7104         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7105 fi
7106
7107 if test -n "$cf_new_extra_cppflags" ; then
7108
7109         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7110 fi
7111
7112 fi
7113
7114 # Work around breakage on OS X
7115
7116 echo "$as_me:7116: checking if SIGWINCH is defined" >&5
7117 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7118 if test "${cf_cv_define_sigwinch+set}" = set; then
7119   echo $ECHO_N "(cached) $ECHO_C" >&6
7120 else
7121
7122         cat >conftest.$ac_ext <<_ACEOF
7123 #line 7123 "configure"
7124 #include "confdefs.h"
7125
7126 #include <sys/types.h>
7127 #include <sys/signal.h>
7128
7129 int
7130 main ()
7131 {
7132 int x = SIGWINCH
7133   ;
7134   return 0;
7135 }
7136 _ACEOF
7137 rm -f conftest.$ac_objext
7138 if { (eval echo "$as_me:7138: \"$ac_compile\"") >&5
7139   (eval $ac_compile) 2>&5
7140   ac_status=$?
7141   echo "$as_me:7141: \$? = $ac_status" >&5
7142   (exit $ac_status); } &&
7143          { ac_try='test -s conftest.$ac_objext'
7144   { (eval echo "$as_me:7144: \"$ac_try\"") >&5
7145   (eval $ac_try) 2>&5
7146   ac_status=$?
7147   echo "$as_me:7147: \$? = $ac_status" >&5
7148   (exit $ac_status); }; }; then
7149   cf_cv_define_sigwinch=yes
7150 else
7151   echo "$as_me: failed program was:" >&5
7152 cat conftest.$ac_ext >&5
7153 cat >conftest.$ac_ext <<_ACEOF
7154 #line 7154 "configure"
7155 #include "confdefs.h"
7156
7157 #undef _XOPEN_SOURCE
7158 #undef _POSIX_SOURCE
7159 #undef _POSIX_C_SOURCE
7160 #include <sys/types.h>
7161 #include <sys/signal.h>
7162
7163 int
7164 main ()
7165 {
7166 int x = SIGWINCH
7167   ;
7168   return 0;
7169 }
7170 _ACEOF
7171 rm -f conftest.$ac_objext
7172 if { (eval echo "$as_me:7172: \"$ac_compile\"") >&5
7173   (eval $ac_compile) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit $ac_status); } &&
7177          { ac_try='test -s conftest.$ac_objext'
7178   { (eval echo "$as_me:7178: \"$ac_try\"") >&5
7179   (eval $ac_try) 2>&5
7180   ac_status=$?
7181   echo "$as_me:7181: \$? = $ac_status" >&5
7182   (exit $ac_status); }; }; then
7183   cf_cv_define_sigwinch=maybe
7184 else
7185   echo "$as_me: failed program was:" >&5
7186 cat conftest.$ac_ext >&5
7187 cf_cv_define_sigwinch=no
7188 fi
7189 rm -f conftest.$ac_objext conftest.$ac_ext
7190
7191 fi
7192 rm -f conftest.$ac_objext conftest.$ac_ext
7193
7194 fi
7195 echo "$as_me:7195: result: $cf_cv_define_sigwinch" >&5
7196 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7197
7198 if test "$cf_cv_define_sigwinch" = maybe ; then
7199 echo "$as_me:7199: checking for actual SIGWINCH definition" >&5
7200 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7201 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7202   echo $ECHO_N "(cached) $ECHO_C" >&6
7203 else
7204
7205 cf_cv_fixup_sigwinch=unknown
7206 cf_sigwinch=32
7207 while test $cf_sigwinch != 1
7208 do
7209         cat >conftest.$ac_ext <<_ACEOF
7210 #line 7210 "configure"
7211 #include "confdefs.h"
7212
7213 #undef _XOPEN_SOURCE
7214 #undef _POSIX_SOURCE
7215 #undef _POSIX_C_SOURCE
7216 #include <sys/types.h>
7217 #include <sys/signal.h>
7218
7219 int
7220 main ()
7221 {
7222
7223 #if SIGWINCH != $cf_sigwinch
7224 make an error
7225 #endif
7226 int x = SIGWINCH
7227   ;
7228   return 0;
7229 }
7230 _ACEOF
7231 rm -f conftest.$ac_objext
7232 if { (eval echo "$as_me:7232: \"$ac_compile\"") >&5
7233   (eval $ac_compile) 2>&5
7234   ac_status=$?
7235   echo "$as_me:7235: \$? = $ac_status" >&5
7236   (exit $ac_status); } &&
7237          { ac_try='test -s conftest.$ac_objext'
7238   { (eval echo "$as_me:7238: \"$ac_try\"") >&5
7239   (eval $ac_try) 2>&5
7240   ac_status=$?
7241   echo "$as_me:7241: \$? = $ac_status" >&5
7242   (exit $ac_status); }; }; then
7243   cf_cv_fixup_sigwinch=$cf_sigwinch
7244          break
7245 else
7246   echo "$as_me: failed program was:" >&5
7247 cat conftest.$ac_ext >&5
7248 fi
7249 rm -f conftest.$ac_objext conftest.$ac_ext
7250
7251 cf_sigwinch=`expr $cf_sigwinch - 1`
7252 done
7253
7254 fi
7255 echo "$as_me:7255: result: $cf_cv_fixup_sigwinch" >&5
7256 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7257
7258         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7259                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7260         fi
7261 fi
7262
7263 # Checks for CODESET support.
7264
7265   echo "$as_me:7265: checking for nl_langinfo and CODESET" >&5
7266 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7267 if test "${am_cv_langinfo_codeset+set}" = set; then
7268   echo $ECHO_N "(cached) $ECHO_C" >&6
7269 else
7270   cat >conftest.$ac_ext <<_ACEOF
7271 #line 7271 "configure"
7272 #include "confdefs.h"
7273 #include <langinfo.h>
7274 int
7275 main ()
7276 {
7277 char* cs = nl_langinfo(CODESET);
7278   ;
7279   return 0;
7280 }
7281 _ACEOF
7282 rm -f conftest.$ac_objext conftest$ac_exeext
7283 if { (eval echo "$as_me:7283: \"$ac_link\"") >&5
7284   (eval $ac_link) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); } &&
7288          { ac_try='test -s conftest$ac_exeext'
7289   { (eval echo "$as_me:7289: \"$ac_try\"") >&5
7290   (eval $ac_try) 2>&5
7291   ac_status=$?
7292   echo "$as_me:7292: \$? = $ac_status" >&5
7293   (exit $ac_status); }; }; then
7294   am_cv_langinfo_codeset=yes
7295 else
7296   echo "$as_me: failed program was:" >&5
7297 cat conftest.$ac_ext >&5
7298 am_cv_langinfo_codeset=no
7299 fi
7300 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7301
7302 fi
7303 echo "$as_me:7303: result: $am_cv_langinfo_codeset" >&5
7304 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7305   if test $am_cv_langinfo_codeset = yes; then
7306
7307 cat >>confdefs.h <<\EOF
7308 #define HAVE_LANGINFO_CODESET 1
7309 EOF
7310
7311   fi
7312
7313 # use these variables to work around a defect in gcc's fixincludes.
7314 NCURSES_OK_WCHAR_T=
7315 NCURSES_OK_WINT_T=
7316
7317 echo "$as_me:7317: checking if you want wide-character code" >&5
7318 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7319
7320 # Check whether --enable-widec or --disable-widec was given.
7321 if test "${enable_widec+set}" = set; then
7322   enableval="$enable_widec"
7323   with_widec=$enableval
7324 else
7325   with_widec=no
7326 fi;
7327 echo "$as_me:7327: result: $with_widec" >&5
7328 echo "${ECHO_T}$with_widec" >&6
7329 if test "$with_widec" = yes ; then
7330         LIB_SUFFIX="w${LIB_SUFFIX}"
7331         cat >>confdefs.h <<\EOF
7332 #define USE_WIDEC_SUPPORT 1
7333 EOF
7334
7335 echo "$as_me:7335: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7336 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7337 cat >conftest.$ac_ext <<_ACEOF
7338 #line 7338 "configure"
7339 #include "confdefs.h"
7340 #include <sys/types.h>
7341
7342 int
7343 main ()
7344 {
7345
7346 #ifndef _XOPEN_SOURCE_EXTENDED
7347 make an error
7348 #endif
7349   ;
7350   return 0;
7351 }
7352 _ACEOF
7353 rm -f conftest.$ac_objext
7354 if { (eval echo "$as_me:7354: \"$ac_compile\"") >&5
7355   (eval $ac_compile) 2>&5
7356   ac_status=$?
7357   echo "$as_me:7357: \$? = $ac_status" >&5
7358   (exit $ac_status); } &&
7359          { ac_try='test -s conftest.$ac_objext'
7360   { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7361   (eval $ac_try) 2>&5
7362   ac_status=$?
7363   echo "$as_me:7363: \$? = $ac_status" >&5
7364   (exit $ac_status); }; }; then
7365   cf_result=no
7366 else
7367   echo "$as_me: failed program was:" >&5
7368 cat conftest.$ac_ext >&5
7369 cf_result=yes
7370 fi
7371 rm -f conftest.$ac_objext conftest.$ac_ext
7372 echo "$as_me:7372: result: $cf_result" >&5
7373 echo "${ECHO_T}$cf_result" >&6
7374
7375 if test "$cf_result" = yes ; then
7376         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7377 elif test "x" != "x" ; then
7378         echo "$as_me:7378: checking checking for compatible value versus " >&5
7379 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7380         cat >conftest.$ac_ext <<_ACEOF
7381 #line 7381 "configure"
7382 #include "confdefs.h"
7383 #include <sys/types.h>
7384
7385 int
7386 main ()
7387 {
7388
7389 #if _XOPEN_SOURCE_EXTENDED- < 0
7390 make an error
7391 #endif
7392   ;
7393   return 0;
7394 }
7395 _ACEOF
7396 rm -f conftest.$ac_objext
7397 if { (eval echo "$as_me:7397: \"$ac_compile\"") >&5
7398   (eval $ac_compile) 2>&5
7399   ac_status=$?
7400   echo "$as_me:7400: \$? = $ac_status" >&5
7401   (exit $ac_status); } &&
7402          { ac_try='test -s conftest.$ac_objext'
7403   { (eval echo "$as_me:7403: \"$ac_try\"") >&5
7404   (eval $ac_try) 2>&5
7405   ac_status=$?
7406   echo "$as_me:7406: \$? = $ac_status" >&5
7407   (exit $ac_status); }; }; then
7408   cf_result=yes
7409 else
7410   echo "$as_me: failed program was:" >&5
7411 cat conftest.$ac_ext >&5
7412 cf_result=no
7413 fi
7414 rm -f conftest.$ac_objext conftest.$ac_ext
7415         echo "$as_me:7415: result: $cf_result" >&5
7416 echo "${ECHO_T}$cf_result" >&6
7417         if test "$cf_result" = no ; then
7418                 # perhaps we can override it - try...
7419                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7420         fi
7421 fi
7422
7423         # with_overwrite=no
7424         NCURSES_CH_T=cchar_t
7425
7426 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7427 do
7428 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7429 echo "$as_me:7429: checking for $ac_func" >&5
7430 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7431 if eval "test \"\${$as_ac_var+set}\" = set"; then
7432   echo $ECHO_N "(cached) $ECHO_C" >&6
7433 else
7434   cat >conftest.$ac_ext <<_ACEOF
7435 #line 7435 "configure"
7436 #include "confdefs.h"
7437 /* System header to define __stub macros and hopefully few prototypes,
7438     which can conflict with char $ac_func (); below.  */
7439 #include <assert.h>
7440 /* Override any gcc2 internal prototype to avoid an error.  */
7441 #ifdef __cplusplus
7442 extern "C"
7443 #endif
7444 /* We use char because int might match the return type of a gcc2
7445    builtin and then its argument prototype would still apply.  */
7446 char $ac_func ();
7447 char (*f) ();
7448
7449 int
7450 main ()
7451 {
7452 /* The GNU C library defines this for functions which it implements
7453     to always fail with ENOSYS.  Some functions are actually named
7454     something starting with __ and the normal name is an alias.  */
7455 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7456 choke me
7457 #else
7458 f = $ac_func;
7459 #endif
7460
7461   ;
7462   return 0;
7463 }
7464 _ACEOF
7465 rm -f conftest.$ac_objext conftest$ac_exeext
7466 if { (eval echo "$as_me:7466: \"$ac_link\"") >&5
7467   (eval $ac_link) 2>&5
7468   ac_status=$?
7469   echo "$as_me:7469: \$? = $ac_status" >&5
7470   (exit $ac_status); } &&
7471          { ac_try='test -s conftest$ac_exeext'
7472   { (eval echo "$as_me:7472: \"$ac_try\"") >&5
7473   (eval $ac_try) 2>&5
7474   ac_status=$?
7475   echo "$as_me:7475: \$? = $ac_status" >&5
7476   (exit $ac_status); }; }; then
7477   eval "$as_ac_var=yes"
7478 else
7479   echo "$as_me: failed program was:" >&5
7480 cat conftest.$ac_ext >&5
7481 eval "$as_ac_var=no"
7482 fi
7483 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7484 fi
7485 echo "$as_me:7485: result: `eval echo '${'$as_ac_var'}'`" >&5
7486 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7487 if test `eval echo '${'$as_ac_var'}'` = yes; then
7488   cat >>confdefs.h <<EOF
7489 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7490 EOF
7491
7492 fi
7493 done
7494
7495         if test "$ac_cv_func_putwc" != yes ; then
7496
7497 echo "$as_me:7497: checking for multibyte character support" >&5
7498 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7499 if test "${cf_cv_utf8_lib+set}" = set; then
7500   echo $ECHO_N "(cached) $ECHO_C" >&6
7501 else
7502
7503         cf_save_LIBS="$LIBS"
7504         cat >conftest.$ac_ext <<_ACEOF
7505 #line 7505 "configure"
7506 #include "confdefs.h"
7507
7508 #include <stdlib.h>
7509 int
7510 main ()
7511 {
7512 putwc(0,0);
7513   ;
7514   return 0;
7515 }
7516 _ACEOF
7517 rm -f conftest.$ac_objext conftest$ac_exeext
7518 if { (eval echo "$as_me:7518: \"$ac_link\"") >&5
7519   (eval $ac_link) 2>&5
7520   ac_status=$?
7521   echo "$as_me:7521: \$? = $ac_status" >&5
7522   (exit $ac_status); } &&
7523          { ac_try='test -s conftest$ac_exeext'
7524   { (eval echo "$as_me:7524: \"$ac_try\"") >&5
7525   (eval $ac_try) 2>&5
7526   ac_status=$?
7527   echo "$as_me:7527: \$? = $ac_status" >&5
7528   (exit $ac_status); }; }; then
7529   cf_cv_utf8_lib=yes
7530 else
7531   echo "$as_me: failed program was:" >&5
7532 cat conftest.$ac_ext >&5
7533
7534 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7535 # will be set on completion of the AC_TRY_LINK below.
7536 cf_cv_header_path_utf8=
7537 cf_cv_library_path_utf8=
7538
7539 echo "${as_me-configure}:7539: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7540
7541 cat >conftest.$ac_ext <<_ACEOF
7542 #line 7542 "configure"
7543 #include "confdefs.h"
7544
7545 #include <libutf8.h>
7546 int
7547 main ()
7548 {
7549 putwc(0,0);
7550   ;
7551   return 0;
7552 }
7553 _ACEOF
7554 rm -f conftest.$ac_objext conftest$ac_exeext
7555 if { (eval echo "$as_me:7555: \"$ac_link\"") >&5
7556   (eval $ac_link) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit $ac_status); } &&
7560          { ac_try='test -s conftest$ac_exeext'
7561   { (eval echo "$as_me:7561: \"$ac_try\"") >&5
7562   (eval $ac_try) 2>&5
7563   ac_status=$?
7564   echo "$as_me:7564: \$? = $ac_status" >&5
7565   (exit $ac_status); }; }; then
7566   cf_cv_find_linkage_utf8=yes
7567 else
7568   echo "$as_me: failed program was:" >&5
7569 cat conftest.$ac_ext >&5
7570
7571     cf_cv_find_linkage_utf8=no
7572
7573     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7574
7575 echo "${as_me-configure}:7575: testing find linkage for utf8 library ..." 1>&5
7576
7577 echo "${as_me-configure}:7577: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7578
7579     cf_save_CPPFLAGS="$CPPFLAGS"
7580     cf_test_CPPFLAGS="$CPPFLAGS"
7581
7582 cf_search=
7583 cf_header_path_list=""
7584 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7585         for cf_header_path in $CPPFLAGS $CFLAGS
7586         do
7587                 case $cf_header_path in #(vi
7588                 -I*)
7589                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7590
7591 test "$cf_header_path" != "NONE" && \
7592 test -d "$cf_header_path" && \
7593  {
7594         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7595         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7596         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7597         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7598         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7599         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7600 }
7601
7602                         cf_header_path_list="$cf_header_path_list $cf_search"
7603                         ;;
7604                 esac
7605         done
7606 fi
7607
7608 cf_search=""
7609
7610 test "/usr" != "$prefix" && \
7611 test -d "/usr" && \
7612 (test $prefix = NONE || test -d $prefix) && {
7613         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7614         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7615         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7616         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7617         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7618         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7619 }
7620
7621 test "$prefix" != "NONE" && \
7622 test -d "$prefix" && \
7623  {
7624         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7625         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7626         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7627         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7628         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7629         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7630 }
7631
7632 test "/usr/local" != "$prefix" && \
7633 test -d "/usr/local" && \
7634 (test $prefix = NONE || test -d $prefix) && {
7635         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7636         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7637         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7638         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7639         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7640         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7641 }
7642
7643 test "/opt" != "$prefix" && \
7644 test -d "/opt" && \
7645 (test $prefix = NONE || test -d $prefix) && {
7646         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7647         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7648         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7649         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7650         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7651         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7652 }
7653
7654 test "$HOME" != "$prefix" && \
7655 test -d "$HOME" && \
7656 (test $prefix = NONE || test -d $prefix) && {
7657         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7658         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7659         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7660         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7661         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7662         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7663 }
7664
7665 test "$includedir" != NONE && \
7666 test "$includedir" != "/usr/include" && \
7667 test -d "$includedir" && {
7668         test -d $includedir &&    cf_search="$cf_search $includedir"
7669         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7670 }
7671
7672 test "$oldincludedir" != NONE && \
7673 test "$oldincludedir" != "/usr/include" && \
7674 test -d "$oldincludedir" && {
7675         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7676         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7677 }
7678
7679 cf_search="$cf_header_path_list $cf_search"
7680
7681     for cf_cv_header_path_utf8 in $cf_search
7682     do
7683       if test -d $cf_cv_header_path_utf8 ; then
7684         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7685
7686 echo "${as_me-configure}:7686: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7687
7688         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7689         cat >conftest.$ac_ext <<_ACEOF
7690 #line 7690 "configure"
7691 #include "confdefs.h"
7692
7693 #include <libutf8.h>
7694 int
7695 main ()
7696 {
7697 putwc(0,0);
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f conftest.$ac_objext
7703 if { (eval echo "$as_me:7703: \"$ac_compile\"") >&5
7704   (eval $ac_compile) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit $ac_status); } &&
7708          { ac_try='test -s conftest.$ac_objext'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit $ac_status); }; }; then
7714
7715             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7716
7717 echo "${as_me-configure}:7717: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7718
7719             cf_cv_find_linkage_utf8=maybe
7720             cf_test_CPPFLAGS="$CPPFLAGS"
7721             break
7722 else
7723   echo "$as_me: failed program was:" >&5
7724 cat conftest.$ac_ext >&5
7725
7726             CPPFLAGS="$cf_save_CPPFLAGS"
7727
7728 fi
7729 rm -f conftest.$ac_objext conftest.$ac_ext
7730       fi
7731     done
7732
7733     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7734
7735 echo "${as_me-configure}:7735: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7736
7737       cf_save_LIBS="$LIBS"
7738       cf_save_LDFLAGS="$LDFLAGS"
7739
7740       if test "$cf_cv_find_linkage_utf8" != yes ; then
7741
7742 cf_library_path_list=""
7743 if test -n "${LDFLAGS}${LIBS}" ; then
7744         for cf_library_path in $LDFLAGS $LIBS
7745         do
7746                 case $cf_library_path in #(vi
7747                 -L*)
7748                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7749
7750 test "$cf_library_path" != "NONE" && \
7751 test -d "$cf_library_path" && \
7752  {
7753         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7754         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7755         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7756         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7757         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7758         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7759 }
7760
7761                         cf_library_path_list="$cf_library_path_list $cf_search"
7762                         ;;
7763                 esac
7764         done
7765 fi
7766
7767 cf_search=""
7768
7769 test "/usr" != "$prefix" && \
7770 test -d "/usr" && \
7771 (test $prefix = NONE || test -d $prefix) && {
7772         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7773         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7774         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7775         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7776         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7777         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7778 }
7779
7780 test "$prefix" != "NONE" && \
7781 test -d "$prefix" && \
7782  {
7783         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7784         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7785         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7786         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7787         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7788         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7789 }
7790
7791 test "/usr/local" != "$prefix" && \
7792 test -d "/usr/local" && \
7793 (test $prefix = NONE || test -d $prefix) && {
7794         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7795         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7796         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7797         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7798         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7799         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7800 }
7801
7802 test "/opt" != "$prefix" && \
7803 test -d "/opt" && \
7804 (test $prefix = NONE || test -d $prefix) && {
7805         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7806         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7807         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7808         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7809         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7810         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7811 }
7812
7813 test "$HOME" != "$prefix" && \
7814 test -d "$HOME" && \
7815 (test $prefix = NONE || test -d $prefix) && {
7816         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7817         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7818         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7819         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7820         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7821         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7822 }
7823
7824 cf_search="$cf_library_path_list $cf_search"
7825
7826         for cf_cv_library_path_utf8 in $cf_search
7827         do
7828           if test -d $cf_cv_library_path_utf8 ; then
7829             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7830
7831 echo "${as_me-configure}:7831: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7832
7833             CPPFLAGS="$cf_test_CPPFLAGS"
7834             LIBS="-lutf8  $cf_save_LIBS"
7835             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7836             cat >conftest.$ac_ext <<_ACEOF
7837 #line 7837 "configure"
7838 #include "confdefs.h"
7839
7840 #include <libutf8.h>
7841 int
7842 main ()
7843 {
7844 putwc(0,0);
7845   ;
7846   return 0;
7847 }
7848 _ACEOF
7849 rm -f conftest.$ac_objext conftest$ac_exeext
7850 if { (eval echo "$as_me:7850: \"$ac_link\"") >&5
7851   (eval $ac_link) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit $ac_status); } &&
7855          { ac_try='test -s conftest$ac_exeext'
7856   { (eval echo "$as_me:7856: \"$ac_try\"") >&5
7857   (eval $ac_try) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit $ac_status); }; }; then
7861
7862                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
7863
7864 echo "${as_me-configure}:7864: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
7865
7866                 cf_cv_find_linkage_utf8=yes
7867                 cf_cv_library_file_utf8="-lutf8"
7868                 break
7869 else
7870   echo "$as_me: failed program was:" >&5
7871 cat conftest.$ac_ext >&5
7872
7873                 CPPFLAGS="$cf_save_CPPFLAGS"
7874                 LIBS="$cf_save_LIBS"
7875                 LDFLAGS="$cf_save_LDFLAGS"
7876
7877 fi
7878 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7879           fi
7880         done
7881         LIBS="$cf_save_LIBS"
7882         CPPFLAGS="$cf_save_CPPFLAGS"
7883         LDFLAGS="$cf_save_LDFLAGS"
7884       fi
7885
7886     else
7887       cf_cv_find_linkage_utf8=no
7888     fi
7889
7890 fi
7891 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7892
7893 if test "$cf_cv_find_linkage_utf8" = yes ; then
7894 cf_cv_utf8_lib=add-on
7895 else
7896 cf_cv_utf8_lib=no
7897 fi
7898
7899 fi
7900 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7901 fi
7902 echo "$as_me:7902: result: $cf_cv_utf8_lib" >&5
7903 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
7904
7905 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
7906 # ncurses/ncursesw:
7907 if test "$cf_cv_utf8_lib" = "add-on" ; then
7908         cat >>confdefs.h <<\EOF
7909 #define HAVE_LIBUTF8_H 1
7910 EOF
7911
7912 if test -n "$cf_cv_header_path_utf8" ; then
7913   for cf_add_incdir in $cf_cv_header_path_utf8
7914   do
7915         while test $cf_add_incdir != /usr/include
7916         do
7917           if test -d $cf_add_incdir
7918           then
7919                 cf_have_incdir=no
7920                 if test -n "$CFLAGS$CPPFLAGS" ; then
7921                   # a loop is needed to ensure we can add subdirs of existing dirs
7922                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
7923                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
7924                           cf_have_incdir=yes; break
7925                         fi
7926                   done
7927                 fi
7928
7929                 if test "$cf_have_incdir" = no ; then
7930                   if test "$cf_add_incdir" = /usr/local/include ; then
7931                         if test "$GCC" = yes
7932                         then
7933                           cf_save_CPPFLAGS=$CPPFLAGS
7934                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7935                           cat >conftest.$ac_ext <<_ACEOF
7936 #line 7936 "configure"
7937 #include "confdefs.h"
7938 #include <stdio.h>
7939 int
7940 main ()
7941 {
7942 printf("Hello")
7943   ;
7944   return 0;
7945 }
7946 _ACEOF
7947 rm -f conftest.$ac_objext
7948 if { (eval echo "$as_me:7948: \"$ac_compile\"") >&5
7949   (eval $ac_compile) 2>&5
7950   ac_status=$?
7951   echo "$as_me:7951: \$? = $ac_status" >&5
7952   (exit $ac_status); } &&
7953          { ac_try='test -s conftest.$ac_objext'
7954   { (eval echo "$as_me:7954: \"$ac_try\"") >&5
7955   (eval $ac_try) 2>&5
7956   ac_status=$?
7957   echo "$as_me:7957: \$? = $ac_status" >&5
7958   (exit $ac_status); }; }; then
7959   :
7960 else
7961   echo "$as_me: failed program was:" >&5
7962 cat conftest.$ac_ext >&5
7963 cf_have_incdir=yes
7964 fi
7965 rm -f conftest.$ac_objext conftest.$ac_ext
7966                           CPPFLAGS=$cf_save_CPPFLAGS
7967                         fi
7968                   fi
7969                 fi
7970
7971                 if test "$cf_have_incdir" = no ; then
7972                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
7973
7974 echo "${as_me-configure}:7974: testing adding $cf_add_incdir to include-path ..." 1>&5
7975
7976                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
7977
7978                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
7979                   test "$cf_top_incdir" = "$cf_add_incdir" && break
7980                   cf_add_incdir="$cf_top_incdir"
7981                 else
7982                   break
7983                 fi
7984           fi
7985         done
7986   done
7987 fi
7988
7989 if test -n "$cf_cv_library_path_utf8" ; then
7990   for cf_add_libdir in $cf_cv_library_path_utf8
7991   do
7992     if test $cf_add_libdir = /usr/lib ; then
7993       :
7994     elif test -d $cf_add_libdir
7995     then
7996       cf_have_libdir=no
7997       if test -n "$LDFLAGS$LIBS" ; then
7998         # a loop is needed to ensure we can add subdirs of existing dirs
7999         for cf_test_libdir in $LDFLAGS $LIBS ; do
8000           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8001             cf_have_libdir=yes; break
8002           fi
8003         done
8004       fi
8005       if test "$cf_have_libdir" = no ; then
8006         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8007
8008 echo "${as_me-configure}:8008: testing adding $cf_add_libdir to library-path ..." 1>&5
8009
8010         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8011       fi
8012     fi
8013   done
8014 fi
8015
8016         LIBS="-lutf8 $LIBS"
8017 fi
8018
8019                 if test "$cf_cv_utf8_lib" != no ; then
8020                         NCURSES_LIBUTF8=1
8021                 fi
8022         fi
8023
8024 # This is needed on Tru64 5.0 to declare mbstate_t
8025 echo "$as_me:8025: checking if we must include wchar.h to declare mbstate_t" >&5
8026 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8027 if test "${cf_cv_mbstate_t+set}" = set; then
8028   echo $ECHO_N "(cached) $ECHO_C" >&6
8029 else
8030
8031 cat >conftest.$ac_ext <<_ACEOF
8032 #line 8032 "configure"
8033 #include "confdefs.h"
8034
8035 #include <stdlib.h>
8036 #include <stdarg.h>
8037 #include <stdio.h>
8038 #ifdef HAVE_LIBUTF8_H
8039 #include <libutf8.h>
8040 #endif
8041 int
8042 main ()
8043 {
8044 mbstate_t state
8045   ;
8046   return 0;
8047 }
8048 _ACEOF
8049 rm -f conftest.$ac_objext
8050 if { (eval echo "$as_me:8050: \"$ac_compile\"") >&5
8051   (eval $ac_compile) 2>&5
8052   ac_status=$?
8053   echo "$as_me:8053: \$? = $ac_status" >&5
8054   (exit $ac_status); } &&
8055          { ac_try='test -s conftest.$ac_objext'
8056   { (eval echo "$as_me:8056: \"$ac_try\"") >&5
8057   (eval $ac_try) 2>&5
8058   ac_status=$?
8059   echo "$as_me:8059: \$? = $ac_status" >&5
8060   (exit $ac_status); }; }; then
8061   cf_cv_mbstate_t=no
8062 else
8063   echo "$as_me: failed program was:" >&5
8064 cat conftest.$ac_ext >&5
8065 cat >conftest.$ac_ext <<_ACEOF
8066 #line 8066 "configure"
8067 #include "confdefs.h"
8068
8069 #include <stdlib.h>
8070 #include <stdarg.h>
8071 #include <stdio.h>
8072 #include <wchar.h>
8073 #ifdef HAVE_LIBUTF8_H
8074 #include <libutf8.h>
8075 #endif
8076 int
8077 main ()
8078 {
8079 mbstate_t value
8080   ;
8081   return 0;
8082 }
8083 _ACEOF
8084 rm -f conftest.$ac_objext
8085 if { (eval echo "$as_me:8085: \"$ac_compile\"") >&5
8086   (eval $ac_compile) 2>&5
8087   ac_status=$?
8088   echo "$as_me:8088: \$? = $ac_status" >&5
8089   (exit $ac_status); } &&
8090          { ac_try='test -s conftest.$ac_objext'
8091   { (eval echo "$as_me:8091: \"$ac_try\"") >&5
8092   (eval $ac_try) 2>&5
8093   ac_status=$?
8094   echo "$as_me:8094: \$? = $ac_status" >&5
8095   (exit $ac_status); }; }; then
8096   cf_cv_mbstate_t=yes
8097 else
8098   echo "$as_me: failed program was:" >&5
8099 cat conftest.$ac_ext >&5
8100 cf_cv_mbstate_t=unknown
8101 fi
8102 rm -f conftest.$ac_objext conftest.$ac_ext
8103 fi
8104 rm -f conftest.$ac_objext conftest.$ac_ext
8105 fi
8106 echo "$as_me:8106: result: $cf_cv_mbstate_t" >&5
8107 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8108
8109 if test "$cf_cv_mbstate_t" = yes ; then
8110         cat >>confdefs.h <<\EOF
8111 #define NEED_WCHAR_H 1
8112 EOF
8113
8114         NEED_WCHAR_H=1
8115 fi
8116
8117 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8118 if test "$cf_cv_mbstate_t" = unknown ; then
8119         NCURSES_MBSTATE_T=1
8120 fi
8121
8122 # This is needed on Tru64 5.0 to declare wchar_t
8123 echo "$as_me:8123: checking if we must include wchar.h to declare wchar_t" >&5
8124 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8125 if test "${cf_cv_wchar_t+set}" = set; then
8126   echo $ECHO_N "(cached) $ECHO_C" >&6
8127 else
8128
8129 cat >conftest.$ac_ext <<_ACEOF
8130 #line 8130 "configure"
8131 #include "confdefs.h"
8132
8133 #include <stdlib.h>
8134 #include <stdarg.h>
8135 #include <stdio.h>
8136 #ifdef HAVE_LIBUTF8_H
8137 #include <libutf8.h>
8138 #endif
8139 int
8140 main ()
8141 {
8142 wchar_t state
8143   ;
8144   return 0;
8145 }
8146 _ACEOF
8147 rm -f conftest.$ac_objext
8148 if { (eval echo "$as_me:8148: \"$ac_compile\"") >&5
8149   (eval $ac_compile) 2>&5
8150   ac_status=$?
8151   echo "$as_me:8151: \$? = $ac_status" >&5
8152   (exit $ac_status); } &&
8153          { ac_try='test -s conftest.$ac_objext'
8154   { (eval echo "$as_me:8154: \"$ac_try\"") >&5
8155   (eval $ac_try) 2>&5
8156   ac_status=$?
8157   echo "$as_me:8157: \$? = $ac_status" >&5
8158   (exit $ac_status); }; }; then
8159   cf_cv_wchar_t=no
8160 else
8161   echo "$as_me: failed program was:" >&5
8162 cat conftest.$ac_ext >&5
8163 cat >conftest.$ac_ext <<_ACEOF
8164 #line 8164 "configure"
8165 #include "confdefs.h"
8166
8167 #include <stdlib.h>
8168 #include <stdarg.h>
8169 #include <stdio.h>
8170 #include <wchar.h>
8171 #ifdef HAVE_LIBUTF8_H
8172 #include <libutf8.h>
8173 #endif
8174 int
8175 main ()
8176 {
8177 wchar_t value
8178   ;
8179   return 0;
8180 }
8181 _ACEOF
8182 rm -f conftest.$ac_objext
8183 if { (eval echo "$as_me:8183: \"$ac_compile\"") >&5
8184   (eval $ac_compile) 2>&5
8185   ac_status=$?
8186   echo "$as_me:8186: \$? = $ac_status" >&5
8187   (exit $ac_status); } &&
8188          { ac_try='test -s conftest.$ac_objext'
8189   { (eval echo "$as_me:8189: \"$ac_try\"") >&5
8190   (eval $ac_try) 2>&5
8191   ac_status=$?
8192   echo "$as_me:8192: \$? = $ac_status" >&5
8193   (exit $ac_status); }; }; then
8194   cf_cv_wchar_t=yes
8195 else
8196   echo "$as_me: failed program was:" >&5
8197 cat conftest.$ac_ext >&5
8198 cf_cv_wchar_t=unknown
8199 fi
8200 rm -f conftest.$ac_objext conftest.$ac_ext
8201 fi
8202 rm -f conftest.$ac_objext conftest.$ac_ext
8203 fi
8204 echo "$as_me:8204: result: $cf_cv_wchar_t" >&5
8205 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8206
8207 if test "$cf_cv_wchar_t" = yes ; then
8208         cat >>confdefs.h <<\EOF
8209 #define NEED_WCHAR_H 1
8210 EOF
8211
8212         NEED_WCHAR_H=1
8213 fi
8214
8215 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8216 if test "$cf_cv_wchar_t" = unknown ; then
8217         NCURSES_WCHAR_T=1
8218 fi
8219
8220 # if we find wchar_t in either place, use substitution to provide a fallback.
8221 if test "$cf_cv_wchar_t" != unknown ; then
8222         NCURSES_OK_WCHAR_T=1
8223 fi
8224
8225 # This is needed on Tru64 5.0 to declare wint_t
8226 echo "$as_me:8226: checking if we must include wchar.h to declare wint_t" >&5
8227 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8228 if test "${cf_cv_wint_t+set}" = set; then
8229   echo $ECHO_N "(cached) $ECHO_C" >&6
8230 else
8231
8232 cat >conftest.$ac_ext <<_ACEOF
8233 #line 8233 "configure"
8234 #include "confdefs.h"
8235
8236 #include <stdlib.h>
8237 #include <stdarg.h>
8238 #include <stdio.h>
8239 #ifdef HAVE_LIBUTF8_H
8240 #include <libutf8.h>
8241 #endif
8242 int
8243 main ()
8244 {
8245 wint_t state
8246   ;
8247   return 0;
8248 }
8249 _ACEOF
8250 rm -f conftest.$ac_objext
8251 if { (eval echo "$as_me:8251: \"$ac_compile\"") >&5
8252   (eval $ac_compile) 2>&5
8253   ac_status=$?
8254   echo "$as_me:8254: \$? = $ac_status" >&5
8255   (exit $ac_status); } &&
8256          { ac_try='test -s conftest.$ac_objext'
8257   { (eval echo "$as_me:8257: \"$ac_try\"") >&5
8258   (eval $ac_try) 2>&5
8259   ac_status=$?
8260   echo "$as_me:8260: \$? = $ac_status" >&5
8261   (exit $ac_status); }; }; then
8262   cf_cv_wint_t=no
8263 else
8264   echo "$as_me: failed program was:" >&5
8265 cat conftest.$ac_ext >&5
8266 cat >conftest.$ac_ext <<_ACEOF
8267 #line 8267 "configure"
8268 #include "confdefs.h"
8269
8270 #include <stdlib.h>
8271 #include <stdarg.h>
8272 #include <stdio.h>
8273 #include <wchar.h>
8274 #ifdef HAVE_LIBUTF8_H
8275 #include <libutf8.h>
8276 #endif
8277 int
8278 main ()
8279 {
8280 wint_t value
8281   ;
8282   return 0;
8283 }
8284 _ACEOF
8285 rm -f conftest.$ac_objext
8286 if { (eval echo "$as_me:8286: \"$ac_compile\"") >&5
8287   (eval $ac_compile) 2>&5
8288   ac_status=$?
8289   echo "$as_me:8289: \$? = $ac_status" >&5
8290   (exit $ac_status); } &&
8291          { ac_try='test -s conftest.$ac_objext'
8292   { (eval echo "$as_me:8292: \"$ac_try\"") >&5
8293   (eval $ac_try) 2>&5
8294   ac_status=$?
8295   echo "$as_me:8295: \$? = $ac_status" >&5
8296   (exit $ac_status); }; }; then
8297   cf_cv_wint_t=yes
8298 else
8299   echo "$as_me: failed program was:" >&5
8300 cat conftest.$ac_ext >&5
8301 cf_cv_wint_t=unknown
8302 fi
8303 rm -f conftest.$ac_objext conftest.$ac_ext
8304 fi
8305 rm -f conftest.$ac_objext conftest.$ac_ext
8306 fi
8307 echo "$as_me:8307: result: $cf_cv_wint_t" >&5
8308 echo "${ECHO_T}$cf_cv_wint_t" >&6
8309
8310 if test "$cf_cv_wint_t" = yes ; then
8311         cat >>confdefs.h <<\EOF
8312 #define NEED_WCHAR_H 1
8313 EOF
8314
8315         NEED_WCHAR_H=1
8316 fi
8317
8318 # if we do not find wint_t in either place, use substitution to provide a fallback.
8319 if test "$cf_cv_wint_t" = unknown ; then
8320         NCURSES_WINT_T=1
8321 fi
8322
8323 # if we find wint_t in either place, use substitution to provide a fallback.
8324 if test "$cf_cv_wint_t" != unknown ; then
8325         NCURSES_OK_WINT_T=1
8326 fi
8327
8328         if test "$NCURSES_MBSTATE_T" != 0; then
8329                 cat >>confdefs.h <<\EOF
8330 #define NEED_MBSTATE_T_DEF 1
8331 EOF
8332
8333         fi
8334 fi
8335
8336 ###   use option --disable-lp64 to allow long chtype
8337 case $cf_cv_abi_version in
8338 [345]*)
8339         default_with_lp64=no
8340         ;;
8341 *)
8342         default_with_lp64=yes
8343         ;;
8344 esac
8345
8346 echo "$as_me:8346: checking whether to enable _LP64 definition in curses.h" >&5
8347 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8348
8349 # Check whether --enable-lp64 or --disable-lp64 was given.
8350 if test "${enable_lp64+set}" = set; then
8351   enableval="$enable_lp64"
8352   with_lp64=$enableval
8353 else
8354   with_lp64=$default_with_lp64
8355 fi;
8356 echo "$as_me:8356: result: $with_lp64" >&5
8357 echo "${ECHO_T}$with_lp64" >&6
8358
8359 if test "$with_lp64" = yes ; then
8360         cf_cv_enable_lp64=1
8361 else
8362         cf_cv_enable_lp64=0
8363 fi
8364
8365 # Check whether --enable-largefile or --disable-largefile was given.
8366 if test "${enable_largefile+set}" = set; then
8367   enableval="$enable_largefile"
8368
8369 fi;
8370 if test "$enable_largefile" != no; then
8371
8372   echo "$as_me:8372: checking for special C compiler options needed for large files" >&5
8373 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8374 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8375   echo $ECHO_N "(cached) $ECHO_C" >&6
8376 else
8377   ac_cv_sys_largefile_CC=no
8378      if test "$GCC" != yes; then
8379        ac_save_CC=$CC
8380        while :; do
8381          # IRIX 6.2 and later do not support large files by default,
8382          # so use the C compiler's -n32 option if that helps.
8383          cat >conftest.$ac_ext <<_ACEOF
8384 #line 8384 "configure"
8385 #include "confdefs.h"
8386 #include <sys/types.h>
8387  /* Check that off_t can represent 2**63 - 1 correctly.
8388     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8389     since some C++ compilers masquerading as C compilers
8390     incorrectly reject 9223372036854775807.  */
8391 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8392   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8393                        && LARGE_OFF_T % 2147483647 == 1)
8394                       ? 1 : -1];
8395 int
8396 main ()
8397 {
8398
8399   ;
8400   return 0;
8401 }
8402 _ACEOF
8403          rm -f conftest.$ac_objext
8404 if { (eval echo "$as_me:8404: \"$ac_compile\"") >&5
8405   (eval $ac_compile) 2>&5
8406   ac_status=$?
8407   echo "$as_me:8407: \$? = $ac_status" >&5
8408   (exit $ac_status); } &&
8409          { ac_try='test -s conftest.$ac_objext'
8410   { (eval echo "$as_me:8410: \"$ac_try\"") >&5
8411   (eval $ac_try) 2>&5
8412   ac_status=$?
8413   echo "$as_me:8413: \$? = $ac_status" >&5
8414   (exit $ac_status); }; }; then
8415   break
8416 else
8417   echo "$as_me: failed program was:" >&5
8418 cat conftest.$ac_ext >&5
8419 fi
8420 rm -f conftest.$ac_objext
8421          CC="$CC -n32"
8422          rm -f conftest.$ac_objext
8423 if { (eval echo "$as_me:8423: \"$ac_compile\"") >&5
8424   (eval $ac_compile) 2>&5
8425   ac_status=$?
8426   echo "$as_me:8426: \$? = $ac_status" >&5
8427   (exit $ac_status); } &&
8428          { ac_try='test -s conftest.$ac_objext'
8429   { (eval echo "$as_me:8429: \"$ac_try\"") >&5
8430   (eval $ac_try) 2>&5
8431   ac_status=$?
8432   echo "$as_me:8432: \$? = $ac_status" >&5
8433   (exit $ac_status); }; }; then
8434   ac_cv_sys_largefile_CC=' -n32'; break
8435 else
8436   echo "$as_me: failed program was:" >&5
8437 cat conftest.$ac_ext >&5
8438 fi
8439 rm -f conftest.$ac_objext
8440          break
8441        done
8442        CC=$ac_save_CC
8443        rm -f conftest.$ac_ext
8444     fi
8445 fi
8446 echo "$as_me:8446: result: $ac_cv_sys_largefile_CC" >&5
8447 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8448   if test "$ac_cv_sys_largefile_CC" != no; then
8449     CC=$CC$ac_cv_sys_largefile_CC
8450   fi
8451
8452   echo "$as_me:8452: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8453 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8454 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8455   echo $ECHO_N "(cached) $ECHO_C" >&6
8456 else
8457   while :; do
8458   ac_cv_sys_file_offset_bits=no
8459   cat >conftest.$ac_ext <<_ACEOF
8460 #line 8460 "configure"
8461 #include "confdefs.h"
8462 #include <sys/types.h>
8463  /* Check that off_t can represent 2**63 - 1 correctly.
8464     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8465     since some C++ compilers masquerading as C compilers
8466     incorrectly reject 9223372036854775807.  */
8467 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8468   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8469                        && LARGE_OFF_T % 2147483647 == 1)
8470                       ? 1 : -1];
8471 int
8472 main ()
8473 {
8474
8475   ;
8476   return 0;
8477 }
8478 _ACEOF
8479 rm -f conftest.$ac_objext
8480 if { (eval echo "$as_me:8480: \"$ac_compile\"") >&5
8481   (eval $ac_compile) 2>&5
8482   ac_status=$?
8483   echo "$as_me:8483: \$? = $ac_status" >&5
8484   (exit $ac_status); } &&
8485          { ac_try='test -s conftest.$ac_objext'
8486   { (eval echo "$as_me:8486: \"$ac_try\"") >&5
8487   (eval $ac_try) 2>&5
8488   ac_status=$?
8489   echo "$as_me:8489: \$? = $ac_status" >&5
8490   (exit $ac_status); }; }; then
8491   break
8492 else
8493   echo "$as_me: failed program was:" >&5
8494 cat conftest.$ac_ext >&5
8495 fi
8496 rm -f conftest.$ac_objext conftest.$ac_ext
8497   cat >conftest.$ac_ext <<_ACEOF
8498 #line 8498 "configure"
8499 #include "confdefs.h"
8500 #define _FILE_OFFSET_BITS 64
8501 #include <sys/types.h>
8502  /* Check that off_t can represent 2**63 - 1 correctly.
8503     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8504     since some C++ compilers masquerading as C compilers
8505     incorrectly reject 9223372036854775807.  */
8506 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8507   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8508                        && LARGE_OFF_T % 2147483647 == 1)
8509                       ? 1 : -1];
8510 int
8511 main ()
8512 {
8513
8514   ;
8515   return 0;
8516 }
8517 _ACEOF
8518 rm -f conftest.$ac_objext
8519 if { (eval echo "$as_me:8519: \"$ac_compile\"") >&5
8520   (eval $ac_compile) 2>&5
8521   ac_status=$?
8522   echo "$as_me:8522: \$? = $ac_status" >&5
8523   (exit $ac_status); } &&
8524          { ac_try='test -s conftest.$ac_objext'
8525   { (eval echo "$as_me:8525: \"$ac_try\"") >&5
8526   (eval $ac_try) 2>&5
8527   ac_status=$?
8528   echo "$as_me:8528: \$? = $ac_status" >&5
8529   (exit $ac_status); }; }; then
8530   ac_cv_sys_file_offset_bits=64; break
8531 else
8532   echo "$as_me: failed program was:" >&5
8533 cat conftest.$ac_ext >&5
8534 fi
8535 rm -f conftest.$ac_objext conftest.$ac_ext
8536   break
8537 done
8538 fi
8539 echo "$as_me:8539: result: $ac_cv_sys_file_offset_bits" >&5
8540 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8541 if test "$ac_cv_sys_file_offset_bits" != no; then
8542
8543 cat >>confdefs.h <<EOF
8544 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8545 EOF
8546
8547 fi
8548 rm -f conftest*
8549   echo "$as_me:8549: checking for _LARGE_FILES value needed for large files" >&5
8550 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8551 if test "${ac_cv_sys_large_files+set}" = set; then
8552   echo $ECHO_N "(cached) $ECHO_C" >&6
8553 else
8554   while :; do
8555   ac_cv_sys_large_files=no
8556   cat >conftest.$ac_ext <<_ACEOF
8557 #line 8557 "configure"
8558 #include "confdefs.h"
8559 #include <sys/types.h>
8560  /* Check that off_t can represent 2**63 - 1 correctly.
8561     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8562     since some C++ compilers masquerading as C compilers
8563     incorrectly reject 9223372036854775807.  */
8564 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8565   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8566                        && LARGE_OFF_T % 2147483647 == 1)
8567                       ? 1 : -1];
8568 int
8569 main ()
8570 {
8571
8572   ;
8573   return 0;
8574 }
8575 _ACEOF
8576 rm -f conftest.$ac_objext
8577 if { (eval echo "$as_me:8577: \"$ac_compile\"") >&5
8578   (eval $ac_compile) 2>&5
8579   ac_status=$?
8580   echo "$as_me:8580: \$? = $ac_status" >&5
8581   (exit $ac_status); } &&
8582          { ac_try='test -s conftest.$ac_objext'
8583   { (eval echo "$as_me:8583: \"$ac_try\"") >&5
8584   (eval $ac_try) 2>&5
8585   ac_status=$?
8586   echo "$as_me:8586: \$? = $ac_status" >&5
8587   (exit $ac_status); }; }; then
8588   break
8589 else
8590   echo "$as_me: failed program was:" >&5
8591 cat conftest.$ac_ext >&5
8592 fi
8593 rm -f conftest.$ac_objext conftest.$ac_ext
8594   cat >conftest.$ac_ext <<_ACEOF
8595 #line 8595 "configure"
8596 #include "confdefs.h"
8597 #define _LARGE_FILES 1
8598 #include <sys/types.h>
8599  /* Check that off_t can represent 2**63 - 1 correctly.
8600     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8601     since some C++ compilers masquerading as C compilers
8602     incorrectly reject 9223372036854775807.  */
8603 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8604   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8605                        && LARGE_OFF_T % 2147483647 == 1)
8606                       ? 1 : -1];
8607 int
8608 main ()
8609 {
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   ac_cv_sys_large_files=1; break
8628 else
8629   echo "$as_me: failed program was:" >&5
8630 cat conftest.$ac_ext >&5
8631 fi
8632 rm -f conftest.$ac_objext conftest.$ac_ext
8633   break
8634 done
8635 fi
8636 echo "$as_me:8636: result: $ac_cv_sys_large_files" >&5
8637 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8638 if test "$ac_cv_sys_large_files" != no; then
8639
8640 cat >>confdefs.h <<EOF
8641 #define _LARGE_FILES $ac_cv_sys_large_files
8642 EOF
8643
8644 fi
8645 rm -f conftest*
8646 fi
8647
8648     if test "$enable_largefile" != no ; then
8649         echo "$as_me:8649: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8650 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8651 if test "${ac_cv_sys_largefile_source+set}" = set; then
8652   echo $ECHO_N "(cached) $ECHO_C" >&6
8653 else
8654   while :; do
8655   ac_cv_sys_largefile_source=no
8656   cat >conftest.$ac_ext <<_ACEOF
8657 #line 8657 "configure"
8658 #include "confdefs.h"
8659 #include <stdio.h>
8660 int
8661 main ()
8662 {
8663 return !fseeko;
8664   ;
8665   return 0;
8666 }
8667 _ACEOF
8668 rm -f conftest.$ac_objext
8669 if { (eval echo "$as_me:8669: \"$ac_compile\"") >&5
8670   (eval $ac_compile) 2>&5
8671   ac_status=$?
8672   echo "$as_me:8672: \$? = $ac_status" >&5
8673   (exit $ac_status); } &&
8674          { ac_try='test -s conftest.$ac_objext'
8675   { (eval echo "$as_me:8675: \"$ac_try\"") >&5
8676   (eval $ac_try) 2>&5
8677   ac_status=$?
8678   echo "$as_me:8678: \$? = $ac_status" >&5
8679   (exit $ac_status); }; }; then
8680   break
8681 else
8682   echo "$as_me: failed program was:" >&5
8683 cat conftest.$ac_ext >&5
8684 fi
8685 rm -f conftest.$ac_objext conftest.$ac_ext
8686   cat >conftest.$ac_ext <<_ACEOF
8687 #line 8687 "configure"
8688 #include "confdefs.h"
8689 #define _LARGEFILE_SOURCE 1
8690 #include <stdio.h>
8691 int
8692 main ()
8693 {
8694 return !fseeko;
8695   ;
8696   return 0;
8697 }
8698 _ACEOF
8699 rm -f conftest.$ac_objext
8700 if { (eval echo "$as_me:8700: \"$ac_compile\"") >&5
8701   (eval $ac_compile) 2>&5
8702   ac_status=$?
8703   echo "$as_me:8703: \$? = $ac_status" >&5
8704   (exit $ac_status); } &&
8705          { ac_try='test -s conftest.$ac_objext'
8706   { (eval echo "$as_me:8706: \"$ac_try\"") >&5
8707   (eval $ac_try) 2>&5
8708   ac_status=$?
8709   echo "$as_me:8709: \$? = $ac_status" >&5
8710   (exit $ac_status); }; }; then
8711   ac_cv_sys_largefile_source=1; break
8712 else
8713   echo "$as_me: failed program was:" >&5
8714 cat conftest.$ac_ext >&5
8715 fi
8716 rm -f conftest.$ac_objext conftest.$ac_ext
8717   break
8718 done
8719 fi
8720 echo "$as_me:8720: result: $ac_cv_sys_largefile_source" >&5
8721 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8722 if test "$ac_cv_sys_largefile_source" != no; then
8723
8724 cat >>confdefs.h <<EOF
8725 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8726 EOF
8727
8728 fi
8729 rm -f conftest*
8730
8731 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8732 # in glibc 2.1.3, but that breaks too many other things.
8733 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8734 echo "$as_me:8734: checking for fseeko" >&5
8735 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8736 if test "${ac_cv_func_fseeko+set}" = set; then
8737   echo $ECHO_N "(cached) $ECHO_C" >&6
8738 else
8739   cat >conftest.$ac_ext <<_ACEOF
8740 #line 8740 "configure"
8741 #include "confdefs.h"
8742 #include <stdio.h>
8743 int
8744 main ()
8745 {
8746 return fseeko && fseeko (stdin, 0, 0);
8747   ;
8748   return 0;
8749 }
8750 _ACEOF
8751 rm -f conftest.$ac_objext conftest$ac_exeext
8752 if { (eval echo "$as_me:8752: \"$ac_link\"") >&5
8753   (eval $ac_link) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit $ac_status); } &&
8757          { ac_try='test -s conftest$ac_exeext'
8758   { (eval echo "$as_me:8758: \"$ac_try\"") >&5
8759   (eval $ac_try) 2>&5
8760   ac_status=$?
8761   echo "$as_me:8761: \$? = $ac_status" >&5
8762   (exit $ac_status); }; }; then
8763   ac_cv_func_fseeko=yes
8764 else
8765   echo "$as_me: failed program was:" >&5
8766 cat conftest.$ac_ext >&5
8767 ac_cv_func_fseeko=no
8768 fi
8769 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8770 fi
8771 echo "$as_me:8771: result: $ac_cv_func_fseeko" >&5
8772 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8773 if test $ac_cv_func_fseeko = yes; then
8774
8775 cat >>confdefs.h <<\EOF
8776 #define HAVE_FSEEKO 1
8777 EOF
8778
8779 fi
8780
8781         # Normally we would collect these definitions in the config.h,
8782         # but (like _XOPEN_SOURCE), some environments rely on having these
8783         # defined before any of the system headers are included.  Another
8784         # case comes up with C++, e.g., on AIX the compiler compiles the
8785         # header files by themselves before looking at the body files it is
8786         # told to compile.  For ncurses, those header files do not include
8787         # the config.h
8788         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8789         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8790         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8791
8792         echo "$as_me:8792: checking whether to use struct dirent64" >&5
8793 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8794 if test "${cf_cv_struct_dirent64+set}" = set; then
8795   echo $ECHO_N "(cached) $ECHO_C" >&6
8796 else
8797
8798                 cat >conftest.$ac_ext <<_ACEOF
8799 #line 8799 "configure"
8800 #include "confdefs.h"
8801
8802 #include <sys/types.h>
8803 #include <dirent.h>
8804
8805 int
8806 main ()
8807 {
8808
8809                 /* if transitional largefile support is setup, this is true */
8810                 extern struct dirent64 * readdir(DIR *);
8811                 struct dirent64 *x = readdir((DIR *)0);
8812                 struct dirent *y = readdir((DIR *)0);
8813                 int z = x - y;
8814
8815   ;
8816   return 0;
8817 }
8818 _ACEOF
8819 rm -f conftest.$ac_objext
8820 if { (eval echo "$as_me:8820: \"$ac_compile\"") >&5
8821   (eval $ac_compile) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit $ac_status); } &&
8825          { ac_try='test -s conftest.$ac_objext'
8826   { (eval echo "$as_me:8826: \"$ac_try\"") >&5
8827   (eval $ac_try) 2>&5
8828   ac_status=$?
8829   echo "$as_me:8829: \$? = $ac_status" >&5
8830   (exit $ac_status); }; }; then
8831   cf_cv_struct_dirent64=yes
8832 else
8833   echo "$as_me: failed program was:" >&5
8834 cat conftest.$ac_ext >&5
8835 cf_cv_struct_dirent64=no
8836 fi
8837 rm -f conftest.$ac_objext conftest.$ac_ext
8838
8839 fi
8840 echo "$as_me:8840: result: $cf_cv_struct_dirent64" >&5
8841 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8842         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8843 #define HAVE_STRUCT_DIRENT64 1
8844 EOF
8845
8846     fi
8847
8848 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
8849 echo "$as_me:8849: checking if you want tparm not to use X/Open fixed-parameter list" >&5
8850 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
8851
8852 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
8853 if test "${enable_tparm_varargs+set}" = set; then
8854   enableval="$enable_tparm_varargs"
8855   with_tparm_varargs=$enableval
8856 else
8857   with_tparm_varargs=yes
8858 fi;
8859 echo "$as_me:8859: result: $with_tparm_varargs" >&5
8860 echo "${ECHO_T}$with_tparm_varargs" >&6
8861 NCURSES_TPARM_VARARGS=0
8862 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
8863
8864 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
8865 if test "$with_ticlib" != no ; then
8866 echo "$as_me:8866: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
8867 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
8868
8869 # Check whether --enable-tic-depends or --disable-tic-depends was given.
8870 if test "${enable_tic_depends+set}" = set; then
8871   enableval="$enable_tic_depends"
8872   with_tic_depends=$enableval
8873 else
8874   with_tic_depends=yes
8875 fi;
8876 echo "$as_me:8876: result: $with_tic_depends" >&5
8877 echo "${ECHO_T}$with_tic_depends" >&6
8878 else
8879         with_tic_depends=no
8880 fi
8881
8882 ###   use option --with-bool to override bool's type
8883 echo "$as_me:8883: checking for type of bool" >&5
8884 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
8885
8886 # Check whether --with-bool or --without-bool was given.
8887 if test "${with_bool+set}" = set; then
8888   withval="$with_bool"
8889   NCURSES_BOOL="$withval"
8890 else
8891   NCURSES_BOOL=auto
8892 fi;
8893 echo "$as_me:8893: result: $NCURSES_BOOL" >&5
8894 echo "${ECHO_T}$NCURSES_BOOL" >&6
8895
8896 echo "$as_me:8896: checking for alternate terminal capabilities file" >&5
8897 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
8898
8899 # Check whether --with-caps or --without-caps was given.
8900 if test "${with_caps+set}" = set; then
8901   withval="$with_caps"
8902   TERMINFO_CAPS=Caps.$withval
8903 else
8904   TERMINFO_CAPS=Caps
8905 fi;
8906 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
8907 echo "$as_me:8907: result: $TERMINFO_CAPS" >&5
8908 echo "${ECHO_T}$TERMINFO_CAPS" >&6
8909
8910 ###   use option --with-chtype to override chtype's type
8911 echo "$as_me:8911: checking for type of chtype" >&5
8912 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
8913
8914 # Check whether --with-chtype or --without-chtype was given.
8915 if test "${with_chtype+set}" = set; then
8916   withval="$with_chtype"
8917   NCURSES_CHTYPE="$withval"
8918 else
8919   NCURSES_CHTYPE=auto
8920 fi;
8921 echo "$as_me:8921: result: $NCURSES_CHTYPE" >&5
8922 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
8923
8924 ###   use option --with-ospeed to override ospeed's type
8925 echo "$as_me:8925: checking for type of ospeed" >&5
8926 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
8927
8928 # Check whether --with-ospeed or --without-ospeed was given.
8929 if test "${with_ospeed+set}" = set; then
8930   withval="$with_ospeed"
8931   NCURSES_OSPEED="$withval"
8932 else
8933   NCURSES_OSPEED=short
8934 fi;
8935 echo "$as_me:8935: result: $NCURSES_OSPEED" >&5
8936 echo "${ECHO_T}$NCURSES_OSPEED" >&6
8937
8938 ###   use option --with-mmask-t to override mmask_t's type
8939 echo "$as_me:8939: checking for type of mmask_t" >&5
8940 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
8941
8942 # Check whether --with-mmask-t or --without-mmask-t was given.
8943 if test "${with_mmask_t+set}" = set; then
8944   withval="$with_mmask_t"
8945   NCURSES_MMASK_T="$withval"
8946 else
8947   NCURSES_MMASK_T=auto
8948 fi;
8949 echo "$as_me:8949: result: $NCURSES_MMASK_T" >&5
8950 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
8951
8952 ###   use option --with-ccharw-max to override CCHARW_MAX size
8953 echo "$as_me:8953: checking for size CCHARW_MAX" >&5
8954 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
8955
8956 # Check whether --with-ccharw-max or --without-ccharw-max was given.
8957 if test "${with_ccharw_max+set}" = set; then
8958   withval="$with_ccharw_max"
8959   NCURSES_CCHARW_MAX="$withval"
8960 else
8961   NCURSES_CCHARW_MAX=5
8962 fi;
8963 echo "$as_me:8963: result: $NCURSES_CCHARW_MAX" >&5
8964 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
8965
8966 ### Enable compiling-in rcs id's
8967 echo "$as_me:8967: checking if RCS identifiers should be compiled-in" >&5
8968 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
8969
8970 # Check whether --with-rcs-ids or --without-rcs-ids was given.
8971 if test "${with_rcs_ids+set}" = set; then
8972   withval="$with_rcs_ids"
8973   with_rcs_ids=$withval
8974 else
8975   with_rcs_ids=no
8976 fi;
8977 echo "$as_me:8977: result: $with_rcs_ids" >&5
8978 echo "${ECHO_T}$with_rcs_ids" >&6
8979 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
8980 #define USE_RCS_IDS 1
8981 EOF
8982
8983 ###############################################################################
8984
8985 echo "$as_me:8985: checking format of man-pages" >&5
8986 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
8987
8988 # Check whether --with-manpage-format or --without-manpage-format was given.
8989 if test "${with_manpage_format+set}" = set; then
8990   withval="$with_manpage_format"
8991   MANPAGE_FORMAT=$withval
8992 else
8993   MANPAGE_FORMAT=unknown
8994 fi;
8995
8996 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
8997 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
8998
8999 cf_unknown=
9000
9001 case $MANPAGE_FORMAT in
9002 unknown)
9003   if test -z "$MANPATH" ; then
9004     MANPATH="/usr/man:/usr/share/man"
9005   fi
9006
9007   # look for the 'date' man-page (it's most likely to be installed!)
9008   MANPAGE_FORMAT=
9009   cf_preform=no
9010   cf_catonly=yes
9011   cf_example=date
9012
9013   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9014   for cf_dir in $MANPATH; do
9015     test -z "$cf_dir" && cf_dir=/usr/man
9016     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
9017     do
9018       cf_test=`echo $cf_name | sed -e 's/*//'`
9019       if test "x$cf_test" = "x$cf_name" ; then
9020
9021         case "$cf_name" in
9022         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9023         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9024         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9025         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9026         esac
9027
9028         case "$cf_name" in
9029         $cf_dir/man*)
9030           cf_catonly=no
9031           ;;
9032         $cf_dir/cat*)
9033           cf_preform=yes
9034           ;;
9035         esac
9036         break
9037       fi
9038
9039       # if we found a match in either man* or cat*, stop looking
9040       if test -n "$MANPAGE_FORMAT" ; then
9041         cf_found=no
9042         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9043         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9044         case "$cf_name" in
9045         $cf_dir/cat*)
9046           cf_found=yes
9047           ;;
9048         esac
9049         test $cf_found=yes && break
9050       fi
9051     done
9052     # only check the first directory in $MANPATH where we find manpages
9053     if test -n "$MANPAGE_FORMAT" ; then
9054        break
9055     fi
9056   done
9057   # if we did not find the example, just assume it is normal
9058   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9059   IFS="$ac_save_ifs"
9060   ;;
9061 *)
9062   for cf_option in $MANPAGE_FORMAT; do
9063      case $cf_option in #(vi
9064      gzip|compress|BSDI|normal|formatted|catonly)
9065        ;;
9066      *)
9067        cf_unknown="$cf_unknown $cf_option"
9068        ;;
9069      esac
9070   done
9071   ;;
9072 esac
9073
9074 echo "$as_me:9074: result: $MANPAGE_FORMAT" >&5
9075 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9076 if test -n "$cf_unknown" ; then
9077   { echo "$as_me:9077: WARNING: Unexpected manpage-format $cf_unknown" >&5
9078 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9079 fi
9080
9081 echo "$as_me:9081: checking for manpage renaming" >&5
9082 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9083
9084 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9085 if test "${with_manpage_renames+set}" = set; then
9086   withval="$with_manpage_renames"
9087   MANPAGE_RENAMES=$withval
9088 else
9089   MANPAGE_RENAMES=yes
9090 fi;
9091
9092 case ".$MANPAGE_RENAMES" in #(vi
9093 .no) #(vi
9094   ;;
9095 .|.yes)
9096   # Debian 'man' program?
9097   if test -f /etc/debian_version ; then
9098     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9099   else
9100     MANPAGE_RENAMES=no
9101   fi
9102   ;;
9103 esac
9104
9105 if test "$MANPAGE_RENAMES" != no ; then
9106   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9107     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9108   elif test ! -f $MANPAGE_RENAMES ; then
9109     { { echo "$as_me:9109: error: not a filename: $MANPAGE_RENAMES" >&5
9110 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9111    { (exit 1); exit 1; }; }
9112   fi
9113
9114   test ! -d man && mkdir man
9115
9116   # Construct a sed-script to perform renaming within man-pages
9117   if test -n "$MANPAGE_RENAMES" ; then
9118     test ! -d man && mkdir man
9119     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9120   fi
9121 fi
9122
9123 echo "$as_me:9123: result: $MANPAGE_RENAMES" >&5
9124 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9125
9126 echo "$as_me:9126: checking if manpage aliases will be installed" >&5
9127 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9128
9129 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9130 if test "${with_manpage_aliases+set}" = set; then
9131   withval="$with_manpage_aliases"
9132   MANPAGE_ALIASES=$withval
9133 else
9134   MANPAGE_ALIASES=yes
9135 fi;
9136
9137 echo "$as_me:9137: result: $MANPAGE_ALIASES" >&5
9138 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9139
9140 if test "$LN_S" = "ln -s"; then
9141         cf_use_symlinks=yes
9142 else
9143         cf_use_symlinks=no
9144 fi
9145
9146 MANPAGE_SYMLINKS=no
9147 if test "$MANPAGE_ALIASES" = yes ; then
9148 echo "$as_me:9148: checking if manpage symlinks should be used" >&5
9149 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9150
9151 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9152 if test "${with_manpage_symlinks+set}" = set; then
9153   withval="$with_manpage_symlinks"
9154   MANPAGE_SYMLINKS=$withval
9155 else
9156   MANPAGE_SYMLINKS=$cf_use_symlinks
9157 fi;
9158
9159 if test "$$cf_use_symlinks" = no; then
9160 if test "$MANPAGE_SYMLINKS" = yes ; then
9161         { echo "$as_me:9161: WARNING: cannot make symlinks" >&5
9162 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9163         MANPAGE_SYMLINKS=no
9164 fi
9165 fi
9166
9167 echo "$as_me:9167: result: $MANPAGE_SYMLINKS" >&5
9168 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9169 fi
9170
9171 echo "$as_me:9171: checking for manpage tbl" >&5
9172 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9173
9174 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9175 if test "${with_manpage_tbl+set}" = set; then
9176   withval="$with_manpage_tbl"
9177   MANPAGE_TBL=$withval
9178 else
9179   MANPAGE_TBL=no
9180 fi;
9181
9182 echo "$as_me:9182: result: $MANPAGE_TBL" >&5
9183 echo "${ECHO_T}$MANPAGE_TBL" >&6
9184
9185   if test "$prefix" = "NONE" ; then
9186      cf_prefix="$ac_default_prefix"
9187   else
9188      cf_prefix="$prefix"
9189   fi
9190
9191   case "$MANPAGE_FORMAT" in # (vi
9192   *catonly*) # (vi
9193     cf_format=yes
9194     cf_inboth=no
9195     ;;
9196   *formatted*) # (vi
9197     cf_format=yes
9198     cf_inboth=yes
9199     ;;
9200   *)
9201     cf_format=no
9202     cf_inboth=no
9203     ;;
9204   esac
9205
9206 test ! -d man && mkdir man
9207
9208 cf_so_strip=
9209 cf_compress=
9210 case "$MANPAGE_FORMAT" in #(vi
9211 *compress*) #(vi
9212         cf_so_strip="Z"
9213         cf_compress=compress
9214   ;;
9215 *gzip*) #(vi
9216         cf_so_strip="gz"
9217         cf_compress=gzip
9218   ;;
9219 esac
9220
9221 cf_edit_man=./edit_man.sh
9222 cf_man_alias=`pwd`/man_alias.sed
9223
9224 cat >$cf_edit_man <<CF_EOF
9225 #! /bin/sh
9226 # this script is generated by the configure-script CF_MAN_PAGES macro.
9227
9228 prefix="$cf_prefix"
9229 datadir="$datadir"
9230
9231 NCURSES_MAJOR="$NCURSES_MAJOR"
9232 NCURSES_MINOR="$NCURSES_MINOR"
9233 NCURSES_PATCH="$NCURSES_PATCH"
9234
9235 NCURSES_OSPEED="$NCURSES_OSPEED"
9236 TERMINFO="$TERMINFO"
9237
9238 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9239
9240 INSTALL="$INSTALL"
9241 INSTALL_DATA="$INSTALL_DATA"
9242
9243 transform="$program_transform_name"
9244
9245 TMP=\${TMPDIR-/tmp}/man\$\$
9246 trap "rm -f \$TMP" 0 1 2 5 15
9247
9248 form=\$1
9249 shift || exit 1
9250
9251 verb=\$1
9252 shift || exit 1
9253
9254 mandir=\$1
9255 shift || exit 1
9256
9257 srcdir=\$1
9258 top_srcdir=\$srcdir/..
9259 shift || exit 1
9260
9261 if test "\$form" = normal ; then
9262         if test "$cf_format" = yes ; then
9263         if test "$cf_inboth" = no ; then
9264                 sh \$0 format \$verb \$mandir \$srcdir \$*
9265                 exit $?
9266         fi
9267         fi
9268         cf_subdir=\$mandir/man
9269         cf_tables=$MANPAGE_TBL
9270 else
9271         cf_subdir=\$mandir/cat
9272         cf_tables=yes
9273 fi
9274
9275 # process the list of source-files
9276 for i in \$* ; do
9277 case \$i in #(vi
9278 *.orig|*.rej) ;; #(vi
9279 *.[0-9]*)
9280         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9281         if test \$verb = installing ; then
9282         if test ! -d \$cf_subdir\${section} ; then
9283                 \$MKDIRS \$cf_subdir\$section
9284         fi
9285         fi
9286
9287         # replace variables in man page
9288         if test ! -f $cf_man_alias ; then
9289 cat >>$cf_man_alias <<-CF_EOF2
9290                 s,@DATADIR@,\$datadir,g
9291                 s,@TERMINFO@,\$TERMINFO,g
9292                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9293                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9294                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9295                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9296 CF_EOF
9297
9298         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9299         do
9300                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9301                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9302 cat >>$cf_edit_man <<-CF_EOF
9303                 s,@$cf_NAME@,$cf_name,
9304 CF_EOF
9305         done
9306
9307 cat >>$cf_edit_man <<CF_EOF
9308 CF_EOF2
9309                 echo "...made $cf_man_alias"
9310         fi
9311
9312         aliases=
9313         cf_source=\`basename \$i\`
9314         inalias=\$cf_source
9315         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9316         if test ! -f \$inalias ; then
9317                 echo .. skipped \$cf_source
9318                 continue
9319         fi
9320 CF_EOF
9321
9322 if test "$MANPAGE_ALIASES" != no ; then
9323 cat >>$cf_edit_man <<CF_EOF
9324         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9325 CF_EOF
9326 fi
9327
9328 if test "$MANPAGE_RENAMES" = no ; then
9329 cat >>$cf_edit_man <<CF_EOF
9330         # perform program transformations for section 1 man pages
9331         if test \$section = 1 ; then
9332                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9333         else
9334                 cf_target=\$cf_subdir\${section}/\$cf_source
9335         fi
9336 CF_EOF
9337 else
9338 cat >>$cf_edit_man <<CF_EOF
9339         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9340         if test -z "\$cf_target" ; then
9341                 echo '? missing rename for '\$cf_source
9342                 cf_target="\$cf_source"
9343         fi
9344         cf_target="\$cf_subdir\${section}/\${cf_target}"
9345
9346 CF_EOF
9347 fi
9348
9349 cat >>$cf_edit_man <<CF_EOF
9350         sed     -f $cf_man_alias \\
9351 CF_EOF
9352
9353 if test -f $MANPAGE_RENAMES ; then
9354 cat >>$cf_edit_man <<CF_EOF
9355                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9356 CF_EOF
9357 else
9358 cat >>$cf_edit_man <<CF_EOF
9359                 < \$i >\$TMP
9360 CF_EOF
9361 fi
9362
9363 cat >>$cf_edit_man <<CF_EOF
9364 if test \$cf_tables = yes ; then
9365         tbl \$TMP >\$TMP.out
9366         mv \$TMP.out \$TMP
9367 fi
9368 CF_EOF
9369
9370 if test $with_curses_h != yes ; then
9371 cat >>$cf_edit_man <<CF_EOF
9372         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9373         mv \$TMP.out \$TMP
9374 CF_EOF
9375 fi
9376
9377 cat >>$cf_edit_man <<CF_EOF
9378         if test \$form = format ; then
9379                 nroff -man \$TMP >\$TMP.out
9380                 mv \$TMP.out \$TMP
9381         fi
9382 CF_EOF
9383
9384 if test -n "$cf_compress" ; then
9385 cat >>$cf_edit_man <<CF_EOF
9386         if test \$verb = installing ; then
9387         if ( $cf_compress -f \$TMP )
9388         then
9389                 mv \$TMP.$cf_so_strip \$TMP
9390         fi
9391         fi
9392         cf_target="\$cf_target.$cf_so_strip"
9393 CF_EOF
9394 fi
9395
9396 case "$MANPAGE_FORMAT" in #(vi
9397 *BSDI*)
9398 cat >>$cf_edit_man <<CF_EOF
9399         if test \$form = format ; then
9400                 # BSDI installs only .0 suffixes in the cat directories
9401                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9402         fi
9403 CF_EOF
9404   ;;
9405 esac
9406
9407 cat >>$cf_edit_man <<CF_EOF
9408         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9409         if test \$verb = installing ; then
9410                 echo \$verb \$cf_target
9411                 \$INSTALL_DATA \$TMP \$cf_target
9412                 test -d \$cf_subdir\${section} &&
9413                 test -n "\$aliases" && (
9414                         cd \$cf_subdir\${section} && (
9415                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9416                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9417                                 cf_target=\`basename \$cf_target\`
9418                                 for cf_alias in \$aliases
9419                                 do
9420                                         if test \$section = 1 ; then
9421                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9422                                         fi
9423
9424                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9425                                                 if test -f \$cf_alias\${suffix} ; then
9426                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9427                                                         then
9428                                                                 continue
9429                                                         fi
9430                                                 fi
9431                                                 echo .. \$verb alias \$cf_alias\${suffix}
9432                                                 rm -f \$cf_alias\${suffix}
9433                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9434                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9435                                                 echo ".so \$cf_source" >\$TMP
9436 CF_EOF
9437 if test -n "$cf_compress" ; then
9438 cat >>$cf_edit_man <<CF_EOF
9439                                                 if test -n "$cf_so_strip" ; then
9440                                                         $cf_compress -f \$TMP
9441                                                         mv \$TMP.$cf_so_strip \$TMP
9442                                                 fi
9443 CF_EOF
9444 fi
9445 cat >>$cf_edit_man <<CF_EOF
9446                                                 echo .. \$verb alias \$cf_alias\${suffix}
9447                                                 rm -f \$cf_alias\${suffix}
9448                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9449                                         fi
9450                                 done
9451                         )
9452                 )
9453         elif test \$verb = removing ; then
9454                 test -f \$cf_target && (
9455                         echo \$verb \$cf_target
9456                         rm -f \$cf_target
9457                 )
9458                 test -d \$cf_subdir\${section} &&
9459                 test -n "\$aliases" && (
9460                         cd \$cf_subdir\${section} && (
9461                                 for cf_alias in \$aliases
9462                                 do
9463                                         if test \$section = 1 ; then
9464                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9465                                         fi
9466
9467                                         echo .. \$verb alias \$cf_alias\${suffix}
9468                                         rm -f \$cf_alias\${suffix}
9469                                 done
9470                         )
9471                 )
9472         else
9473 #               echo ".hy 0"
9474                 cat \$TMP
9475         fi
9476         ;;
9477 esac
9478 done
9479
9480 if test $cf_inboth = yes ; then
9481 if test \$form != format ; then
9482         sh \$0 format \$verb \$mandir \$srcdir \$*
9483 fi
9484 fi
9485
9486 exit 0
9487 CF_EOF
9488 chmod 755 $cf_edit_man
9489
9490 ###############################################################################
9491
9492 ### Note that some functions (such as const) are normally disabled anyway.
9493 echo "$as_me:9493: checking if you want to build with function extensions" >&5
9494 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9495
9496 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9497 if test "${enable_ext_funcs+set}" = set; then
9498   enableval="$enable_ext_funcs"
9499   with_ext_funcs=$enableval
9500 else
9501   with_ext_funcs=yes
9502 fi;
9503 echo "$as_me:9503: result: $with_ext_funcs" >&5
9504 echo "${ECHO_T}$with_ext_funcs" >&6
9505 if test "$with_ext_funcs" = yes ; then
9506         NCURSES_EXT_FUNCS=1
9507         cat >>confdefs.h <<\EOF
9508 #define HAVE_CURSES_VERSION 1
9509 EOF
9510
9511         cat >>confdefs.h <<\EOF
9512 #define HAVE_HAS_KEY 1
9513 EOF
9514
9515         cat >>confdefs.h <<\EOF
9516 #define HAVE_RESIZETERM 1
9517 EOF
9518
9519         cat >>confdefs.h <<\EOF
9520 #define HAVE_RESIZE_TERM 1
9521 EOF
9522
9523         cat >>confdefs.h <<\EOF
9524 #define HAVE_USE_DEFAULT_COLORS 1
9525 EOF
9526
9527         cat >>confdefs.h <<\EOF
9528 #define HAVE_WRESIZE 1
9529 EOF
9530
9531         cat >>confdefs.h <<\EOF
9532 #define NCURSES_EXT_FUNCS 1
9533 EOF
9534
9535         GENERATED_EXT_FUNCS=generated
9536 else
9537         NCURSES_EXT_FUNCS=0
9538         GENERATED_EXT_FUNCS=
9539 fi
9540
9541 echo "$as_me:9541: checking if you want to build with experimental SCREEN extensions" >&5
9542 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9543
9544 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9545 if test "${enable_sp_funcs+set}" = set; then
9546   enableval="$enable_sp_funcs"
9547   with_sp_funcs=$enableval
9548 else
9549   with_sp_funcs=no
9550 fi;
9551 echo "$as_me:9551: result: $with_sp_funcs" >&5
9552 echo "${ECHO_T}$with_sp_funcs" >&6
9553 if test "$with_sp_funcs" = yes ; then
9554         NCURSES_SP_FUNCS=1
9555         cat >>confdefs.h <<\EOF
9556 #define NCURSES_SP_FUNCS 1
9557 EOF
9558
9559         GENERATED_SP_FUNCS=generated
9560 else
9561         NCURSES_SP_FUNCS=0
9562         GENERATED_SP_FUNCS=
9563 fi
9564
9565 echo "$as_me:9565: checking if you want to build with experimental terminal-driver" >&5
9566 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9567
9568 # Check whether --enable-term-driver or --disable-term-driver was given.
9569 if test "${enable_term_driver+set}" = set; then
9570   enableval="$enable_term_driver"
9571   with_term_driver=$enableval
9572 else
9573   with_term_driver=no
9574 fi;
9575 echo "$as_me:9575: result: $with_term_driver" >&5
9576 echo "${ECHO_T}$with_term_driver" >&6
9577 if test "$with_term_driver" = yes ; then
9578         cat >>confdefs.h <<\EOF
9579 #define USE_TERM_DRIVER 1
9580 EOF
9581
9582         if test "$with_sp_funcs" != yes ; then
9583                 { { echo "$as_me:9583: error: The term-driver option relies upon sp-funcs" >&5
9584 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9585    { (exit 1); exit 1; }; }
9586         fi
9587 fi
9588
9589 ###   use option --enable-const to turn on use of const beyond that in XSI.
9590 echo "$as_me:9590: checking for extended use of const keyword" >&5
9591 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9592
9593 # Check whether --enable-const or --disable-const was given.
9594 if test "${enable_const+set}" = set; then
9595   enableval="$enable_const"
9596   with_ext_const=$enableval
9597 else
9598   with_ext_const=no
9599 fi;
9600 echo "$as_me:9600: result: $with_ext_const" >&5
9601 echo "${ECHO_T}$with_ext_const" >&6
9602 NCURSES_CONST='/*nothing*/'
9603 if test "$with_ext_const" = yes ; then
9604         NCURSES_CONST=const
9605 fi
9606
9607 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9608 echo "$as_me:9608: checking if you want to use extended colors" >&5
9609 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9610
9611 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9612 if test "${enable_ext_colors+set}" = set; then
9613   enableval="$enable_ext_colors"
9614   with_ext_colors=$enableval
9615 else
9616   with_ext_colors=no
9617 fi;
9618 echo "$as_me:9618: result: $with_ext_colors" >&5
9619 echo "${ECHO_T}$with_ext_colors" >&6
9620 NCURSES_EXT_COLORS=0
9621 if test "$with_ext_colors" = yes ; then
9622         if test "$with_widec" != yes ; then
9623                 { { echo "$as_me:9623: error: This option applies only to wide-character library" >&5
9624 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9625    { (exit 1); exit 1; }; }
9626         else
9627                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9628
9629 if test "${with_abi_version+set}" != set; then
9630         case $cf_cv_rel_version in
9631         5.*)
9632                 cf_cv_rel_version=6.0
9633                 cf_cv_abi_version=6
9634                 { echo "$as_me:9634: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9635 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9636                 ;;
9637         esac
9638 fi
9639
9640         fi
9641         NCURSES_EXT_COLORS=1
9642         cat >>confdefs.h <<\EOF
9643 #define NCURSES_EXT_COLORS 1
9644 EOF
9645
9646 fi
9647
9648 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9649 echo "$as_me:9649: checking if you want to use extended mouse encoding" >&5
9650 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9651
9652 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9653 if test "${enable_ext_mouse+set}" = set; then
9654   enableval="$enable_ext_mouse"
9655   with_ext_mouse=$enableval
9656 else
9657   with_ext_mouse=no
9658 fi;
9659 echo "$as_me:9659: result: $with_ext_mouse" >&5
9660 echo "${ECHO_T}$with_ext_mouse" >&6
9661 NCURSES_MOUSE_VERSION=1
9662 if test "$with_ext_mouse" = yes ; then
9663         NCURSES_MOUSE_VERSION=2
9664
9665 if test "${with_abi_version+set}" != set; then
9666         case $cf_cv_rel_version in
9667         5.*)
9668                 cf_cv_rel_version=6.0
9669                 cf_cv_abi_version=6
9670                 { echo "$as_me:9670: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9671 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9672                 ;;
9673         esac
9674 fi
9675
9676 fi
9677
9678 echo "$as_me:9678: checking if you want \$NCURSES_NO_PADDING code" >&5
9679 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9680
9681 # Check whether --enable-no-padding or --disable-no-padding was given.
9682 if test "${enable_no_padding+set}" = set; then
9683   enableval="$enable_no_padding"
9684   with_no_padding=$enableval
9685 else
9686   with_no_padding=$with_ext_funcs
9687 fi;
9688 echo "$as_me:9688: result: $with_no_padding" >&5
9689 echo "${ECHO_T}$with_no_padding" >&6
9690 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9691 #define NCURSES_NO_PADDING 1
9692 EOF
9693
9694 echo "$as_me:9694: checking for ANSI C header files" >&5
9695 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9696 if test "${ac_cv_header_stdc+set}" = set; then
9697   echo $ECHO_N "(cached) $ECHO_C" >&6
9698 else
9699   cat >conftest.$ac_ext <<_ACEOF
9700 #line 9700 "configure"
9701 #include "confdefs.h"
9702 #include <stdlib.h>
9703 #include <stdarg.h>
9704 #include <string.h>
9705 #include <float.h>
9706
9707 _ACEOF
9708 if { (eval echo "$as_me:9708: \"$ac_cpp conftest.$ac_ext\"") >&5
9709   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9710   ac_status=$?
9711   egrep -v '^ *\+' conftest.er1 >conftest.err
9712   rm -f conftest.er1
9713   cat conftest.err >&5
9714   echo "$as_me:9714: \$? = $ac_status" >&5
9715   (exit $ac_status); } >/dev/null; then
9716   if test -s conftest.err; then
9717     ac_cpp_err=$ac_c_preproc_warn_flag
9718   else
9719     ac_cpp_err=
9720   fi
9721 else
9722   ac_cpp_err=yes
9723 fi
9724 if test -z "$ac_cpp_err"; then
9725   ac_cv_header_stdc=yes
9726 else
9727   echo "$as_me: failed program was:" >&5
9728   cat conftest.$ac_ext >&5
9729   ac_cv_header_stdc=no
9730 fi
9731 rm -f conftest.err conftest.$ac_ext
9732
9733 if test $ac_cv_header_stdc = yes; then
9734   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9735   cat >conftest.$ac_ext <<_ACEOF
9736 #line 9736 "configure"
9737 #include "confdefs.h"
9738 #include <string.h>
9739
9740 _ACEOF
9741 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9742   egrep "memchr" >/dev/null 2>&1; then
9743   :
9744 else
9745   ac_cv_header_stdc=no
9746 fi
9747 rm -f conftest*
9748
9749 fi
9750
9751 if test $ac_cv_header_stdc = yes; then
9752   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9753   cat >conftest.$ac_ext <<_ACEOF
9754 #line 9754 "configure"
9755 #include "confdefs.h"
9756 #include <stdlib.h>
9757
9758 _ACEOF
9759 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9760   egrep "free" >/dev/null 2>&1; then
9761   :
9762 else
9763   ac_cv_header_stdc=no
9764 fi
9765 rm -f conftest*
9766
9767 fi
9768
9769 if test $ac_cv_header_stdc = yes; then
9770   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9771   if test "$cross_compiling" = yes; then
9772   :
9773 else
9774   cat >conftest.$ac_ext <<_ACEOF
9775 #line 9775 "configure"
9776 #include "confdefs.h"
9777 #include <ctype.h>
9778 #if ((' ' & 0x0FF) == 0x020)
9779 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9780 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9781 #else
9782 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9783                      || ('j' <= (c) && (c) <= 'r') \
9784                      || ('s' <= (c) && (c) <= 'z'))
9785 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9786 #endif
9787
9788 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9789 int
9790 main ()
9791 {
9792   int i;
9793   for (i = 0; i < 256; i++)
9794     if (XOR (islower (i), ISLOWER (i))
9795         || toupper (i) != TOUPPER (i))
9796       $ac_main_return(2);
9797   $ac_main_return (0);
9798 }
9799 _ACEOF
9800 rm -f conftest$ac_exeext
9801 if { (eval echo "$as_me:9801: \"$ac_link\"") >&5
9802   (eval $ac_link) 2>&5
9803   ac_status=$?
9804   echo "$as_me:9804: \$? = $ac_status" >&5
9805   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9806   { (eval echo "$as_me:9806: \"$ac_try\"") >&5
9807   (eval $ac_try) 2>&5
9808   ac_status=$?
9809   echo "$as_me:9809: \$? = $ac_status" >&5
9810   (exit $ac_status); }; }; then
9811   :
9812 else
9813   echo "$as_me: program exited with status $ac_status" >&5
9814 echo "$as_me: failed program was:" >&5
9815 cat conftest.$ac_ext >&5
9816 ac_cv_header_stdc=no
9817 fi
9818 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9819 fi
9820 fi
9821 fi
9822 echo "$as_me:9822: result: $ac_cv_header_stdc" >&5
9823 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9824 if test $ac_cv_header_stdc = yes; then
9825
9826 cat >>confdefs.h <<\EOF
9827 #define STDC_HEADERS 1
9828 EOF
9829
9830 fi
9831
9832 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9833
9834 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9835                   inttypes.h stdint.h unistd.h
9836 do
9837 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9838 echo "$as_me:9838: checking for $ac_header" >&5
9839 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9840 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9841   echo $ECHO_N "(cached) $ECHO_C" >&6
9842 else
9843   cat >conftest.$ac_ext <<_ACEOF
9844 #line 9844 "configure"
9845 #include "confdefs.h"
9846 $ac_includes_default
9847 #include <$ac_header>
9848 _ACEOF
9849 rm -f conftest.$ac_objext
9850 if { (eval echo "$as_me:9850: \"$ac_compile\"") >&5
9851   (eval $ac_compile) 2>&5
9852   ac_status=$?
9853   echo "$as_me:9853: \$? = $ac_status" >&5
9854   (exit $ac_status); } &&
9855          { ac_try='test -s conftest.$ac_objext'
9856   { (eval echo "$as_me:9856: \"$ac_try\"") >&5
9857   (eval $ac_try) 2>&5
9858   ac_status=$?
9859   echo "$as_me:9859: \$? = $ac_status" >&5
9860   (exit $ac_status); }; }; then
9861   eval "$as_ac_Header=yes"
9862 else
9863   echo "$as_me: failed program was:" >&5
9864 cat conftest.$ac_ext >&5
9865 eval "$as_ac_Header=no"
9866 fi
9867 rm -f conftest.$ac_objext conftest.$ac_ext
9868 fi
9869 echo "$as_me:9869: result: `eval echo '${'$as_ac_Header'}'`" >&5
9870 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9871 if test `eval echo '${'$as_ac_Header'}'` = yes; then
9872   cat >>confdefs.h <<EOF
9873 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9874 EOF
9875
9876 fi
9877 done
9878
9879 echo "$as_me:9879: checking for signed char" >&5
9880 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
9881 if test "${ac_cv_type_signed_char+set}" = set; then
9882   echo $ECHO_N "(cached) $ECHO_C" >&6
9883 else
9884   cat >conftest.$ac_ext <<_ACEOF
9885 #line 9885 "configure"
9886 #include "confdefs.h"
9887 $ac_includes_default
9888 int
9889 main ()
9890 {
9891 if ((signed char *) 0)
9892   return 0;
9893 if (sizeof (signed char))
9894   return 0;
9895   ;
9896   return 0;
9897 }
9898 _ACEOF
9899 rm -f conftest.$ac_objext
9900 if { (eval echo "$as_me:9900: \"$ac_compile\"") >&5
9901   (eval $ac_compile) 2>&5
9902   ac_status=$?
9903   echo "$as_me:9903: \$? = $ac_status" >&5
9904   (exit $ac_status); } &&
9905          { ac_try='test -s conftest.$ac_objext'
9906   { (eval echo "$as_me:9906: \"$ac_try\"") >&5
9907   (eval $ac_try) 2>&5
9908   ac_status=$?
9909   echo "$as_me:9909: \$? = $ac_status" >&5
9910   (exit $ac_status); }; }; then
9911   ac_cv_type_signed_char=yes
9912 else
9913   echo "$as_me: failed program was:" >&5
9914 cat conftest.$ac_ext >&5
9915 ac_cv_type_signed_char=no
9916 fi
9917 rm -f conftest.$ac_objext conftest.$ac_ext
9918 fi
9919 echo "$as_me:9919: result: $ac_cv_type_signed_char" >&5
9920 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
9921
9922 echo "$as_me:9922: checking size of signed char" >&5
9923 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
9924 if test "${ac_cv_sizeof_signed_char+set}" = set; then
9925   echo $ECHO_N "(cached) $ECHO_C" >&6
9926 else
9927   if test "$ac_cv_type_signed_char" = yes; then
9928   if test "$cross_compiling" = yes; then
9929   # Depending upon the size, compute the lo and hi bounds.
9930 cat >conftest.$ac_ext <<_ACEOF
9931 #line 9931 "configure"
9932 #include "confdefs.h"
9933 $ac_includes_default
9934 int
9935 main ()
9936 {
9937 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
9938   ;
9939   return 0;
9940 }
9941 _ACEOF
9942 rm -f conftest.$ac_objext
9943 if { (eval echo "$as_me:9943: \"$ac_compile\"") >&5
9944   (eval $ac_compile) 2>&5
9945   ac_status=$?
9946   echo "$as_me:9946: \$? = $ac_status" >&5
9947   (exit $ac_status); } &&
9948          { ac_try='test -s conftest.$ac_objext'
9949   { (eval echo "$as_me:9949: \"$ac_try\"") >&5
9950   (eval $ac_try) 2>&5
9951   ac_status=$?
9952   echo "$as_me:9952: \$? = $ac_status" >&5
9953   (exit $ac_status); }; }; then
9954   ac_lo=0 ac_mid=0
9955   while :; do
9956     cat >conftest.$ac_ext <<_ACEOF
9957 #line 9957 "configure"
9958 #include "confdefs.h"
9959 $ac_includes_default
9960 int
9961 main ()
9962 {
9963 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
9964   ;
9965   return 0;
9966 }
9967 _ACEOF
9968 rm -f conftest.$ac_objext
9969 if { (eval echo "$as_me:9969: \"$ac_compile\"") >&5
9970   (eval $ac_compile) 2>&5
9971   ac_status=$?
9972   echo "$as_me:9972: \$? = $ac_status" >&5
9973   (exit $ac_status); } &&
9974          { ac_try='test -s conftest.$ac_objext'
9975   { (eval echo "$as_me:9975: \"$ac_try\"") >&5
9976   (eval $ac_try) 2>&5
9977   ac_status=$?
9978   echo "$as_me:9978: \$? = $ac_status" >&5
9979   (exit $ac_status); }; }; then
9980   ac_hi=$ac_mid; break
9981 else
9982   echo "$as_me: failed program was:" >&5
9983 cat conftest.$ac_ext >&5
9984 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
9985 fi
9986 rm -f conftest.$ac_objext conftest.$ac_ext
9987   done
9988 else
9989   echo "$as_me: failed program was:" >&5
9990 cat conftest.$ac_ext >&5
9991 ac_hi=-1 ac_mid=-1
9992   while :; do
9993     cat >conftest.$ac_ext <<_ACEOF
9994 #line 9994 "configure"
9995 #include "confdefs.h"
9996 $ac_includes_default
9997 int
9998 main ()
9999 {
10000 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10001   ;
10002   return 0;
10003 }
10004 _ACEOF
10005 rm -f conftest.$ac_objext
10006 if { (eval echo "$as_me:10006: \"$ac_compile\"") >&5
10007   (eval $ac_compile) 2>&5
10008   ac_status=$?
10009   echo "$as_me:10009: \$? = $ac_status" >&5
10010   (exit $ac_status); } &&
10011          { ac_try='test -s conftest.$ac_objext'
10012   { (eval echo "$as_me:10012: \"$ac_try\"") >&5
10013   (eval $ac_try) 2>&5
10014   ac_status=$?
10015   echo "$as_me:10015: \$? = $ac_status" >&5
10016   (exit $ac_status); }; }; then
10017   ac_lo=$ac_mid; break
10018 else
10019   echo "$as_me: failed program was:" >&5
10020 cat conftest.$ac_ext >&5
10021 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10022 fi
10023 rm -f conftest.$ac_objext conftest.$ac_ext
10024   done
10025 fi
10026 rm -f conftest.$ac_objext conftest.$ac_ext
10027 # Binary search between lo and hi bounds.
10028 while test "x$ac_lo" != "x$ac_hi"; do
10029   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10030   cat >conftest.$ac_ext <<_ACEOF
10031 #line 10031 "configure"
10032 #include "confdefs.h"
10033 $ac_includes_default
10034 int
10035 main ()
10036 {
10037 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10038   ;
10039   return 0;
10040 }
10041 _ACEOF
10042 rm -f conftest.$ac_objext
10043 if { (eval echo "$as_me:10043: \"$ac_compile\"") >&5
10044   (eval $ac_compile) 2>&5
10045   ac_status=$?
10046   echo "$as_me:10046: \$? = $ac_status" >&5
10047   (exit $ac_status); } &&
10048          { ac_try='test -s conftest.$ac_objext'
10049   { (eval echo "$as_me:10049: \"$ac_try\"") >&5
10050   (eval $ac_try) 2>&5
10051   ac_status=$?
10052   echo "$as_me:10052: \$? = $ac_status" >&5
10053   (exit $ac_status); }; }; then
10054   ac_hi=$ac_mid
10055 else
10056   echo "$as_me: failed program was:" >&5
10057 cat conftest.$ac_ext >&5
10058 ac_lo=`expr $ac_mid + 1`
10059 fi
10060 rm -f conftest.$ac_objext conftest.$ac_ext
10061 done
10062 ac_cv_sizeof_signed_char=$ac_lo
10063 else
10064   if test "$cross_compiling" = yes; then
10065   { { echo "$as_me:10065: error: cannot run test program while cross compiling" >&5
10066 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10067    { (exit 1); exit 1; }; }
10068 else
10069   cat >conftest.$ac_ext <<_ACEOF
10070 #line 10070 "configure"
10071 #include "confdefs.h"
10072 $ac_includes_default
10073 int
10074 main ()
10075 {
10076 FILE *f = fopen ("conftest.val", "w");
10077 if (!f)
10078   $ac_main_return (1);
10079 fprintf (f, "%d", (sizeof (signed char)));
10080 fclose (f);
10081   ;
10082   return 0;
10083 }
10084 _ACEOF
10085 rm -f conftest$ac_exeext
10086 if { (eval echo "$as_me:10086: \"$ac_link\"") >&5
10087   (eval $ac_link) 2>&5
10088   ac_status=$?
10089   echo "$as_me:10089: \$? = $ac_status" >&5
10090   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10091   { (eval echo "$as_me:10091: \"$ac_try\"") >&5
10092   (eval $ac_try) 2>&5
10093   ac_status=$?
10094   echo "$as_me:10094: \$? = $ac_status" >&5
10095   (exit $ac_status); }; }; then
10096   ac_cv_sizeof_signed_char=`cat conftest.val`
10097 else
10098   echo "$as_me: program exited with status $ac_status" >&5
10099 echo "$as_me: failed program was:" >&5
10100 cat conftest.$ac_ext >&5
10101 fi
10102 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10103 fi
10104 fi
10105 rm -f conftest.val
10106 else
10107   ac_cv_sizeof_signed_char=0
10108 fi
10109 fi
10110 echo "$as_me:10110: result: $ac_cv_sizeof_signed_char" >&5
10111 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10112 cat >>confdefs.h <<EOF
10113 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10114 EOF
10115
10116 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10117         NCURSES_SBOOL="signed char"
10118 else
10119         NCURSES_SBOOL="char"
10120 fi
10121 echo "$as_me:10121: checking if you want to use signed Boolean array in term.h" >&5
10122 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10123
10124 # Check whether --enable-signed-char or --disable-signed-char was given.
10125 if test "${enable_signed_char+set}" = set; then
10126   enableval="$enable_signed_char"
10127   with_signed_char=$enableval
10128 else
10129   with_signed_char=no
10130 fi;
10131 echo "$as_me:10131: result: $with_signed_char" >&5
10132 echo "${ECHO_T}$with_signed_char" >&6
10133 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10134
10135 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10136 echo "$as_me:10136: checking if you want SIGWINCH handler" >&5
10137 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10138
10139 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10140 if test "${enable_sigwinch+set}" = set; then
10141   enableval="$enable_sigwinch"
10142   with_sigwinch=$enableval
10143 else
10144   with_sigwinch=$with_ext_funcs
10145 fi;
10146 echo "$as_me:10146: result: $with_sigwinch" >&5
10147 echo "${ECHO_T}$with_sigwinch" >&6
10148 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10149 #define USE_SIGWINCH 1
10150 EOF
10151
10152 ###   use option --enable-tcap-names to allow user to define new capabilities
10153 echo "$as_me:10153: checking if you want user-definable terminal capabilities like termcap" >&5
10154 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10155
10156 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10157 if test "${enable_tcap_names+set}" = set; then
10158   enableval="$enable_tcap_names"
10159   with_tcap_names=$enableval
10160 else
10161   with_tcap_names=$with_ext_funcs
10162 fi;
10163 echo "$as_me:10163: result: $with_tcap_names" >&5
10164 echo "${ECHO_T}$with_tcap_names" >&6
10165 NCURSES_XNAMES=0
10166 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10167
10168 ###############################################################################
10169 # These options are relatively safe to experiment with.
10170
10171 echo "$as_me:10171: checking if you want all development code" >&5
10172 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10173
10174 # Check whether --with-develop or --without-develop was given.
10175 if test "${with_develop+set}" = set; then
10176   withval="$with_develop"
10177   with_develop=$withval
10178 else
10179   with_develop=no
10180 fi;
10181 echo "$as_me:10181: result: $with_develop" >&5
10182 echo "${ECHO_T}$with_develop" >&6
10183
10184 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10185 echo "$as_me:10185: checking if you want hard-tabs code" >&5
10186 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10187
10188 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10189 if test "${enable_hard_tabs+set}" = set; then
10190   enableval="$enable_hard_tabs"
10191
10192 else
10193   enable_hard_tabs=$with_develop
10194 fi;
10195 echo "$as_me:10195: result: $enable_hard_tabs" >&5
10196 echo "${ECHO_T}$enable_hard_tabs" >&6
10197 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10198 #define USE_HARD_TABS 1
10199 EOF
10200
10201 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10202 echo "$as_me:10202: checking if you want limited support for xmc" >&5
10203 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10204
10205 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10206 if test "${enable_xmc_glitch+set}" = set; then
10207   enableval="$enable_xmc_glitch"
10208
10209 else
10210   enable_xmc_glitch=$with_develop
10211 fi;
10212 echo "$as_me:10212: result: $enable_xmc_glitch" >&5
10213 echo "${ECHO_T}$enable_xmc_glitch" >&6
10214 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10215 #define USE_XMC_SUPPORT 1
10216 EOF
10217
10218 ###############################################################################
10219 # These are just experimental, probably should not be in a package:
10220
10221 echo "$as_me:10221: checking if you do not want to assume colors are white-on-black" >&5
10222 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10223
10224 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10225 if test "${enable_assumed_color+set}" = set; then
10226   enableval="$enable_assumed_color"
10227   with_assumed_color=$enableval
10228 else
10229   with_assumed_color=yes
10230 fi;
10231 echo "$as_me:10231: result: $with_assumed_color" >&5
10232 echo "${ECHO_T}$with_assumed_color" >&6
10233 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10234 #define USE_ASSUMED_COLOR 1
10235 EOF
10236
10237 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10238 echo "$as_me:10238: checking if you want hashmap scrolling-optimization code" >&5
10239 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10240
10241 # Check whether --enable-hashmap or --disable-hashmap was given.
10242 if test "${enable_hashmap+set}" = set; then
10243   enableval="$enable_hashmap"
10244   with_hashmap=$enableval
10245 else
10246   with_hashmap=yes
10247 fi;
10248 echo "$as_me:10248: result: $with_hashmap" >&5
10249 echo "${ECHO_T}$with_hashmap" >&6
10250 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10251 #define USE_HASHMAP 1
10252 EOF
10253
10254 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10255 echo "$as_me:10255: checking if you want colorfgbg code" >&5
10256 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10257
10258 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10259 if test "${enable_colorfgbg+set}" = set; then
10260   enableval="$enable_colorfgbg"
10261   with_colorfgbg=$enableval
10262 else
10263   with_colorfgbg=no
10264 fi;
10265 echo "$as_me:10265: result: $with_colorfgbg" >&5
10266 echo "${ECHO_T}$with_colorfgbg" >&6
10267 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10268 #define USE_COLORFGBG 1
10269 EOF
10270
10271 ###   use option --enable-interop to turn on use of bindings used for interop
10272 echo "$as_me:10272: checking if you want interop bindings" >&5
10273 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10274
10275 # Check whether --enable-interop or --disable-interop was given.
10276 if test "${enable_interop+set}" = set; then
10277   enableval="$enable_interop"
10278   with_exp_interop=$enableval
10279 else
10280   with_exp_interop=no
10281 fi;
10282 echo "$as_me:10282: result: $with_exp_interop" >&5
10283 echo "${ECHO_T}$with_exp_interop" >&6
10284
10285 NCURSES_INTEROP_FUNCS=0
10286 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10287
10288 # This is still experimental (20080329), but should ultimately be moved to
10289 # the script-block --with-normal, etc.
10290
10291 echo "$as_me:10291: checking if you want to link with the pthread library" >&5
10292 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10293
10294 # Check whether --with-pthread or --without-pthread was given.
10295 if test "${with_pthread+set}" = set; then
10296   withval="$with_pthread"
10297   with_pthread=$withval
10298 else
10299   with_pthread=no
10300 fi;
10301 echo "$as_me:10301: result: $with_pthread" >&5
10302 echo "${ECHO_T}$with_pthread" >&6
10303
10304 if test "$with_pthread" != no ; then
10305     echo "$as_me:10305: checking for pthread.h" >&5
10306 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10307 if test "${ac_cv_header_pthread_h+set}" = set; then
10308   echo $ECHO_N "(cached) $ECHO_C" >&6
10309 else
10310   cat >conftest.$ac_ext <<_ACEOF
10311 #line 10311 "configure"
10312 #include "confdefs.h"
10313 #include <pthread.h>
10314 _ACEOF
10315 if { (eval echo "$as_me:10315: \"$ac_cpp conftest.$ac_ext\"") >&5
10316   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10317   ac_status=$?
10318   egrep -v '^ *\+' conftest.er1 >conftest.err
10319   rm -f conftest.er1
10320   cat conftest.err >&5
10321   echo "$as_me:10321: \$? = $ac_status" >&5
10322   (exit $ac_status); } >/dev/null; then
10323   if test -s conftest.err; then
10324     ac_cpp_err=$ac_c_preproc_warn_flag
10325   else
10326     ac_cpp_err=
10327   fi
10328 else
10329   ac_cpp_err=yes
10330 fi
10331 if test -z "$ac_cpp_err"; then
10332   ac_cv_header_pthread_h=yes
10333 else
10334   echo "$as_me: failed program was:" >&5
10335   cat conftest.$ac_ext >&5
10336   ac_cv_header_pthread_h=no
10337 fi
10338 rm -f conftest.err conftest.$ac_ext
10339 fi
10340 echo "$as_me:10340: result: $ac_cv_header_pthread_h" >&5
10341 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10342 if test $ac_cv_header_pthread_h = yes; then
10343
10344         cat >>confdefs.h <<\EOF
10345 #define HAVE_PTHREADS_H 1
10346 EOF
10347
10348         echo "$as_me:10348: checking if we can link with the pthread library" >&5
10349 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10350         cf_save_LIBS="$LIBS"
10351         LIBS="-lpthread $LIBS"
10352         cat >conftest.$ac_ext <<_ACEOF
10353 #line 10353 "configure"
10354 #include "confdefs.h"
10355
10356 #include <pthread.h>
10357
10358 int
10359 main ()
10360 {
10361
10362         int rc = pthread_create(0,0,0,0);
10363
10364   ;
10365   return 0;
10366 }
10367 _ACEOF
10368 rm -f conftest.$ac_objext conftest$ac_exeext
10369 if { (eval echo "$as_me:10369: \"$ac_link\"") >&5
10370   (eval $ac_link) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit $ac_status); } &&
10374          { ac_try='test -s conftest$ac_exeext'
10375   { (eval echo "$as_me:10375: \"$ac_try\"") >&5
10376   (eval $ac_try) 2>&5
10377   ac_status=$?
10378   echo "$as_me:10378: \$? = $ac_status" >&5
10379   (exit $ac_status); }; }; then
10380   with_pthread=yes
10381 else
10382   echo "$as_me: failed program was:" >&5
10383 cat conftest.$ac_ext >&5
10384 with_pthread=no
10385 fi
10386 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10387         LIBS="$cf_save_LIBS"
10388         echo "$as_me:10388: result: $with_pthread" >&5
10389 echo "${ECHO_T}$with_pthread" >&6
10390
10391         if test "$with_pthread" = yes ; then
10392             LIBS="-lpthread $LIBS"
10393             cat >>confdefs.h <<\EOF
10394 #define HAVE_LIBPTHREADS 1
10395 EOF
10396
10397         else
10398             { { echo "$as_me:10398: error: Cannot link with pthread library" >&5
10399 echo "$as_me: error: Cannot link with pthread library" >&2;}
10400    { (exit 1); exit 1; }; }
10401         fi
10402
10403 fi
10404
10405 fi
10406
10407 echo "$as_me:10407: checking if you want to use weak-symbols for pthreads" >&5
10408 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10409
10410 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10411 if test "${enable_weak_symbols+set}" = set; then
10412   enableval="$enable_weak_symbols"
10413   use_weak_symbols=$withval
10414 else
10415   use_weak_symbols=no
10416 fi;
10417 echo "$as_me:10417: result: $use_weak_symbols" >&5
10418 echo "${ECHO_T}$use_weak_symbols" >&6
10419 if test "$use_weak_symbols" = yes ; then
10420
10421 echo "$as_me:10421: checking if $CC supports weak symbols" >&5
10422 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10423 if test "${cf_cv_weak_symbols+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426
10427 cat >conftest.$ac_ext <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430
10431 #include <stdio.h>
10432 int
10433 main ()
10434 {
10435
10436 #if defined(__GNUC__)
10437 #  if defined __USE_ISOC99
10438 #    define _cat_pragma(exp)    _Pragma(#exp)
10439 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10440 #  else
10441 #    define _weak_pragma(exp)
10442 #  endif
10443 #  define _declare(name)        __extension__ extern __typeof__(name) name
10444 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10445 #endif
10446
10447 weak_symbol(fopen);
10448
10449   ;
10450   return 0;
10451 }
10452 _ACEOF
10453 rm -f conftest.$ac_objext
10454 if { (eval echo "$as_me:10454: \"$ac_compile\"") >&5
10455   (eval $ac_compile) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit $ac_status); } &&
10459          { ac_try='test -s conftest.$ac_objext'
10460   { (eval echo "$as_me:10460: \"$ac_try\"") >&5
10461   (eval $ac_try) 2>&5
10462   ac_status=$?
10463   echo "$as_me:10463: \$? = $ac_status" >&5
10464   (exit $ac_status); }; }; then
10465   cf_cv_weak_symbols=yes
10466 else
10467   echo "$as_me: failed program was:" >&5
10468 cat conftest.$ac_ext >&5
10469 cf_cv_weak_symbols=no
10470 fi
10471 rm -f conftest.$ac_objext conftest.$ac_ext
10472
10473 fi
10474 echo "$as_me:10474: result: $cf_cv_weak_symbols" >&5
10475 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10476
10477 else
10478     cf_cv_weak_symbols=no
10479 fi
10480
10481 if test $cf_cv_weak_symbols = yes ; then
10482     cat >>confdefs.h <<\EOF
10483 #define USE_WEAK_SYMBOLS 1
10484 EOF
10485
10486 fi
10487
10488 PTHREAD=
10489 if test "$with_pthread" = "yes" ; then
10490     cat >>confdefs.h <<\EOF
10491 #define USE_PTHREADS 1
10492 EOF
10493
10494     enable_reentrant=yes
10495     if test $cf_cv_weak_symbols = yes ; then
10496         PTHREAD=-lpthread
10497     fi
10498 fi
10499
10500 # Reentrant code has to be opaque; there's little advantage to making ncurses
10501 # opaque outside of that, so there is no --enable-opaque option.  We can use
10502 # this option without --with-pthreads, but this will be always set for
10503 # pthreads.
10504 echo "$as_me:10504: checking if you want experimental reentrant code" >&5
10505 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10506
10507 # Check whether --enable-reentrant or --disable-reentrant was given.
10508 if test "${enable_reentrant+set}" = set; then
10509   enableval="$enable_reentrant"
10510   with_reentrant=$enableval
10511 else
10512   with_reentrant=no
10513 fi;
10514 echo "$as_me:10514: result: $with_reentrant" >&5
10515 echo "${ECHO_T}$with_reentrant" >&6
10516 if test "$with_reentrant" = yes ; then
10517         cf_cv_enable_reentrant=1
10518         cf_cv_enable_opaque="NCURSES_INTERNALS"
10519         NCURSES_OPAQUE=1
10520         NCURSES_SIZE_T=int
10521         if test $cf_cv_weak_symbols = yes ; then
10522
10523 # remove pthread library from $LIBS
10524 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10525
10526         else
10527                 LIB_SUFFIX="t${LIB_SUFFIX}"
10528         fi
10529         cat >>confdefs.h <<\EOF
10530 #define USE_REENTRANT 1
10531 EOF
10532
10533 if test "${with_abi_version+set}" != set; then
10534         case $cf_cv_rel_version in
10535         5.*)
10536                 cf_cv_rel_version=6.0
10537                 cf_cv_abi_version=6
10538                 { echo "$as_me:10538: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10539 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10540                 ;;
10541         esac
10542 fi
10543
10544 else
10545         cf_cv_enable_reentrant=0
10546         cf_cv_enable_opaque="NCURSES_OPAQUE"
10547         NCURSES_OPAQUE=0
10548         NCURSES_SIZE_T=short
10549 fi
10550
10551 ### Allow using a different wrap-prefix
10552 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10553         echo "$as_me:10553: checking for prefix used to wrap public variables" >&5
10554 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10555
10556 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10557 if test "${with_wrap_prefix+set}" = set; then
10558   withval="$with_wrap_prefix"
10559   NCURSES_WRAP_PREFIX=$withval
10560 else
10561   NCURSES_WRAP_PREFIX=_nc_
10562 fi;
10563         echo "$as_me:10563: result: $NCURSES_WRAP_PREFIX" >&5
10564 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10565 else
10566         NCURSES_WRAP_PREFIX=_nc_
10567 fi
10568
10569 cat >>confdefs.h <<EOF
10570 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10571 EOF
10572
10573 echo "$as_me:10573: checking if you want experimental safe-sprintf code" >&5
10574 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10575
10576 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10577 if test "${enable_safe_sprintf+set}" = set; then
10578   enableval="$enable_safe_sprintf"
10579   with_safe_sprintf=$enableval
10580 else
10581   with_safe_sprintf=no
10582 fi;
10583 echo "$as_me:10583: result: $with_safe_sprintf" >&5
10584 echo "${ECHO_T}$with_safe_sprintf" >&6
10585 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10586 #define USE_SAFE_SPRINTF 1
10587 EOF
10588
10589 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10590 # when hashmap is used scroll hints are useless
10591 if test "$with_hashmap" = no ; then
10592 echo "$as_me:10592: checking if you want to experiment without scrolling-hints code" >&5
10593 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10594
10595 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10596 if test "${enable_scroll_hints+set}" = set; then
10597   enableval="$enable_scroll_hints"
10598   with_scroll_hints=$enableval
10599 else
10600   with_scroll_hints=yes
10601 fi;
10602 echo "$as_me:10602: result: $with_scroll_hints" >&5
10603 echo "${ECHO_T}$with_scroll_hints" >&6
10604 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10605 #define USE_SCROLL_HINTS 1
10606 EOF
10607
10608 fi
10609
10610 echo "$as_me:10610: checking if you want experimental wgetch-events code" >&5
10611 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10612
10613 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10614 if test "${enable_wgetch_events+set}" = set; then
10615   enableval="$enable_wgetch_events"
10616   with_wgetch_events=$enableval
10617 else
10618   with_wgetch_events=no
10619 fi;
10620 echo "$as_me:10620: result: $with_wgetch_events" >&5
10621 echo "${ECHO_T}$with_wgetch_events" >&6
10622 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10623 #define NCURSES_WGETCH_EVENTS 1
10624 EOF
10625
10626 ###############################################################################
10627
10628 ###     use option --disable-echo to suppress full display compiling commands
10629 echo "$as_me:10629: checking if you want to display full commands during build" >&5
10630 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10631
10632 # Check whether --enable-echo or --disable-echo was given.
10633 if test "${enable_echo+set}" = set; then
10634   enableval="$enable_echo"
10635   with_echo=$enableval
10636 else
10637   with_echo=yes
10638 fi;
10639 if test "$with_echo" = yes; then
10640         ECHO_LINK=
10641 else
10642         ECHO_LINK='@ echo linking $@ ... ;'
10643         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10644         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10645 fi
10646 echo "$as_me:10646: result: $with_echo" >&5
10647 echo "${ECHO_T}$with_echo" >&6
10648
10649 ###     use option --enable-warnings to turn on all gcc warnings
10650 echo "$as_me:10650: checking if you want to see compiler warnings" >&5
10651 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10652
10653 # Check whether --enable-warnings or --disable-warnings was given.
10654 if test "${enable_warnings+set}" = set; then
10655   enableval="$enable_warnings"
10656   with_warnings=$enableval
10657 fi;
10658 echo "$as_me:10658: result: $with_warnings" >&5
10659 echo "${ECHO_T}$with_warnings" >&6
10660
10661 if test "x$with_warnings" = "xyes"; then
10662         ADAFLAGS="$ADAFLAGS -gnatg"
10663
10664 INTEL_COMPILER=no
10665
10666 if test "$GCC" = yes ; then
10667         case $host_os in
10668         linux*|gnu*)
10669                 echo "$as_me:10669: checking if this is really Intel C compiler" >&5
10670 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10671                 cf_save_CFLAGS="$CFLAGS"
10672                 CFLAGS="$CFLAGS -no-gcc"
10673                 cat >conftest.$ac_ext <<_ACEOF
10674 #line 10674 "configure"
10675 #include "confdefs.h"
10676
10677 int
10678 main ()
10679 {
10680
10681 #ifdef __INTEL_COMPILER
10682 #else
10683 make an error
10684 #endif
10685
10686   ;
10687   return 0;
10688 }
10689 _ACEOF
10690 rm -f conftest.$ac_objext
10691 if { (eval echo "$as_me:10691: \"$ac_compile\"") >&5
10692   (eval $ac_compile) 2>&5
10693   ac_status=$?
10694   echo "$as_me:10694: \$? = $ac_status" >&5
10695   (exit $ac_status); } &&
10696          { ac_try='test -s conftest.$ac_objext'
10697   { (eval echo "$as_me:10697: \"$ac_try\"") >&5
10698   (eval $ac_try) 2>&5
10699   ac_status=$?
10700   echo "$as_me:10700: \$? = $ac_status" >&5
10701   (exit $ac_status); }; }; then
10702   INTEL_COMPILER=yes
10703 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10704
10705 else
10706   echo "$as_me: failed program was:" >&5
10707 cat conftest.$ac_ext >&5
10708 fi
10709 rm -f conftest.$ac_objext conftest.$ac_ext
10710                 CFLAGS="$cf_save_CFLAGS"
10711                 echo "$as_me:10711: result: $INTEL_COMPILER" >&5
10712 echo "${ECHO_T}$INTEL_COMPILER" >&6
10713                 ;;
10714         esac
10715 fi
10716
10717 cat > conftest.$ac_ext <<EOF
10718 #line 10718 "${as_me-configure}"
10719 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10720 EOF
10721
10722 if test "$INTEL_COMPILER" = yes
10723 then
10724 # The "-wdXXX" options suppress warnings:
10725 # remark #1419: external declaration in primary source file
10726 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10727 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10728 # remark #193: zero used for undefined preprocessing identifier
10729 # remark #593: variable "curs_sb_left_arrow" was set but never used
10730 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10731 # remark #869: parameter "tw" was never referenced
10732 # remark #981: operands are evaluated in unspecified order
10733 # warning #279: controlling expression is constant
10734
10735         { echo "$as_me:10735: checking for $CC warning options..." >&5
10736 echo "$as_me: checking for $CC warning options..." >&6;}
10737         cf_save_CFLAGS="$CFLAGS"
10738         EXTRA_CFLAGS="-Wall"
10739         for cf_opt in \
10740                 wd1419 \
10741                 wd1683 \
10742                 wd1684 \
10743                 wd193 \
10744                 wd593 \
10745                 wd279 \
10746                 wd810 \
10747                 wd869 \
10748                 wd981
10749         do
10750                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10751                 if { (eval echo "$as_me:10751: \"$ac_compile\"") >&5
10752   (eval $ac_compile) 2>&5
10753   ac_status=$?
10754   echo "$as_me:10754: \$? = $ac_status" >&5
10755   (exit $ac_status); }; then
10756                         test -n "$verbose" && echo "$as_me:10756: result: ... -$cf_opt" >&5
10757 echo "${ECHO_T}... -$cf_opt" >&6
10758                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10759                 fi
10760         done
10761         CFLAGS="$cf_save_CFLAGS"
10762
10763 elif test "$GCC" = yes
10764 then
10765         { echo "$as_me:10765: checking for $CC warning options..." >&5
10766 echo "$as_me: checking for $CC warning options..." >&6;}
10767         cf_save_CFLAGS="$CFLAGS"
10768         EXTRA_CFLAGS="-W -Wall"
10769         cf_warn_CONST=""
10770         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10771         for cf_opt in \
10772                 Wbad-function-cast \
10773                 Wcast-align \
10774                 Wcast-qual \
10775                 Winline \
10776                 Wmissing-declarations \
10777                 Wmissing-prototypes \
10778                 Wnested-externs \
10779                 Wpointer-arith \
10780                 Wshadow \
10781                 Wstrict-prototypes \
10782                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10783         do
10784                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10785                 if { (eval echo "$as_me:10785: \"$ac_compile\"") >&5
10786   (eval $ac_compile) 2>&5
10787   ac_status=$?
10788   echo "$as_me:10788: \$? = $ac_status" >&5
10789   (exit $ac_status); }; then
10790                         test -n "$verbose" && echo "$as_me:10790: result: ... -$cf_opt" >&5
10791 echo "${ECHO_T}... -$cf_opt" >&6
10792                         case $cf_opt in #(vi
10793                         Wcast-qual) #(vi
10794                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10795                                 ;;
10796                         Winline) #(vi
10797                                 case $GCC_VERSION in
10798                                 [34].*)
10799                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10800
10801 echo "${as_me-configure}:10801: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10802
10803                                         continue;;
10804                                 esac
10805                                 ;;
10806                         esac
10807                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10808                 fi
10809         done
10810         CFLAGS="$cf_save_CFLAGS"
10811 fi
10812 rm -f conftest*
10813
10814         if test "$cf_with_cxx" = yes ; then
10815
10816 INTEL_CPLUSPLUS=no
10817
10818 if test "$GCC" = yes ; then
10819         case $host_os in
10820         linux*|gnu*)
10821                 echo "$as_me:10821: checking if this is really Intel C++ compiler" >&5
10822 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10823                 cf_save_CFLAGS="$CXXFLAGS"
10824                 CXXFLAGS="$CXXFLAGS -no-gcc"
10825                 cat >conftest.$ac_ext <<_ACEOF
10826 #line 10826 "configure"
10827 #include "confdefs.h"
10828
10829 int
10830 main ()
10831 {
10832
10833 #ifdef __INTEL_COMPILER
10834 #else
10835 make an error
10836 #endif
10837
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f conftest.$ac_objext
10843 if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5
10844   (eval $ac_compile) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit $ac_status); } &&
10848          { ac_try='test -s conftest.$ac_objext'
10849   { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit $ac_status); }; }; then
10854   INTEL_CPLUSPLUS=yes
10855 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10856
10857 else
10858   echo "$as_me: failed program was:" >&5
10859 cat conftest.$ac_ext >&5
10860 fi
10861 rm -f conftest.$ac_objext conftest.$ac_ext
10862                 CXXFLAGS="$cf_save_CFLAGS"
10863                 echo "$as_me:10863: result: $INTEL_CPLUSPLUS" >&5
10864 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
10865                 ;;
10866         esac
10867 fi
10868
10869 ac_ext=cc
10870 ac_cpp='$CXXCPP $CPPFLAGS'
10871 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10872 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10873 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
10874 ac_main_return=return
10875
10876 cat > conftest.$ac_ext <<EOF
10877 #line 10877 "configure"
10878 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10879 EOF
10880
10881 if test "$INTEL_CPLUSPLUS" = yes
10882 then
10883 # The "-wdXXX" options suppress warnings:
10884 # remark #1419: external declaration in primary source file
10885 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10886 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10887 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10888 # remark #193: zero used for undefined preprocessing identifier
10889 # remark #593: variable "curs_sb_left_arrow" was set but never used
10890 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10891 # remark #869: parameter "tw" was never referenced
10892 # remark #981: operands are evaluated in unspecified order
10893 # warning #269: invalid format string conversion
10894
10895         { echo "$as_me:10895: checking for $CC warning options..." >&5
10896 echo "$as_me: checking for $CC warning options..." >&6;}
10897         cf_save_CXXFLAGS="$CXXFLAGS"
10898         EXTRA_CXXFLAGS="-Wall"
10899         for cf_opt in \
10900                 wd1419 \
10901                 wd1682 \
10902                 wd1683 \
10903                 wd1684 \
10904                 wd193 \
10905                 wd279 \
10906                 wd593 \
10907                 wd810 \
10908                 wd869 \
10909                 wd981
10910         do
10911                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
10912                 if { (eval echo "$as_me:10912: \"$ac_compile\"") >&5
10913   (eval $ac_compile) 2>&5
10914   ac_status=$?
10915   echo "$as_me:10915: \$? = $ac_status" >&5
10916   (exit $ac_status); }; then
10917                         test -n "$verbose" && echo "$as_me:10917: result: ... -$cf_opt" >&5
10918 echo "${ECHO_T}... -$cf_opt" >&6
10919                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10920                 fi
10921         done
10922         CXXFLAGS="$cf_save_CXXFLAGS"
10923
10924 elif test "$GXX" = yes
10925 then
10926         { echo "$as_me:10926: checking for $CXX warning options..." >&5
10927 echo "$as_me: checking for $CXX warning options..." >&6;}
10928         cf_save_CXXFLAGS="$CXXFLAGS"
10929         EXTRA_CXXFLAGS="-W -Wall"
10930         cf_gxx_extra_warnings=""
10931         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
10932         case "$GCC_VERSION" in
10933         [1-2].*)
10934                 ;;
10935         *)
10936                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
10937                 ;;
10938         esac
10939         for cf_opt in \
10940                 Wabi \
10941                 fabi-version=0 \
10942                 Woverloaded-virtual \
10943                 Wsign-promo \
10944                 Wsynth \
10945                 Wold-style-cast \
10946                 Wcast-align \
10947                 Wcast-qual \
10948                 Wmissing-prototypes \
10949                 Wpointer-arith \
10950                 Wshadow \
10951                 Wstrict-prototypes \
10952                 Wundef $cf_gxx_extra_warnings Wno-unused
10953         do
10954                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
10955                 if { (eval echo "$as_me:10955: \"$ac_compile\"") >&5
10956   (eval $ac_compile) 2>&5
10957   ac_status=$?
10958   echo "$as_me:10958: \$? = $ac_status" >&5
10959   (exit $ac_status); }; then
10960                         test -n "$verbose" && echo "$as_me:10960: result: ... -$cf_opt" >&5
10961 echo "${ECHO_T}... -$cf_opt" >&6
10962                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
10963                 else
10964                         test -n "$verbose" && echo "$as_me:10964: result: ... no -$cf_opt" >&5
10965 echo "${ECHO_T}... no -$cf_opt" >&6
10966                 fi
10967         done
10968         CXXFLAGS="$cf_save_CXXFLAGS"
10969 fi
10970
10971 rm -f conftest*
10972 ac_ext=c
10973 ac_cpp='$CPP $CPPFLAGS'
10974 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
10975 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
10976 ac_compiler_gnu=$ac_cv_c_compiler_gnu
10977 ac_main_return=return
10978
10979         fi
10980 fi
10981
10982 if test "$GCC" = yes
10983 then
10984 cat > conftest.i <<EOF
10985 #ifndef GCC_PRINTF
10986 #define GCC_PRINTF 0
10987 #endif
10988 #ifndef GCC_SCANF
10989 #define GCC_SCANF 0
10990 #endif
10991 #ifndef GCC_NORETURN
10992 #define GCC_NORETURN /* nothing */
10993 #endif
10994 #ifndef GCC_UNUSED
10995 #define GCC_UNUSED /* nothing */
10996 #endif
10997 EOF
10998 if test "$GCC" = yes
10999 then
11000         { echo "$as_me:11000: checking for $CC __attribute__ directives..." >&5
11001 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11002 cat > conftest.$ac_ext <<EOF
11003 #line 11003 "${as_me-configure}"
11004 #include "confdefs.h"
11005 #include "conftest.h"
11006 #include "conftest.i"
11007 #if     GCC_PRINTF
11008 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11009 #else
11010 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11011 #endif
11012 #if     GCC_SCANF
11013 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11014 #else
11015 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11016 #endif
11017 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11018 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11019 extern void foo(void) GCC_NORETURN;
11020 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11021 EOF
11022         cf_printf_attribute=no
11023         cf_scanf_attribute=no
11024         for cf_attribute in scanf printf unused noreturn
11025         do
11026
11027 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11028
11029                 cf_directive="__attribute__(($cf_attribute))"
11030                 echo "checking for $CC $cf_directive" 1>&5
11031
11032                 case $cf_attribute in #(vi
11033                 printf) #(vi
11034                         cf_printf_attribute=yes
11035                         cat >conftest.h <<EOF
11036 #define GCC_$cf_ATTRIBUTE 1
11037 EOF
11038                         ;;
11039                 scanf) #(vi
11040                         cf_scanf_attribute=yes
11041                         cat >conftest.h <<EOF
11042 #define GCC_$cf_ATTRIBUTE 1
11043 EOF
11044                         ;;
11045                 *) #(vi
11046                         cat >conftest.h <<EOF
11047 #define GCC_$cf_ATTRIBUTE $cf_directive
11048 EOF
11049                         ;;
11050                 esac
11051
11052                 if { (eval echo "$as_me:11052: \"$ac_compile\"") >&5
11053   (eval $ac_compile) 2>&5
11054   ac_status=$?
11055   echo "$as_me:11055: \$? = $ac_status" >&5
11056   (exit $ac_status); }; then
11057                         test -n "$verbose" && echo "$as_me:11057: result: ... $cf_attribute" >&5
11058 echo "${ECHO_T}... $cf_attribute" >&6
11059                         cat conftest.h >>confdefs.h
11060                         case $cf_attribute in #(vi
11061                         printf) #(vi
11062                                 if test "$cf_printf_attribute" = no ; then
11063                                         cat >>confdefs.h <<EOF
11064 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11065 EOF
11066                                 else
11067                                         cat >>confdefs.h <<EOF
11068 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11069 EOF
11070                                 fi
11071                                 ;;
11072                         scanf) #(vi
11073                                 if test "$cf_scanf_attribute" = no ; then
11074                                         cat >>confdefs.h <<EOF
11075 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11076 EOF
11077                                 else
11078                                         cat >>confdefs.h <<EOF
11079 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11080 EOF
11081                                 fi
11082                                 ;;
11083                         esac
11084                 fi
11085         done
11086 else
11087         fgrep define conftest.i >>confdefs.h
11088 fi
11089 rm -rf conftest*
11090 fi
11091
11092 ###     use option --enable-assertions to turn on generation of assertion code
11093 echo "$as_me:11093: checking if you want to enable runtime assertions" >&5
11094 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11095
11096 # Check whether --enable-assertions or --disable-assertions was given.
11097 if test "${enable_assertions+set}" = set; then
11098   enableval="$enable_assertions"
11099   with_assertions=$enableval
11100 else
11101   with_assertions=no
11102 fi;
11103 echo "$as_me:11103: result: $with_assertions" >&5
11104 echo "${ECHO_T}$with_assertions" >&6
11105 if test -n "$GCC"
11106 then
11107         if test "$with_assertions" = no
11108         then
11109                 cat >>confdefs.h <<\EOF
11110 #define NDEBUG 1
11111 EOF
11112
11113                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11114         else
11115                 ADAFLAGS="$ADAFLAGS -gnata"
11116         fi
11117 fi
11118
11119 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11120
11121 echo "$as_me:11121: checking if you want to use dmalloc for testing" >&5
11122 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11123
11124 # Check whether --with-dmalloc or --without-dmalloc was given.
11125 if test "${with_dmalloc+set}" = set; then
11126   withval="$with_dmalloc"
11127   cat >>confdefs.h <<\EOF
11128 #define USE_DMALLOC 1
11129 EOF
11130
11131         : ${with_cflags:=-g}
11132         : ${with_no_leaks:=yes}
11133          with_dmalloc=yes
11134 else
11135   with_dmalloc=
11136 fi;
11137 echo "$as_me:11137: result: ${with_dmalloc:-no}" >&5
11138 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11139
11140 case .$with_cflags in #(vi
11141 .*-g*)
11142         case .$CFLAGS in #(vi
11143         .*-g*) #(vi
11144                 ;;
11145         *)
11146
11147 cf_fix_cppflags=no
11148 cf_new_cflags=
11149 cf_new_cppflags=
11150 cf_new_extra_cppflags=
11151
11152 for cf_add_cflags in -g
11153 do
11154 case $cf_fix_cppflags in
11155 no)
11156         case $cf_add_cflags in #(vi
11157         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11158                 case $cf_add_cflags in
11159                 -D*)
11160                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11161
11162                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11163                                 && test -z "${cf_tst_cflags}" \
11164                                 && cf_fix_cppflags=yes
11165
11166                         if test $cf_fix_cppflags = yes ; then
11167                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11168                                 continue
11169                         elif test "${cf_tst_cflags}" = "\"'" ; then
11170                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11171                                 continue
11172                         fi
11173                         ;;
11174                 esac
11175                 case "$CPPFLAGS" in
11176                 *$cf_add_cflags) #(vi
11177                         ;;
11178                 *) #(vi
11179                         case $cf_add_cflags in #(vi
11180                         -D*)
11181                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11182
11183 CPPFLAGS=`echo "$CPPFLAGS" | \
11184         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11185                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11186
11187                                 ;;
11188                         esac
11189                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11190                         ;;
11191                 esac
11192                 ;;
11193         *)
11194                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11195                 ;;
11196         esac
11197         ;;
11198 yes)
11199         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11200
11201         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11202
11203         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11204                 && test -z "${cf_tst_cflags}" \
11205                 && cf_fix_cppflags=no
11206         ;;
11207 esac
11208 done
11209
11210 if test -n "$cf_new_cflags" ; then
11211
11212         CFLAGS="$CFLAGS $cf_new_cflags"
11213 fi
11214
11215 if test -n "$cf_new_cppflags" ; then
11216
11217         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11218 fi
11219
11220 if test -n "$cf_new_extra_cppflags" ; then
11221
11222         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11223 fi
11224
11225                 ;;
11226         esac
11227         ;;
11228 esac
11229
11230 if test "$with_dmalloc" = yes ; then
11231         echo "$as_me:11231: checking for dmalloc.h" >&5
11232 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11233 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11234   echo $ECHO_N "(cached) $ECHO_C" >&6
11235 else
11236   cat >conftest.$ac_ext <<_ACEOF
11237 #line 11237 "configure"
11238 #include "confdefs.h"
11239 #include <dmalloc.h>
11240 _ACEOF
11241 if { (eval echo "$as_me:11241: \"$ac_cpp conftest.$ac_ext\"") >&5
11242   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11243   ac_status=$?
11244   egrep -v '^ *\+' conftest.er1 >conftest.err
11245   rm -f conftest.er1
11246   cat conftest.err >&5
11247   echo "$as_me:11247: \$? = $ac_status" >&5
11248   (exit $ac_status); } >/dev/null; then
11249   if test -s conftest.err; then
11250     ac_cpp_err=$ac_c_preproc_warn_flag
11251   else
11252     ac_cpp_err=
11253   fi
11254 else
11255   ac_cpp_err=yes
11256 fi
11257 if test -z "$ac_cpp_err"; then
11258   ac_cv_header_dmalloc_h=yes
11259 else
11260   echo "$as_me: failed program was:" >&5
11261   cat conftest.$ac_ext >&5
11262   ac_cv_header_dmalloc_h=no
11263 fi
11264 rm -f conftest.err conftest.$ac_ext
11265 fi
11266 echo "$as_me:11266: result: $ac_cv_header_dmalloc_h" >&5
11267 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11268 if test $ac_cv_header_dmalloc_h = yes; then
11269
11270 echo "$as_me:11270: checking for dmalloc_debug in -ldmalloc" >&5
11271 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11272 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11273   echo $ECHO_N "(cached) $ECHO_C" >&6
11274 else
11275   ac_check_lib_save_LIBS=$LIBS
11276 LIBS="-ldmalloc  $LIBS"
11277 cat >conftest.$ac_ext <<_ACEOF
11278 #line 11278 "configure"
11279 #include "confdefs.h"
11280
11281 /* Override any gcc2 internal prototype to avoid an error.  */
11282 #ifdef __cplusplus
11283 extern "C"
11284 #endif
11285 /* We use char because int might match the return type of a gcc2
11286    builtin and then its argument prototype would still apply.  */
11287 char dmalloc_debug ();
11288 int
11289 main ()
11290 {
11291 dmalloc_debug ();
11292   ;
11293   return 0;
11294 }
11295 _ACEOF
11296 rm -f conftest.$ac_objext conftest$ac_exeext
11297 if { (eval echo "$as_me:11297: \"$ac_link\"") >&5
11298   (eval $ac_link) 2>&5
11299   ac_status=$?
11300   echo "$as_me:11300: \$? = $ac_status" >&5
11301   (exit $ac_status); } &&
11302          { ac_try='test -s conftest$ac_exeext'
11303   { (eval echo "$as_me:11303: \"$ac_try\"") >&5
11304   (eval $ac_try) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit $ac_status); }; }; then
11308   ac_cv_lib_dmalloc_dmalloc_debug=yes
11309 else
11310   echo "$as_me: failed program was:" >&5
11311 cat conftest.$ac_ext >&5
11312 ac_cv_lib_dmalloc_dmalloc_debug=no
11313 fi
11314 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11315 LIBS=$ac_check_lib_save_LIBS
11316 fi
11317 echo "$as_me:11317: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11318 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11319 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11320   cat >>confdefs.h <<EOF
11321 #define HAVE_LIBDMALLOC 1
11322 EOF
11323
11324   LIBS="-ldmalloc $LIBS"
11325
11326 fi
11327
11328 fi
11329
11330 fi
11331
11332 echo "$as_me:11332: checking if you want to use dbmalloc for testing" >&5
11333 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11334
11335 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11336 if test "${with_dbmalloc+set}" = set; then
11337   withval="$with_dbmalloc"
11338   cat >>confdefs.h <<\EOF
11339 #define USE_DBMALLOC 1
11340 EOF
11341
11342         : ${with_cflags:=-g}
11343         : ${with_no_leaks:=yes}
11344          with_dbmalloc=yes
11345 else
11346   with_dbmalloc=
11347 fi;
11348 echo "$as_me:11348: result: ${with_dbmalloc:-no}" >&5
11349 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11350
11351 case .$with_cflags in #(vi
11352 .*-g*)
11353         case .$CFLAGS in #(vi
11354         .*-g*) #(vi
11355                 ;;
11356         *)
11357
11358 cf_fix_cppflags=no
11359 cf_new_cflags=
11360 cf_new_cppflags=
11361 cf_new_extra_cppflags=
11362
11363 for cf_add_cflags in -g
11364 do
11365 case $cf_fix_cppflags in
11366 no)
11367         case $cf_add_cflags in #(vi
11368         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11369                 case $cf_add_cflags in
11370                 -D*)
11371                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11372
11373                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11374                                 && test -z "${cf_tst_cflags}" \
11375                                 && cf_fix_cppflags=yes
11376
11377                         if test $cf_fix_cppflags = yes ; then
11378                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11379                                 continue
11380                         elif test "${cf_tst_cflags}" = "\"'" ; then
11381                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11382                                 continue
11383                         fi
11384                         ;;
11385                 esac
11386                 case "$CPPFLAGS" in
11387                 *$cf_add_cflags) #(vi
11388                         ;;
11389                 *) #(vi
11390                         case $cf_add_cflags in #(vi
11391                         -D*)
11392                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11393
11394 CPPFLAGS=`echo "$CPPFLAGS" | \
11395         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11396                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11397
11398                                 ;;
11399                         esac
11400                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11401                         ;;
11402                 esac
11403                 ;;
11404         *)
11405                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11406                 ;;
11407         esac
11408         ;;
11409 yes)
11410         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11411
11412         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11413
11414         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11415                 && test -z "${cf_tst_cflags}" \
11416                 && cf_fix_cppflags=no
11417         ;;
11418 esac
11419 done
11420
11421 if test -n "$cf_new_cflags" ; then
11422
11423         CFLAGS="$CFLAGS $cf_new_cflags"
11424 fi
11425
11426 if test -n "$cf_new_cppflags" ; then
11427
11428         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11429 fi
11430
11431 if test -n "$cf_new_extra_cppflags" ; then
11432
11433         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11434 fi
11435
11436                 ;;
11437         esac
11438         ;;
11439 esac
11440
11441 if test "$with_dbmalloc" = yes ; then
11442         echo "$as_me:11442: checking for dbmalloc.h" >&5
11443 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11444 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11445   echo $ECHO_N "(cached) $ECHO_C" >&6
11446 else
11447   cat >conftest.$ac_ext <<_ACEOF
11448 #line 11448 "configure"
11449 #include "confdefs.h"
11450 #include <dbmalloc.h>
11451 _ACEOF
11452 if { (eval echo "$as_me:11452: \"$ac_cpp conftest.$ac_ext\"") >&5
11453   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11454   ac_status=$?
11455   egrep -v '^ *\+' conftest.er1 >conftest.err
11456   rm -f conftest.er1
11457   cat conftest.err >&5
11458   echo "$as_me:11458: \$? = $ac_status" >&5
11459   (exit $ac_status); } >/dev/null; then
11460   if test -s conftest.err; then
11461     ac_cpp_err=$ac_c_preproc_warn_flag
11462   else
11463     ac_cpp_err=
11464   fi
11465 else
11466   ac_cpp_err=yes
11467 fi
11468 if test -z "$ac_cpp_err"; then
11469   ac_cv_header_dbmalloc_h=yes
11470 else
11471   echo "$as_me: failed program was:" >&5
11472   cat conftest.$ac_ext >&5
11473   ac_cv_header_dbmalloc_h=no
11474 fi
11475 rm -f conftest.err conftest.$ac_ext
11476 fi
11477 echo "$as_me:11477: result: $ac_cv_header_dbmalloc_h" >&5
11478 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11479 if test $ac_cv_header_dbmalloc_h = yes; then
11480
11481 echo "$as_me:11481: checking for debug_malloc in -ldbmalloc" >&5
11482 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11483 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11484   echo $ECHO_N "(cached) $ECHO_C" >&6
11485 else
11486   ac_check_lib_save_LIBS=$LIBS
11487 LIBS="-ldbmalloc  $LIBS"
11488 cat >conftest.$ac_ext <<_ACEOF
11489 #line 11489 "configure"
11490 #include "confdefs.h"
11491
11492 /* Override any gcc2 internal prototype to avoid an error.  */
11493 #ifdef __cplusplus
11494 extern "C"
11495 #endif
11496 /* We use char because int might match the return type of a gcc2
11497    builtin and then its argument prototype would still apply.  */
11498 char debug_malloc ();
11499 int
11500 main ()
11501 {
11502 debug_malloc ();
11503   ;
11504   return 0;
11505 }
11506 _ACEOF
11507 rm -f conftest.$ac_objext conftest$ac_exeext
11508 if { (eval echo "$as_me:11508: \"$ac_link\"") >&5
11509   (eval $ac_link) 2>&5
11510   ac_status=$?
11511   echo "$as_me:11511: \$? = $ac_status" >&5
11512   (exit $ac_status); } &&
11513          { ac_try='test -s conftest$ac_exeext'
11514   { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515   (eval $ac_try) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit $ac_status); }; }; then
11519   ac_cv_lib_dbmalloc_debug_malloc=yes
11520 else
11521   echo "$as_me: failed program was:" >&5
11522 cat conftest.$ac_ext >&5
11523 ac_cv_lib_dbmalloc_debug_malloc=no
11524 fi
11525 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11526 LIBS=$ac_check_lib_save_LIBS
11527 fi
11528 echo "$as_me:11528: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11529 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11530 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11531   cat >>confdefs.h <<EOF
11532 #define HAVE_LIBDBMALLOC 1
11533 EOF
11534
11535   LIBS="-ldbmalloc $LIBS"
11536
11537 fi
11538
11539 fi
11540
11541 fi
11542
11543 echo "$as_me:11543: checking if you want to use valgrind for testing" >&5
11544 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11545
11546 # Check whether --with-valgrind or --without-valgrind was given.
11547 if test "${with_valgrind+set}" = set; then
11548   withval="$with_valgrind"
11549   cat >>confdefs.h <<\EOF
11550 #define USE_VALGRIND 1
11551 EOF
11552
11553         : ${with_cflags:=-g}
11554         : ${with_no_leaks:=yes}
11555          with_valgrind=yes
11556 else
11557   with_valgrind=
11558 fi;
11559 echo "$as_me:11559: result: ${with_valgrind:-no}" >&5
11560 echo "${ECHO_T}${with_valgrind:-no}" >&6
11561
11562 case .$with_cflags in #(vi
11563 .*-g*)
11564         case .$CFLAGS in #(vi
11565         .*-g*) #(vi
11566                 ;;
11567         *)
11568
11569 cf_fix_cppflags=no
11570 cf_new_cflags=
11571 cf_new_cppflags=
11572 cf_new_extra_cppflags=
11573
11574 for cf_add_cflags in -g
11575 do
11576 case $cf_fix_cppflags in
11577 no)
11578         case $cf_add_cflags in #(vi
11579         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11580                 case $cf_add_cflags in
11581                 -D*)
11582                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11583
11584                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11585                                 && test -z "${cf_tst_cflags}" \
11586                                 && cf_fix_cppflags=yes
11587
11588                         if test $cf_fix_cppflags = yes ; then
11589                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11590                                 continue
11591                         elif test "${cf_tst_cflags}" = "\"'" ; then
11592                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11593                                 continue
11594                         fi
11595                         ;;
11596                 esac
11597                 case "$CPPFLAGS" in
11598                 *$cf_add_cflags) #(vi
11599                         ;;
11600                 *) #(vi
11601                         case $cf_add_cflags in #(vi
11602                         -D*)
11603                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11604
11605 CPPFLAGS=`echo "$CPPFLAGS" | \
11606         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11607                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11608
11609                                 ;;
11610                         esac
11611                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11612                         ;;
11613                 esac
11614                 ;;
11615         *)
11616                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11617                 ;;
11618         esac
11619         ;;
11620 yes)
11621         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11622
11623         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11624
11625         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11626                 && test -z "${cf_tst_cflags}" \
11627                 && cf_fix_cppflags=no
11628         ;;
11629 esac
11630 done
11631
11632 if test -n "$cf_new_cflags" ; then
11633
11634         CFLAGS="$CFLAGS $cf_new_cflags"
11635 fi
11636
11637 if test -n "$cf_new_cppflags" ; then
11638
11639         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11640 fi
11641
11642 if test -n "$cf_new_extra_cppflags" ; then
11643
11644         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11645 fi
11646
11647                 ;;
11648         esac
11649         ;;
11650 esac
11651
11652 echo "$as_me:11652: checking if you want to perform memory-leak testing" >&5
11653 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11654
11655 # Check whether --enable-leaks or --disable-leaks was given.
11656 if test "${enable_leaks+set}" = set; then
11657   enableval="$enable_leaks"
11658   with_no_leaks=yes
11659 else
11660   : ${with_no_leaks:=no}
11661 fi;
11662 echo "$as_me:11662: result: $with_no_leaks" >&5
11663 echo "${ECHO_T}$with_no_leaks" >&6
11664
11665 if test "$with_no_leaks" = yes ; then
11666         cat >>confdefs.h <<\EOF
11667 #define NO_LEAKS 1
11668 EOF
11669
11670 fi
11671
11672 cat >>confdefs.h <<\EOF
11673 #define HAVE_NC_ALLOC_H 1
11674 EOF
11675
11676 ###     use option --enable-expanded to generate certain macros as functions
11677
11678 # Check whether --enable-expanded or --disable-expanded was given.
11679 if test "${enable_expanded+set}" = set; then
11680   enableval="$enable_expanded"
11681   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11682 #define NCURSES_EXPANDED 1
11683 EOF
11684
11685 fi;
11686
11687 ###     use option --disable-macros to suppress macros in favor of functions
11688
11689 # Check whether --enable-macros or --disable-macros was given.
11690 if test "${enable_macros+set}" = set; then
11691   enableval="$enable_macros"
11692   test "$enableval" = no && cat >>confdefs.h <<\EOF
11693 #define NCURSES_NOMACROS 1
11694 EOF
11695
11696 fi;
11697
11698 # Normally we only add trace() to the debug-library.  Allow this to be
11699 # extended to all models of the ncurses library:
11700 cf_all_traces=no
11701 case "$CFLAGS $CPPFLAGS" in
11702 *-DTRACE*)
11703         cf_all_traces=yes
11704         ;;
11705 esac
11706
11707 echo "$as_me:11707: checking whether to add trace feature to all models" >&5
11708 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11709
11710 # Check whether --with-trace or --without-trace was given.
11711 if test "${with_trace+set}" = set; then
11712   withval="$with_trace"
11713   cf_with_trace=$withval
11714 else
11715   cf_with_trace=$cf_all_traces
11716 fi;
11717 echo "$as_me:11717: result: $cf_with_trace" >&5
11718 echo "${ECHO_T}$cf_with_trace" >&6
11719
11720 if test "$cf_with_trace" = yes ; then
11721         LIB_TRACING=all
11722         ADA_TRACE=TRUE
11723
11724 cf_fix_cppflags=no
11725 cf_new_cflags=
11726 cf_new_cppflags=
11727 cf_new_extra_cppflags=
11728
11729 for cf_add_cflags in -DTRACE
11730 do
11731 case $cf_fix_cppflags in
11732 no)
11733         case $cf_add_cflags in #(vi
11734         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11735                 case $cf_add_cflags in
11736                 -D*)
11737                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11738
11739                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11740                                 && test -z "${cf_tst_cflags}" \
11741                                 && cf_fix_cppflags=yes
11742
11743                         if test $cf_fix_cppflags = yes ; then
11744                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11745                                 continue
11746                         elif test "${cf_tst_cflags}" = "\"'" ; then
11747                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11748                                 continue
11749                         fi
11750                         ;;
11751                 esac
11752                 case "$CPPFLAGS" in
11753                 *$cf_add_cflags) #(vi
11754                         ;;
11755                 *) #(vi
11756                         case $cf_add_cflags in #(vi
11757                         -D*)
11758                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11759
11760 CPPFLAGS=`echo "$CPPFLAGS" | \
11761         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11762                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11763
11764                                 ;;
11765                         esac
11766                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11767                         ;;
11768                 esac
11769                 ;;
11770         *)
11771                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11772                 ;;
11773         esac
11774         ;;
11775 yes)
11776         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11777
11778         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11779
11780         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11781                 && test -z "${cf_tst_cflags}" \
11782                 && cf_fix_cppflags=no
11783         ;;
11784 esac
11785 done
11786
11787 if test -n "$cf_new_cflags" ; then
11788
11789         CFLAGS="$CFLAGS $cf_new_cflags"
11790 fi
11791
11792 if test -n "$cf_new_cppflags" ; then
11793
11794         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11795 fi
11796
11797 if test -n "$cf_new_extra_cppflags" ; then
11798
11799         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11800 fi
11801
11802 else
11803         LIB_TRACING=DEBUG
11804         ADA_TRACE=FALSE
11805 fi
11806
11807 ###     Checks for libraries.
11808 case $cf_cv_system_name in #(vi
11809 *mingw32*) #(vi
11810         ;;
11811 *)
11812 echo "$as_me:11812: checking for gettimeofday" >&5
11813 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11814 if test "${ac_cv_func_gettimeofday+set}" = set; then
11815   echo $ECHO_N "(cached) $ECHO_C" >&6
11816 else
11817   cat >conftest.$ac_ext <<_ACEOF
11818 #line 11818 "configure"
11819 #include "confdefs.h"
11820 /* System header to define __stub macros and hopefully few prototypes,
11821     which can conflict with char gettimeofday (); below.  */
11822 #include <assert.h>
11823 /* Override any gcc2 internal prototype to avoid an error.  */
11824 #ifdef __cplusplus
11825 extern "C"
11826 #endif
11827 /* We use char because int might match the return type of a gcc2
11828    builtin and then its argument prototype would still apply.  */
11829 char gettimeofday ();
11830 char (*f) ();
11831
11832 int
11833 main ()
11834 {
11835 /* The GNU C library defines this for functions which it implements
11836     to always fail with ENOSYS.  Some functions are actually named
11837     something starting with __ and the normal name is an alias.  */
11838 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11839 choke me
11840 #else
11841 f = gettimeofday;
11842 #endif
11843
11844   ;
11845   return 0;
11846 }
11847 _ACEOF
11848 rm -f conftest.$ac_objext conftest$ac_exeext
11849 if { (eval echo "$as_me:11849: \"$ac_link\"") >&5
11850   (eval $ac_link) 2>&5
11851   ac_status=$?
11852   echo "$as_me:11852: \$? = $ac_status" >&5
11853   (exit $ac_status); } &&
11854          { ac_try='test -s conftest$ac_exeext'
11855   { (eval echo "$as_me:11855: \"$ac_try\"") >&5
11856   (eval $ac_try) 2>&5
11857   ac_status=$?
11858   echo "$as_me:11858: \$? = $ac_status" >&5
11859   (exit $ac_status); }; }; then
11860   ac_cv_func_gettimeofday=yes
11861 else
11862   echo "$as_me: failed program was:" >&5
11863 cat conftest.$ac_ext >&5
11864 ac_cv_func_gettimeofday=no
11865 fi
11866 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11867 fi
11868 echo "$as_me:11868: result: $ac_cv_func_gettimeofday" >&5
11869 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
11870 if test $ac_cv_func_gettimeofday = yes; then
11871   cat >>confdefs.h <<\EOF
11872 #define HAVE_GETTIMEOFDAY 1
11873 EOF
11874
11875 else
11876
11877 echo "$as_me:11877: checking for gettimeofday in -lbsd" >&5
11878 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
11879 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
11880   echo $ECHO_N "(cached) $ECHO_C" >&6
11881 else
11882   ac_check_lib_save_LIBS=$LIBS
11883 LIBS="-lbsd  $LIBS"
11884 cat >conftest.$ac_ext <<_ACEOF
11885 #line 11885 "configure"
11886 #include "confdefs.h"
11887
11888 /* Override any gcc2 internal prototype to avoid an error.  */
11889 #ifdef __cplusplus
11890 extern "C"
11891 #endif
11892 /* We use char because int might match the return type of a gcc2
11893    builtin and then its argument prototype would still apply.  */
11894 char gettimeofday ();
11895 int
11896 main ()
11897 {
11898 gettimeofday ();
11899   ;
11900   return 0;
11901 }
11902 _ACEOF
11903 rm -f conftest.$ac_objext conftest$ac_exeext
11904 if { (eval echo "$as_me:11904: \"$ac_link\"") >&5
11905   (eval $ac_link) 2>&5
11906   ac_status=$?
11907   echo "$as_me:11907: \$? = $ac_status" >&5
11908   (exit $ac_status); } &&
11909          { ac_try='test -s conftest$ac_exeext'
11910   { (eval echo "$as_me:11910: \"$ac_try\"") >&5
11911   (eval $ac_try) 2>&5
11912   ac_status=$?
11913   echo "$as_me:11913: \$? = $ac_status" >&5
11914   (exit $ac_status); }; }; then
11915   ac_cv_lib_bsd_gettimeofday=yes
11916 else
11917   echo "$as_me: failed program was:" >&5
11918 cat conftest.$ac_ext >&5
11919 ac_cv_lib_bsd_gettimeofday=no
11920 fi
11921 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11922 LIBS=$ac_check_lib_save_LIBS
11923 fi
11924 echo "$as_me:11924: result: $ac_cv_lib_bsd_gettimeofday" >&5
11925 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
11926 if test $ac_cv_lib_bsd_gettimeofday = yes; then
11927   cat >>confdefs.h <<\EOF
11928 #define HAVE_GETTIMEOFDAY 1
11929 EOF
11930
11931         LIBS="$LIBS -lbsd"
11932 fi
11933
11934 fi
11935         ;;
11936 esac
11937
11938 echo "$as_me:11938: checking if -lm needed for math functions" >&5
11939 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
11940 if test "${cf_cv_need_libm+set}" = set; then
11941   echo $ECHO_N "(cached) $ECHO_C" >&6
11942 else
11943
11944         cat >conftest.$ac_ext <<_ACEOF
11945 #line 11945 "configure"
11946 #include "confdefs.h"
11947
11948         #include <stdio.h>
11949         #include <math.h>
11950
11951 int
11952 main ()
11953 {
11954 double x = rand(); printf("result = %g\n", sin(x))
11955   ;
11956   return 0;
11957 }
11958 _ACEOF
11959 rm -f conftest.$ac_objext conftest$ac_exeext
11960 if { (eval echo "$as_me:11960: \"$ac_link\"") >&5
11961   (eval $ac_link) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit $ac_status); } &&
11965          { ac_try='test -s conftest$ac_exeext'
11966   { (eval echo "$as_me:11966: \"$ac_try\"") >&5
11967   (eval $ac_try) 2>&5
11968   ac_status=$?
11969   echo "$as_me:11969: \$? = $ac_status" >&5
11970   (exit $ac_status); }; }; then
11971   cf_cv_need_libm=no
11972 else
11973   echo "$as_me: failed program was:" >&5
11974 cat conftest.$ac_ext >&5
11975 cf_cv_need_libm=yes
11976 fi
11977 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11978 fi
11979 echo "$as_me:11979: result: $cf_cv_need_libm" >&5
11980 echo "${ECHO_T}$cf_cv_need_libm" >&6
11981 if test "$cf_cv_need_libm" = yes
11982 then
11983 MATH_LIB=-lm
11984 fi
11985
11986 ###     Checks for header files.
11987 echo "$as_me:11987: checking for ANSI C header files" >&5
11988 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
11989 if test "${ac_cv_header_stdc+set}" = set; then
11990   echo $ECHO_N "(cached) $ECHO_C" >&6
11991 else
11992   cat >conftest.$ac_ext <<_ACEOF
11993 #line 11993 "configure"
11994 #include "confdefs.h"
11995 #include <stdlib.h>
11996 #include <stdarg.h>
11997 #include <string.h>
11998 #include <float.h>
11999
12000 _ACEOF
12001 if { (eval echo "$as_me:12001: \"$ac_cpp conftest.$ac_ext\"") >&5
12002   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12003   ac_status=$?
12004   egrep -v '^ *\+' conftest.er1 >conftest.err
12005   rm -f conftest.er1
12006   cat conftest.err >&5
12007   echo "$as_me:12007: \$? = $ac_status" >&5
12008   (exit $ac_status); } >/dev/null; then
12009   if test -s conftest.err; then
12010     ac_cpp_err=$ac_c_preproc_warn_flag
12011   else
12012     ac_cpp_err=
12013   fi
12014 else
12015   ac_cpp_err=yes
12016 fi
12017 if test -z "$ac_cpp_err"; then
12018   ac_cv_header_stdc=yes
12019 else
12020   echo "$as_me: failed program was:" >&5
12021   cat conftest.$ac_ext >&5
12022   ac_cv_header_stdc=no
12023 fi
12024 rm -f conftest.err conftest.$ac_ext
12025
12026 if test $ac_cv_header_stdc = yes; then
12027   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12028   cat >conftest.$ac_ext <<_ACEOF
12029 #line 12029 "configure"
12030 #include "confdefs.h"
12031 #include <string.h>
12032
12033 _ACEOF
12034 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12035   egrep "memchr" >/dev/null 2>&1; then
12036   :
12037 else
12038   ac_cv_header_stdc=no
12039 fi
12040 rm -f conftest*
12041
12042 fi
12043
12044 if test $ac_cv_header_stdc = yes; then
12045   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12046   cat >conftest.$ac_ext <<_ACEOF
12047 #line 12047 "configure"
12048 #include "confdefs.h"
12049 #include <stdlib.h>
12050
12051 _ACEOF
12052 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12053   egrep "free" >/dev/null 2>&1; then
12054   :
12055 else
12056   ac_cv_header_stdc=no
12057 fi
12058 rm -f conftest*
12059
12060 fi
12061
12062 if test $ac_cv_header_stdc = yes; then
12063   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12064   if test "$cross_compiling" = yes; then
12065   :
12066 else
12067   cat >conftest.$ac_ext <<_ACEOF
12068 #line 12068 "configure"
12069 #include "confdefs.h"
12070 #include <ctype.h>
12071 #if ((' ' & 0x0FF) == 0x020)
12072 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12073 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12074 #else
12075 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12076                      || ('j' <= (c) && (c) <= 'r') \
12077                      || ('s' <= (c) && (c) <= 'z'))
12078 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12079 #endif
12080
12081 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12082 int
12083 main ()
12084 {
12085   int i;
12086   for (i = 0; i < 256; i++)
12087     if (XOR (islower (i), ISLOWER (i))
12088         || toupper (i) != TOUPPER (i))
12089       $ac_main_return(2);
12090   $ac_main_return (0);
12091 }
12092 _ACEOF
12093 rm -f conftest$ac_exeext
12094 if { (eval echo "$as_me:12094: \"$ac_link\"") >&5
12095   (eval $ac_link) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12099   { (eval echo "$as_me:12099: \"$ac_try\"") >&5
12100   (eval $ac_try) 2>&5
12101   ac_status=$?
12102   echo "$as_me:12102: \$? = $ac_status" >&5
12103   (exit $ac_status); }; }; then
12104   :
12105 else
12106   echo "$as_me: program exited with status $ac_status" >&5
12107 echo "$as_me: failed program was:" >&5
12108 cat conftest.$ac_ext >&5
12109 ac_cv_header_stdc=no
12110 fi
12111 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12112 fi
12113 fi
12114 fi
12115 echo "$as_me:12115: result: $ac_cv_header_stdc" >&5
12116 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12117 if test $ac_cv_header_stdc = yes; then
12118
12119 cat >>confdefs.h <<\EOF
12120 #define STDC_HEADERS 1
12121 EOF
12122
12123 fi
12124
12125 ac_header_dirent=no
12126 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12127   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12128 echo "$as_me:12128: checking for $ac_hdr that defines DIR" >&5
12129 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12130 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12131   echo $ECHO_N "(cached) $ECHO_C" >&6
12132 else
12133   cat >conftest.$ac_ext <<_ACEOF
12134 #line 12134 "configure"
12135 #include "confdefs.h"
12136 #include <sys/types.h>
12137 #include <$ac_hdr>
12138
12139 int
12140 main ()
12141 {
12142 if ((DIR *) 0)
12143 return 0;
12144   ;
12145   return 0;
12146 }
12147 _ACEOF
12148 rm -f conftest.$ac_objext
12149 if { (eval echo "$as_me:12149: \"$ac_compile\"") >&5
12150   (eval $ac_compile) 2>&5
12151   ac_status=$?
12152   echo "$as_me:12152: \$? = $ac_status" >&5
12153   (exit $ac_status); } &&
12154          { ac_try='test -s conftest.$ac_objext'
12155   { (eval echo "$as_me:12155: \"$ac_try\"") >&5
12156   (eval $ac_try) 2>&5
12157   ac_status=$?
12158   echo "$as_me:12158: \$? = $ac_status" >&5
12159   (exit $ac_status); }; }; then
12160   eval "$as_ac_Header=yes"
12161 else
12162   echo "$as_me: failed program was:" >&5
12163 cat conftest.$ac_ext >&5
12164 eval "$as_ac_Header=no"
12165 fi
12166 rm -f conftest.$ac_objext conftest.$ac_ext
12167 fi
12168 echo "$as_me:12168: result: `eval echo '${'$as_ac_Header'}'`" >&5
12169 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12170 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12171   cat >>confdefs.h <<EOF
12172 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12173 EOF
12174
12175 ac_header_dirent=$ac_hdr; break
12176 fi
12177
12178 done
12179 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12180 if test $ac_header_dirent = dirent.h; then
12181   echo "$as_me:12181: checking for opendir in -ldir" >&5
12182 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12183 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12184   echo $ECHO_N "(cached) $ECHO_C" >&6
12185 else
12186   ac_check_lib_save_LIBS=$LIBS
12187 LIBS="-ldir  $LIBS"
12188 cat >conftest.$ac_ext <<_ACEOF
12189 #line 12189 "configure"
12190 #include "confdefs.h"
12191
12192 /* Override any gcc2 internal prototype to avoid an error.  */
12193 #ifdef __cplusplus
12194 extern "C"
12195 #endif
12196 /* We use char because int might match the return type of a gcc2
12197    builtin and then its argument prototype would still apply.  */
12198 char opendir ();
12199 int
12200 main ()
12201 {
12202 opendir ();
12203   ;
12204   return 0;
12205 }
12206 _ACEOF
12207 rm -f conftest.$ac_objext conftest$ac_exeext
12208 if { (eval echo "$as_me:12208: \"$ac_link\"") >&5
12209   (eval $ac_link) 2>&5
12210   ac_status=$?
12211   echo "$as_me:12211: \$? = $ac_status" >&5
12212   (exit $ac_status); } &&
12213          { ac_try='test -s conftest$ac_exeext'
12214   { (eval echo "$as_me:12214: \"$ac_try\"") >&5
12215   (eval $ac_try) 2>&5
12216   ac_status=$?
12217   echo "$as_me:12217: \$? = $ac_status" >&5
12218   (exit $ac_status); }; }; then
12219   ac_cv_lib_dir_opendir=yes
12220 else
12221   echo "$as_me: failed program was:" >&5
12222 cat conftest.$ac_ext >&5
12223 ac_cv_lib_dir_opendir=no
12224 fi
12225 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12226 LIBS=$ac_check_lib_save_LIBS
12227 fi
12228 echo "$as_me:12228: result: $ac_cv_lib_dir_opendir" >&5
12229 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12230 if test $ac_cv_lib_dir_opendir = yes; then
12231   LIBS="$LIBS -ldir"
12232 fi
12233
12234 else
12235   echo "$as_me:12235: checking for opendir in -lx" >&5
12236 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12237 if test "${ac_cv_lib_x_opendir+set}" = set; then
12238   echo $ECHO_N "(cached) $ECHO_C" >&6
12239 else
12240   ac_check_lib_save_LIBS=$LIBS
12241 LIBS="-lx  $LIBS"
12242 cat >conftest.$ac_ext <<_ACEOF
12243 #line 12243 "configure"
12244 #include "confdefs.h"
12245
12246 /* Override any gcc2 internal prototype to avoid an error.  */
12247 #ifdef __cplusplus
12248 extern "C"
12249 #endif
12250 /* We use char because int might match the return type of a gcc2
12251    builtin and then its argument prototype would still apply.  */
12252 char opendir ();
12253 int
12254 main ()
12255 {
12256 opendir ();
12257   ;
12258   return 0;
12259 }
12260 _ACEOF
12261 rm -f conftest.$ac_objext conftest$ac_exeext
12262 if { (eval echo "$as_me:12262: \"$ac_link\"") >&5
12263   (eval $ac_link) 2>&5
12264   ac_status=$?
12265   echo "$as_me:12265: \$? = $ac_status" >&5
12266   (exit $ac_status); } &&
12267          { ac_try='test -s conftest$ac_exeext'
12268   { (eval echo "$as_me:12268: \"$ac_try\"") >&5
12269   (eval $ac_try) 2>&5
12270   ac_status=$?
12271   echo "$as_me:12271: \$? = $ac_status" >&5
12272   (exit $ac_status); }; }; then
12273   ac_cv_lib_x_opendir=yes
12274 else
12275   echo "$as_me: failed program was:" >&5
12276 cat conftest.$ac_ext >&5
12277 ac_cv_lib_x_opendir=no
12278 fi
12279 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12280 LIBS=$ac_check_lib_save_LIBS
12281 fi
12282 echo "$as_me:12282: result: $ac_cv_lib_x_opendir" >&5
12283 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12284 if test $ac_cv_lib_x_opendir = yes; then
12285   LIBS="$LIBS -lx"
12286 fi
12287
12288 fi
12289
12290 echo "$as_me:12290: checking whether time.h and sys/time.h may both be included" >&5
12291 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12292 if test "${ac_cv_header_time+set}" = set; then
12293   echo $ECHO_N "(cached) $ECHO_C" >&6
12294 else
12295   cat >conftest.$ac_ext <<_ACEOF
12296 #line 12296 "configure"
12297 #include "confdefs.h"
12298 #include <sys/types.h>
12299 #include <sys/time.h>
12300 #include <time.h>
12301
12302 int
12303 main ()
12304 {
12305 if ((struct tm *) 0)
12306 return 0;
12307   ;
12308   return 0;
12309 }
12310 _ACEOF
12311 rm -f conftest.$ac_objext
12312 if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
12313   (eval $ac_compile) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit $ac_status); } &&
12317          { ac_try='test -s conftest.$ac_objext'
12318   { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit $ac_status); }; }; then
12323   ac_cv_header_time=yes
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 cat conftest.$ac_ext >&5
12327 ac_cv_header_time=no
12328 fi
12329 rm -f conftest.$ac_objext conftest.$ac_ext
12330 fi
12331 echo "$as_me:12331: result: $ac_cv_header_time" >&5
12332 echo "${ECHO_T}$ac_cv_header_time" >&6
12333 if test $ac_cv_header_time = yes; then
12334
12335 cat >>confdefs.h <<\EOF
12336 #define TIME_WITH_SYS_TIME 1
12337 EOF
12338
12339 fi
12340
12341 echo "$as_me:12341: checking for regular-expression headers" >&5
12342 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12343 if test "${cf_cv_regex+set}" = set; then
12344   echo $ECHO_N "(cached) $ECHO_C" >&6
12345 else
12346
12347 cat >conftest.$ac_ext <<_ACEOF
12348 #line 12348 "configure"
12349 #include "confdefs.h"
12350 #include <sys/types.h>
12351 #include <regex.h>
12352 int
12353 main ()
12354 {
12355
12356         regex_t *p;
12357         int x = regcomp(p, "", 0);
12358         int y = regexec(p, "", 0, 0, 0);
12359         regfree(p);
12360
12361   ;
12362   return 0;
12363 }
12364 _ACEOF
12365 rm -f conftest.$ac_objext conftest$ac_exeext
12366 if { (eval echo "$as_me:12366: \"$ac_link\"") >&5
12367   (eval $ac_link) 2>&5
12368   ac_status=$?
12369   echo "$as_me:12369: \$? = $ac_status" >&5
12370   (exit $ac_status); } &&
12371          { ac_try='test -s conftest$ac_exeext'
12372   { (eval echo "$as_me:12372: \"$ac_try\"") >&5
12373   (eval $ac_try) 2>&5
12374   ac_status=$?
12375   echo "$as_me:12375: \$? = $ac_status" >&5
12376   (exit $ac_status); }; }; then
12377   cf_cv_regex="regex.h"
12378 else
12379   echo "$as_me: failed program was:" >&5
12380 cat conftest.$ac_ext >&5
12381
12382         cat >conftest.$ac_ext <<_ACEOF
12383 #line 12383 "configure"
12384 #include "confdefs.h"
12385 #include <regexp.h>
12386 int
12387 main ()
12388 {
12389
12390                 char *p = compile("", "", "", 0);
12391                 int x = step("", "");
12392
12393   ;
12394   return 0;
12395 }
12396 _ACEOF
12397 rm -f conftest.$ac_objext conftest$ac_exeext
12398 if { (eval echo "$as_me:12398: \"$ac_link\"") >&5
12399   (eval $ac_link) 2>&5
12400   ac_status=$?
12401   echo "$as_me:12401: \$? = $ac_status" >&5
12402   (exit $ac_status); } &&
12403          { ac_try='test -s conftest$ac_exeext'
12404   { (eval echo "$as_me:12404: \"$ac_try\"") >&5
12405   (eval $ac_try) 2>&5
12406   ac_status=$?
12407   echo "$as_me:12407: \$? = $ac_status" >&5
12408   (exit $ac_status); }; }; then
12409   cf_cv_regex="regexp.h"
12410 else
12411   echo "$as_me: failed program was:" >&5
12412 cat conftest.$ac_ext >&5
12413
12414                 cf_save_LIBS="$LIBS"
12415                 LIBS="-lgen $LIBS"
12416                 cat >conftest.$ac_ext <<_ACEOF
12417 #line 12417 "configure"
12418 #include "confdefs.h"
12419 #include <regexpr.h>
12420 int
12421 main ()
12422 {
12423
12424                         char *p = compile("", "", "");
12425                         int x = step("", "");
12426
12427   ;
12428   return 0;
12429 }
12430 _ACEOF
12431 rm -f conftest.$ac_objext conftest$ac_exeext
12432 if { (eval echo "$as_me:12432: \"$ac_link\"") >&5
12433   (eval $ac_link) 2>&5
12434   ac_status=$?
12435   echo "$as_me:12435: \$? = $ac_status" >&5
12436   (exit $ac_status); } &&
12437          { ac_try='test -s conftest$ac_exeext'
12438   { (eval echo "$as_me:12438: \"$ac_try\"") >&5
12439   (eval $ac_try) 2>&5
12440   ac_status=$?
12441   echo "$as_me:12441: \$? = $ac_status" >&5
12442   (exit $ac_status); }; }; then
12443   cf_cv_regex="regexpr.h"
12444 else
12445   echo "$as_me: failed program was:" >&5
12446 cat conftest.$ac_ext >&5
12447 LIBS="$cf_save_LIBS"
12448 fi
12449 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12450 fi
12451 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12452 fi
12453 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12454
12455 fi
12456
12457 echo "$as_me:12457: result: $cf_cv_regex" >&5
12458 echo "${ECHO_T}$cf_cv_regex" >&6
12459 case $cf_cv_regex in
12460         regex.h)   cat >>confdefs.h <<\EOF
12461 #define HAVE_REGEX_H_FUNCS 1
12462 EOF
12463  ;;
12464         regexp.h)  cat >>confdefs.h <<\EOF
12465 #define HAVE_REGEXP_H_FUNCS 1
12466 EOF
12467  ;;
12468         regexpr.h) cat >>confdefs.h <<\EOF
12469 #define HAVE_REGEXPR_H_FUNCS 1
12470 EOF
12471  ;;
12472 esac
12473
12474 for ac_header in \
12475 fcntl.h \
12476 getopt.h \
12477 limits.h \
12478 locale.h \
12479 poll.h \
12480 sys/bsdtypes.h \
12481 sys/ioctl.h \
12482 sys/param.h \
12483 sys/poll.h \
12484 sys/select.h \
12485 sys/time.h \
12486 sys/times.h \
12487 ttyent.h \
12488 unistd.h \
12489 wctype.h \
12490
12491 do
12492 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12493 echo "$as_me:12493: checking for $ac_header" >&5
12494 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12495 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12496   echo $ECHO_N "(cached) $ECHO_C" >&6
12497 else
12498   cat >conftest.$ac_ext <<_ACEOF
12499 #line 12499 "configure"
12500 #include "confdefs.h"
12501 #include <$ac_header>
12502 _ACEOF
12503 if { (eval echo "$as_me:12503: \"$ac_cpp conftest.$ac_ext\"") >&5
12504   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12505   ac_status=$?
12506   egrep -v '^ *\+' conftest.er1 >conftest.err
12507   rm -f conftest.er1
12508   cat conftest.err >&5
12509   echo "$as_me:12509: \$? = $ac_status" >&5
12510   (exit $ac_status); } >/dev/null; then
12511   if test -s conftest.err; then
12512     ac_cpp_err=$ac_c_preproc_warn_flag
12513   else
12514     ac_cpp_err=
12515   fi
12516 else
12517   ac_cpp_err=yes
12518 fi
12519 if test -z "$ac_cpp_err"; then
12520   eval "$as_ac_Header=yes"
12521 else
12522   echo "$as_me: failed program was:" >&5
12523   cat conftest.$ac_ext >&5
12524   eval "$as_ac_Header=no"
12525 fi
12526 rm -f conftest.err conftest.$ac_ext
12527 fi
12528 echo "$as_me:12528: result: `eval echo '${'$as_ac_Header'}'`" >&5
12529 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12530 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12531   cat >>confdefs.h <<EOF
12532 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12533 EOF
12534
12535 fi
12536 done
12537
12538 # check for ISC (this may also define _POSIX_SOURCE)
12539 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12540 if test "$ISC" = yes ; then
12541
12542 echo "$as_me:12542: checking for main in -lcposix" >&5
12543 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12544 if test "${ac_cv_lib_cposix_main+set}" = set; then
12545   echo $ECHO_N "(cached) $ECHO_C" >&6
12546 else
12547   ac_check_lib_save_LIBS=$LIBS
12548 LIBS="-lcposix  $LIBS"
12549 cat >conftest.$ac_ext <<_ACEOF
12550 #line 12550 "configure"
12551 #include "confdefs.h"
12552
12553 int
12554 main ()
12555 {
12556 main ();
12557   ;
12558   return 0;
12559 }
12560 _ACEOF
12561 rm -f conftest.$ac_objext conftest$ac_exeext
12562 if { (eval echo "$as_me:12562: \"$ac_link\"") >&5
12563   (eval $ac_link) 2>&5
12564   ac_status=$?
12565   echo "$as_me:12565: \$? = $ac_status" >&5
12566   (exit $ac_status); } &&
12567          { ac_try='test -s conftest$ac_exeext'
12568   { (eval echo "$as_me:12568: \"$ac_try\"") >&5
12569   (eval $ac_try) 2>&5
12570   ac_status=$?
12571   echo "$as_me:12571: \$? = $ac_status" >&5
12572   (exit $ac_status); }; }; then
12573   ac_cv_lib_cposix_main=yes
12574 else
12575   echo "$as_me: failed program was:" >&5
12576 cat conftest.$ac_ext >&5
12577 ac_cv_lib_cposix_main=no
12578 fi
12579 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12580 LIBS=$ac_check_lib_save_LIBS
12581 fi
12582 echo "$as_me:12582: result: $ac_cv_lib_cposix_main" >&5
12583 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12584 if test $ac_cv_lib_cposix_main = yes; then
12585   cat >>confdefs.h <<EOF
12586 #define HAVE_LIBCPOSIX 1
12587 EOF
12588
12589   LIBS="-lcposix $LIBS"
12590
12591 fi
12592
12593         echo "$as_me:12593: checking for bzero in -linet" >&5
12594 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12595 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12596   echo $ECHO_N "(cached) $ECHO_C" >&6
12597 else
12598   ac_check_lib_save_LIBS=$LIBS
12599 LIBS="-linet  $LIBS"
12600 cat >conftest.$ac_ext <<_ACEOF
12601 #line 12601 "configure"
12602 #include "confdefs.h"
12603
12604 /* Override any gcc2 internal prototype to avoid an error.  */
12605 #ifdef __cplusplus
12606 extern "C"
12607 #endif
12608 /* We use char because int might match the return type of a gcc2
12609    builtin and then its argument prototype would still apply.  */
12610 char bzero ();
12611 int
12612 main ()
12613 {
12614 bzero ();
12615   ;
12616   return 0;
12617 }
12618 _ACEOF
12619 rm -f conftest.$ac_objext conftest$ac_exeext
12620 if { (eval echo "$as_me:12620: \"$ac_link\"") >&5
12621   (eval $ac_link) 2>&5
12622   ac_status=$?
12623   echo "$as_me:12623: \$? = $ac_status" >&5
12624   (exit $ac_status); } &&
12625          { ac_try='test -s conftest$ac_exeext'
12626   { (eval echo "$as_me:12626: \"$ac_try\"") >&5
12627   (eval $ac_try) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit $ac_status); }; }; then
12631   ac_cv_lib_inet_bzero=yes
12632 else
12633   echo "$as_me: failed program was:" >&5
12634 cat conftest.$ac_ext >&5
12635 ac_cv_lib_inet_bzero=no
12636 fi
12637 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12638 LIBS=$ac_check_lib_save_LIBS
12639 fi
12640 echo "$as_me:12640: result: $ac_cv_lib_inet_bzero" >&5
12641 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
12642 if test $ac_cv_lib_inet_bzero = yes; then
12643   LIBS="$LIBS -linet"
12644 fi
12645 fi
12646
12647 echo "$as_me:12647: checking if sys/time.h works with sys/select.h" >&5
12648 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
12649 if test "${cf_cv_sys_time_select+set}" = set; then
12650   echo $ECHO_N "(cached) $ECHO_C" >&6
12651 else
12652
12653 cat >conftest.$ac_ext <<_ACEOF
12654 #line 12654 "configure"
12655 #include "confdefs.h"
12656
12657 #include <sys/types.h>
12658 #ifdef HAVE_SYS_TIME_H
12659 #include <sys/time.h>
12660 #endif
12661 #ifdef HAVE_SYS_SELECT_H
12662 #include <sys/select.h>
12663 #endif
12664
12665 int
12666 main ()
12667 {
12668
12669   ;
12670   return 0;
12671 }
12672 _ACEOF
12673 rm -f conftest.$ac_objext
12674 if { (eval echo "$as_me:12674: \"$ac_compile\"") >&5
12675   (eval $ac_compile) 2>&5
12676   ac_status=$?
12677   echo "$as_me:12677: \$? = $ac_status" >&5
12678   (exit $ac_status); } &&
12679          { ac_try='test -s conftest.$ac_objext'
12680   { (eval echo "$as_me:12680: \"$ac_try\"") >&5
12681   (eval $ac_try) 2>&5
12682   ac_status=$?
12683   echo "$as_me:12683: \$? = $ac_status" >&5
12684   (exit $ac_status); }; }; then
12685   cf_cv_sys_time_select=yes
12686 else
12687   echo "$as_me: failed program was:" >&5
12688 cat conftest.$ac_ext >&5
12689 cf_cv_sys_time_select=no
12690 fi
12691 rm -f conftest.$ac_objext conftest.$ac_ext
12692
12693 fi
12694
12695 echo "$as_me:12695: result: $cf_cv_sys_time_select" >&5
12696 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
12697 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
12698 #define HAVE_SYS_TIME_SELECT 1
12699 EOF
12700
12701 ###     checks for compiler characteristics
12702 ac_ext=c
12703 ac_cpp='$CPP $CPPFLAGS'
12704 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
12705 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
12706 ac_compiler_gnu=$ac_cv_c_compiler_gnu
12707 ac_main_return=return
12708
12709 echo "$as_me:12709: checking for $CC option to accept ANSI C" >&5
12710 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
12711 if test "${ac_cv_prog_cc_stdc+set}" = set; then
12712   echo $ECHO_N "(cached) $ECHO_C" >&6
12713 else
12714   ac_cv_prog_cc_stdc=no
12715 ac_save_CC=$CC
12716 cat >conftest.$ac_ext <<_ACEOF
12717 #line 12717 "configure"
12718 #include "confdefs.h"
12719 #include <stdarg.h>
12720 #include <stdio.h>
12721 #include <sys/types.h>
12722 #include <sys/stat.h>
12723 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
12724 struct buf { int x; };
12725 FILE * (*rcsopen) (struct buf *, struct stat *, int);
12726 static char *e (p, i)
12727      char **p;
12728      int i;
12729 {
12730   return p[i];
12731 }
12732 static char *f (char * (*g) (char **, int), char **p, ...)
12733 {
12734   char *s;
12735   va_list v;
12736   va_start (v,p);
12737   s = g (p, va_arg (v,int));
12738   va_end (v);
12739   return s;
12740 }
12741 int test (int i, double x);
12742 struct s1 {int (*f) (int a);};
12743 struct s2 {int (*f) (double a);};
12744 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
12745 int argc;
12746 char **argv;
12747 int
12748 main ()
12749 {
12750 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
12751   ;
12752   return 0;
12753 }
12754 _ACEOF
12755 # Don't try gcc -ansi; that turns off useful extensions and
12756 # breaks some systems' header files.
12757 # AIX                   -qlanglvl=ansi
12758 # Ultrix and OSF/1      -std1
12759 # HP-UX 10.20 and later -Ae
12760 # HP-UX older versions  -Aa -D_HPUX_SOURCE
12761 # SVR4                  -Xc -D__EXTENSIONS__
12762 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
12763 do
12764   CC="$ac_save_CC $ac_arg"
12765   rm -f conftest.$ac_objext
12766 if { (eval echo "$as_me:12766: \"$ac_compile\"") >&5
12767   (eval $ac_compile) 2>&5
12768   ac_status=$?
12769   echo "$as_me:12769: \$? = $ac_status" >&5
12770   (exit $ac_status); } &&
12771          { ac_try='test -s conftest.$ac_objext'
12772   { (eval echo "$as_me:12772: \"$ac_try\"") >&5
12773   (eval $ac_try) 2>&5
12774   ac_status=$?
12775   echo "$as_me:12775: \$? = $ac_status" >&5
12776   (exit $ac_status); }; }; then
12777   ac_cv_prog_cc_stdc=$ac_arg
12778 break
12779 else
12780   echo "$as_me: failed program was:" >&5
12781 cat conftest.$ac_ext >&5
12782 fi
12783 rm -f conftest.$ac_objext
12784 done
12785 rm -f conftest.$ac_ext conftest.$ac_objext
12786 CC=$ac_save_CC
12787
12788 fi
12789
12790 case "x$ac_cv_prog_cc_stdc" in
12791   x|xno)
12792     echo "$as_me:12792: result: none needed" >&5
12793 echo "${ECHO_T}none needed" >&6 ;;
12794   *)
12795     echo "$as_me:12795: result: $ac_cv_prog_cc_stdc" >&5
12796 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
12797     CC="$CC $ac_cv_prog_cc_stdc" ;;
12798 esac
12799
12800 echo "$as_me:12800: checking for an ANSI C-conforming const" >&5
12801 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
12802 if test "${ac_cv_c_const+set}" = set; then
12803   echo $ECHO_N "(cached) $ECHO_C" >&6
12804 else
12805   cat >conftest.$ac_ext <<_ACEOF
12806 #line 12806 "configure"
12807 #include "confdefs.h"
12808
12809 int
12810 main ()
12811 {
12812 /* FIXME: Include the comments suggested by Paul. */
12813 #ifndef __cplusplus
12814   /* Ultrix mips cc rejects this.  */
12815   typedef int charset[2];
12816   const charset x;
12817   /* SunOS 4.1.1 cc rejects this.  */
12818   char const *const *ccp;
12819   char **p;
12820   /* NEC SVR4.0.2 mips cc rejects this.  */
12821   struct point {int x, y;};
12822   static struct point const zero = {0,0};
12823   /* AIX XL C 1.02.0.0 rejects this.
12824      It does not let you subtract one const X* pointer from another in
12825      an arm of an if-expression whose if-part is not a constant
12826      expression */
12827   const char *g = "string";
12828   ccp = &g + (g ? g-g : 0);
12829   /* HPUX 7.0 cc rejects these. */
12830   ++ccp;
12831   p = (char**) ccp;
12832   ccp = (char const *const *) p;
12833   { /* SCO 3.2v4 cc rejects this.  */
12834     char *t;
12835     char const *s = 0 ? (char *) 0 : (char const *) 0;
12836
12837     *t++ = 0;
12838   }
12839   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
12840     int x[] = {25, 17};
12841     const int *foo = &x[0];
12842     ++foo;
12843   }
12844   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
12845     typedef const int *iptr;
12846     iptr p = 0;
12847     ++p;
12848   }
12849   { /* AIX XL C 1.02.0.0 rejects this saying
12850        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
12851     struct s { int j; const int *ap[3]; };
12852     struct s *b; b->j = 5;
12853   }
12854   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
12855     const int foo = 10;
12856   }
12857 #endif
12858
12859   ;
12860   return 0;
12861 }
12862 _ACEOF
12863 rm -f conftest.$ac_objext
12864 if { (eval echo "$as_me:12864: \"$ac_compile\"") >&5
12865   (eval $ac_compile) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit $ac_status); } &&
12869          { ac_try='test -s conftest.$ac_objext'
12870   { (eval echo "$as_me:12870: \"$ac_try\"") >&5
12871   (eval $ac_try) 2>&5
12872   ac_status=$?
12873   echo "$as_me:12873: \$? = $ac_status" >&5
12874   (exit $ac_status); }; }; then
12875   ac_cv_c_const=yes
12876 else
12877   echo "$as_me: failed program was:" >&5
12878 cat conftest.$ac_ext >&5
12879 ac_cv_c_const=no
12880 fi
12881 rm -f conftest.$ac_objext conftest.$ac_ext
12882 fi
12883 echo "$as_me:12883: result: $ac_cv_c_const" >&5
12884 echo "${ECHO_T}$ac_cv_c_const" >&6
12885 if test $ac_cv_c_const = no; then
12886
12887 cat >>confdefs.h <<\EOF
12888 #define const
12889 EOF
12890
12891 fi
12892
12893 echo "$as_me:12893: checking for inline" >&5
12894 echo $ECHO_N "checking for inline... $ECHO_C" >&6
12895 if test "${ac_cv_c_inline+set}" = set; then
12896   echo $ECHO_N "(cached) $ECHO_C" >&6
12897 else
12898   ac_cv_c_inline=no
12899 for ac_kw in inline __inline__ __inline; do
12900   cat >conftest.$ac_ext <<_ACEOF
12901 #line 12901 "configure"
12902 #include "confdefs.h"
12903 #ifndef __cplusplus
12904 static $ac_kw int static_foo () {return 0; }
12905 $ac_kw int foo () {return 0; }
12906 #endif
12907
12908 _ACEOF
12909 rm -f conftest.$ac_objext
12910 if { (eval echo "$as_me:12910: \"$ac_compile\"") >&5
12911   (eval $ac_compile) 2>&5
12912   ac_status=$?
12913   echo "$as_me:12913: \$? = $ac_status" >&5
12914   (exit $ac_status); } &&
12915          { ac_try='test -s conftest.$ac_objext'
12916   { (eval echo "$as_me:12916: \"$ac_try\"") >&5
12917   (eval $ac_try) 2>&5
12918   ac_status=$?
12919   echo "$as_me:12919: \$? = $ac_status" >&5
12920   (exit $ac_status); }; }; then
12921   ac_cv_c_inline=$ac_kw; break
12922 else
12923   echo "$as_me: failed program was:" >&5
12924 cat conftest.$ac_ext >&5
12925 fi
12926 rm -f conftest.$ac_objext conftest.$ac_ext
12927 done
12928
12929 fi
12930 echo "$as_me:12930: result: $ac_cv_c_inline" >&5
12931 echo "${ECHO_T}$ac_cv_c_inline" >&6
12932 case $ac_cv_c_inline in
12933   inline | yes) ;;
12934   no)
12935 cat >>confdefs.h <<\EOF
12936 #define inline
12937 EOF
12938  ;;
12939   *)  cat >>confdefs.h <<EOF
12940 #define inline $ac_cv_c_inline
12941 EOF
12942  ;;
12943 esac
12944
12945 NCURSES_INLINE=
12946 if test "$ac_cv_c_inline" != no ; then
12947   NCURSES_INLINE=inline
12948   if test "$INTEL_COMPILER" = yes
12949   then
12950     :
12951   elif test "$GCC" = yes
12952   then
12953     echo "$as_me:12953: checking if gcc supports options to tune inlining" >&5
12954 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
12955 if test "${cf_cv_gcc_inline+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958
12959       cf_save_CFLAGS=$CFLAGS
12960       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
12961       cat >conftest.$ac_ext <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964 inline int foo(void) { return 1; }
12965 int
12966 main ()
12967 {
12968 ${cf_cv_main_return:-return} foo()
12969   ;
12970   return 0;
12971 }
12972 _ACEOF
12973 rm -f conftest.$ac_objext
12974 if { (eval echo "$as_me:12974: \"$ac_compile\"") >&5
12975   (eval $ac_compile) 2>&5
12976   ac_status=$?
12977   echo "$as_me:12977: \$? = $ac_status" >&5
12978   (exit $ac_status); } &&
12979          { ac_try='test -s conftest.$ac_objext'
12980   { (eval echo "$as_me:12980: \"$ac_try\"") >&5
12981   (eval $ac_try) 2>&5
12982   ac_status=$?
12983   echo "$as_me:12983: \$? = $ac_status" >&5
12984   (exit $ac_status); }; }; then
12985   cf_cv_gcc_inline=yes
12986 else
12987   echo "$as_me: failed program was:" >&5
12988 cat conftest.$ac_ext >&5
12989 cf_cv_gcc_inline=no
12990 fi
12991 rm -f conftest.$ac_objext conftest.$ac_ext
12992       CFLAGS=$cf_save_CFLAGS
12993
12994 fi
12995 echo "$as_me:12995: result: $cf_cv_gcc_inline" >&5
12996 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
12997     if test "$cf_cv_gcc_inline" = yes ; then
12998
12999 cf_fix_cppflags=no
13000 cf_new_cflags=
13001 cf_new_cppflags=
13002 cf_new_extra_cppflags=
13003
13004 for cf_add_cflags in --param max-inline-insns-single=1200
13005 do
13006 case $cf_fix_cppflags in
13007 no)
13008         case $cf_add_cflags in #(vi
13009         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13010                 case $cf_add_cflags in
13011                 -D*)
13012                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13013
13014                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13015                                 && test -z "${cf_tst_cflags}" \
13016                                 && cf_fix_cppflags=yes
13017
13018                         if test $cf_fix_cppflags = yes ; then
13019                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13020                                 continue
13021                         elif test "${cf_tst_cflags}" = "\"'" ; then
13022                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13023                                 continue
13024                         fi
13025                         ;;
13026                 esac
13027                 case "$CPPFLAGS" in
13028                 *$cf_add_cflags) #(vi
13029                         ;;
13030                 *) #(vi
13031                         case $cf_add_cflags in #(vi
13032                         -D*)
13033                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13034
13035 CPPFLAGS=`echo "$CPPFLAGS" | \
13036         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13037                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13038
13039                                 ;;
13040                         esac
13041                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13042                         ;;
13043                 esac
13044                 ;;
13045         *)
13046                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13047                 ;;
13048         esac
13049         ;;
13050 yes)
13051         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13052
13053         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13054
13055         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13056                 && test -z "${cf_tst_cflags}" \
13057                 && cf_fix_cppflags=no
13058         ;;
13059 esac
13060 done
13061
13062 if test -n "$cf_new_cflags" ; then
13063
13064         CFLAGS="$CFLAGS $cf_new_cflags"
13065 fi
13066
13067 if test -n "$cf_new_cppflags" ; then
13068
13069         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13070 fi
13071
13072 if test -n "$cf_new_extra_cppflags" ; then
13073
13074         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13075 fi
13076
13077     fi
13078   fi
13079 fi
13080
13081 echo "$as_me:13081: checking for signal global datatype" >&5
13082 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13083 if test "${cf_cv_sig_atomic_t+set}" = set; then
13084   echo $ECHO_N "(cached) $ECHO_C" >&6
13085 else
13086
13087         for cf_type in \
13088                 "volatile sig_atomic_t" \
13089                 "sig_atomic_t" \
13090                 "int"
13091         do
13092         cat >conftest.$ac_ext <<_ACEOF
13093 #line 13093 "configure"
13094 #include "confdefs.h"
13095
13096 #include <sys/types.h>
13097 #include <signal.h>
13098 #include <stdio.h>
13099
13100 extern $cf_type x;
13101 $cf_type x;
13102 static void handler(int sig)
13103 {
13104         x = 5;
13105 }
13106 int
13107 main ()
13108 {
13109 signal(SIGINT, handler);
13110                  x = 1
13111   ;
13112   return 0;
13113 }
13114 _ACEOF
13115 rm -f conftest.$ac_objext
13116 if { (eval echo "$as_me:13116: \"$ac_compile\"") >&5
13117   (eval $ac_compile) 2>&5
13118   ac_status=$?
13119   echo "$as_me:13119: \$? = $ac_status" >&5
13120   (exit $ac_status); } &&
13121          { ac_try='test -s conftest.$ac_objext'
13122   { (eval echo "$as_me:13122: \"$ac_try\"") >&5
13123   (eval $ac_try) 2>&5
13124   ac_status=$?
13125   echo "$as_me:13125: \$? = $ac_status" >&5
13126   (exit $ac_status); }; }; then
13127   cf_cv_sig_atomic_t=$cf_type
13128 else
13129   echo "$as_me: failed program was:" >&5
13130 cat conftest.$ac_ext >&5
13131 cf_cv_sig_atomic_t=no
13132 fi
13133 rm -f conftest.$ac_objext conftest.$ac_ext
13134                 test "$cf_cv_sig_atomic_t" != no && break
13135         done
13136
13137 fi
13138
13139 echo "$as_me:13139: result: $cf_cv_sig_atomic_t" >&5
13140 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13141 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13142 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13143 EOF
13144
13145 if test $NCURSES_CHTYPE = auto ; then
13146
13147 echo "$as_me:13147: checking for type of chtype" >&5
13148 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13149 if test "${cf_cv_typeof_chtype+set}" = set; then
13150   echo $ECHO_N "(cached) $ECHO_C" >&6
13151 else
13152
13153                 if test "$cross_compiling" = yes; then
13154   cf_cv_typeof_chtype=long
13155 else
13156   cat >conftest.$ac_ext <<_ACEOF
13157 #line 13157 "configure"
13158 #include "confdefs.h"
13159
13160 #define WANT_BITS 31
13161 #include <stdio.h>
13162 int main()
13163 {
13164         FILE *fp = fopen("cf_test.out", "w");
13165         if (fp != 0) {
13166                 char *result = "long";
13167                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13168                         int n;
13169                         unsigned int x, y;
13170                         for (n = 0; n < WANT_BITS; n++) {
13171                                 x = (1 << n);
13172                                 y = (x >> n);
13173                                 if (y != 1 || x == 0) {
13174                                         x = 0;
13175                                         break;
13176                                 }
13177                         }
13178                         /*
13179                          * If x is nonzero, an int is big enough for the bits
13180                          * that we want.
13181                          */
13182                         result = (x != 0) ? "int" : "long";
13183                 }
13184                 fputs(result, fp);
13185                 fclose(fp);
13186         }
13187         ${cf_cv_main_return:-return}(0);
13188 }
13189
13190 _ACEOF
13191 rm -f conftest$ac_exeext
13192 if { (eval echo "$as_me:13192: \"$ac_link\"") >&5
13193   (eval $ac_link) 2>&5
13194   ac_status=$?
13195   echo "$as_me:13195: \$? = $ac_status" >&5
13196   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13197   { (eval echo "$as_me:13197: \"$ac_try\"") >&5
13198   (eval $ac_try) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit $ac_status); }; }; then
13202   cf_cv_typeof_chtype=`cat cf_test.out`
13203 else
13204   echo "$as_me: program exited with status $ac_status" >&5
13205 echo "$as_me: failed program was:" >&5
13206 cat conftest.$ac_ext >&5
13207 cf_cv_typeof_chtype=long
13208 fi
13209 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13210 fi
13211                 rm -f cf_test.out
13212
13213 fi
13214
13215 echo "$as_me:13215: result: $cf_cv_typeof_chtype" >&5
13216 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13217
13218 cat >>confdefs.h <<EOF
13219 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13220 EOF
13221
13222 else
13223         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13224 fi
13225 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13226
13227 echo "$as_me:13227: checking if unsigned literals are legal" >&5
13228 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13229 if test "${cf_cv_unsigned_literals+set}" = set; then
13230   echo $ECHO_N "(cached) $ECHO_C" >&6
13231 else
13232
13233         cat >conftest.$ac_ext <<_ACEOF
13234 #line 13234 "configure"
13235 #include "confdefs.h"
13236
13237 int
13238 main ()
13239 {
13240 long x = 1L + 1UL + 1U + 1
13241   ;
13242   return 0;
13243 }
13244 _ACEOF
13245 rm -f conftest.$ac_objext
13246 if { (eval echo "$as_me:13246: \"$ac_compile\"") >&5
13247   (eval $ac_compile) 2>&5
13248   ac_status=$?
13249   echo "$as_me:13249: \$? = $ac_status" >&5
13250   (exit $ac_status); } &&
13251          { ac_try='test -s conftest.$ac_objext'
13252   { (eval echo "$as_me:13252: \"$ac_try\"") >&5
13253   (eval $ac_try) 2>&5
13254   ac_status=$?
13255   echo "$as_me:13255: \$? = $ac_status" >&5
13256   (exit $ac_status); }; }; then
13257   cf_cv_unsigned_literals=yes
13258 else
13259   echo "$as_me: failed program was:" >&5
13260 cat conftest.$ac_ext >&5
13261 cf_cv_unsigned_literals=no
13262 fi
13263 rm -f conftest.$ac_objext conftest.$ac_ext
13264
13265 fi
13266
13267 echo "$as_me:13267: result: $cf_cv_unsigned_literals" >&5
13268 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13269
13270 cf_cv_1UL="1"
13271 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13272 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13273
13274 if test $NCURSES_MMASK_T = auto ; then
13275         cf_cv_typeof_mmask_t=long
13276 else
13277         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13278 fi
13279 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13280
13281 ###     Checks for external-data
13282
13283 echo "$as_me:13283: checking if external errno is declared" >&5
13284 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13285 if test "${cf_cv_dcl_errno+set}" = set; then
13286   echo $ECHO_N "(cached) $ECHO_C" >&6
13287 else
13288
13289     cat >conftest.$ac_ext <<_ACEOF
13290 #line 13290 "configure"
13291 #include "confdefs.h"
13292
13293 #ifdef HAVE_STDLIB_H
13294 #include <stdlib.h>
13295 #endif
13296 #include <stdio.h>
13297 #include <sys/types.h>
13298 #include <errno.h>
13299 int
13300 main ()
13301 {
13302 int x = (int) errno
13303   ;
13304   return 0;
13305 }
13306 _ACEOF
13307 rm -f conftest.$ac_objext
13308 if { (eval echo "$as_me:13308: \"$ac_compile\"") >&5
13309   (eval $ac_compile) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); } &&
13313          { ac_try='test -s conftest.$ac_objext'
13314   { (eval echo "$as_me:13314: \"$ac_try\"") >&5
13315   (eval $ac_try) 2>&5
13316   ac_status=$?
13317   echo "$as_me:13317: \$? = $ac_status" >&5
13318   (exit $ac_status); }; }; then
13319   cf_cv_dcl_errno=yes
13320 else
13321   echo "$as_me: failed program was:" >&5
13322 cat conftest.$ac_ext >&5
13323 cf_cv_dcl_errno=no
13324 fi
13325 rm -f conftest.$ac_objext conftest.$ac_ext
13326
13327 fi
13328 echo "$as_me:13328: result: $cf_cv_dcl_errno" >&5
13329 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13330
13331 if test "$cf_cv_dcl_errno" = no ; then
13332
13333 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13334
13335     cat >>confdefs.h <<EOF
13336 #define $cf_result 1
13337 EOF
13338
13339 fi
13340
13341 # It's possible (for near-UNIX clones) that the data doesn't exist
13342
13343 echo "$as_me:13343: checking if external errno exists" >&5
13344 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13345 if test "${cf_cv_have_errno+set}" = set; then
13346   echo $ECHO_N "(cached) $ECHO_C" >&6
13347 else
13348
13349     cat >conftest.$ac_ext <<_ACEOF
13350 #line 13350 "configure"
13351 #include "confdefs.h"
13352
13353 #undef errno
13354 extern int errno;
13355
13356 int
13357 main ()
13358 {
13359 errno = 2
13360   ;
13361   return 0;
13362 }
13363 _ACEOF
13364 rm -f conftest.$ac_objext conftest$ac_exeext
13365 if { (eval echo "$as_me:13365: \"$ac_link\"") >&5
13366   (eval $ac_link) 2>&5
13367   ac_status=$?
13368   echo "$as_me:13368: \$? = $ac_status" >&5
13369   (exit $ac_status); } &&
13370          { ac_try='test -s conftest$ac_exeext'
13371   { (eval echo "$as_me:13371: \"$ac_try\"") >&5
13372   (eval $ac_try) 2>&5
13373   ac_status=$?
13374   echo "$as_me:13374: \$? = $ac_status" >&5
13375   (exit $ac_status); }; }; then
13376   cf_cv_have_errno=yes
13377 else
13378   echo "$as_me: failed program was:" >&5
13379 cat conftest.$ac_ext >&5
13380 cf_cv_have_errno=no
13381 fi
13382 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13383
13384 fi
13385 echo "$as_me:13385: result: $cf_cv_have_errno" >&5
13386 echo "${ECHO_T}$cf_cv_have_errno" >&6
13387
13388 if test "$cf_cv_have_errno" = yes ; then
13389
13390 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13391
13392     cat >>confdefs.h <<EOF
13393 #define $cf_result 1
13394 EOF
13395
13396 fi
13397
13398 echo "$as_me:13398: checking if data-only library module links" >&5
13399 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13400 if test "${cf_cv_link_dataonly+set}" = set; then
13401   echo $ECHO_N "(cached) $ECHO_C" >&6
13402 else
13403
13404         rm -f conftest.a
13405         cat >conftest.$ac_ext <<EOF
13406 #line 13406 "configure"
13407 int     testdata[3] = { 123, 456, 789 };
13408 EOF
13409         if { (eval echo "$as_me:13409: \"$ac_compile\"") >&5
13410   (eval $ac_compile) 2>&5
13411   ac_status=$?
13412   echo "$as_me:13412: \$? = $ac_status" >&5
13413   (exit $ac_status); } ; then
13414                 mv conftest.o data.o && \
13415                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13416         fi
13417         rm -f conftest.$ac_ext data.o
13418         cat >conftest.$ac_ext <<EOF
13419 #line 13419 "configure"
13420 int     testfunc()
13421 {
13422 #if defined(NeXT)
13423         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13424 #else
13425         extern int testdata[3];
13426         return testdata[0] == 123
13427            &&  testdata[1] == 456
13428            &&  testdata[2] == 789;
13429 #endif
13430 }
13431 EOF
13432         if { (eval echo "$as_me:13432: \"$ac_compile\"") >&5
13433   (eval $ac_compile) 2>&5
13434   ac_status=$?
13435   echo "$as_me:13435: \$? = $ac_status" >&5
13436   (exit $ac_status); }; then
13437                 mv conftest.o func.o && \
13438                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13439         fi
13440         rm -f conftest.$ac_ext func.o
13441         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13442         cf_saveLIBS="$LIBS"
13443         LIBS="conftest.a $LIBS"
13444         if test "$cross_compiling" = yes; then
13445   cf_cv_link_dataonly=unknown
13446 else
13447   cat >conftest.$ac_ext <<_ACEOF
13448 #line 13448 "configure"
13449 #include "confdefs.h"
13450
13451         int main()
13452         {
13453                 extern int testfunc();
13454                 ${cf_cv_main_return:-return} (!testfunc());
13455         }
13456
13457 _ACEOF
13458 rm -f conftest$ac_exeext
13459 if { (eval echo "$as_me:13459: \"$ac_link\"") >&5
13460   (eval $ac_link) 2>&5
13461   ac_status=$?
13462   echo "$as_me:13462: \$? = $ac_status" >&5
13463   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13464   { (eval echo "$as_me:13464: \"$ac_try\"") >&5
13465   (eval $ac_try) 2>&5
13466   ac_status=$?
13467   echo "$as_me:13467: \$? = $ac_status" >&5
13468   (exit $ac_status); }; }; then
13469   cf_cv_link_dataonly=yes
13470 else
13471   echo "$as_me: program exited with status $ac_status" >&5
13472 echo "$as_me: failed program was:" >&5
13473 cat conftest.$ac_ext >&5
13474 cf_cv_link_dataonly=no
13475 fi
13476 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13477 fi
13478         LIBS="$cf_saveLIBS"
13479
13480 fi
13481
13482 echo "$as_me:13482: result: $cf_cv_link_dataonly" >&5
13483 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13484
13485 if test "$cf_cv_link_dataonly" = no ; then
13486         cat >>confdefs.h <<\EOF
13487 #define BROKEN_LINKER 1
13488 EOF
13489
13490         BROKEN_LINKER=1
13491 fi
13492
13493 ###     Checks for library functions.
13494
13495 for ac_func in \
13496 getcwd \
13497 getegid \
13498 geteuid \
13499 getttynam \
13500 issetugid \
13501 poll \
13502 remove \
13503 select \
13504 setbuf \
13505 setbuffer \
13506 setvbuf \
13507 sigaction \
13508 sigvec \
13509 strdup \
13510 strstr \
13511 tcgetpgrp \
13512 times \
13513 vsnprintf \
13514
13515 do
13516 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13517 echo "$as_me:13517: checking for $ac_func" >&5
13518 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13519 if eval "test \"\${$as_ac_var+set}\" = set"; then
13520   echo $ECHO_N "(cached) $ECHO_C" >&6
13521 else
13522   cat >conftest.$ac_ext <<_ACEOF
13523 #line 13523 "configure"
13524 #include "confdefs.h"
13525 /* System header to define __stub macros and hopefully few prototypes,
13526     which can conflict with char $ac_func (); below.  */
13527 #include <assert.h>
13528 /* Override any gcc2 internal prototype to avoid an error.  */
13529 #ifdef __cplusplus
13530 extern "C"
13531 #endif
13532 /* We use char because int might match the return type of a gcc2
13533    builtin and then its argument prototype would still apply.  */
13534 char $ac_func ();
13535 char (*f) ();
13536
13537 int
13538 main ()
13539 {
13540 /* The GNU C library defines this for functions which it implements
13541     to always fail with ENOSYS.  Some functions are actually named
13542     something starting with __ and the normal name is an alias.  */
13543 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13544 choke me
13545 #else
13546 f = $ac_func;
13547 #endif
13548
13549   ;
13550   return 0;
13551 }
13552 _ACEOF
13553 rm -f conftest.$ac_objext conftest$ac_exeext
13554 if { (eval echo "$as_me:13554: \"$ac_link\"") >&5
13555   (eval $ac_link) 2>&5
13556   ac_status=$?
13557   echo "$as_me:13557: \$? = $ac_status" >&5
13558   (exit $ac_status); } &&
13559          { ac_try='test -s conftest$ac_exeext'
13560   { (eval echo "$as_me:13560: \"$ac_try\"") >&5
13561   (eval $ac_try) 2>&5
13562   ac_status=$?
13563   echo "$as_me:13563: \$? = $ac_status" >&5
13564   (exit $ac_status); }; }; then
13565   eval "$as_ac_var=yes"
13566 else
13567   echo "$as_me: failed program was:" >&5
13568 cat conftest.$ac_ext >&5
13569 eval "$as_ac_var=no"
13570 fi
13571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13572 fi
13573 echo "$as_me:13573: result: `eval echo '${'$as_ac_var'}'`" >&5
13574 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13575 if test `eval echo '${'$as_ac_var'}'` = yes; then
13576   cat >>confdefs.h <<EOF
13577 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13578 EOF
13579
13580 fi
13581 done
13582
13583 if test "$with_getcap" = "yes" ; then
13584
13585 echo "$as_me:13585: checking for terminal-capability database functions" >&5
13586 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13587 if test "${cf_cv_cgetent+set}" = set; then
13588   echo $ECHO_N "(cached) $ECHO_C" >&6
13589 else
13590
13591 cat >conftest.$ac_ext <<_ACEOF
13592 #line 13592 "configure"
13593 #include "confdefs.h"
13594
13595 #include <stdlib.h>
13596 int
13597 main ()
13598 {
13599
13600         char temp[128];
13601         char *buf = temp;
13602         char *db_array = temp;
13603         cgetent(&buf, /* int *, */ &db_array, "vt100");
13604         cgetcap(buf, "tc", '=');
13605         cgetmatch(buf, "tc");
13606
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 rm -f conftest.$ac_objext conftest$ac_exeext
13612 if { (eval echo "$as_me:13612: \"$ac_link\"") >&5
13613   (eval $ac_link) 2>&5
13614   ac_status=$?
13615   echo "$as_me:13615: \$? = $ac_status" >&5
13616   (exit $ac_status); } &&
13617          { ac_try='test -s conftest$ac_exeext'
13618   { (eval echo "$as_me:13618: \"$ac_try\"") >&5
13619   (eval $ac_try) 2>&5
13620   ac_status=$?
13621   echo "$as_me:13621: \$? = $ac_status" >&5
13622   (exit $ac_status); }; }; then
13623   cf_cv_cgetent=yes
13624 else
13625   echo "$as_me: failed program was:" >&5
13626 cat conftest.$ac_ext >&5
13627 cf_cv_cgetent=no
13628 fi
13629 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13630
13631 fi
13632
13633 echo "$as_me:13633: result: $cf_cv_cgetent" >&5
13634 echo "${ECHO_T}$cf_cv_cgetent" >&6
13635 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
13636 #define HAVE_BSD_CGETENT 1
13637 EOF
13638
13639 fi
13640
13641 echo "$as_me:13641: checking for isascii" >&5
13642 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
13643 if test "${cf_cv_have_isascii+set}" = set; then
13644   echo $ECHO_N "(cached) $ECHO_C" >&6
13645 else
13646
13647         cat >conftest.$ac_ext <<_ACEOF
13648 #line 13648 "configure"
13649 #include "confdefs.h"
13650 #include <ctype.h>
13651 int
13652 main ()
13653 {
13654 int x = isascii(' ')
13655   ;
13656   return 0;
13657 }
13658 _ACEOF
13659 rm -f conftest.$ac_objext conftest$ac_exeext
13660 if { (eval echo "$as_me:13660: \"$ac_link\"") >&5
13661   (eval $ac_link) 2>&5
13662   ac_status=$?
13663   echo "$as_me:13663: \$? = $ac_status" >&5
13664   (exit $ac_status); } &&
13665          { ac_try='test -s conftest$ac_exeext'
13666   { (eval echo "$as_me:13666: \"$ac_try\"") >&5
13667   (eval $ac_try) 2>&5
13668   ac_status=$?
13669   echo "$as_me:13669: \$? = $ac_status" >&5
13670   (exit $ac_status); }; }; then
13671   cf_cv_have_isascii=yes
13672 else
13673   echo "$as_me: failed program was:" >&5
13674 cat conftest.$ac_ext >&5
13675 cf_cv_have_isascii=no
13676 fi
13677 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13678
13679 fi
13680 echo "$as_me:13680: result: $cf_cv_have_isascii" >&5
13681 echo "${ECHO_T}$cf_cv_have_isascii" >&6
13682 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
13683 #define HAVE_ISASCII 1
13684 EOF
13685
13686 if test "$ac_cv_func_sigaction" = yes; then
13687 echo "$as_me:13687: checking whether sigaction needs _POSIX_SOURCE" >&5
13688 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
13689 cat >conftest.$ac_ext <<_ACEOF
13690 #line 13690 "configure"
13691 #include "confdefs.h"
13692
13693 #include <sys/types.h>
13694 #include <signal.h>
13695 int
13696 main ()
13697 {
13698 struct sigaction act
13699   ;
13700   return 0;
13701 }
13702 _ACEOF
13703 rm -f conftest.$ac_objext
13704 if { (eval echo "$as_me:13704: \"$ac_compile\"") >&5
13705   (eval $ac_compile) 2>&5
13706   ac_status=$?
13707   echo "$as_me:13707: \$? = $ac_status" >&5
13708   (exit $ac_status); } &&
13709          { ac_try='test -s conftest.$ac_objext'
13710   { (eval echo "$as_me:13710: \"$ac_try\"") >&5
13711   (eval $ac_try) 2>&5
13712   ac_status=$?
13713   echo "$as_me:13713: \$? = $ac_status" >&5
13714   (exit $ac_status); }; }; then
13715   sigact_bad=no
13716 else
13717   echo "$as_me: failed program was:" >&5
13718 cat conftest.$ac_ext >&5
13719
13720 cat >conftest.$ac_ext <<_ACEOF
13721 #line 13721 "configure"
13722 #include "confdefs.h"
13723
13724 #define _POSIX_SOURCE
13725 #include <sys/types.h>
13726 #include <signal.h>
13727 int
13728 main ()
13729 {
13730 struct sigaction act
13731   ;
13732   return 0;
13733 }
13734 _ACEOF
13735 rm -f conftest.$ac_objext
13736 if { (eval echo "$as_me:13736: \"$ac_compile\"") >&5
13737   (eval $ac_compile) 2>&5
13738   ac_status=$?
13739   echo "$as_me:13739: \$? = $ac_status" >&5
13740   (exit $ac_status); } &&
13741          { ac_try='test -s conftest.$ac_objext'
13742   { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743   (eval $ac_try) 2>&5
13744   ac_status=$?
13745   echo "$as_me:13745: \$? = $ac_status" >&5
13746   (exit $ac_status); }; }; then
13747   sigact_bad=yes
13748          cat >>confdefs.h <<\EOF
13749 #define SVR4_ACTION 1
13750 EOF
13751
13752 else
13753   echo "$as_me: failed program was:" >&5
13754 cat conftest.$ac_ext >&5
13755 sigact_bad=unknown
13756 fi
13757 rm -f conftest.$ac_objext conftest.$ac_ext
13758 fi
13759 rm -f conftest.$ac_objext conftest.$ac_ext
13760 echo "$as_me:13760: result: $sigact_bad" >&5
13761 echo "${ECHO_T}$sigact_bad" >&6
13762 fi
13763
13764 echo "$as_me:13764: checking if nanosleep really works" >&5
13765 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
13766 if test "${cf_cv_func_nanosleep+set}" = set; then
13767   echo $ECHO_N "(cached) $ECHO_C" >&6
13768 else
13769
13770 if test "$cross_compiling" = yes; then
13771   cf_cv_func_nanosleep=unknown
13772 else
13773   cat >conftest.$ac_ext <<_ACEOF
13774 #line 13774 "configure"
13775 #include "confdefs.h"
13776
13777 #include <stdio.h>
13778 #include <errno.h>
13779 #include <time.h>
13780
13781 #ifdef HAVE_SYS_TIME_H
13782 #include <sys/time.h>
13783 #endif
13784
13785 int main() {
13786         struct timespec ts1, ts2;
13787         int code;
13788         ts1.tv_sec  = 0;
13789         ts1.tv_nsec = 750000000;
13790         ts2.tv_sec  = 0;
13791         ts2.tv_nsec = 0;
13792         errno = 0;
13793         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
13794         ${cf_cv_main_return:-return}(code != 0);
13795 }
13796
13797 _ACEOF
13798 rm -f conftest$ac_exeext
13799 if { (eval echo "$as_me:13799: \"$ac_link\"") >&5
13800   (eval $ac_link) 2>&5
13801   ac_status=$?
13802   echo "$as_me:13802: \$? = $ac_status" >&5
13803   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13804   { (eval echo "$as_me:13804: \"$ac_try\"") >&5
13805   (eval $ac_try) 2>&5
13806   ac_status=$?
13807   echo "$as_me:13807: \$? = $ac_status" >&5
13808   (exit $ac_status); }; }; then
13809   cf_cv_func_nanosleep=yes
13810 else
13811   echo "$as_me: program exited with status $ac_status" >&5
13812 echo "$as_me: failed program was:" >&5
13813 cat conftest.$ac_ext >&5
13814 cf_cv_func_nanosleep=no
13815 fi
13816 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13817 fi
13818 fi
13819 echo "$as_me:13819: result: $cf_cv_func_nanosleep" >&5
13820 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
13821
13822 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
13823 #define HAVE_NANOSLEEP 1
13824 EOF
13825
13826 for ac_header in \
13827 termio.h \
13828 termios.h \
13829 unistd.h \
13830
13831 do
13832 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13833 echo "$as_me:13833: checking for $ac_header" >&5
13834 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13835 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13836   echo $ECHO_N "(cached) $ECHO_C" >&6
13837 else
13838   cat >conftest.$ac_ext <<_ACEOF
13839 #line 13839 "configure"
13840 #include "confdefs.h"
13841 #include <$ac_header>
13842 _ACEOF
13843 if { (eval echo "$as_me:13843: \"$ac_cpp conftest.$ac_ext\"") >&5
13844   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13845   ac_status=$?
13846   egrep -v '^ *\+' conftest.er1 >conftest.err
13847   rm -f conftest.er1
13848   cat conftest.err >&5
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit $ac_status); } >/dev/null; then
13851   if test -s conftest.err; then
13852     ac_cpp_err=$ac_c_preproc_warn_flag
13853   else
13854     ac_cpp_err=
13855   fi
13856 else
13857   ac_cpp_err=yes
13858 fi
13859 if test -z "$ac_cpp_err"; then
13860   eval "$as_ac_Header=yes"
13861 else
13862   echo "$as_me: failed program was:" >&5
13863   cat conftest.$ac_ext >&5
13864   eval "$as_ac_Header=no"
13865 fi
13866 rm -f conftest.err conftest.$ac_ext
13867 fi
13868 echo "$as_me:13868: result: `eval echo '${'$as_ac_Header'}'`" >&5
13869 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13870 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13871   cat >>confdefs.h <<EOF
13872 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13873 EOF
13874
13875 fi
13876 done
13877
13878 if test "$ISC" = yes ; then
13879
13880 for ac_header in sys/termio.h
13881 do
13882 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13883 echo "$as_me:13883: checking for $ac_header" >&5
13884 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13885 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13886   echo $ECHO_N "(cached) $ECHO_C" >&6
13887 else
13888   cat >conftest.$ac_ext <<_ACEOF
13889 #line 13889 "configure"
13890 #include "confdefs.h"
13891 #include <$ac_header>
13892 _ACEOF
13893 if { (eval echo "$as_me:13893: \"$ac_cpp conftest.$ac_ext\"") >&5
13894   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13895   ac_status=$?
13896   egrep -v '^ *\+' conftest.er1 >conftest.err
13897   rm -f conftest.er1
13898   cat conftest.err >&5
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit $ac_status); } >/dev/null; then
13901   if test -s conftest.err; then
13902     ac_cpp_err=$ac_c_preproc_warn_flag
13903   else
13904     ac_cpp_err=
13905   fi
13906 else
13907   ac_cpp_err=yes
13908 fi
13909 if test -z "$ac_cpp_err"; then
13910   eval "$as_ac_Header=yes"
13911 else
13912   echo "$as_me: failed program was:" >&5
13913   cat conftest.$ac_ext >&5
13914   eval "$as_ac_Header=no"
13915 fi
13916 rm -f conftest.err conftest.$ac_ext
13917 fi
13918 echo "$as_me:13918: result: `eval echo '${'$as_ac_Header'}'`" >&5
13919 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13920 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13921   cat >>confdefs.h <<EOF
13922 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13923 EOF
13924
13925 fi
13926 done
13927
13928 fi
13929 if test "$ac_cv_header_termios_h" = yes ; then
13930         case "$CFLAGS $CPPFLAGS" in
13931         *-D_POSIX_SOURCE*)
13932                 termios_bad=dunno ;;
13933         *)      termios_bad=maybe ;;
13934         esac
13935         if test "$termios_bad" = maybe ; then
13936         echo "$as_me:13936: checking whether termios.h needs _POSIX_SOURCE" >&5
13937 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
13938         cat >conftest.$ac_ext <<_ACEOF
13939 #line 13939 "configure"
13940 #include "confdefs.h"
13941 #include <termios.h>
13942 int
13943 main ()
13944 {
13945 struct termios foo; int x = foo.c_iflag
13946   ;
13947   return 0;
13948 }
13949 _ACEOF
13950 rm -f conftest.$ac_objext
13951 if { (eval echo "$as_me:13951: \"$ac_compile\"") >&5
13952   (eval $ac_compile) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit $ac_status); } &&
13956          { ac_try='test -s conftest.$ac_objext'
13957   { (eval echo "$as_me:13957: \"$ac_try\"") >&5
13958   (eval $ac_try) 2>&5
13959   ac_status=$?
13960   echo "$as_me:13960: \$? = $ac_status" >&5
13961   (exit $ac_status); }; }; then
13962   termios_bad=no
13963 else
13964   echo "$as_me: failed program was:" >&5
13965 cat conftest.$ac_ext >&5
13966
13967                 cat >conftest.$ac_ext <<_ACEOF
13968 #line 13968 "configure"
13969 #include "confdefs.h"
13970
13971 #define _POSIX_SOURCE
13972 #include <termios.h>
13973 int
13974 main ()
13975 {
13976 struct termios foo; int x = foo.c_iflag
13977   ;
13978   return 0;
13979 }
13980 _ACEOF
13981 rm -f conftest.$ac_objext
13982 if { (eval echo "$as_me:13982: \"$ac_compile\"") >&5
13983   (eval $ac_compile) 2>&5
13984   ac_status=$?
13985   echo "$as_me:13985: \$? = $ac_status" >&5
13986   (exit $ac_status); } &&
13987          { ac_try='test -s conftest.$ac_objext'
13988   { (eval echo "$as_me:13988: \"$ac_try\"") >&5
13989   (eval $ac_try) 2>&5
13990   ac_status=$?
13991   echo "$as_me:13991: \$? = $ac_status" >&5
13992   (exit $ac_status); }; }; then
13993   termios_bad=unknown
13994 else
13995   echo "$as_me: failed program was:" >&5
13996 cat conftest.$ac_ext >&5
13997 termios_bad=yes cat >>confdefs.h <<\EOF
13998 #define SVR4_TERMIO 1
13999 EOF
14000
14001 fi
14002 rm -f conftest.$ac_objext conftest.$ac_ext
14003
14004 fi
14005 rm -f conftest.$ac_objext conftest.$ac_ext
14006         echo "$as_me:14006: result: $termios_bad" >&5
14007 echo "${ECHO_T}$termios_bad" >&6
14008         fi
14009 fi
14010
14011 echo "$as_me:14011: checking for tcgetattr" >&5
14012 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14013 if test "${cf_cv_have_tcgetattr+set}" = set; then
14014   echo $ECHO_N "(cached) $ECHO_C" >&6
14015 else
14016
14017 cat >conftest.$ac_ext <<_ACEOF
14018 #line 14018 "configure"
14019 #include "confdefs.h"
14020
14021 #include <sys/types.h>
14022 #ifdef HAVE_UNISTD_H
14023 #include <unistd.h>
14024 #endif
14025 #ifdef HAVE_TERMIOS_H
14026 #include <termios.h>
14027 #define TTY struct termios
14028 #else
14029 #ifdef HAVE_TERMIO_H
14030 #include <termio.h>
14031 #define TTY struct termio
14032 #endif
14033 #endif
14034
14035 int
14036 main ()
14037 {
14038
14039 TTY foo;
14040 tcgetattr(1, &foo);
14041   ;
14042   return 0;
14043 }
14044 _ACEOF
14045 rm -f conftest.$ac_objext conftest$ac_exeext
14046 if { (eval echo "$as_me:14046: \"$ac_link\"") >&5
14047   (eval $ac_link) 2>&5
14048   ac_status=$?
14049   echo "$as_me:14049: \$? = $ac_status" >&5
14050   (exit $ac_status); } &&
14051          { ac_try='test -s conftest$ac_exeext'
14052   { (eval echo "$as_me:14052: \"$ac_try\"") >&5
14053   (eval $ac_try) 2>&5
14054   ac_status=$?
14055   echo "$as_me:14055: \$? = $ac_status" >&5
14056   (exit $ac_status); }; }; then
14057   cf_cv_have_tcgetattr=yes
14058 else
14059   echo "$as_me: failed program was:" >&5
14060 cat conftest.$ac_ext >&5
14061 cf_cv_have_tcgetattr=no
14062 fi
14063 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14064 fi
14065 echo "$as_me:14065: result: $cf_cv_have_tcgetattr" >&5
14066 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14067 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14068 #define HAVE_TCGETATTR 1
14069 EOF
14070
14071 echo "$as_me:14071: checking for vsscanf function or workaround" >&5
14072 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14073 if test "${cf_cv_func_vsscanf+set}" = set; then
14074   echo $ECHO_N "(cached) $ECHO_C" >&6
14075 else
14076
14077 cat >conftest.$ac_ext <<_ACEOF
14078 #line 14078 "configure"
14079 #include "confdefs.h"
14080
14081 #include <stdarg.h>
14082 #include <stdio.h>
14083 int
14084 main ()
14085 {
14086
14087         va_list ap;
14088         vsscanf("from", "%d", ap)
14089   ;
14090   return 0;
14091 }
14092 _ACEOF
14093 rm -f conftest.$ac_objext conftest$ac_exeext
14094 if { (eval echo "$as_me:14094: \"$ac_link\"") >&5
14095   (eval $ac_link) 2>&5
14096   ac_status=$?
14097   echo "$as_me:14097: \$? = $ac_status" >&5
14098   (exit $ac_status); } &&
14099          { ac_try='test -s conftest$ac_exeext'
14100   { (eval echo "$as_me:14100: \"$ac_try\"") >&5
14101   (eval $ac_try) 2>&5
14102   ac_status=$?
14103   echo "$as_me:14103: \$? = $ac_status" >&5
14104   (exit $ac_status); }; }; then
14105   cf_cv_func_vsscanf=vsscanf
14106 else
14107   echo "$as_me: failed program was:" >&5
14108 cat conftest.$ac_ext >&5
14109
14110 cat >conftest.$ac_ext <<_ACEOF
14111 #line 14111 "configure"
14112 #include "confdefs.h"
14113
14114 #include <stdarg.h>
14115 #include <stdio.h>
14116 int
14117 main ()
14118 {
14119
14120     FILE strbuf;
14121     char *str = "from";
14122
14123     strbuf._flag = _IOREAD;
14124     strbuf._ptr = strbuf._base = (unsigned char *) str;
14125     strbuf._cnt = strlen(str);
14126     strbuf._file = _NFILE;
14127     return (vfscanf(&strbuf, "%d", ap))
14128   ;
14129   return 0;
14130 }
14131 _ACEOF
14132 rm -f conftest.$ac_objext conftest$ac_exeext
14133 if { (eval echo "$as_me:14133: \"$ac_link\"") >&5
14134   (eval $ac_link) 2>&5
14135   ac_status=$?
14136   echo "$as_me:14136: \$? = $ac_status" >&5
14137   (exit $ac_status); } &&
14138          { ac_try='test -s conftest$ac_exeext'
14139   { (eval echo "$as_me:14139: \"$ac_try\"") >&5
14140   (eval $ac_try) 2>&5
14141   ac_status=$?
14142   echo "$as_me:14142: \$? = $ac_status" >&5
14143   (exit $ac_status); }; }; then
14144   cf_cv_func_vsscanf=vfscanf
14145 else
14146   echo "$as_me: failed program was:" >&5
14147 cat conftest.$ac_ext >&5
14148
14149 cat >conftest.$ac_ext <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152
14153 #include <stdarg.h>
14154 #include <stdio.h>
14155 int
14156 main ()
14157 {
14158
14159     FILE strbuf;
14160     char *str = "from";
14161
14162     strbuf._flag = _IOREAD;
14163     strbuf._ptr = strbuf._base = (unsigned char *) str;
14164     strbuf._cnt = strlen(str);
14165     strbuf._file = _NFILE;
14166     return (_doscan(&strbuf, "%d", ap))
14167   ;
14168   return 0;
14169 }
14170 _ACEOF
14171 rm -f conftest.$ac_objext conftest$ac_exeext
14172 if { (eval echo "$as_me:14172: \"$ac_link\"") >&5
14173   (eval $ac_link) 2>&5
14174   ac_status=$?
14175   echo "$as_me:14175: \$? = $ac_status" >&5
14176   (exit $ac_status); } &&
14177          { ac_try='test -s conftest$ac_exeext'
14178   { (eval echo "$as_me:14178: \"$ac_try\"") >&5
14179   (eval $ac_try) 2>&5
14180   ac_status=$?
14181   echo "$as_me:14181: \$? = $ac_status" >&5
14182   (exit $ac_status); }; }; then
14183   cf_cv_func_vsscanf=_doscan
14184 else
14185   echo "$as_me: failed program was:" >&5
14186 cat conftest.$ac_ext >&5
14187
14188 cf_cv_func_vsscanf=no
14189 fi
14190 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14191 fi
14192 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14193 fi
14194 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14195 fi
14196 echo "$as_me:14196: result: $cf_cv_func_vsscanf" >&5
14197 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14198
14199 case $cf_cv_func_vsscanf in #(vi
14200 vsscanf) cat >>confdefs.h <<\EOF
14201 #define HAVE_VSSCANF 1
14202 EOF
14203 ;; #(vi
14204 vfscanf) cat >>confdefs.h <<\EOF
14205 #define HAVE_VFSCANF 1
14206 EOF
14207 ;; #(vi
14208 _doscan) cat >>confdefs.h <<\EOF
14209 #define HAVE__DOSCAN 1
14210 EOF
14211 ;;
14212 esac
14213
14214 echo "$as_me:14214: checking for working mkstemp" >&5
14215 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14216 if test "${cf_cv_func_mkstemp+set}" = set; then
14217   echo $ECHO_N "(cached) $ECHO_C" >&6
14218 else
14219
14220 rm -f conftest*
14221 if test "$cross_compiling" = yes; then
14222   echo "$as_me:14222: checking for mkstemp" >&5
14223 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14224 if test "${ac_cv_func_mkstemp+set}" = set; then
14225   echo $ECHO_N "(cached) $ECHO_C" >&6
14226 else
14227   cat >conftest.$ac_ext <<_ACEOF
14228 #line 14228 "configure"
14229 #include "confdefs.h"
14230 /* System header to define __stub macros and hopefully few prototypes,
14231     which can conflict with char mkstemp (); below.  */
14232 #include <assert.h>
14233 /* Override any gcc2 internal prototype to avoid an error.  */
14234 #ifdef __cplusplus
14235 extern "C"
14236 #endif
14237 /* We use char because int might match the return type of a gcc2
14238    builtin and then its argument prototype would still apply.  */
14239 char mkstemp ();
14240 char (*f) ();
14241
14242 int
14243 main ()
14244 {
14245 /* The GNU C library defines this for functions which it implements
14246     to always fail with ENOSYS.  Some functions are actually named
14247     something starting with __ and the normal name is an alias.  */
14248 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14249 choke me
14250 #else
14251 f = mkstemp;
14252 #endif
14253
14254   ;
14255   return 0;
14256 }
14257 _ACEOF
14258 rm -f conftest.$ac_objext conftest$ac_exeext
14259 if { (eval echo "$as_me:14259: \"$ac_link\"") >&5
14260   (eval $ac_link) 2>&5
14261   ac_status=$?
14262   echo "$as_me:14262: \$? = $ac_status" >&5
14263   (exit $ac_status); } &&
14264          { ac_try='test -s conftest$ac_exeext'
14265   { (eval echo "$as_me:14265: \"$ac_try\"") >&5
14266   (eval $ac_try) 2>&5
14267   ac_status=$?
14268   echo "$as_me:14268: \$? = $ac_status" >&5
14269   (exit $ac_status); }; }; then
14270   ac_cv_func_mkstemp=yes
14271 else
14272   echo "$as_me: failed program was:" >&5
14273 cat conftest.$ac_ext >&5
14274 ac_cv_func_mkstemp=no
14275 fi
14276 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14277 fi
14278 echo "$as_me:14278: result: $ac_cv_func_mkstemp" >&5
14279 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14280
14281 else
14282   cat >conftest.$ac_ext <<_ACEOF
14283 #line 14283 "configure"
14284 #include "confdefs.h"
14285
14286 #include <sys/types.h>
14287 #include <stdlib.h>
14288 #include <stdio.h>
14289 #include <string.h>
14290 #include <sys/stat.h>
14291 int main()
14292 {
14293         char *tmpl = "conftestXXXXXX";
14294         char name[2][80];
14295         int n;
14296         int result = 0;
14297         int fd;
14298         struct stat sb;
14299
14300         umask(077);
14301         for (n = 0; n < 2; ++n) {
14302                 strcpy(name[n], tmpl);
14303                 if ((fd = mkstemp(name[n])) >= 0) {
14304                         if (!strcmp(name[n], tmpl)
14305                          || stat(name[n], &sb) != 0
14306                          || (sb.st_mode & S_IFMT) != S_IFREG
14307                          || (sb.st_mode & 077) != 0) {
14308                                 result = 1;
14309                         }
14310                         close(fd);
14311                 }
14312         }
14313         if (result == 0
14314          && !strcmp(name[0], name[1]))
14315                 result = 1;
14316         ${cf_cv_main_return:-return}(result);
14317 }
14318
14319 _ACEOF
14320 rm -f conftest$ac_exeext
14321 if { (eval echo "$as_me:14321: \"$ac_link\"") >&5
14322   (eval $ac_link) 2>&5
14323   ac_status=$?
14324   echo "$as_me:14324: \$? = $ac_status" >&5
14325   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14326   { (eval echo "$as_me:14326: \"$ac_try\"") >&5
14327   (eval $ac_try) 2>&5
14328   ac_status=$?
14329   echo "$as_me:14329: \$? = $ac_status" >&5
14330   (exit $ac_status); }; }; then
14331   cf_cv_func_mkstemp=yes
14332
14333 else
14334   echo "$as_me: program exited with status $ac_status" >&5
14335 echo "$as_me: failed program was:" >&5
14336 cat conftest.$ac_ext >&5
14337 cf_cv_func_mkstemp=no
14338
14339 fi
14340 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14341 fi
14342
14343 fi
14344 echo "$as_me:14344: result: $cf_cv_func_mkstemp" >&5
14345 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14346 if test "$cf_cv_func_mkstemp" = yes ; then
14347         cat >>confdefs.h <<\EOF
14348 #define HAVE_MKSTEMP 1
14349 EOF
14350
14351 fi
14352
14353 # setup for prototype of fallback for vsscanf()
14354
14355 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14356         HAVE_VSSCANF=1
14357 else
14358         HAVE_VSSCANF=0
14359 fi
14360
14361 if test "$cross_compiling" = yes ; then
14362         { echo "$as_me:14362: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14363 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14364 else
14365         echo "$as_me:14365: checking whether setvbuf arguments are reversed" >&5
14366 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14367 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14368   echo $ECHO_N "(cached) $ECHO_C" >&6
14369 else
14370   if test "$cross_compiling" = yes; then
14371   { { echo "$as_me:14371: error: cannot run test program while cross compiling" >&5
14372 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14373    { (exit 1); exit 1; }; }
14374 else
14375   cat >conftest.$ac_ext <<_ACEOF
14376 #line 14376 "configure"
14377 #include "confdefs.h"
14378 #include <stdio.h>
14379 /* If setvbuf has the reversed format, exit 0. */
14380 int
14381 main ()
14382 {
14383   /* This call has the arguments reversed.
14384      A reversed system may check and see that the address of main
14385      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14386   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14387     $ac_main_return(1);
14388   putc('\r', stdout);
14389   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14390 }
14391 _ACEOF
14392 rm -f conftest$ac_exeext
14393 if { (eval echo "$as_me:14393: \"$ac_link\"") >&5
14394   (eval $ac_link) 2>&5
14395   ac_status=$?
14396   echo "$as_me:14396: \$? = $ac_status" >&5
14397   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14398   { (eval echo "$as_me:14398: \"$ac_try\"") >&5
14399   (eval $ac_try) 2>&5
14400   ac_status=$?
14401   echo "$as_me:14401: \$? = $ac_status" >&5
14402   (exit $ac_status); }; }; then
14403   ac_cv_func_setvbuf_reversed=yes
14404 else
14405   echo "$as_me: program exited with status $ac_status" >&5
14406 echo "$as_me: failed program was:" >&5
14407 cat conftest.$ac_ext >&5
14408 ac_cv_func_setvbuf_reversed=no
14409 fi
14410 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14411 fi
14412 rm -f core core.* *.core
14413 fi
14414 echo "$as_me:14414: result: $ac_cv_func_setvbuf_reversed" >&5
14415 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14416 if test $ac_cv_func_setvbuf_reversed = yes; then
14417
14418 cat >>confdefs.h <<\EOF
14419 #define SETVBUF_REVERSED 1
14420 EOF
14421
14422 fi
14423
14424 fi
14425 echo "$as_me:14425: checking return type of signal handlers" >&5
14426 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14427 if test "${ac_cv_type_signal+set}" = set; then
14428   echo $ECHO_N "(cached) $ECHO_C" >&6
14429 else
14430   cat >conftest.$ac_ext <<_ACEOF
14431 #line 14431 "configure"
14432 #include "confdefs.h"
14433 #include <sys/types.h>
14434 #include <signal.h>
14435 #ifdef signal
14436 # undef signal
14437 #endif
14438 #ifdef __cplusplus
14439 extern "C" void (*signal (int, void (*)(int)))(int);
14440 #else
14441 void (*signal ()) ();
14442 #endif
14443
14444 int
14445 main ()
14446 {
14447 int i;
14448   ;
14449   return 0;
14450 }
14451 _ACEOF
14452 rm -f conftest.$ac_objext
14453 if { (eval echo "$as_me:14453: \"$ac_compile\"") >&5
14454   (eval $ac_compile) 2>&5
14455   ac_status=$?
14456   echo "$as_me:14456: \$? = $ac_status" >&5
14457   (exit $ac_status); } &&
14458          { ac_try='test -s conftest.$ac_objext'
14459   { (eval echo "$as_me:14459: \"$ac_try\"") >&5
14460   (eval $ac_try) 2>&5
14461   ac_status=$?
14462   echo "$as_me:14462: \$? = $ac_status" >&5
14463   (exit $ac_status); }; }; then
14464   ac_cv_type_signal=void
14465 else
14466   echo "$as_me: failed program was:" >&5
14467 cat conftest.$ac_ext >&5
14468 ac_cv_type_signal=int
14469 fi
14470 rm -f conftest.$ac_objext conftest.$ac_ext
14471 fi
14472 echo "$as_me:14472: result: $ac_cv_type_signal" >&5
14473 echo "${ECHO_T}$ac_cv_type_signal" >&6
14474
14475 cat >>confdefs.h <<EOF
14476 #define RETSIGTYPE $ac_cv_type_signal
14477 EOF
14478
14479 echo "$as_me:14479: checking for type sigaction_t" >&5
14480 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14481 if test "${cf_cv_type_sigaction+set}" = set; then
14482   echo $ECHO_N "(cached) $ECHO_C" >&6
14483 else
14484
14485         cat >conftest.$ac_ext <<_ACEOF
14486 #line 14486 "configure"
14487 #include "confdefs.h"
14488
14489 #include <signal.h>
14490 int
14491 main ()
14492 {
14493 sigaction_t x
14494   ;
14495   return 0;
14496 }
14497 _ACEOF
14498 rm -f conftest.$ac_objext
14499 if { (eval echo "$as_me:14499: \"$ac_compile\"") >&5
14500   (eval $ac_compile) 2>&5
14501   ac_status=$?
14502   echo "$as_me:14502: \$? = $ac_status" >&5
14503   (exit $ac_status); } &&
14504          { ac_try='test -s conftest.$ac_objext'
14505   { (eval echo "$as_me:14505: \"$ac_try\"") >&5
14506   (eval $ac_try) 2>&5
14507   ac_status=$?
14508   echo "$as_me:14508: \$? = $ac_status" >&5
14509   (exit $ac_status); }; }; then
14510   cf_cv_type_sigaction=yes
14511 else
14512   echo "$as_me: failed program was:" >&5
14513 cat conftest.$ac_ext >&5
14514 cf_cv_type_sigaction=no
14515 fi
14516 rm -f conftest.$ac_objext conftest.$ac_ext
14517 fi
14518
14519 echo "$as_me:14519: result: $cf_cv_type_sigaction" >&5
14520 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14521 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14522 #define HAVE_TYPE_SIGACTION 1
14523 EOF
14524
14525 echo "$as_me:14525: checking declaration of size-change" >&5
14526 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14527 if test "${cf_cv_sizechange+set}" = set; then
14528   echo $ECHO_N "(cached) $ECHO_C" >&6
14529 else
14530
14531     cf_cv_sizechange=unknown
14532     cf_save_CPPFLAGS="$CPPFLAGS"
14533
14534 for cf_opts in "" "NEED_PTEM_H"
14535 do
14536
14537     CPPFLAGS="$cf_save_CPPFLAGS"
14538     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14539     cat >conftest.$ac_ext <<_ACEOF
14540 #line 14540 "configure"
14541 #include "confdefs.h"
14542 #include <sys/types.h>
14543 #ifdef HAVE_TERMIOS_H
14544 #include <termios.h>
14545 #else
14546 #ifdef HAVE_TERMIO_H
14547 #include <termio.h>
14548 #endif
14549 #endif
14550 #ifdef NEED_PTEM_H
14551 /* This is a workaround for SCO:  they neglected to define struct winsize in
14552  * termios.h -- it's only in termio.h and ptem.h
14553  */
14554 #include        <sys/stream.h>
14555 #include        <sys/ptem.h>
14556 #endif
14557 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14558 #include <sys/ioctl.h>
14559 #endif
14560
14561 int
14562 main ()
14563 {
14564
14565 #ifdef TIOCGSIZE
14566         struct ttysize win;     /* FIXME: what system is this? */
14567         int y = win.ts_lines;
14568         int x = win.ts_cols;
14569 #else
14570 #ifdef TIOCGWINSZ
14571         struct winsize win;
14572         int y = win.ws_row;
14573         int x = win.ws_col;
14574 #else
14575         no TIOCGSIZE or TIOCGWINSZ
14576 #endif /* TIOCGWINSZ */
14577 #endif /* TIOCGSIZE */
14578
14579   ;
14580   return 0;
14581 }
14582 _ACEOF
14583 rm -f conftest.$ac_objext
14584 if { (eval echo "$as_me:14584: \"$ac_compile\"") >&5
14585   (eval $ac_compile) 2>&5
14586   ac_status=$?
14587   echo "$as_me:14587: \$? = $ac_status" >&5
14588   (exit $ac_status); } &&
14589          { ac_try='test -s conftest.$ac_objext'
14590   { (eval echo "$as_me:14590: \"$ac_try\"") >&5
14591   (eval $ac_try) 2>&5
14592   ac_status=$?
14593   echo "$as_me:14593: \$? = $ac_status" >&5
14594   (exit $ac_status); }; }; then
14595   cf_cv_sizechange=yes
14596 else
14597   echo "$as_me: failed program was:" >&5
14598 cat conftest.$ac_ext >&5
14599 cf_cv_sizechange=no
14600 fi
14601 rm -f conftest.$ac_objext conftest.$ac_ext
14602
14603         CPPFLAGS="$cf_save_CPPFLAGS"
14604         if test "$cf_cv_sizechange" = yes ; then
14605                 echo "size-change succeeded ($cf_opts)" >&5
14606                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14607                 break
14608         fi
14609 done
14610
14611 fi
14612 echo "$as_me:14612: result: $cf_cv_sizechange" >&5
14613 echo "${ECHO_T}$cf_cv_sizechange" >&6
14614 if test "$cf_cv_sizechange" != no ; then
14615         cat >>confdefs.h <<\EOF
14616 #define HAVE_SIZECHANGE 1
14617 EOF
14618
14619         case $cf_cv_sizechange in #(vi
14620         NEED*)
14621                 cat >>confdefs.h <<EOF
14622 #define $cf_cv_sizechange  1
14623 EOF
14624
14625                 ;;
14626         esac
14627 fi
14628
14629 echo "$as_me:14629: checking for memmove" >&5
14630 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
14631 if test "${ac_cv_func_memmove+set}" = set; then
14632   echo $ECHO_N "(cached) $ECHO_C" >&6
14633 else
14634   cat >conftest.$ac_ext <<_ACEOF
14635 #line 14635 "configure"
14636 #include "confdefs.h"
14637 /* System header to define __stub macros and hopefully few prototypes,
14638     which can conflict with char memmove (); below.  */
14639 #include <assert.h>
14640 /* Override any gcc2 internal prototype to avoid an error.  */
14641 #ifdef __cplusplus
14642 extern "C"
14643 #endif
14644 /* We use char because int might match the return type of a gcc2
14645    builtin and then its argument prototype would still apply.  */
14646 char memmove ();
14647 char (*f) ();
14648
14649 int
14650 main ()
14651 {
14652 /* The GNU C library defines this for functions which it implements
14653     to always fail with ENOSYS.  Some functions are actually named
14654     something starting with __ and the normal name is an alias.  */
14655 #if defined (__stub_memmove) || defined (__stub___memmove)
14656 choke me
14657 #else
14658 f = memmove;
14659 #endif
14660
14661   ;
14662   return 0;
14663 }
14664 _ACEOF
14665 rm -f conftest.$ac_objext conftest$ac_exeext
14666 if { (eval echo "$as_me:14666: \"$ac_link\"") >&5
14667   (eval $ac_link) 2>&5
14668   ac_status=$?
14669   echo "$as_me:14669: \$? = $ac_status" >&5
14670   (exit $ac_status); } &&
14671          { ac_try='test -s conftest$ac_exeext'
14672   { (eval echo "$as_me:14672: \"$ac_try\"") >&5
14673   (eval $ac_try) 2>&5
14674   ac_status=$?
14675   echo "$as_me:14675: \$? = $ac_status" >&5
14676   (exit $ac_status); }; }; then
14677   ac_cv_func_memmove=yes
14678 else
14679   echo "$as_me: failed program was:" >&5
14680 cat conftest.$ac_ext >&5
14681 ac_cv_func_memmove=no
14682 fi
14683 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14684 fi
14685 echo "$as_me:14685: result: $ac_cv_func_memmove" >&5
14686 echo "${ECHO_T}$ac_cv_func_memmove" >&6
14687 if test $ac_cv_func_memmove = yes; then
14688   :
14689 else
14690
14691 echo "$as_me:14691: checking for bcopy" >&5
14692 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
14693 if test "${ac_cv_func_bcopy+set}" = set; then
14694   echo $ECHO_N "(cached) $ECHO_C" >&6
14695 else
14696   cat >conftest.$ac_ext <<_ACEOF
14697 #line 14697 "configure"
14698 #include "confdefs.h"
14699 /* System header to define __stub macros and hopefully few prototypes,
14700     which can conflict with char bcopy (); below.  */
14701 #include <assert.h>
14702 /* Override any gcc2 internal prototype to avoid an error.  */
14703 #ifdef __cplusplus
14704 extern "C"
14705 #endif
14706 /* We use char because int might match the return type of a gcc2
14707    builtin and then its argument prototype would still apply.  */
14708 char bcopy ();
14709 char (*f) ();
14710
14711 int
14712 main ()
14713 {
14714 /* The GNU C library defines this for functions which it implements
14715     to always fail with ENOSYS.  Some functions are actually named
14716     something starting with __ and the normal name is an alias.  */
14717 #if defined (__stub_bcopy) || defined (__stub___bcopy)
14718 choke me
14719 #else
14720 f = bcopy;
14721 #endif
14722
14723   ;
14724   return 0;
14725 }
14726 _ACEOF
14727 rm -f conftest.$ac_objext conftest$ac_exeext
14728 if { (eval echo "$as_me:14728: \"$ac_link\"") >&5
14729   (eval $ac_link) 2>&5
14730   ac_status=$?
14731   echo "$as_me:14731: \$? = $ac_status" >&5
14732   (exit $ac_status); } &&
14733          { ac_try='test -s conftest$ac_exeext'
14734   { (eval echo "$as_me:14734: \"$ac_try\"") >&5
14735   (eval $ac_try) 2>&5
14736   ac_status=$?
14737   echo "$as_me:14737: \$? = $ac_status" >&5
14738   (exit $ac_status); }; }; then
14739   ac_cv_func_bcopy=yes
14740 else
14741   echo "$as_me: failed program was:" >&5
14742 cat conftest.$ac_ext >&5
14743 ac_cv_func_bcopy=no
14744 fi
14745 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14746 fi
14747 echo "$as_me:14747: result: $ac_cv_func_bcopy" >&5
14748 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
14749 if test $ac_cv_func_bcopy = yes; then
14750
14751         echo "$as_me:14751: checking if bcopy does overlapping moves" >&5
14752 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
14753 if test "${cf_cv_good_bcopy+set}" = set; then
14754   echo $ECHO_N "(cached) $ECHO_C" >&6
14755 else
14756
14757                 if test "$cross_compiling" = yes; then
14758   cf_cv_good_bcopy=unknown
14759 else
14760   cat >conftest.$ac_ext <<_ACEOF
14761 #line 14761 "configure"
14762 #include "confdefs.h"
14763
14764 int main() {
14765         static char data[] = "abcdefghijklmnopqrstuwwxyz";
14766         char temp[40];
14767         bcopy(data, temp, sizeof(data));
14768         bcopy(temp+10, temp, 15);
14769         bcopy(temp+5, temp+15, 10);
14770         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
14771 }
14772
14773 _ACEOF
14774 rm -f conftest$ac_exeext
14775 if { (eval echo "$as_me:14775: \"$ac_link\"") >&5
14776   (eval $ac_link) 2>&5
14777   ac_status=$?
14778   echo "$as_me:14778: \$? = $ac_status" >&5
14779   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14780   { (eval echo "$as_me:14780: \"$ac_try\"") >&5
14781   (eval $ac_try) 2>&5
14782   ac_status=$?
14783   echo "$as_me:14783: \$? = $ac_status" >&5
14784   (exit $ac_status); }; }; then
14785   cf_cv_good_bcopy=yes
14786 else
14787   echo "$as_me: program exited with status $ac_status" >&5
14788 echo "$as_me: failed program was:" >&5
14789 cat conftest.$ac_ext >&5
14790 cf_cv_good_bcopy=no
14791 fi
14792 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14793 fi
14794
14795 fi
14796 echo "$as_me:14796: result: $cf_cv_good_bcopy" >&5
14797 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
14798
14799 else
14800   cf_cv_good_bcopy=no
14801 fi
14802
14803         if test "$cf_cv_good_bcopy" = yes ; then
14804                 cat >>confdefs.h <<\EOF
14805 #define USE_OK_BCOPY 1
14806 EOF
14807
14808         else
14809                 cat >>confdefs.h <<\EOF
14810 #define USE_MY_MEMMOVE 1
14811 EOF
14812
14813         fi
14814
14815 fi
14816
14817 echo "$as_me:14817: checking if poll really works" >&5
14818 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
14819 if test "${cf_cv_working_poll+set}" = set; then
14820   echo $ECHO_N "(cached) $ECHO_C" >&6
14821 else
14822
14823 if test "$cross_compiling" = yes; then
14824   cf_cv_working_poll=unknown
14825 else
14826   cat >conftest.$ac_ext <<_ACEOF
14827 #line 14827 "configure"
14828 #include "confdefs.h"
14829
14830 #include <stdio.h>
14831 #ifdef HAVE_POLL_H
14832 #include <poll.h>
14833 #else
14834 #include <sys/poll.h>
14835 #endif
14836 int main() {
14837         struct pollfd myfds;
14838         int ret;
14839
14840         myfds.fd = 0;
14841         myfds.events = POLLIN;
14842
14843         ret = poll(&myfds, 1, 100);
14844         ${cf_cv_main_return:-return}(ret != 0);
14845 }
14846 _ACEOF
14847 rm -f conftest$ac_exeext
14848 if { (eval echo "$as_me:14848: \"$ac_link\"") >&5
14849   (eval $ac_link) 2>&5
14850   ac_status=$?
14851   echo "$as_me:14851: \$? = $ac_status" >&5
14852   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14853   { (eval echo "$as_me:14853: \"$ac_try\"") >&5
14854   (eval $ac_try) 2>&5
14855   ac_status=$?
14856   echo "$as_me:14856: \$? = $ac_status" >&5
14857   (exit $ac_status); }; }; then
14858   cf_cv_working_poll=yes
14859 else
14860   echo "$as_me: program exited with status $ac_status" >&5
14861 echo "$as_me: failed program was:" >&5
14862 cat conftest.$ac_ext >&5
14863 cf_cv_working_poll=no
14864 fi
14865 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14866 fi
14867 fi
14868 echo "$as_me:14868: result: $cf_cv_working_poll" >&5
14869 echo "${ECHO_T}$cf_cv_working_poll" >&6
14870 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
14871 #define HAVE_WORKING_POLL 1
14872 EOF
14873
14874 echo "$as_me:14874: checking for pid_t" >&5
14875 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
14876 if test "${ac_cv_type_pid_t+set}" = set; then
14877   echo $ECHO_N "(cached) $ECHO_C" >&6
14878 else
14879   cat >conftest.$ac_ext <<_ACEOF
14880 #line 14880 "configure"
14881 #include "confdefs.h"
14882 $ac_includes_default
14883 int
14884 main ()
14885 {
14886 if ((pid_t *) 0)
14887   return 0;
14888 if (sizeof (pid_t))
14889   return 0;
14890   ;
14891   return 0;
14892 }
14893 _ACEOF
14894 rm -f conftest.$ac_objext
14895 if { (eval echo "$as_me:14895: \"$ac_compile\"") >&5
14896   (eval $ac_compile) 2>&5
14897   ac_status=$?
14898   echo "$as_me:14898: \$? = $ac_status" >&5
14899   (exit $ac_status); } &&
14900          { ac_try='test -s conftest.$ac_objext'
14901   { (eval echo "$as_me:14901: \"$ac_try\"") >&5
14902   (eval $ac_try) 2>&5
14903   ac_status=$?
14904   echo "$as_me:14904: \$? = $ac_status" >&5
14905   (exit $ac_status); }; }; then
14906   ac_cv_type_pid_t=yes
14907 else
14908   echo "$as_me: failed program was:" >&5
14909 cat conftest.$ac_ext >&5
14910 ac_cv_type_pid_t=no
14911 fi
14912 rm -f conftest.$ac_objext conftest.$ac_ext
14913 fi
14914 echo "$as_me:14914: result: $ac_cv_type_pid_t" >&5
14915 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
14916 if test $ac_cv_type_pid_t = yes; then
14917   :
14918 else
14919
14920 cat >>confdefs.h <<EOF
14921 #define pid_t int
14922 EOF
14923
14924 fi
14925
14926 for ac_header in unistd.h vfork.h
14927 do
14928 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14929 echo "$as_me:14929: checking for $ac_header" >&5
14930 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14931 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14932   echo $ECHO_N "(cached) $ECHO_C" >&6
14933 else
14934   cat >conftest.$ac_ext <<_ACEOF
14935 #line 14935 "configure"
14936 #include "confdefs.h"
14937 #include <$ac_header>
14938 _ACEOF
14939 if { (eval echo "$as_me:14939: \"$ac_cpp conftest.$ac_ext\"") >&5
14940   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14941   ac_status=$?
14942   egrep -v '^ *\+' conftest.er1 >conftest.err
14943   rm -f conftest.er1
14944   cat conftest.err >&5
14945   echo "$as_me:14945: \$? = $ac_status" >&5
14946   (exit $ac_status); } >/dev/null; then
14947   if test -s conftest.err; then
14948     ac_cpp_err=$ac_c_preproc_warn_flag
14949   else
14950     ac_cpp_err=
14951   fi
14952 else
14953   ac_cpp_err=yes
14954 fi
14955 if test -z "$ac_cpp_err"; then
14956   eval "$as_ac_Header=yes"
14957 else
14958   echo "$as_me: failed program was:" >&5
14959   cat conftest.$ac_ext >&5
14960   eval "$as_ac_Header=no"
14961 fi
14962 rm -f conftest.err conftest.$ac_ext
14963 fi
14964 echo "$as_me:14964: result: `eval echo '${'$as_ac_Header'}'`" >&5
14965 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14966 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14967   cat >>confdefs.h <<EOF
14968 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14969 EOF
14970
14971 fi
14972 done
14973
14974 for ac_func in fork vfork
14975 do
14976 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14977 echo "$as_me:14977: checking for $ac_func" >&5
14978 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14979 if eval "test \"\${$as_ac_var+set}\" = set"; then
14980   echo $ECHO_N "(cached) $ECHO_C" >&6
14981 else
14982   cat >conftest.$ac_ext <<_ACEOF
14983 #line 14983 "configure"
14984 #include "confdefs.h"
14985 /* System header to define __stub macros and hopefully few prototypes,
14986     which can conflict with char $ac_func (); below.  */
14987 #include <assert.h>
14988 /* Override any gcc2 internal prototype to avoid an error.  */
14989 #ifdef __cplusplus
14990 extern "C"
14991 #endif
14992 /* We use char because int might match the return type of a gcc2
14993    builtin and then its argument prototype would still apply.  */
14994 char $ac_func ();
14995 char (*f) ();
14996
14997 int
14998 main ()
14999 {
15000 /* The GNU C library defines this for functions which it implements
15001     to always fail with ENOSYS.  Some functions are actually named
15002     something starting with __ and the normal name is an alias.  */
15003 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15004 choke me
15005 #else
15006 f = $ac_func;
15007 #endif
15008
15009   ;
15010   return 0;
15011 }
15012 _ACEOF
15013 rm -f conftest.$ac_objext conftest$ac_exeext
15014 if { (eval echo "$as_me:15014: \"$ac_link\"") >&5
15015   (eval $ac_link) 2>&5
15016   ac_status=$?
15017   echo "$as_me:15017: \$? = $ac_status" >&5
15018   (exit $ac_status); } &&
15019          { ac_try='test -s conftest$ac_exeext'
15020   { (eval echo "$as_me:15020: \"$ac_try\"") >&5
15021   (eval $ac_try) 2>&5
15022   ac_status=$?
15023   echo "$as_me:15023: \$? = $ac_status" >&5
15024   (exit $ac_status); }; }; then
15025   eval "$as_ac_var=yes"
15026 else
15027   echo "$as_me: failed program was:" >&5
15028 cat conftest.$ac_ext >&5
15029 eval "$as_ac_var=no"
15030 fi
15031 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15032 fi
15033 echo "$as_me:15033: result: `eval echo '${'$as_ac_var'}'`" >&5
15034 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15035 if test `eval echo '${'$as_ac_var'}'` = yes; then
15036   cat >>confdefs.h <<EOF
15037 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15038 EOF
15039
15040 fi
15041 done
15042
15043 ac_cv_func_fork_works=$ac_cv_func_fork
15044 if test "x$ac_cv_func_fork" = xyes; then
15045   echo "$as_me:15045: checking for working fork" >&5
15046 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15047 if test "${ac_cv_func_fork_works+set}" = set; then
15048   echo $ECHO_N "(cached) $ECHO_C" >&6
15049 else
15050   if test "$cross_compiling" = yes; then
15051   ac_cv_func_fork_works=cross
15052 else
15053   cat >conftest.$ac_ext <<_ACEOF
15054 /* By Rüdiger Kuhlmann. */
15055       #include <sys/types.h>
15056       #if HAVE_UNISTD_H
15057       # include <unistd.h>
15058       #endif
15059       /* Some systems only have a dummy stub for fork() */
15060       int main ()
15061       {
15062         if (fork() < 0)
15063           $ac_main_return (1);
15064         $ac_main_return (0);
15065       }
15066 _ACEOF
15067 rm -f conftest$ac_exeext
15068 if { (eval echo "$as_me:15068: \"$ac_link\"") >&5
15069   (eval $ac_link) 2>&5
15070   ac_status=$?
15071   echo "$as_me:15071: \$? = $ac_status" >&5
15072   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15073   { (eval echo "$as_me:15073: \"$ac_try\"") >&5
15074   (eval $ac_try) 2>&5
15075   ac_status=$?
15076   echo "$as_me:15076: \$? = $ac_status" >&5
15077   (exit $ac_status); }; }; then
15078   ac_cv_func_fork_works=yes
15079 else
15080   echo "$as_me: program exited with status $ac_status" >&5
15081 echo "$as_me: failed program was:" >&5
15082 cat conftest.$ac_ext >&5
15083 ac_cv_func_fork_works=no
15084 fi
15085 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15086 fi
15087 fi
15088 echo "$as_me:15088: result: $ac_cv_func_fork_works" >&5
15089 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15090
15091 fi
15092 if test "x$ac_cv_func_fork_works" = xcross; then
15093   case $host in
15094     *-*-amigaos* | *-*-msdosdjgpp*)
15095       # Override, as these systems have only a dummy fork() stub
15096       ac_cv_func_fork_works=no
15097       ;;
15098     *)
15099       ac_cv_func_fork_works=yes
15100       ;;
15101   esac
15102   { echo "$as_me:15102: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15103 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15104 fi
15105 ac_cv_func_vfork_works=$ac_cv_func_vfork
15106 if test "x$ac_cv_func_vfork" = xyes; then
15107   echo "$as_me:15107: checking for working vfork" >&5
15108 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15109 if test "${ac_cv_func_vfork_works+set}" = set; then
15110   echo $ECHO_N "(cached) $ECHO_C" >&6
15111 else
15112   if test "$cross_compiling" = yes; then
15113   ac_cv_func_vfork_works=cross
15114 else
15115   cat >conftest.$ac_ext <<_ACEOF
15116 #line 15116 "configure"
15117 #include "confdefs.h"
15118 /* Thanks to Paul Eggert for this test.  */
15119 #include <stdio.h>
15120 #include <sys/types.h>
15121 #include <sys/stat.h>
15122 #if HAVE_UNISTD_H
15123 # include <unistd.h>
15124 #endif
15125 #if HAVE_VFORK_H
15126 # include <vfork.h>
15127 #endif
15128 /* On some sparc systems, changes by the child to local and incoming
15129    argument registers are propagated back to the parent.  The compiler
15130    is told about this with #include <vfork.h>, but some compilers
15131    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15132    static variable whose address is put into a register that is
15133    clobbered by the vfork.  */
15134 static
15135 #ifdef __cplusplus
15136 sparc_address_test (int arg)
15137 # else
15138 sparc_address_test (arg) int arg;
15139 #endif
15140 {
15141   static pid_t child;
15142   if (!child) {
15143     child = vfork ();
15144     if (child < 0) {
15145       perror ("vfork");
15146       _exit(2);
15147     }
15148     if (!child) {
15149       arg = getpid();
15150       write(-1, "", 0);
15151       _exit (arg);
15152     }
15153   }
15154 }
15155
15156 int
15157 main ()
15158 {
15159   pid_t parent = getpid ();
15160   pid_t child;
15161
15162   sparc_address_test ();
15163
15164   child = vfork ();
15165
15166   if (child == 0) {
15167     /* Here is another test for sparc vfork register problems.  This
15168        test uses lots of local variables, at least as many local
15169        variables as main has allocated so far including compiler
15170        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15171        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15172        reuse the register of parent for one of the local variables,
15173        since it will think that parent can't possibly be used any more
15174        in this routine.  Assigning to the local variable will thus
15175        munge parent in the parent process.  */
15176     pid_t
15177       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15178       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15179     /* Convince the compiler that p..p7 are live; otherwise, it might
15180        use the same hardware register for all 8 local variables.  */
15181     if (p != p1 || p != p2 || p != p3 || p != p4
15182         || p != p5 || p != p6 || p != p7)
15183       _exit(1);
15184
15185     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15186        from child file descriptors.  If the child closes a descriptor
15187        before it execs or exits, this munges the parent's descriptor
15188        as well.  Test for this by closing stdout in the child.  */
15189     _exit(close(fileno(stdout)) != 0);
15190   } else {
15191     int status;
15192     struct stat st;
15193
15194     while (wait(&status) != child)
15195       ;
15196     $ac_main_return(
15197          /* Was there some problem with vforking?  */
15198          child < 0
15199
15200          /* Did the child fail?  (This shouldn't happen.)  */
15201          || status
15202
15203          /* Did the vfork/compiler bug occur?  */
15204          || parent != getpid()
15205
15206          /* Did the file descriptor bug occur?  */
15207          || fstat(fileno(stdout), &st) != 0
15208          );
15209   }
15210 }
15211 _ACEOF
15212 rm -f conftest$ac_exeext
15213 if { (eval echo "$as_me:15213: \"$ac_link\"") >&5
15214   (eval $ac_link) 2>&5
15215   ac_status=$?
15216   echo "$as_me:15216: \$? = $ac_status" >&5
15217   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15218   { (eval echo "$as_me:15218: \"$ac_try\"") >&5
15219   (eval $ac_try) 2>&5
15220   ac_status=$?
15221   echo "$as_me:15221: \$? = $ac_status" >&5
15222   (exit $ac_status); }; }; then
15223   ac_cv_func_vfork_works=yes
15224 else
15225   echo "$as_me: program exited with status $ac_status" >&5
15226 echo "$as_me: failed program was:" >&5
15227 cat conftest.$ac_ext >&5
15228 ac_cv_func_vfork_works=no
15229 fi
15230 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15231 fi
15232 fi
15233 echo "$as_me:15233: result: $ac_cv_func_vfork_works" >&5
15234 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15235
15236 fi;
15237 if test "x$ac_cv_func_fork_works" = xcross; then
15238   ac_cv_func_vfork_works=ac_cv_func_vfork
15239   { echo "$as_me:15239: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15240 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15241 fi
15242
15243 if test "x$ac_cv_func_vfork_works" = xyes; then
15244
15245 cat >>confdefs.h <<\EOF
15246 #define HAVE_WORKING_VFORK 1
15247 EOF
15248
15249 else
15250
15251 cat >>confdefs.h <<\EOF
15252 #define vfork fork
15253 EOF
15254
15255 fi
15256 if test "x$ac_cv_func_fork_works" = xyes; then
15257
15258 cat >>confdefs.h <<\EOF
15259 #define HAVE_WORKING_FORK 1
15260 EOF
15261
15262 fi
15263
15264 # special check for test/ditto.c
15265
15266 echo "$as_me:15266: checking for openpty in -lutil" >&5
15267 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15268 if test "${ac_cv_lib_util_openpty+set}" = set; then
15269   echo $ECHO_N "(cached) $ECHO_C" >&6
15270 else
15271   ac_check_lib_save_LIBS=$LIBS
15272 LIBS="-lutil  $LIBS"
15273 cat >conftest.$ac_ext <<_ACEOF
15274 #line 15274 "configure"
15275 #include "confdefs.h"
15276
15277 /* Override any gcc2 internal prototype to avoid an error.  */
15278 #ifdef __cplusplus
15279 extern "C"
15280 #endif
15281 /* We use char because int might match the return type of a gcc2
15282    builtin and then its argument prototype would still apply.  */
15283 char openpty ();
15284 int
15285 main ()
15286 {
15287 openpty ();
15288   ;
15289   return 0;
15290 }
15291 _ACEOF
15292 rm -f conftest.$ac_objext conftest$ac_exeext
15293 if { (eval echo "$as_me:15293: \"$ac_link\"") >&5
15294   (eval $ac_link) 2>&5
15295   ac_status=$?
15296   echo "$as_me:15296: \$? = $ac_status" >&5
15297   (exit $ac_status); } &&
15298          { ac_try='test -s conftest$ac_exeext'
15299   { (eval echo "$as_me:15299: \"$ac_try\"") >&5
15300   (eval $ac_try) 2>&5
15301   ac_status=$?
15302   echo "$as_me:15302: \$? = $ac_status" >&5
15303   (exit $ac_status); }; }; then
15304   ac_cv_lib_util_openpty=yes
15305 else
15306   echo "$as_me: failed program was:" >&5
15307 cat conftest.$ac_ext >&5
15308 ac_cv_lib_util_openpty=no
15309 fi
15310 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15311 LIBS=$ac_check_lib_save_LIBS
15312 fi
15313 echo "$as_me:15313: result: $ac_cv_lib_util_openpty" >&5
15314 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15315 if test $ac_cv_lib_util_openpty = yes; then
15316   cf_cv_lib_util=yes
15317 else
15318   cf_cv_lib_util=no
15319 fi
15320
15321 echo "$as_me:15321: checking for openpty header" >&5
15322 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15323 if test "${cf_cv_func_openpty+set}" = set; then
15324   echo $ECHO_N "(cached) $ECHO_C" >&6
15325 else
15326
15327     cf_save_LIBS="$LIBS"
15328     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15329     for cf_header in pty.h libutil.h util.h
15330     do
15331     cat >conftest.$ac_ext <<_ACEOF
15332 #line 15332 "configure"
15333 #include "confdefs.h"
15334
15335 #include <$cf_header>
15336
15337 int
15338 main ()
15339 {
15340
15341     int x = openpty((int *)0, (int *)0, (char *)0,
15342                    (struct termios *)0, (struct winsize *)0);
15343
15344   ;
15345   return 0;
15346 }
15347 _ACEOF
15348 rm -f conftest.$ac_objext conftest$ac_exeext
15349 if { (eval echo "$as_me:15349: \"$ac_link\"") >&5
15350   (eval $ac_link) 2>&5
15351   ac_status=$?
15352   echo "$as_me:15352: \$? = $ac_status" >&5
15353   (exit $ac_status); } &&
15354          { ac_try='test -s conftest$ac_exeext'
15355   { (eval echo "$as_me:15355: \"$ac_try\"") >&5
15356   (eval $ac_try) 2>&5
15357   ac_status=$?
15358   echo "$as_me:15358: \$? = $ac_status" >&5
15359   (exit $ac_status); }; }; then
15360
15361         cf_cv_func_openpty=$cf_header
15362         break
15363
15364 else
15365   echo "$as_me: failed program was:" >&5
15366 cat conftest.$ac_ext >&5
15367
15368         cf_cv_func_openpty=no
15369
15370 fi
15371 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15372     done
15373     LIBS="$cf_save_LIBS"
15374
15375 fi
15376 echo "$as_me:15376: result: $cf_cv_func_openpty" >&5
15377 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15378
15379 if test "$cf_cv_func_openpty" != no ; then
15380     cat >>confdefs.h <<EOF
15381 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15382 EOF
15383
15384     cat >>confdefs.h <<\EOF
15385 #define USE_XTERM_PTY 1
15386 EOF
15387
15388     if test "$cf_cv_lib_util" = yes ; then
15389         TEST_LIBS="-lutil $TEST_LIBS"
15390     fi
15391 fi
15392
15393 if test "$with_hashed_db" != no ; then
15394         cat >>confdefs.h <<\EOF
15395 #define USE_HASHED_DB 1
15396 EOF
15397
15398 case $with_hashed_db in #(vi
15399 yes|*able*) #(vi
15400     ;;
15401 *)
15402     if test -d "$with_hashed_db" ; then
15403
15404 if test -n "$with_hashed_db/include" ; then
15405   for cf_add_incdir in $with_hashed_db/include
15406   do
15407         while test $cf_add_incdir != /usr/include
15408         do
15409           if test -d $cf_add_incdir
15410           then
15411                 cf_have_incdir=no
15412                 if test -n "$CFLAGS$CPPFLAGS" ; then
15413                   # a loop is needed to ensure we can add subdirs of existing dirs
15414                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15415                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15416                           cf_have_incdir=yes; break
15417                         fi
15418                   done
15419                 fi
15420
15421                 if test "$cf_have_incdir" = no ; then
15422                   if test "$cf_add_incdir" = /usr/local/include ; then
15423                         if test "$GCC" = yes
15424                         then
15425                           cf_save_CPPFLAGS=$CPPFLAGS
15426                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15427                           cat >conftest.$ac_ext <<_ACEOF
15428 #line 15428 "configure"
15429 #include "confdefs.h"
15430 #include <stdio.h>
15431 int
15432 main ()
15433 {
15434 printf("Hello")
15435   ;
15436   return 0;
15437 }
15438 _ACEOF
15439 rm -f conftest.$ac_objext
15440 if { (eval echo "$as_me:15440: \"$ac_compile\"") >&5
15441   (eval $ac_compile) 2>&5
15442   ac_status=$?
15443   echo "$as_me:15443: \$? = $ac_status" >&5
15444   (exit $ac_status); } &&
15445          { ac_try='test -s conftest.$ac_objext'
15446   { (eval echo "$as_me:15446: \"$ac_try\"") >&5
15447   (eval $ac_try) 2>&5
15448   ac_status=$?
15449   echo "$as_me:15449: \$? = $ac_status" >&5
15450   (exit $ac_status); }; }; then
15451   :
15452 else
15453   echo "$as_me: failed program was:" >&5
15454 cat conftest.$ac_ext >&5
15455 cf_have_incdir=yes
15456 fi
15457 rm -f conftest.$ac_objext conftest.$ac_ext
15458                           CPPFLAGS=$cf_save_CPPFLAGS
15459                         fi
15460                   fi
15461                 fi
15462
15463                 if test "$cf_have_incdir" = no ; then
15464                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15465
15466 echo "${as_me-configure}:15466: testing adding $cf_add_incdir to include-path ..." 1>&5
15467
15468                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15469
15470                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15471                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15472                   cf_add_incdir="$cf_top_incdir"
15473                 else
15474                   break
15475                 fi
15476           fi
15477         done
15478   done
15479 fi
15480
15481 if test -n "$with_hashed_db/lib" ; then
15482   for cf_add_libdir in $with_hashed_db/lib
15483   do
15484     if test $cf_add_libdir = /usr/lib ; then
15485       :
15486     elif test -d $cf_add_libdir
15487     then
15488       cf_have_libdir=no
15489       if test -n "$LDFLAGS$LIBS" ; then
15490         # a loop is needed to ensure we can add subdirs of existing dirs
15491         for cf_test_libdir in $LDFLAGS $LIBS ; do
15492           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15493             cf_have_libdir=yes; break
15494           fi
15495         done
15496       fi
15497       if test "$cf_have_libdir" = no ; then
15498         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15499
15500 echo "${as_me-configure}:15500: testing adding $cf_add_libdir to library-path ..." 1>&5
15501
15502         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15503       fi
15504     fi
15505   done
15506 fi
15507
15508     fi
15509 esac
15510
15511 echo "$as_me:15511: checking for db.h" >&5
15512 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
15513 if test "${ac_cv_header_db_h+set}" = set; then
15514   echo $ECHO_N "(cached) $ECHO_C" >&6
15515 else
15516   cat >conftest.$ac_ext <<_ACEOF
15517 #line 15517 "configure"
15518 #include "confdefs.h"
15519 #include <db.h>
15520 _ACEOF
15521 if { (eval echo "$as_me:15521: \"$ac_cpp conftest.$ac_ext\"") >&5
15522   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15523   ac_status=$?
15524   egrep -v '^ *\+' conftest.er1 >conftest.err
15525   rm -f conftest.er1
15526   cat conftest.err >&5
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit $ac_status); } >/dev/null; then
15529   if test -s conftest.err; then
15530     ac_cpp_err=$ac_c_preproc_warn_flag
15531   else
15532     ac_cpp_err=
15533   fi
15534 else
15535   ac_cpp_err=yes
15536 fi
15537 if test -z "$ac_cpp_err"; then
15538   ac_cv_header_db_h=yes
15539 else
15540   echo "$as_me: failed program was:" >&5
15541   cat conftest.$ac_ext >&5
15542   ac_cv_header_db_h=no
15543 fi
15544 rm -f conftest.err conftest.$ac_ext
15545 fi
15546 echo "$as_me:15546: result: $ac_cv_header_db_h" >&5
15547 echo "${ECHO_T}$ac_cv_header_db_h" >&6
15548 if test $ac_cv_header_db_h = yes; then
15549
15550 echo "$as_me:15550: checking for version of db" >&5
15551 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
15552 if test "${cf_cv_hashed_db_version+set}" = set; then
15553   echo $ECHO_N "(cached) $ECHO_C" >&6
15554 else
15555
15556 cf_cv_hashed_db_version=unknown
15557
15558 for cf_db_version in 1 2 3 4 5
15559 do
15560
15561 echo "${as_me-configure}:15561: testing checking for db version $cf_db_version ..." 1>&5
15562
15563         cat >conftest.$ac_ext <<_ACEOF
15564 #line 15564 "configure"
15565 #include "confdefs.h"
15566
15567 $ac_includes_default
15568 #include <db.h>
15569
15570 #ifdef DB_VERSION_MAJOR
15571         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
15572 #if $cf_db_version == DB_VERSION_MAJOR
15573         /* ok */
15574 #else
15575         make an error
15576 #endif
15577 #else
15578 #if $cf_db_version == 1
15579         /* ok: assuming this is DB 1.8.5 */
15580 #else
15581         make an error
15582 #endif
15583 #endif
15584
15585 int
15586 main ()
15587 {
15588 DBT *foo = 0
15589   ;
15590   return 0;
15591 }
15592 _ACEOF
15593 rm -f conftest.$ac_objext
15594 if { (eval echo "$as_me:15594: \"$ac_compile\"") >&5
15595   (eval $ac_compile) 2>&5
15596   ac_status=$?
15597   echo "$as_me:15597: \$? = $ac_status" >&5
15598   (exit $ac_status); } &&
15599          { ac_try='test -s conftest.$ac_objext'
15600   { (eval echo "$as_me:15600: \"$ac_try\"") >&5
15601   (eval $ac_try) 2>&5
15602   ac_status=$?
15603   echo "$as_me:15603: \$? = $ac_status" >&5
15604   (exit $ac_status); }; }; then
15605
15606         cf_cv_hashed_db_version=$cf_db_version
15607         break
15608
15609 else
15610   echo "$as_me: failed program was:" >&5
15611 cat conftest.$ac_ext >&5
15612 fi
15613 rm -f conftest.$ac_objext conftest.$ac_ext
15614 done
15615
15616 fi
15617 echo "$as_me:15617: result: $cf_cv_hashed_db_version" >&5
15618 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
15619
15620 if test "$cf_cv_hashed_db_version" = unknown ; then
15621         { { echo "$as_me:15621: error: Cannot determine version of db" >&5
15622 echo "$as_me: error: Cannot determine version of db" >&2;}
15623    { (exit 1); exit 1; }; }
15624 else
15625
15626 echo "$as_me:15626: checking for db libraries" >&5
15627 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
15628 if test "${cf_cv_hashed_db_libs+set}" = set; then
15629   echo $ECHO_N "(cached) $ECHO_C" >&6
15630 else
15631
15632 cf_cv_hashed_db_libs=unknown
15633 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
15634 do
15635         cf_save_libs="$LIBS"
15636         if test -n "$cf_db_libs"; then
15637                 LIBS="-l$cf_db_libs $LIBS"
15638         fi
15639
15640 echo "${as_me-configure}:15640: testing checking for library "$cf_db_libs" ..." 1>&5
15641
15642         cat >conftest.$ac_ext <<_ACEOF
15643 #line 15643 "configure"
15644 #include "confdefs.h"
15645
15646 $ac_includes_default
15647 #include <db.h>
15648
15649 int
15650 main ()
15651 {
15652
15653         char *path = "/tmp/foo";
15654 #ifdef DB_VERSION_MAJOR
15655 #if DB_VERSION_MAJOR >= 4
15656         DB *result = 0;
15657         db_create(&result, NULL, 0);
15658         result->open(result,
15659                 NULL,
15660                 path,
15661                 path,
15662                 DB_HASH,
15663                 DB_CREATE,
15664                 0644);
15665 #elif DB_VERSION_MAJOR >= 3
15666         DB *result = 0;
15667         db_create(&result, NULL, 0);
15668         result->open(result,
15669                 path,
15670                 path,
15671                 DB_HASH,
15672                 DB_CREATE,
15673                 0644);
15674 #elif DB_VERSION_MAJOR >= 2
15675         DB *result = 0;
15676         db_open(path,
15677                 DB_HASH,
15678                 DB_CREATE,
15679                 0644,
15680                 (DB_ENV *) 0,
15681                 (DB_INFO *) 0,
15682                 &result);
15683 #endif /* DB_VERSION_MAJOR */
15684 #else
15685         DB *result = dbopen(path,
15686                      2,
15687                      0644,
15688                      DB_HASH,
15689                      0);
15690 #endif
15691         ${cf_cv_main_return:-return}(result != 0)
15692
15693   ;
15694   return 0;
15695 }
15696 _ACEOF
15697 rm -f conftest.$ac_objext conftest$ac_exeext
15698 if { (eval echo "$as_me:15698: \"$ac_link\"") >&5
15699   (eval $ac_link) 2>&5
15700   ac_status=$?
15701   echo "$as_me:15701: \$? = $ac_status" >&5
15702   (exit $ac_status); } &&
15703          { ac_try='test -s conftest$ac_exeext'
15704   { (eval echo "$as_me:15704: \"$ac_try\"") >&5
15705   (eval $ac_try) 2>&5
15706   ac_status=$?
15707   echo "$as_me:15707: \$? = $ac_status" >&5
15708   (exit $ac_status); }; }; then
15709
15710         if test -n "$cf_db_libs" ; then
15711                 cf_cv_hashed_db_libs=$cf_db_libs
15712         else
15713                 cf_cv_hashed_db_libs=default
15714         fi
15715         LIBS="$cf_save_libs"
15716         break
15717
15718 else
15719   echo "$as_me: failed program was:" >&5
15720 cat conftest.$ac_ext >&5
15721 fi
15722 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15723         LIBS="$cf_save_libs"
15724 done
15725
15726 fi
15727 echo "$as_me:15727: result: $cf_cv_hashed_db_libs" >&5
15728 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
15729
15730         if test "$cf_cv_hashed_db_libs" = unknown ; then
15731                 { { echo "$as_me:15731: error: Cannot determine library for db" >&5
15732 echo "$as_me: error: Cannot determine library for db" >&2;}
15733    { (exit 1); exit 1; }; }
15734         elif test "$cf_cv_hashed_db_libs" != default ; then
15735                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
15736         fi
15737 fi
15738
15739 else
15740
15741         { { echo "$as_me:15741: error: Cannot find db.h" >&5
15742 echo "$as_me: error: Cannot find db.h" >&2;}
15743    { (exit 1); exit 1; }; }
15744
15745 fi
15746
15747 fi
15748
15749 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
15750         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15751         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
15752 fi
15753
15754 # Just in case, check if the C compiler has a bool type.
15755
15756 echo "$as_me:15756: checking if we should include stdbool.h" >&5
15757 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
15758
15759 if test "${cf_cv_header_stdbool_h+set}" = set; then
15760   echo $ECHO_N "(cached) $ECHO_C" >&6
15761 else
15762
15763         cat >conftest.$ac_ext <<_ACEOF
15764 #line 15764 "configure"
15765 #include "confdefs.h"
15766
15767 int
15768 main ()
15769 {
15770 bool foo = false
15771   ;
15772   return 0;
15773 }
15774 _ACEOF
15775 rm -f conftest.$ac_objext
15776 if { (eval echo "$as_me:15776: \"$ac_compile\"") >&5
15777   (eval $ac_compile) 2>&5
15778   ac_status=$?
15779   echo "$as_me:15779: \$? = $ac_status" >&5
15780   (exit $ac_status); } &&
15781          { ac_try='test -s conftest.$ac_objext'
15782   { (eval echo "$as_me:15782: \"$ac_try\"") >&5
15783   (eval $ac_try) 2>&5
15784   ac_status=$?
15785   echo "$as_me:15785: \$? = $ac_status" >&5
15786   (exit $ac_status); }; }; then
15787   cf_cv_header_stdbool_h=0
15788 else
15789   echo "$as_me: failed program was:" >&5
15790 cat conftest.$ac_ext >&5
15791 cat >conftest.$ac_ext <<_ACEOF
15792 #line 15792 "configure"
15793 #include "confdefs.h"
15794
15795 #ifndef __BEOS__
15796 #include <stdbool.h>
15797 #endif
15798
15799 int
15800 main ()
15801 {
15802 bool foo = false
15803   ;
15804   return 0;
15805 }
15806 _ACEOF
15807 rm -f conftest.$ac_objext
15808 if { (eval echo "$as_me:15808: \"$ac_compile\"") >&5
15809   (eval $ac_compile) 2>&5
15810   ac_status=$?
15811   echo "$as_me:15811: \$? = $ac_status" >&5
15812   (exit $ac_status); } &&
15813          { ac_try='test -s conftest.$ac_objext'
15814   { (eval echo "$as_me:15814: \"$ac_try\"") >&5
15815   (eval $ac_try) 2>&5
15816   ac_status=$?
15817   echo "$as_me:15817: \$? = $ac_status" >&5
15818   (exit $ac_status); }; }; then
15819   cf_cv_header_stdbool_h=1
15820 else
15821   echo "$as_me: failed program was:" >&5
15822 cat conftest.$ac_ext >&5
15823 cf_cv_header_stdbool_h=0
15824 fi
15825 rm -f conftest.$ac_objext conftest.$ac_ext
15826 fi
15827 rm -f conftest.$ac_objext conftest.$ac_ext
15828 fi
15829
15830 if test "$cf_cv_header_stdbool_h" = 1
15831 then    echo "$as_me:15831: result: yes" >&5
15832 echo "${ECHO_T}yes" >&6
15833 else    echo "$as_me:15833: result: no" >&5
15834 echo "${ECHO_T}no" >&6
15835 fi
15836
15837 echo "$as_me:15837: checking for builtin bool type" >&5
15838 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
15839
15840 if test "${cf_cv_cc_bool_type+set}" = set; then
15841   echo $ECHO_N "(cached) $ECHO_C" >&6
15842 else
15843
15844         cat >conftest.$ac_ext <<_ACEOF
15845 #line 15845 "configure"
15846 #include "confdefs.h"
15847
15848 #include <stdio.h>
15849 #include <sys/types.h>
15850
15851 int
15852 main ()
15853 {
15854 bool x = false
15855   ;
15856   return 0;
15857 }
15858 _ACEOF
15859 rm -f conftest.$ac_objext
15860 if { (eval echo "$as_me:15860: \"$ac_compile\"") >&5
15861   (eval $ac_compile) 2>&5
15862   ac_status=$?
15863   echo "$as_me:15863: \$? = $ac_status" >&5
15864   (exit $ac_status); } &&
15865          { ac_try='test -s conftest.$ac_objext'
15866   { (eval echo "$as_me:15866: \"$ac_try\"") >&5
15867   (eval $ac_try) 2>&5
15868   ac_status=$?
15869   echo "$as_me:15869: \$? = $ac_status" >&5
15870   (exit $ac_status); }; }; then
15871   cf_cv_cc_bool_type=1
15872 else
15873   echo "$as_me: failed program was:" >&5
15874 cat conftest.$ac_ext >&5
15875 cf_cv_cc_bool_type=0
15876 fi
15877 rm -f conftest.$ac_objext conftest.$ac_ext
15878
15879 fi
15880
15881 if test "$cf_cv_cc_bool_type" = 1
15882 then    echo "$as_me:15882: result: yes" >&5
15883 echo "${ECHO_T}yes" >&6
15884 else    echo "$as_me:15884: result: no" >&5
15885 echo "${ECHO_T}no" >&6
15886 fi
15887
15888 # Check for C++ compiler characteristics (and ensure that it's there!)
15889 if test -n "$CXX" ; then
15890         ac_ext=cc
15891 ac_cpp='$CXXCPP $CPPFLAGS'
15892 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
15893 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
15894 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
15895 ac_main_return=return
15896
15897 if test -n "$GXX" ; then
15898 case $cf_cv_system_name in #(vi
15899 os2*) #(vi
15900         cf_stdcpp_libname=stdcpp
15901         ;;
15902 *)
15903         cf_stdcpp_libname=stdc++
15904         ;;
15905 esac
15906 echo "$as_me:15906: checking for library $cf_stdcpp_libname" >&5
15907 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
15908 if test "${cf_cv_libstdcpp+set}" = set; then
15909   echo $ECHO_N "(cached) $ECHO_C" >&6
15910 else
15911
15912         cf_save="$LIBS"
15913         LIBS="-l$cf_stdcpp_libname $LIBS"
15914 cat >conftest.$ac_ext <<_ACEOF
15915 #line 15915 "configure"
15916 #include "confdefs.h"
15917
15918 #include <strstream.h>
15919 int
15920 main ()
15921 {
15922
15923 char buf[80];
15924 strstreambuf foo(buf, sizeof(buf))
15925
15926   ;
15927   return 0;
15928 }
15929 _ACEOF
15930 rm -f conftest.$ac_objext conftest$ac_exeext
15931 if { (eval echo "$as_me:15931: \"$ac_link\"") >&5
15932   (eval $ac_link) 2>&5
15933   ac_status=$?
15934   echo "$as_me:15934: \$? = $ac_status" >&5
15935   (exit $ac_status); } &&
15936          { ac_try='test -s conftest$ac_exeext'
15937   { (eval echo "$as_me:15937: \"$ac_try\"") >&5
15938   (eval $ac_try) 2>&5
15939   ac_status=$?
15940   echo "$as_me:15940: \$? = $ac_status" >&5
15941   (exit $ac_status); }; }; then
15942   cf_cv_libstdcpp=yes
15943 else
15944   echo "$as_me: failed program was:" >&5
15945 cat conftest.$ac_ext >&5
15946 cf_cv_libstdcpp=no
15947 fi
15948 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15949         LIBS="$cf_save"
15950
15951 fi
15952 echo "$as_me:15952: result: $cf_cv_libstdcpp" >&5
15953 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
15954 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
15955 fi
15956
15957         echo "$as_me:15957: checking whether $CXX understands -c and -o together" >&5
15958 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
15959 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
15960   echo $ECHO_N "(cached) $ECHO_C" >&6
15961 else
15962
15963 cat > conftest.$ac_ext <<CF_EOF
15964 #include <stdio.h>
15965 int main()
15966 {
15967         ${cf_cv_main_return:-return}(0);
15968 }
15969 CF_EOF
15970 # We do the test twice because some compilers refuse to overwrite an
15971 # existing .o file with -o, though they will create one.
15972 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
15973 if { (eval echo "$as_me:15973: \"$ac_try\"") >&5
15974   (eval $ac_try) 2>&5
15975   ac_status=$?
15976   echo "$as_me:15976: \$? = $ac_status" >&5
15977   (exit $ac_status); } &&
15978   test -f conftest2.$ac_objext && { (eval echo "$as_me:15978: \"$ac_try\"") >&5
15979   (eval $ac_try) 2>&5
15980   ac_status=$?
15981   echo "$as_me:15981: \$? = $ac_status" >&5
15982   (exit $ac_status); };
15983 then
15984   eval cf_cv_prog_CXX_c_o=yes
15985 else
15986   eval cf_cv_prog_CXX_c_o=no
15987 fi
15988 rm -f conftest*
15989
15990 fi
15991 if test $cf_cv_prog_CXX_c_o = yes; then
15992   echo "$as_me:15992: result: yes" >&5
15993 echo "${ECHO_T}yes" >&6
15994 else
15995   echo "$as_me:15995: result: no" >&5
15996 echo "${ECHO_T}no" >&6
15997 fi
15998
15999         case $GXX_VERSION in
16000         1*|2.0-6*)
16001                 cf_cxx_library=yes
16002                 ;;
16003         *-2.7*|2.7*)
16004
16005 cf_cxx_library=unknown
16006 case $cf_cv_system_name in #(vi
16007 os2*) #(vi
16008         cf_gpp_libname=gpp
16009         ;;
16010 *)
16011         cf_gpp_libname=g++
16012         ;;
16013 esac
16014 if test "$GXX" = yes; then
16015         echo "$as_me:16015: checking for lib$cf_gpp_libname" >&5
16016 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16017         cf_save="$LIBS"
16018         LIBS="-l$cf_gpp_libname $LIBS"
16019         cat >conftest.$ac_ext <<_ACEOF
16020 #line 16020 "configure"
16021 #include "confdefs.h"
16022
16023 #include <$cf_gpp_libname/builtin.h>
16024
16025 int
16026 main ()
16027 {
16028 two_arg_error_handler_t foo2 = lib_error_handler
16029   ;
16030   return 0;
16031 }
16032 _ACEOF
16033 rm -f conftest.$ac_objext conftest$ac_exeext
16034 if { (eval echo "$as_me:16034: \"$ac_link\"") >&5
16035   (eval $ac_link) 2>&5
16036   ac_status=$?
16037   echo "$as_me:16037: \$? = $ac_status" >&5
16038   (exit $ac_status); } &&
16039          { ac_try='test -s conftest$ac_exeext'
16040   { (eval echo "$as_me:16040: \"$ac_try\"") >&5
16041   (eval $ac_try) 2>&5
16042   ac_status=$?
16043   echo "$as_me:16043: \$? = $ac_status" >&5
16044   (exit $ac_status); }; }; then
16045   cf_cxx_library=yes
16046          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16047          if test "$cf_gpp_libname" = cpp ; then
16048             cat >>confdefs.h <<\EOF
16049 #define HAVE_GPP_BUILTIN_H 1
16050 EOF
16051
16052          else
16053             cat >>confdefs.h <<\EOF
16054 #define HAVE_GXX_BUILTIN_H 1
16055 EOF
16056
16057          fi
16058 else
16059   echo "$as_me: failed program was:" >&5
16060 cat conftest.$ac_ext >&5
16061 cat >conftest.$ac_ext <<_ACEOF
16062 #line 16062 "configure"
16063 #include "confdefs.h"
16064
16065 #include <builtin.h>
16066
16067 int
16068 main ()
16069 {
16070 two_arg_error_handler_t foo2 = lib_error_handler
16071   ;
16072   return 0;
16073 }
16074 _ACEOF
16075 rm -f conftest.$ac_objext conftest$ac_exeext
16076 if { (eval echo "$as_me:16076: \"$ac_link\"") >&5
16077   (eval $ac_link) 2>&5
16078   ac_status=$?
16079   echo "$as_me:16079: \$? = $ac_status" >&5
16080   (exit $ac_status); } &&
16081          { ac_try='test -s conftest$ac_exeext'
16082   { (eval echo "$as_me:16082: \"$ac_try\"") >&5
16083   (eval $ac_try) 2>&5
16084   ac_status=$?
16085   echo "$as_me:16085: \$? = $ac_status" >&5
16086   (exit $ac_status); }; }; then
16087   cf_cxx_library=yes
16088          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16089          cat >>confdefs.h <<\EOF
16090 #define HAVE_BUILTIN_H 1
16091 EOF
16092
16093 else
16094   echo "$as_me: failed program was:" >&5
16095 cat conftest.$ac_ext >&5
16096 cf_cxx_library=no
16097 fi
16098 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16099 fi
16100 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16101         LIBS="$cf_save"
16102         echo "$as_me:16102: result: $cf_cxx_library" >&5
16103 echo "${ECHO_T}$cf_cxx_library" >&6
16104 fi
16105
16106                 ;;
16107         *)
16108                 cf_cxx_library=no
16109                 ;;
16110         esac
16111
16112         ac_ext=cc
16113 ac_cpp='$CXXCPP $CPPFLAGS'
16114 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16115 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16116 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16117 ac_main_return=return
16118 echo "$as_me:16118: checking how to run the C++ preprocessor" >&5
16119 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16120 if test -z "$CXXCPP"; then
16121   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16122   echo $ECHO_N "(cached) $ECHO_C" >&6
16123 else
16124       # Double quotes because CXXCPP needs to be expanded
16125     for CXXCPP in "$CXX -E" "/lib/cpp"
16126     do
16127       ac_preproc_ok=false
16128 for ac_cxx_preproc_warn_flag in '' yes
16129 do
16130   # Use a header file that comes with gcc, so configuring glibc
16131   # with a fresh cross-compiler works.
16132   # On the NeXT, cc -E runs the code through the compiler's parser,
16133   # not just through cpp. "Syntax error" is here to catch this case.
16134   cat >conftest.$ac_ext <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16137 #include <assert.h>
16138                      Syntax error
16139 _ACEOF
16140 if { (eval echo "$as_me:16140: \"$ac_cpp conftest.$ac_ext\"") >&5
16141   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16142   ac_status=$?
16143   egrep -v '^ *\+' conftest.er1 >conftest.err
16144   rm -f conftest.er1
16145   cat conftest.err >&5
16146   echo "$as_me:16146: \$? = $ac_status" >&5
16147   (exit $ac_status); } >/dev/null; then
16148   if test -s conftest.err; then
16149     ac_cpp_err=$ac_cxx_preproc_warn_flag
16150   else
16151     ac_cpp_err=
16152   fi
16153 else
16154   ac_cpp_err=yes
16155 fi
16156 if test -z "$ac_cpp_err"; then
16157   :
16158 else
16159   echo "$as_me: failed program was:" >&5
16160   cat conftest.$ac_ext >&5
16161   # Broken: fails on valid input.
16162 continue
16163 fi
16164 rm -f conftest.err conftest.$ac_ext
16165
16166   # OK, works on sane cases.  Now check whether non-existent headers
16167   # can be detected and how.
16168   cat >conftest.$ac_ext <<_ACEOF
16169 #line 16169 "configure"
16170 #include "confdefs.h"
16171 #include <ac_nonexistent.h>
16172 _ACEOF
16173 if { (eval echo "$as_me:16173: \"$ac_cpp conftest.$ac_ext\"") >&5
16174   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16175   ac_status=$?
16176   egrep -v '^ *\+' conftest.er1 >conftest.err
16177   rm -f conftest.er1
16178   cat conftest.err >&5
16179   echo "$as_me:16179: \$? = $ac_status" >&5
16180   (exit $ac_status); } >/dev/null; then
16181   if test -s conftest.err; then
16182     ac_cpp_err=$ac_cxx_preproc_warn_flag
16183   else
16184     ac_cpp_err=
16185   fi
16186 else
16187   ac_cpp_err=yes
16188 fi
16189 if test -z "$ac_cpp_err"; then
16190   # Broken: success on invalid input.
16191 continue
16192 else
16193   echo "$as_me: failed program was:" >&5
16194   cat conftest.$ac_ext >&5
16195   # Passes both tests.
16196 ac_preproc_ok=:
16197 break
16198 fi
16199 rm -f conftest.err conftest.$ac_ext
16200
16201 done
16202 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16203 rm -f conftest.err conftest.$ac_ext
16204 if $ac_preproc_ok; then
16205   break
16206 fi
16207
16208     done
16209     ac_cv_prog_CXXCPP=$CXXCPP
16210
16211 fi
16212   CXXCPP=$ac_cv_prog_CXXCPP
16213 else
16214   ac_cv_prog_CXXCPP=$CXXCPP
16215 fi
16216 echo "$as_me:16216: result: $CXXCPP" >&5
16217 echo "${ECHO_T}$CXXCPP" >&6
16218 ac_preproc_ok=false
16219 for ac_cxx_preproc_warn_flag in '' yes
16220 do
16221   # Use a header file that comes with gcc, so configuring glibc
16222   # with a fresh cross-compiler works.
16223   # On the NeXT, cc -E runs the code through the compiler's parser,
16224   # not just through cpp. "Syntax error" is here to catch this case.
16225   cat >conftest.$ac_ext <<_ACEOF
16226 #line 16226 "configure"
16227 #include "confdefs.h"
16228 #include <assert.h>
16229                      Syntax error
16230 _ACEOF
16231 if { (eval echo "$as_me:16231: \"$ac_cpp conftest.$ac_ext\"") >&5
16232   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16233   ac_status=$?
16234   egrep -v '^ *\+' conftest.er1 >conftest.err
16235   rm -f conftest.er1
16236   cat conftest.err >&5
16237   echo "$as_me:16237: \$? = $ac_status" >&5
16238   (exit $ac_status); } >/dev/null; then
16239   if test -s conftest.err; then
16240     ac_cpp_err=$ac_cxx_preproc_warn_flag
16241   else
16242     ac_cpp_err=
16243   fi
16244 else
16245   ac_cpp_err=yes
16246 fi
16247 if test -z "$ac_cpp_err"; then
16248   :
16249 else
16250   echo "$as_me: failed program was:" >&5
16251   cat conftest.$ac_ext >&5
16252   # Broken: fails on valid input.
16253 continue
16254 fi
16255 rm -f conftest.err conftest.$ac_ext
16256
16257   # OK, works on sane cases.  Now check whether non-existent headers
16258   # can be detected and how.
16259   cat >conftest.$ac_ext <<_ACEOF
16260 #line 16260 "configure"
16261 #include "confdefs.h"
16262 #include <ac_nonexistent.h>
16263 _ACEOF
16264 if { (eval echo "$as_me:16264: \"$ac_cpp conftest.$ac_ext\"") >&5
16265   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16266   ac_status=$?
16267   egrep -v '^ *\+' conftest.er1 >conftest.err
16268   rm -f conftest.er1
16269   cat conftest.err >&5
16270   echo "$as_me:16270: \$? = $ac_status" >&5
16271   (exit $ac_status); } >/dev/null; then
16272   if test -s conftest.err; then
16273     ac_cpp_err=$ac_cxx_preproc_warn_flag
16274   else
16275     ac_cpp_err=
16276   fi
16277 else
16278   ac_cpp_err=yes
16279 fi
16280 if test -z "$ac_cpp_err"; then
16281   # Broken: success on invalid input.
16282 continue
16283 else
16284   echo "$as_me: failed program was:" >&5
16285   cat conftest.$ac_ext >&5
16286   # Passes both tests.
16287 ac_preproc_ok=:
16288 break
16289 fi
16290 rm -f conftest.err conftest.$ac_ext
16291
16292 done
16293 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16294 rm -f conftest.err conftest.$ac_ext
16295 if $ac_preproc_ok; then
16296   :
16297 else
16298   { { echo "$as_me:16298: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16299 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16300    { (exit 1); exit 1; }; }
16301 fi
16302
16303 ac_ext=cc
16304 ac_cpp='$CXXCPP $CPPFLAGS'
16305 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16306 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16307 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16308 ac_main_return=return
16309
16310 for ac_header in iostream typeinfo
16311 do
16312 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16313 echo "$as_me:16313: checking for $ac_header" >&5
16314 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16315 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16316   echo $ECHO_N "(cached) $ECHO_C" >&6
16317 else
16318   cat >conftest.$ac_ext <<_ACEOF
16319 #line 16319 "configure"
16320 #include "confdefs.h"
16321 #include <$ac_header>
16322 _ACEOF
16323 if { (eval echo "$as_me:16323: \"$ac_cpp conftest.$ac_ext\"") >&5
16324   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16325   ac_status=$?
16326   egrep -v '^ *\+' conftest.er1 >conftest.err
16327   rm -f conftest.er1
16328   cat conftest.err >&5
16329   echo "$as_me:16329: \$? = $ac_status" >&5
16330   (exit $ac_status); } >/dev/null; then
16331   if test -s conftest.err; then
16332     ac_cpp_err=$ac_cxx_preproc_warn_flag
16333   else
16334     ac_cpp_err=
16335   fi
16336 else
16337   ac_cpp_err=yes
16338 fi
16339 if test -z "$ac_cpp_err"; then
16340   eval "$as_ac_Header=yes"
16341 else
16342   echo "$as_me: failed program was:" >&5
16343   cat conftest.$ac_ext >&5
16344   eval "$as_ac_Header=no"
16345 fi
16346 rm -f conftest.err conftest.$ac_ext
16347 fi
16348 echo "$as_me:16348: result: `eval echo '${'$as_ac_Header'}'`" >&5
16349 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16350 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16351   cat >>confdefs.h <<EOF
16352 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16353 EOF
16354
16355 fi
16356 done
16357
16358     if test x"$ac_cv_header_iostream" = xyes ; then
16359         echo "$as_me:16359: checking if iostream uses std-namespace" >&5
16360 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16361         cat >conftest.$ac_ext <<_ACEOF
16362 #line 16362 "configure"
16363 #include "confdefs.h"
16364
16365 #include <iostream>
16366 using std::endl;
16367 using std::cerr;
16368 int
16369 main ()
16370 {
16371
16372 cerr << "testing" << endl;
16373
16374   ;
16375   return 0;
16376 }
16377 _ACEOF
16378 rm -f conftest.$ac_objext
16379 if { (eval echo "$as_me:16379: \"$ac_compile\"") >&5
16380   (eval $ac_compile) 2>&5
16381   ac_status=$?
16382   echo "$as_me:16382: \$? = $ac_status" >&5
16383   (exit $ac_status); } &&
16384          { ac_try='test -s conftest.$ac_objext'
16385   { (eval echo "$as_me:16385: \"$ac_try\"") >&5
16386   (eval $ac_try) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit $ac_status); }; }; then
16390   cf_iostream_namespace=yes
16391 else
16392   echo "$as_me: failed program was:" >&5
16393 cat conftest.$ac_ext >&5
16394 cf_iostream_namespace=no
16395 fi
16396 rm -f conftest.$ac_objext conftest.$ac_ext
16397         echo "$as_me:16397: result: $cf_iostream_namespace" >&5
16398 echo "${ECHO_T}$cf_iostream_namespace" >&6
16399         if test "$cf_iostream_namespace" = yes ; then
16400             cat >>confdefs.h <<\EOF
16401 #define IOSTREAM_NAMESPACE 1
16402 EOF
16403
16404         fi
16405     fi
16406
16407 echo "$as_me:16407: checking if we should include stdbool.h" >&5
16408 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16409
16410 if test "${cf_cv_header_stdbool_h+set}" = set; then
16411   echo $ECHO_N "(cached) $ECHO_C" >&6
16412 else
16413
16414         cat >conftest.$ac_ext <<_ACEOF
16415 #line 16415 "configure"
16416 #include "confdefs.h"
16417
16418 int
16419 main ()
16420 {
16421 bool foo = false
16422   ;
16423   return 0;
16424 }
16425 _ACEOF
16426 rm -f conftest.$ac_objext
16427 if { (eval echo "$as_me:16427: \"$ac_compile\"") >&5
16428   (eval $ac_compile) 2>&5
16429   ac_status=$?
16430   echo "$as_me:16430: \$? = $ac_status" >&5
16431   (exit $ac_status); } &&
16432          { ac_try='test -s conftest.$ac_objext'
16433   { (eval echo "$as_me:16433: \"$ac_try\"") >&5
16434   (eval $ac_try) 2>&5
16435   ac_status=$?
16436   echo "$as_me:16436: \$? = $ac_status" >&5
16437   (exit $ac_status); }; }; then
16438   cf_cv_header_stdbool_h=0
16439 else
16440   echo "$as_me: failed program was:" >&5
16441 cat conftest.$ac_ext >&5
16442 cat >conftest.$ac_ext <<_ACEOF
16443 #line 16443 "configure"
16444 #include "confdefs.h"
16445
16446 #ifndef __BEOS__
16447 #include <stdbool.h>
16448 #endif
16449
16450 int
16451 main ()
16452 {
16453 bool foo = false
16454   ;
16455   return 0;
16456 }
16457 _ACEOF
16458 rm -f conftest.$ac_objext
16459 if { (eval echo "$as_me:16459: \"$ac_compile\"") >&5
16460   (eval $ac_compile) 2>&5
16461   ac_status=$?
16462   echo "$as_me:16462: \$? = $ac_status" >&5
16463   (exit $ac_status); } &&
16464          { ac_try='test -s conftest.$ac_objext'
16465   { (eval echo "$as_me:16465: \"$ac_try\"") >&5
16466   (eval $ac_try) 2>&5
16467   ac_status=$?
16468   echo "$as_me:16468: \$? = $ac_status" >&5
16469   (exit $ac_status); }; }; then
16470   cf_cv_header_stdbool_h=1
16471 else
16472   echo "$as_me: failed program was:" >&5
16473 cat conftest.$ac_ext >&5
16474 cf_cv_header_stdbool_h=0
16475 fi
16476 rm -f conftest.$ac_objext conftest.$ac_ext
16477 fi
16478 rm -f conftest.$ac_objext conftest.$ac_ext
16479 fi
16480
16481 if test "$cf_cv_header_stdbool_h" = 1
16482 then    echo "$as_me:16482: result: yes" >&5
16483 echo "${ECHO_T}yes" >&6
16484 else    echo "$as_me:16484: result: no" >&5
16485 echo "${ECHO_T}no" >&6
16486 fi
16487
16488 echo "$as_me:16488: checking for builtin bool type" >&5
16489 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16490
16491 if test "${cf_cv_builtin_bool+set}" = set; then
16492   echo $ECHO_N "(cached) $ECHO_C" >&6
16493 else
16494
16495         cat >conftest.$ac_ext <<_ACEOF
16496 #line 16496 "configure"
16497 #include "confdefs.h"
16498
16499 #include <stdio.h>
16500 #include <sys/types.h>
16501
16502 int
16503 main ()
16504 {
16505 bool x = false
16506   ;
16507   return 0;
16508 }
16509 _ACEOF
16510 rm -f conftest.$ac_objext
16511 if { (eval echo "$as_me:16511: \"$ac_compile\"") >&5
16512   (eval $ac_compile) 2>&5
16513   ac_status=$?
16514   echo "$as_me:16514: \$? = $ac_status" >&5
16515   (exit $ac_status); } &&
16516          { ac_try='test -s conftest.$ac_objext'
16517   { (eval echo "$as_me:16517: \"$ac_try\"") >&5
16518   (eval $ac_try) 2>&5
16519   ac_status=$?
16520   echo "$as_me:16520: \$? = $ac_status" >&5
16521   (exit $ac_status); }; }; then
16522   cf_cv_builtin_bool=1
16523 else
16524   echo "$as_me: failed program was:" >&5
16525 cat conftest.$ac_ext >&5
16526 cf_cv_builtin_bool=0
16527 fi
16528 rm -f conftest.$ac_objext conftest.$ac_ext
16529
16530 fi
16531
16532 if test "$cf_cv_builtin_bool" = 1
16533 then    echo "$as_me:16533: result: yes" >&5
16534 echo "${ECHO_T}yes" >&6
16535 else    echo "$as_me:16535: result: no" >&5
16536 echo "${ECHO_T}no" >&6
16537 fi
16538
16539 echo "$as_me:16539: checking for size of bool" >&5
16540 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16541 if test "${cf_cv_type_of_bool+set}" = set; then
16542   echo $ECHO_N "(cached) $ECHO_C" >&6
16543 else
16544
16545         rm -f cf_test.out
16546         if test "$cross_compiling" = yes; then
16547   cf_cv_type_of_bool=unknown
16548 else
16549   cat >conftest.$ac_ext <<_ACEOF
16550 #line 16550 "configure"
16551 #include "confdefs.h"
16552
16553 #include <stdlib.h>
16554 #include <stdio.h>
16555
16556 #if defined(__cplusplus)
16557
16558 #ifdef HAVE_GXX_BUILTIN_H
16559 #include <g++/builtin.h>
16560 #elif HAVE_GPP_BUILTIN_H
16561 #include <gpp/builtin.h>
16562 #elif HAVE_BUILTIN_H
16563 #include <builtin.h>
16564 #endif
16565
16566 #else
16567
16568 #if $cf_cv_header_stdbool_h
16569 #include <stdbool.h>
16570 #endif
16571
16572 #endif
16573
16574 main()
16575 {
16576         FILE *fp = fopen("cf_test.out", "w");
16577         if (fp != 0) {
16578                 bool x = true;
16579                 if ((bool)(-x) >= 0)
16580                         fputs("unsigned ", fp);
16581                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16582                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16583                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16584                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16585                 fclose(fp);
16586         }
16587         ${cf_cv_main_return:-return}(0);
16588 }
16589
16590 _ACEOF
16591 rm -f conftest$ac_exeext
16592 if { (eval echo "$as_me:16592: \"$ac_link\"") >&5
16593   (eval $ac_link) 2>&5
16594   ac_status=$?
16595   echo "$as_me:16595: \$? = $ac_status" >&5
16596   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16597   { (eval echo "$as_me:16597: \"$ac_try\"") >&5
16598   (eval $ac_try) 2>&5
16599   ac_status=$?
16600   echo "$as_me:16600: \$? = $ac_status" >&5
16601   (exit $ac_status); }; }; then
16602   cf_cv_type_of_bool=`cat cf_test.out`
16603                  if test -z "$cf_cv_type_of_bool"; then
16604                    cf_cv_type_of_bool=unknown
16605                  fi
16606 else
16607   echo "$as_me: program exited with status $ac_status" >&5
16608 echo "$as_me: failed program was:" >&5
16609 cat conftest.$ac_ext >&5
16610 cf_cv_type_of_bool=unknown
16611 fi
16612 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16613 fi
16614
16615 fi
16616
16617         rm -f cf_test.out
16618 echo "$as_me:16618: result: $cf_cv_type_of_bool" >&5
16619 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16620 if test "$cf_cv_type_of_bool" = unknown ; then
16621         case .$NCURSES_BOOL in #(vi
16622         .auto|.) NCURSES_BOOL=unsigned;;
16623         esac
16624         { echo "$as_me:16624: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16625 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16626         cf_cv_type_of_bool=$NCURSES_BOOL
16627 fi
16628
16629 echo "$as_me:16629: checking for special defines needed for etip.h" >&5
16630 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
16631 cf_save_CXXFLAGS="$CXXFLAGS"
16632 cf_result="none"
16633 for cf_math in "" MATH_H
16634 do
16635 for cf_excp in "" MATH_EXCEPTION
16636 do
16637         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
16638         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
16639         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
16640 cat >conftest.$ac_ext <<_ACEOF
16641 #line 16641 "configure"
16642 #include "confdefs.h"
16643
16644 #include <etip.h.in>
16645
16646 int
16647 main ()
16648 {
16649
16650   ;
16651   return 0;
16652 }
16653 _ACEOF
16654 rm -f conftest.$ac_objext
16655 if { (eval echo "$as_me:16655: \"$ac_compile\"") >&5
16656   (eval $ac_compile) 2>&5
16657   ac_status=$?
16658   echo "$as_me:16658: \$? = $ac_status" >&5
16659   (exit $ac_status); } &&
16660          { ac_try='test -s conftest.$ac_objext'
16661   { (eval echo "$as_me:16661: \"$ac_try\"") >&5
16662   (eval $ac_try) 2>&5
16663   ac_status=$?
16664   echo "$as_me:16664: \$? = $ac_status" >&5
16665   (exit $ac_status); }; }; then
16666
16667         test -n "$cf_math" && cat >>confdefs.h <<EOF
16668 #define ETIP_NEEDS_${cf_math} 1
16669 EOF
16670
16671         test -n "$cf_excp" && cat >>confdefs.h <<EOF
16672 #define ETIP_NEEDS_${cf_excp} 1
16673 EOF
16674
16675         cf_result="$cf_math $cf_excp"
16676         break
16677
16678 else
16679   echo "$as_me: failed program was:" >&5
16680 cat conftest.$ac_ext >&5
16681 fi
16682 rm -f conftest.$ac_objext conftest.$ac_ext
16683 done
16684 done
16685 echo "$as_me:16685: result: $cf_result" >&5
16686 echo "${ECHO_T}$cf_result" >&6
16687 CXXFLAGS="$cf_save_CXXFLAGS"
16688
16689 if test -n "$CXX"; then
16690 echo "$as_me:16690: checking if $CXX accepts parameter initialization" >&5
16691 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
16692 if test "${cf_cv_cpp_param_init+set}" = set; then
16693   echo $ECHO_N "(cached) $ECHO_C" >&6
16694 else
16695
16696         ac_ext=cc
16697 ac_cpp='$CXXCPP $CPPFLAGS'
16698 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16699 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16700 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16701 ac_main_return=return
16702
16703         if test "$cross_compiling" = yes; then
16704   cf_cv_cpp_param_init=unknown
16705 else
16706   cat >conftest.$ac_ext <<_ACEOF
16707 #line 16707 "configure"
16708 #include "confdefs.h"
16709
16710 class TEST {
16711 private:
16712         int value;
16713 public:
16714         TEST(int x = 1);
16715         ~TEST();
16716 };
16717
16718 TEST::TEST(int x = 1)   // some compilers do not like second initializer
16719 {
16720         value = x;
16721 }
16722 void main() { }
16723
16724 _ACEOF
16725 rm -f conftest$ac_exeext
16726 if { (eval echo "$as_me:16726: \"$ac_link\"") >&5
16727   (eval $ac_link) 2>&5
16728   ac_status=$?
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16731   { (eval echo "$as_me:16731: \"$ac_try\"") >&5
16732   (eval $ac_try) 2>&5
16733   ac_status=$?
16734   echo "$as_me:16734: \$? = $ac_status" >&5
16735   (exit $ac_status); }; }; then
16736   cf_cv_cpp_param_init=yes
16737 else
16738   echo "$as_me: program exited with status $ac_status" >&5
16739 echo "$as_me: failed program was:" >&5
16740 cat conftest.$ac_ext >&5
16741 cf_cv_cpp_param_init=no
16742 fi
16743 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16744 fi
16745         ac_ext=cc
16746 ac_cpp='$CXXCPP $CPPFLAGS'
16747 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16748 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16749 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16750 ac_main_return=return
16751
16752 fi
16753 echo "$as_me:16753: result: $cf_cv_cpp_param_init" >&5
16754 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
16755 fi
16756 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
16757 #define CPP_HAS_PARAM_INIT 1
16758 EOF
16759
16760 if test -n "$CXX"; then
16761
16762 echo "$as_me:16762: checking if $CXX accepts static_cast" >&5
16763 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
16764 if test "${cf_cv_cpp_static_cast+set}" = set; then
16765   echo $ECHO_N "(cached) $ECHO_C" >&6
16766 else
16767
16768         ac_ext=cc
16769 ac_cpp='$CXXCPP $CPPFLAGS'
16770 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16771 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16772 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16773 ac_main_return=return
16774
16775         cat >conftest.$ac_ext <<_ACEOF
16776 #line 16776 "configure"
16777 #include "confdefs.h"
16778
16779 class NCursesPanel
16780 {
16781 public:
16782   NCursesPanel(int nlines,
16783                int ncols,
16784                int begin_y = 0,
16785                int begin_x = 0)
16786   {
16787   }
16788
16789   ~NCursesPanel();
16790 };
16791
16792 template<class T> class NCursesUserPanel : public NCursesPanel
16793 {
16794 public:
16795   NCursesUserPanel (int nlines,
16796                     int ncols,
16797                     int begin_y = 0,
16798                     int begin_x = 0,
16799                     const T* p_UserData = static_cast<T*>(0))
16800     : NCursesPanel (nlines, ncols, begin_y, begin_x)
16801   {
16802   };
16803   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
16804   {
16805   };
16806
16807   virtual ~NCursesUserPanel() {};
16808 };
16809
16810 int
16811 main ()
16812 {
16813
16814         const char* p_UserData = static_cast<char*>(0)
16815   ;
16816   return 0;
16817 }
16818 _ACEOF
16819 rm -f conftest.$ac_objext
16820 if { (eval echo "$as_me:16820: \"$ac_compile\"") >&5
16821   (eval $ac_compile) 2>&5
16822   ac_status=$?
16823   echo "$as_me:16823: \$? = $ac_status" >&5
16824   (exit $ac_status); } &&
16825          { ac_try='test -s conftest.$ac_objext'
16826   { (eval echo "$as_me:16826: \"$ac_try\"") >&5
16827   (eval $ac_try) 2>&5
16828   ac_status=$?
16829   echo "$as_me:16829: \$? = $ac_status" >&5
16830   (exit $ac_status); }; }; then
16831   cf_cv_cpp_static_cast=yes
16832 else
16833   echo "$as_me: failed program was:" >&5
16834 cat conftest.$ac_ext >&5
16835 cf_cv_cpp_static_cast=no
16836 fi
16837 rm -f conftest.$ac_objext conftest.$ac_ext
16838
16839         ac_ext=cc
16840 ac_cpp='$CXXCPP $CPPFLAGS'
16841 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16842 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16843 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16844 ac_main_return=return
16845
16846 fi
16847 echo "$as_me:16847: result: $cf_cv_cpp_static_cast" >&5
16848 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
16849
16850 fi
16851
16852 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
16853 #define CPP_HAS_STATIC_CAST 1
16854 EOF
16855
16856         CXX_AR='$(AR)'
16857         CXX_ARFLAGS='$(ARFLAGS)'
16858         case $cf_cv_system_name in #(vi
16859         irix*) #(vi
16860             if test "$GXX" != yes ; then
16861                 CXX_AR='$(CXX)'
16862                 CXX_ARFLAGS='-ar -o'
16863             fi
16864             ;;
16865         sco3.2v5*) #(vi
16866             CXXLDFLAGS="-u main"
16867             ;;
16868         solaris2*)
16869             if test "$GXX" != yes ; then
16870                 CXX_AR='$(CXX)'
16871                 CXX_ARFLAGS='-xar -o'
16872             fi
16873             ;;
16874         esac
16875
16876 else
16877         cf_cxx_library=no
16878         cf_cv_builtin_bool=1
16879
16880         # Just because we are not configuring against C++ right now does not
16881         # mean that a user will not want to use C++.  Some distributors disable
16882         # the C++ portion of this configuration as a shortcut (or just to avoid
16883         # compiling the demo in the c++ directory).  So we need a reasonable
16884         # default for the 'bool' type.
16885         #
16886         # Caveat: since the storage of the bool type is not standardized, it
16887         # may change.
16888
16889         if test "$NCURSES_BOOL" != auto ; then
16890                 cf_cv_type_of_bool=$NCURSES_BOOL
16891                 cf_cv_header_stdbool_h=0
16892         else
16893                 if test "$cf_cv_header_stdbool_h" = 1 ; then
16894
16895 echo "$as_me:16895: checking for size of bool" >&5
16896 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
16897 if test "${cf_cv_type_of_bool+set}" = set; then
16898   echo $ECHO_N "(cached) $ECHO_C" >&6
16899 else
16900
16901         rm -f cf_test.out
16902         if test "$cross_compiling" = yes; then
16903   cf_cv_type_of_bool=unknown
16904 else
16905   cat >conftest.$ac_ext <<_ACEOF
16906 #line 16906 "configure"
16907 #include "confdefs.h"
16908
16909 #include <stdlib.h>
16910 #include <stdio.h>
16911
16912 #if defined(__cplusplus)
16913
16914 #ifdef HAVE_GXX_BUILTIN_H
16915 #include <g++/builtin.h>
16916 #elif HAVE_GPP_BUILTIN_H
16917 #include <gpp/builtin.h>
16918 #elif HAVE_BUILTIN_H
16919 #include <builtin.h>
16920 #endif
16921
16922 #else
16923
16924 #if $cf_cv_header_stdbool_h
16925 #include <stdbool.h>
16926 #endif
16927
16928 #endif
16929
16930 main()
16931 {
16932         FILE *fp = fopen("cf_test.out", "w");
16933         if (fp != 0) {
16934                 bool x = true;
16935                 if ((bool)(-x) >= 0)
16936                         fputs("unsigned ", fp);
16937                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
16938                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
16939                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
16940                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
16941                 fclose(fp);
16942         }
16943         ${cf_cv_main_return:-return}(0);
16944 }
16945
16946 _ACEOF
16947 rm -f conftest$ac_exeext
16948 if { (eval echo "$as_me:16948: \"$ac_link\"") >&5
16949   (eval $ac_link) 2>&5
16950   ac_status=$?
16951   echo "$as_me:16951: \$? = $ac_status" >&5
16952   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16953   { (eval echo "$as_me:16953: \"$ac_try\"") >&5
16954   (eval $ac_try) 2>&5
16955   ac_status=$?
16956   echo "$as_me:16956: \$? = $ac_status" >&5
16957   (exit $ac_status); }; }; then
16958   cf_cv_type_of_bool=`cat cf_test.out`
16959                  if test -z "$cf_cv_type_of_bool"; then
16960                    cf_cv_type_of_bool=unknown
16961                  fi
16962 else
16963   echo "$as_me: program exited with status $ac_status" >&5
16964 echo "$as_me: failed program was:" >&5
16965 cat conftest.$ac_ext >&5
16966 cf_cv_type_of_bool=unknown
16967 fi
16968 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16969 fi
16970
16971 fi
16972
16973         rm -f cf_test.out
16974 echo "$as_me:16974: result: $cf_cv_type_of_bool" >&5
16975 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16976 if test "$cf_cv_type_of_bool" = unknown ; then
16977         case .$NCURSES_BOOL in #(vi
16978         .auto|.) NCURSES_BOOL=unsigned;;
16979         esac
16980         { echo "$as_me:16980: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
16981 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
16982         cf_cv_type_of_bool=$NCURSES_BOOL
16983 fi
16984
16985                 else
16986                         echo "$as_me:16986: checking for fallback type of bool" >&5
16987 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
16988                         case "$host_cpu" in #(vi
16989                         i?86)   cf_cv_type_of_bool=char ;; #(vi
16990                         *)      cf_cv_type_of_bool=int  ;;
16991                         esac
16992                         echo "$as_me:16992: result: $cf_cv_type_of_bool" >&5
16993 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
16994                 fi
16995         fi
16996 fi
16997
16998 # If the C compiler did not declare bool, and we did not determine that the C++
16999 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17000 # ncurses library use the same type as C++ bool.  Note that this allows one to
17001 # specify the type of bool in a configure-script option and postpone
17002 # integration with the C++ compiler provided that the types are compatible.
17003 USE_CXX_BOOL=1
17004 if test $cf_cv_cc_bool_type = 1
17005 then
17006         # oops: C has a bool.  Unlikely, but C++ could differ.
17007         USE_CXX_BOOL=0
17008 elif test $cf_cv_builtin_bool = 0
17009 then
17010         # C++ has no bool
17011         USE_CXX_BOOL=0
17012 else
17013         # this is the normal case
17014         USE_CXX_BOOL='defined(__cplusplus)'
17015 fi
17016
17017 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17018
17019 if test "$cf_with_ada" != "no" ; then
17020     if test "$with_libtool" != "no"; then
17021         { echo "$as_me:17021: WARNING: libtool does not support Ada - disabling feature" >&5
17022 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17023         cf_with_ada=no
17024     fi
17025 fi
17026
17027 if test "$cf_with_ada" != "no" ; then
17028 cf_ada_make=gnatmake
17029 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17030 set dummy $cf_ada_make; ac_word=$2
17031 echo "$as_me:17031: checking for $ac_word" >&5
17032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17033 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036   if test -n "$gnat_exists"; then
17037   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17038 else
17039   ac_save_IFS=$IFS; IFS=$ac_path_separator
17040 ac_dummy="$PATH"
17041 for ac_dir in $ac_dummy; do
17042   IFS=$ac_save_IFS
17043   test -z "$ac_dir" && ac_dir=.
17044   $as_executable_p "$ac_dir/$ac_word" || continue
17045 ac_cv_prog_gnat_exists="yes"
17046 echo "$as_me:17046: found $ac_dir/$ac_word" >&5
17047 break
17048 done
17049
17050   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17051 fi
17052 fi
17053 gnat_exists=$ac_cv_prog_gnat_exists
17054 if test -n "$gnat_exists"; then
17055   echo "$as_me:17055: result: $gnat_exists" >&5
17056 echo "${ECHO_T}$gnat_exists" >&6
17057 else
17058   echo "$as_me:17058: result: no" >&5
17059 echo "${ECHO_T}no" >&6
17060 fi
17061
17062 if test "$ac_cv_prog_gnat_exists" = no; then
17063    cf_ada_make=
17064 else
17065
17066 echo "$as_me:17066: checking for gnat version" >&5
17067 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17068 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17069   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17070 echo "$as_me:17070: result: $cf_gnat_version" >&5
17071 echo "${ECHO_T}$cf_gnat_version" >&6
17072
17073 case $cf_gnat_version in
17074   3.1[1-9]*|3.[2-9]*|[4-9].*)
17075     cf_cv_prog_gnat_correct=yes
17076     ;;
17077   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17078      cf_cv_prog_gnat_correct=no
17079      ;;
17080 esac
17081 case $cf_gnat_version in
17082   3.[1-9]*|[4-9].*)
17083       cf_compile_generics=generics
17084       cf_generic_objects="\${GENOBJS}"
17085       ;;
17086   *)  cf_compile_generics=
17087       cf_generic_objects=
17088       ;;
17089 esac
17090
17091    # Extract the first word of "m4", so it can be a program name with args.
17092 set dummy m4; ac_word=$2
17093 echo "$as_me:17093: checking for $ac_word" >&5
17094 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17095 if test "${ac_cv_prog_M4_exists+set}" = set; then
17096   echo $ECHO_N "(cached) $ECHO_C" >&6
17097 else
17098   if test -n "$M4_exists"; then
17099   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17100 else
17101   ac_save_IFS=$IFS; IFS=$ac_path_separator
17102 ac_dummy="$PATH"
17103 for ac_dir in $ac_dummy; do
17104   IFS=$ac_save_IFS
17105   test -z "$ac_dir" && ac_dir=.
17106   $as_executable_p "$ac_dir/$ac_word" || continue
17107 ac_cv_prog_M4_exists="yes"
17108 echo "$as_me:17108: found $ac_dir/$ac_word" >&5
17109 break
17110 done
17111
17112   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17113 fi
17114 fi
17115 M4_exists=$ac_cv_prog_M4_exists
17116 if test -n "$M4_exists"; then
17117   echo "$as_me:17117: result: $M4_exists" >&5
17118 echo "${ECHO_T}$M4_exists" >&6
17119 else
17120   echo "$as_me:17120: result: no" >&5
17121 echo "${ECHO_T}no" >&6
17122 fi
17123
17124    if test "$ac_cv_prog_M4_exists" = no; then
17125       cf_cv_prog_gnat_correct=no
17126       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17127    fi
17128    if test "$cf_cv_prog_gnat_correct" = yes; then
17129       echo "$as_me:17129: checking if GNAT works" >&5
17130 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17131
17132 rm -f conftest*
17133 cat >>conftest.ads <<CF_EOF
17134 procedure conftest;
17135 CF_EOF
17136 cat >>conftest.adb <<CF_EOF
17137 with Text_IO;
17138 with GNAT.OS_Lib;
17139 procedure conftest is
17140 begin
17141    Text_IO.Put ("Hello World");
17142    Text_IO.New_Line;
17143    GNAT.OS_Lib.OS_Exit (0);
17144 end conftest;
17145 CF_EOF
17146 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17147    if ( ./conftest 1>&5 2>&1 ) ; then
17148       cf_cv_prog_gnat_correct=yes
17149    else
17150       cf_cv_prog_gnat_correct=no
17151    fi
17152 else
17153    cf_cv_prog_gnat_correct=no
17154 fi
17155 rm -f conftest*
17156
17157       echo "$as_me:17157: result: $cf_cv_prog_gnat_correct" >&5
17158 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17159    fi
17160 fi
17161 if test "$cf_cv_prog_gnat_correct" = yes; then
17162    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17163
17164    echo "$as_me:17164: checking if GNAT pragma Unreferenced works" >&5
17165 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17166
17167 rm -f conftest*
17168 cat >>conftest.ads <<CF_EOF
17169 procedure conftest;
17170 CF_EOF
17171 cat >>conftest.adb <<CF_EOF
17172 with Text_IO;
17173 with GNAT.OS_Lib;
17174 procedure conftest is
17175    test : Integer;
17176    pragma Unreferenced (test);
17177 begin
17178    test := 1;
17179    Text_IO.Put ("Hello World");
17180    Text_IO.New_Line;
17181    GNAT.OS_Lib.OS_Exit (0);
17182 end conftest;
17183 CF_EOF
17184 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17185       cf_cv_pragma_unreferenced=yes
17186 else
17187    cf_cv_pragma_unreferenced=no
17188 fi
17189 rm -f conftest*
17190
17191    echo "$as_me:17191: result: $cf_cv_pragma_unreferenced" >&5
17192 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17193
17194    # if the pragma is supported, use it (needed in the Trace code).
17195    if test $cf_cv_pragma_unreferenced = yes ; then
17196       PRAGMA_UNREF=TRUE
17197    else
17198       PRAGMA_UNREF=FALSE
17199    fi
17200
17201 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17202 if test "${with_ada_compiler+set}" = set; then
17203   withval="$with_ada_compiler"
17204   cf_ada_compiler=$withval
17205 else
17206   cf_ada_compiler=gnatmake
17207 fi;
17208
17209    cf_ada_package=terminal_interface
17210
17211 # Check whether --with-ada-include or --without-ada-include was given.
17212 if test "${with_ada_include+set}" = set; then
17213   withval="$with_ada_include"
17214
17215 else
17216   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17217 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17218
17219 if test "x$prefix" != xNONE; then
17220   cf_path_syntax="$prefix"
17221 else
17222   cf_path_syntax="$ac_default_prefix"
17223 fi
17224
17225 case ".$withval" in #(vi
17226 .\$\(*\)*|.\'*\'*) #(vi
17227   ;;
17228 ..|./*|.\\*) #(vi
17229   ;;
17230 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17231   ;;
17232 .\${*prefix}*) #(vi
17233   eval withval="$withval"
17234   case ".$withval" in #(vi
17235   .NONE/*)
17236     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17237     ;;
17238   esac
17239   ;; #(vi
17240 .no|.NONE/*)
17241   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17242   ;;
17243 *)
17244   { { echo "$as_me:17244: error: expected a pathname, not \"$withval\"" >&5
17245 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17246    { (exit 1); exit 1; }; }
17247   ;;
17248 esac
17249
17250 fi
17251 ADA_INCLUDE="$withval"
17252
17253 # Check whether --with-ada-objects or --without-ada-objects was given.
17254 if test "${with_ada_objects+set}" = set; then
17255   withval="$with_ada_objects"
17256
17257 else
17258   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17259 fi; if test -n "$prefix/lib/ada/adalib" ; then
17260
17261 if test "x$prefix" != xNONE; then
17262   cf_path_syntax="$prefix"
17263 else
17264   cf_path_syntax="$ac_default_prefix"
17265 fi
17266
17267 case ".$withval" in #(vi
17268 .\$\(*\)*|.\'*\'*) #(vi
17269   ;;
17270 ..|./*|.\\*) #(vi
17271   ;;
17272 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17273   ;;
17274 .\${*prefix}*) #(vi
17275   eval withval="$withval"
17276   case ".$withval" in #(vi
17277   .NONE/*)
17278     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17279     ;;
17280   esac
17281   ;; #(vi
17282 .no|.NONE/*)
17283   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17284   ;;
17285 *)
17286   { { echo "$as_me:17286: error: expected a pathname, not \"$withval\"" >&5
17287 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17288    { (exit 1); exit 1; }; }
17289   ;;
17290 esac
17291
17292 fi
17293 ADA_OBJECTS="$withval"
17294
17295 fi
17296 fi
17297 else
17298    cf_with_ada=no
17299 fi
17300
17301 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17302 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17303 ###
17304 ### ticlib modules may be a separate library, otherwise contained in termlib.
17305 ### termlib modules may be a separate library, otherwise contained in ncurses.
17306 ###
17307 ### The of "+" or " " between the tokens controls the way the script
17308 ### chooses to split module lists into libraries.
17309 ###
17310 ### (see CF_LIB_RULES).
17311 echo "$as_me:17311: checking for library subsets" >&5
17312 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17313 LIB_SUBSETS=
17314
17315 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17316         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17317         if test "$with_ticlib" != no ; then
17318                 LIB_SUBSETS="${LIB_SUBSETS} "
17319         else
17320                 LIB_SUBSETS="${LIB_SUBSETS}+"
17321         fi
17322 fi
17323
17324 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17325 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17326
17327 if test "$with_termlib" != no ; then
17328         LIB_SUBSETS="${LIB_SUBSETS} "
17329 else
17330         LIB_SUBSETS="${LIB_SUBSETS}+"
17331 fi
17332
17333 LIB_SUBSETS="${LIB_SUBSETS}base"
17334
17335 # Most term-driver calls are to tinfo, but some like init_pair are to the
17336 # base library (so it resides in base).
17337 if test "$with_term_driver" != no ; then
17338         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17339         case $cf_cv_system_name in #(vi
17340         *mingw32*) #(vi
17341                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17342                 ;;
17343         *) #(vi
17344                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17345                 ;;
17346         esac
17347 fi
17348
17349 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17350 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17351
17352 echo "$as_me:17352: result: $LIB_SUBSETS" >&5
17353 echo "${ECHO_T}$LIB_SUBSETS" >&6
17354
17355 ### Construct the list of include-directories to be generated
17356
17357 CPPFLAGS="$CPPFLAGS -I. -I../include"
17358 if test "$srcdir" != "."; then
17359         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17360 fi
17361 if test "$GCC" != yes; then
17362         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17363 elif test "$includedir" != "/usr/include"; then
17364         if test "$includedir" = '${prefix}/include' ; then
17365                 if test $prefix != /usr ; then
17366                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17367                 fi
17368         else
17369                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17370         fi
17371 fi
17372
17373 ACPPFLAGS="-I. -I../../include $ACPPFLAGS"
17374 if test "$srcdir" != "."; then
17375         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17376 fi
17377 if test "$GCC" != yes; then
17378         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17379 elif test "$includedir" != "/usr/include"; then
17380         if test "$includedir" = '${prefix}/include' ; then
17381                 if test $prefix != /usr ; then
17382                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17383                 fi
17384         else
17385                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17386         fi
17387 fi
17388
17389 ### Build up pieces for makefile rules
17390 echo "$as_me:17390: checking default library suffix" >&5
17391 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17392
17393         case $DFT_LWR_MODEL in
17394         libtool) DFT_ARG_SUFFIX=''   ;;
17395         normal)  DFT_ARG_SUFFIX=''   ;;
17396         debug)   DFT_ARG_SUFFIX='_g' ;;
17397         profile) DFT_ARG_SUFFIX='_p' ;;
17398         shared)  DFT_ARG_SUFFIX=''   ;;
17399         esac
17400         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17401 echo "$as_me:17401: result: $DFT_ARG_SUFFIX" >&5
17402 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17403
17404 echo "$as_me:17404: checking default library-dependency suffix" >&5
17405 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17406
17407         case $DFT_LWR_MODEL in #(vi
17408         libtool) #(vi
17409                 DFT_LIB_SUFFIX='.la'
17410                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17411                 ;;
17412         normal) #(vi
17413                 DFT_LIB_SUFFIX='.a'
17414                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17415                 ;;
17416         debug) #(vi
17417                 DFT_LIB_SUFFIX='_g.a'
17418                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17419                 ;;
17420         profile) #(vi
17421                 DFT_LIB_SUFFIX='_p.a'
17422                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17423                 ;;
17424         shared) #(vi
17425                 case $cf_cv_system_name in
17426                 aix[56]*) #(vi
17427                         DFT_LIB_SUFFIX='.a'
17428                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17429                         ;;
17430                 cygwin*) #(vi
17431                         DFT_LIB_SUFFIX='.dll'
17432                         DFT_DEP_SUFFIX='.dll.a'
17433                         ;;
17434                 darwin*) #(vi
17435                         DFT_LIB_SUFFIX='.dylib'
17436                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17437                         ;;
17438                 hpux*) #(vi
17439                         case $target in
17440                         ia64*) #(vi
17441                                 DFT_LIB_SUFFIX='.so'
17442                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17443                                 ;;
17444                         *) #(vi
17445                                 DFT_LIB_SUFFIX='.sl'
17446                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17447                                 ;;
17448                         esac
17449                         ;;
17450                 *)      DFT_LIB_SUFFIX='.so'
17451                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17452                         ;;
17453                 esac
17454         esac
17455         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17456         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17457 echo "$as_me:17457: result: $DFT_DEP_SUFFIX" >&5
17458 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17459
17460 echo "$as_me:17460: checking default object directory" >&5
17461 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17462
17463         case $DFT_LWR_MODEL in
17464         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17465         normal)  DFT_OBJ_SUBDIR='objects' ;;
17466         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17467         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17468         shared)
17469                 case $cf_cv_system_name in #(vi
17470                 cygwin) #(vi
17471                         DFT_OBJ_SUBDIR='objects' ;;
17472                 *)
17473                         DFT_OBJ_SUBDIR='obj_s' ;;
17474                 esac
17475         esac
17476 echo "$as_me:17476: result: $DFT_OBJ_SUBDIR" >&5
17477 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17478
17479 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17480 if test "$cf_with_cxx" = yes ; then
17481 echo "$as_me:17481: checking c++ library-dependency suffix" >&5
17482 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17483 if test "$with_libtool" != "no"; then
17484         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17485 else
17486
17487         case normal in #(vi
17488         libtool) #(vi
17489                 CXX_LIB_SUFFIX='.la'
17490                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17491                 ;;
17492         normal) #(vi
17493                 CXX_LIB_SUFFIX='.a'
17494                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17495                 ;;
17496         debug) #(vi
17497                 CXX_LIB_SUFFIX='_g.a'
17498                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17499                 ;;
17500         profile) #(vi
17501                 CXX_LIB_SUFFIX='_p.a'
17502                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17503                 ;;
17504         shared) #(vi
17505                 case $cf_cv_system_name in
17506                 aix[56]*) #(vi
17507                         CXX_LIB_SUFFIX='.a'
17508                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17509                         ;;
17510                 cygwin*) #(vi
17511                         CXX_LIB_SUFFIX='.dll'
17512                         CXX_DEP_SUFFIX='.dll.a'
17513                         ;;
17514                 darwin*) #(vi
17515                         CXX_LIB_SUFFIX='.dylib'
17516                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17517                         ;;
17518                 hpux*) #(vi
17519                         case $target in
17520                         ia64*) #(vi
17521                                 CXX_LIB_SUFFIX='.so'
17522                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17523                                 ;;
17524                         *) #(vi
17525                                 CXX_LIB_SUFFIX='.sl'
17526                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17527                                 ;;
17528                         esac
17529                         ;;
17530                 *)      CXX_LIB_SUFFIX='.so'
17531                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17532                         ;;
17533                 esac
17534         esac
17535         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
17536         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
17537 fi
17538 echo "$as_me:17538: result: $CXX_LIB_SUFFIX" >&5
17539 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
17540
17541 fi
17542
17543 # do not want -ldl in build except as needed for -lncurses dependency
17544 if test "$with_dlsym" = yes ; then
17545 if test $DFT_LWR_MODEL = shared || \
17546    test $DFT_LWR_MODEL = libtool ; then
17547
17548 # remove dl library from $LIBS
17549 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
17550
17551 fi
17552 fi
17553 ### Set up low-level terminfo dependencies for makefiles.
17554
17555 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
17556 # do not need libdl
17557 TICS_LIST=
17558 if test "$with_dlsym" = yes ; then
17559
17560 # remove dl library from $SHLIB_LIST
17561 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
17562
17563 fi
17564
17565 if test "$with_ticlib" != no ; then
17566
17567         if test "$with_ticlib" != yes ; then
17568                 TICS_NAME=$with_ticlib
17569                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17570                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17571                 TICS_LIB_SUFFIX="${with_ticlib}"
17572         else
17573                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
17574                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
17575                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
17576         fi
17577         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
17578 else
17579         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17580 fi
17581
17582 if test "$with_termlib" != no ; then
17583
17584         if test "$with_termlib" != yes ; then
17585                 TINFO_NAME=$with_termlib
17586                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17587                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17588                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
17589                 TINFO_LIB_SUFFIX="${with_termlib}"
17590         else
17591                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
17592                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
17593                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
17594                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
17595         fi
17596
17597         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
17598         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
17599         if test "$DFT_LWR_MODEL" = "libtool"; then
17600                 TEST_ARGS="${TEST_DEPS}"
17601                 TEST_ARG2="${TEST_DEP2}"
17602                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
17603                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
17604                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
17605         else
17606                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
17607                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
17608                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
17609                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
17610                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
17611         fi
17612 else
17613         # the next lines are needed for linking libtic over libncurses
17614         TINFO_NAME=${LIB_NAME}
17615         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
17616         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
17617         if test "$with_tic_depends" = yes ; then
17618                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17619         else
17620                 TICS_LIST="$SHLIB_LIST"
17621         fi
17622
17623         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
17624 fi
17625
17626 if test "$DFT_LWR_MODEL" = shared ; then
17627         case $cf_cv_system_name in #(vi
17628         cygwin*)
17629                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
17630                 TINFO_SUFFIX=.dll
17631                 ;;
17632         esac
17633 fi
17634
17635 if test "$with_dlsym" = yes ; then
17636
17637 # remove dl library from $TICS_LIST
17638 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
17639
17640 fi
17641
17642 if test "$DFT_LWR_MODEL" = "libtool"; then
17643     OBJEXT=lo
17644 fi
17645
17646 # needed for Ada95
17647 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
17648
17649 case $DFT_LWR_MODEL in
17650 normal|debug|profile)
17651
17652 if test "$GCC" = yes ; then
17653         case $cf_cv_system_name in #(
17654         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
17655                 LDFLAGS_STATIC=
17656                 LDFLAGS_SHARED=
17657                 ;;
17658     *)  #( normally, except when broken
17659         LDFLAGS_STATIC=-static
17660         LDFLAGS_SHARED=-dynamic
17661         ;;
17662     esac
17663 else
17664         case $cf_cv_system_name in #(
17665         aix[456]*)      #( from ld manpage
17666                 LDFLAGS_STATIC=-bstatic
17667                 LDFLAGS_SHARED=-bdynamic
17668                 ;;
17669         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
17670                 # We could also use just "archive" and "shared".
17671                 LDFLAGS_STATIC=-Wl,-a,archive_shared
17672                 LDFLAGS_SHARED=-Wl,-a,shared_archive
17673                 ;;
17674         irix*)          #( from ld manpage IRIX64
17675                 LDFLAGS_STATIC=-Bstatic
17676                 LDFLAGS_SHARED=-Bdynamic
17677                 ;;
17678         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
17679                 # alternative "-oldstyle_liblookup" (not in cc manpage)
17680                 LDFLAGS_STATIC=-noso
17681                 LDFLAGS_SHARED=-so_archive
17682                 ;;
17683         solaris2*)
17684                 LDFLAGS_STATIC=-Bstatic
17685                 LDFLAGS_SHARED=-Bdynamic
17686                 ;;
17687         esac
17688 fi
17689
17690         ;;
17691 esac
17692
17693 echo "$as_me:17693: checking where we will install curses.h" >&5
17694 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
17695 test "$with_overwrite" = no && \
17696 test "x$includedir" = 'x${prefix}/include' && \
17697         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
17698 echo "$as_me:17698: result: $includedir" >&5
17699 echo "${ECHO_T}$includedir" >&6
17700
17701 ### Resolve a conflict between normal and wide-curses by forcing applications
17702 ### that will need libutf8 to add it to their configure script.
17703 if test "$with_overwrite" != no ; then
17704 if test "$NCURSES_LIBUTF8" = 1 ; then
17705         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
17706         { echo "$as_me:17706: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
17707 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
17708 fi
17709 fi
17710 WITH_OVERWRITE=$with_overwrite
17711
17712 # used to separate tack out of the tree
17713 NCURSES_TREE=
17714
17715 ### predefined stuff for the test programs
17716 cat >>confdefs.h <<\EOF
17717 #define HAVE_SLK_COLOR 1
17718 EOF
17719
17720 ### Construct the list of subdirectories for which we'll customize makefiles
17721 ### with the appropriate compile-rules.
17722
17723 echo "$as_me:17723: checking for src modules" >&5
17724 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
17725
17726 # dependencies and linker-arguments for test-programs
17727 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
17728 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
17729 if test "$DFT_LWR_MODEL" = "libtool"; then
17730         TEST_ARGS="${TEST_DEPS}"
17731         TEST_ARG2="${TEST_DEP2}"
17732 else
17733         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
17734         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
17735 fi
17736
17737 cf_cv_src_modules=
17738 for cf_dir in $modules_to_build
17739 do
17740         if test -f $srcdir/$cf_dir/modules; then
17741
17742                 # We may/may not have tack in the distribution, though the
17743                 # makefile is.
17744                 if test $cf_dir = tack ; then
17745                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
17746                                 continue
17747                         fi
17748                 fi
17749
17750                 if test -z "$cf_cv_src_modules"; then
17751                         cf_cv_src_modules=$cf_dir
17752                 else
17753                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
17754                 fi
17755
17756                 # Make the ncurses_cfg.h file record the library interface files as
17757                 # well.  These are header files that are the same name as their
17758                 # directory.  Ncurses is the only library that does not follow
17759                 # that pattern.
17760                 if test $cf_dir = tack ; then
17761                         continue
17762                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
17763
17764 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17765
17766                         cat >>confdefs.h <<EOF
17767 #define HAVE_${cf_have_include}_H 1
17768 EOF
17769
17770                         cat >>confdefs.h <<EOF
17771 #define HAVE_LIB${cf_have_include} 1
17772 EOF
17773
17774                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
17775                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
17776                         if test "$DFT_LWR_MODEL" = "libtool"; then
17777                                 TEST_ARGS="${TEST_DEPS}"
17778                                 TEST_ARG2="${TEST_DEP2}"
17779                         else
17780                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
17781                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
17782                         fi
17783                 fi
17784         fi
17785 done
17786 echo "$as_me:17786: result: $cf_cv_src_modules" >&5
17787 echo "${ECHO_T}$cf_cv_src_modules" >&6
17788
17789 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
17790 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
17791
17792 SRC_SUBDIRS=
17793 if test "x$cf_with_manpages" != xno ; then
17794         SRC_SUBDIRS="$SRC_SUBDIRS man"
17795 fi
17796 SRC_SUBDIRS="$SRC_SUBDIRS include"
17797 for cf_dir in $cf_cv_src_modules
17798 do
17799         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
17800 done
17801 SRC_SUBDIRS="$SRC_SUBDIRS test"
17802 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
17803 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
17804
17805 ADA_SUBDIRS=
17806 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
17807         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
17808         ADA_SUBDIRS="gen src samples"
17809 fi
17810
17811 SUB_MAKEFILES=
17812 for cf_dir in $SRC_SUBDIRS
17813 do
17814         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
17815 done
17816
17817 if test -n "$ADA_SUBDIRS"; then
17818         for cf_dir in $ADA_SUBDIRS
17819         do
17820                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
17821         done
17822
17823 fi
17824
17825 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
17826    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
17827 fi
17828
17829 DIRS_TO_MAKE="lib"
17830 for cf_item in $cf_list_models
17831 do
17832
17833         case $cf_item in
17834         libtool) cf_subdir='obj_lo'  ;;
17835         normal)  cf_subdir='objects' ;;
17836         debug)   cf_subdir='obj_g' ;;
17837         profile) cf_subdir='obj_p' ;;
17838         shared)
17839                 case $cf_cv_system_name in #(vi
17840                 cygwin) #(vi
17841                         cf_subdir='objects' ;;
17842                 *)
17843                         cf_subdir='obj_s' ;;
17844                 esac
17845         esac
17846
17847         for cf_item2 in $DIRS_TO_MAKE
17848         do
17849                 test $cf_item2 = $cf_subdir && break
17850         done
17851         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
17852 done
17853 for cf_dir in $DIRS_TO_MAKE
17854 do
17855         test ! -d $cf_dir && mkdir $cf_dir
17856 done
17857
17858 cat >>confdefs.h <<EOF
17859 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
17860 EOF
17861
17862 cat >>confdefs.h <<EOF
17863 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
17864 EOF
17865
17866 ### Now that we're done running tests, add the compiler-warnings, if any
17867
17868 cf_fix_cppflags=no
17869 cf_new_cflags=
17870 cf_new_cppflags=
17871 cf_new_extra_cppflags=
17872
17873 for cf_add_cflags in $EXTRA_CFLAGS
17874 do
17875 case $cf_fix_cppflags in
17876 no)
17877         case $cf_add_cflags in #(vi
17878         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
17879                 case $cf_add_cflags in
17880                 -D*)
17881                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17882
17883                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17884                                 && test -z "${cf_tst_cflags}" \
17885                                 && cf_fix_cppflags=yes
17886
17887                         if test $cf_fix_cppflags = yes ; then
17888                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17889                                 continue
17890                         elif test "${cf_tst_cflags}" = "\"'" ; then
17891                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17892                                 continue
17893                         fi
17894                         ;;
17895                 esac
17896                 case "$CPPFLAGS" in
17897                 *$cf_add_cflags) #(vi
17898                         ;;
17899                 *) #(vi
17900                         case $cf_add_cflags in #(vi
17901                         -D*)
17902                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17903
17904 CPPFLAGS=`echo "$CPPFLAGS" | \
17905         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17906                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17907
17908                                 ;;
17909                         esac
17910                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17911                         ;;
17912                 esac
17913                 ;;
17914         *)
17915                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17916                 ;;
17917         esac
17918         ;;
17919 yes)
17920         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17921
17922         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17923
17924         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
17925                 && test -z "${cf_tst_cflags}" \
17926                 && cf_fix_cppflags=no
17927         ;;
17928 esac
17929 done
17930
17931 if test -n "$cf_new_cflags" ; then
17932
17933         CFLAGS="$CFLAGS $cf_new_cflags"
17934 fi
17935
17936 if test -n "$cf_new_cppflags" ; then
17937
17938         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17939 fi
17940
17941 if test -n "$cf_new_extra_cppflags" ; then
17942
17943         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17944 fi
17945
17946 ### If we're building with rpath, try to link non-standard libs that way too.
17947 if test "$DFT_LWR_MODEL" = "shared"; then
17948
17949 echo "$as_me:17949: checking for updated LDFLAGS" >&5
17950 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
17951 if test -n "$LDFLAGS" ; then
17952 echo "$as_me:17952: result: maybe" >&5
17953 echo "${ECHO_T}maybe" >&6
17954 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
17955
17956 echo "${as_me-configure}:17956: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
17957
17958 test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
17959
17960 echo "${as_me-configure}:17960: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
17961
17962 case "$EXTRA_LDFLAGS" in #(vi
17963 -Wl,-rpath,*) #(vi
17964         cf_rpath_hack="-Wl,-rpath,"
17965         ;;
17966 -R\ *)
17967         cf_rpath_hack="-R "
17968         ;;
17969 -R*)
17970         cf_rpath_hack="-R"
17971         ;;
17972 *)
17973         cf_rpath_hack=
17974         ;;
17975 esac
17976 if test -n "$cf_rpath_hack" ; then
17977         cf_rpath_dst=
17978         for cf_rpath_src in $LDFLAGS
17979         do
17980                 test -n "$verbose" && echo "    Filtering $cf_rpath_src" 1>&6
17981
17982 echo "${as_me-configure}:17982: testing Filtering $cf_rpath_src ..." 1>&5
17983
17984                 case $cf_rpath_src in #(vi
17985                 -L*) #(vi
17986                         if test "$cf_rpath_hack" = "-R " ; then
17987                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e 's%-L%-R %'`
17988                         else
17989                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e s%-L%$cf_rpath_hack%`
17990                         fi
17991                         test -n "$verbose" && echo "    ...Filter $cf_rpath_tmp" 1>&6
17992
17993 echo "${as_me-configure}:17993: testing ...Filter $cf_rpath_tmp ..." 1>&5
17994
17995                         EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
17996                         ;;
17997                 esac
17998                 cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
17999         done
18000         LDFLAGS=$cf_rpath_dst
18001         test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18002
18003 echo "${as_me-configure}:18003: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18004
18005         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18006
18007 echo "${as_me-configure}:18007: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18008
18009 fi
18010 else
18011 echo "$as_me:18011: result: no" >&5
18012 echo "${ECHO_T}no" >&6
18013 fi
18014
18015 fi
18016
18017 ### Define substitutions for header files to avoid name-pollution
18018
18019 if test "$cf_cv_have_tcgetattr" = yes ; then
18020         HAVE_TCGETATTR=1
18021 else
18022         HAVE_TCGETATTR=0
18023 fi
18024
18025 if test "$ac_cv_header_termio_h" = yes ; then
18026         HAVE_TERMIO_H=1
18027 else
18028         HAVE_TERMIO_H=0
18029 fi
18030
18031 if test "$ac_cv_header_termios_h" = yes ; then
18032         HAVE_TERMIOS_H=1
18033 else
18034         HAVE_TERMIOS_H=0
18035 fi
18036
18037 ################################################################################
18038 test "$use_database" = yes && \
18039 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18040
18041 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18042
18043 if test x"$enable_pc_files" = xyes ; then \
18044 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18045 MAKE_PC_FILES=
18046 else
18047 MAKE_PC_FILES="#"
18048 fi
18049
18050 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"
18051 ac_config_commands="$ac_config_commands default"
18052 cat >confcache <<\_ACEOF
18053 # This file is a shell script that caches the results of configure
18054 # tests run on this system so they can be shared between configure
18055 # scripts and configure runs, see configure's option --config-cache.
18056 # It is not useful on other systems.  If it contains results you don't
18057 # want to keep, you may remove or edit it.
18058 #
18059 # config.status only pays attention to the cache file if you give it
18060 # the --recheck option to rerun configure.
18061 #
18062 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18063 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18064 # following values.
18065
18066 _ACEOF
18067
18068 # The following way of writing the cache mishandles newlines in values,
18069 # but we know of no workaround that is simple, portable, and efficient.
18070 # So, don't put newlines in cache variables' values.
18071 # Ultrix sh set writes to stderr and can't be redirected directly,
18072 # and sets the high bit in the cache file unless we assign to the vars.
18073 {
18074   (set) 2>&1 |
18075     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18076     *ac_space=\ *)
18077       # `set' does not quote correctly, so add quotes (double-quote
18078       # substitution turns \\\\ into \\, and sed turns \\ into \).
18079       sed -n \
18080         "s/'/'\\\\''/g;
18081           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18082       ;;
18083     *)
18084       # `set' quotes correctly as required by POSIX, so do not add quotes.
18085       sed -n \
18086         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18087       ;;
18088     esac;
18089 } |
18090   sed '
18091      t clear
18092      : clear
18093      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18094      t end
18095      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18096      : end' >>confcache
18097 if cmp -s $cache_file confcache; then :; else
18098   if test -w $cache_file; then
18099     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18100     cat confcache >$cache_file
18101   else
18102     echo "not updating unwritable cache $cache_file"
18103   fi
18104 fi
18105 rm -f confcache
18106
18107 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18108 # Let make expand exec_prefix.
18109 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18110
18111 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18112 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18113 # trailing colons and then remove the whole line if VPATH becomes empty
18114 # (actually we leave an empty line to preserve line numbers).
18115 if test "x$srcdir" = x.; then
18116   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18117 s/:*\$(srcdir):*/:/;
18118 s/:*\${srcdir}:*/:/;
18119 s/:*@srcdir@:*/:/;
18120 s/^\([^=]*=[    ]*\):*/\1/;
18121 s/:*$//;
18122 s/^[^=]*=[      ]*$//;
18123 }'
18124 fi
18125
18126 DEFS=-DHAVE_CONFIG_H
18127
18128 : ${CONFIG_STATUS=./config.status}
18129 ac_clean_files_save=$ac_clean_files
18130 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18131 { echo "$as_me:18131: creating $CONFIG_STATUS" >&5
18132 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18133 cat >$CONFIG_STATUS <<_ACEOF
18134 #! $SHELL
18135 # Generated automatically by configure.
18136 # Run this file to recreate the current configuration.
18137 # Compiler output produced by configure, useful for debugging
18138 # configure, is in config.log if it exists.
18139
18140 debug=false
18141 SHELL=\${CONFIG_SHELL-$SHELL}
18142 ac_cs_invocation="\$0 \$@"
18143
18144 _ACEOF
18145
18146 cat >>$CONFIG_STATUS <<\_ACEOF
18147 # Be Bourne compatible
18148 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18149   emulate sh
18150   NULLCMD=:
18151 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18152   set -o posix
18153 fi
18154
18155 # Name of the executable.
18156 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18157
18158 if expr a : '\(a\)' >/dev/null 2>&1; then
18159   as_expr=expr
18160 else
18161   as_expr=false
18162 fi
18163
18164 rm -f conf$$ conf$$.exe conf$$.file
18165 echo >conf$$.file
18166 if ln -s conf$$.file conf$$ 2>/dev/null; then
18167   # We could just check for DJGPP; but this test a) works b) is more generic
18168   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18169   if test -f conf$$.exe; then
18170     # Don't use ln at all; we don't have any links
18171     as_ln_s='cp -p'
18172   else
18173     as_ln_s='ln -s'
18174   fi
18175 elif ln conf$$.file conf$$ 2>/dev/null; then
18176   as_ln_s=ln
18177 else
18178   as_ln_s='cp -p'
18179 fi
18180 rm -f conf$$ conf$$.exe conf$$.file
18181
18182 as_executable_p="test -f"
18183
18184 # Support unset when possible.
18185 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18186   as_unset=unset
18187 else
18188   as_unset=false
18189 fi
18190
18191 # NLS nuisances.
18192 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18193 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18194 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18195 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18196 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18197 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18198 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18199 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18200
18201 # IFS
18202 # We need space, tab and new line, in precisely that order.
18203 as_nl='
18204 '
18205 IFS="   $as_nl"
18206
18207 # CDPATH.
18208 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18209
18210 exec 6>&1
18211
18212 _ACEOF
18213
18214 # Files that config.status was made for.
18215 if test -n "$ac_config_files"; then
18216   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18217 fi
18218
18219 if test -n "$ac_config_headers"; then
18220   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18221 fi
18222
18223 if test -n "$ac_config_links"; then
18224   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18225 fi
18226
18227 if test -n "$ac_config_commands"; then
18228   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18229 fi
18230
18231 cat >>$CONFIG_STATUS <<\EOF
18232
18233 ac_cs_usage="\
18234 \`$as_me' instantiates files from templates according to the
18235 current configuration.
18236
18237 Usage: $0 [OPTIONS] [FILE]...
18238
18239   -h, --help       print this help, then exit
18240   -V, --version    print version number, then exit
18241   -d, --debug      don't remove temporary files
18242       --recheck    update $as_me by reconfiguring in the same conditions
18243   --file=FILE[:TEMPLATE]
18244                    instantiate the configuration file FILE
18245   --header=FILE[:TEMPLATE]
18246                    instantiate the configuration header FILE
18247
18248 Configuration files:
18249 $config_files
18250
18251 Configuration headers:
18252 $config_headers
18253
18254 Configuration commands:
18255 $config_commands
18256
18257 Report bugs to <bug-autoconf@gnu.org>."
18258 EOF
18259
18260 cat >>$CONFIG_STATUS <<EOF
18261 ac_cs_version="\\
18262 config.status
18263 configured by $0, generated by GNU Autoconf 2.52.20081225,
18264   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18265
18266 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18267 Free Software Foundation, Inc.
18268 This config.status script is free software; the Free Software Foundation
18269 gives unlimited permission to copy, distribute and modify it."
18270 srcdir=$srcdir
18271 INSTALL="$INSTALL"
18272 EOF
18273
18274 cat >>$CONFIG_STATUS <<\EOF
18275 # If no file are specified by the user, then we need to provide default
18276 # value.  By we need to know if files were specified by the user.
18277 ac_need_defaults=:
18278 while test $# != 0
18279 do
18280   case $1 in
18281   --*=*)
18282     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18283     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18284     shift
18285     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18286     shift
18287     ;;
18288   -*);;
18289   *) # This is not an option, so the user has probably given explicit
18290      # arguments.
18291      ac_need_defaults=false;;
18292   esac
18293
18294   case $1 in
18295   # Handling of the options.
18296 EOF
18297 cat >>$CONFIG_STATUS <<EOF
18298   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18299     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18300     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18301 EOF
18302 cat >>$CONFIG_STATUS <<\EOF
18303   --version | --vers* | -V )
18304     echo "$ac_cs_version"; exit 0 ;;
18305   --he | --h)
18306     # Conflict between --help and --header
18307     { { echo "$as_me:18307: error: ambiguous option: $1
18308 Try \`$0 --help' for more information." >&5
18309 echo "$as_me: error: ambiguous option: $1
18310 Try \`$0 --help' for more information." >&2;}
18311    { (exit 1); exit 1; }; };;
18312   --help | --hel | -h )
18313     echo "$ac_cs_usage"; exit 0 ;;
18314   --debug | --d* | -d )
18315     debug=: ;;
18316   --file | --fil | --fi | --f )
18317     shift
18318     CONFIG_FILES="$CONFIG_FILES $1"
18319     ac_need_defaults=false;;
18320   --header | --heade | --head | --hea )
18321     shift
18322     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18323     ac_need_defaults=false;;
18324
18325   # This is an error.
18326   -*) { { echo "$as_me:18326: error: unrecognized option: $1
18327 Try \`$0 --help' for more information." >&5
18328 echo "$as_me: error: unrecognized option: $1
18329 Try \`$0 --help' for more information." >&2;}
18330    { (exit 1); exit 1; }; } ;;
18331
18332   *) ac_config_targets="$ac_config_targets $1" ;;
18333
18334   esac
18335   shift
18336 done
18337
18338 exec 5>>config.log
18339 cat >&5 << _ACEOF
18340
18341 ## ----------------------- ##
18342 ## Running config.status.  ##
18343 ## ----------------------- ##
18344
18345 This file was extended by $as_me 2.52.20081225, executed with
18346   CONFIG_FILES    = $CONFIG_FILES
18347   CONFIG_HEADERS  = $CONFIG_HEADERS
18348   CONFIG_LINKS    = $CONFIG_LINKS
18349   CONFIG_COMMANDS = $CONFIG_COMMANDS
18350   > $ac_cs_invocation
18351 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18352
18353 _ACEOF
18354 EOF
18355
18356 cat >>$CONFIG_STATUS <<EOF
18357 #
18358 # INIT-COMMANDS section.
18359 #
18360
18361 ### Special initialization commands, used to pass information from the
18362 ### configuration-run into config.status
18363
18364 AWK="$AWK"
18365 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18366 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18367 ECHO_LINK="$ECHO_LINK"
18368 LDCONFIG="$LDCONFIG"
18369 LIB_NAME="$LIB_NAME"
18370 LIB_SUBSETS="$LIB_SUBSETS"
18371 LIB_SUFFIX="$LIB_SUFFIX"
18372 LIB_TRACING="$LIB_TRACING"
18373 MAKE_TERMINFO="$MAKE_TERMINFO"
18374 NCURSES_MAJOR="$NCURSES_MAJOR"
18375 NCURSES_MINOR="$NCURSES_MINOR"
18376 NCURSES_OSPEED="$NCURSES_OSPEED"
18377 NCURSES_PATCH="$NCURSES_PATCH"
18378 SRC_SUBDIRS="$SRC_SUBDIRS"
18379 TERMINFO="$TERMINFO"
18380 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
18381 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
18382 TICS_NAME="$TICS_NAME"
18383 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
18384 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
18385 TINFO_NAME="$TINFO_NAME"
18386 TINFO_SUFFIX="$TINFO_SUFFIX"
18387 WITH_CURSES_H="$with_curses_h"
18388 WITH_ECHO="$with_echo"
18389 WITH_OVERWRITE="$with_overwrite"
18390 cf_LIST_MODELS="$cf_list_models"
18391 cf_cv_abi_version="$cf_cv_abi_version"
18392 cf_cv_do_relink="$cf_cv_do_relink"
18393 cf_cv_do_symlinks="$cf_cv_do_symlinks"
18394 cf_cv_enable_lp64="$cf_cv_enable_lp64"
18395 cf_cv_enable_opaque="$cf_cv_enable_opaque"
18396 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
18397 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
18398 cf_cv_rel_version="$cf_cv_rel_version"
18399 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18400 cf_cv_shared_soname='$cf_cv_shared_soname'
18401 cf_cv_shlib_version="$cf_cv_shlib_version"
18402 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18403 cf_cv_system_name="$cf_cv_system_name"
18404 cf_with_cxx_binding="$cf_with_cxx_binding"
18405 cf_with_manpages="$cf_with_manpages"
18406 host="$host"
18407 target="$target"
18408
18409 EOF
18410
18411 cat >>$CONFIG_STATUS <<\EOF
18412 for ac_config_target in $ac_config_targets
18413 do
18414   case "$ac_config_target" in
18415   # Handling of arguments.
18416   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
18417   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
18418   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
18419   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
18420   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
18421   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18422   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18423   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18424   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18425   *) { { echo "$as_me:18425: error: invalid argument: $ac_config_target" >&5
18426 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18427    { (exit 1); exit 1; }; };;
18428   esac
18429 done
18430
18431 # If the user did not use the arguments to specify the items to instantiate,
18432 # then the envvar interface is used.  Set only those that are not.
18433 # We use the long form for the default assignment because of an extremely
18434 # bizarre bug on SunOS 4.1.3.
18435 if $ac_need_defaults; then
18436   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18437   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18438   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18439 fi
18440
18441 # Create a temporary directory, and hook for its removal unless debugging.
18442 $debug ||
18443 {
18444   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18445   trap '{ (exit 1); exit 1; }' 1 2 13 15
18446 }
18447
18448 # Create a (secure) tmp directory for tmp files.
18449 : ${TMPDIR=/tmp}
18450 {
18451   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18452   test -n "$tmp" && test -d "$tmp"
18453 }  ||
18454 {
18455   tmp=$TMPDIR/cs$$-$RANDOM
18456   (umask 077 && mkdir $tmp)
18457 } ||
18458 {
18459    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18460    { (exit 1); exit 1; }
18461 }
18462
18463 EOF
18464
18465 cat >>$CONFIG_STATUS <<EOF
18466
18467 #
18468 # CONFIG_FILES section.
18469 #
18470
18471 # No need to generate the scripts if there are no CONFIG_FILES.
18472 # This happens for instance when ./config.status config.h
18473 if test -n "\$CONFIG_FILES"; then
18474   # Protect against being on the right side of a sed subst in config.status.
18475   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18476    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18477 s,@SHELL@,$SHELL,;t t
18478 s,@exec_prefix@,$exec_prefix,;t t
18479 s,@prefix@,$prefix,;t t
18480 s,@program_transform_name@,$program_transform_name,;t t
18481 s,@bindir@,$bindir,;t t
18482 s,@sbindir@,$sbindir,;t t
18483 s,@libexecdir@,$libexecdir,;t t
18484 s,@datadir@,$datadir,;t t
18485 s,@sysconfdir@,$sysconfdir,;t t
18486 s,@sharedstatedir@,$sharedstatedir,;t t
18487 s,@localstatedir@,$localstatedir,;t t
18488 s,@libdir@,$libdir,;t t
18489 s,@includedir@,$includedir,;t t
18490 s,@oldincludedir@,$oldincludedir,;t t
18491 s,@infodir@,$infodir,;t t
18492 s,@mandir@,$mandir,;t t
18493 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
18494 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
18495 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
18496 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
18497 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
18498 s,@build_alias@,$build_alias,;t t
18499 s,@host_alias@,$host_alias,;t t
18500 s,@target_alias@,$target_alias,;t t
18501 s,@ECHO_C@,$ECHO_C,;t t
18502 s,@ECHO_N@,$ECHO_N,;t t
18503 s,@ECHO_T@,$ECHO_T,;t t
18504 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
18505 s,@DEFS@,$DEFS,;t t
18506 s,@LIBS@,$LIBS,;t t
18507 s,@top_builddir@,$top_builddir,;t t
18508 s,@EGREP@,$EGREP,;t t
18509 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
18510 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
18511 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
18512 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
18513 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
18514 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
18515 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
18516 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
18517 s,@build@,$build,;t t
18518 s,@build_cpu@,$build_cpu,;t t
18519 s,@build_vendor@,$build_vendor,;t t
18520 s,@build_os@,$build_os,;t t
18521 s,@host@,$host,;t t
18522 s,@host_cpu@,$host_cpu,;t t
18523 s,@host_vendor@,$host_vendor,;t t
18524 s,@host_os@,$host_os,;t t
18525 s,@target@,$target,;t t
18526 s,@target_cpu@,$target_cpu,;t t
18527 s,@target_vendor@,$target_vendor,;t t
18528 s,@target_os@,$target_os,;t t
18529 s,@CC@,$CC,;t t
18530 s,@CFLAGS@,$CFLAGS,;t t
18531 s,@LDFLAGS@,$LDFLAGS,;t t
18532 s,@CPPFLAGS@,$CPPFLAGS,;t t
18533 s,@ac_ct_CC@,$ac_ct_CC,;t t
18534 s,@EXEEXT@,$EXEEXT,;t t
18535 s,@OBJEXT@,$OBJEXT,;t t
18536 s,@CPP@,$CPP,;t t
18537 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
18538 s,@PROG_EXT@,$PROG_EXT,;t t
18539 s,@LDCONFIG@,$LDCONFIG,;t t
18540 s,@CXX@,$CXX,;t t
18541 s,@CXXFLAGS@,$CXXFLAGS,;t t
18542 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
18543 s,@AWK@,$AWK,;t t
18544 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
18545 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
18546 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
18547 s,@LINT@,$LINT,;t t
18548 s,@LINT_OPTS@,$LINT_OPTS,;t t
18549 s,@LN_S@,$LN_S,;t t
18550 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
18551 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
18552 s,@SET_MAKE@,$SET_MAKE,;t t
18553 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
18554 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
18555 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
18556 s,@RANLIB@,$RANLIB,;t t
18557 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
18558 s,@LD@,$LD,;t t
18559 s,@ac_ct_LD@,$ac_ct_LD,;t t
18560 s,@AR@,$AR,;t t
18561 s,@ac_ct_AR@,$ac_ct_AR,;t t
18562 s,@ARFLAGS@,$ARFLAGS,;t t
18563 s,@DESTDIR@,$DESTDIR,;t t
18564 s,@BUILD_CC@,$BUILD_CC,;t t
18565 s,@BUILD_CPP@,$BUILD_CPP,;t t
18566 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
18567 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
18568 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
18569 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
18570 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
18571 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
18572 s,@cf_list_models@,$cf_list_models,;t t
18573 s,@LIBTOOL@,$LIBTOOL,;t t
18574 s,@LT_UNDEF@,$LT_UNDEF,;t t
18575 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
18576 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
18577 s,@LIB_CREATE@,$LIB_CREATE,;t t
18578 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
18579 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
18580 s,@LIB_PREP@,$LIB_PREP,;t t
18581 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
18582 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
18583 s,@LIB_LINK@,$LIB_LINK,;t t
18584 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
18585 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
18586 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
18587 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
18588 s,@TICS_NAME@,$TICS_NAME,;t t
18589 s,@TINFO_NAME@,$TINFO_NAME,;t t
18590 s,@LIB_NAME@,$LIB_NAME,;t t
18591 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
18592 s,@CC_G_OPT@,$CC_G_OPT,;t t
18593 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
18594 s,@LD_MODEL@,$LD_MODEL,;t t
18595 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
18596 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
18597 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
18598 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
18599 s,@LINK_PROGS@,$LINK_PROGS,;t t
18600 s,@LINK_TESTS@,$LINK_TESTS,;t t
18601 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
18602 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
18603 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
18604 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
18605 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
18606 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
18607 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
18608 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
18609 s,@TERMINFO@,$TERMINFO,;t t
18610 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
18611 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
18612 s,@TERMPATH@,$TERMPATH,;t t
18613 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
18614 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
18615 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
18616 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
18617 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
18618 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
18619 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
18620 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
18621 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
18622 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
18623 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
18624 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
18625 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
18626 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
18627 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
18628 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
18629 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
18630 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
18631 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
18632 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
18633 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
18634 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
18635 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
18636 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
18637 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
18638 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
18639 s,@PTHREAD@,$PTHREAD,;t t
18640 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
18641 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
18642 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
18643 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
18644 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
18645 s,@ECHO_LINK@,$ECHO_LINK,;t t
18646 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
18647 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
18648 s,@ADA_TRACE@,$ADA_TRACE,;t t
18649 s,@MATH_LIB@,$MATH_LIB,;t t
18650 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
18651 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
18652 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
18653 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
18654 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
18655 s,@TEST_LIBS@,$TEST_LIBS,;t t
18656 s,@CXXCPP@,$CXXCPP,;t t
18657 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
18658 s,@CXX_AR@,$CXX_AR,;t t
18659 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
18660 s,@CXXLIBS@,$CXXLIBS,;t t
18661 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
18662 s,@gnat_exists@,$gnat_exists,;t t
18663 s,@M4_exists@,$M4_exists,;t t
18664 s,@cf_ada_make@,$cf_ada_make,;t t
18665 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
18666 s,@cf_ada_package@,$cf_ada_package,;t t
18667 s,@ADAFLAGS@,$ADAFLAGS,;t t
18668 s,@cf_compile_generics@,$cf_compile_generics,;t t
18669 s,@cf_generic_objects@,$cf_generic_objects,;t t
18670 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
18671 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
18672 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
18673 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
18674 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
18675 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
18676 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
18677 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
18678 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
18679 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
18680 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
18681 s,@TICS_ARGS@,$TICS_ARGS,;t t
18682 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
18683 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
18684 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
18685 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
18686 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
18687 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
18688 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
18689 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
18690 s,@TICS_LIST@,$TICS_LIST,;t t
18691 s,@TINFO_LIST@,$TINFO_LIST,;t t
18692 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
18693 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
18694 s,@TEST_ARGS@,$TEST_ARGS,;t t
18695 s,@TEST_DEPS@,$TEST_DEPS,;t t
18696 s,@TEST_ARG2@,$TEST_ARG2,;t t
18697 s,@TEST_DEP2@,$TEST_DEP2,;t t
18698 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
18699 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
18700 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
18701 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
18702 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
18703 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
18704 s,@cross_compiling@,$cross_compiling,;t t
18705 CEOF
18706
18707 EOF
18708
18709   cat >>$CONFIG_STATUS <<\EOF
18710   # Split the substitutions into bite-sized pieces for seds with
18711   # small command number limits, like on Digital OSF/1 and HP-UX.
18712   ac_max_sed_lines=48
18713   ac_sed_frag=1 # Number of current file.
18714   ac_beg=1 # First line for current file.
18715   ac_end=$ac_max_sed_lines # Line after last line for current file.
18716   ac_more_lines=:
18717   ac_sed_cmds=
18718   while $ac_more_lines; do
18719     if test $ac_beg -gt 1; then
18720       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18721     else
18722       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
18723     fi
18724     if test ! -s $tmp/subs.frag; then
18725       ac_more_lines=false
18726     else
18727       # The purpose of the label and of the branching condition is to
18728       # speed up the sed processing (if there are no `@' at all, there
18729       # is no need to browse any of the substitutions).
18730       # These are the two extra sed commands mentioned above.
18731       (echo ':t
18732   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
18733       if test -z "$ac_sed_cmds"; then
18734         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
18735       else
18736         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
18737       fi
18738       ac_sed_frag=`expr $ac_sed_frag + 1`
18739       ac_beg=$ac_end
18740       ac_end=`expr $ac_end + $ac_max_sed_lines`
18741     fi
18742   done
18743   if test -z "$ac_sed_cmds"; then
18744     ac_sed_cmds=cat
18745   fi
18746 fi # test -n "$CONFIG_FILES"
18747
18748 EOF
18749 cat >>$CONFIG_STATUS <<\EOF
18750 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
18751   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18752   case $ac_file in
18753   - | *:- | *:-:* ) # input from stdin
18754         cat >$tmp/stdin
18755         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18756         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18757   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18758         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18759   * )   ac_file_in=$ac_file.in ;;
18760   esac
18761
18762   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
18763   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18764          X"$ac_file" : 'X\(//\)[^/]' \| \
18765          X"$ac_file" : 'X\(//\)$' \| \
18766          X"$ac_file" : 'X\(/\)' \| \
18767          .     : '\(.\)' 2>/dev/null ||
18768 echo X"$ac_file" |
18769     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
18770           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
18771           /^X\(\/\/\)$/{ s//\1/; q; }
18772           /^X\(\/\).*/{ s//\1/; q; }
18773           s/.*/./; q'`
18774   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
18775     { case "$ac_dir" in
18776   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
18777   *)                      as_incr_dir=.;;
18778 esac
18779 as_dummy="$ac_dir"
18780 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
18781   case $as_mkdir_dir in
18782     # Skip DOS drivespec
18783     ?:) as_incr_dir=$as_mkdir_dir ;;
18784     *)
18785       as_incr_dir=$as_incr_dir/$as_mkdir_dir
18786       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
18787     ;;
18788   esac
18789 done; }
18790
18791     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
18792     # A "../" for each directory in $ac_dir_suffix.
18793     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
18794   else
18795     ac_dir_suffix= ac_dots=
18796   fi
18797
18798   case $srcdir in
18799   .)  ac_srcdir=.
18800       if test -z "$ac_dots"; then
18801          ac_top_srcdir=.
18802       else
18803          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
18804       fi ;;
18805   [\\/]* | ?:[\\/]* )
18806       ac_srcdir=$srcdir$ac_dir_suffix;
18807       ac_top_srcdir=$srcdir ;;
18808   *) # Relative path.
18809     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
18810     ac_top_srcdir=$ac_dots$srcdir ;;
18811   esac
18812
18813   case $INSTALL in
18814   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18815   *) ac_INSTALL=$ac_dots$INSTALL ;;
18816   esac
18817
18818   if test x"$ac_file" != x-; then
18819     { echo "$as_me:18819: creating $ac_file" >&5
18820 echo "$as_me: creating $ac_file" >&6;}
18821     rm -f "$ac_file"
18822   fi
18823   # Let's still pretend it is `configure' which instantiates (i.e., don't
18824   # use $as_me), people would be surprised to read:
18825   #    /* config.h.  Generated automatically by config.status.  */
18826   configure_input="Generated automatically from `echo $ac_file_in |
18827                                                  sed 's,.*/,,'` by configure."
18828
18829   # First look for the input files in the build tree, otherwise in the
18830   # src tree.
18831   ac_file_inputs=`IFS=:
18832     for f in $ac_file_in; do
18833       case $f in
18834       -) echo $tmp/stdin ;;
18835       [\\/$]*)
18836          # Absolute (can't be DOS-style, as IFS=:)
18837          test -f "$f" || { { echo "$as_me:18837: error: cannot find input file: $f" >&5
18838 echo "$as_me: error: cannot find input file: $f" >&2;}
18839    { (exit 1); exit 1; }; }
18840          echo $f;;
18841       *) # Relative
18842          if test -f "$f"; then
18843            # Build tree
18844            echo $f
18845          elif test -f "$srcdir/$f"; then
18846            # Source tree
18847            echo $srcdir/$f
18848          else
18849            # /dev/null tree
18850            { { echo "$as_me:18850: error: cannot find input file: $f" >&5
18851 echo "$as_me: error: cannot find input file: $f" >&2;}
18852    { (exit 1); exit 1; }; }
18853          fi;;
18854       esac
18855     done` || { (exit 1); exit 1; }
18856 EOF
18857 cat >>$CONFIG_STATUS <<EOF
18858   sed "$ac_vpsub
18859 $extrasub
18860 EOF
18861 cat >>$CONFIG_STATUS <<\EOF
18862 :t
18863 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18864 s,@configure_input@,$configure_input,;t t
18865 s,@srcdir@,$ac_srcdir,;t t
18866 s,@top_srcdir@,$ac_top_srcdir,;t t
18867 s,@INSTALL@,$ac_INSTALL,;t t
18868 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
18869   rm -f $tmp/stdin
18870   if test x"$ac_file" != x-; then
18871     mv $tmp/out $ac_file
18872   else
18873     cat $tmp/out
18874     rm -f $tmp/out
18875   fi
18876
18877 done
18878 EOF
18879 cat >>$CONFIG_STATUS <<\EOF
18880
18881 #
18882 # CONFIG_HEADER section.
18883 #
18884
18885 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
18886 # NAME is the cpp macro being defined and VALUE is the value it is being given.
18887 #
18888 # ac_d sets the value in "#define NAME VALUE" lines.
18889 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
18890 ac_dB='[        ].*$,\1#\2'
18891 ac_dC=' '
18892 ac_dD=',;t'
18893 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
18894 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18895 ac_iB='\([      ]\),\1#\2define\3'
18896 ac_iC=' '
18897 ac_iD='\4,;t'
18898 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
18899 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
18900 ac_uB='$,\1#\2define\3'
18901 ac_uC=' '
18902 ac_uD=',;t'
18903
18904 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
18905   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
18906   case $ac_file in
18907   - | *:- | *:-:* ) # input from stdin
18908         cat >$tmp/stdin
18909         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18910         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18911   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
18912         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
18913   * )   ac_file_in=$ac_file.in ;;
18914   esac
18915
18916   test x"$ac_file" != x- && { echo "$as_me:18916: creating $ac_file" >&5
18917 echo "$as_me: creating $ac_file" >&6;}
18918
18919   # First look for the input files in the build tree, otherwise in the
18920   # src tree.
18921   ac_file_inputs=`IFS=:
18922     for f in $ac_file_in; do
18923       case $f in
18924       -) echo $tmp/stdin ;;
18925       [\\/$]*)
18926          # Absolute (can't be DOS-style, as IFS=:)
18927          test -f "$f" || { { echo "$as_me:18927: error: cannot find input file: $f" >&5
18928 echo "$as_me: error: cannot find input file: $f" >&2;}
18929    { (exit 1); exit 1; }; }
18930          echo $f;;
18931       *) # Relative
18932          if test -f "$f"; then
18933            # Build tree
18934            echo $f
18935          elif test -f "$srcdir/$f"; then
18936            # Source tree
18937            echo $srcdir/$f
18938          else
18939            # /dev/null tree
18940            { { echo "$as_me:18940: error: cannot find input file: $f" >&5
18941 echo "$as_me: error: cannot find input file: $f" >&2;}
18942    { (exit 1); exit 1; }; }
18943          fi;;
18944       esac
18945     done` || { (exit 1); exit 1; }
18946   # Remove the trailing spaces.
18947   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
18948
18949 EOF
18950
18951 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
18952 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
18953 # be either 'cat' or 'sort'.
18954 cat confdefs.h | uniq >conftest.vals
18955
18956 # Break up conftest.vals because some shells have a limit on
18957 # the size of here documents, and old seds have small limits too.
18958
18959 rm -f conftest.tail
18960 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
18961 while grep . conftest.vals >/dev/null
18962 do
18963   # Write chunks of a limited-size here document to conftest.frag.
18964   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
18965   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
18966   echo 'CEOF' >> $CONFIG_STATUS
18967   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
18968   rm -f conftest.vals
18969   mv conftest.tail conftest.vals
18970 done
18971 rm -f conftest.vals
18972
18973 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
18974 # marker @DEFS@.
18975 echo '  cat >> conftest.edit <<CEOF
18976 /@DEFS@/r conftest.frag
18977 /@DEFS@/d
18978 CEOF
18979 sed -f conftest.edit $tmp/in > $tmp/out
18980 rm -f $tmp/in
18981 mv $tmp/out $tmp/in
18982 rm -f conftest.edit conftest.frag
18983 ' >> $CONFIG_STATUS
18984
18985 cat >>$CONFIG_STATUS <<\EOF
18986   # Let's still pretend it is `configure' which instantiates (i.e., don't
18987   # use $as_me), people would be surprised to read:
18988   #    /* config.h.  Generated automatically by config.status.  */
18989   if test x"$ac_file" = x-; then
18990     echo "/* Generated automatically by configure.  */" >$tmp/config.h
18991   else
18992     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
18993   fi
18994   cat $tmp/in >>$tmp/config.h
18995   rm -f $tmp/in
18996   if test x"$ac_file" != x-; then
18997     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
18998       { echo "$as_me:18998: $ac_file is unchanged" >&5
18999 echo "$as_me: $ac_file is unchanged" >&6;}
19000     else
19001       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19002          X"$ac_file" : 'X\(//\)[^/]' \| \
19003          X"$ac_file" : 'X\(//\)$' \| \
19004          X"$ac_file" : 'X\(/\)' \| \
19005          .     : '\(.\)' 2>/dev/null ||
19006 echo X"$ac_file" |
19007     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19008           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19009           /^X\(\/\/\)$/{ s//\1/; q; }
19010           /^X\(\/\).*/{ s//\1/; q; }
19011           s/.*/./; q'`
19012       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19013         { case "$ac_dir" in
19014   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19015   *)                      as_incr_dir=.;;
19016 esac
19017 as_dummy="$ac_dir"
19018 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19019   case $as_mkdir_dir in
19020     # Skip DOS drivespec
19021     ?:) as_incr_dir=$as_mkdir_dir ;;
19022     *)
19023       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19024       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19025     ;;
19026   esac
19027 done; }
19028
19029       fi
19030       rm -f $ac_file
19031       mv $tmp/config.h $ac_file
19032     fi
19033   else
19034     cat $tmp/config.h
19035     rm -f $tmp/config.h
19036   fi
19037 done
19038 EOF
19039 cat >>$CONFIG_STATUS <<\EOF
19040
19041 #
19042 # CONFIG_COMMANDS section.
19043 #
19044 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19045   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19046   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19047
19048   case $ac_dest in
19049     default )
19050
19051 for cf_dir in test
19052 do
19053         if test ! -d $srcdir/$cf_dir; then
19054                 continue
19055         elif test -f $srcdir/$cf_dir/programs; then
19056                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19057         fi
19058 done
19059
19060         case $cf_cv_system_name in #(vi
19061         OS/2*|os2*) #(vi
19062         LIB_PREFIX=''
19063         ;;
19064         *)      LIB_PREFIX='lib'
19065         ;;
19066         esac
19067 cf_prefix=$LIB_PREFIX
19068
19069 if test $cf_cv_shlib_version = cygdll ; then
19070         TINFO_NAME=$TINFO_ARG_SUFFIX
19071         TINFO_SUFFIX=.dll
19072 fi
19073
19074 for cf_dir in $SRC_SUBDIRS
19075 do
19076         if test ! -d $srcdir/$cf_dir ; then
19077                 continue
19078         elif test -f $srcdir/$cf_dir/modules; then
19079
19080                 SHARED_LIB=
19081                 LIBS_TO_MAKE=
19082                 for cf_item in $cf_LIST_MODELS
19083                 do
19084
19085         case $cf_item in #(vi
19086         libtool) #(vi
19087                 cf_suffix='.la'
19088                 cf_depsuf=$cf_suffix
19089                 ;;
19090         normal) #(vi
19091                 cf_suffix='.a'
19092                 cf_depsuf=$cf_suffix
19093                 ;;
19094         debug) #(vi
19095                 cf_suffix='_g.a'
19096                 cf_depsuf=$cf_suffix
19097                 ;;
19098         profile) #(vi
19099                 cf_suffix='_p.a'
19100                 cf_depsuf=$cf_suffix
19101                 ;;
19102         shared) #(vi
19103                 case $cf_cv_system_name in
19104                 aix[56]*) #(vi
19105                         cf_suffix='.a'
19106                         cf_depsuf=$cf_suffix
19107                         ;;
19108                 cygwin*) #(vi
19109                         cf_suffix='.dll'
19110                         cf_depsuf='.dll.a'
19111                         ;;
19112                 darwin*) #(vi
19113                         cf_suffix='.dylib'
19114                         cf_depsuf=$cf_suffix
19115                         ;;
19116                 hpux*) #(vi
19117                         case $target in
19118                         ia64*) #(vi
19119                                 cf_suffix='.so'
19120                                 cf_depsuf=$cf_suffix
19121                                 ;;
19122                         *) #(vi
19123                                 cf_suffix='.sl'
19124                                 cf_depsuf=$cf_suffix
19125                                 ;;
19126                         esac
19127                         ;;
19128                 *)      cf_suffix='.so'
19129                         cf_depsuf=$cf_suffix
19130                         ;;
19131                 esac
19132         esac
19133         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19134         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19135
19136                         if test $cf_item = shared ; then
19137                         if test "$cf_cv_do_symlinks" = yes ; then
19138                                 case "$cf_cv_shlib_version" in #(vi
19139                                 rel) #(vi
19140                                         case "$cf_cv_system_name" in #(vi
19141                                         darwin*)
19142                                         case .${LIB_SUFFIX} in
19143                                         .w*)
19144                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19145                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19146                                                 ;;
19147                                         *)
19148                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19149                                                 ;;
19150                                         esac
19151                                         ;; #(vi
19152                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19153                                         esac
19154                                         ;;
19155                                 abi)
19156                                         case "$cf_cv_system_name" in #(vi
19157                                         darwin*)
19158                                         case .${LIB_SUFFIX} in
19159                                         .w*)
19160                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19161                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19162                                                 ;;
19163                                         *)
19164                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19165                                                 ;;
19166                                         esac
19167                                         ;; #(vi
19168                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19169                                         esac
19170                                         ;;
19171                                 esac
19172                         fi
19173                         # cygwin needs import library, and has unique naming convention
19174                         # use autodetected ${cf_prefix} for import lib and static lib, but
19175                         # use 'cyg' prefix for shared lib.
19176                         if test $cf_cv_shlib_version = cygdll ; then
19177                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19178                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19179                                 continue
19180                         fi
19181                         fi
19182                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19183                 done
19184
19185                 if test $cf_dir = ncurses ; then
19186                         cf_subsets="$LIB_SUBSETS"
19187                         cf_r_parts="$cf_subsets"
19188                         cf_liblist="$LIBS_TO_MAKE"
19189
19190                         while test -n "$cf_r_parts"
19191                         do
19192                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19193                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19194                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19195                                         cf_item=
19196                                         case $cf_l_parts in #(vi
19197                                         *termlib*) #(vi
19198                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19199                                                 ;;
19200                                         *ticlib*)
19201                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19202                                                 ;;
19203                                         *)
19204                                                 break
19205                                                 ;;
19206                                         esac
19207                                         if test -n "$cf_item"; then
19208                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19209                                         fi
19210                                 else
19211                                         break
19212                                 fi
19213                         done
19214                 else
19215                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19216                 fi
19217
19218                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19219                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19220                         $cf_dir/Makefile >$cf_dir/Makefile.out
19221                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19222
19223                 $AWK -f $srcdir/mk-0th.awk \
19224                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19225                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19226
19227                 for cf_subset in $cf_subsets
19228                 do
19229                         cf_subdirs=
19230                         for cf_item in $cf_LIST_MODELS
19231                         do
19232                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19233
19234 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19235
19236         case $cf_item in #(vi
19237         libtool) #(vi
19238                 cf_suffix='.la'
19239                 cf_depsuf=$cf_suffix
19240                 ;;
19241         normal) #(vi
19242                 cf_suffix='.a'
19243                 cf_depsuf=$cf_suffix
19244                 ;;
19245         debug) #(vi
19246                 cf_suffix='_g.a'
19247                 cf_depsuf=$cf_suffix
19248                 ;;
19249         profile) #(vi
19250                 cf_suffix='_p.a'
19251                 cf_depsuf=$cf_suffix
19252                 ;;
19253         shared) #(vi
19254                 case $cf_cv_system_name in
19255                 aix[56]*) #(vi
19256                         cf_suffix='.a'
19257                         cf_depsuf=$cf_suffix
19258                         ;;
19259                 cygwin*) #(vi
19260                         cf_suffix='.dll'
19261                         cf_depsuf='.dll.a'
19262                         ;;
19263                 darwin*) #(vi
19264                         cf_suffix='.dylib'
19265                         cf_depsuf=$cf_suffix
19266                         ;;
19267                 hpux*) #(vi
19268                         case $target in
19269                         ia64*) #(vi
19270                                 cf_suffix='.so'
19271                                 cf_depsuf=$cf_suffix
19272                                 ;;
19273                         *) #(vi
19274                                 cf_suffix='.sl'
19275                                 cf_depsuf=$cf_suffix
19276                                 ;;
19277                         esac
19278                         ;;
19279                 *)      cf_suffix='.so'
19280                         cf_depsuf=$cf_suffix
19281                         ;;
19282                 esac
19283         esac
19284         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19285         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19286
19287         case $cf_item in
19288         libtool) cf_subdir='obj_lo'  ;;
19289         normal)  cf_subdir='objects' ;;
19290         debug)   cf_subdir='obj_g' ;;
19291         profile) cf_subdir='obj_p' ;;
19292         shared)
19293                 case $cf_cv_system_name in #(vi
19294                 cygwin) #(vi
19295                         cf_subdir='objects' ;;
19296                 *)
19297                         cf_subdir='obj_s' ;;
19298                 esac
19299         esac
19300
19301                         # Test for case where we build libtinfo with a different name.
19302                         cf_libname=$cf_dir
19303                         if test $cf_dir = ncurses ; then
19304                                 case $cf_subset in
19305                                 *base*)
19306                                         cf_libname=${cf_libname}$LIB_SUFFIX
19307                                         ;;
19308                                 *termlib*)
19309                                         cf_libname=$TINFO_LIB_SUFFIX
19310                                         ;;
19311                                 ticlib*)
19312                                         cf_libname=$TICS_LIB_SUFFIX
19313                                         ;;
19314                                 esac
19315                         else
19316                                 cf_libname=${cf_libname}$LIB_SUFFIX
19317                         fi
19318                         if test -n "${DFT_ARG_SUFFIX}" ; then
19319                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19320                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19321                         fi
19322
19323                         # These dependencies really are for development, not
19324                         # builds, but they are useful in porting, too.
19325                         cf_depend="../include/ncurses_cfg.h"
19326                         if test "$srcdir" = "."; then
19327                                 cf_reldir="."
19328                         else
19329                                 cf_reldir="\${srcdir}"
19330                         fi
19331
19332                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19333                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19334                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19335                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19336                         fi
19337
19338                         cf_dir_suffix=
19339                         old_cf_suffix="$cf_suffix"
19340                         if test "$cf_cv_shlib_version_infix" = yes ; then
19341                         if test -n "$LIB_SUFFIX" ; then
19342                                 case $LIB_SUFFIX in
19343                                 w*)
19344                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
19345                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19346                                         cf_dir_suffix=w
19347                                         ;;
19348                                 esac
19349                         fi
19350                         fi
19351
19352                         $AWK -f $srcdir/mk-1st.awk \
19353                                 name=${cf_libname}${cf_dir_suffix} \
19354                                 traces=$LIB_TRACING \
19355                                 MODEL=$cf_ITEM \
19356                                 model=$cf_subdir \
19357                                 prefix=$cf_prefix \
19358                                 suffix=$cf_suffix \
19359                                 subset=$cf_subset \
19360                                 TermlibRoot=$TINFO_NAME \
19361                                 TermlibSuffix=$TINFO_SUFFIX \
19362                                 ShlibVer=$cf_cv_shlib_version \
19363                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
19364                                 ReLink=${cf_cv_do_relink-no} \
19365                                 DoLinks=$cf_cv_do_symlinks \
19366                                 rmSoLocs=$cf_cv_rm_so_locs \
19367                                 ldconfig="$LDCONFIG" \
19368                                 overwrite=$WITH_OVERWRITE \
19369                                 depend="$cf_depend" \
19370                                 host="$host" \
19371                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19372
19373                         cf_suffix="$old_cf_suffix"
19374
19375                         for cf_subdir2 in $cf_subdirs lib
19376                         do
19377                                 test $cf_subdir = $cf_subdir2 && break
19378                         done
19379                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
19380                         $AWK -f $srcdir/mk-2nd.awk \
19381                                 name=$cf_dir \
19382                                 traces=$LIB_TRACING \
19383                                 MODEL=$cf_ITEM \
19384                                 model=$cf_subdir \
19385                                 subset=$cf_subset \
19386                                 srcdir=$srcdir \
19387                                 echo=$WITH_ECHO \
19388                                 crenames=$cf_cv_prog_CC_c_o \
19389                                 cxxrenames=$cf_cv_prog_CXX_c_o \
19390                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19391                         cf_subdirs="$cf_subdirs $cf_subdir"
19392                         done
19393                 done
19394         fi
19395
19396         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
19397 done
19398
19399 for cf_dir in $SRC_SUBDIRS
19400 do
19401         if test ! -d $srcdir/$cf_dir ; then
19402                 continue
19403         fi
19404
19405         if test -f $cf_dir/Makefile ; then
19406                 case "$cf_dir" in
19407                 Ada95) #(vi
19408                         echo 'libs \' >> Makefile
19409                         echo 'install.libs \' >> Makefile
19410                         echo 'uninstall.libs ::' >> Makefile
19411                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
19412                         ;;
19413                 esac
19414         fi
19415
19416         if test -f $srcdir/$cf_dir/modules; then
19417                 echo >> Makefile
19418                 if test -f $srcdir/$cf_dir/headers; then
19419 cat >> Makefile <<CF_EOF
19420 install.includes \\
19421 uninstall.includes \\
19422 CF_EOF
19423                 fi
19424 if test "$cf_dir" != "c++" ; then
19425 echo 'lint \' >> Makefile
19426 fi
19427 cat >> Makefile <<CF_EOF
19428 libs \\
19429 lintlib \\
19430 install.libs \\
19431 uninstall.libs \\
19432 install.$cf_dir \\
19433 uninstall.$cf_dir ::
19434         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19435 CF_EOF
19436         elif test -f $srcdir/$cf_dir/headers; then
19437 cat >> Makefile <<CF_EOF
19438
19439 libs \\
19440 install.libs \\
19441 uninstall.libs \\
19442 install.includes \\
19443 uninstall.includes ::
19444         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19445 CF_EOF
19446 fi
19447 done
19448
19449 cat >> Makefile <<CF_EOF
19450
19451 install.libs uninstall.libs \\
19452 install.data uninstall.data ::
19453 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
19454 CF_EOF
19455
19456 if test "x$cf_with_manpages" = xyes; then
19457 cat >> Makefile <<CF_EOF
19458
19459 install.man \\
19460 uninstall.man ::
19461         cd man && \${MAKE} \${CF_MFLAGS} \$@
19462 CF_EOF
19463 fi
19464
19465 cat >> Makefile <<CF_EOF
19466
19467 distclean ::
19468         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
19469         rm -f headers.sh headers.sed mk_shared_lib.sh
19470         rm -f edit_man.* man_alias.*
19471         rm -rf \${DIRS_TO_MAKE}
19472 CF_EOF
19473
19474 # Special case: tack's manpage lives in its own directory.
19475 if test "x$cf_with_manpages" = xyes; then
19476 if test -d tack ; then
19477 if test -f $srcdir/$tack.h; then
19478 cat >> Makefile <<CF_EOF
19479
19480 install.man \\
19481 uninstall.man ::
19482         cd tack && \${MAKE} \${CF_MFLAGS} \$@
19483 CF_EOF
19484 fi
19485 fi
19486 fi
19487
19488 rm -f headers.sed headers.sh
19489
19490 echo creating headers.sh
19491 cat >headers.sh <<CF_EOF
19492 #! /bin/sh
19493 # This shell script is generated by the 'configure' script.  It is invoked in a
19494 # subdirectory of the build tree.  It generates a sed-script in the parent
19495 # directory that is used to adjust includes for header files that reside in a
19496 # subdirectory of /usr/include, etc.
19497 PRG=""
19498 while test \$# != 3
19499 do
19500 PRG="\$PRG \$1"; shift
19501 done
19502 DST=\$1
19503 REF=\$2
19504 SRC=\$3
19505 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
19506 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
19507 echo installing \$SRC in \$DST
19508 CF_EOF
19509
19510 if test $WITH_CURSES_H = yes; then
19511         cat >>headers.sh <<CF_EOF
19512 case \$DST in
19513 /*/include/*)
19514         END=\`basename \$DST\`
19515         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19516         do
19517                 NAME=\`basename \$i\`
19518                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19519         done
19520         ;;
19521 *)
19522         echo "" >> \$TMPSED
19523         ;;
19524 esac
19525 CF_EOF
19526
19527 else
19528         cat >>headers.sh <<CF_EOF
19529 case \$DST in
19530 /*/include/*)
19531         END=\`basename \$DST\`
19532         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
19533         do
19534                 NAME=\`basename \$i\`
19535                 if test "\$NAME" = "curses.h"
19536                 then
19537                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19538                         NAME=ncurses.h
19539                 fi
19540                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
19541         done
19542         ;;
19543 *)
19544         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
19545         ;;
19546 esac
19547 CF_EOF
19548 fi
19549 cat >>headers.sh <<CF_EOF
19550 rm -f \$TMPSRC
19551 sed -f \$TMPSED \$SRC > \$TMPSRC
19552 NAME=\`basename \$SRC\`
19553 CF_EOF
19554 if test $WITH_CURSES_H != yes; then
19555         cat >>headers.sh <<CF_EOF
19556 test "\$NAME" = "curses.h" && NAME=ncurses.h
19557 CF_EOF
19558 fi
19559 cat >>headers.sh <<CF_EOF
19560 # Just in case someone gzip'd manpages, remove the conflicting copy.
19561 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
19562
19563 eval \$PRG \$TMPSRC \$DST/\$NAME
19564 rm -f \$TMPSRC \$TMPSED
19565 CF_EOF
19566
19567 chmod 0755 headers.sh
19568
19569 for cf_dir in $SRC_SUBDIRS
19570 do
19571         if test ! -d $srcdir/$cf_dir ; then
19572                 continue
19573         fi
19574
19575         if test -f $srcdir/$cf_dir/headers; then
19576                 $AWK -f $srcdir/mk-hdr.awk \
19577                         subset="$LIB_SUBSETS" \
19578                         compat="$WITH_CURSES_H" \
19579                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
19580         fi
19581
19582         if test -f $srcdir/$cf_dir/modules; then
19583                 if test "$cf_dir" != "c++" ; then
19584                         cat >>$cf_dir/Makefile <<"CF_EOF"
19585 depend : ${AUTO_SRC}
19586         makedepend -- ${CPPFLAGS} -- ${C_SRC}
19587
19588 # DO NOT DELETE THIS LINE -- make depend depends on it.
19589 CF_EOF
19590                 fi
19591         fi
19592 done
19593
19594  ;;
19595   esac
19596 done
19597 EOF
19598
19599 cat >>$CONFIG_STATUS <<\EOF
19600
19601 { (exit 0); exit 0; }
19602 EOF
19603 chmod +x $CONFIG_STATUS
19604 ac_clean_files=$ac_clean_files_save
19605
19606 # configure is writing to config.log, and then calls config.status.
19607 # config.status does its own redirection, appending to config.log.
19608 # Unfortunately, on DOS this fails, as config.log is still kept open
19609 # by configure, so config.status won't be able to write to it; its
19610 # output is simply discarded.  So we exec the FD to /dev/null,
19611 # effectively closing config.log, so it can be properly (re)opened and
19612 # appended to by config.status.  When coming back to configure, we
19613 # need to make the FD available again.
19614 if test "$no_create" != yes; then
19615   ac_cs_success=:
19616   exec 5>/dev/null
19617   $SHELL $CONFIG_STATUS || ac_cs_success=false
19618   exec 5>>config.log
19619   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19620   # would make configure fail if this is the last instruction.
19621   $ac_cs_success || { (exit 1); exit 1; }
19622 fi
19623 ${MAKE-make} preinstall