]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.7 - patch 20100410
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.488 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20100320.
5 #
6 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7 # Free Software Foundation, Inc.
8 # This configure script is free software; the Free Software Foundation
9 # gives unlimited permission to copy, distribute and modify it.
10
11 # Avoid depending upon Character Ranges.
12 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15 as_cr_digits='0123456789'
16 as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18 # Sed expression to map a string onto a valid variable name.
19 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21 # Sed expression to map a string onto a valid CPP name.
22 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24 # Be Bourne compatible
25 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26   emulate sh
27   NULLCMD=:
28 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29   set -o posix
30 fi
31
32 # Name of the executable.
33 as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35 if expr a : '\(a\)' >/dev/null 2>&1; then
36   as_expr=expr
37 else
38   as_expr=false
39 fi
40
41 rm -f conf$$ conf$$.exe conf$$.file
42 echo >conf$$.file
43 if ln -s conf$$.file conf$$ 2>/dev/null; then
44   # We could just check for DJGPP; but this test a) works b) is more generic
45   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46   if test -f conf$$.exe; then
47     # Don't use ln at all; we don't have any links
48     as_ln_s='cp -p'
49   else
50     as_ln_s='ln -s'
51   fi
52 elif ln conf$$.file conf$$ 2>/dev/null; then
53   as_ln_s=ln
54 else
55   as_ln_s='cp -p'
56 fi
57 rm -f conf$$ conf$$.exe conf$$.file
58
59 as_executable_p="test -f"
60
61 # Support unset when possible.
62 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63   as_unset=unset
64 else
65   as_unset=false
66 fi
67
68 # NLS nuisances.
69 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78 # IFS
79 # We need space, tab and new line, in precisely that order.
80 as_nl='
81 '
82 IFS="   $as_nl"
83
84 # CDPATH.
85 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87 # Name of the host.
88 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89 # so uname gets run too.
90 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92 exec 6>&1
93
94 #
95 # Initializations.
96 #
97 ac_default_prefix=/usr/local
98 cross_compiling=no
99 subdirs=
100 MFLAGS= MAKEFLAGS=
101 SHELL=${CONFIG_SHELL-/bin/sh}
102
103 # Maximum number of lines to put in a shell here document.
104 # This variable seems obsolete.  It should probably be removed, and
105 # only ac_max_sed_lines should be used.
106 : ${ac_max_here_lines=38}
107
108 ac_unique_file="ncurses/base/lib_initscr.c"
109 # Factoring default headers for most tests.
110 ac_includes_default="\
111 #include <stdio.h>
112 #if HAVE_SYS_TYPES_H
113 # include <sys/types.h>
114 #endif
115 #if HAVE_SYS_STAT_H
116 # include <sys/stat.h>
117 #endif
118 #if STDC_HEADERS
119 # include <stdlib.h>
120 # include <stddef.h>
121 #else
122 # if HAVE_STDLIB_H
123 #  include <stdlib.h>
124 # endif
125 #endif
126 #if HAVE_STRING_H
127 # if !STDC_HEADERS && HAVE_MEMORY_H
128 #  include <memory.h>
129 # endif
130 # include <string.h>
131 #endif
132 #if HAVE_STRINGS_H
133 # include <strings.h>
134 #endif
135 #if HAVE_INTTYPES_H
136 # include <inttypes.h>
137 #else
138 # if HAVE_STDINT_H
139 #  include <stdint.h>
140 # endif
141 #endif
142 #if HAVE_UNISTD_H
143 # include <unistd.h>
144 #endif"
145
146 # Initialize some variables set by options.
147 ac_init_help=
148 ac_init_version=false
149 # The variables have the same names as the options, with
150 # dashes changed to underlines.
151 cache_file=/dev/null
152 exec_prefix=NONE
153 no_create=
154 no_recursion=
155 prefix=NONE
156 program_prefix=NONE
157 program_suffix=NONE
158 program_transform_name=s,x,x,
159 silent=
160 site=
161 srcdir=
162 verbose=
163 x_includes=NONE
164 x_libraries=NONE
165
166 # Installation directory options.
167 # These are left unexpanded so users can "make install exec_prefix=/foo"
168 # and all the variables that are supposed to be based on exec_prefix
169 # by default will actually change.
170 # Use braces instead of parens because sh, perl, etc. also accept them.
171 bindir='${exec_prefix}/bin'
172 sbindir='${exec_prefix}/sbin'
173 libexecdir='${exec_prefix}/libexec'
174 datadir='${prefix}/share'
175 sysconfdir='${prefix}/etc'
176 sharedstatedir='${prefix}/com'
177 localstatedir='${prefix}/var'
178 libdir='${exec_prefix}/lib'
179 includedir='${prefix}/include'
180 oldincludedir='/usr/include'
181 infodir='${prefix}/info'
182 mandir='${prefix}/man'
183
184 # Identity of this package.
185 PACKAGE_NAME=
186 PACKAGE_TARNAME=
187 PACKAGE_VERSION=
188 PACKAGE_STRING=
189 PACKAGE_BUGREPORT=
190
191 ac_prev=
192 for ac_option
193 do
194   # If the previous option needs an argument, assign it.
195   if test -n "$ac_prev"; then
196     eval "$ac_prev=\$ac_option"
197     ac_prev=
198     continue
199   fi
200
201   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203   # Accept the important Cygnus configure options, so we can diagnose typos.
204
205   case $ac_option in
206
207   -bindir | --bindir | --bindi | --bind | --bin | --bi)
208     ac_prev=bindir ;;
209   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210     bindir=$ac_optarg ;;
211
212   -build | --build | --buil | --bui | --bu)
213     ac_prev=build_alias ;;
214   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215     build_alias=$ac_optarg ;;
216
217   -cache-file | --cache-file | --cache-fil | --cache-fi \
218   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219     ac_prev=cache_file ;;
220   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222     cache_file=$ac_optarg ;;
223
224   --config-cache | -C)
225     cache_file=config.cache ;;
226
227   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228     ac_prev=datadir ;;
229   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230   | --da=*)
231     datadir=$ac_optarg ;;
232
233   -disable-* | --disable-*)
234     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
235     # Reject names that are not valid shell variable names.
236     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
237       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
238    { (exit 1); exit 1; }; }
239     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
240     eval "enable_$ac_feature=no" ;;
241
242   -enable-* | --enable-*)
243     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
244     # Reject names that are not valid shell variable names.
245     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247    { (exit 1); exit 1; }; }
248     ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249     case $ac_option in
250       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
251       *) ac_optarg=yes ;;
252     esac
253     eval "enable_$ac_feature='$ac_optarg'" ;;
254
255   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
256   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
257   | --exec | --exe | --ex)
258     ac_prev=exec_prefix ;;
259   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
260   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
261   | --exec=* | --exe=* | --ex=*)
262     exec_prefix=$ac_optarg ;;
263
264   -gas | --gas | --ga | --g)
265     # Obsolete; use --with-gas.
266     with_gas=yes ;;
267
268   -help | --help | --hel | --he | -h)
269     ac_init_help=long ;;
270   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
271     ac_init_help=recursive ;;
272   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
273     ac_init_help=short ;;
274
275   -host | --host | --hos | --ho)
276     ac_prev=host_alias ;;
277   -host=* | --host=* | --hos=* | --ho=*)
278     host_alias=$ac_optarg ;;
279
280   -includedir | --includedir | --includedi | --included | --include \
281   | --includ | --inclu | --incl | --inc)
282     ac_prev=includedir ;;
283   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
284   | --includ=* | --inclu=* | --incl=* | --inc=*)
285     includedir=$ac_optarg ;;
286
287   -infodir | --infodir | --infodi | --infod | --info | --inf)
288     ac_prev=infodir ;;
289   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
290     infodir=$ac_optarg ;;
291
292   -libdir | --libdir | --libdi | --libd)
293     ac_prev=libdir ;;
294   -libdir=* | --libdir=* | --libdi=* | --libd=*)
295     libdir=$ac_optarg ;;
296
297   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
298   | --libexe | --libex | --libe)
299     ac_prev=libexecdir ;;
300   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
301   | --libexe=* | --libex=* | --libe=*)
302     libexecdir=$ac_optarg ;;
303
304   -localstatedir | --localstatedir | --localstatedi | --localstated \
305   | --localstate | --localstat | --localsta | --localst \
306   | --locals | --local | --loca | --loc | --lo)
307     ac_prev=localstatedir ;;
308   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
309   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
310   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
311     localstatedir=$ac_optarg ;;
312
313   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
314     ac_prev=mandir ;;
315   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
316     mandir=$ac_optarg ;;
317
318   -nfp | --nfp | --nf)
319     # Obsolete; use --without-fp.
320     with_fp=no ;;
321
322   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
323   | --no-cr | --no-c)
324     no_create=yes ;;
325
326   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
327   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
328     no_recursion=yes ;;
329
330   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
331   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
332   | --oldin | --oldi | --old | --ol | --o)
333     ac_prev=oldincludedir ;;
334   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
335   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
336   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
337     oldincludedir=$ac_optarg ;;
338
339   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
340     ac_prev=prefix ;;
341   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
342     prefix=$ac_optarg ;;
343
344   -program-prefix | --program-prefix | --program-prefi | --program-pref \
345   | --program-pre | --program-pr | --program-p)
346     ac_prev=program_prefix ;;
347   -program-prefix=* | --program-prefix=* | --program-prefi=* \
348   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
349     program_prefix=$ac_optarg ;;
350
351   -program-suffix | --program-suffix | --program-suffi | --program-suff \
352   | --program-suf | --program-su | --program-s)
353     ac_prev=program_suffix ;;
354   -program-suffix=* | --program-suffix=* | --program-suffi=* \
355   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
356     program_suffix=$ac_optarg ;;
357
358   -program-transform-name | --program-transform-name \
359   | --program-transform-nam | --program-transform-na \
360   | --program-transform-n | --program-transform- \
361   | --program-transform | --program-transfor \
362   | --program-transfo | --program-transf \
363   | --program-trans | --program-tran \
364   | --progr-tra | --program-tr | --program-t)
365     ac_prev=program_transform_name ;;
366   -program-transform-name=* | --program-transform-name=* \
367   | --program-transform-nam=* | --program-transform-na=* \
368   | --program-transform-n=* | --program-transform-=* \
369   | --program-transform=* | --program-transfor=* \
370   | --program-transfo=* | --program-transf=* \
371   | --program-trans=* | --program-tran=* \
372   | --progr-tra=* | --program-tr=* | --program-t=*)
373     program_transform_name=$ac_optarg ;;
374
375   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
376   | -silent | --silent | --silen | --sile | --sil)
377     silent=yes ;;
378
379   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
380     ac_prev=sbindir ;;
381   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
382   | --sbi=* | --sb=*)
383     sbindir=$ac_optarg ;;
384
385   -sharedstatedir | --sharedstatedir | --sharedstatedi \
386   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
387   | --sharedst | --shareds | --shared | --share | --shar \
388   | --sha | --sh)
389     ac_prev=sharedstatedir ;;
390   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
391   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
392   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
393   | --sha=* | --sh=*)
394     sharedstatedir=$ac_optarg ;;
395
396   -site | --site | --sit)
397     ac_prev=site ;;
398   -site=* | --site=* | --sit=*)
399     site=$ac_optarg ;;
400
401   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
402     ac_prev=srcdir ;;
403   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
404     srcdir=$ac_optarg ;;
405
406   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
407   | --syscon | --sysco | --sysc | --sys | --sy)
408     ac_prev=sysconfdir ;;
409   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
410   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
411     sysconfdir=$ac_optarg ;;
412
413   -target | --target | --targe | --targ | --tar | --ta | --t)
414     ac_prev=target_alias ;;
415   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
416     target_alias=$ac_optarg ;;
417
418   -v | -verbose | --verbose | --verbos | --verbo | --verb)
419     verbose=yes ;;
420
421   -version | --version | --versio | --versi | --vers | -V)
422     ac_init_version=: ;;
423
424   -with-* | --with-*)
425     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
426     # Reject names that are not valid shell variable names.
427     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
428       { echo "$as_me: error: invalid package name: $ac_package" >&2
429    { (exit 1); exit 1; }; }
430     ac_package=`echo $ac_package| sed 's/-/_/g'`
431     case $ac_option in
432       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
433       *) ac_optarg=yes ;;
434     esac
435     eval "with_$ac_package='$ac_optarg'" ;;
436
437   -without-* | --without-*)
438     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
439     # Reject names that are not valid shell variable names.
440     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
441       { echo "$as_me: error: invalid package name: $ac_package" >&2
442    { (exit 1); exit 1; }; }
443     ac_package=`echo $ac_package | sed 's/-/_/g'`
444     eval "with_$ac_package=no" ;;
445
446   --x)
447     # Obsolete; use --with-x.
448     with_x=yes ;;
449
450   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
451   | --x-incl | --x-inc | --x-in | --x-i)
452     ac_prev=x_includes ;;
453   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
454   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
455     x_includes=$ac_optarg ;;
456
457   -x-libraries | --x-libraries | --x-librarie | --x-librari \
458   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
459     ac_prev=x_libraries ;;
460   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
461   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
462     x_libraries=$ac_optarg ;;
463
464   -*) { echo "$as_me: error: unrecognized option: $ac_option
465 Try \`$0 --help' for more information." >&2
466    { (exit 1); exit 1; }; }
467     ;;
468
469   *=*)
470     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
471     # Reject names that are not valid shell variable names.
472     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
473       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
474    { (exit 1); exit 1; }; }
475     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
476     eval "$ac_envvar='$ac_optarg'"
477     export $ac_envvar ;;
478
479   *)
480     # FIXME: should be removed in autoconf 3.0.
481     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
482     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
483       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
484     : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
485     ;;
486
487   esac
488 done
489
490 if test -n "$ac_prev"; then
491   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
492   { echo "$as_me: error: missing argument to $ac_option" >&2
493    { (exit 1); exit 1; }; }
494 fi
495
496 # Be sure to have absolute paths.
497 for ac_var in exec_prefix prefix
498 do
499   eval ac_val=$`echo $ac_var`
500   case $ac_val in
501     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
502     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
503    { (exit 1); exit 1; }; };;
504   esac
505 done
506
507 # Be sure to have absolute paths.
508 for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
509               localstatedir libdir includedir oldincludedir infodir mandir
510 do
511   eval ac_val=$`echo $ac_var`
512   case $ac_val in
513     [\\/$]* | ?:[\\/]* ) ;;
514     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
515    { (exit 1); exit 1; }; };;
516   esac
517 done
518
519 # There might be people who depend on the old broken behavior: `$host'
520 # used to hold the argument of --host etc.
521 build=$build_alias
522 host=$host_alias
523 target=$target_alias
524
525 # FIXME: should be removed in autoconf 3.0.
526 if test "x$host_alias" != x; then
527   if test "x$build_alias" = x; then
528     cross_compiling=maybe
529     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
530     If a cross compiler is detected then cross compile mode will be used." >&2
531   elif test "x$build_alias" != "x$host_alias"; then
532     cross_compiling=yes
533   fi
534 fi
535
536 ac_tool_prefix=
537 test -n "$host_alias" && ac_tool_prefix=$host_alias-
538
539 test "$silent" = yes && exec 6>/dev/null
540
541 # Find the source files, if location was not specified.
542 if test -z "$srcdir"; then
543   ac_srcdir_defaulted=yes
544   # Try the directory containing this script, then its parent.
545   ac_prog=$0
546   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
547   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
548   srcdir=$ac_confdir
549   if test ! -r $srcdir/$ac_unique_file; then
550     srcdir=..
551   fi
552 else
553   ac_srcdir_defaulted=no
554 fi
555 if test ! -r $srcdir/$ac_unique_file; then
556   if test "$ac_srcdir_defaulted" = yes; then
557     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
558    { (exit 1); exit 1; }; }
559   else
560     { echo "$as_me: error: cannot find sources in $srcdir" >&2
561    { (exit 1); exit 1; }; }
562   fi
563 fi
564 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
565 ac_env_build_alias_set=${build_alias+set}
566 ac_env_build_alias_value=$build_alias
567 ac_cv_env_build_alias_set=${build_alias+set}
568 ac_cv_env_build_alias_value=$build_alias
569 ac_env_host_alias_set=${host_alias+set}
570 ac_env_host_alias_value=$host_alias
571 ac_cv_env_host_alias_set=${host_alias+set}
572 ac_cv_env_host_alias_value=$host_alias
573 ac_env_target_alias_set=${target_alias+set}
574 ac_env_target_alias_value=$target_alias
575 ac_cv_env_target_alias_set=${target_alias+set}
576 ac_cv_env_target_alias_value=$target_alias
577 ac_env_CC_set=${CC+set}
578 ac_env_CC_value=$CC
579 ac_cv_env_CC_set=${CC+set}
580 ac_cv_env_CC_value=$CC
581 ac_env_CFLAGS_set=${CFLAGS+set}
582 ac_env_CFLAGS_value=$CFLAGS
583 ac_cv_env_CFLAGS_set=${CFLAGS+set}
584 ac_cv_env_CFLAGS_value=$CFLAGS
585 ac_env_LDFLAGS_set=${LDFLAGS+set}
586 ac_env_LDFLAGS_value=$LDFLAGS
587 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
588 ac_cv_env_LDFLAGS_value=$LDFLAGS
589 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
590 ac_env_CPPFLAGS_value=$CPPFLAGS
591 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
592 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
593 ac_env_CPP_set=${CPP+set}
594 ac_env_CPP_value=$CPP
595 ac_cv_env_CPP_set=${CPP+set}
596 ac_cv_env_CPP_value=$CPP
597 ac_env_CXX_set=${CXX+set}
598 ac_env_CXX_value=$CXX
599 ac_cv_env_CXX_set=${CXX+set}
600 ac_cv_env_CXX_value=$CXX
601 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
602 ac_env_CXXFLAGS_value=$CXXFLAGS
603 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
604 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
605 ac_env_CXXCPP_set=${CXXCPP+set}
606 ac_env_CXXCPP_value=$CXXCPP
607 ac_cv_env_CXXCPP_set=${CXXCPP+set}
608 ac_cv_env_CXXCPP_value=$CXXCPP
609
610 #
611 # Report the --help message.
612 #
613 if test "$ac_init_help" = "long"; then
614   # Omit some internal or obsolete options to make the list less imposing.
615   # This message is too long to be a string in the A/UX 3.1 sh.
616   cat <<EOF
617 \`configure' configures this package to adapt to many kinds of systems.
618
619 Usage: $0 [OPTION]... [VAR=VALUE]...
620
621 To assign environment variables (e.g., CC, CFLAGS...), specify them as
622 VAR=VALUE.  See below for descriptions of some of the useful variables.
623
624 Defaults for the options are specified in brackets.
625
626 Configuration:
627   -h, --help              display this help and exit
628       --help=short        display options specific to this package
629       --help=recursive    display the short help of all the included packages
630   -V, --version           display version information and exit
631   -q, --quiet, --silent   do not print \`checking...' messages
632       --cache-file=FILE   cache test results in FILE [disabled]
633   -C, --config-cache      alias for \`--cache-file=config.cache'
634   -n, --no-create         do not create output files
635       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
636
637 EOF
638
639   cat <<EOF
640 Installation directories:
641   --prefix=PREFIX         install architecture-independent files in PREFIX
642                           [$ac_default_prefix]
643   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
644                           [PREFIX]
645
646 By default, \`make install' will install all the files in
647 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
648 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
649 for instance \`--prefix=\$HOME'.
650
651 For better control, use the options below.
652
653 Fine tuning of the installation directories:
654   --bindir=DIR            user executables [EPREFIX/bin]
655   --sbindir=DIR           system admin executables [EPREFIX/sbin]
656   --libexecdir=DIR        program executables [EPREFIX/libexec]
657   --datadir=DIR           read-only architecture-independent data [PREFIX/share]
658   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
659   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
660   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
661   --libdir=DIR            object code libraries [EPREFIX/lib]
662   --includedir=DIR        C header files [PREFIX/include]
663   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
664   --infodir=DIR           info documentation [PREFIX/info]
665   --mandir=DIR            man documentation [PREFIX/man]
666 EOF
667
668   cat <<\EOF
669
670 Program names:
671   --program-prefix=PREFIX            prepend PREFIX to installed program names
672   --program-suffix=SUFFIX            append SUFFIX to installed program names
673   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
674
675 System types:
676   --build=BUILD           configure for building on BUILD [guessed]
677   --host=HOST       build programs to run on HOST [BUILD]
678   --target=TARGET   configure for building compilers for TARGET [HOST]
679 EOF
680 fi
681
682 if test -n "$ac_init_help"; then
683
684   cat <<\EOF
685
686 Optional Packages:
687   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
688   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
689
690 Optional Features:
691   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
692   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
693
694   --with-rel-version=XXX  override derived release version
695   --with-abi-version=XXX  override derived ABI version
696   --with-system-type=XXX  test: override derived host system-type
697   --without-cxx           do not adjust ncurses bool to match C++
698   --without-cxx-binding   do not build C++ binding and demo
699   --without-ada           suppress check for Ada95, don't build demo
700   --without-manpages      suppress install of manpages
701   --without-progs         suppress build with programs (e.g., tic)
702   --without-curses-h      install curses.h as ncurses.h only
703   --with-pkg-config{=path} enable/disable use of pkg-config
704   --enable-pc-files       generate and install .pc files for pkg-config
705   --enable-mixed-case     tic should assume mixed-case filenames
706   --with-install-prefix   prefixes actual install-location ($DESTDIR)
707 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
708   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
709   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
710   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
711   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
712   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
713   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
714 Options to Specify the Libraries Built/Used:
715   --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.20100320.  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 for ac_prog in exctags ctags
3656 do
3657   # Extract the first word of "$ac_prog", so it can be a program name with args.
3658 set dummy $ac_prog; ac_word=$2
3659 echo "$as_me:3659: checking for $ac_word" >&5
3660 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3661 if test "${ac_cv_prog_CTAGS+set}" = set; then
3662   echo $ECHO_N "(cached) $ECHO_C" >&6
3663 else
3664   if test -n "$CTAGS"; then
3665   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3666 else
3667   ac_save_IFS=$IFS; IFS=$ac_path_separator
3668 ac_dummy="$PATH"
3669 for ac_dir in $ac_dummy; do
3670   IFS=$ac_save_IFS
3671   test -z "$ac_dir" && ac_dir=.
3672   $as_executable_p "$ac_dir/$ac_word" || continue
3673 ac_cv_prog_CTAGS="$ac_prog"
3674 echo "$as_me:3674: found $ac_dir/$ac_word" >&5
3675 break
3676 done
3677
3678 fi
3679 fi
3680 CTAGS=$ac_cv_prog_CTAGS
3681 if test -n "$CTAGS"; then
3682   echo "$as_me:3682: result: $CTAGS" >&5
3683 echo "${ECHO_T}$CTAGS" >&6
3684 else
3685   echo "$as_me:3685: result: no" >&5
3686 echo "${ECHO_T}no" >&6
3687 fi
3688
3689   test -n "$CTAGS" && break
3690 done
3691
3692 for ac_prog in exetags etags
3693 do
3694   # Extract the first word of "$ac_prog", so it can be a program name with args.
3695 set dummy $ac_prog; ac_word=$2
3696 echo "$as_me:3696: checking for $ac_word" >&5
3697 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3698 if test "${ac_cv_prog_ETAGS+set}" = set; then
3699   echo $ECHO_N "(cached) $ECHO_C" >&6
3700 else
3701   if test -n "$ETAGS"; then
3702   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3703 else
3704   ac_save_IFS=$IFS; IFS=$ac_path_separator
3705 ac_dummy="$PATH"
3706 for ac_dir in $ac_dummy; do
3707   IFS=$ac_save_IFS
3708   test -z "$ac_dir" && ac_dir=.
3709   $as_executable_p "$ac_dir/$ac_word" || continue
3710 ac_cv_prog_ETAGS="$ac_prog"
3711 echo "$as_me:3711: found $ac_dir/$ac_word" >&5
3712 break
3713 done
3714
3715 fi
3716 fi
3717 ETAGS=$ac_cv_prog_ETAGS
3718 if test -n "$ETAGS"; then
3719   echo "$as_me:3719: result: $ETAGS" >&5
3720 echo "${ECHO_T}$ETAGS" >&6
3721 else
3722   echo "$as_me:3722: result: no" >&5
3723 echo "${ECHO_T}no" >&6
3724 fi
3725
3726   test -n "$ETAGS" && break
3727 done
3728
3729 # Extract the first word of "${CTAGS-ctags}", so it can be a program name with args.
3730 set dummy ${CTAGS-ctags}; ac_word=$2
3731 echo "$as_me:3731: checking for $ac_word" >&5
3732 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3733 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3734   echo $ECHO_N "(cached) $ECHO_C" >&6
3735 else
3736   if test -n "$MAKE_LOWER_TAGS"; then
3737   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3738 else
3739   ac_save_IFS=$IFS; IFS=$ac_path_separator
3740 ac_dummy="$PATH"
3741 for ac_dir in $ac_dummy; do
3742   IFS=$ac_save_IFS
3743   test -z "$ac_dir" && ac_dir=.
3744   $as_executable_p "$ac_dir/$ac_word" || continue
3745 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3746 echo "$as_me:3746: found $ac_dir/$ac_word" >&5
3747 break
3748 done
3749
3750   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3751 fi
3752 fi
3753 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3754 if test -n "$MAKE_LOWER_TAGS"; then
3755   echo "$as_me:3755: result: $MAKE_LOWER_TAGS" >&5
3756 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3757 else
3758   echo "$as_me:3758: result: no" >&5
3759 echo "${ECHO_T}no" >&6
3760 fi
3761
3762 if test "$cf_cv_mixedcase" = yes ; then
3763         # Extract the first word of "${ETAGS-etags}", so it can be a program name with args.
3764 set dummy ${ETAGS-etags}; ac_word=$2
3765 echo "$as_me:3765: checking for $ac_word" >&5
3766 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3767 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3768   echo $ECHO_N "(cached) $ECHO_C" >&6
3769 else
3770   if test -n "$MAKE_UPPER_TAGS"; then
3771   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3772 else
3773   ac_save_IFS=$IFS; IFS=$ac_path_separator
3774 ac_dummy="$PATH"
3775 for ac_dir in $ac_dummy; do
3776   IFS=$ac_save_IFS
3777   test -z "$ac_dir" && ac_dir=.
3778   $as_executable_p "$ac_dir/$ac_word" || continue
3779 ac_cv_prog_MAKE_UPPER_TAGS="yes"
3780 echo "$as_me:3780: found $ac_dir/$ac_word" >&5
3781 break
3782 done
3783
3784   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3785 fi
3786 fi
3787 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3788 if test -n "$MAKE_UPPER_TAGS"; then
3789   echo "$as_me:3789: result: $MAKE_UPPER_TAGS" >&5
3790 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3791 else
3792   echo "$as_me:3792: result: no" >&5
3793 echo "${ECHO_T}no" >&6
3794 fi
3795
3796 else
3797         MAKE_UPPER_TAGS=no
3798 fi
3799
3800 if test "$MAKE_UPPER_TAGS" = yes ; then
3801         MAKE_UPPER_TAGS=
3802 else
3803         MAKE_UPPER_TAGS="#"
3804 fi
3805
3806 if test "$MAKE_LOWER_TAGS" = yes ; then
3807         MAKE_LOWER_TAGS=
3808 else
3809         MAKE_LOWER_TAGS="#"
3810 fi
3811
3812 echo "$as_me:3812: checking for makeflags variable" >&5
3813 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3814 if test "${cf_cv_makeflags+set}" = set; then
3815   echo $ECHO_N "(cached) $ECHO_C" >&6
3816 else
3817
3818         cf_cv_makeflags=''
3819         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3820         do
3821                 cat >cf_makeflags.tmp <<CF_EOF
3822 SHELL = /bin/sh
3823 all :
3824         @ echo '.$cf_option'
3825 CF_EOF
3826                 cf_result=`${MAKE-make} -k -f cf_makeflags.tmp 2>/dev/null | sed -e 's,[        ]*$,,'`
3827                 case "$cf_result" in
3828                 .*k)
3829                         cf_result=`${MAKE-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
3830                         case "$cf_result" in
3831                         .*CC=*) cf_cv_makeflags=
3832                                 ;;
3833                         *)      cf_cv_makeflags=$cf_option
3834                                 ;;
3835                         esac
3836                         break
3837                         ;;
3838                 .-)     ;;
3839                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
3840                         ;;
3841                 esac
3842         done
3843         rm -f cf_makeflags.tmp
3844
3845 fi
3846 echo "$as_me:3846: result: $cf_cv_makeflags" >&5
3847 echo "${ECHO_T}$cf_cv_makeflags" >&6
3848
3849 if test -n "$ac_tool_prefix"; then
3850   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3851 set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
3855   echo $ECHO_N "(cached) $ECHO_C" >&6
3856 else
3857   if test -n "$RANLIB"; then
3858   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
3867 echo "$as_me:3867: found $ac_dir/$ac_word" >&5
3868 break
3869 done
3870
3871 fi
3872 fi
3873 RANLIB=$ac_cv_prog_RANLIB
3874 if test -n "$RANLIB"; then
3875   echo "$as_me:3875: result: $RANLIB" >&5
3876 echo "${ECHO_T}$RANLIB" >&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_RANLIB"; then
3884   ac_ct_RANLIB=$RANLIB
3885   # Extract the first word of "ranlib", so it can be a program name with args.
3886 set dummy ranlib; 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_RANLIB+set}" = set; then
3890   echo $ECHO_N "(cached) $ECHO_C" >&6
3891 else
3892   if test -n "$ac_ct_RANLIB"; then
3893   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
3902 echo "$as_me:3902: found $ac_dir/$ac_word" >&5
3903 break
3904 done
3905
3906   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3907 fi
3908 fi
3909 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3910 if test -n "$ac_ct_RANLIB"; then
3911   echo "$as_me:3911: result: $ac_ct_RANLIB" >&5
3912 echo "${ECHO_T}$ac_ct_RANLIB" >&6
3913 else
3914   echo "$as_me:3914: result: no" >&5
3915 echo "${ECHO_T}no" >&6
3916 fi
3917
3918   RANLIB=$ac_ct_RANLIB
3919 else
3920   RANLIB="$ac_cv_prog_RANLIB"
3921 fi
3922
3923 if test -n "$ac_tool_prefix"; then
3924   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}ld; 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_LD+set}" = set; then
3929   echo $ECHO_N "(cached) $ECHO_C" >&6
3930 else
3931   if test -n "$LD"; then
3932   ac_cv_prog_LD="$LD" # 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_LD="${ac_tool_prefix}ld"
3941 echo "$as_me:3941: found $ac_dir/$ac_word" >&5
3942 break
3943 done
3944
3945 fi
3946 fi
3947 LD=$ac_cv_prog_LD
3948 if test -n "$LD"; then
3949   echo "$as_me:3949: result: $LD" >&5
3950 echo "${ECHO_T}$LD" >&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_LD"; then
3958   ac_ct_LD=$LD
3959   # Extract the first word of "ld", so it can be a program name with args.
3960 set dummy ld; 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_LD+set}" = set; then
3964   echo $ECHO_N "(cached) $ECHO_C" >&6
3965 else
3966   if test -n "$ac_ct_LD"; then
3967   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # 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_LD="ld"
3976 echo "$as_me:3976: found $ac_dir/$ac_word" >&5
3977 break
3978 done
3979
3980   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
3981 fi
3982 fi
3983 ac_ct_LD=$ac_cv_prog_ac_ct_LD
3984 if test -n "$ac_ct_LD"; then
3985   echo "$as_me:3985: result: $ac_ct_LD" >&5
3986 echo "${ECHO_T}$ac_ct_LD" >&6
3987 else
3988   echo "$as_me:3988: result: no" >&5
3989 echo "${ECHO_T}no" >&6
3990 fi
3991
3992   LD=$ac_ct_LD
3993 else
3994   LD="$ac_cv_prog_LD"
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 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ar; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_prog_AR+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$AR"; then
4080   ac_cv_prog_AR="$AR" # Let the user override the test.
4081 else
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   $as_executable_p "$ac_dir/$ac_word" || continue
4088 ac_cv_prog_AR="${ac_tool_prefix}ar"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 AR=$ac_cv_prog_AR
4096 if test -n "$AR"; then
4097   echo "$as_me:4097: result: $AR" >&5
4098 echo "${ECHO_T}$AR" >&6
4099 else
4100   echo "$as_me:4100: result: no" >&5
4101 echo "${ECHO_T}no" >&6
4102 fi
4103
4104 fi
4105 if test -z "$ac_cv_prog_AR"; then
4106   ac_ct_AR=$AR
4107   # Extract the first word of "ar", so it can be a program name with args.
4108 set dummy ar; ac_word=$2
4109 echo "$as_me:4109: checking for $ac_word" >&5
4110 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4111 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_AR"; then
4115   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4116 else
4117   ac_save_IFS=$IFS; IFS=$ac_path_separator
4118 ac_dummy="$PATH"
4119 for ac_dir in $ac_dummy; do
4120   IFS=$ac_save_IFS
4121   test -z "$ac_dir" && ac_dir=.
4122   $as_executable_p "$ac_dir/$ac_word" || continue
4123 ac_cv_prog_ac_ct_AR="ar"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4129 fi
4130 fi
4131 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4132 if test -n "$ac_ct_AR"; then
4133   echo "$as_me:4133: result: $ac_ct_AR" >&5
4134 echo "${ECHO_T}$ac_ct_AR" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   AR=$ac_ct_AR
4141 else
4142   AR="$ac_cv_prog_AR"
4143 fi
4144
4145 echo "$as_me:4145: checking for options to update archives" >&5
4146 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4147 if test "${cf_cv_ar_flags+set}" = set; then
4148   echo $ECHO_N "(cached) $ECHO_C" >&6
4149 else
4150
4151         cf_cv_ar_flags=unknown
4152         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4153         do
4154                 rm -f conftest.$ac_cv_objext
4155                 rm -f conftest.a
4156
4157                 cat >conftest.$ac_ext <<EOF
4158 #line 4158 "configure"
4159 int     testdata[3] = { 123, 456, 789 };
4160 EOF
4161                 if { (eval echo "$as_me:4161: \"$ac_compile\"") >&5
4162   (eval $ac_compile) 2>&5
4163   ac_status=$?
4164   echo "$as_me:4164: \$? = $ac_status" >&5
4165   (exit $ac_status); } ; then
4166                         $AR $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4167                         if test -f conftest.a ; then
4168                                 cf_cv_ar_flags=$cf_ar_flags
4169                                 break
4170                         fi
4171                 else
4172                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4173
4174 echo "${as_me-configure}:4174: testing cannot compile test-program ..." 1>&5
4175
4176                         break
4177                 fi
4178         done
4179         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4180
4181 fi
4182 echo "$as_me:4182: result: $cf_cv_ar_flags" >&5
4183 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4184 test -z "$ARFLAGS" && ARFLAGS=$cf_cv_ar_flags
4185 ARFLAGS=$cf_cv_ar_flags
4186
4187 echo "$as_me:4187: checking if you have specified an install-prefix" >&5
4188 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4189
4190 # Check whether --with-install-prefix or --without-install-prefix was given.
4191 if test "${with_install_prefix+set}" = set; then
4192   withval="$with_install_prefix"
4193   case "$withval" in #(vi
4194         yes|no) #(vi
4195                 ;;
4196         *)      DESTDIR="$withval"
4197                 ;;
4198         esac
4199 fi;
4200 echo "$as_me:4200: result: $DESTDIR" >&5
4201 echo "${ECHO_T}$DESTDIR" >&6
4202
4203 ###############################################################################
4204
4205 # If we're cross-compiling, allow the user to override the tools and their
4206 # options.  The configure script is oriented toward identifying the host
4207 # compiler, etc., but we need a build compiler to generate parts of the source.
4208
4209 if test "$cross_compiling" = yes ; then
4210
4211         # defaults that we might want to override
4212         : ${BUILD_CFLAGS:=''}
4213         : ${BUILD_CPPFLAGS:=''}
4214         : ${BUILD_LDFLAGS:=''}
4215         : ${BUILD_LIBS:=''}
4216         : ${BUILD_EXEEXT:='$x'}
4217         : ${BUILD_OBJEXT:='o'}
4218
4219 # Check whether --with-build-cc or --without-build-cc was given.
4220 if test "${with_build_cc+set}" = set; then
4221   withval="$with_build_cc"
4222   BUILD_CC="$withval"
4223 else
4224   for ac_prog in gcc cc cl
4225 do
4226   # Extract the first word of "$ac_prog", so it can be a program name with args.
4227 set dummy $ac_prog; ac_word=$2
4228 echo "$as_me:4228: checking for $ac_word" >&5
4229 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4230 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4231   echo $ECHO_N "(cached) $ECHO_C" >&6
4232 else
4233   if test -n "$BUILD_CC"; then
4234   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4235 else
4236   ac_save_IFS=$IFS; IFS=$ac_path_separator
4237 ac_dummy="$PATH"
4238 for ac_dir in $ac_dummy; do
4239   IFS=$ac_save_IFS
4240   test -z "$ac_dir" && ac_dir=.
4241   $as_executable_p "$ac_dir/$ac_word" || continue
4242 ac_cv_prog_BUILD_CC="$ac_prog"
4243 echo "$as_me:4243: found $ac_dir/$ac_word" >&5
4244 break
4245 done
4246
4247 fi
4248 fi
4249 BUILD_CC=$ac_cv_prog_BUILD_CC
4250 if test -n "$BUILD_CC"; then
4251   echo "$as_me:4251: result: $BUILD_CC" >&5
4252 echo "${ECHO_T}$BUILD_CC" >&6
4253 else
4254   echo "$as_me:4254: result: no" >&5
4255 echo "${ECHO_T}no" >&6
4256 fi
4257
4258   test -n "$BUILD_CC" && break
4259 done
4260
4261 fi;
4262         echo "$as_me:4262: checking for native build C compiler" >&5
4263 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4264         echo "$as_me:4264: result: $BUILD_CC" >&5
4265 echo "${ECHO_T}$BUILD_CC" >&6
4266
4267         echo "$as_me:4267: checking for native build C preprocessor" >&5
4268 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4269
4270 # Check whether --with-build-cpp or --without-build-cpp was given.
4271 if test "${with_build_cpp+set}" = set; then
4272   withval="$with_build_cpp"
4273   BUILD_CPP="$withval"
4274 else
4275   BUILD_CPP='${BUILD_CC} -E'
4276 fi;
4277         echo "$as_me:4277: result: $BUILD_CPP" >&5
4278 echo "${ECHO_T}$BUILD_CPP" >&6
4279
4280         echo "$as_me:4280: checking for native build C flags" >&5
4281 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4282
4283 # Check whether --with-build-cflags or --without-build-cflags was given.
4284 if test "${with_build_cflags+set}" = set; then
4285   withval="$with_build_cflags"
4286   BUILD_CFLAGS="$withval"
4287 fi;
4288         echo "$as_me:4288: result: $BUILD_CFLAGS" >&5
4289 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4290
4291         echo "$as_me:4291: checking for native build C preprocessor-flags" >&5
4292 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4293
4294 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4295 if test "${with_build_cppflags+set}" = set; then
4296   withval="$with_build_cppflags"
4297   BUILD_CPPFLAGS="$withval"
4298 fi;
4299         echo "$as_me:4299: result: $BUILD_CPPFLAGS" >&5
4300 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4301
4302         echo "$as_me:4302: checking for native build linker-flags" >&5
4303 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4304
4305 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4306 if test "${with_build_ldflags+set}" = set; then
4307   withval="$with_build_ldflags"
4308   BUILD_LDFLAGS="$withval"
4309 fi;
4310         echo "$as_me:4310: result: $BUILD_LDFLAGS" >&5
4311 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4312
4313         echo "$as_me:4313: checking for native build linker-libraries" >&5
4314 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4315
4316 # Check whether --with-build-libs or --without-build-libs was given.
4317 if test "${with_build_libs+set}" = set; then
4318   withval="$with_build_libs"
4319   BUILD_LIBS="$withval"
4320 fi;
4321         echo "$as_me:4321: result: $BUILD_LIBS" >&5
4322 echo "${ECHO_T}$BUILD_LIBS" >&6
4323
4324         # this assumes we're on Unix.
4325         BUILD_EXEEXT=
4326         BUILD_OBJEXT=o
4327
4328         : ${BUILD_CC:='${CC}'}
4329
4330         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4331                 { { echo "$as_me:4331: error: Cross-build requires two compilers.
4332 Use --with-build-cc to specify the native compiler." >&5
4333 echo "$as_me: error: Cross-build requires two compilers.
4334 Use --with-build-cc to specify the native compiler." >&2;}
4335    { (exit 1); exit 1; }; }
4336         fi
4337
4338 else
4339         : ${BUILD_CC:='${CC}'}
4340         : ${BUILD_CPP:='${CPP}'}
4341         : ${BUILD_CFLAGS:='${CFLAGS}'}
4342         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4343         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4344         : ${BUILD_LIBS:='${LIBS}'}
4345         : ${BUILD_EXEEXT:='$x'}
4346         : ${BUILD_OBJEXT:='o'}
4347 fi
4348
4349 ###############################################################################
4350
4351 ### Options to allow the user to specify the set of libraries which are used.
4352 ### Use "--without-normal --with-shared" to allow the default model to be
4353 ### shared, for example.
4354 cf_list_models=""
4355
4356 LIBTOOL=
4357
4358 # common library maintenance symbols that are convenient for libtool scripts:
4359 LIB_CREATE='${AR} -cr'
4360 LIB_OBJECT='${OBJECTS}'
4361 LIB_SUFFIX=.a
4362 LIB_PREP="$RANLIB"
4363
4364 # symbols used to prop libtool up to enable it to determine what it should be
4365 # doing:
4366 LIB_CLEAN=
4367 LIB_COMPILE=
4368 LIB_LINK='${CC}'
4369 LIB_INSTALL=
4370 LIB_UNINSTALL=
4371
4372 echo "$as_me:4372: checking if you want to build libraries with libtool" >&5
4373 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4374
4375 # Check whether --with-libtool or --without-libtool was given.
4376 if test "${with_libtool+set}" = set; then
4377   withval="$with_libtool"
4378   with_libtool=$withval
4379 else
4380   with_libtool=no
4381 fi;
4382 echo "$as_me:4382: result: $with_libtool" >&5
4383 echo "${ECHO_T}$with_libtool" >&6
4384 if test "$with_libtool" != "no"; then
4385
4386         if test "$with_libtool" != "yes" ; then
4387
4388 if test "x$prefix" != xNONE; then
4389   cf_path_syntax="$prefix"
4390 else
4391   cf_path_syntax="$ac_default_prefix"
4392 fi
4393
4394 case ".$with_libtool" in #(vi
4395 .\$\(*\)*|.\'*\'*) #(vi
4396   ;;
4397 ..|./*|.\\*) #(vi
4398   ;;
4399 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4400   ;;
4401 .\${*prefix}*) #(vi
4402   eval with_libtool="$with_libtool"
4403   case ".$with_libtool" in #(vi
4404   .NONE/*)
4405     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4406     ;;
4407   esac
4408   ;; #(vi
4409 .no|.NONE/*)
4410   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4411   ;;
4412 *)
4413   { { echo "$as_me:4413: error: expected a pathname, not \"$with_libtool\"" >&5
4414 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4415    { (exit 1); exit 1; }; }
4416   ;;
4417 esac
4418
4419                 LIBTOOL=$with_libtool
4420         else
4421                 # Extract the first word of "libtool", so it can be a program name with args.
4422 set dummy libtool; ac_word=$2
4423 echo "$as_me:4423: checking for $ac_word" >&5
4424 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4425 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4426   echo $ECHO_N "(cached) $ECHO_C" >&6
4427 else
4428   case $LIBTOOL in
4429   [\\/]* | ?:[\\/]*)
4430   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4431   ;;
4432   *)
4433   ac_save_IFS=$IFS; IFS=$ac_path_separator
4434 ac_dummy="$PATH"
4435 for ac_dir in $ac_dummy; do
4436   IFS=$ac_save_IFS
4437   test -z "$ac_dir" && ac_dir=.
4438   if $as_executable_p "$ac_dir/$ac_word"; then
4439    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4440    echo "$as_me:4440: found $ac_dir/$ac_word" >&5
4441    break
4442 fi
4443 done
4444
4445   ;;
4446 esac
4447 fi
4448 LIBTOOL=$ac_cv_path_LIBTOOL
4449
4450 if test -n "$LIBTOOL"; then
4451   echo "$as_me:4451: result: $LIBTOOL" >&5
4452 echo "${ECHO_T}$LIBTOOL" >&6
4453 else
4454   echo "$as_me:4454: result: no" >&5
4455 echo "${ECHO_T}no" >&6
4456 fi
4457
4458         fi
4459         if test -z "$LIBTOOL" ; then
4460                 { { echo "$as_me:4460: error: Cannot find libtool" >&5
4461 echo "$as_me: error: Cannot find libtool" >&2;}
4462    { (exit 1); exit 1; }; }
4463         fi
4464         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} -version-info `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} -o'
4465         LIB_OBJECT='${OBJECTS:.o=.lo}'
4466         LIB_SUFFIX=.la
4467         LIB_CLEAN='${LIBTOOL} --mode=clean'
4468         LIB_COMPILE='${LIBTOOL} --mode=compile'
4469         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4470         LIB_INSTALL='${LIBTOOL} --mode=install'
4471         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4472         LIB_PREP=:
4473
4474         # Show the version of libtool
4475         echo "$as_me:4475: checking version of libtool" >&5
4476 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4477
4478         # Save the version in a cache variable - this is not entirely a good
4479         # thing, but the version string from libtool is very ugly, and for
4480         # bug reports it might be useful to have the original string. "("
4481         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.].*//'`
4482         echo "$as_me:4482: result: $cf_cv_libtool_version" >&5
4483 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4484         if test -z "$cf_cv_libtool_version" ; then
4485                 { { echo "$as_me:4485: error: This is not GNU libtool" >&5
4486 echo "$as_me: error: This is not GNU libtool" >&2;}
4487    { (exit 1); exit 1; }; }
4488         fi
4489
4490         # special hack to add -no-undefined (which libtool should do for itself)
4491         LT_UNDEF=
4492         case "$cf_cv_system_name" in #(vi
4493         cygwin*|mingw32*|uwin*|aix[456]) #(vi
4494                 LT_UNDEF=-no-undefined
4495                 ;;
4496         esac
4497
4498         # special hack to add --tag option for C++ compiler
4499         case $cf_cv_libtool_version in #(vi
4500         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4501                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4502                 LIBTOOL="$LIBTOOL --tag=CC"
4503                 ;;
4504         *)
4505                 LIBTOOL_CXX="$LIBTOOL"
4506                 ;;
4507         esac
4508 else
4509         LIBTOOL=""
4510         LIBTOOL_CXX=""
4511 fi
4512
4513 test -z "$LIBTOOL" && ECHO_LT=
4514
4515 if test "$with_libtool" != "no" ; then
4516
4517 cf_list_models="$cf_list_models libtool"
4518
4519 else
4520
4521 echo "$as_me:4521: checking if you want to build shared libraries" >&5
4522 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4523
4524 # Check whether --with-shared or --without-shared was given.
4525 if test "${with_shared+set}" = set; then
4526   withval="$with_shared"
4527   with_shared=$withval
4528 else
4529   with_shared=no
4530 fi;
4531 echo "$as_me:4531: result: $with_shared" >&5
4532 echo "${ECHO_T}$with_shared" >&6
4533 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4534
4535 echo "$as_me:4535: checking if you want to build static libraries" >&5
4536 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4537
4538 # Check whether --with-normal or --without-normal was given.
4539 if test "${with_normal+set}" = set; then
4540   withval="$with_normal"
4541   with_normal=$withval
4542 else
4543   with_normal=yes
4544 fi;
4545 echo "$as_me:4545: result: $with_normal" >&5
4546 echo "${ECHO_T}$with_normal" >&6
4547 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4548
4549 echo "$as_me:4549: checking if you want to build debug libraries" >&5
4550 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4551
4552 # Check whether --with-debug or --without-debug was given.
4553 if test "${with_debug+set}" = set; then
4554   withval="$with_debug"
4555   with_debug=$withval
4556 else
4557   with_debug=yes
4558 fi;
4559 echo "$as_me:4559: result: $with_debug" >&5
4560 echo "${ECHO_T}$with_debug" >&6
4561 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4562
4563 echo "$as_me:4563: checking if you want to build profiling libraries" >&5
4564 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4565
4566 # Check whether --with-profile or --without-profile was given.
4567 if test "${with_profile+set}" = set; then
4568   withval="$with_profile"
4569   with_profile=$withval
4570 else
4571   with_profile=no
4572 fi;
4573 echo "$as_me:4573: result: $with_profile" >&5
4574 echo "${ECHO_T}$with_profile" >&6
4575 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4576
4577 fi
4578
4579 ###############################################################################
4580
4581 echo "$as_me:4581: checking for specified models" >&5
4582 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4583 test -z "$cf_list_models" && cf_list_models=normal
4584 test "$with_libtool" != "no" && cf_list_models=libtool
4585 echo "$as_me:4585: result: $cf_list_models" >&5
4586 echo "${ECHO_T}$cf_list_models" >&6
4587
4588 ### Use the first model as the default, and save its suffix for use in building
4589 ### up test-applications.
4590 echo "$as_me:4590: checking for default model" >&5
4591 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4592 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4593 echo "$as_me:4593: result: $DFT_LWR_MODEL" >&5
4594 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4595
4596 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4597
4598 TICS_NAME=tic
4599
4600 TINFO_NAME=tinfo
4601
4602 LIB_NAME=ncurses
4603
4604 LIB_DIR=../lib
4605 LIB_2ND=../../lib
4606
4607         case $cf_cv_system_name in #(vi
4608         OS/2*|os2*) #(vi
4609         LIB_PREFIX=''
4610         ;;
4611         *)      LIB_PREFIX='lib'
4612         ;;
4613         esac
4614 cf_prefix=$LIB_PREFIX
4615
4616 LIB_PREFIX=$cf_prefix
4617
4618 LIB_SUFFIX=
4619
4620 ###############################################################################
4621
4622 echo "$as_me:4622: checking if you want to build a separate terminfo library" >&5
4623 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4624
4625 # Check whether --with-termlib or --without-termlib was given.
4626 if test "${with_termlib+set}" = set; then
4627   withval="$with_termlib"
4628   with_termlib=$withval
4629 else
4630   with_termlib=no
4631 fi;
4632 echo "$as_me:4632: result: $with_termlib" >&5
4633 echo "${ECHO_T}$with_termlib" >&6
4634
4635 echo "$as_me:4635: checking if you want to build a separate tic library" >&5
4636 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4637
4638 # Check whether --with-ticlib or --without-ticlib was given.
4639 if test "${with_ticlib+set}" = set; then
4640   withval="$with_ticlib"
4641   with_ticlib=$withval
4642 else
4643   with_ticlib=no
4644 fi;
4645 echo "$as_me:4645: result: $with_ticlib" >&5
4646 echo "${ECHO_T}$with_ticlib" >&6
4647
4648 ### Checks for special libraries, must be done up-front.
4649 SHLIB_LIST=""
4650
4651 echo "$as_me:4651: checking if you want to link with the GPM mouse library" >&5
4652 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4653
4654 # Check whether --with-gpm or --without-gpm was given.
4655 if test "${with_gpm+set}" = set; then
4656   withval="$with_gpm"
4657   with_gpm=$withval
4658 else
4659   with_gpm=maybe
4660 fi;
4661 echo "$as_me:4661: result: $with_gpm" >&5
4662 echo "${ECHO_T}$with_gpm" >&6
4663
4664 if test "$with_gpm" != no ; then
4665         echo "$as_me:4665: checking for gpm.h" >&5
4666 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4667 if test "${ac_cv_header_gpm_h+set}" = set; then
4668   echo $ECHO_N "(cached) $ECHO_C" >&6
4669 else
4670   cat >conftest.$ac_ext <<_ACEOF
4671 #line 4671 "configure"
4672 #include "confdefs.h"
4673 #include <gpm.h>
4674 _ACEOF
4675 if { (eval echo "$as_me:4675: \"$ac_cpp conftest.$ac_ext\"") >&5
4676   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4677   ac_status=$?
4678   egrep -v '^ *\+' conftest.er1 >conftest.err
4679   rm -f conftest.er1
4680   cat conftest.err >&5
4681   echo "$as_me:4681: \$? = $ac_status" >&5
4682   (exit $ac_status); } >/dev/null; then
4683   if test -s conftest.err; then
4684     ac_cpp_err=$ac_c_preproc_warn_flag
4685   else
4686     ac_cpp_err=
4687   fi
4688 else
4689   ac_cpp_err=yes
4690 fi
4691 if test -z "$ac_cpp_err"; then
4692   ac_cv_header_gpm_h=yes
4693 else
4694   echo "$as_me: failed program was:" >&5
4695   cat conftest.$ac_ext >&5
4696   ac_cv_header_gpm_h=no
4697 fi
4698 rm -f conftest.err conftest.$ac_ext
4699 fi
4700 echo "$as_me:4700: result: $ac_cv_header_gpm_h" >&5
4701 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4702 if test $ac_cv_header_gpm_h = yes; then
4703
4704                 cat >>confdefs.h <<\EOF
4705 #define HAVE_GPM_H 1
4706 EOF
4707
4708                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4709                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4710
4711 echo "${as_me-configure}:4711: testing assuming we really have GPM library ..." 1>&5
4712
4713                         cat >>confdefs.h <<\EOF
4714 #define HAVE_LIBGPM 1
4715 EOF
4716
4717                 else
4718                         echo "$as_me:4718: checking for Gpm_Open in -lgpm" >&5
4719 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4720 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4721   echo $ECHO_N "(cached) $ECHO_C" >&6
4722 else
4723   ac_check_lib_save_LIBS=$LIBS
4724 LIBS="-lgpm  $LIBS"
4725 cat >conftest.$ac_ext <<_ACEOF
4726 #line 4726 "configure"
4727 #include "confdefs.h"
4728
4729 /* Override any gcc2 internal prototype to avoid an error.  */
4730 #ifdef __cplusplus
4731 extern "C"
4732 #endif
4733 /* We use char because int might match the return type of a gcc2
4734    builtin and then its argument prototype would still apply.  */
4735 char Gpm_Open ();
4736 int
4737 main ()
4738 {
4739 Gpm_Open ();
4740   ;
4741   return 0;
4742 }
4743 _ACEOF
4744 rm -f conftest.$ac_objext conftest$ac_exeext
4745 if { (eval echo "$as_me:4745: \"$ac_link\"") >&5
4746   (eval $ac_link) 2>&5
4747   ac_status=$?
4748   echo "$as_me:4748: \$? = $ac_status" >&5
4749   (exit $ac_status); } &&
4750          { ac_try='test -s conftest$ac_exeext'
4751   { (eval echo "$as_me:4751: \"$ac_try\"") >&5
4752   (eval $ac_try) 2>&5
4753   ac_status=$?
4754   echo "$as_me:4754: \$? = $ac_status" >&5
4755   (exit $ac_status); }; }; then
4756   ac_cv_lib_gpm_Gpm_Open=yes
4757 else
4758   echo "$as_me: failed program was:" >&5
4759 cat conftest.$ac_ext >&5
4760 ac_cv_lib_gpm_Gpm_Open=no
4761 fi
4762 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4763 LIBS=$ac_check_lib_save_LIBS
4764 fi
4765 echo "$as_me:4765: result: $ac_cv_lib_gpm_Gpm_Open" >&5
4766 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
4767 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
4768   :
4769 else
4770
4771                                 { { echo "$as_me:4771: error: Cannot link with GPM library" >&5
4772 echo "$as_me: error: Cannot link with GPM library" >&2;}
4773    { (exit 1); exit 1; }; }
4774                 fi
4775                 with_gpm=yes
4776
4777 fi
4778
4779 else
4780
4781                 test "$with_gpm" != maybe && { echo "$as_me:4781: WARNING: Cannot find GPM header" >&5
4782 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
4783                 with_gpm=no
4784
4785 fi
4786
4787 fi
4788
4789 if test "$with_gpm" != no ; then
4790         echo "$as_me:4790: checking if you want to load GPM dynamically" >&5
4791 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
4792
4793 # Check whether --with-dlsym or --without-dlsym was given.
4794 if test "${with_dlsym+set}" = set; then
4795   withval="$with_dlsym"
4796   with_dlsym=$withval
4797 else
4798   with_dlsym=yes
4799 fi;
4800         echo "$as_me:4800: result: $with_dlsym" >&5
4801 echo "${ECHO_T}$with_dlsym" >&6
4802         if test "$with_dlsym" = yes ; then
4803
4804 cf_have_dlsym=no
4805 echo "$as_me:4805: checking for dlsym" >&5
4806 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
4807 if test "${ac_cv_func_dlsym+set}" = set; then
4808   echo $ECHO_N "(cached) $ECHO_C" >&6
4809 else
4810   cat >conftest.$ac_ext <<_ACEOF
4811 #line 4811 "configure"
4812 #include "confdefs.h"
4813 /* System header to define __stub macros and hopefully few prototypes,
4814     which can conflict with char dlsym (); below.  */
4815 #include <assert.h>
4816 /* Override any gcc2 internal prototype to avoid an error.  */
4817 #ifdef __cplusplus
4818 extern "C"
4819 #endif
4820 /* We use char because int might match the return type of a gcc2
4821    builtin and then its argument prototype would still apply.  */
4822 char dlsym ();
4823 char (*f) ();
4824
4825 int
4826 main ()
4827 {
4828 /* The GNU C library defines this for functions which it implements
4829     to always fail with ENOSYS.  Some functions are actually named
4830     something starting with __ and the normal name is an alias.  */
4831 #if defined (__stub_dlsym) || defined (__stub___dlsym)
4832 choke me
4833 #else
4834 f = dlsym;
4835 #endif
4836
4837   ;
4838   return 0;
4839 }
4840 _ACEOF
4841 rm -f conftest.$ac_objext conftest$ac_exeext
4842 if { (eval echo "$as_me:4842: \"$ac_link\"") >&5
4843   (eval $ac_link) 2>&5
4844   ac_status=$?
4845   echo "$as_me:4845: \$? = $ac_status" >&5
4846   (exit $ac_status); } &&
4847          { ac_try='test -s conftest$ac_exeext'
4848   { (eval echo "$as_me:4848: \"$ac_try\"") >&5
4849   (eval $ac_try) 2>&5
4850   ac_status=$?
4851   echo "$as_me:4851: \$? = $ac_status" >&5
4852   (exit $ac_status); }; }; then
4853   ac_cv_func_dlsym=yes
4854 else
4855   echo "$as_me: failed program was:" >&5
4856 cat conftest.$ac_ext >&5
4857 ac_cv_func_dlsym=no
4858 fi
4859 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4860 fi
4861 echo "$as_me:4861: result: $ac_cv_func_dlsym" >&5
4862 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
4863 if test $ac_cv_func_dlsym = yes; then
4864   cf_have_dlsym=yes
4865 else
4866
4867 cf_have_libdl=no
4868 echo "$as_me:4868: checking for dlsym in -ldl" >&5
4869 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
4870 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
4871   echo $ECHO_N "(cached) $ECHO_C" >&6
4872 else
4873   ac_check_lib_save_LIBS=$LIBS
4874 LIBS="-ldl  $LIBS"
4875 cat >conftest.$ac_ext <<_ACEOF
4876 #line 4876 "configure"
4877 #include "confdefs.h"
4878
4879 /* Override any gcc2 internal prototype to avoid an error.  */
4880 #ifdef __cplusplus
4881 extern "C"
4882 #endif
4883 /* We use char because int might match the return type of a gcc2
4884    builtin and then its argument prototype would still apply.  */
4885 char dlsym ();
4886 int
4887 main ()
4888 {
4889 dlsym ();
4890   ;
4891   return 0;
4892 }
4893 _ACEOF
4894 rm -f conftest.$ac_objext conftest$ac_exeext
4895 if { (eval echo "$as_me:4895: \"$ac_link\"") >&5
4896   (eval $ac_link) 2>&5
4897   ac_status=$?
4898   echo "$as_me:4898: \$? = $ac_status" >&5
4899   (exit $ac_status); } &&
4900          { ac_try='test -s conftest$ac_exeext'
4901   { (eval echo "$as_me:4901: \"$ac_try\"") >&5
4902   (eval $ac_try) 2>&5
4903   ac_status=$?
4904   echo "$as_me:4904: \$? = $ac_status" >&5
4905   (exit $ac_status); }; }; then
4906   ac_cv_lib_dl_dlsym=yes
4907 else
4908   echo "$as_me: failed program was:" >&5
4909 cat conftest.$ac_ext >&5
4910 ac_cv_lib_dl_dlsym=no
4911 fi
4912 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4913 LIBS=$ac_check_lib_save_LIBS
4914 fi
4915 echo "$as_me:4915: result: $ac_cv_lib_dl_dlsym" >&5
4916 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
4917 if test $ac_cv_lib_dl_dlsym = yes; then
4918
4919         cf_have_dlsym=yes
4920         cf_have_libdl=yes
4921 fi
4922
4923 fi
4924
4925 if test "$cf_have_dlsym" = yes ; then
4926         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
4927
4928         echo "$as_me:4928: checking whether able to link to dl*() functions" >&5
4929 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
4930         cat >conftest.$ac_ext <<_ACEOF
4931 #line 4931 "configure"
4932 #include "confdefs.h"
4933 #include <dlfcn.h>
4934 int
4935 main ()
4936 {
4937
4938                 void *obj;
4939                 if ((obj = dlopen("filename", 0)) != 0) {
4940                         if (dlsym(obj, "symbolname") == 0) {
4941                         dlclose(obj);
4942                         }
4943                 }
4944   ;
4945   return 0;
4946 }
4947 _ACEOF
4948 rm -f conftest.$ac_objext conftest$ac_exeext
4949 if { (eval echo "$as_me:4949: \"$ac_link\"") >&5
4950   (eval $ac_link) 2>&5
4951   ac_status=$?
4952   echo "$as_me:4952: \$? = $ac_status" >&5
4953   (exit $ac_status); } &&
4954          { ac_try='test -s conftest$ac_exeext'
4955   { (eval echo "$as_me:4955: \"$ac_try\"") >&5
4956   (eval $ac_try) 2>&5
4957   ac_status=$?
4958   echo "$as_me:4958: \$? = $ac_status" >&5
4959   (exit $ac_status); }; }; then
4960
4961                 cat >>confdefs.h <<\EOF
4962 #define HAVE_LIBDL 1
4963 EOF
4964
4965 else
4966   echo "$as_me: failed program was:" >&5
4967 cat conftest.$ac_ext >&5
4968
4969                 { { echo "$as_me:4969: error: Cannot link test program for libdl" >&5
4970 echo "$as_me: error: Cannot link test program for libdl" >&2;}
4971    { (exit 1); exit 1; }; }
4972 fi
4973 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4974         echo "$as_me:4974: result: ok" >&5
4975 echo "${ECHO_T}ok" >&6
4976 else
4977         { { echo "$as_me:4977: error: Cannot find dlsym function" >&5
4978 echo "$as_me: error: Cannot find dlsym function" >&2;}
4979    { (exit 1); exit 1; }; }
4980 fi
4981
4982                 if test "$with_gpm" != yes ; then
4983                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
4984
4985 echo "${as_me-configure}:4985: testing assuming soname for gpm is $with_gpm ..." 1>&5
4986
4987                         cf_cv_gpm_soname="$with_gpm"
4988                 else
4989
4990 echo "$as_me:4990: checking for soname of gpm library" >&5
4991 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
4992 if test "${cf_cv_gpm_soname+set}" = set; then
4993   echo $ECHO_N "(cached) $ECHO_C" >&6
4994 else
4995
4996 cf_cv_gpm_soname=unknown
4997 if test "$cross_compiling" != yes ; then
4998 cat >conftest.$ac_ext <<CF_EOF
4999 #include <gpm.h>
5000 int main()
5001 {
5002 if (Gpm_Open(0,0)) Gpm_Close();
5003         ${cf_cv_main_return:-return}(0);
5004 }
5005 CF_EOF
5006 cf_save_LIBS="$LIBS"
5007         LIBS="-lgpm $LIBS"
5008         if { (eval echo "$as_me:5008: \"$ac_compile\"") >&5
5009   (eval $ac_compile) 2>&5
5010   ac_status=$?
5011   echo "$as_me:5011: \$? = $ac_status" >&5
5012   (exit $ac_status); } ; then
5013                 if { (eval echo "$as_me:5013: \"$ac_link\"") >&5
5014   (eval $ac_link) 2>&5
5015   ac_status=$?
5016   echo "$as_me:5016: \$? = $ac_status" >&5
5017   (exit $ac_status); } ; then
5018                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5019                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5020                 fi
5021         fi
5022 rm -f conftest*
5023 LIBS="$cf_save_LIBS"
5024 fi
5025
5026 fi
5027 echo "$as_me:5027: result: $cf_cv_gpm_soname" >&5
5028 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5029
5030                 fi
5031                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5032 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5033 EOF
5034
5035                 SHLIB_LIST="-ldl $SHLIB_LIST"
5036         else
5037                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5038                 TEST_LIBS="-lgpm $TEST_LIBS"
5039         fi
5040         cat >>confdefs.h <<\EOF
5041 #define HAVE_LIBGPM 1
5042 EOF
5043
5044 echo "$as_me:5044: checking for Gpm_Wgetch in -lgpm" >&5
5045 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5046 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5047   echo $ECHO_N "(cached) $ECHO_C" >&6
5048 else
5049   ac_check_lib_save_LIBS=$LIBS
5050 LIBS="-lgpm  $LIBS"
5051 cat >conftest.$ac_ext <<_ACEOF
5052 #line 5052 "configure"
5053 #include "confdefs.h"
5054
5055 /* Override any gcc2 internal prototype to avoid an error.  */
5056 #ifdef __cplusplus
5057 extern "C"
5058 #endif
5059 /* We use char because int might match the return type of a gcc2
5060    builtin and then its argument prototype would still apply.  */
5061 char Gpm_Wgetch ();
5062 int
5063 main ()
5064 {
5065 Gpm_Wgetch ();
5066   ;
5067   return 0;
5068 }
5069 _ACEOF
5070 rm -f conftest.$ac_objext conftest$ac_exeext
5071 if { (eval echo "$as_me:5071: \"$ac_link\"") >&5
5072   (eval $ac_link) 2>&5
5073   ac_status=$?
5074   echo "$as_me:5074: \$? = $ac_status" >&5
5075   (exit $ac_status); } &&
5076          { ac_try='test -s conftest$ac_exeext'
5077   { (eval echo "$as_me:5077: \"$ac_try\"") >&5
5078   (eval $ac_try) 2>&5
5079   ac_status=$?
5080   echo "$as_me:5080: \$? = $ac_status" >&5
5081   (exit $ac_status); }; }; then
5082   ac_cv_lib_gpm_Gpm_Wgetch=yes
5083 else
5084   echo "$as_me: failed program was:" >&5
5085 cat conftest.$ac_ext >&5
5086 ac_cv_lib_gpm_Gpm_Wgetch=no
5087 fi
5088 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5089 LIBS=$ac_check_lib_save_LIBS
5090 fi
5091 echo "$as_me:5091: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5092 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5093 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5094
5095 echo "$as_me:5095: checking if GPM is weakly bound to curses library" >&5
5096 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5097 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5098   echo $ECHO_N "(cached) $ECHO_C" >&6
5099 else
5100
5101 cf_cv_check_gpm_wgetch=unknown
5102 if test "$cross_compiling" != yes ; then
5103
5104 cat >conftest.$ac_ext <<CF_EOF
5105 #include <gpm.h>
5106 int main()
5107 {
5108         Gpm_Wgetch();
5109         ${cf_cv_main_return:-return}(0);
5110 }
5111 CF_EOF
5112
5113         cf_save_LIBS="$LIBS"
5114         # This only works if we can look at the symbol table.  If a shared
5115         # library is stripped for install, we cannot use that.  So we're forced
5116         # to rely on the static library, noting that some packagers may not
5117         # include it.
5118         LIBS="-static -lgpm -dynamic $LIBS"
5119         if { (eval echo "$as_me:5119: \"$ac_compile\"") >&5
5120   (eval $ac_compile) 2>&5
5121   ac_status=$?
5122   echo "$as_me:5122: \$? = $ac_status" >&5
5123   (exit $ac_status); } ; then
5124                 if { (eval echo "$as_me:5124: \"$ac_link\"") >&5
5125   (eval $ac_link) 2>&5
5126   ac_status=$?
5127   echo "$as_me:5127: \$? = $ac_status" >&5
5128   (exit $ac_status); } ; then
5129                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5130                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5131                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5132                 fi
5133         fi
5134         rm -f conftest*
5135         LIBS="$cf_save_LIBS"
5136 fi
5137
5138 fi
5139 echo "$as_me:5139: result: $cf_cv_check_gpm_wgetch" >&5
5140 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5141
5142 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5143         { echo "$as_me:5143: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5144 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5145 fi
5146
5147 fi
5148
5149 fi
5150
5151 # not everyone has "test -c"
5152 if test -c /dev/sysmouse 2>/dev/null ; then
5153 echo "$as_me:5153: checking if you want to use sysmouse" >&5
5154 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5155
5156 # Check whether --with-sysmouse or --without-sysmouse was given.
5157 if test "${with_sysmouse+set}" = set; then
5158   withval="$with_sysmouse"
5159   cf_with_sysmouse=$withval
5160 else
5161   cf_with_sysmouse=maybe
5162 fi;
5163         if test "$cf_with_sysmouse" != no ; then
5164         cat >conftest.$ac_ext <<_ACEOF
5165 #line 5165 "configure"
5166 #include "confdefs.h"
5167
5168 #include <osreldate.h>
5169 #if (__FreeBSD_version >= 400017)
5170 #include <sys/consio.h>
5171 #include <sys/fbio.h>
5172 #else
5173 #include <machine/console.h>
5174 #endif
5175
5176 int
5177 main ()
5178 {
5179
5180         struct mouse_info the_mouse;
5181         ioctl(0, CONS_MOUSECTL, &the_mouse);
5182
5183   ;
5184   return 0;
5185 }
5186 _ACEOF
5187 rm -f conftest.$ac_objext
5188 if { (eval echo "$as_me:5188: \"$ac_compile\"") >&5
5189   (eval $ac_compile) 2>&5
5190   ac_status=$?
5191   echo "$as_me:5191: \$? = $ac_status" >&5
5192   (exit $ac_status); } &&
5193          { ac_try='test -s conftest.$ac_objext'
5194   { (eval echo "$as_me:5194: \"$ac_try\"") >&5
5195   (eval $ac_try) 2>&5
5196   ac_status=$?
5197   echo "$as_me:5197: \$? = $ac_status" >&5
5198   (exit $ac_status); }; }; then
5199   cf_with_sysmouse=yes
5200 else
5201   echo "$as_me: failed program was:" >&5
5202 cat conftest.$ac_ext >&5
5203 cf_with_sysmouse=no
5204 fi
5205 rm -f conftest.$ac_objext conftest.$ac_ext
5206         fi
5207 echo "$as_me:5207: result: $cf_with_sysmouse" >&5
5208 echo "${ECHO_T}$cf_with_sysmouse" >&6
5209 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5210 #define USE_SYSMOUSE 1
5211 EOF
5212
5213 fi
5214
5215 if test X"$CC_G_OPT" = X"" ; then
5216         CC_G_OPT='-g'
5217         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5218 fi
5219
5220 if test X"$CXX_G_OPT" = X"" ; then
5221         CXX_G_OPT='-g'
5222         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5223 fi
5224
5225 echo "$as_me:5225: checking for default loader flags" >&5
5226 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5227 case $DFT_LWR_MODEL in
5228 libtool) LD_MODEL=''   ;;
5229 normal)  LD_MODEL=''   ;;
5230 debug)   LD_MODEL=$CC_G_OPT ;;
5231 profile) LD_MODEL='-pg';;
5232 shared)  LD_MODEL=''   ;;
5233 esac
5234 echo "$as_me:5234: result: $LD_MODEL" >&5
5235 echo "${ECHO_T}$LD_MODEL" >&6
5236
5237 case $DFT_LWR_MODEL in
5238 shared)
5239
5240 echo "$as_me:5240: checking if rpath option should be used" >&5
5241 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5242
5243 # Check whether --enable-rpath or --disable-rpath was given.
5244 if test "${enable_rpath+set}" = set; then
5245   enableval="$enable_rpath"
5246   cf_cv_enable_rpath=$enableval
5247 else
5248   cf_cv_enable_rpath=no
5249 fi;
5250 echo "$as_me:5250: result: $cf_cv_enable_rpath" >&5
5251 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5252
5253 echo "$as_me:5253: checking if shared libraries should be relinked during install" >&5
5254 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5255
5256 # Check whether --enable-relink or --disable-relink was given.
5257 if test "${enable_relink+set}" = set; then
5258   enableval="$enable_relink"
5259   cf_cv_do_relink=$enableval
5260 else
5261   cf_cv_do_relink=yes
5262 fi;
5263 echo "$as_me:5263: result: $cf_cv_do_relink" >&5
5264 echo "${ECHO_T}$cf_cv_do_relink" >&6
5265         ;;
5266 esac
5267
5268 LD_RPATH_OPT=
5269 echo "$as_me:5269: checking for an rpath option" >&5
5270 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5271 case $cf_cv_system_name in #(vi
5272 irix*) #(vi
5273         if test "$GCC" = yes; then
5274                 LD_RPATH_OPT="-Wl,-rpath,"
5275         else
5276                 LD_RPATH_OPT="-rpath "
5277         fi
5278         ;;
5279 linux*|gnu*|k*bsd*-gnu) #(vi
5280         LD_RPATH_OPT="-Wl,-rpath,"
5281         ;;
5282 openbsd[2-9].*) #(vi
5283         LD_RPATH_OPT="-Wl,-rpath,"
5284         ;;
5285 freebsd*) #(vi
5286         LD_RPATH_OPT="-rpath "
5287         ;;
5288 netbsd*) #(vi
5289         LD_RPATH_OPT="-Wl,-rpath,"
5290         ;;
5291 osf*|mls+*) #(vi
5292         LD_RPATH_OPT="-rpath "
5293         ;;
5294 solaris2*) #(vi
5295         LD_RPATH_OPT="-R"
5296         ;;
5297 *)
5298         ;;
5299 esac
5300 echo "$as_me:5300: result: $LD_RPATH_OPT" >&5
5301 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5302
5303 case "x$LD_RPATH_OPT" in #(vi
5304 x-R*)
5305         echo "$as_me:5305: checking if we need a space after rpath option" >&5
5306 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5307         cf_save_LIBS="$LIBS"
5308         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5309         cat >conftest.$ac_ext <<_ACEOF
5310 #line 5310 "configure"
5311 #include "confdefs.h"
5312
5313 int
5314 main ()
5315 {
5316
5317   ;
5318   return 0;
5319 }
5320 _ACEOF
5321 rm -f conftest.$ac_objext conftest$ac_exeext
5322 if { (eval echo "$as_me:5322: \"$ac_link\"") >&5
5323   (eval $ac_link) 2>&5
5324   ac_status=$?
5325   echo "$as_me:5325: \$? = $ac_status" >&5
5326   (exit $ac_status); } &&
5327          { ac_try='test -s conftest$ac_exeext'
5328   { (eval echo "$as_me:5328: \"$ac_try\"") >&5
5329   (eval $ac_try) 2>&5
5330   ac_status=$?
5331   echo "$as_me:5331: \$? = $ac_status" >&5
5332   (exit $ac_status); }; }; then
5333   cf_rpath_space=no
5334 else
5335   echo "$as_me: failed program was:" >&5
5336 cat conftest.$ac_ext >&5
5337 cf_rpath_space=yes
5338 fi
5339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5340         LIBS="$cf_save_LIBS"
5341         echo "$as_me:5341: result: $cf_rpath_space" >&5
5342 echo "${ECHO_T}$cf_rpath_space" >&6
5343         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5344         ;;
5345 esac
5346
5347         LOCAL_LDFLAGS=
5348         LOCAL_LDFLAGS2=
5349         LD_SHARED_OPTS=
5350         INSTALL_LIB="-m 644"
5351
5352         cf_cv_do_symlinks=no
5353         cf_ld_rpath_opt=
5354         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5355
5356         echo "$as_me:5356: checking if release/abi version should be used for shared libs" >&5
5357 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5358
5359 # Check whether --with-shlib-version or --without-shlib-version was given.
5360 if test "${with_shlib_version+set}" = set; then
5361   withval="$with_shlib_version"
5362   test -z "$withval" && withval=auto
5363         case $withval in #(vi
5364         yes) #(vi
5365                 cf_cv_shlib_version=auto
5366                 ;;
5367         rel|abi|auto|no) #(vi
5368                 cf_cv_shlib_version=$withval
5369                 ;;
5370         *)
5371                 { { echo "$as_me:5371: error: option value must be one of: rel, abi, auto or no" >&5
5372 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5373    { (exit 1); exit 1; }; }
5374                 ;;
5375         esac
5376
5377 else
5378   cf_cv_shlib_version=auto
5379 fi;
5380         echo "$as_me:5380: result: $cf_cv_shlib_version" >&5
5381 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5382
5383         cf_cv_rm_so_locs=no
5384
5385         # Some less-capable ports of gcc support only -fpic
5386         CC_SHARED_OPTS=
5387         if test "$GCC" = yes
5388         then
5389                 echo "$as_me:5389: checking which $CC option to use" >&5
5390 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5391                 cf_save_CFLAGS="$CFLAGS"
5392                 for CC_SHARED_OPTS in -fPIC -fpic ''
5393                 do
5394                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5395                         cat >conftest.$ac_ext <<_ACEOF
5396 #line 5396 "configure"
5397 #include "confdefs.h"
5398 #include <stdio.h>
5399 int
5400 main ()
5401 {
5402 int x = 1
5403   ;
5404   return 0;
5405 }
5406 _ACEOF
5407 rm -f conftest.$ac_objext
5408 if { (eval echo "$as_me:5408: \"$ac_compile\"") >&5
5409   (eval $ac_compile) 2>&5
5410   ac_status=$?
5411   echo "$as_me:5411: \$? = $ac_status" >&5
5412   (exit $ac_status); } &&
5413          { ac_try='test -s conftest.$ac_objext'
5414   { (eval echo "$as_me:5414: \"$ac_try\"") >&5
5415   (eval $ac_try) 2>&5
5416   ac_status=$?
5417   echo "$as_me:5417: \$? = $ac_status" >&5
5418   (exit $ac_status); }; }; then
5419   break
5420 else
5421   echo "$as_me: failed program was:" >&5
5422 cat conftest.$ac_ext >&5
5423 fi
5424 rm -f conftest.$ac_objext conftest.$ac_ext
5425                 done
5426                 echo "$as_me:5426: result: $CC_SHARED_OPTS" >&5
5427 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5428                 CFLAGS="$cf_save_CFLAGS"
5429         fi
5430
5431         cf_cv_shlib_version_infix=no
5432
5433         case $cf_cv_system_name in #(vi
5434         aix[56]*) #(vi
5435                 if test "$GCC" = yes; then
5436                         CC_SHARED_OPTS=
5437                         MK_SHARED_LIB="$(CC) -shared"
5438                 fi
5439                 ;;
5440         beos*) #(vi
5441                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5442                 ;;
5443         cygwin*) #(vi
5444                 CC_SHARED_OPTS=
5445                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5446                 cf_cv_shlib_version=cygdll
5447                 cf_cv_shlib_version_infix=cygdll
5448                 cat >mk_shared_lib.sh <<-CF_EOF
5449                 #!/bin/sh
5450                 SHARED_LIB=\$1
5451                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5452                 shift
5453                 cat <<-EOF
5454                 Linking shared library
5455                 ** SHARED_LIB \$SHARED_LIB
5456                 ** IMPORT_LIB \$IMPORT_LIB
5457 EOF
5458                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5459 CF_EOF
5460                 chmod +x mk_shared_lib.sh
5461                 ;;
5462         darwin*) #(vi
5463                 EXTRA_CFLAGS="-no-cpp-precomp"
5464                 CC_SHARED_OPTS="-dynamic"
5465                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5466                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5467                 cf_cv_shlib_version_infix=yes
5468                 echo "$as_me:5468: checking if ld -search_paths_first works" >&5
5469 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5470 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5471   echo $ECHO_N "(cached) $ECHO_C" >&6
5472 else
5473
5474                         cf_save_LDFLAGS=$LDFLAGS
5475                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5476                         cat >conftest.$ac_ext <<_ACEOF
5477 #line 5477 "configure"
5478 #include "confdefs.h"
5479
5480 int
5481 main ()
5482 {
5483 int i;
5484   ;
5485   return 0;
5486 }
5487 _ACEOF
5488 rm -f conftest.$ac_objext conftest$ac_exeext
5489 if { (eval echo "$as_me:5489: \"$ac_link\"") >&5
5490   (eval $ac_link) 2>&5
5491   ac_status=$?
5492   echo "$as_me:5492: \$? = $ac_status" >&5
5493   (exit $ac_status); } &&
5494          { ac_try='test -s conftest$ac_exeext'
5495   { (eval echo "$as_me:5495: \"$ac_try\"") >&5
5496   (eval $ac_try) 2>&5
5497   ac_status=$?
5498   echo "$as_me:5498: \$? = $ac_status" >&5
5499   (exit $ac_status); }; }; then
5500   cf_cv_ldflags_search_paths_first=yes
5501 else
5502   echo "$as_me: failed program was:" >&5
5503 cat conftest.$ac_ext >&5
5504 cf_cv_ldflags_search_paths_first=no
5505 fi
5506 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5507                                 LDFLAGS=$cf_save_LDFLAGS
5508 fi
5509 echo "$as_me:5509: result: $cf_cv_ldflags_search_paths_first" >&5
5510 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5511                 if test $cf_cv_ldflags_search_paths_first = yes; then
5512                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5513                 fi
5514                 ;;
5515         hpux*) #(vi
5516                 # (tested with gcc 2.7.2 -- I don't have c89)
5517                 if test "$GCC" = yes; then
5518                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5519                 else
5520                         CC_SHARED_OPTS='+Z'
5521                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5522                 fi
5523                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5524                 # HP-UX shared libraries must be executable, and should be
5525                 # readonly to exploit a quirk in the memory manager.
5526                 INSTALL_LIB="-m 555"
5527                 ;;
5528         irix*) #(vi
5529                 if test "$cf_cv_enable_rpath" = yes ; then
5530                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5531                 fi
5532                 # tested with IRIX 5.2 and 'cc'.
5533                 if test "$GCC" != yes; then
5534                         CC_SHARED_OPTS='-KPIC'
5535                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5536                 else
5537                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5538                 fi
5539                 cf_cv_rm_so_locs=yes
5540                 ;;
5541         linux*|gnu*|k*bsd*-gnu) #(vi
5542                 if test "$DFT_LWR_MODEL" = "shared" ; then
5543                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5544                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5545                 fi
5546                 if test "$cf_cv_enable_rpath" = yes ; then
5547                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5548                 fi
5549
5550         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5551         if test "$cf_cv_shlib_version" = rel; then
5552                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5553         else
5554                 cf_cv_shared_soname='`basename $@`'
5555         fi
5556
5557                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5558                 ;;
5559         openbsd[2-9].*) #(vi
5560                 if test "$DFT_LWR_MODEL" = "shared" ; then
5561                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5562                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5563                 fi
5564                 if test "$cf_cv_enable_rpath" = yes ; then
5565                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5566                 fi
5567                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5568
5569         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5570         if test "$cf_cv_shlib_version" = rel; then
5571                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5572         else
5573                 cf_cv_shared_soname='`basename $@`'
5574         fi
5575
5576                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5577                 ;;
5578         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5579                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5580                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5581                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5582                 ;;
5583         freebsd*) #(vi
5584                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5585                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5586                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5587                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${libdir} $LOCAL_LDFLAGS"
5588                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5589                 fi
5590
5591         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5592         if test "$cf_cv_shlib_version" = rel; then
5593                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5594         else
5595                 cf_cv_shared_soname='`basename $@`'
5596         fi
5597
5598                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5599                 ;;
5600         netbsd*) #(vi
5601                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5602                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5603                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5604                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5605                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${libdir} $EXTRA_LDFLAGS"
5606                         if test "$cf_cv_shlib_version" = auto; then
5607                         if test -f /usr/libexec/ld.elf_so; then
5608                                 cf_cv_shlib_version=abi
5609                         else
5610                                 cf_cv_shlib_version=rel
5611                         fi
5612                         fi
5613
5614         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5615         if test "$cf_cv_shlib_version" = rel; then
5616                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5617         else
5618                 cf_cv_shared_soname='`basename $@`'
5619         fi
5620
5621                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5622                 else
5623                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5624                 fi
5625                 ;;
5626         osf*|mls+*) #(vi
5627                 # tested with OSF/1 V3.2 and 'cc'
5628                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5629                 # link with shared libs).
5630                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5631                 case $host_os in #(vi
5632                 osf4*)
5633                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5634                         ;;
5635                 esac
5636                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5637                 if test "$DFT_LWR_MODEL" = "shared" ; then
5638                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5639                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5640                 fi
5641                 cf_cv_rm_so_locs=yes
5642                 ;;
5643         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5644                 # tested with osr5.0.5
5645                 if test "$GCC" != yes; then
5646                         CC_SHARED_OPTS='-belf -KPIC'
5647                 fi
5648                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5649                 if test "$cf_cv_enable_rpath" = yes ; then
5650                         # only way is to set LD_RUN_PATH but no switch for it
5651                         RUN_PATH=$libdir
5652                 fi
5653                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5654                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5655                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5656                 ;;
5657         sunos4*) #(vi
5658                 # tested with SunOS 4.1.1 and gcc 2.7.0
5659                 if test "$GCC" != yes; then
5660                         CC_SHARED_OPTS='-KPIC'
5661                 fi
5662                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5663                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5664                 ;;
5665         solaris2*) #(vi
5666                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5667                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5668                 if test "$DFT_LWR_MODEL" = "shared" ; then
5669                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5670                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5671                 fi
5672                 if test "$cf_cv_enable_rpath" = yes ; then
5673                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5674                 fi
5675
5676         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5677         if test "$cf_cv_shlib_version" = rel; then
5678                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5679         else
5680                 cf_cv_shared_soname='`basename $@`'
5681         fi
5682
5683                 if test "$GCC" != yes; then
5684                         cf_save_CFLAGS="$CFLAGS"
5685                         for cf_shared_opts in -xcode=pic13 -xcode=pic32 -Kpic -KPIC -O
5686                         do
5687                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5688                                 cat >conftest.$ac_ext <<_ACEOF
5689 #line 5689 "configure"
5690 #include "confdefs.h"
5691 #include <stdio.h>
5692 int
5693 main ()
5694 {
5695 printf("Hello\n");
5696   ;
5697   return 0;
5698 }
5699 _ACEOF
5700 rm -f conftest.$ac_objext
5701 if { (eval echo "$as_me:5701: \"$ac_compile\"") >&5
5702   (eval $ac_compile) 2>&5
5703   ac_status=$?
5704   echo "$as_me:5704: \$? = $ac_status" >&5
5705   (exit $ac_status); } &&
5706          { ac_try='test -s conftest.$ac_objext'
5707   { (eval echo "$as_me:5707: \"$ac_try\"") >&5
5708   (eval $ac_try) 2>&5
5709   ac_status=$?
5710   echo "$as_me:5710: \$? = $ac_status" >&5
5711   (exit $ac_status); }; }; then
5712   break
5713 else
5714   echo "$as_me: failed program was:" >&5
5715 cat conftest.$ac_ext >&5
5716 fi
5717 rm -f conftest.$ac_objext conftest.$ac_ext
5718                         done
5719                         CFLAGS="$cf_save_CFLAGS"
5720                         CC_SHARED_OPTS=$cf_shared_opts
5721                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
5722                 else
5723                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
5724                 fi
5725                 ;;
5726         sysv5uw7*|unix_sv*) #(vi
5727                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
5728                 if test "$GCC" != yes; then
5729                         CC_SHARED_OPTS='-KPIC'
5730                 fi
5731                 MK_SHARED_LIB='${LD} -d y -G -o $@'
5732                 ;;
5733         *)
5734                 CC_SHARED_OPTS='unknown'
5735                 MK_SHARED_LIB='echo unknown'
5736                 ;;
5737         esac
5738
5739         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
5740         case "$cf_cv_shlib_version" in #(vi
5741         rel|abi)
5742                 case "$MK_SHARED_LIB" in #(vi
5743                 *'-o $@') #(vi
5744                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
5745                         ;;
5746                 *)
5747                         { echo "$as_me:5747: WARNING: ignored --with-shlib-version" >&5
5748 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
5749                         ;;
5750                 esac
5751                 ;;
5752         esac
5753
5754         if test -n "$cf_ld_rpath_opt" ; then
5755                 MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${libdir}"
5756         fi
5757
5758 if test "$CC_SHARED_OPTS" = "unknown"; then
5759         for model in $cf_list_models; do
5760                 if test "$model" = "shared"; then
5761                         { { echo "$as_me:5761: error: Shared libraries are not supported in this version" >&5
5762 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
5763    { (exit 1); exit 1; }; }
5764                 fi
5765         done
5766 fi
5767
5768 ###############################################################################
5769
5770 ###     use option --disable-overwrite to leave out the link to -lcurses
5771 echo "$as_me:5771: checking if you wish to install ncurses overwriting curses" >&5
5772 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
5773
5774 # Check whether --enable-overwrite or --disable-overwrite was given.
5775 if test "${enable_overwrite+set}" = set; then
5776   enableval="$enable_overwrite"
5777   with_overwrite=$enableval
5778 else
5779   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
5780 fi;
5781 echo "$as_me:5781: result: $with_overwrite" >&5
5782 echo "${ECHO_T}$with_overwrite" >&6
5783
5784 echo "$as_me:5784: checking if external terminfo-database is used" >&5
5785 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
5786
5787 # Check whether --enable-database or --disable-database was given.
5788 if test "${enable_database+set}" = set; then
5789   enableval="$enable_database"
5790   use_database=$enableval
5791 else
5792   use_database=yes
5793 fi;
5794 echo "$as_me:5794: result: $use_database" >&5
5795 echo "${ECHO_T}$use_database" >&6
5796
5797 case $host_os in #(vi
5798 os2*) #(vi
5799         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
5800         ;;
5801 *) #(vi
5802         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
5803         ;;
5804 esac
5805
5806         case $cf_cv_system_name in
5807         os2*)   PATH_SEPARATOR=';'  ;;
5808         *)      PATH_SEPARATOR=':'  ;;
5809         esac
5810
5811 if test "$use_database" != no ; then
5812         cat >>confdefs.h <<\EOF
5813 #define USE_DATABASE 1
5814 EOF
5815
5816         echo "$as_me:5816: checking which terminfo source-file will be installed" >&5
5817 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
5818
5819 # Check whether --with-database or --without-database was given.
5820 if test "${with_database+set}" = set; then
5821   withval="$with_database"
5822   TERMINFO_SRC=$withval
5823 fi;
5824         echo "$as_me:5824: result: $TERMINFO_SRC" >&5
5825 echo "${ECHO_T}$TERMINFO_SRC" >&6
5826
5827         echo "$as_me:5827: checking whether to use hashed database instead of directory/tree" >&5
5828 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
5829
5830 # Check whether --with-hashed-db or --without-hashed-db was given.
5831 if test "${with_hashed_db+set}" = set; then
5832   withval="$with_hashed_db"
5833
5834 else
5835   with_hashed_db=no
5836 fi;
5837         echo "$as_me:5837: result: $with_hashed_db" >&5
5838 echo "${ECHO_T}$with_hashed_db" >&6
5839 else
5840         with_hashed_db=no
5841 fi
5842
5843 echo "$as_me:5843: checking for list of fallback descriptions" >&5
5844 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
5845
5846 # Check whether --with-fallbacks or --without-fallbacks was given.
5847 if test "${with_fallbacks+set}" = set; then
5848   withval="$with_fallbacks"
5849   with_fallback=$withval
5850 else
5851   with_fallback=
5852 fi;
5853 echo "$as_me:5853: result: $with_fallback" >&5
5854 echo "${ECHO_T}$with_fallback" >&6
5855 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
5856
5857 echo "$as_me:5857: checking if you want modern xterm or antique" >&5
5858 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
5859
5860 # Check whether --with-xterm-new or --without-xterm-new was given.
5861 if test "${with_xterm_new+set}" = set; then
5862   withval="$with_xterm_new"
5863   with_xterm_new=$withval
5864 else
5865   with_xterm_new=yes
5866 fi;
5867 case $with_xterm_new in
5868 no)     with_xterm_new=xterm-old;;
5869 *)      with_xterm_new=xterm-new;;
5870 esac
5871 echo "$as_me:5871: result: $with_xterm_new" >&5
5872 echo "${ECHO_T}$with_xterm_new" >&6
5873 WHICH_XTERM=$with_xterm_new
5874
5875 MAKE_TERMINFO=
5876 if test "$use_database" = no ; then
5877         TERMINFO="${datadir}/terminfo"
5878         MAKE_TERMINFO="#"
5879 else
5880
5881 echo "$as_me:5881: checking for list of terminfo directories" >&5
5882 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
5883
5884 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
5885 if test "${with_terminfo_dirs+set}" = set; then
5886   withval="$with_terminfo_dirs"
5887
5888 else
5889   withval=${TERMINFO_DIRS-${datadir}/terminfo}
5890 fi;
5891 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
5892 cf_dst_path=
5893 for cf_src_path in $withval
5894 do
5895
5896 if test "x$prefix" != xNONE; then
5897   cf_path_syntax="$prefix"
5898 else
5899   cf_path_syntax="$ac_default_prefix"
5900 fi
5901
5902 case ".$cf_src_path" in #(vi
5903 .\$\(*\)*|.\'*\'*) #(vi
5904   ;;
5905 ..|./*|.\\*) #(vi
5906   ;;
5907 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5908   ;;
5909 .\${*prefix}*) #(vi
5910   eval cf_src_path="$cf_src_path"
5911   case ".$cf_src_path" in #(vi
5912   .NONE/*)
5913     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5914     ;;
5915   esac
5916   ;; #(vi
5917 .no|.NONE/*)
5918   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
5919   ;;
5920 *)
5921   { { echo "$as_me:5921: error: expected a pathname, not \"$cf_src_path\"" >&5
5922 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
5923    { (exit 1); exit 1; }; }
5924   ;;
5925 esac
5926
5927   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
5928   cf_dst_path="${cf_dst_path}${cf_src_path}"
5929 done
5930 IFS="$ac_save_ifs"
5931
5932 eval 'TERMINFO_DIRS="$cf_dst_path"'
5933
5934 echo "$as_me:5934: result: $TERMINFO_DIRS" >&5
5935 echo "${ECHO_T}$TERMINFO_DIRS" >&6
5936 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
5937 #define TERMINFO_DIRS "$TERMINFO_DIRS"
5938 EOF
5939
5940 echo "$as_me:5940: checking for default terminfo directory" >&5
5941 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
5942
5943 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
5944 if test "${with_default_terminfo_dir+set}" = set; then
5945   withval="$with_default_terminfo_dir"
5946
5947 else
5948   withval="${TERMINFO-${datadir}/terminfo}"
5949 fi; if test -n "${datadir}/terminfo" ; then
5950
5951 if test "x$prefix" != xNONE; then
5952   cf_path_syntax="$prefix"
5953 else
5954   cf_path_syntax="$ac_default_prefix"
5955 fi
5956
5957 case ".$withval" in #(vi
5958 .\$\(*\)*|.\'*\'*) #(vi
5959   ;;
5960 ..|./*|.\\*) #(vi
5961   ;;
5962 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
5963   ;;
5964 .\${*prefix}*) #(vi
5965   eval withval="$withval"
5966   case ".$withval" in #(vi
5967   .NONE/*)
5968     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5969     ;;
5970   esac
5971   ;; #(vi
5972 .no|.NONE/*)
5973   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
5974   ;;
5975 *)
5976   { { echo "$as_me:5976: error: expected a pathname, not \"$withval\"" >&5
5977 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
5978    { (exit 1); exit 1; }; }
5979   ;;
5980 esac
5981
5982 fi
5983 TERMINFO="$withval"
5984
5985 echo "$as_me:5985: result: $TERMINFO" >&5
5986 echo "${ECHO_T}$TERMINFO" >&6
5987 cat >>confdefs.h <<EOF
5988 #define TERMINFO "$TERMINFO"
5989 EOF
5990
5991 fi
5992
5993 ###     use option --disable-big-core to make tic run on small machines
5994 ###     We need 4Mb, check if we can allocate 50% more than that.
5995 echo "$as_me:5995: checking if big-core option selected" >&5
5996 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
5997
5998 # Check whether --enable-big-core or --disable-big-core was given.
5999 if test "${enable_big_core+set}" = set; then
6000   enableval="$enable_big_core"
6001   with_big_core=$enableval
6002 else
6003   if test "$cross_compiling" = yes; then
6004   with_big_core=no
6005 else
6006   cat >conftest.$ac_ext <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009
6010 #include <stdlib.h>
6011 #include <string.h>
6012 int main() {
6013         unsigned long n = 6000000L;
6014         char *s = malloc(n);
6015         if (s != 0)
6016                 s[0] = s[n-1] = 0;
6017         ${cf_cv_main_return:-return}(s == 0);
6018 }
6019 _ACEOF
6020 rm -f conftest$ac_exeext
6021 if { (eval echo "$as_me:6021: \"$ac_link\"") >&5
6022   (eval $ac_link) 2>&5
6023   ac_status=$?
6024   echo "$as_me:6024: \$? = $ac_status" >&5
6025   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6026   { (eval echo "$as_me:6026: \"$ac_try\"") >&5
6027   (eval $ac_try) 2>&5
6028   ac_status=$?
6029   echo "$as_me:6029: \$? = $ac_status" >&5
6030   (exit $ac_status); }; }; then
6031   with_big_core=yes
6032 else
6033   echo "$as_me: program exited with status $ac_status" >&5
6034 echo "$as_me: failed program was:" >&5
6035 cat conftest.$ac_ext >&5
6036 with_big_core=no
6037 fi
6038 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6039 fi
6040 fi;
6041 echo "$as_me:6041: result: $with_big_core" >&5
6042 echo "${ECHO_T}$with_big_core" >&6
6043 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6044 #define HAVE_BIG_CORE 1
6045 EOF
6046
6047 ### ISO C only guarantees 512-char strings, we have tables which load faster
6048 ### when constructed using "big" strings.  More than the C compiler, the awk
6049 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6050 echo "$as_me:6050: checking if big-strings option selected" >&5
6051 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6052
6053 # Check whether --enable-big-strings or --disable-big-strings was given.
6054 if test "${enable_big_strings+set}" = set; then
6055   enableval="$enable_big_strings"
6056   with_big_strings=$enableval
6057 else
6058
6059         case x$AWK in #(vi
6060         x)
6061                 eval with_big_strings=no
6062                 ;;
6063         *) #(vi
6064                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6065                         | $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
6066                         eval with_big_strings=yes
6067                 else
6068                         eval with_big_strings=no
6069                 fi
6070                 ;;
6071         esac
6072
6073 fi;
6074 echo "$as_me:6074: result: $with_big_strings" >&5
6075 echo "${ECHO_T}$with_big_strings" >&6
6076
6077 USE_BIG_STRINGS=0
6078 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6079
6080 ###     use option --enable-termcap to compile in the termcap fallback support
6081 echo "$as_me:6081: checking if you want termcap-fallback support" >&5
6082 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6083
6084 # Check whether --enable-termcap or --disable-termcap was given.
6085 if test "${enable_termcap+set}" = set; then
6086   enableval="$enable_termcap"
6087   with_termcap=$enableval
6088 else
6089   with_termcap=no
6090 fi;
6091 echo "$as_me:6091: result: $with_termcap" >&5
6092 echo "${ECHO_T}$with_termcap" >&6
6093
6094 if test "$with_termcap" != "yes" ; then
6095         if test "$use_database" = no ; then
6096                 if test -z "$with_fallback" ; then
6097                         { { echo "$as_me:6097: error: You have disabled the database w/o specifying fallbacks" >&5
6098 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6099    { (exit 1); exit 1; }; }
6100                 fi
6101         fi
6102         cat >>confdefs.h <<\EOF
6103 #define PURE_TERMINFO 1
6104 EOF
6105
6106 else
6107
6108 if test "$with_ticlib" != no ; then
6109         { { echo "$as_me:6109: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6110 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6111    { (exit 1); exit 1; }; }
6112 fi
6113
6114 cat >>confdefs.h <<\EOF
6115 #define USE_TERMCAP 1
6116 EOF
6117
6118 echo "$as_me:6118: checking for list of termcap files" >&5
6119 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6120
6121 # Check whether --with-termpath or --without-termpath was given.
6122 if test "${with_termpath+set}" = set; then
6123   withval="$with_termpath"
6124
6125 else
6126   withval=${TERMPATH-/etc/termcap:/usr/share/misc/termcap}
6127 fi;
6128 IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6129 cf_dst_path=
6130 for cf_src_path in $withval
6131 do
6132
6133 if test "x$prefix" != xNONE; then
6134   cf_path_syntax="$prefix"
6135 else
6136   cf_path_syntax="$ac_default_prefix"
6137 fi
6138
6139 case ".$cf_src_path" in #(vi
6140 .\$\(*\)*|.\'*\'*) #(vi
6141   ;;
6142 ..|./*|.\\*) #(vi
6143   ;;
6144 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6145   ;;
6146 .\${*prefix}*) #(vi
6147   eval cf_src_path="$cf_src_path"
6148   case ".$cf_src_path" in #(vi
6149   .NONE/*)
6150     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6151     ;;
6152   esac
6153   ;; #(vi
6154 .no|.NONE/*)
6155   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6156   ;;
6157 *)
6158   { { echo "$as_me:6158: error: expected a pathname, not \"$cf_src_path\"" >&5
6159 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6160    { (exit 1); exit 1; }; }
6161   ;;
6162 esac
6163
6164   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6165   cf_dst_path="${cf_dst_path}${cf_src_path}"
6166 done
6167 IFS="$ac_save_ifs"
6168
6169 eval 'TERMPATH="$cf_dst_path"'
6170
6171 echo "$as_me:6171: result: $TERMPATH" >&5
6172 echo "${ECHO_T}$TERMPATH" >&6
6173 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6174 #define TERMPATH "$TERMPATH"
6175 EOF
6176
6177 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6178 echo "$as_me:6178: checking if fast termcap-loader is needed" >&5
6179 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6180
6181 # Check whether --enable-getcap or --disable-getcap was given.
6182 if test "${enable_getcap+set}" = set; then
6183   enableval="$enable_getcap"
6184   with_getcap=$enableval
6185 else
6186   with_getcap=no
6187 fi;
6188 echo "$as_me:6188: result: $with_getcap" >&5
6189 echo "${ECHO_T}$with_getcap" >&6
6190 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6191 #define USE_GETCAP 1
6192 EOF
6193
6194 echo "$as_me:6194: checking if translated termcaps will be cached in ~/.terminfo" >&5
6195 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6196
6197 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6198 if test "${enable_getcap_cache+set}" = set; then
6199   enableval="$enable_getcap_cache"
6200   with_getcap_cache=$enableval
6201 else
6202   with_getcap_cache=no
6203 fi;
6204 echo "$as_me:6204: result: $with_getcap_cache" >&5
6205 echo "${ECHO_T}$with_getcap_cache" >&6
6206 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6207 #define USE_GETCAP_CACHE 1
6208 EOF
6209
6210 fi
6211
6212 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6213 echo "$as_me:6213: checking if ~/.terminfo is wanted" >&5
6214 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6215
6216 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6217 if test "${enable_home_terminfo+set}" = set; then
6218   enableval="$enable_home_terminfo"
6219   with_home_terminfo=$enableval
6220 else
6221   with_home_terminfo=yes
6222 fi;
6223 echo "$as_me:6223: result: $with_home_terminfo" >&5
6224 echo "${ECHO_T}$with_home_terminfo" >&6
6225 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6226 #define USE_HOME_TERMINFO 1
6227 EOF
6228
6229 echo "$as_me:6229: checking if you want to use restricted environment when running as root" >&5
6230 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6231
6232 # Check whether --enable-root-environ or --disable-root-environ was given.
6233 if test "${enable_root_environ+set}" = set; then
6234   enableval="$enable_root_environ"
6235   with_root_environ=$enableval
6236 else
6237   with_root_environ=yes
6238 fi;
6239 echo "$as_me:6239: result: $with_root_environ" >&5
6240 echo "${ECHO_T}$with_root_environ" >&6
6241 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6242 #define USE_ROOT_ENVIRON 1
6243 EOF
6244
6245 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6246 ###   to reduce storage requirements for the terminfo database.
6247
6248 for ac_func in \
6249         remove \
6250         unlink
6251 do
6252 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6253 echo "$as_me:6253: checking for $ac_func" >&5
6254 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6255 if eval "test \"\${$as_ac_var+set}\" = set"; then
6256   echo $ECHO_N "(cached) $ECHO_C" >&6
6257 else
6258   cat >conftest.$ac_ext <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6261 /* System header to define __stub macros and hopefully few prototypes,
6262     which can conflict with char $ac_func (); below.  */
6263 #include <assert.h>
6264 /* Override any gcc2 internal prototype to avoid an error.  */
6265 #ifdef __cplusplus
6266 extern "C"
6267 #endif
6268 /* We use char because int might match the return type of a gcc2
6269    builtin and then its argument prototype would still apply.  */
6270 char $ac_func ();
6271 char (*f) ();
6272
6273 int
6274 main ()
6275 {
6276 /* The GNU C library defines this for functions which it implements
6277     to always fail with ENOSYS.  Some functions are actually named
6278     something starting with __ and the normal name is an alias.  */
6279 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6280 choke me
6281 #else
6282 f = $ac_func;
6283 #endif
6284
6285   ;
6286   return 0;
6287 }
6288 _ACEOF
6289 rm -f conftest.$ac_objext conftest$ac_exeext
6290 if { (eval echo "$as_me:6290: \"$ac_link\"") >&5
6291   (eval $ac_link) 2>&5
6292   ac_status=$?
6293   echo "$as_me:6293: \$? = $ac_status" >&5
6294   (exit $ac_status); } &&
6295          { ac_try='test -s conftest$ac_exeext'
6296   { (eval echo "$as_me:6296: \"$ac_try\"") >&5
6297   (eval $ac_try) 2>&5
6298   ac_status=$?
6299   echo "$as_me:6299: \$? = $ac_status" >&5
6300   (exit $ac_status); }; }; then
6301   eval "$as_ac_var=yes"
6302 else
6303   echo "$as_me: failed program was:" >&5
6304 cat conftest.$ac_ext >&5
6305 eval "$as_ac_var=no"
6306 fi
6307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6308 fi
6309 echo "$as_me:6309: result: `eval echo '${'$as_ac_var'}'`" >&5
6310 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6311 if test `eval echo '${'$as_ac_var'}'` = yes; then
6312   cat >>confdefs.h <<EOF
6313 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6314 EOF
6315
6316 fi
6317 done
6318
6319 if test "$cross_compiling" = yes ; then
6320
6321 for ac_func in \
6322                 link \
6323                 symlink
6324 do
6325 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6326 echo "$as_me:6326: checking for $ac_func" >&5
6327 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6328 if eval "test \"\${$as_ac_var+set}\" = set"; then
6329   echo $ECHO_N "(cached) $ECHO_C" >&6
6330 else
6331   cat >conftest.$ac_ext <<_ACEOF
6332 #line 6332 "configure"
6333 #include "confdefs.h"
6334 /* System header to define __stub macros and hopefully few prototypes,
6335     which can conflict with char $ac_func (); below.  */
6336 #include <assert.h>
6337 /* Override any gcc2 internal prototype to avoid an error.  */
6338 #ifdef __cplusplus
6339 extern "C"
6340 #endif
6341 /* We use char because int might match the return type of a gcc2
6342    builtin and then its argument prototype would still apply.  */
6343 char $ac_func ();
6344 char (*f) ();
6345
6346 int
6347 main ()
6348 {
6349 /* The GNU C library defines this for functions which it implements
6350     to always fail with ENOSYS.  Some functions are actually named
6351     something starting with __ and the normal name is an alias.  */
6352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6353 choke me
6354 #else
6355 f = $ac_func;
6356 #endif
6357
6358   ;
6359   return 0;
6360 }
6361 _ACEOF
6362 rm -f conftest.$ac_objext conftest$ac_exeext
6363 if { (eval echo "$as_me:6363: \"$ac_link\"") >&5
6364   (eval $ac_link) 2>&5
6365   ac_status=$?
6366   echo "$as_me:6366: \$? = $ac_status" >&5
6367   (exit $ac_status); } &&
6368          { ac_try='test -s conftest$ac_exeext'
6369   { (eval echo "$as_me:6369: \"$ac_try\"") >&5
6370   (eval $ac_try) 2>&5
6371   ac_status=$?
6372   echo "$as_me:6372: \$? = $ac_status" >&5
6373   (exit $ac_status); }; }; then
6374   eval "$as_ac_var=yes"
6375 else
6376   echo "$as_me: failed program was:" >&5
6377 cat conftest.$ac_ext >&5
6378 eval "$as_ac_var=no"
6379 fi
6380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6381 fi
6382 echo "$as_me:6382: result: `eval echo '${'$as_ac_var'}'`" >&5
6383 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6384 if test `eval echo '${'$as_ac_var'}'` = yes; then
6385   cat >>confdefs.h <<EOF
6386 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6387 EOF
6388
6389 fi
6390 done
6391
6392 else
6393         echo "$as_me:6393: checking if link/symlink functions work" >&5
6394 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6395 if test "${cf_cv_link_funcs+set}" = set; then
6396   echo $ECHO_N "(cached) $ECHO_C" >&6
6397 else
6398
6399                 cf_cv_link_funcs=
6400                 for cf_func in link symlink ; do
6401                         if test "$cross_compiling" = yes; then
6402
6403                         eval 'ac_cv_func_'$cf_func'=error'
6404 else
6405   cat >conftest.$ac_ext <<_ACEOF
6406 #line 6406 "configure"
6407 #include "confdefs.h"
6408
6409 #include <sys/types.h>
6410 #include <sys/stat.h>
6411 #ifdef HAVE_UNISTD_H
6412 #include <unistd.h>
6413 #endif
6414 int main()
6415 {
6416         int fail = 0;
6417         char *src = "config.log";
6418         char *dst = "conftest.chk";
6419         struct stat src_sb;
6420         struct stat dst_sb;
6421
6422         stat(src, &src_sb);
6423         fail = ($cf_func("config.log", "conftest.chk") < 0)
6424             || (stat(dst, &dst_sb) < 0)
6425             || (dst_sb.st_mtime != src_sb.st_mtime);
6426 #ifdef HAVE_UNLINK
6427         unlink(dst);
6428 #else
6429         remove(dst);
6430 #endif
6431         ${cf_cv_main_return:-return} (fail);
6432 }
6433
6434 _ACEOF
6435 rm -f conftest$ac_exeext
6436 if { (eval echo "$as_me:6436: \"$ac_link\"") >&5
6437   (eval $ac_link) 2>&5
6438   ac_status=$?
6439   echo "$as_me:6439: \$? = $ac_status" >&5
6440   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6441   { (eval echo "$as_me:6441: \"$ac_try\"") >&5
6442   (eval $ac_try) 2>&5
6443   ac_status=$?
6444   echo "$as_me:6444: \$? = $ac_status" >&5
6445   (exit $ac_status); }; }; then
6446
6447                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6448                         eval 'ac_cv_func_'$cf_func'=yes'
6449 else
6450   echo "$as_me: program exited with status $ac_status" >&5
6451 echo "$as_me: failed program was:" >&5
6452 cat conftest.$ac_ext >&5
6453
6454                         eval 'ac_cv_func_'$cf_func'=no'
6455 fi
6456 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6457 fi
6458                 done
6459                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6460
6461 fi
6462 echo "$as_me:6462: result: $cf_cv_link_funcs" >&5
6463 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6464         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6465 #define HAVE_LINK 1
6466 EOF
6467
6468         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6469 #define HAVE_SYMLINK 1
6470 EOF
6471
6472 fi
6473
6474 with_links=no
6475 with_symlinks=no
6476
6477 # soft links (symbolic links) are useful for some systems where hard links do
6478 # not work, or to make it simpler to copy terminfo trees around.
6479 if test "$ac_cv_func_symlink" = yes ; then
6480     echo "$as_me:6480: checking if tic should use symbolic links" >&5
6481 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
6482
6483 # Check whether --enable-symlinks or --disable-symlinks was given.
6484 if test "${enable_symlinks+set}" = set; then
6485   enableval="$enable_symlinks"
6486   with_symlinks=$enableval
6487 else
6488   with_symlinks=no
6489 fi;
6490     echo "$as_me:6490: result: $with_symlinks" >&5
6491 echo "${ECHO_T}$with_symlinks" >&6
6492 fi
6493
6494 # If we have hard links and did not choose to use soft links instead, there is
6495 # no reason to make this choice optional - use the hard links.
6496 if test "$with_symlinks" = no ; then
6497     echo "$as_me:6497: checking if tic should use hard links" >&5
6498 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
6499     if test "$ac_cv_func_link" = yes ; then
6500         with_links=yes
6501     else
6502         with_links=no
6503     fi
6504     echo "$as_me:6504: result: $with_links" >&5
6505 echo "${ECHO_T}$with_links" >&6
6506 fi
6507
6508 test "$with_links" = yes && cat >>confdefs.h <<\EOF
6509 #define USE_LINKS 1
6510 EOF
6511
6512 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
6513 #define USE_SYMLINKS 1
6514 EOF
6515
6516 ###   use option --enable-broken-linker to force on use of broken-linker support
6517 echo "$as_me:6517: checking if you want broken-linker support code" >&5
6518 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
6519
6520 # Check whether --enable-broken_linker or --disable-broken_linker was given.
6521 if test "${enable_broken_linker+set}" = set; then
6522   enableval="$enable_broken_linker"
6523   with_broken_linker=$enableval
6524 else
6525   with_broken_linker=${BROKEN_LINKER-no}
6526 fi;
6527 echo "$as_me:6527: result: $with_broken_linker" >&5
6528 echo "${ECHO_T}$with_broken_linker" >&6
6529
6530 BROKEN_LINKER=0
6531 if test "$with_broken_linker" = yes ; then
6532         cat >>confdefs.h <<\EOF
6533 #define BROKEN_LINKER 1
6534 EOF
6535
6536         BROKEN_LINKER=1
6537 elif test "$DFT_LWR_MODEL" = shared ; then
6538         case $cf_cv_system_name in #(vi
6539         cygwin*)
6540                 cat >>confdefs.h <<\EOF
6541 #define BROKEN_LINKER 1
6542 EOF
6543
6544                 BROKEN_LINKER=1
6545                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
6546
6547 echo "${as_me-configure}:6547: testing cygwin linker is broken anyway ..." 1>&5
6548
6549                 ;;
6550         esac
6551 fi
6552
6553 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
6554 echo "$as_me:6554: checking if tputs should process BSD-style prefix padding" >&5
6555 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
6556
6557 # Check whether --enable-bsdpad or --disable-bsdpad was given.
6558 if test "${enable_bsdpad+set}" = set; then
6559   enableval="$enable_bsdpad"
6560   with_bsdpad=$enableval
6561 else
6562   with_bsdpad=no
6563 fi;
6564 echo "$as_me:6564: result: $with_bsdpad" >&5
6565 echo "${ECHO_T}$with_bsdpad" >&6
6566 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
6567 #define BSD_TPUTS 1
6568 EOF
6569
6570 ###   use option --enable-widec to turn on use of wide-character support
6571 NCURSES_CH_T=chtype
6572 NCURSES_LIBUTF8=0
6573
6574 NEED_WCHAR_H=0
6575 NCURSES_MBSTATE_T=0
6576 NCURSES_WCHAR_T=0
6577 NCURSES_WINT_T=0
6578
6579 # Check to define _XOPEN_SOURCE "automatically"
6580
6581 cf_XOPEN_SOURCE=500
6582 cf_POSIX_C_SOURCE=199506L
6583 cf_xopen_source=
6584
6585 case $host_os in #(vi
6586 aix[456]*) #(vi
6587         cf_xopen_source="-D_ALL_SOURCE"
6588         ;;
6589 darwin[0-8].*) #(vi
6590         cf_xopen_source="-D_APPLE_C_SOURCE"
6591         ;;
6592 darwin*) #(vi
6593         cf_xopen_source="-D_DARWIN_C_SOURCE"
6594         ;;
6595 freebsd*|dragonfly*) #(vi
6596         # 5.x headers associate
6597         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
6598         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
6599         cf_POSIX_C_SOURCE=200112L
6600         cf_XOPEN_SOURCE=600
6601         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6602         ;;
6603 hpux11*) #(vi
6604         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
6605         ;;
6606 hpux*) #(vi
6607         cf_xopen_source="-D_HPUX_SOURCE"
6608         ;;
6609 irix[56].*) #(vi
6610         cf_xopen_source="-D_SGI_SOURCE"
6611         ;;
6612 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
6613
6614 echo "$as_me:6614: checking if we must define _GNU_SOURCE" >&5
6615 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
6616 if test "${cf_cv_gnu_source+set}" = set; then
6617   echo $ECHO_N "(cached) $ECHO_C" >&6
6618 else
6619
6620 cat >conftest.$ac_ext <<_ACEOF
6621 #line 6621 "configure"
6622 #include "confdefs.h"
6623 #include <sys/types.h>
6624 int
6625 main ()
6626 {
6627
6628 #ifndef _XOPEN_SOURCE
6629 make an error
6630 #endif
6631   ;
6632   return 0;
6633 }
6634 _ACEOF
6635 rm -f conftest.$ac_objext
6636 if { (eval echo "$as_me:6636: \"$ac_compile\"") >&5
6637   (eval $ac_compile) 2>&5
6638   ac_status=$?
6639   echo "$as_me:6639: \$? = $ac_status" >&5
6640   (exit $ac_status); } &&
6641          { ac_try='test -s conftest.$ac_objext'
6642   { (eval echo "$as_me:6642: \"$ac_try\"") >&5
6643   (eval $ac_try) 2>&5
6644   ac_status=$?
6645   echo "$as_me:6645: \$? = $ac_status" >&5
6646   (exit $ac_status); }; }; then
6647   cf_cv_gnu_source=no
6648 else
6649   echo "$as_me: failed program was:" >&5
6650 cat conftest.$ac_ext >&5
6651 cf_save="$CPPFLAGS"
6652          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6653          cat >conftest.$ac_ext <<_ACEOF
6654 #line 6654 "configure"
6655 #include "confdefs.h"
6656 #include <sys/types.h>
6657 int
6658 main ()
6659 {
6660
6661 #ifdef _XOPEN_SOURCE
6662 make an error
6663 #endif
6664   ;
6665   return 0;
6666 }
6667 _ACEOF
6668 rm -f conftest.$ac_objext
6669 if { (eval echo "$as_me:6669: \"$ac_compile\"") >&5
6670   (eval $ac_compile) 2>&5
6671   ac_status=$?
6672   echo "$as_me:6672: \$? = $ac_status" >&5
6673   (exit $ac_status); } &&
6674          { ac_try='test -s conftest.$ac_objext'
6675   { (eval echo "$as_me:6675: \"$ac_try\"") >&5
6676   (eval $ac_try) 2>&5
6677   ac_status=$?
6678   echo "$as_me:6678: \$? = $ac_status" >&5
6679   (exit $ac_status); }; }; then
6680   cf_cv_gnu_source=no
6681 else
6682   echo "$as_me: failed program was:" >&5
6683 cat conftest.$ac_ext >&5
6684 cf_cv_gnu_source=yes
6685 fi
6686 rm -f conftest.$ac_objext conftest.$ac_ext
6687         CPPFLAGS="$cf_save"
6688
6689 fi
6690 rm -f conftest.$ac_objext conftest.$ac_ext
6691
6692 fi
6693 echo "$as_me:6693: result: $cf_cv_gnu_source" >&5
6694 echo "${ECHO_T}$cf_cv_gnu_source" >&6
6695 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
6696
6697         ;;
6698 mirbsd*) #(vi
6699         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
6700         ;;
6701 netbsd*) #(vi
6702         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
6703         ;;
6704 openbsd*) #(vi
6705         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
6706         ;;
6707 osf[45]*) #(vi
6708         cf_xopen_source="-D_OSF_SOURCE"
6709         ;;
6710 nto-qnx*) #(vi
6711         cf_xopen_source="-D_QNX_SOURCE"
6712         ;;
6713 sco*) #(vi
6714         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
6715         ;;
6716 solaris2.1[0-9]) #(vi
6717         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6718         ;;
6719 solaris2.[1-9]) #(vi
6720         cf_xopen_source="-D__EXTENSIONS__"
6721         ;;
6722 *)
6723         echo "$as_me:6723: checking if we should define _XOPEN_SOURCE" >&5
6724 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
6725 if test "${cf_cv_xopen_source+set}" = set; then
6726   echo $ECHO_N "(cached) $ECHO_C" >&6
6727 else
6728
6729         cat >conftest.$ac_ext <<_ACEOF
6730 #line 6730 "configure"
6731 #include "confdefs.h"
6732 #include <sys/types.h>
6733 int
6734 main ()
6735 {
6736
6737 #ifndef _XOPEN_SOURCE
6738 make an error
6739 #endif
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 rm -f conftest.$ac_objext
6745 if { (eval echo "$as_me:6745: \"$ac_compile\"") >&5
6746   (eval $ac_compile) 2>&5
6747   ac_status=$?
6748   echo "$as_me:6748: \$? = $ac_status" >&5
6749   (exit $ac_status); } &&
6750          { ac_try='test -s conftest.$ac_objext'
6751   { (eval echo "$as_me:6751: \"$ac_try\"") >&5
6752   (eval $ac_try) 2>&5
6753   ac_status=$?
6754   echo "$as_me:6754: \$? = $ac_status" >&5
6755   (exit $ac_status); }; }; then
6756   cf_cv_xopen_source=no
6757 else
6758   echo "$as_me: failed program was:" >&5
6759 cat conftest.$ac_ext >&5
6760 cf_save="$CPPFLAGS"
6761          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
6762          cat >conftest.$ac_ext <<_ACEOF
6763 #line 6763 "configure"
6764 #include "confdefs.h"
6765 #include <sys/types.h>
6766 int
6767 main ()
6768 {
6769
6770 #ifdef _XOPEN_SOURCE
6771 make an error
6772 #endif
6773   ;
6774   return 0;
6775 }
6776 _ACEOF
6777 rm -f conftest.$ac_objext
6778 if { (eval echo "$as_me:6778: \"$ac_compile\"") >&5
6779   (eval $ac_compile) 2>&5
6780   ac_status=$?
6781   echo "$as_me:6781: \$? = $ac_status" >&5
6782   (exit $ac_status); } &&
6783          { ac_try='test -s conftest.$ac_objext'
6784   { (eval echo "$as_me:6784: \"$ac_try\"") >&5
6785   (eval $ac_try) 2>&5
6786   ac_status=$?
6787   echo "$as_me:6787: \$? = $ac_status" >&5
6788   (exit $ac_status); }; }; then
6789   cf_cv_xopen_source=no
6790 else
6791   echo "$as_me: failed program was:" >&5
6792 cat conftest.$ac_ext >&5
6793 cf_cv_xopen_source=$cf_XOPEN_SOURCE
6794 fi
6795 rm -f conftest.$ac_objext conftest.$ac_ext
6796         CPPFLAGS="$cf_save"
6797
6798 fi
6799 rm -f conftest.$ac_objext conftest.$ac_ext
6800
6801 fi
6802 echo "$as_me:6802: result: $cf_cv_xopen_source" >&5
6803 echo "${ECHO_T}$cf_cv_xopen_source" >&6
6804         if test "$cf_cv_xopen_source" != no ; then
6805
6806 CFLAGS=`echo "$CFLAGS" | \
6807         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6808                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6809
6810 CPPFLAGS=`echo "$CPPFLAGS" | \
6811         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
6812                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
6813
6814                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
6815
6816 cf_fix_cppflags=no
6817 cf_new_cflags=
6818 cf_new_cppflags=
6819 cf_new_extra_cppflags=
6820
6821 for cf_add_cflags in $cf_temp_xopen_source
6822 do
6823 case $cf_fix_cppflags in
6824 no)
6825         case $cf_add_cflags in #(vi
6826         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
6827                 case $cf_add_cflags in
6828                 -D*)
6829                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6830
6831                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6832                                 && test -z "${cf_tst_cflags}" \
6833                                 && cf_fix_cppflags=yes
6834
6835                         if test $cf_fix_cppflags = yes ; then
6836                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6837                                 continue
6838                         elif test "${cf_tst_cflags}" = "\"'" ; then
6839                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6840                                 continue
6841                         fi
6842                         ;;
6843                 esac
6844                 case "$CPPFLAGS" in
6845                 *$cf_add_cflags) #(vi
6846                         ;;
6847                 *) #(vi
6848                         case $cf_add_cflags in #(vi
6849                         -D*)
6850                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6851
6852 CPPFLAGS=`echo "$CPPFLAGS" | \
6853         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
6854                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
6855
6856                                 ;;
6857                         esac
6858                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
6859                         ;;
6860                 esac
6861                 ;;
6862         *)
6863                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
6864                 ;;
6865         esac
6866         ;;
6867 yes)
6868         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
6869
6870         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
6871
6872         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
6873                 && test -z "${cf_tst_cflags}" \
6874                 && cf_fix_cppflags=no
6875         ;;
6876 esac
6877 done
6878
6879 if test -n "$cf_new_cflags" ; then
6880
6881         CFLAGS="$CFLAGS $cf_new_cflags"
6882 fi
6883
6884 if test -n "$cf_new_cppflags" ; then
6885
6886         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
6887 fi
6888
6889 if test -n "$cf_new_extra_cppflags" ; then
6890
6891         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
6892 fi
6893
6894         fi
6895
6896 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
6897
6898 cf_save_CFLAGS="$CFLAGS"
6899 cf_save_CPPFLAGS="$CPPFLAGS"
6900
6901 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
6902         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6903                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6904
6905 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
6906         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
6907                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
6908
6909 echo "$as_me:6909: checking if we should define _POSIX_C_SOURCE" >&5
6910 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
6911 if test "${cf_cv_posix_c_source+set}" = set; then
6912   echo $ECHO_N "(cached) $ECHO_C" >&6
6913 else
6914
6915 echo "${as_me-configure}:6915: testing if the symbol is already defined go no further ..." 1>&5
6916
6917         cat >conftest.$ac_ext <<_ACEOF
6918 #line 6918 "configure"
6919 #include "confdefs.h"
6920 #include <sys/types.h>
6921 int
6922 main ()
6923 {
6924
6925 #ifndef _POSIX_C_SOURCE
6926 make an error
6927 #endif
6928   ;
6929   return 0;
6930 }
6931 _ACEOF
6932 rm -f conftest.$ac_objext
6933 if { (eval echo "$as_me:6933: \"$ac_compile\"") >&5
6934   (eval $ac_compile) 2>&5
6935   ac_status=$?
6936   echo "$as_me:6936: \$? = $ac_status" >&5
6937   (exit $ac_status); } &&
6938          { ac_try='test -s conftest.$ac_objext'
6939   { (eval echo "$as_me:6939: \"$ac_try\"") >&5
6940   (eval $ac_try) 2>&5
6941   ac_status=$?
6942   echo "$as_me:6942: \$? = $ac_status" >&5
6943   (exit $ac_status); }; }; then
6944   cf_cv_posix_c_source=no
6945 else
6946   echo "$as_me: failed program was:" >&5
6947 cat conftest.$ac_ext >&5
6948 cf_want_posix_source=no
6949          case .$cf_POSIX_C_SOURCE in #(vi
6950          .[12]??*) #(vi
6951                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6952                 ;;
6953          .2) #(vi
6954                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
6955                 cf_want_posix_source=yes
6956                 ;;
6957          .*)
6958                 cf_want_posix_source=yes
6959                 ;;
6960          esac
6961          if test "$cf_want_posix_source" = yes ; then
6962                 cat >conftest.$ac_ext <<_ACEOF
6963 #line 6963 "configure"
6964 #include "confdefs.h"
6965 #include <sys/types.h>
6966 int
6967 main ()
6968 {
6969
6970 #ifdef _POSIX_SOURCE
6971 make an error
6972 #endif
6973   ;
6974   return 0;
6975 }
6976 _ACEOF
6977 rm -f conftest.$ac_objext
6978 if { (eval echo "$as_me:6978: \"$ac_compile\"") >&5
6979   (eval $ac_compile) 2>&5
6980   ac_status=$?
6981   echo "$as_me:6981: \$? = $ac_status" >&5
6982   (exit $ac_status); } &&
6983          { ac_try='test -s conftest.$ac_objext'
6984   { (eval echo "$as_me:6984: \"$ac_try\"") >&5
6985   (eval $ac_try) 2>&5
6986   ac_status=$?
6987   echo "$as_me:6987: \$? = $ac_status" >&5
6988   (exit $ac_status); }; }; then
6989   :
6990 else
6991   echo "$as_me: failed program was:" >&5
6992 cat conftest.$ac_ext >&5
6993 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
6994 fi
6995 rm -f conftest.$ac_objext conftest.$ac_ext
6996          fi
6997
6998 echo "${as_me-configure}:6998: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
6999
7000          CFLAGS="$cf_trim_CFLAGS"
7001          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7002
7003 echo "${as_me-configure}:7003: testing if the second compile does not leave our definition intact error ..." 1>&5
7004
7005          cat >conftest.$ac_ext <<_ACEOF
7006 #line 7006 "configure"
7007 #include "confdefs.h"
7008 #include <sys/types.h>
7009 int
7010 main ()
7011 {
7012
7013 #ifndef _POSIX_C_SOURCE
7014 make an error
7015 #endif
7016   ;
7017   return 0;
7018 }
7019 _ACEOF
7020 rm -f conftest.$ac_objext
7021 if { (eval echo "$as_me:7021: \"$ac_compile\"") >&5
7022   (eval $ac_compile) 2>&5
7023   ac_status=$?
7024   echo "$as_me:7024: \$? = $ac_status" >&5
7025   (exit $ac_status); } &&
7026          { ac_try='test -s conftest.$ac_objext'
7027   { (eval echo "$as_me:7027: \"$ac_try\"") >&5
7028   (eval $ac_try) 2>&5
7029   ac_status=$?
7030   echo "$as_me:7030: \$? = $ac_status" >&5
7031   (exit $ac_status); }; }; then
7032   :
7033 else
7034   echo "$as_me: failed program was:" >&5
7035 cat conftest.$ac_ext >&5
7036 cf_cv_posix_c_source=no
7037 fi
7038 rm -f conftest.$ac_objext conftest.$ac_ext
7039          CFLAGS="$cf_save_CFLAGS"
7040          CPPFLAGS="$cf_save_CPPFLAGS"
7041
7042 fi
7043 rm -f conftest.$ac_objext conftest.$ac_ext
7044
7045 fi
7046 echo "$as_me:7046: result: $cf_cv_posix_c_source" >&5
7047 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7048
7049 if test "$cf_cv_posix_c_source" != no ; then
7050         CFLAGS="$cf_trim_CFLAGS"
7051         CPPFLAGS="$cf_trim_CPPFLAGS"
7052
7053 cf_fix_cppflags=no
7054 cf_new_cflags=
7055 cf_new_cppflags=
7056 cf_new_extra_cppflags=
7057
7058 for cf_add_cflags in $cf_cv_posix_c_source
7059 do
7060 case $cf_fix_cppflags in
7061 no)
7062         case $cf_add_cflags in #(vi
7063         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7064                 case $cf_add_cflags in
7065                 -D*)
7066                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7067
7068                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7069                                 && test -z "${cf_tst_cflags}" \
7070                                 && cf_fix_cppflags=yes
7071
7072                         if test $cf_fix_cppflags = yes ; then
7073                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7074                                 continue
7075                         elif test "${cf_tst_cflags}" = "\"'" ; then
7076                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7077                                 continue
7078                         fi
7079                         ;;
7080                 esac
7081                 case "$CPPFLAGS" in
7082                 *$cf_add_cflags) #(vi
7083                         ;;
7084                 *) #(vi
7085                         case $cf_add_cflags in #(vi
7086                         -D*)
7087                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7088
7089 CPPFLAGS=`echo "$CPPFLAGS" | \
7090         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7091                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7092
7093                                 ;;
7094                         esac
7095                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7096                         ;;
7097                 esac
7098                 ;;
7099         *)
7100                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7101                 ;;
7102         esac
7103         ;;
7104 yes)
7105         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7106
7107         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7108
7109         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7110                 && test -z "${cf_tst_cflags}" \
7111                 && cf_fix_cppflags=no
7112         ;;
7113 esac
7114 done
7115
7116 if test -n "$cf_new_cflags" ; then
7117
7118         CFLAGS="$CFLAGS $cf_new_cflags"
7119 fi
7120
7121 if test -n "$cf_new_cppflags" ; then
7122
7123         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7124 fi
7125
7126 if test -n "$cf_new_extra_cppflags" ; then
7127
7128         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7129 fi
7130
7131 fi
7132
7133         ;;
7134 esac
7135
7136 if test -n "$cf_xopen_source" ; then
7137
7138 cf_fix_cppflags=no
7139 cf_new_cflags=
7140 cf_new_cppflags=
7141 cf_new_extra_cppflags=
7142
7143 for cf_add_cflags in $cf_xopen_source
7144 do
7145 case $cf_fix_cppflags in
7146 no)
7147         case $cf_add_cflags in #(vi
7148         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7149                 case $cf_add_cflags in
7150                 -D*)
7151                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7152
7153                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7154                                 && test -z "${cf_tst_cflags}" \
7155                                 && cf_fix_cppflags=yes
7156
7157                         if test $cf_fix_cppflags = yes ; then
7158                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7159                                 continue
7160                         elif test "${cf_tst_cflags}" = "\"'" ; then
7161                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7162                                 continue
7163                         fi
7164                         ;;
7165                 esac
7166                 case "$CPPFLAGS" in
7167                 *$cf_add_cflags) #(vi
7168                         ;;
7169                 *) #(vi
7170                         case $cf_add_cflags in #(vi
7171                         -D*)
7172                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7173
7174 CPPFLAGS=`echo "$CPPFLAGS" | \
7175         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7176                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7177
7178                                 ;;
7179                         esac
7180                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7181                         ;;
7182                 esac
7183                 ;;
7184         *)
7185                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7186                 ;;
7187         esac
7188         ;;
7189 yes)
7190         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7191
7192         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7193
7194         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7195                 && test -z "${cf_tst_cflags}" \
7196                 && cf_fix_cppflags=no
7197         ;;
7198 esac
7199 done
7200
7201 if test -n "$cf_new_cflags" ; then
7202
7203         CFLAGS="$CFLAGS $cf_new_cflags"
7204 fi
7205
7206 if test -n "$cf_new_cppflags" ; then
7207
7208         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7209 fi
7210
7211 if test -n "$cf_new_extra_cppflags" ; then
7212
7213         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7214 fi
7215
7216 fi
7217
7218 # Work around breakage on OS X
7219
7220 echo "$as_me:7220: checking if SIGWINCH is defined" >&5
7221 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7222 if test "${cf_cv_define_sigwinch+set}" = set; then
7223   echo $ECHO_N "(cached) $ECHO_C" >&6
7224 else
7225
7226         cat >conftest.$ac_ext <<_ACEOF
7227 #line 7227 "configure"
7228 #include "confdefs.h"
7229
7230 #include <sys/types.h>
7231 #include <sys/signal.h>
7232
7233 int
7234 main ()
7235 {
7236 int x = SIGWINCH
7237   ;
7238   return 0;
7239 }
7240 _ACEOF
7241 rm -f conftest.$ac_objext
7242 if { (eval echo "$as_me:7242: \"$ac_compile\"") >&5
7243   (eval $ac_compile) 2>&5
7244   ac_status=$?
7245   echo "$as_me:7245: \$? = $ac_status" >&5
7246   (exit $ac_status); } &&
7247          { ac_try='test -s conftest.$ac_objext'
7248   { (eval echo "$as_me:7248: \"$ac_try\"") >&5
7249   (eval $ac_try) 2>&5
7250   ac_status=$?
7251   echo "$as_me:7251: \$? = $ac_status" >&5
7252   (exit $ac_status); }; }; then
7253   cf_cv_define_sigwinch=yes
7254 else
7255   echo "$as_me: failed program was:" >&5
7256 cat conftest.$ac_ext >&5
7257 cat >conftest.$ac_ext <<_ACEOF
7258 #line 7258 "configure"
7259 #include "confdefs.h"
7260
7261 #undef _XOPEN_SOURCE
7262 #undef _POSIX_SOURCE
7263 #undef _POSIX_C_SOURCE
7264 #include <sys/types.h>
7265 #include <sys/signal.h>
7266
7267 int
7268 main ()
7269 {
7270 int x = SIGWINCH
7271   ;
7272   return 0;
7273 }
7274 _ACEOF
7275 rm -f conftest.$ac_objext
7276 if { (eval echo "$as_me:7276: \"$ac_compile\"") >&5
7277   (eval $ac_compile) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit $ac_status); } &&
7281          { ac_try='test -s conftest.$ac_objext'
7282   { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7283   (eval $ac_try) 2>&5
7284   ac_status=$?
7285   echo "$as_me:7285: \$? = $ac_status" >&5
7286   (exit $ac_status); }; }; then
7287   cf_cv_define_sigwinch=maybe
7288 else
7289   echo "$as_me: failed program was:" >&5
7290 cat conftest.$ac_ext >&5
7291 cf_cv_define_sigwinch=no
7292 fi
7293 rm -f conftest.$ac_objext conftest.$ac_ext
7294
7295 fi
7296 rm -f conftest.$ac_objext conftest.$ac_ext
7297
7298 fi
7299 echo "$as_me:7299: result: $cf_cv_define_sigwinch" >&5
7300 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7301
7302 if test "$cf_cv_define_sigwinch" = maybe ; then
7303 echo "$as_me:7303: checking for actual SIGWINCH definition" >&5
7304 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7305 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7306   echo $ECHO_N "(cached) $ECHO_C" >&6
7307 else
7308
7309 cf_cv_fixup_sigwinch=unknown
7310 cf_sigwinch=32
7311 while test $cf_sigwinch != 1
7312 do
7313         cat >conftest.$ac_ext <<_ACEOF
7314 #line 7314 "configure"
7315 #include "confdefs.h"
7316
7317 #undef _XOPEN_SOURCE
7318 #undef _POSIX_SOURCE
7319 #undef _POSIX_C_SOURCE
7320 #include <sys/types.h>
7321 #include <sys/signal.h>
7322
7323 int
7324 main ()
7325 {
7326
7327 #if SIGWINCH != $cf_sigwinch
7328 make an error
7329 #endif
7330 int x = SIGWINCH
7331   ;
7332   return 0;
7333 }
7334 _ACEOF
7335 rm -f conftest.$ac_objext
7336 if { (eval echo "$as_me:7336: \"$ac_compile\"") >&5
7337   (eval $ac_compile) 2>&5
7338   ac_status=$?
7339   echo "$as_me:7339: \$? = $ac_status" >&5
7340   (exit $ac_status); } &&
7341          { ac_try='test -s conftest.$ac_objext'
7342   { (eval echo "$as_me:7342: \"$ac_try\"") >&5
7343   (eval $ac_try) 2>&5
7344   ac_status=$?
7345   echo "$as_me:7345: \$? = $ac_status" >&5
7346   (exit $ac_status); }; }; then
7347   cf_cv_fixup_sigwinch=$cf_sigwinch
7348          break
7349 else
7350   echo "$as_me: failed program was:" >&5
7351 cat conftest.$ac_ext >&5
7352 fi
7353 rm -f conftest.$ac_objext conftest.$ac_ext
7354
7355 cf_sigwinch=`expr $cf_sigwinch - 1`
7356 done
7357
7358 fi
7359 echo "$as_me:7359: result: $cf_cv_fixup_sigwinch" >&5
7360 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7361
7362         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7363                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7364         fi
7365 fi
7366
7367 # Checks for CODESET support.
7368
7369   echo "$as_me:7369: checking for nl_langinfo and CODESET" >&5
7370 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7371 if test "${am_cv_langinfo_codeset+set}" = set; then
7372   echo $ECHO_N "(cached) $ECHO_C" >&6
7373 else
7374   cat >conftest.$ac_ext <<_ACEOF
7375 #line 7375 "configure"
7376 #include "confdefs.h"
7377 #include <langinfo.h>
7378 int
7379 main ()
7380 {
7381 char* cs = nl_langinfo(CODESET);
7382   ;
7383   return 0;
7384 }
7385 _ACEOF
7386 rm -f conftest.$ac_objext conftest$ac_exeext
7387 if { (eval echo "$as_me:7387: \"$ac_link\"") >&5
7388   (eval $ac_link) 2>&5
7389   ac_status=$?
7390   echo "$as_me:7390: \$? = $ac_status" >&5
7391   (exit $ac_status); } &&
7392          { ac_try='test -s conftest$ac_exeext'
7393   { (eval echo "$as_me:7393: \"$ac_try\"") >&5
7394   (eval $ac_try) 2>&5
7395   ac_status=$?
7396   echo "$as_me:7396: \$? = $ac_status" >&5
7397   (exit $ac_status); }; }; then
7398   am_cv_langinfo_codeset=yes
7399 else
7400   echo "$as_me: failed program was:" >&5
7401 cat conftest.$ac_ext >&5
7402 am_cv_langinfo_codeset=no
7403 fi
7404 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7405
7406 fi
7407 echo "$as_me:7407: result: $am_cv_langinfo_codeset" >&5
7408 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7409   if test $am_cv_langinfo_codeset = yes; then
7410
7411 cat >>confdefs.h <<\EOF
7412 #define HAVE_LANGINFO_CODESET 1
7413 EOF
7414
7415   fi
7416
7417 # use these variables to work around a defect in gcc's fixincludes.
7418 NCURSES_OK_WCHAR_T=
7419 NCURSES_OK_WINT_T=
7420
7421 echo "$as_me:7421: checking if you want wide-character code" >&5
7422 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7423
7424 # Check whether --enable-widec or --disable-widec was given.
7425 if test "${enable_widec+set}" = set; then
7426   enableval="$enable_widec"
7427   with_widec=$enableval
7428 else
7429   with_widec=no
7430 fi;
7431 echo "$as_me:7431: result: $with_widec" >&5
7432 echo "${ECHO_T}$with_widec" >&6
7433 if test "$with_widec" = yes ; then
7434         LIB_SUFFIX="w${LIB_SUFFIX}"
7435         cat >>confdefs.h <<\EOF
7436 #define USE_WIDEC_SUPPORT 1
7437 EOF
7438
7439         case "$CFLAGS $CPPFLAGS" in #(vi
7440         *-D_XOPEN_SOURCE=500) #(vi
7441                 ;;
7442         *)
7443
7444 echo "$as_me:7444: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7445 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7446 cat >conftest.$ac_ext <<_ACEOF
7447 #line 7447 "configure"
7448 #include "confdefs.h"
7449 #include <sys/types.h>
7450
7451 int
7452 main ()
7453 {
7454
7455 #ifndef _XOPEN_SOURCE_EXTENDED
7456 make an error
7457 #endif
7458   ;
7459   return 0;
7460 }
7461 _ACEOF
7462 rm -f conftest.$ac_objext
7463 if { (eval echo "$as_me:7463: \"$ac_compile\"") >&5
7464   (eval $ac_compile) 2>&5
7465   ac_status=$?
7466   echo "$as_me:7466: \$? = $ac_status" >&5
7467   (exit $ac_status); } &&
7468          { ac_try='test -s conftest.$ac_objext'
7469   { (eval echo "$as_me:7469: \"$ac_try\"") >&5
7470   (eval $ac_try) 2>&5
7471   ac_status=$?
7472   echo "$as_me:7472: \$? = $ac_status" >&5
7473   (exit $ac_status); }; }; then
7474   cf_result=no
7475 else
7476   echo "$as_me: failed program was:" >&5
7477 cat conftest.$ac_ext >&5
7478 cf_result=yes
7479 fi
7480 rm -f conftest.$ac_objext conftest.$ac_ext
7481 echo "$as_me:7481: result: $cf_result" >&5
7482 echo "${ECHO_T}$cf_result" >&6
7483
7484 if test "$cf_result" = yes ; then
7485         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
7486 elif test "x" != "x" ; then
7487         echo "$as_me:7487: checking checking for compatible value versus " >&5
7488 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
7489         cat >conftest.$ac_ext <<_ACEOF
7490 #line 7490 "configure"
7491 #include "confdefs.h"
7492 #include <sys/types.h>
7493
7494 int
7495 main ()
7496 {
7497
7498 #if _XOPEN_SOURCE_EXTENDED- < 0
7499 make an error
7500 #endif
7501   ;
7502   return 0;
7503 }
7504 _ACEOF
7505 rm -f conftest.$ac_objext
7506 if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507   (eval $ac_compile) 2>&5
7508   ac_status=$?
7509   echo "$as_me:7509: \$? = $ac_status" >&5
7510   (exit $ac_status); } &&
7511          { ac_try='test -s conftest.$ac_objext'
7512   { (eval echo "$as_me:7512: \"$ac_try\"") >&5
7513   (eval $ac_try) 2>&5
7514   ac_status=$?
7515   echo "$as_me:7515: \$? = $ac_status" >&5
7516   (exit $ac_status); }; }; then
7517   cf_result=yes
7518 else
7519   echo "$as_me: failed program was:" >&5
7520 cat conftest.$ac_ext >&5
7521 cf_result=no
7522 fi
7523 rm -f conftest.$ac_objext conftest.$ac_ext
7524         echo "$as_me:7524: result: $cf_result" >&5
7525 echo "${ECHO_T}$cf_result" >&6
7526         if test "$cf_result" = no ; then
7527                 # perhaps we can override it - try...
7528                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
7529         fi
7530 fi
7531
7532                 ;;
7533         esac
7534
7535         # with_overwrite=no
7536         NCURSES_CH_T=cchar_t
7537
7538 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
7539 do
7540 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7541 echo "$as_me:7541: checking for $ac_func" >&5
7542 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7543 if eval "test \"\${$as_ac_var+set}\" = set"; then
7544   echo $ECHO_N "(cached) $ECHO_C" >&6
7545 else
7546   cat >conftest.$ac_ext <<_ACEOF
7547 #line 7547 "configure"
7548 #include "confdefs.h"
7549 /* System header to define __stub macros and hopefully few prototypes,
7550     which can conflict with char $ac_func (); below.  */
7551 #include <assert.h>
7552 /* Override any gcc2 internal prototype to avoid an error.  */
7553 #ifdef __cplusplus
7554 extern "C"
7555 #endif
7556 /* We use char because int might match the return type of a gcc2
7557    builtin and then its argument prototype would still apply.  */
7558 char $ac_func ();
7559 char (*f) ();
7560
7561 int
7562 main ()
7563 {
7564 /* The GNU C library defines this for functions which it implements
7565     to always fail with ENOSYS.  Some functions are actually named
7566     something starting with __ and the normal name is an alias.  */
7567 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7568 choke me
7569 #else
7570 f = $ac_func;
7571 #endif
7572
7573   ;
7574   return 0;
7575 }
7576 _ACEOF
7577 rm -f conftest.$ac_objext conftest$ac_exeext
7578 if { (eval echo "$as_me:7578: \"$ac_link\"") >&5
7579   (eval $ac_link) 2>&5
7580   ac_status=$?
7581   echo "$as_me:7581: \$? = $ac_status" >&5
7582   (exit $ac_status); } &&
7583          { ac_try='test -s conftest$ac_exeext'
7584   { (eval echo "$as_me:7584: \"$ac_try\"") >&5
7585   (eval $ac_try) 2>&5
7586   ac_status=$?
7587   echo "$as_me:7587: \$? = $ac_status" >&5
7588   (exit $ac_status); }; }; then
7589   eval "$as_ac_var=yes"
7590 else
7591   echo "$as_me: failed program was:" >&5
7592 cat conftest.$ac_ext >&5
7593 eval "$as_ac_var=no"
7594 fi
7595 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7596 fi
7597 echo "$as_me:7597: result: `eval echo '${'$as_ac_var'}'`" >&5
7598 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
7599 if test `eval echo '${'$as_ac_var'}'` = yes; then
7600   cat >>confdefs.h <<EOF
7601 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7602 EOF
7603
7604 fi
7605 done
7606
7607         if test "$ac_cv_func_putwc" != yes ; then
7608
7609 echo "$as_me:7609: checking for multibyte character support" >&5
7610 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
7611 if test "${cf_cv_utf8_lib+set}" = set; then
7612   echo $ECHO_N "(cached) $ECHO_C" >&6
7613 else
7614
7615         cf_save_LIBS="$LIBS"
7616         cat >conftest.$ac_ext <<_ACEOF
7617 #line 7617 "configure"
7618 #include "confdefs.h"
7619
7620 #include <stdlib.h>
7621 int
7622 main ()
7623 {
7624 putwc(0,0);
7625   ;
7626   return 0;
7627 }
7628 _ACEOF
7629 rm -f conftest.$ac_objext conftest$ac_exeext
7630 if { (eval echo "$as_me:7630: \"$ac_link\"") >&5
7631   (eval $ac_link) 2>&5
7632   ac_status=$?
7633   echo "$as_me:7633: \$? = $ac_status" >&5
7634   (exit $ac_status); } &&
7635          { ac_try='test -s conftest$ac_exeext'
7636   { (eval echo "$as_me:7636: \"$ac_try\"") >&5
7637   (eval $ac_try) 2>&5
7638   ac_status=$?
7639   echo "$as_me:7639: \$? = $ac_status" >&5
7640   (exit $ac_status); }; }; then
7641   cf_cv_utf8_lib=yes
7642 else
7643   echo "$as_me: failed program was:" >&5
7644 cat conftest.$ac_ext >&5
7645
7646 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
7647 # will be set on completion of the AC_TRY_LINK below.
7648 cf_cv_header_path_utf8=
7649 cf_cv_library_path_utf8=
7650
7651 echo "${as_me-configure}:7651: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
7652
7653 cat >conftest.$ac_ext <<_ACEOF
7654 #line 7654 "configure"
7655 #include "confdefs.h"
7656
7657 #include <libutf8.h>
7658 int
7659 main ()
7660 {
7661 putwc(0,0);
7662   ;
7663   return 0;
7664 }
7665 _ACEOF
7666 rm -f conftest.$ac_objext conftest$ac_exeext
7667 if { (eval echo "$as_me:7667: \"$ac_link\"") >&5
7668   (eval $ac_link) 2>&5
7669   ac_status=$?
7670   echo "$as_me:7670: \$? = $ac_status" >&5
7671   (exit $ac_status); } &&
7672          { ac_try='test -s conftest$ac_exeext'
7673   { (eval echo "$as_me:7673: \"$ac_try\"") >&5
7674   (eval $ac_try) 2>&5
7675   ac_status=$?
7676   echo "$as_me:7676: \$? = $ac_status" >&5
7677   (exit $ac_status); }; }; then
7678
7679         cf_cv_find_linkage_utf8=yes
7680
7681 else
7682   echo "$as_me: failed program was:" >&5
7683 cat conftest.$ac_ext >&5
7684
7685 cf_save_LIBS="$LIBS"
7686 LIBS="-lutf8  $cf_save_LIBS"
7687
7688 cat >conftest.$ac_ext <<_ACEOF
7689 #line 7689 "configure"
7690 #include "confdefs.h"
7691
7692 #include <libutf8.h>
7693 int
7694 main ()
7695 {
7696 putwc(0,0);
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f conftest.$ac_objext conftest$ac_exeext
7702 if { (eval echo "$as_me:7702: \"$ac_link\"") >&5
7703   (eval $ac_link) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit $ac_status); } &&
7707          { ac_try='test -s conftest$ac_exeext'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit $ac_status); }; }; then
7713
7714         cf_cv_find_linkage_utf8=yes
7715         cf_cv_library_file_utf8="-lutf8"
7716
7717 else
7718   echo "$as_me: failed program was:" >&5
7719 cat conftest.$ac_ext >&5
7720
7721     cf_cv_find_linkage_utf8=no
7722         LIBS="$cf_save_LIBS"
7723
7724     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
7725
7726 echo "${as_me-configure}:7726: testing find linkage for utf8 library ..." 1>&5
7727
7728 echo "${as_me-configure}:7728: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
7729
7730     cf_save_CPPFLAGS="$CPPFLAGS"
7731     cf_test_CPPFLAGS="$CPPFLAGS"
7732
7733 cf_search=
7734 cf_header_path_list=""
7735 if test -n "${CFLAGS}${CPPFLAGS}" ; then
7736         for cf_header_path in $CPPFLAGS $CFLAGS
7737         do
7738                 case $cf_header_path in #(vi
7739                 -I*)
7740                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
7741
7742 test "$cf_header_path" != "NONE" && \
7743 test -d "$cf_header_path" && \
7744  {
7745         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
7746         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
7747         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
7748         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
7749         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
7750         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
7751 }
7752
7753                         cf_header_path_list="$cf_header_path_list $cf_search"
7754                         ;;
7755                 esac
7756         done
7757 fi
7758
7759 cf_search=""
7760
7761 test "/usr" != "$prefix" && \
7762 test -d "/usr" && \
7763 (test $prefix = NONE || test -d $prefix) && {
7764         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
7765         test -d /usr/include &&          cf_search="$cf_search /usr/include"
7766         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
7767         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
7768         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
7769         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
7770 }
7771
7772 test "$prefix" != "NONE" && \
7773 test -d "$prefix" && \
7774  {
7775         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
7776         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
7777         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
7778         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
7779         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
7780         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
7781 }
7782
7783 test "/usr/local" != "$prefix" && \
7784 test -d "/usr/local" && \
7785 (test $prefix = NONE || test -d $prefix) && {
7786         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
7787         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
7788         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
7789         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
7790         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
7791         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
7792 }
7793
7794 test "/opt" != "$prefix" && \
7795 test -d "/opt" && \
7796 (test $prefix = NONE || test -d $prefix) && {
7797         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
7798         test -d /opt/include &&          cf_search="$cf_search /opt/include"
7799         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
7800         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
7801         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
7802         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
7803 }
7804
7805 test "$HOME" != "$prefix" && \
7806 test -d "$HOME" && \
7807 (test $prefix = NONE || test -d $prefix) && {
7808         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
7809         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
7810         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
7811         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
7812         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
7813         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
7814 }
7815
7816 test "$includedir" != NONE && \
7817 test "$includedir" != "/usr/include" && \
7818 test -d "$includedir" && {
7819         test -d $includedir &&    cf_search="$cf_search $includedir"
7820         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
7821 }
7822
7823 test "$oldincludedir" != NONE && \
7824 test "$oldincludedir" != "/usr/include" && \
7825 test -d "$oldincludedir" && {
7826         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
7827         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
7828 }
7829
7830 cf_search="$cf_header_path_list $cf_search"
7831
7832     for cf_cv_header_path_utf8 in $cf_search
7833     do
7834       if test -d $cf_cv_header_path_utf8 ; then
7835         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
7836
7837 echo "${as_me-configure}:7837: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
7838
7839         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
7840         cat >conftest.$ac_ext <<_ACEOF
7841 #line 7841 "configure"
7842 #include "confdefs.h"
7843
7844 #include <libutf8.h>
7845 int
7846 main ()
7847 {
7848 putwc(0,0);
7849   ;
7850   return 0;
7851 }
7852 _ACEOF
7853 rm -f conftest.$ac_objext
7854 if { (eval echo "$as_me:7854: \"$ac_compile\"") >&5
7855   (eval $ac_compile) 2>&5
7856   ac_status=$?
7857   echo "$as_me:7857: \$? = $ac_status" >&5
7858   (exit $ac_status); } &&
7859          { ac_try='test -s conftest.$ac_objext'
7860   { (eval echo "$as_me:7860: \"$ac_try\"") >&5
7861   (eval $ac_try) 2>&5
7862   ac_status=$?
7863   echo "$as_me:7863: \$? = $ac_status" >&5
7864   (exit $ac_status); }; }; then
7865
7866             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
7867
7868 echo "${as_me-configure}:7868: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
7869
7870             cf_cv_find_linkage_utf8=maybe
7871             cf_test_CPPFLAGS="$CPPFLAGS"
7872             break
7873 else
7874   echo "$as_me: failed program was:" >&5
7875 cat conftest.$ac_ext >&5
7876
7877             CPPFLAGS="$cf_save_CPPFLAGS"
7878
7879 fi
7880 rm -f conftest.$ac_objext conftest.$ac_ext
7881       fi
7882     done
7883
7884     if test "$cf_cv_find_linkage_utf8" = maybe ; then
7885
7886 echo "${as_me-configure}:7886: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
7887
7888       cf_save_LIBS="$LIBS"
7889       cf_save_LDFLAGS="$LDFLAGS"
7890
7891       if test "$cf_cv_find_linkage_utf8" != yes ; then
7892
7893 cf_search=
7894 cf_library_path_list=""
7895 if test -n "${LDFLAGS}${LIBS}" ; then
7896         for cf_library_path in $LDFLAGS $LIBS
7897         do
7898                 case $cf_library_path in #(vi
7899                 -L*)
7900                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
7901
7902 test "$cf_library_path" != "NONE" && \
7903 test -d "$cf_library_path" && \
7904  {
7905         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
7906         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
7907         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
7908         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
7909         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
7910         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
7911 }
7912
7913                         cf_library_path_list="$cf_library_path_list $cf_search"
7914                         ;;
7915                 esac
7916         done
7917 fi
7918
7919 cf_search=""
7920
7921 test "/usr" != "$prefix" && \
7922 test -d "/usr" && \
7923 (test $prefix = NONE || test -d $prefix) && {
7924         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
7925         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
7926         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
7927         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
7928         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
7929         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
7930 }
7931
7932 test "$prefix" != "NONE" && \
7933 test -d "$prefix" && \
7934  {
7935         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
7936         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
7937         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
7938         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
7939         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
7940         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
7941 }
7942
7943 test "/usr/local" != "$prefix" && \
7944 test -d "/usr/local" && \
7945 (test $prefix = NONE || test -d $prefix) && {
7946         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
7947         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
7948         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
7949         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
7950         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
7951         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
7952 }
7953
7954 test "/opt" != "$prefix" && \
7955 test -d "/opt" && \
7956 (test $prefix = NONE || test -d $prefix) && {
7957         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
7958         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
7959         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
7960         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
7961         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
7962         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
7963 }
7964
7965 test "$HOME" != "$prefix" && \
7966 test -d "$HOME" && \
7967 (test $prefix = NONE || test -d $prefix) && {
7968         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
7969         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
7970         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
7971         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
7972         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
7973         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
7974 }
7975
7976 cf_search="$cf_library_path_list $cf_search"
7977
7978         for cf_cv_library_path_utf8 in $cf_search
7979         do
7980           if test -d $cf_cv_library_path_utf8 ; then
7981             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
7982
7983 echo "${as_me-configure}:7983: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
7984
7985             CPPFLAGS="$cf_test_CPPFLAGS"
7986             LIBS="-lutf8  $cf_save_LIBS"
7987             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
7988             cat >conftest.$ac_ext <<_ACEOF
7989 #line 7989 "configure"
7990 #include "confdefs.h"
7991
7992 #include <libutf8.h>
7993 int
7994 main ()
7995 {
7996 putwc(0,0);
7997   ;
7998   return 0;
7999 }
8000 _ACEOF
8001 rm -f conftest.$ac_objext conftest$ac_exeext
8002 if { (eval echo "$as_me:8002: \"$ac_link\"") >&5
8003   (eval $ac_link) 2>&5
8004   ac_status=$?
8005   echo "$as_me:8005: \$? = $ac_status" >&5
8006   (exit $ac_status); } &&
8007          { ac_try='test -s conftest$ac_exeext'
8008   { (eval echo "$as_me:8008: \"$ac_try\"") >&5
8009   (eval $ac_try) 2>&5
8010   ac_status=$?
8011   echo "$as_me:8011: \$? = $ac_status" >&5
8012   (exit $ac_status); }; }; then
8013
8014                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8015
8016 echo "${as_me-configure}:8016: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8017
8018                 cf_cv_find_linkage_utf8=yes
8019                 cf_cv_library_file_utf8="-lutf8"
8020                 break
8021 else
8022   echo "$as_me: failed program was:" >&5
8023 cat conftest.$ac_ext >&5
8024
8025                 CPPFLAGS="$cf_save_CPPFLAGS"
8026                 LIBS="$cf_save_LIBS"
8027                 LDFLAGS="$cf_save_LDFLAGS"
8028
8029 fi
8030 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8031           fi
8032         done
8033         LIBS="$cf_save_LIBS"
8034         CPPFLAGS="$cf_save_CPPFLAGS"
8035         LDFLAGS="$cf_save_LDFLAGS"
8036       fi
8037
8038     else
8039       cf_cv_find_linkage_utf8=no
8040     fi
8041
8042 fi
8043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8044
8045 fi
8046 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8047
8048 if test "$cf_cv_find_linkage_utf8" = yes ; then
8049 cf_cv_utf8_lib=add-on
8050 else
8051 cf_cv_utf8_lib=no
8052 fi
8053
8054 fi
8055 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8056 fi
8057 echo "$as_me:8057: result: $cf_cv_utf8_lib" >&5
8058 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8059
8060 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8061 # ncurses/ncursesw:
8062 if test "$cf_cv_utf8_lib" = "add-on" ; then
8063         cat >>confdefs.h <<\EOF
8064 #define HAVE_LIBUTF8_H 1
8065 EOF
8066
8067 if test -n "$cf_cv_header_path_utf8" ; then
8068   for cf_add_incdir in $cf_cv_header_path_utf8
8069   do
8070         while test $cf_add_incdir != /usr/include
8071         do
8072           if test -d $cf_add_incdir
8073           then
8074                 cf_have_incdir=no
8075                 if test -n "$CFLAGS$CPPFLAGS" ; then
8076                   # a loop is needed to ensure we can add subdirs of existing dirs
8077                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8078                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8079                           cf_have_incdir=yes; break
8080                         fi
8081                   done
8082                 fi
8083
8084                 if test "$cf_have_incdir" = no ; then
8085                   if test "$cf_add_incdir" = /usr/local/include ; then
8086                         if test "$GCC" = yes
8087                         then
8088                           cf_save_CPPFLAGS=$CPPFLAGS
8089                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8090                           cat >conftest.$ac_ext <<_ACEOF
8091 #line 8091 "configure"
8092 #include "confdefs.h"
8093 #include <stdio.h>
8094 int
8095 main ()
8096 {
8097 printf("Hello")
8098   ;
8099   return 0;
8100 }
8101 _ACEOF
8102 rm -f conftest.$ac_objext
8103 if { (eval echo "$as_me:8103: \"$ac_compile\"") >&5
8104   (eval $ac_compile) 2>&5
8105   ac_status=$?
8106   echo "$as_me:8106: \$? = $ac_status" >&5
8107   (exit $ac_status); } &&
8108          { ac_try='test -s conftest.$ac_objext'
8109   { (eval echo "$as_me:8109: \"$ac_try\"") >&5
8110   (eval $ac_try) 2>&5
8111   ac_status=$?
8112   echo "$as_me:8112: \$? = $ac_status" >&5
8113   (exit $ac_status); }; }; then
8114   :
8115 else
8116   echo "$as_me: failed program was:" >&5
8117 cat conftest.$ac_ext >&5
8118 cf_have_incdir=yes
8119 fi
8120 rm -f conftest.$ac_objext conftest.$ac_ext
8121                           CPPFLAGS=$cf_save_CPPFLAGS
8122                         fi
8123                   fi
8124                 fi
8125
8126                 if test "$cf_have_incdir" = no ; then
8127                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8128
8129 echo "${as_me-configure}:8129: testing adding $cf_add_incdir to include-path ..." 1>&5
8130
8131                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8132
8133                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8134                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8135                   cf_add_incdir="$cf_top_incdir"
8136                 else
8137                   break
8138                 fi
8139           fi
8140         done
8141   done
8142 fi
8143
8144 if test -n "$cf_cv_library_path_utf8" ; then
8145   for cf_add_libdir in $cf_cv_library_path_utf8
8146   do
8147     if test $cf_add_libdir = /usr/lib ; then
8148       :
8149     elif test -d $cf_add_libdir
8150     then
8151       cf_have_libdir=no
8152       if test -n "$LDFLAGS$LIBS" ; then
8153         # a loop is needed to ensure we can add subdirs of existing dirs
8154         for cf_test_libdir in $LDFLAGS $LIBS ; do
8155           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8156             cf_have_libdir=yes; break
8157           fi
8158         done
8159       fi
8160       if test "$cf_have_libdir" = no ; then
8161         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8162
8163 echo "${as_me-configure}:8163: testing adding $cf_add_libdir to library-path ..." 1>&5
8164
8165         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8166       fi
8167     fi
8168   done
8169 fi
8170
8171         LIBS="-lutf8 $LIBS"
8172 fi
8173
8174                 if test "$cf_cv_utf8_lib" != no ; then
8175                         NCURSES_LIBUTF8=1
8176                 fi
8177         fi
8178
8179 # This is needed on Tru64 5.0 to declare mbstate_t
8180 echo "$as_me:8180: checking if we must include wchar.h to declare mbstate_t" >&5
8181 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8182 if test "${cf_cv_mbstate_t+set}" = set; then
8183   echo $ECHO_N "(cached) $ECHO_C" >&6
8184 else
8185
8186 cat >conftest.$ac_ext <<_ACEOF
8187 #line 8187 "configure"
8188 #include "confdefs.h"
8189
8190 #include <stdlib.h>
8191 #include <stdarg.h>
8192 #include <stdio.h>
8193 #ifdef HAVE_LIBUTF8_H
8194 #include <libutf8.h>
8195 #endif
8196 int
8197 main ()
8198 {
8199 mbstate_t state
8200   ;
8201   return 0;
8202 }
8203 _ACEOF
8204 rm -f conftest.$ac_objext
8205 if { (eval echo "$as_me:8205: \"$ac_compile\"") >&5
8206   (eval $ac_compile) 2>&5
8207   ac_status=$?
8208   echo "$as_me:8208: \$? = $ac_status" >&5
8209   (exit $ac_status); } &&
8210          { ac_try='test -s conftest.$ac_objext'
8211   { (eval echo "$as_me:8211: \"$ac_try\"") >&5
8212   (eval $ac_try) 2>&5
8213   ac_status=$?
8214   echo "$as_me:8214: \$? = $ac_status" >&5
8215   (exit $ac_status); }; }; then
8216   cf_cv_mbstate_t=no
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220 cat >conftest.$ac_ext <<_ACEOF
8221 #line 8221 "configure"
8222 #include "confdefs.h"
8223
8224 #include <stdlib.h>
8225 #include <stdarg.h>
8226 #include <stdio.h>
8227 #include <wchar.h>
8228 #ifdef HAVE_LIBUTF8_H
8229 #include <libutf8.h>
8230 #endif
8231 int
8232 main ()
8233 {
8234 mbstate_t value
8235   ;
8236   return 0;
8237 }
8238 _ACEOF
8239 rm -f conftest.$ac_objext
8240 if { (eval echo "$as_me:8240: \"$ac_compile\"") >&5
8241   (eval $ac_compile) 2>&5
8242   ac_status=$?
8243   echo "$as_me:8243: \$? = $ac_status" >&5
8244   (exit $ac_status); } &&
8245          { ac_try='test -s conftest.$ac_objext'
8246   { (eval echo "$as_me:8246: \"$ac_try\"") >&5
8247   (eval $ac_try) 2>&5
8248   ac_status=$?
8249   echo "$as_me:8249: \$? = $ac_status" >&5
8250   (exit $ac_status); }; }; then
8251   cf_cv_mbstate_t=yes
8252 else
8253   echo "$as_me: failed program was:" >&5
8254 cat conftest.$ac_ext >&5
8255 cf_cv_mbstate_t=unknown
8256 fi
8257 rm -f conftest.$ac_objext conftest.$ac_ext
8258 fi
8259 rm -f conftest.$ac_objext conftest.$ac_ext
8260 fi
8261 echo "$as_me:8261: result: $cf_cv_mbstate_t" >&5
8262 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8263
8264 if test "$cf_cv_mbstate_t" = yes ; then
8265         cat >>confdefs.h <<\EOF
8266 #define NEED_WCHAR_H 1
8267 EOF
8268
8269         NEED_WCHAR_H=1
8270 fi
8271
8272 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8273 if test "$cf_cv_mbstate_t" = unknown ; then
8274         NCURSES_MBSTATE_T=1
8275 fi
8276
8277 # This is needed on Tru64 5.0 to declare wchar_t
8278 echo "$as_me:8278: checking if we must include wchar.h to declare wchar_t" >&5
8279 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8280 if test "${cf_cv_wchar_t+set}" = set; then
8281   echo $ECHO_N "(cached) $ECHO_C" >&6
8282 else
8283
8284 cat >conftest.$ac_ext <<_ACEOF
8285 #line 8285 "configure"
8286 #include "confdefs.h"
8287
8288 #include <stdlib.h>
8289 #include <stdarg.h>
8290 #include <stdio.h>
8291 #ifdef HAVE_LIBUTF8_H
8292 #include <libutf8.h>
8293 #endif
8294 int
8295 main ()
8296 {
8297 wchar_t state
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 rm -f conftest.$ac_objext
8303 if { (eval echo "$as_me:8303: \"$ac_compile\"") >&5
8304   (eval $ac_compile) 2>&5
8305   ac_status=$?
8306   echo "$as_me:8306: \$? = $ac_status" >&5
8307   (exit $ac_status); } &&
8308          { ac_try='test -s conftest.$ac_objext'
8309   { (eval echo "$as_me:8309: \"$ac_try\"") >&5
8310   (eval $ac_try) 2>&5
8311   ac_status=$?
8312   echo "$as_me:8312: \$? = $ac_status" >&5
8313   (exit $ac_status); }; }; then
8314   cf_cv_wchar_t=no
8315 else
8316   echo "$as_me: failed program was:" >&5
8317 cat conftest.$ac_ext >&5
8318 cat >conftest.$ac_ext <<_ACEOF
8319 #line 8319 "configure"
8320 #include "confdefs.h"
8321
8322 #include <stdlib.h>
8323 #include <stdarg.h>
8324 #include <stdio.h>
8325 #include <wchar.h>
8326 #ifdef HAVE_LIBUTF8_H
8327 #include <libutf8.h>
8328 #endif
8329 int
8330 main ()
8331 {
8332 wchar_t value
8333   ;
8334   return 0;
8335 }
8336 _ACEOF
8337 rm -f conftest.$ac_objext
8338 if { (eval echo "$as_me:8338: \"$ac_compile\"") >&5
8339   (eval $ac_compile) 2>&5
8340   ac_status=$?
8341   echo "$as_me:8341: \$? = $ac_status" >&5
8342   (exit $ac_status); } &&
8343          { ac_try='test -s conftest.$ac_objext'
8344   { (eval echo "$as_me:8344: \"$ac_try\"") >&5
8345   (eval $ac_try) 2>&5
8346   ac_status=$?
8347   echo "$as_me:8347: \$? = $ac_status" >&5
8348   (exit $ac_status); }; }; then
8349   cf_cv_wchar_t=yes
8350 else
8351   echo "$as_me: failed program was:" >&5
8352 cat conftest.$ac_ext >&5
8353 cf_cv_wchar_t=unknown
8354 fi
8355 rm -f conftest.$ac_objext conftest.$ac_ext
8356 fi
8357 rm -f conftest.$ac_objext conftest.$ac_ext
8358 fi
8359 echo "$as_me:8359: result: $cf_cv_wchar_t" >&5
8360 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8361
8362 if test "$cf_cv_wchar_t" = yes ; then
8363         cat >>confdefs.h <<\EOF
8364 #define NEED_WCHAR_H 1
8365 EOF
8366
8367         NEED_WCHAR_H=1
8368 fi
8369
8370 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8371 if test "$cf_cv_wchar_t" = unknown ; then
8372         NCURSES_WCHAR_T=1
8373 fi
8374
8375 # if we find wchar_t in either place, use substitution to provide a fallback.
8376 if test "$cf_cv_wchar_t" != unknown ; then
8377         NCURSES_OK_WCHAR_T=1
8378 fi
8379
8380 # This is needed on Tru64 5.0 to declare wint_t
8381 echo "$as_me:8381: checking if we must include wchar.h to declare wint_t" >&5
8382 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8383 if test "${cf_cv_wint_t+set}" = set; then
8384   echo $ECHO_N "(cached) $ECHO_C" >&6
8385 else
8386
8387 cat >conftest.$ac_ext <<_ACEOF
8388 #line 8388 "configure"
8389 #include "confdefs.h"
8390
8391 #include <stdlib.h>
8392 #include <stdarg.h>
8393 #include <stdio.h>
8394 #ifdef HAVE_LIBUTF8_H
8395 #include <libutf8.h>
8396 #endif
8397 int
8398 main ()
8399 {
8400 wint_t state
8401   ;
8402   return 0;
8403 }
8404 _ACEOF
8405 rm -f conftest.$ac_objext
8406 if { (eval echo "$as_me:8406: \"$ac_compile\"") >&5
8407   (eval $ac_compile) 2>&5
8408   ac_status=$?
8409   echo "$as_me:8409: \$? = $ac_status" >&5
8410   (exit $ac_status); } &&
8411          { ac_try='test -s conftest.$ac_objext'
8412   { (eval echo "$as_me:8412: \"$ac_try\"") >&5
8413   (eval $ac_try) 2>&5
8414   ac_status=$?
8415   echo "$as_me:8415: \$? = $ac_status" >&5
8416   (exit $ac_status); }; }; then
8417   cf_cv_wint_t=no
8418 else
8419   echo "$as_me: failed program was:" >&5
8420 cat conftest.$ac_ext >&5
8421 cat >conftest.$ac_ext <<_ACEOF
8422 #line 8422 "configure"
8423 #include "confdefs.h"
8424
8425 #include <stdlib.h>
8426 #include <stdarg.h>
8427 #include <stdio.h>
8428 #include <wchar.h>
8429 #ifdef HAVE_LIBUTF8_H
8430 #include <libutf8.h>
8431 #endif
8432 int
8433 main ()
8434 {
8435 wint_t value
8436   ;
8437   return 0;
8438 }
8439 _ACEOF
8440 rm -f conftest.$ac_objext
8441 if { (eval echo "$as_me:8441: \"$ac_compile\"") >&5
8442   (eval $ac_compile) 2>&5
8443   ac_status=$?
8444   echo "$as_me:8444: \$? = $ac_status" >&5
8445   (exit $ac_status); } &&
8446          { ac_try='test -s conftest.$ac_objext'
8447   { (eval echo "$as_me:8447: \"$ac_try\"") >&5
8448   (eval $ac_try) 2>&5
8449   ac_status=$?
8450   echo "$as_me:8450: \$? = $ac_status" >&5
8451   (exit $ac_status); }; }; then
8452   cf_cv_wint_t=yes
8453 else
8454   echo "$as_me: failed program was:" >&5
8455 cat conftest.$ac_ext >&5
8456 cf_cv_wint_t=unknown
8457 fi
8458 rm -f conftest.$ac_objext conftest.$ac_ext
8459 fi
8460 rm -f conftest.$ac_objext conftest.$ac_ext
8461 fi
8462 echo "$as_me:8462: result: $cf_cv_wint_t" >&5
8463 echo "${ECHO_T}$cf_cv_wint_t" >&6
8464
8465 if test "$cf_cv_wint_t" = yes ; then
8466         cat >>confdefs.h <<\EOF
8467 #define NEED_WCHAR_H 1
8468 EOF
8469
8470         NEED_WCHAR_H=1
8471 fi
8472
8473 # if we do not find wint_t in either place, use substitution to provide a fallback.
8474 if test "$cf_cv_wint_t" = unknown ; then
8475         NCURSES_WINT_T=1
8476 fi
8477
8478 # if we find wint_t in either place, use substitution to provide a fallback.
8479 if test "$cf_cv_wint_t" != unknown ; then
8480         NCURSES_OK_WINT_T=1
8481 fi
8482
8483         if test "$NCURSES_MBSTATE_T" != 0; then
8484                 cat >>confdefs.h <<\EOF
8485 #define NEED_MBSTATE_T_DEF 1
8486 EOF
8487
8488         fi
8489 fi
8490
8491 ###   use option --disable-lp64 to allow long chtype
8492 case $cf_cv_abi_version in
8493 [345]*)
8494         default_with_lp64=no
8495         ;;
8496 *)
8497         default_with_lp64=yes
8498         ;;
8499 esac
8500
8501 echo "$as_me:8501: checking whether to enable _LP64 definition in curses.h" >&5
8502 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
8503
8504 # Check whether --enable-lp64 or --disable-lp64 was given.
8505 if test "${enable_lp64+set}" = set; then
8506   enableval="$enable_lp64"
8507   with_lp64=$enableval
8508 else
8509   with_lp64=$default_with_lp64
8510 fi;
8511 echo "$as_me:8511: result: $with_lp64" >&5
8512 echo "${ECHO_T}$with_lp64" >&6
8513
8514 if test "$with_lp64" = yes ; then
8515         cf_cv_enable_lp64=1
8516 else
8517         cf_cv_enable_lp64=0
8518 fi
8519
8520 # Check whether --enable-largefile or --disable-largefile was given.
8521 if test "${enable_largefile+set}" = set; then
8522   enableval="$enable_largefile"
8523
8524 fi;
8525 if test "$enable_largefile" != no; then
8526
8527   echo "$as_me:8527: checking for special C compiler options needed for large files" >&5
8528 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
8529 if test "${ac_cv_sys_largefile_CC+set}" = set; then
8530   echo $ECHO_N "(cached) $ECHO_C" >&6
8531 else
8532   ac_cv_sys_largefile_CC=no
8533      if test "$GCC" != yes; then
8534        ac_save_CC=$CC
8535        while :; do
8536          # IRIX 6.2 and later do not support large files by default,
8537          # so use the C compiler's -n32 option if that helps.
8538          cat >conftest.$ac_ext <<_ACEOF
8539 #line 8539 "configure"
8540 #include "confdefs.h"
8541 #include <sys/types.h>
8542  /* Check that off_t can represent 2**63 - 1 correctly.
8543     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8544     since some C++ compilers masquerading as C compilers
8545     incorrectly reject 9223372036854775807.  */
8546 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8547   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8548                        && LARGE_OFF_T % 2147483647 == 1)
8549                       ? 1 : -1];
8550 int
8551 main ()
8552 {
8553
8554   ;
8555   return 0;
8556 }
8557 _ACEOF
8558          rm -f conftest.$ac_objext
8559 if { (eval echo "$as_me:8559: \"$ac_compile\"") >&5
8560   (eval $ac_compile) 2>&5
8561   ac_status=$?
8562   echo "$as_me:8562: \$? = $ac_status" >&5
8563   (exit $ac_status); } &&
8564          { ac_try='test -s conftest.$ac_objext'
8565   { (eval echo "$as_me:8565: \"$ac_try\"") >&5
8566   (eval $ac_try) 2>&5
8567   ac_status=$?
8568   echo "$as_me:8568: \$? = $ac_status" >&5
8569   (exit $ac_status); }; }; then
8570   break
8571 else
8572   echo "$as_me: failed program was:" >&5
8573 cat conftest.$ac_ext >&5
8574 fi
8575 rm -f conftest.$ac_objext
8576          CC="$CC -n32"
8577          rm -f conftest.$ac_objext
8578 if { (eval echo "$as_me:8578: \"$ac_compile\"") >&5
8579   (eval $ac_compile) 2>&5
8580   ac_status=$?
8581   echo "$as_me:8581: \$? = $ac_status" >&5
8582   (exit $ac_status); } &&
8583          { ac_try='test -s conftest.$ac_objext'
8584   { (eval echo "$as_me:8584: \"$ac_try\"") >&5
8585   (eval $ac_try) 2>&5
8586   ac_status=$?
8587   echo "$as_me:8587: \$? = $ac_status" >&5
8588   (exit $ac_status); }; }; then
8589   ac_cv_sys_largefile_CC=' -n32'; break
8590 else
8591   echo "$as_me: failed program was:" >&5
8592 cat conftest.$ac_ext >&5
8593 fi
8594 rm -f conftest.$ac_objext
8595          break
8596        done
8597        CC=$ac_save_CC
8598        rm -f conftest.$ac_ext
8599     fi
8600 fi
8601 echo "$as_me:8601: result: $ac_cv_sys_largefile_CC" >&5
8602 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
8603   if test "$ac_cv_sys_largefile_CC" != no; then
8604     CC=$CC$ac_cv_sys_largefile_CC
8605   fi
8606
8607   echo "$as_me:8607: checking for _FILE_OFFSET_BITS value needed for large files" >&5
8608 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
8609 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
8610   echo $ECHO_N "(cached) $ECHO_C" >&6
8611 else
8612   while :; do
8613   ac_cv_sys_file_offset_bits=no
8614   cat >conftest.$ac_ext <<_ACEOF
8615 #line 8615 "configure"
8616 #include "confdefs.h"
8617 #include <sys/types.h>
8618  /* Check that off_t can represent 2**63 - 1 correctly.
8619     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8620     since some C++ compilers masquerading as C compilers
8621     incorrectly reject 9223372036854775807.  */
8622 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8623   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8624                        && LARGE_OFF_T % 2147483647 == 1)
8625                       ? 1 : -1];
8626 int
8627 main ()
8628 {
8629
8630   ;
8631   return 0;
8632 }
8633 _ACEOF
8634 rm -f conftest.$ac_objext
8635 if { (eval echo "$as_me:8635: \"$ac_compile\"") >&5
8636   (eval $ac_compile) 2>&5
8637   ac_status=$?
8638   echo "$as_me:8638: \$? = $ac_status" >&5
8639   (exit $ac_status); } &&
8640          { ac_try='test -s conftest.$ac_objext'
8641   { (eval echo "$as_me:8641: \"$ac_try\"") >&5
8642   (eval $ac_try) 2>&5
8643   ac_status=$?
8644   echo "$as_me:8644: \$? = $ac_status" >&5
8645   (exit $ac_status); }; }; then
8646   break
8647 else
8648   echo "$as_me: failed program was:" >&5
8649 cat conftest.$ac_ext >&5
8650 fi
8651 rm -f conftest.$ac_objext conftest.$ac_ext
8652   cat >conftest.$ac_ext <<_ACEOF
8653 #line 8653 "configure"
8654 #include "confdefs.h"
8655 #define _FILE_OFFSET_BITS 64
8656 #include <sys/types.h>
8657  /* Check that off_t can represent 2**63 - 1 correctly.
8658     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8659     since some C++ compilers masquerading as C compilers
8660     incorrectly reject 9223372036854775807.  */
8661 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8662   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8663                        && LARGE_OFF_T % 2147483647 == 1)
8664                       ? 1 : -1];
8665 int
8666 main ()
8667 {
8668
8669   ;
8670   return 0;
8671 }
8672 _ACEOF
8673 rm -f conftest.$ac_objext
8674 if { (eval echo "$as_me:8674: \"$ac_compile\"") >&5
8675   (eval $ac_compile) 2>&5
8676   ac_status=$?
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit $ac_status); } &&
8679          { ac_try='test -s conftest.$ac_objext'
8680   { (eval echo "$as_me:8680: \"$ac_try\"") >&5
8681   (eval $ac_try) 2>&5
8682   ac_status=$?
8683   echo "$as_me:8683: \$? = $ac_status" >&5
8684   (exit $ac_status); }; }; then
8685   ac_cv_sys_file_offset_bits=64; break
8686 else
8687   echo "$as_me: failed program was:" >&5
8688 cat conftest.$ac_ext >&5
8689 fi
8690 rm -f conftest.$ac_objext conftest.$ac_ext
8691   break
8692 done
8693 fi
8694 echo "$as_me:8694: result: $ac_cv_sys_file_offset_bits" >&5
8695 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
8696 if test "$ac_cv_sys_file_offset_bits" != no; then
8697
8698 cat >>confdefs.h <<EOF
8699 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
8700 EOF
8701
8702 fi
8703 rm -f conftest*
8704   echo "$as_me:8704: checking for _LARGE_FILES value needed for large files" >&5
8705 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
8706 if test "${ac_cv_sys_large_files+set}" = set; then
8707   echo $ECHO_N "(cached) $ECHO_C" >&6
8708 else
8709   while :; do
8710   ac_cv_sys_large_files=no
8711   cat >conftest.$ac_ext <<_ACEOF
8712 #line 8712 "configure"
8713 #include "confdefs.h"
8714 #include <sys/types.h>
8715  /* Check that off_t can represent 2**63 - 1 correctly.
8716     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8717     since some C++ compilers masquerading as C compilers
8718     incorrectly reject 9223372036854775807.  */
8719 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8720   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8721                        && LARGE_OFF_T % 2147483647 == 1)
8722                       ? 1 : -1];
8723 int
8724 main ()
8725 {
8726
8727   ;
8728   return 0;
8729 }
8730 _ACEOF
8731 rm -f conftest.$ac_objext
8732 if { (eval echo "$as_me:8732: \"$ac_compile\"") >&5
8733   (eval $ac_compile) 2>&5
8734   ac_status=$?
8735   echo "$as_me:8735: \$? = $ac_status" >&5
8736   (exit $ac_status); } &&
8737          { ac_try='test -s conftest.$ac_objext'
8738   { (eval echo "$as_me:8738: \"$ac_try\"") >&5
8739   (eval $ac_try) 2>&5
8740   ac_status=$?
8741   echo "$as_me:8741: \$? = $ac_status" >&5
8742   (exit $ac_status); }; }; then
8743   break
8744 else
8745   echo "$as_me: failed program was:" >&5
8746 cat conftest.$ac_ext >&5
8747 fi
8748 rm -f conftest.$ac_objext conftest.$ac_ext
8749   cat >conftest.$ac_ext <<_ACEOF
8750 #line 8750 "configure"
8751 #include "confdefs.h"
8752 #define _LARGE_FILES 1
8753 #include <sys/types.h>
8754  /* Check that off_t can represent 2**63 - 1 correctly.
8755     We can't simply define LARGE_OFF_T to be 9223372036854775807,
8756     since some C++ compilers masquerading as C compilers
8757     incorrectly reject 9223372036854775807.  */
8758 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
8759   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
8760                        && LARGE_OFF_T % 2147483647 == 1)
8761                       ? 1 : -1];
8762 int
8763 main ()
8764 {
8765
8766   ;
8767   return 0;
8768 }
8769 _ACEOF
8770 rm -f conftest.$ac_objext
8771 if { (eval echo "$as_me:8771: \"$ac_compile\"") >&5
8772   (eval $ac_compile) 2>&5
8773   ac_status=$?
8774   echo "$as_me:8774: \$? = $ac_status" >&5
8775   (exit $ac_status); } &&
8776          { ac_try='test -s conftest.$ac_objext'
8777   { (eval echo "$as_me:8777: \"$ac_try\"") >&5
8778   (eval $ac_try) 2>&5
8779   ac_status=$?
8780   echo "$as_me:8780: \$? = $ac_status" >&5
8781   (exit $ac_status); }; }; then
8782   ac_cv_sys_large_files=1; break
8783 else
8784   echo "$as_me: failed program was:" >&5
8785 cat conftest.$ac_ext >&5
8786 fi
8787 rm -f conftest.$ac_objext conftest.$ac_ext
8788   break
8789 done
8790 fi
8791 echo "$as_me:8791: result: $ac_cv_sys_large_files" >&5
8792 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
8793 if test "$ac_cv_sys_large_files" != no; then
8794
8795 cat >>confdefs.h <<EOF
8796 #define _LARGE_FILES $ac_cv_sys_large_files
8797 EOF
8798
8799 fi
8800 rm -f conftest*
8801 fi
8802
8803     if test "$enable_largefile" != no ; then
8804         echo "$as_me:8804: checking for _LARGEFILE_SOURCE value needed for large files" >&5
8805 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
8806 if test "${ac_cv_sys_largefile_source+set}" = set; then
8807   echo $ECHO_N "(cached) $ECHO_C" >&6
8808 else
8809   while :; do
8810   ac_cv_sys_largefile_source=no
8811   cat >conftest.$ac_ext <<_ACEOF
8812 #line 8812 "configure"
8813 #include "confdefs.h"
8814 #include <stdio.h>
8815 int
8816 main ()
8817 {
8818 return !fseeko;
8819   ;
8820   return 0;
8821 }
8822 _ACEOF
8823 rm -f conftest.$ac_objext
8824 if { (eval echo "$as_me:8824: \"$ac_compile\"") >&5
8825   (eval $ac_compile) 2>&5
8826   ac_status=$?
8827   echo "$as_me:8827: \$? = $ac_status" >&5
8828   (exit $ac_status); } &&
8829          { ac_try='test -s conftest.$ac_objext'
8830   { (eval echo "$as_me:8830: \"$ac_try\"") >&5
8831   (eval $ac_try) 2>&5
8832   ac_status=$?
8833   echo "$as_me:8833: \$? = $ac_status" >&5
8834   (exit $ac_status); }; }; then
8835   break
8836 else
8837   echo "$as_me: failed program was:" >&5
8838 cat conftest.$ac_ext >&5
8839 fi
8840 rm -f conftest.$ac_objext conftest.$ac_ext
8841   cat >conftest.$ac_ext <<_ACEOF
8842 #line 8842 "configure"
8843 #include "confdefs.h"
8844 #define _LARGEFILE_SOURCE 1
8845 #include <stdio.h>
8846 int
8847 main ()
8848 {
8849 return !fseeko;
8850   ;
8851   return 0;
8852 }
8853 _ACEOF
8854 rm -f conftest.$ac_objext
8855 if { (eval echo "$as_me:8855: \"$ac_compile\"") >&5
8856   (eval $ac_compile) 2>&5
8857   ac_status=$?
8858   echo "$as_me:8858: \$? = $ac_status" >&5
8859   (exit $ac_status); } &&
8860          { ac_try='test -s conftest.$ac_objext'
8861   { (eval echo "$as_me:8861: \"$ac_try\"") >&5
8862   (eval $ac_try) 2>&5
8863   ac_status=$?
8864   echo "$as_me:8864: \$? = $ac_status" >&5
8865   (exit $ac_status); }; }; then
8866   ac_cv_sys_largefile_source=1; break
8867 else
8868   echo "$as_me: failed program was:" >&5
8869 cat conftest.$ac_ext >&5
8870 fi
8871 rm -f conftest.$ac_objext conftest.$ac_ext
8872   break
8873 done
8874 fi
8875 echo "$as_me:8875: result: $ac_cv_sys_largefile_source" >&5
8876 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
8877 if test "$ac_cv_sys_largefile_source" != no; then
8878
8879 cat >>confdefs.h <<EOF
8880 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
8881 EOF
8882
8883 fi
8884 rm -f conftest*
8885
8886 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
8887 # in glibc 2.1.3, but that breaks too many other things.
8888 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
8889 echo "$as_me:8889: checking for fseeko" >&5
8890 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
8891 if test "${ac_cv_func_fseeko+set}" = set; then
8892   echo $ECHO_N "(cached) $ECHO_C" >&6
8893 else
8894   cat >conftest.$ac_ext <<_ACEOF
8895 #line 8895 "configure"
8896 #include "confdefs.h"
8897 #include <stdio.h>
8898 int
8899 main ()
8900 {
8901 return fseeko && fseeko (stdin, 0, 0);
8902   ;
8903   return 0;
8904 }
8905 _ACEOF
8906 rm -f conftest.$ac_objext conftest$ac_exeext
8907 if { (eval echo "$as_me:8907: \"$ac_link\"") >&5
8908   (eval $ac_link) 2>&5
8909   ac_status=$?
8910   echo "$as_me:8910: \$? = $ac_status" >&5
8911   (exit $ac_status); } &&
8912          { ac_try='test -s conftest$ac_exeext'
8913   { (eval echo "$as_me:8913: \"$ac_try\"") >&5
8914   (eval $ac_try) 2>&5
8915   ac_status=$?
8916   echo "$as_me:8916: \$? = $ac_status" >&5
8917   (exit $ac_status); }; }; then
8918   ac_cv_func_fseeko=yes
8919 else
8920   echo "$as_me: failed program was:" >&5
8921 cat conftest.$ac_ext >&5
8922 ac_cv_func_fseeko=no
8923 fi
8924 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8925 fi
8926 echo "$as_me:8926: result: $ac_cv_func_fseeko" >&5
8927 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
8928 if test $ac_cv_func_fseeko = yes; then
8929
8930 cat >>confdefs.h <<\EOF
8931 #define HAVE_FSEEKO 1
8932 EOF
8933
8934 fi
8935
8936         # Normally we would collect these definitions in the config.h,
8937         # but (like _XOPEN_SOURCE), some environments rely on having these
8938         # defined before any of the system headers are included.  Another
8939         # case comes up with C++, e.g., on AIX the compiler compiles the
8940         # header files by themselves before looking at the body files it is
8941         # told to compile.  For ncurses, those header files do not include
8942         # the config.h
8943         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
8944         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
8945         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
8946
8947         echo "$as_me:8947: checking whether to use struct dirent64" >&5
8948 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
8949 if test "${cf_cv_struct_dirent64+set}" = set; then
8950   echo $ECHO_N "(cached) $ECHO_C" >&6
8951 else
8952
8953                 cat >conftest.$ac_ext <<_ACEOF
8954 #line 8954 "configure"
8955 #include "confdefs.h"
8956
8957 #include <sys/types.h>
8958 #include <dirent.h>
8959
8960 int
8961 main ()
8962 {
8963
8964                 /* if transitional largefile support is setup, this is true */
8965                 extern struct dirent64 * readdir(DIR *);
8966                 struct dirent64 *x = readdir((DIR *)0);
8967                 struct dirent *y = readdir((DIR *)0);
8968                 int z = x - y;
8969
8970   ;
8971   return 0;
8972 }
8973 _ACEOF
8974 rm -f conftest.$ac_objext
8975 if { (eval echo "$as_me:8975: \"$ac_compile\"") >&5
8976   (eval $ac_compile) 2>&5
8977   ac_status=$?
8978   echo "$as_me:8978: \$? = $ac_status" >&5
8979   (exit $ac_status); } &&
8980          { ac_try='test -s conftest.$ac_objext'
8981   { (eval echo "$as_me:8981: \"$ac_try\"") >&5
8982   (eval $ac_try) 2>&5
8983   ac_status=$?
8984   echo "$as_me:8984: \$? = $ac_status" >&5
8985   (exit $ac_status); }; }; then
8986   cf_cv_struct_dirent64=yes
8987 else
8988   echo "$as_me: failed program was:" >&5
8989 cat conftest.$ac_ext >&5
8990 cf_cv_struct_dirent64=no
8991 fi
8992 rm -f conftest.$ac_objext conftest.$ac_ext
8993
8994 fi
8995 echo "$as_me:8995: result: $cf_cv_struct_dirent64" >&5
8996 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
8997         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
8998 #define HAVE_STRUCT_DIRENT64 1
8999 EOF
9000
9001     fi
9002
9003 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9004 echo "$as_me:9004: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9005 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9006
9007 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9008 if test "${enable_tparm_varargs+set}" = set; then
9009   enableval="$enable_tparm_varargs"
9010   with_tparm_varargs=$enableval
9011 else
9012   with_tparm_varargs=yes
9013 fi;
9014 echo "$as_me:9014: result: $with_tparm_varargs" >&5
9015 echo "${ECHO_T}$with_tparm_varargs" >&6
9016 NCURSES_TPARM_VARARGS=0
9017 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9018
9019 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9020 if test "$with_ticlib" != no ; then
9021 echo "$as_me:9021: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9022 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9023
9024 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9025 if test "${enable_tic_depends+set}" = set; then
9026   enableval="$enable_tic_depends"
9027   with_tic_depends=$enableval
9028 else
9029   with_tic_depends=yes
9030 fi;
9031 echo "$as_me:9031: result: $with_tic_depends" >&5
9032 echo "${ECHO_T}$with_tic_depends" >&6
9033 else
9034         with_tic_depends=no
9035 fi
9036
9037 ###   use option --with-bool to override bool's type
9038 echo "$as_me:9038: checking for type of bool" >&5
9039 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9040
9041 # Check whether --with-bool or --without-bool was given.
9042 if test "${with_bool+set}" = set; then
9043   withval="$with_bool"
9044   NCURSES_BOOL="$withval"
9045 else
9046   NCURSES_BOOL=auto
9047 fi;
9048 echo "$as_me:9048: result: $NCURSES_BOOL" >&5
9049 echo "${ECHO_T}$NCURSES_BOOL" >&6
9050
9051 echo "$as_me:9051: checking for alternate terminal capabilities file" >&5
9052 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9053
9054 # Check whether --with-caps or --without-caps was given.
9055 if test "${with_caps+set}" = set; then
9056   withval="$with_caps"
9057   TERMINFO_CAPS=Caps.$withval
9058 else
9059   TERMINFO_CAPS=Caps
9060 fi;
9061 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9062 echo "$as_me:9062: result: $TERMINFO_CAPS" >&5
9063 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9064
9065 ###   use option --with-chtype to override chtype's type
9066 echo "$as_me:9066: checking for type of chtype" >&5
9067 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9068
9069 # Check whether --with-chtype or --without-chtype was given.
9070 if test "${with_chtype+set}" = set; then
9071   withval="$with_chtype"
9072   NCURSES_CHTYPE="$withval"
9073 else
9074   NCURSES_CHTYPE=auto
9075 fi;
9076 echo "$as_me:9076: result: $NCURSES_CHTYPE" >&5
9077 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9078
9079 ###   use option --with-ospeed to override ospeed's type
9080 echo "$as_me:9080: checking for type of ospeed" >&5
9081 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9082
9083 # Check whether --with-ospeed or --without-ospeed was given.
9084 if test "${with_ospeed+set}" = set; then
9085   withval="$with_ospeed"
9086   NCURSES_OSPEED="$withval"
9087 else
9088   NCURSES_OSPEED=short
9089 fi;
9090 echo "$as_me:9090: result: $NCURSES_OSPEED" >&5
9091 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9092
9093 ###   use option --with-mmask-t to override mmask_t's type
9094 echo "$as_me:9094: checking for type of mmask_t" >&5
9095 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9096
9097 # Check whether --with-mmask-t or --without-mmask-t was given.
9098 if test "${with_mmask_t+set}" = set; then
9099   withval="$with_mmask_t"
9100   NCURSES_MMASK_T="$withval"
9101 else
9102   NCURSES_MMASK_T=auto
9103 fi;
9104 echo "$as_me:9104: result: $NCURSES_MMASK_T" >&5
9105 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9106
9107 ###   use option --with-ccharw-max to override CCHARW_MAX size
9108 echo "$as_me:9108: checking for size CCHARW_MAX" >&5
9109 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9110
9111 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9112 if test "${with_ccharw_max+set}" = set; then
9113   withval="$with_ccharw_max"
9114   NCURSES_CCHARW_MAX="$withval"
9115 else
9116   NCURSES_CCHARW_MAX=5
9117 fi;
9118 echo "$as_me:9118: result: $NCURSES_CCHARW_MAX" >&5
9119 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9120
9121 ### Enable compiling-in rcs id's
9122 echo "$as_me:9122: checking if RCS identifiers should be compiled-in" >&5
9123 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9124
9125 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9126 if test "${with_rcs_ids+set}" = set; then
9127   withval="$with_rcs_ids"
9128   with_rcs_ids=$withval
9129 else
9130   with_rcs_ids=no
9131 fi;
9132 echo "$as_me:9132: result: $with_rcs_ids" >&5
9133 echo "${ECHO_T}$with_rcs_ids" >&6
9134 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9135 #define USE_RCS_IDS 1
9136 EOF
9137
9138 ###############################################################################
9139
9140 echo "$as_me:9140: checking format of man-pages" >&5
9141 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9142
9143 # Check whether --with-manpage-format or --without-manpage-format was given.
9144 if test "${with_manpage_format+set}" = set; then
9145   withval="$with_manpage_format"
9146   MANPAGE_FORMAT=$withval
9147 else
9148   MANPAGE_FORMAT=unknown
9149 fi;
9150
9151 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9152 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9153
9154 cf_unknown=
9155
9156 case $MANPAGE_FORMAT in
9157 unknown)
9158   if test -z "$MANPATH" ; then
9159     MANPATH="/usr/man:/usr/share/man"
9160   fi
9161
9162   # look for the 'date' man-page (it's most likely to be installed!)
9163   MANPAGE_FORMAT=
9164   cf_preform=no
9165   cf_catonly=yes
9166   cf_example=date
9167
9168   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9169   for cf_dir in $MANPATH; do
9170     test -z "$cf_dir" && cf_dir=/usr/man
9171     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
9172     do
9173       cf_test=`echo $cf_name | sed -e 's/*//'`
9174       if test "x$cf_test" = "x$cf_name" ; then
9175
9176         case "$cf_name" in
9177         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9178         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9179         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9180         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9181         esac
9182
9183         case "$cf_name" in
9184         $cf_dir/man*)
9185           cf_catonly=no
9186           ;;
9187         $cf_dir/cat*)
9188           cf_preform=yes
9189           ;;
9190         esac
9191         break
9192       fi
9193
9194       # if we found a match in either man* or cat*, stop looking
9195       if test -n "$MANPAGE_FORMAT" ; then
9196         cf_found=no
9197         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9198         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9199         case "$cf_name" in
9200         $cf_dir/cat*)
9201           cf_found=yes
9202           ;;
9203         esac
9204         test $cf_found=yes && break
9205       fi
9206     done
9207     # only check the first directory in $MANPATH where we find manpages
9208     if test -n "$MANPAGE_FORMAT" ; then
9209        break
9210     fi
9211   done
9212   # if we did not find the example, just assume it is normal
9213   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9214   IFS="$ac_save_ifs"
9215   ;;
9216 *)
9217   for cf_option in $MANPAGE_FORMAT; do
9218      case $cf_option in #(vi
9219      gzip|compress|BSDI|normal|formatted|catonly)
9220        ;;
9221      *)
9222        cf_unknown="$cf_unknown $cf_option"
9223        ;;
9224      esac
9225   done
9226   ;;
9227 esac
9228
9229 echo "$as_me:9229: result: $MANPAGE_FORMAT" >&5
9230 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9231 if test -n "$cf_unknown" ; then
9232   { echo "$as_me:9232: WARNING: Unexpected manpage-format $cf_unknown" >&5
9233 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9234 fi
9235
9236 echo "$as_me:9236: checking for manpage renaming" >&5
9237 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9238
9239 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9240 if test "${with_manpage_renames+set}" = set; then
9241   withval="$with_manpage_renames"
9242   MANPAGE_RENAMES=$withval
9243 else
9244   MANPAGE_RENAMES=yes
9245 fi;
9246
9247 case ".$MANPAGE_RENAMES" in #(vi
9248 .no) #(vi
9249   ;;
9250 .|.yes)
9251   # Debian 'man' program?
9252   if test -f /etc/debian_version ; then
9253     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9254   else
9255     MANPAGE_RENAMES=no
9256   fi
9257   ;;
9258 esac
9259
9260 if test "$MANPAGE_RENAMES" != no ; then
9261   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9262     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9263   elif test ! -f $MANPAGE_RENAMES ; then
9264     { { echo "$as_me:9264: error: not a filename: $MANPAGE_RENAMES" >&5
9265 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9266    { (exit 1); exit 1; }; }
9267   fi
9268
9269   test ! -d man && mkdir man
9270
9271   # Construct a sed-script to perform renaming within man-pages
9272   if test -n "$MANPAGE_RENAMES" ; then
9273     test ! -d man && mkdir man
9274     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9275   fi
9276 fi
9277
9278 echo "$as_me:9278: result: $MANPAGE_RENAMES" >&5
9279 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9280
9281 echo "$as_me:9281: checking if manpage aliases will be installed" >&5
9282 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9283
9284 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9285 if test "${with_manpage_aliases+set}" = set; then
9286   withval="$with_manpage_aliases"
9287   MANPAGE_ALIASES=$withval
9288 else
9289   MANPAGE_ALIASES=yes
9290 fi;
9291
9292 echo "$as_me:9292: result: $MANPAGE_ALIASES" >&5
9293 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9294
9295 if test "$LN_S" = "ln -s"; then
9296         cf_use_symlinks=yes
9297 else
9298         cf_use_symlinks=no
9299 fi
9300
9301 MANPAGE_SYMLINKS=no
9302 if test "$MANPAGE_ALIASES" = yes ; then
9303 echo "$as_me:9303: checking if manpage symlinks should be used" >&5
9304 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9305
9306 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9307 if test "${with_manpage_symlinks+set}" = set; then
9308   withval="$with_manpage_symlinks"
9309   MANPAGE_SYMLINKS=$withval
9310 else
9311   MANPAGE_SYMLINKS=$cf_use_symlinks
9312 fi;
9313
9314 if test "$$cf_use_symlinks" = no; then
9315 if test "$MANPAGE_SYMLINKS" = yes ; then
9316         { echo "$as_me:9316: WARNING: cannot make symlinks" >&5
9317 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9318         MANPAGE_SYMLINKS=no
9319 fi
9320 fi
9321
9322 echo "$as_me:9322: result: $MANPAGE_SYMLINKS" >&5
9323 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9324 fi
9325
9326 echo "$as_me:9326: checking for manpage tbl" >&5
9327 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9328
9329 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9330 if test "${with_manpage_tbl+set}" = set; then
9331   withval="$with_manpage_tbl"
9332   MANPAGE_TBL=$withval
9333 else
9334   MANPAGE_TBL=no
9335 fi;
9336
9337 echo "$as_me:9337: result: $MANPAGE_TBL" >&5
9338 echo "${ECHO_T}$MANPAGE_TBL" >&6
9339
9340   if test "$prefix" = "NONE" ; then
9341      cf_prefix="$ac_default_prefix"
9342   else
9343      cf_prefix="$prefix"
9344   fi
9345
9346   case "$MANPAGE_FORMAT" in # (vi
9347   *catonly*) # (vi
9348     cf_format=yes
9349     cf_inboth=no
9350     ;;
9351   *formatted*) # (vi
9352     cf_format=yes
9353     cf_inboth=yes
9354     ;;
9355   *)
9356     cf_format=no
9357     cf_inboth=no
9358     ;;
9359   esac
9360
9361 test ! -d man && mkdir man
9362
9363 cf_so_strip=
9364 cf_compress=
9365 case "$MANPAGE_FORMAT" in #(vi
9366 *compress*) #(vi
9367         cf_so_strip="Z"
9368         cf_compress=compress
9369   ;;
9370 *gzip*) #(vi
9371         cf_so_strip="gz"
9372         cf_compress=gzip
9373   ;;
9374 esac
9375
9376 cf_edit_man=./edit_man.sh
9377 cf_man_alias=`pwd`/man_alias.sed
9378
9379 cat >$cf_edit_man <<CF_EOF
9380 #! /bin/sh
9381 # this script is generated by the configure-script CF_MAN_PAGES macro.
9382
9383 prefix="$cf_prefix"
9384 datadir="$datadir"
9385
9386 NCURSES_MAJOR="$NCURSES_MAJOR"
9387 NCURSES_MINOR="$NCURSES_MINOR"
9388 NCURSES_PATCH="$NCURSES_PATCH"
9389
9390 NCURSES_OSPEED="$NCURSES_OSPEED"
9391 TERMINFO="$TERMINFO"
9392
9393 MKDIRS="sh `cd $srcdir && pwd`/mkdirs.sh"
9394
9395 INSTALL="$INSTALL"
9396 INSTALL_DATA="$INSTALL_DATA"
9397
9398 transform="$program_transform_name"
9399
9400 TMP=\${TMPDIR-/tmp}/man\$\$
9401 trap "rm -f \$TMP" 0 1 2 5 15
9402
9403 form=\$1
9404 shift || exit 1
9405
9406 verb=\$1
9407 shift || exit 1
9408
9409 mandir=\$1
9410 shift || exit 1
9411
9412 srcdir=\$1
9413 top_srcdir=\$srcdir/..
9414 shift || exit 1
9415
9416 if test "\$form" = normal ; then
9417         if test "$cf_format" = yes ; then
9418         if test "$cf_inboth" = no ; then
9419                 sh \$0 format \$verb \$mandir \$srcdir \$*
9420                 exit $?
9421         fi
9422         fi
9423         cf_subdir=\$mandir/man
9424         cf_tables=$MANPAGE_TBL
9425 else
9426         cf_subdir=\$mandir/cat
9427         cf_tables=yes
9428 fi
9429
9430 # process the list of source-files
9431 for i in \$* ; do
9432 case \$i in #(vi
9433 *.orig|*.rej) ;; #(vi
9434 *.[0-9]*)
9435         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9436         if test \$verb = installing ; then
9437         if test ! -d \$cf_subdir\${section} ; then
9438                 \$MKDIRS \$cf_subdir\$section
9439         fi
9440         fi
9441
9442         # replace variables in man page
9443         if test ! -f $cf_man_alias ; then
9444 cat >>$cf_man_alias <<-CF_EOF2
9445                 s,@DATADIR@,\$datadir,g
9446                 s,@TERMINFO@,\$TERMINFO,g
9447                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9448                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9449                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9450                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9451 CF_EOF
9452
9453         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9454         do
9455                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9456                 cf_name=`echo $cf_name|sed "$program_transform_name"`
9457 cat >>$cf_edit_man <<-CF_EOF
9458                 s,@$cf_NAME@,$cf_name,g
9459 CF_EOF
9460         done
9461
9462 cat >>$cf_edit_man <<CF_EOF
9463 CF_EOF2
9464                 echo "...made $cf_man_alias"
9465         fi
9466
9467         aliases=
9468         cf_source=\`basename \$i\`
9469         inalias=\$cf_source
9470         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
9471         if test ! -f \$inalias ; then
9472                 echo .. skipped \$cf_source
9473                 continue
9474         fi
9475 CF_EOF
9476
9477 if test "$MANPAGE_ALIASES" != no ; then
9478 cat >>$cf_edit_man <<CF_EOF
9479         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
9480 CF_EOF
9481 fi
9482
9483 if test "$MANPAGE_RENAMES" = no ; then
9484 cat >>$cf_edit_man <<CF_EOF
9485         # perform program transformations for section 1 man pages
9486         if test \$section = 1 ; then
9487                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
9488         else
9489                 cf_target=\$cf_subdir\${section}/\$cf_source
9490         fi
9491 CF_EOF
9492 else
9493 cat >>$cf_edit_man <<CF_EOF
9494         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
9495         if test -z "\$cf_target" ; then
9496                 echo '? missing rename for '\$cf_source
9497                 cf_target="\$cf_source"
9498         fi
9499         cf_target="\$cf_subdir\${section}/\${cf_target}"
9500
9501 CF_EOF
9502 fi
9503
9504 cat >>$cf_edit_man <<CF_EOF
9505         sed     -f $cf_man_alias \\
9506 CF_EOF
9507
9508 if test -f $MANPAGE_RENAMES ; then
9509 cat >>$cf_edit_man <<CF_EOF
9510                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
9511 CF_EOF
9512 else
9513 cat >>$cf_edit_man <<CF_EOF
9514                 < \$i >\$TMP
9515 CF_EOF
9516 fi
9517
9518 cat >>$cf_edit_man <<CF_EOF
9519 if test \$cf_tables = yes ; then
9520         tbl \$TMP >\$TMP.out
9521         mv \$TMP.out \$TMP
9522 fi
9523 CF_EOF
9524
9525 if test $with_curses_h != yes ; then
9526 cat >>$cf_edit_man <<CF_EOF
9527         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
9528         mv \$TMP.out \$TMP
9529 CF_EOF
9530 fi
9531
9532 cat >>$cf_edit_man <<CF_EOF
9533         if test \$form = format ; then
9534                 nroff -man \$TMP >\$TMP.out
9535                 mv \$TMP.out \$TMP
9536         fi
9537 CF_EOF
9538
9539 if test -n "$cf_compress" ; then
9540 cat >>$cf_edit_man <<CF_EOF
9541         if test \$verb = installing ; then
9542         if ( $cf_compress -f \$TMP )
9543         then
9544                 mv \$TMP.$cf_so_strip \$TMP
9545         fi
9546         fi
9547         cf_target="\$cf_target.$cf_so_strip"
9548 CF_EOF
9549 fi
9550
9551 case "$MANPAGE_FORMAT" in #(vi
9552 *BSDI*)
9553 cat >>$cf_edit_man <<CF_EOF
9554         if test \$form = format ; then
9555                 # BSDI installs only .0 suffixes in the cat directories
9556                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
9557         fi
9558 CF_EOF
9559   ;;
9560 esac
9561
9562 cat >>$cf_edit_man <<CF_EOF
9563         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
9564         if test \$verb = installing ; then
9565                 echo \$verb \$cf_target
9566                 \$INSTALL_DATA \$TMP \$cf_target
9567                 test -d \$cf_subdir\${section} &&
9568                 test -n "\$aliases" && (
9569                         cd \$cf_subdir\${section} && (
9570                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
9571                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
9572                                 cf_target=\`basename \$cf_target\`
9573                                 for cf_alias in \$aliases
9574                                 do
9575                                         if test \$section = 1 ; then
9576                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9577                                         fi
9578
9579                                         if test "$MANPAGE_SYMLINKS" = yes ; then
9580                                                 if test -f \$cf_alias\${suffix} ; then
9581                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
9582                                                         then
9583                                                                 continue
9584                                                         fi
9585                                                 fi
9586                                                 echo .. \$verb alias \$cf_alias\${suffix}
9587                                                 rm -f \$cf_alias\${suffix}
9588                                                 $LN_S \$cf_target \$cf_alias\${suffix}
9589                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
9590                                                 echo ".so \$cf_source" >\$TMP
9591 CF_EOF
9592 if test -n "$cf_compress" ; then
9593 cat >>$cf_edit_man <<CF_EOF
9594                                                 if test -n "$cf_so_strip" ; then
9595                                                         $cf_compress -f \$TMP
9596                                                         mv \$TMP.$cf_so_strip \$TMP
9597                                                 fi
9598 CF_EOF
9599 fi
9600 cat >>$cf_edit_man <<CF_EOF
9601                                                 echo .. \$verb alias \$cf_alias\${suffix}
9602                                                 rm -f \$cf_alias\${suffix}
9603                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
9604                                         fi
9605                                 done
9606                         )
9607                 )
9608         elif test \$verb = removing ; then
9609                 test -f \$cf_target && (
9610                         echo \$verb \$cf_target
9611                         rm -f \$cf_target
9612                 )
9613                 test -d \$cf_subdir\${section} &&
9614                 test -n "\$aliases" && (
9615                         cd \$cf_subdir\${section} && (
9616                                 for cf_alias in \$aliases
9617                                 do
9618                                         if test \$section = 1 ; then
9619                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
9620                                         fi
9621
9622                                         echo .. \$verb alias \$cf_alias\${suffix}
9623                                         rm -f \$cf_alias\${suffix}
9624                                 done
9625                         )
9626                 )
9627         else
9628 #               echo ".hy 0"
9629                 cat \$TMP
9630         fi
9631         ;;
9632 esac
9633 done
9634
9635 if test $cf_inboth = yes ; then
9636 if test \$form != format ; then
9637         sh \$0 format \$verb \$mandir \$srcdir \$*
9638 fi
9639 fi
9640
9641 exit 0
9642 CF_EOF
9643 chmod 755 $cf_edit_man
9644
9645 ###############################################################################
9646
9647 ### Note that some functions (such as const) are normally disabled anyway.
9648 echo "$as_me:9648: checking if you want to build with function extensions" >&5
9649 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
9650
9651 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
9652 if test "${enable_ext_funcs+set}" = set; then
9653   enableval="$enable_ext_funcs"
9654   with_ext_funcs=$enableval
9655 else
9656   with_ext_funcs=yes
9657 fi;
9658 echo "$as_me:9658: result: $with_ext_funcs" >&5
9659 echo "${ECHO_T}$with_ext_funcs" >&6
9660 if test "$with_ext_funcs" = yes ; then
9661         NCURSES_EXT_FUNCS=1
9662         cat >>confdefs.h <<\EOF
9663 #define HAVE_CURSES_VERSION 1
9664 EOF
9665
9666         cat >>confdefs.h <<\EOF
9667 #define HAVE_HAS_KEY 1
9668 EOF
9669
9670         cat >>confdefs.h <<\EOF
9671 #define HAVE_RESIZETERM 1
9672 EOF
9673
9674         cat >>confdefs.h <<\EOF
9675 #define HAVE_RESIZE_TERM 1
9676 EOF
9677
9678         cat >>confdefs.h <<\EOF
9679 #define HAVE_USE_DEFAULT_COLORS 1
9680 EOF
9681
9682         cat >>confdefs.h <<\EOF
9683 #define HAVE_WRESIZE 1
9684 EOF
9685
9686         cat >>confdefs.h <<\EOF
9687 #define NCURSES_EXT_FUNCS 1
9688 EOF
9689
9690         GENERATED_EXT_FUNCS=generated
9691 else
9692         NCURSES_EXT_FUNCS=0
9693         GENERATED_EXT_FUNCS=
9694 fi
9695
9696 echo "$as_me:9696: checking if you want to build with experimental SCREEN extensions" >&5
9697 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
9698
9699 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
9700 if test "${enable_sp_funcs+set}" = set; then
9701   enableval="$enable_sp_funcs"
9702   with_sp_funcs=$enableval
9703 else
9704   with_sp_funcs=no
9705 fi;
9706 echo "$as_me:9706: result: $with_sp_funcs" >&5
9707 echo "${ECHO_T}$with_sp_funcs" >&6
9708 if test "$with_sp_funcs" = yes ; then
9709         NCURSES_SP_FUNCS=1
9710         cat >>confdefs.h <<\EOF
9711 #define NCURSES_SP_FUNCS 1
9712 EOF
9713
9714         GENERATED_SP_FUNCS=generated
9715 else
9716         NCURSES_SP_FUNCS=0
9717         GENERATED_SP_FUNCS=
9718 fi
9719
9720 echo "$as_me:9720: checking if you want to build with experimental terminal-driver" >&5
9721 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
9722
9723 # Check whether --enable-term-driver or --disable-term-driver was given.
9724 if test "${enable_term_driver+set}" = set; then
9725   enableval="$enable_term_driver"
9726   with_term_driver=$enableval
9727 else
9728   with_term_driver=no
9729 fi;
9730 echo "$as_me:9730: result: $with_term_driver" >&5
9731 echo "${ECHO_T}$with_term_driver" >&6
9732 if test "$with_term_driver" = yes ; then
9733         cat >>confdefs.h <<\EOF
9734 #define USE_TERM_DRIVER 1
9735 EOF
9736
9737         if test "$with_sp_funcs" != yes ; then
9738                 { { echo "$as_me:9738: error: The term-driver option relies upon sp-funcs" >&5
9739 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
9740    { (exit 1); exit 1; }; }
9741         fi
9742 fi
9743
9744 ###   use option --enable-const to turn on use of const beyond that in XSI.
9745 echo "$as_me:9745: checking for extended use of const keyword" >&5
9746 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
9747
9748 # Check whether --enable-const or --disable-const was given.
9749 if test "${enable_const+set}" = set; then
9750   enableval="$enable_const"
9751   with_ext_const=$enableval
9752 else
9753   with_ext_const=no
9754 fi;
9755 echo "$as_me:9755: result: $with_ext_const" >&5
9756 echo "${ECHO_T}$with_ext_const" >&6
9757 NCURSES_CONST='/*nothing*/'
9758 if test "$with_ext_const" = yes ; then
9759         NCURSES_CONST=const
9760 fi
9761
9762 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
9763 echo "$as_me:9763: checking if you want to use extended colors" >&5
9764 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
9765
9766 # Check whether --enable-ext-colors or --disable-ext-colors was given.
9767 if test "${enable_ext_colors+set}" = set; then
9768   enableval="$enable_ext_colors"
9769   with_ext_colors=$enableval
9770 else
9771   with_ext_colors=no
9772 fi;
9773 echo "$as_me:9773: result: $with_ext_colors" >&5
9774 echo "${ECHO_T}$with_ext_colors" >&6
9775 NCURSES_EXT_COLORS=0
9776 if test "$with_ext_colors" = yes ; then
9777         if test "$with_widec" != yes ; then
9778                 { { echo "$as_me:9778: error: This option applies only to wide-character library" >&5
9779 echo "$as_me: error: This option applies only to wide-character library" >&2;}
9780    { (exit 1); exit 1; }; }
9781         else
9782                 # cannot be ABI 5 since it changes sizeof(cchar_t)
9783
9784 if test "${with_abi_version+set}" != set; then
9785         case $cf_cv_rel_version in
9786         5.*)
9787                 cf_cv_rel_version=6.0
9788                 cf_cv_abi_version=6
9789                 { echo "$as_me:9789: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9790 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9791                 ;;
9792         esac
9793 fi
9794
9795         fi
9796         NCURSES_EXT_COLORS=1
9797         cat >>confdefs.h <<\EOF
9798 #define NCURSES_EXT_COLORS 1
9799 EOF
9800
9801 fi
9802
9803 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
9804 echo "$as_me:9804: checking if you want to use extended mouse encoding" >&5
9805 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
9806
9807 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
9808 if test "${enable_ext_mouse+set}" = set; then
9809   enableval="$enable_ext_mouse"
9810   with_ext_mouse=$enableval
9811 else
9812   with_ext_mouse=no
9813 fi;
9814 echo "$as_me:9814: result: $with_ext_mouse" >&5
9815 echo "${ECHO_T}$with_ext_mouse" >&6
9816 NCURSES_MOUSE_VERSION=1
9817 if test "$with_ext_mouse" = yes ; then
9818         NCURSES_MOUSE_VERSION=2
9819
9820 if test "${with_abi_version+set}" != set; then
9821         case $cf_cv_rel_version in
9822         5.*)
9823                 cf_cv_rel_version=6.0
9824                 cf_cv_abi_version=6
9825                 { echo "$as_me:9825: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
9826 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
9827                 ;;
9828         esac
9829 fi
9830
9831 fi
9832
9833 echo "$as_me:9833: checking if you want \$NCURSES_NO_PADDING code" >&5
9834 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
9835
9836 # Check whether --enable-no-padding or --disable-no-padding was given.
9837 if test "${enable_no_padding+set}" = set; then
9838   enableval="$enable_no_padding"
9839   with_no_padding=$enableval
9840 else
9841   with_no_padding=$with_ext_funcs
9842 fi;
9843 echo "$as_me:9843: result: $with_no_padding" >&5
9844 echo "${ECHO_T}$with_no_padding" >&6
9845 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
9846 #define NCURSES_NO_PADDING 1
9847 EOF
9848
9849 echo "$as_me:9849: checking for ANSI C header files" >&5
9850 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
9851 if test "${ac_cv_header_stdc+set}" = set; then
9852   echo $ECHO_N "(cached) $ECHO_C" >&6
9853 else
9854   cat >conftest.$ac_ext <<_ACEOF
9855 #line 9855 "configure"
9856 #include "confdefs.h"
9857 #include <stdlib.h>
9858 #include <stdarg.h>
9859 #include <string.h>
9860 #include <float.h>
9861
9862 _ACEOF
9863 if { (eval echo "$as_me:9863: \"$ac_cpp conftest.$ac_ext\"") >&5
9864   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9865   ac_status=$?
9866   egrep -v '^ *\+' conftest.er1 >conftest.err
9867   rm -f conftest.er1
9868   cat conftest.err >&5
9869   echo "$as_me:9869: \$? = $ac_status" >&5
9870   (exit $ac_status); } >/dev/null; then
9871   if test -s conftest.err; then
9872     ac_cpp_err=$ac_c_preproc_warn_flag
9873   else
9874     ac_cpp_err=
9875   fi
9876 else
9877   ac_cpp_err=yes
9878 fi
9879 if test -z "$ac_cpp_err"; then
9880   ac_cv_header_stdc=yes
9881 else
9882   echo "$as_me: failed program was:" >&5
9883   cat conftest.$ac_ext >&5
9884   ac_cv_header_stdc=no
9885 fi
9886 rm -f conftest.err conftest.$ac_ext
9887
9888 if test $ac_cv_header_stdc = yes; then
9889   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
9890   cat >conftest.$ac_ext <<_ACEOF
9891 #line 9891 "configure"
9892 #include "confdefs.h"
9893 #include <string.h>
9894
9895 _ACEOF
9896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9897   egrep "memchr" >/dev/null 2>&1; then
9898   :
9899 else
9900   ac_cv_header_stdc=no
9901 fi
9902 rm -f conftest*
9903
9904 fi
9905
9906 if test $ac_cv_header_stdc = yes; then
9907   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
9908   cat >conftest.$ac_ext <<_ACEOF
9909 #line 9909 "configure"
9910 #include "confdefs.h"
9911 #include <stdlib.h>
9912
9913 _ACEOF
9914 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9915   egrep "free" >/dev/null 2>&1; then
9916   :
9917 else
9918   ac_cv_header_stdc=no
9919 fi
9920 rm -f conftest*
9921
9922 fi
9923
9924 if test $ac_cv_header_stdc = yes; then
9925   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
9926   if test "$cross_compiling" = yes; then
9927   :
9928 else
9929   cat >conftest.$ac_ext <<_ACEOF
9930 #line 9930 "configure"
9931 #include "confdefs.h"
9932 #include <ctype.h>
9933 #if ((' ' & 0x0FF) == 0x020)
9934 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
9935 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
9936 #else
9937 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
9938                      || ('j' <= (c) && (c) <= 'r') \
9939                      || ('s' <= (c) && (c) <= 'z'))
9940 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
9941 #endif
9942
9943 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
9944 int
9945 main ()
9946 {
9947   int i;
9948   for (i = 0; i < 256; i++)
9949     if (XOR (islower (i), ISLOWER (i))
9950         || toupper (i) != TOUPPER (i))
9951       $ac_main_return(2);
9952   $ac_main_return (0);
9953 }
9954 _ACEOF
9955 rm -f conftest$ac_exeext
9956 if { (eval echo "$as_me:9956: \"$ac_link\"") >&5
9957   (eval $ac_link) 2>&5
9958   ac_status=$?
9959   echo "$as_me:9959: \$? = $ac_status" >&5
9960   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
9961   { (eval echo "$as_me:9961: \"$ac_try\"") >&5
9962   (eval $ac_try) 2>&5
9963   ac_status=$?
9964   echo "$as_me:9964: \$? = $ac_status" >&5
9965   (exit $ac_status); }; }; then
9966   :
9967 else
9968   echo "$as_me: program exited with status $ac_status" >&5
9969 echo "$as_me: failed program was:" >&5
9970 cat conftest.$ac_ext >&5
9971 ac_cv_header_stdc=no
9972 fi
9973 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
9974 fi
9975 fi
9976 fi
9977 echo "$as_me:9977: result: $ac_cv_header_stdc" >&5
9978 echo "${ECHO_T}$ac_cv_header_stdc" >&6
9979 if test $ac_cv_header_stdc = yes; then
9980
9981 cat >>confdefs.h <<\EOF
9982 #define STDC_HEADERS 1
9983 EOF
9984
9985 fi
9986
9987 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
9988
9989 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
9990                   inttypes.h stdint.h unistd.h
9991 do
9992 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9993 echo "$as_me:9993: checking for $ac_header" >&5
9994 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9995 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9996   echo $ECHO_N "(cached) $ECHO_C" >&6
9997 else
9998   cat >conftest.$ac_ext <<_ACEOF
9999 #line 9999 "configure"
10000 #include "confdefs.h"
10001 $ac_includes_default
10002 #include <$ac_header>
10003 _ACEOF
10004 rm -f conftest.$ac_objext
10005 if { (eval echo "$as_me:10005: \"$ac_compile\"") >&5
10006   (eval $ac_compile) 2>&5
10007   ac_status=$?
10008   echo "$as_me:10008: \$? = $ac_status" >&5
10009   (exit $ac_status); } &&
10010          { ac_try='test -s conftest.$ac_objext'
10011   { (eval echo "$as_me:10011: \"$ac_try\"") >&5
10012   (eval $ac_try) 2>&5
10013   ac_status=$?
10014   echo "$as_me:10014: \$? = $ac_status" >&5
10015   (exit $ac_status); }; }; then
10016   eval "$as_ac_Header=yes"
10017 else
10018   echo "$as_me: failed program was:" >&5
10019 cat conftest.$ac_ext >&5
10020 eval "$as_ac_Header=no"
10021 fi
10022 rm -f conftest.$ac_objext conftest.$ac_ext
10023 fi
10024 echo "$as_me:10024: result: `eval echo '${'$as_ac_Header'}'`" >&5
10025 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10026 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10027   cat >>confdefs.h <<EOF
10028 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10029 EOF
10030
10031 fi
10032 done
10033
10034 echo "$as_me:10034: checking for signed char" >&5
10035 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10036 if test "${ac_cv_type_signed_char+set}" = set; then
10037   echo $ECHO_N "(cached) $ECHO_C" >&6
10038 else
10039   cat >conftest.$ac_ext <<_ACEOF
10040 #line 10040 "configure"
10041 #include "confdefs.h"
10042 $ac_includes_default
10043 int
10044 main ()
10045 {
10046 if ((signed char *) 0)
10047   return 0;
10048 if (sizeof (signed char))
10049   return 0;
10050   ;
10051   return 0;
10052 }
10053 _ACEOF
10054 rm -f conftest.$ac_objext
10055 if { (eval echo "$as_me:10055: \"$ac_compile\"") >&5
10056   (eval $ac_compile) 2>&5
10057   ac_status=$?
10058   echo "$as_me:10058: \$? = $ac_status" >&5
10059   (exit $ac_status); } &&
10060          { ac_try='test -s conftest.$ac_objext'
10061   { (eval echo "$as_me:10061: \"$ac_try\"") >&5
10062   (eval $ac_try) 2>&5
10063   ac_status=$?
10064   echo "$as_me:10064: \$? = $ac_status" >&5
10065   (exit $ac_status); }; }; then
10066   ac_cv_type_signed_char=yes
10067 else
10068   echo "$as_me: failed program was:" >&5
10069 cat conftest.$ac_ext >&5
10070 ac_cv_type_signed_char=no
10071 fi
10072 rm -f conftest.$ac_objext conftest.$ac_ext
10073 fi
10074 echo "$as_me:10074: result: $ac_cv_type_signed_char" >&5
10075 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10076
10077 echo "$as_me:10077: checking size of signed char" >&5
10078 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10079 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10080   echo $ECHO_N "(cached) $ECHO_C" >&6
10081 else
10082   if test "$ac_cv_type_signed_char" = yes; then
10083   if test "$cross_compiling" = yes; then
10084   # Depending upon the size, compute the lo and hi bounds.
10085 cat >conftest.$ac_ext <<_ACEOF
10086 #line 10086 "configure"
10087 #include "confdefs.h"
10088 $ac_includes_default
10089 int
10090 main ()
10091 {
10092 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10093   ;
10094   return 0;
10095 }
10096 _ACEOF
10097 rm -f conftest.$ac_objext
10098 if { (eval echo "$as_me:10098: \"$ac_compile\"") >&5
10099   (eval $ac_compile) 2>&5
10100   ac_status=$?
10101   echo "$as_me:10101: \$? = $ac_status" >&5
10102   (exit $ac_status); } &&
10103          { ac_try='test -s conftest.$ac_objext'
10104   { (eval echo "$as_me:10104: \"$ac_try\"") >&5
10105   (eval $ac_try) 2>&5
10106   ac_status=$?
10107   echo "$as_me:10107: \$? = $ac_status" >&5
10108   (exit $ac_status); }; }; then
10109   ac_lo=0 ac_mid=0
10110   while :; do
10111     cat >conftest.$ac_ext <<_ACEOF
10112 #line 10112 "configure"
10113 #include "confdefs.h"
10114 $ac_includes_default
10115 int
10116 main ()
10117 {
10118 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10119   ;
10120   return 0;
10121 }
10122 _ACEOF
10123 rm -f conftest.$ac_objext
10124 if { (eval echo "$as_me:10124: \"$ac_compile\"") >&5
10125   (eval $ac_compile) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit $ac_status); } &&
10129          { ac_try='test -s conftest.$ac_objext'
10130   { (eval echo "$as_me:10130: \"$ac_try\"") >&5
10131   (eval $ac_try) 2>&5
10132   ac_status=$?
10133   echo "$as_me:10133: \$? = $ac_status" >&5
10134   (exit $ac_status); }; }; then
10135   ac_hi=$ac_mid; break
10136 else
10137   echo "$as_me: failed program was:" >&5
10138 cat conftest.$ac_ext >&5
10139 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10140 fi
10141 rm -f conftest.$ac_objext conftest.$ac_ext
10142   done
10143 else
10144   echo "$as_me: failed program was:" >&5
10145 cat conftest.$ac_ext >&5
10146 ac_hi=-1 ac_mid=-1
10147   while :; do
10148     cat >conftest.$ac_ext <<_ACEOF
10149 #line 10149 "configure"
10150 #include "confdefs.h"
10151 $ac_includes_default
10152 int
10153 main ()
10154 {
10155 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10156   ;
10157   return 0;
10158 }
10159 _ACEOF
10160 rm -f conftest.$ac_objext
10161 if { (eval echo "$as_me:10161: \"$ac_compile\"") >&5
10162   (eval $ac_compile) 2>&5
10163   ac_status=$?
10164   echo "$as_me:10164: \$? = $ac_status" >&5
10165   (exit $ac_status); } &&
10166          { ac_try='test -s conftest.$ac_objext'
10167   { (eval echo "$as_me:10167: \"$ac_try\"") >&5
10168   (eval $ac_try) 2>&5
10169   ac_status=$?
10170   echo "$as_me:10170: \$? = $ac_status" >&5
10171   (exit $ac_status); }; }; then
10172   ac_lo=$ac_mid; break
10173 else
10174   echo "$as_me: failed program was:" >&5
10175 cat conftest.$ac_ext >&5
10176 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10177 fi
10178 rm -f conftest.$ac_objext conftest.$ac_ext
10179   done
10180 fi
10181 rm -f conftest.$ac_objext conftest.$ac_ext
10182 # Binary search between lo and hi bounds.
10183 while test "x$ac_lo" != "x$ac_hi"; do
10184   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10185   cat >conftest.$ac_ext <<_ACEOF
10186 #line 10186 "configure"
10187 #include "confdefs.h"
10188 $ac_includes_default
10189 int
10190 main ()
10191 {
10192 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10193   ;
10194   return 0;
10195 }
10196 _ACEOF
10197 rm -f conftest.$ac_objext
10198 if { (eval echo "$as_me:10198: \"$ac_compile\"") >&5
10199   (eval $ac_compile) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit $ac_status); } &&
10203          { ac_try='test -s conftest.$ac_objext'
10204   { (eval echo "$as_me:10204: \"$ac_try\"") >&5
10205   (eval $ac_try) 2>&5
10206   ac_status=$?
10207   echo "$as_me:10207: \$? = $ac_status" >&5
10208   (exit $ac_status); }; }; then
10209   ac_hi=$ac_mid
10210 else
10211   echo "$as_me: failed program was:" >&5
10212 cat conftest.$ac_ext >&5
10213 ac_lo=`expr $ac_mid + 1`
10214 fi
10215 rm -f conftest.$ac_objext conftest.$ac_ext
10216 done
10217 ac_cv_sizeof_signed_char=$ac_lo
10218 else
10219   if test "$cross_compiling" = yes; then
10220   { { echo "$as_me:10220: error: cannot run test program while cross compiling" >&5
10221 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10222    { (exit 1); exit 1; }; }
10223 else
10224   cat >conftest.$ac_ext <<_ACEOF
10225 #line 10225 "configure"
10226 #include "confdefs.h"
10227 $ac_includes_default
10228 int
10229 main ()
10230 {
10231 FILE *f = fopen ("conftest.val", "w");
10232 if (!f)
10233   $ac_main_return (1);
10234 fprintf (f, "%d", (sizeof (signed char)));
10235 fclose (f);
10236   ;
10237   return 0;
10238 }
10239 _ACEOF
10240 rm -f conftest$ac_exeext
10241 if { (eval echo "$as_me:10241: \"$ac_link\"") >&5
10242   (eval $ac_link) 2>&5
10243   ac_status=$?
10244   echo "$as_me:10244: \$? = $ac_status" >&5
10245   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10246   { (eval echo "$as_me:10246: \"$ac_try\"") >&5
10247   (eval $ac_try) 2>&5
10248   ac_status=$?
10249   echo "$as_me:10249: \$? = $ac_status" >&5
10250   (exit $ac_status); }; }; then
10251   ac_cv_sizeof_signed_char=`cat conftest.val`
10252 else
10253   echo "$as_me: program exited with status $ac_status" >&5
10254 echo "$as_me: failed program was:" >&5
10255 cat conftest.$ac_ext >&5
10256 fi
10257 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10258 fi
10259 fi
10260 rm -f conftest.val
10261 else
10262   ac_cv_sizeof_signed_char=0
10263 fi
10264 fi
10265 echo "$as_me:10265: result: $ac_cv_sizeof_signed_char" >&5
10266 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10267 cat >>confdefs.h <<EOF
10268 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10269 EOF
10270
10271 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10272         NCURSES_SBOOL="signed char"
10273 else
10274         NCURSES_SBOOL="char"
10275 fi
10276 echo "$as_me:10276: checking if you want to use signed Boolean array in term.h" >&5
10277 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10278
10279 # Check whether --enable-signed-char or --disable-signed-char was given.
10280 if test "${enable_signed_char+set}" = set; then
10281   enableval="$enable_signed_char"
10282   with_signed_char=$enableval
10283 else
10284   with_signed_char=no
10285 fi;
10286 echo "$as_me:10286: result: $with_signed_char" >&5
10287 echo "${ECHO_T}$with_signed_char" >&6
10288 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10289
10290 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10291 echo "$as_me:10291: checking if you want SIGWINCH handler" >&5
10292 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10293
10294 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10295 if test "${enable_sigwinch+set}" = set; then
10296   enableval="$enable_sigwinch"
10297   with_sigwinch=$enableval
10298 else
10299   with_sigwinch=$with_ext_funcs
10300 fi;
10301 echo "$as_me:10301: result: $with_sigwinch" >&5
10302 echo "${ECHO_T}$with_sigwinch" >&6
10303 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10304 #define USE_SIGWINCH 1
10305 EOF
10306
10307 ###   use option --enable-tcap-names to allow user to define new capabilities
10308 echo "$as_me:10308: checking if you want user-definable terminal capabilities like termcap" >&5
10309 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10310
10311 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10312 if test "${enable_tcap_names+set}" = set; then
10313   enableval="$enable_tcap_names"
10314   with_tcap_names=$enableval
10315 else
10316   with_tcap_names=$with_ext_funcs
10317 fi;
10318 echo "$as_me:10318: result: $with_tcap_names" >&5
10319 echo "${ECHO_T}$with_tcap_names" >&6
10320 NCURSES_XNAMES=0
10321 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10322
10323 ###############################################################################
10324 # These options are relatively safe to experiment with.
10325
10326 echo "$as_me:10326: checking if you want all development code" >&5
10327 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10328
10329 # Check whether --with-develop or --without-develop was given.
10330 if test "${with_develop+set}" = set; then
10331   withval="$with_develop"
10332   with_develop=$withval
10333 else
10334   with_develop=no
10335 fi;
10336 echo "$as_me:10336: result: $with_develop" >&5
10337 echo "${ECHO_T}$with_develop" >&6
10338
10339 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10340 echo "$as_me:10340: checking if you want hard-tabs code" >&5
10341 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10342
10343 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10344 if test "${enable_hard_tabs+set}" = set; then
10345   enableval="$enable_hard_tabs"
10346
10347 else
10348   enable_hard_tabs=$with_develop
10349 fi;
10350 echo "$as_me:10350: result: $enable_hard_tabs" >&5
10351 echo "${ECHO_T}$enable_hard_tabs" >&6
10352 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10353 #define USE_HARD_TABS 1
10354 EOF
10355
10356 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10357 echo "$as_me:10357: checking if you want limited support for xmc" >&5
10358 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10359
10360 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10361 if test "${enable_xmc_glitch+set}" = set; then
10362   enableval="$enable_xmc_glitch"
10363
10364 else
10365   enable_xmc_glitch=$with_develop
10366 fi;
10367 echo "$as_me:10367: result: $enable_xmc_glitch" >&5
10368 echo "${ECHO_T}$enable_xmc_glitch" >&6
10369 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10370 #define USE_XMC_SUPPORT 1
10371 EOF
10372
10373 ###############################################################################
10374 # These are just experimental, probably should not be in a package:
10375
10376 echo "$as_me:10376: checking if you do not want to assume colors are white-on-black" >&5
10377 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10378
10379 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10380 if test "${enable_assumed_color+set}" = set; then
10381   enableval="$enable_assumed_color"
10382   with_assumed_color=$enableval
10383 else
10384   with_assumed_color=yes
10385 fi;
10386 echo "$as_me:10386: result: $with_assumed_color" >&5
10387 echo "${ECHO_T}$with_assumed_color" >&6
10388 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10389 #define USE_ASSUMED_COLOR 1
10390 EOF
10391
10392 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10393 echo "$as_me:10393: checking if you want hashmap scrolling-optimization code" >&5
10394 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10395
10396 # Check whether --enable-hashmap or --disable-hashmap was given.
10397 if test "${enable_hashmap+set}" = set; then
10398   enableval="$enable_hashmap"
10399   with_hashmap=$enableval
10400 else
10401   with_hashmap=yes
10402 fi;
10403 echo "$as_me:10403: result: $with_hashmap" >&5
10404 echo "${ECHO_T}$with_hashmap" >&6
10405 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10406 #define USE_HASHMAP 1
10407 EOF
10408
10409 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10410 echo "$as_me:10410: checking if you want colorfgbg code" >&5
10411 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10412
10413 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10414 if test "${enable_colorfgbg+set}" = set; then
10415   enableval="$enable_colorfgbg"
10416   with_colorfgbg=$enableval
10417 else
10418   with_colorfgbg=no
10419 fi;
10420 echo "$as_me:10420: result: $with_colorfgbg" >&5
10421 echo "${ECHO_T}$with_colorfgbg" >&6
10422 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10423 #define USE_COLORFGBG 1
10424 EOF
10425
10426 ###   use option --enable-interop to turn on use of bindings used for interop
10427 echo "$as_me:10427: checking if you want interop bindings" >&5
10428 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
10429
10430 # Check whether --enable-interop or --disable-interop was given.
10431 if test "${enable_interop+set}" = set; then
10432   enableval="$enable_interop"
10433   with_exp_interop=$enableval
10434 else
10435   with_exp_interop=no
10436 fi;
10437 echo "$as_me:10437: result: $with_exp_interop" >&5
10438 echo "${ECHO_T}$with_exp_interop" >&6
10439
10440 NCURSES_INTEROP_FUNCS=0
10441 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
10442
10443 # This is still experimental (20080329), but should ultimately be moved to
10444 # the script-block --with-normal, etc.
10445
10446 echo "$as_me:10446: checking if you want to link with the pthread library" >&5
10447 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
10448
10449 # Check whether --with-pthread or --without-pthread was given.
10450 if test "${with_pthread+set}" = set; then
10451   withval="$with_pthread"
10452   with_pthread=$withval
10453 else
10454   with_pthread=no
10455 fi;
10456 echo "$as_me:10456: result: $with_pthread" >&5
10457 echo "${ECHO_T}$with_pthread" >&6
10458
10459 if test "$with_pthread" != no ; then
10460     echo "$as_me:10460: checking for pthread.h" >&5
10461 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
10462 if test "${ac_cv_header_pthread_h+set}" = set; then
10463   echo $ECHO_N "(cached) $ECHO_C" >&6
10464 else
10465   cat >conftest.$ac_ext <<_ACEOF
10466 #line 10466 "configure"
10467 #include "confdefs.h"
10468 #include <pthread.h>
10469 _ACEOF
10470 if { (eval echo "$as_me:10470: \"$ac_cpp conftest.$ac_ext\"") >&5
10471   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10472   ac_status=$?
10473   egrep -v '^ *\+' conftest.er1 >conftest.err
10474   rm -f conftest.er1
10475   cat conftest.err >&5
10476   echo "$as_me:10476: \$? = $ac_status" >&5
10477   (exit $ac_status); } >/dev/null; then
10478   if test -s conftest.err; then
10479     ac_cpp_err=$ac_c_preproc_warn_flag
10480   else
10481     ac_cpp_err=
10482   fi
10483 else
10484   ac_cpp_err=yes
10485 fi
10486 if test -z "$ac_cpp_err"; then
10487   ac_cv_header_pthread_h=yes
10488 else
10489   echo "$as_me: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   ac_cv_header_pthread_h=no
10492 fi
10493 rm -f conftest.err conftest.$ac_ext
10494 fi
10495 echo "$as_me:10495: result: $ac_cv_header_pthread_h" >&5
10496 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
10497 if test $ac_cv_header_pthread_h = yes; then
10498
10499         cat >>confdefs.h <<\EOF
10500 #define HAVE_PTHREADS_H 1
10501 EOF
10502
10503         echo "$as_me:10503: checking if we can link with the pthread library" >&5
10504 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
10505         cf_save_LIBS="$LIBS"
10506         LIBS="-lpthread $LIBS"
10507         cat >conftest.$ac_ext <<_ACEOF
10508 #line 10508 "configure"
10509 #include "confdefs.h"
10510
10511 #include <pthread.h>
10512
10513 int
10514 main ()
10515 {
10516
10517         int rc = pthread_create(0,0,0,0);
10518
10519   ;
10520   return 0;
10521 }
10522 _ACEOF
10523 rm -f conftest.$ac_objext conftest$ac_exeext
10524 if { (eval echo "$as_me:10524: \"$ac_link\"") >&5
10525   (eval $ac_link) 2>&5
10526   ac_status=$?
10527   echo "$as_me:10527: \$? = $ac_status" >&5
10528   (exit $ac_status); } &&
10529          { ac_try='test -s conftest$ac_exeext'
10530   { (eval echo "$as_me:10530: \"$ac_try\"") >&5
10531   (eval $ac_try) 2>&5
10532   ac_status=$?
10533   echo "$as_me:10533: \$? = $ac_status" >&5
10534   (exit $ac_status); }; }; then
10535   with_pthread=yes
10536 else
10537   echo "$as_me: failed program was:" >&5
10538 cat conftest.$ac_ext >&5
10539 with_pthread=no
10540 fi
10541 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10542         LIBS="$cf_save_LIBS"
10543         echo "$as_me:10543: result: $with_pthread" >&5
10544 echo "${ECHO_T}$with_pthread" >&6
10545
10546         if test "$with_pthread" = yes ; then
10547             LIBS="-lpthread $LIBS"
10548             cat >>confdefs.h <<\EOF
10549 #define HAVE_LIBPTHREADS 1
10550 EOF
10551
10552         else
10553             { { echo "$as_me:10553: error: Cannot link with pthread library" >&5
10554 echo "$as_me: error: Cannot link with pthread library" >&2;}
10555    { (exit 1); exit 1; }; }
10556         fi
10557
10558 fi
10559
10560 fi
10561
10562 echo "$as_me:10562: checking if you want to use weak-symbols for pthreads" >&5
10563 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
10564
10565 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
10566 if test "${enable_weak_symbols+set}" = set; then
10567   enableval="$enable_weak_symbols"
10568   use_weak_symbols=$withval
10569 else
10570   use_weak_symbols=no
10571 fi;
10572 echo "$as_me:10572: result: $use_weak_symbols" >&5
10573 echo "${ECHO_T}$use_weak_symbols" >&6
10574 if test "$use_weak_symbols" = yes ; then
10575
10576 echo "$as_me:10576: checking if $CC supports weak symbols" >&5
10577 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
10578 if test "${cf_cv_weak_symbols+set}" = set; then
10579   echo $ECHO_N "(cached) $ECHO_C" >&6
10580 else
10581
10582 cat >conftest.$ac_ext <<_ACEOF
10583 #line 10583 "configure"
10584 #include "confdefs.h"
10585
10586 #include <stdio.h>
10587 int
10588 main ()
10589 {
10590
10591 #if defined(__GNUC__)
10592 #  if defined __USE_ISOC99
10593 #    define _cat_pragma(exp)    _Pragma(#exp)
10594 #    define _weak_pragma(exp)   _cat_pragma(weak name)
10595 #  else
10596 #    define _weak_pragma(exp)
10597 #  endif
10598 #  define _declare(name)        __extension__ extern __typeof__(name) name
10599 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
10600 #endif
10601
10602 weak_symbol(fopen);
10603
10604   ;
10605   return 0;
10606 }
10607 _ACEOF
10608 rm -f conftest.$ac_objext
10609 if { (eval echo "$as_me:10609: \"$ac_compile\"") >&5
10610   (eval $ac_compile) 2>&5
10611   ac_status=$?
10612   echo "$as_me:10612: \$? = $ac_status" >&5
10613   (exit $ac_status); } &&
10614          { ac_try='test -s conftest.$ac_objext'
10615   { (eval echo "$as_me:10615: \"$ac_try\"") >&5
10616   (eval $ac_try) 2>&5
10617   ac_status=$?
10618   echo "$as_me:10618: \$? = $ac_status" >&5
10619   (exit $ac_status); }; }; then
10620   cf_cv_weak_symbols=yes
10621 else
10622   echo "$as_me: failed program was:" >&5
10623 cat conftest.$ac_ext >&5
10624 cf_cv_weak_symbols=no
10625 fi
10626 rm -f conftest.$ac_objext conftest.$ac_ext
10627
10628 fi
10629 echo "$as_me:10629: result: $cf_cv_weak_symbols" >&5
10630 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
10631
10632 else
10633     cf_cv_weak_symbols=no
10634 fi
10635
10636 if test $cf_cv_weak_symbols = yes ; then
10637     cat >>confdefs.h <<\EOF
10638 #define USE_WEAK_SYMBOLS 1
10639 EOF
10640
10641 fi
10642
10643 PTHREAD=
10644 if test "$with_pthread" = "yes" ; then
10645     cat >>confdefs.h <<\EOF
10646 #define USE_PTHREADS 1
10647 EOF
10648
10649     enable_reentrant=yes
10650     if test $cf_cv_weak_symbols = yes ; then
10651         PTHREAD=-lpthread
10652     fi
10653 fi
10654
10655 # Reentrant code has to be opaque; there's little advantage to making ncurses
10656 # opaque outside of that, so there is no --enable-opaque option.  We can use
10657 # this option without --with-pthreads, but this will be always set for
10658 # pthreads.
10659 echo "$as_me:10659: checking if you want experimental reentrant code" >&5
10660 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
10661
10662 # Check whether --enable-reentrant or --disable-reentrant was given.
10663 if test "${enable_reentrant+set}" = set; then
10664   enableval="$enable_reentrant"
10665   with_reentrant=$enableval
10666 else
10667   with_reentrant=no
10668 fi;
10669 echo "$as_me:10669: result: $with_reentrant" >&5
10670 echo "${ECHO_T}$with_reentrant" >&6
10671 if test "$with_reentrant" = yes ; then
10672         cf_cv_enable_reentrant=1
10673         cf_cv_enable_opaque="NCURSES_INTERNALS"
10674         NCURSES_OPAQUE=1
10675         NCURSES_SIZE_T=int
10676         if test $cf_cv_weak_symbols = yes ; then
10677
10678 # remove pthread library from $LIBS
10679 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
10680
10681         else
10682                 LIB_SUFFIX="t${LIB_SUFFIX}"
10683         fi
10684         cat >>confdefs.h <<\EOF
10685 #define USE_REENTRANT 1
10686 EOF
10687
10688 if test "${with_abi_version+set}" != set; then
10689         case $cf_cv_rel_version in
10690         5.*)
10691                 cf_cv_rel_version=6.0
10692                 cf_cv_abi_version=6
10693                 { echo "$as_me:10693: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10694 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10695                 ;;
10696         esac
10697 fi
10698
10699 else
10700         cf_cv_enable_reentrant=0
10701         cf_cv_enable_opaque="NCURSES_OPAQUE"
10702         NCURSES_OPAQUE=0
10703         NCURSES_SIZE_T=short
10704 fi
10705
10706 ### Allow using a different wrap-prefix
10707 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
10708         echo "$as_me:10708: checking for prefix used to wrap public variables" >&5
10709 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
10710
10711 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
10712 if test "${with_wrap_prefix+set}" = set; then
10713   withval="$with_wrap_prefix"
10714   NCURSES_WRAP_PREFIX=$withval
10715 else
10716   NCURSES_WRAP_PREFIX=_nc_
10717 fi;
10718         echo "$as_me:10718: result: $NCURSES_WRAP_PREFIX" >&5
10719 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
10720 else
10721         NCURSES_WRAP_PREFIX=_nc_
10722 fi
10723
10724 cat >>confdefs.h <<EOF
10725 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
10726 EOF
10727
10728 echo "$as_me:10728: checking if you want experimental safe-sprintf code" >&5
10729 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
10730
10731 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
10732 if test "${enable_safe_sprintf+set}" = set; then
10733   enableval="$enable_safe_sprintf"
10734   with_safe_sprintf=$enableval
10735 else
10736   with_safe_sprintf=no
10737 fi;
10738 echo "$as_me:10738: result: $with_safe_sprintf" >&5
10739 echo "${ECHO_T}$with_safe_sprintf" >&6
10740 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
10741 #define USE_SAFE_SPRINTF 1
10742 EOF
10743
10744 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
10745 # when hashmap is used scroll hints are useless
10746 if test "$with_hashmap" = no ; then
10747 echo "$as_me:10747: checking if you want to experiment without scrolling-hints code" >&5
10748 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
10749
10750 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
10751 if test "${enable_scroll_hints+set}" = set; then
10752   enableval="$enable_scroll_hints"
10753   with_scroll_hints=$enableval
10754 else
10755   with_scroll_hints=yes
10756 fi;
10757 echo "$as_me:10757: result: $with_scroll_hints" >&5
10758 echo "${ECHO_T}$with_scroll_hints" >&6
10759 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
10760 #define USE_SCROLL_HINTS 1
10761 EOF
10762
10763 fi
10764
10765 echo "$as_me:10765: checking if you want experimental wgetch-events code" >&5
10766 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
10767
10768 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
10769 if test "${enable_wgetch_events+set}" = set; then
10770   enableval="$enable_wgetch_events"
10771   with_wgetch_events=$enableval
10772 else
10773   with_wgetch_events=no
10774 fi;
10775 echo "$as_me:10775: result: $with_wgetch_events" >&5
10776 echo "${ECHO_T}$with_wgetch_events" >&6
10777 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
10778 #define NCURSES_WGETCH_EVENTS 1
10779 EOF
10780
10781 ###############################################################################
10782
10783 ###     use option --disable-echo to suppress full display compiling commands
10784 echo "$as_me:10784: checking if you want to display full commands during build" >&5
10785 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
10786
10787 # Check whether --enable-echo or --disable-echo was given.
10788 if test "${enable_echo+set}" = set; then
10789   enableval="$enable_echo"
10790   with_echo=$enableval
10791 else
10792   with_echo=yes
10793 fi;
10794 if test "$with_echo" = yes; then
10795         ECHO_LINK=
10796 else
10797         ECHO_LINK='@ echo linking $@ ... ;'
10798         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
10799         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
10800 fi
10801 echo "$as_me:10801: result: $with_echo" >&5
10802 echo "${ECHO_T}$with_echo" >&6
10803
10804 ###     use option --enable-warnings to turn on all gcc warnings
10805 echo "$as_me:10805: checking if you want to see compiler warnings" >&5
10806 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
10807
10808 # Check whether --enable-warnings or --disable-warnings was given.
10809 if test "${enable_warnings+set}" = set; then
10810   enableval="$enable_warnings"
10811   with_warnings=$enableval
10812 fi;
10813 echo "$as_me:10813: result: $with_warnings" >&5
10814 echo "${ECHO_T}$with_warnings" >&6
10815
10816 if test "x$with_warnings" = "xyes"; then
10817         ADAFLAGS="$ADAFLAGS -gnatg"
10818
10819 INTEL_COMPILER=no
10820
10821 if test "$GCC" = yes ; then
10822         case $host_os in
10823         linux*|gnu*)
10824                 echo "$as_me:10824: checking if this is really Intel C compiler" >&5
10825 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
10826                 cf_save_CFLAGS="$CFLAGS"
10827                 CFLAGS="$CFLAGS -no-gcc"
10828                 cat >conftest.$ac_ext <<_ACEOF
10829 #line 10829 "configure"
10830 #include "confdefs.h"
10831
10832 int
10833 main ()
10834 {
10835
10836 #ifdef __INTEL_COMPILER
10837 #else
10838 make an error
10839 #endif
10840
10841   ;
10842   return 0;
10843 }
10844 _ACEOF
10845 rm -f conftest.$ac_objext
10846 if { (eval echo "$as_me:10846: \"$ac_compile\"") >&5
10847   (eval $ac_compile) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit $ac_status); } &&
10851          { ac_try='test -s conftest.$ac_objext'
10852   { (eval echo "$as_me:10852: \"$ac_try\"") >&5
10853   (eval $ac_try) 2>&5
10854   ac_status=$?
10855   echo "$as_me:10855: \$? = $ac_status" >&5
10856   (exit $ac_status); }; }; then
10857   INTEL_COMPILER=yes
10858 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
10859
10860 else
10861   echo "$as_me: failed program was:" >&5
10862 cat conftest.$ac_ext >&5
10863 fi
10864 rm -f conftest.$ac_objext conftest.$ac_ext
10865                 CFLAGS="$cf_save_CFLAGS"
10866                 echo "$as_me:10866: result: $INTEL_COMPILER" >&5
10867 echo "${ECHO_T}$INTEL_COMPILER" >&6
10868                 ;;
10869         esac
10870 fi
10871
10872 cat > conftest.$ac_ext <<EOF
10873 #line 10873 "${as_me-configure}"
10874 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
10875 EOF
10876
10877 if test "$INTEL_COMPILER" = yes
10878 then
10879 # The "-wdXXX" options suppress warnings:
10880 # remark #1419: external declaration in primary source file
10881 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
10882 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
10883 # remark #193: zero used for undefined preprocessing identifier
10884 # remark #593: variable "curs_sb_left_arrow" was set but never used
10885 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
10886 # remark #869: parameter "tw" was never referenced
10887 # remark #981: operands are evaluated in unspecified order
10888 # warning #279: controlling expression is constant
10889
10890         { echo "$as_me:10890: checking for $CC warning options..." >&5
10891 echo "$as_me: checking for $CC warning options..." >&6;}
10892         cf_save_CFLAGS="$CFLAGS"
10893         EXTRA_CFLAGS="-Wall"
10894         for cf_opt in \
10895                 wd1419 \
10896                 wd1683 \
10897                 wd1684 \
10898                 wd193 \
10899                 wd593 \
10900                 wd279 \
10901                 wd810 \
10902                 wd869 \
10903                 wd981
10904         do
10905                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10906                 if { (eval echo "$as_me:10906: \"$ac_compile\"") >&5
10907   (eval $ac_compile) 2>&5
10908   ac_status=$?
10909   echo "$as_me:10909: \$? = $ac_status" >&5
10910   (exit $ac_status); }; then
10911                         test -n "$verbose" && echo "$as_me:10911: result: ... -$cf_opt" >&5
10912 echo "${ECHO_T}... -$cf_opt" >&6
10913                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10914                 fi
10915         done
10916         CFLAGS="$cf_save_CFLAGS"
10917
10918 elif test "$GCC" = yes
10919 then
10920         { echo "$as_me:10920: checking for $CC warning options..." >&5
10921 echo "$as_me: checking for $CC warning options..." >&6;}
10922         cf_save_CFLAGS="$CFLAGS"
10923         EXTRA_CFLAGS="-W -Wall"
10924         cf_warn_CONST=""
10925         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
10926         for cf_opt in \
10927                 Wbad-function-cast \
10928                 Wcast-align \
10929                 Wcast-qual \
10930                 Winline \
10931                 Wmissing-declarations \
10932                 Wmissing-prototypes \
10933                 Wnested-externs \
10934                 Wpointer-arith \
10935                 Wshadow \
10936                 Wstrict-prototypes \
10937                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
10938         do
10939                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
10940                 if { (eval echo "$as_me:10940: \"$ac_compile\"") >&5
10941   (eval $ac_compile) 2>&5
10942   ac_status=$?
10943   echo "$as_me:10943: \$? = $ac_status" >&5
10944   (exit $ac_status); }; then
10945                         test -n "$verbose" && echo "$as_me:10945: result: ... -$cf_opt" >&5
10946 echo "${ECHO_T}... -$cf_opt" >&6
10947                         case $cf_opt in #(vi
10948                         Wcast-qual) #(vi
10949                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
10950                                 ;;
10951                         Winline) #(vi
10952                                 case $GCC_VERSION in
10953                                 [34].*)
10954                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
10955
10956 echo "${as_me-configure}:10956: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
10957
10958                                         continue;;
10959                                 esac
10960                                 ;;
10961                         esac
10962                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
10963                 fi
10964         done
10965         CFLAGS="$cf_save_CFLAGS"
10966 fi
10967 rm -f conftest*
10968
10969         if test "$cf_with_cxx" = yes ; then
10970
10971 INTEL_CPLUSPLUS=no
10972
10973 if test "$GCC" = yes ; then
10974         case $host_os in
10975         linux*|gnu*)
10976                 echo "$as_me:10976: checking if this is really Intel C++ compiler" >&5
10977 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
10978                 cf_save_CFLAGS="$CXXFLAGS"
10979                 CXXFLAGS="$CXXFLAGS -no-gcc"
10980                 cat >conftest.$ac_ext <<_ACEOF
10981 #line 10981 "configure"
10982 #include "confdefs.h"
10983
10984 int
10985 main ()
10986 {
10987
10988 #ifdef __INTEL_COMPILER
10989 #else
10990 make an error
10991 #endif
10992
10993   ;
10994   return 0;
10995 }
10996 _ACEOF
10997 rm -f conftest.$ac_objext
10998 if { (eval echo "$as_me:10998: \"$ac_compile\"") >&5
10999   (eval $ac_compile) 2>&5
11000   ac_status=$?
11001   echo "$as_me:11001: \$? = $ac_status" >&5
11002   (exit $ac_status); } &&
11003          { ac_try='test -s conftest.$ac_objext'
11004   { (eval echo "$as_me:11004: \"$ac_try\"") >&5
11005   (eval $ac_try) 2>&5
11006   ac_status=$?
11007   echo "$as_me:11007: \$? = $ac_status" >&5
11008   (exit $ac_status); }; }; then
11009   INTEL_CPLUSPLUS=yes
11010 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11011
11012 else
11013   echo "$as_me: failed program was:" >&5
11014 cat conftest.$ac_ext >&5
11015 fi
11016 rm -f conftest.$ac_objext conftest.$ac_ext
11017                 CXXFLAGS="$cf_save_CFLAGS"
11018                 echo "$as_me:11018: result: $INTEL_CPLUSPLUS" >&5
11019 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11020                 ;;
11021         esac
11022 fi
11023
11024 ac_ext=cc
11025 ac_cpp='$CXXCPP $CPPFLAGS'
11026 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11027 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11028 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11029 ac_main_return=return
11030
11031 cat > conftest.$ac_ext <<EOF
11032 #line 11032 "configure"
11033 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11034 EOF
11035
11036 if test "$INTEL_CPLUSPLUS" = yes
11037 then
11038 # The "-wdXXX" options suppress warnings:
11039 # remark #1419: external declaration in primary source file
11040 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11041 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11042 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11043 # remark #193: zero used for undefined preprocessing identifier
11044 # remark #593: variable "curs_sb_left_arrow" was set but never used
11045 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11046 # remark #869: parameter "tw" was never referenced
11047 # remark #981: operands are evaluated in unspecified order
11048 # warning #269: invalid format string conversion
11049
11050         { echo "$as_me:11050: checking for $CC warning options..." >&5
11051 echo "$as_me: checking for $CC warning options..." >&6;}
11052         cf_save_CXXFLAGS="$CXXFLAGS"
11053         EXTRA_CXXFLAGS="-Wall"
11054         for cf_opt in \
11055                 wd1419 \
11056                 wd1682 \
11057                 wd1683 \
11058                 wd1684 \
11059                 wd193 \
11060                 wd279 \
11061                 wd593 \
11062                 wd810 \
11063                 wd869 \
11064                 wd981
11065         do
11066                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11067                 if { (eval echo "$as_me:11067: \"$ac_compile\"") >&5
11068   (eval $ac_compile) 2>&5
11069   ac_status=$?
11070   echo "$as_me:11070: \$? = $ac_status" >&5
11071   (exit $ac_status); }; then
11072                         test -n "$verbose" && echo "$as_me:11072: result: ... -$cf_opt" >&5
11073 echo "${ECHO_T}... -$cf_opt" >&6
11074                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11075                 fi
11076         done
11077         CXXFLAGS="$cf_save_CXXFLAGS"
11078
11079 elif test "$GXX" = yes
11080 then
11081         { echo "$as_me:11081: checking for $CXX warning options..." >&5
11082 echo "$as_me: checking for $CXX warning options..." >&6;}
11083         cf_save_CXXFLAGS="$CXXFLAGS"
11084         EXTRA_CXXFLAGS="-W -Wall"
11085         cf_gxx_extra_warnings=""
11086         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11087         case "$GCC_VERSION" in
11088         [1-2].*)
11089                 ;;
11090         *)
11091                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11092                 ;;
11093         esac
11094         for cf_opt in \
11095                 Wabi \
11096                 fabi-version=0 \
11097                 Woverloaded-virtual \
11098                 Wsign-promo \
11099                 Wsynth \
11100                 Wold-style-cast \
11101                 Wcast-align \
11102                 Wcast-qual \
11103                 Wmissing-prototypes \
11104                 Wpointer-arith \
11105                 Wshadow \
11106                 Wstrict-prototypes \
11107                 Wundef $cf_gxx_extra_warnings Wno-unused
11108         do
11109                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11110                 if { (eval echo "$as_me:11110: \"$ac_compile\"") >&5
11111   (eval $ac_compile) 2>&5
11112   ac_status=$?
11113   echo "$as_me:11113: \$? = $ac_status" >&5
11114   (exit $ac_status); }; then
11115                         test -n "$verbose" && echo "$as_me:11115: result: ... -$cf_opt" >&5
11116 echo "${ECHO_T}... -$cf_opt" >&6
11117                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11118                 else
11119                         test -n "$verbose" && echo "$as_me:11119: result: ... no -$cf_opt" >&5
11120 echo "${ECHO_T}... no -$cf_opt" >&6
11121                 fi
11122         done
11123         CXXFLAGS="$cf_save_CXXFLAGS"
11124 fi
11125
11126 rm -f conftest*
11127 ac_ext=c
11128 ac_cpp='$CPP $CPPFLAGS'
11129 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11130 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11131 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11132 ac_main_return=return
11133
11134         fi
11135 fi
11136
11137 if test "$GCC" = yes
11138 then
11139 cat > conftest.i <<EOF
11140 #ifndef GCC_PRINTF
11141 #define GCC_PRINTF 0
11142 #endif
11143 #ifndef GCC_SCANF
11144 #define GCC_SCANF 0
11145 #endif
11146 #ifndef GCC_NORETURN
11147 #define GCC_NORETURN /* nothing */
11148 #endif
11149 #ifndef GCC_UNUSED
11150 #define GCC_UNUSED /* nothing */
11151 #endif
11152 EOF
11153 if test "$GCC" = yes
11154 then
11155         { echo "$as_me:11155: checking for $CC __attribute__ directives..." >&5
11156 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11157 cat > conftest.$ac_ext <<EOF
11158 #line 11158 "${as_me-configure}"
11159 #include "confdefs.h"
11160 #include "conftest.h"
11161 #include "conftest.i"
11162 #if     GCC_PRINTF
11163 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11164 #else
11165 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11166 #endif
11167 #if     GCC_SCANF
11168 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11169 #else
11170 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11171 #endif
11172 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11173 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11174 extern void foo(void) GCC_NORETURN;
11175 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11176 EOF
11177         cf_printf_attribute=no
11178         cf_scanf_attribute=no
11179         for cf_attribute in scanf printf unused noreturn
11180         do
11181
11182 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11183
11184                 cf_directive="__attribute__(($cf_attribute))"
11185                 echo "checking for $CC $cf_directive" 1>&5
11186
11187                 case $cf_attribute in #(vi
11188                 printf) #(vi
11189                         cf_printf_attribute=yes
11190                         cat >conftest.h <<EOF
11191 #define GCC_$cf_ATTRIBUTE 1
11192 EOF
11193                         ;;
11194                 scanf) #(vi
11195                         cf_scanf_attribute=yes
11196                         cat >conftest.h <<EOF
11197 #define GCC_$cf_ATTRIBUTE 1
11198 EOF
11199                         ;;
11200                 *) #(vi
11201                         cat >conftest.h <<EOF
11202 #define GCC_$cf_ATTRIBUTE $cf_directive
11203 EOF
11204                         ;;
11205                 esac
11206
11207                 if { (eval echo "$as_me:11207: \"$ac_compile\"") >&5
11208   (eval $ac_compile) 2>&5
11209   ac_status=$?
11210   echo "$as_me:11210: \$? = $ac_status" >&5
11211   (exit $ac_status); }; then
11212                         test -n "$verbose" && echo "$as_me:11212: result: ... $cf_attribute" >&5
11213 echo "${ECHO_T}... $cf_attribute" >&6
11214                         cat conftest.h >>confdefs.h
11215                         case $cf_attribute in #(vi
11216                         printf) #(vi
11217                                 if test "$cf_printf_attribute" = no ; then
11218                                         cat >>confdefs.h <<EOF
11219 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11220 EOF
11221                                 else
11222                                         cat >>confdefs.h <<EOF
11223 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11224 EOF
11225                                 fi
11226                                 ;;
11227                         scanf) #(vi
11228                                 if test "$cf_scanf_attribute" = no ; then
11229                                         cat >>confdefs.h <<EOF
11230 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11231 EOF
11232                                 else
11233                                         cat >>confdefs.h <<EOF
11234 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11235 EOF
11236                                 fi
11237                                 ;;
11238                         esac
11239                 fi
11240         done
11241 else
11242         fgrep define conftest.i >>confdefs.h
11243 fi
11244 rm -rf conftest*
11245 fi
11246
11247 ###     use option --enable-assertions to turn on generation of assertion code
11248 echo "$as_me:11248: checking if you want to enable runtime assertions" >&5
11249 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11250
11251 # Check whether --enable-assertions or --disable-assertions was given.
11252 if test "${enable_assertions+set}" = set; then
11253   enableval="$enable_assertions"
11254   with_assertions=$enableval
11255 else
11256   with_assertions=no
11257 fi;
11258 echo "$as_me:11258: result: $with_assertions" >&5
11259 echo "${ECHO_T}$with_assertions" >&6
11260 if test -n "$GCC"
11261 then
11262         if test "$with_assertions" = no
11263         then
11264                 cat >>confdefs.h <<\EOF
11265 #define NDEBUG 1
11266 EOF
11267
11268                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11269         else
11270                 ADAFLAGS="$ADAFLAGS -gnata"
11271         fi
11272 fi
11273
11274 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11275
11276 echo "$as_me:11276: checking if you want to use dmalloc for testing" >&5
11277 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11278
11279 # Check whether --with-dmalloc or --without-dmalloc was given.
11280 if test "${with_dmalloc+set}" = set; then
11281   withval="$with_dmalloc"
11282   cat >>confdefs.h <<\EOF
11283 #define USE_DMALLOC 1
11284 EOF
11285
11286         : ${with_cflags:=-g}
11287         : ${with_no_leaks:=yes}
11288          with_dmalloc=yes
11289 else
11290   with_dmalloc=
11291 fi;
11292 echo "$as_me:11292: result: ${with_dmalloc:-no}" >&5
11293 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11294
11295 case .$with_cflags in #(vi
11296 .*-g*)
11297         case .$CFLAGS in #(vi
11298         .*-g*) #(vi
11299                 ;;
11300         *)
11301
11302 cf_fix_cppflags=no
11303 cf_new_cflags=
11304 cf_new_cppflags=
11305 cf_new_extra_cppflags=
11306
11307 for cf_add_cflags in -g
11308 do
11309 case $cf_fix_cppflags in
11310 no)
11311         case $cf_add_cflags in #(vi
11312         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11313                 case $cf_add_cflags in
11314                 -D*)
11315                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11316
11317                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11318                                 && test -z "${cf_tst_cflags}" \
11319                                 && cf_fix_cppflags=yes
11320
11321                         if test $cf_fix_cppflags = yes ; then
11322                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11323                                 continue
11324                         elif test "${cf_tst_cflags}" = "\"'" ; then
11325                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11326                                 continue
11327                         fi
11328                         ;;
11329                 esac
11330                 case "$CPPFLAGS" in
11331                 *$cf_add_cflags) #(vi
11332                         ;;
11333                 *) #(vi
11334                         case $cf_add_cflags in #(vi
11335                         -D*)
11336                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11337
11338 CPPFLAGS=`echo "$CPPFLAGS" | \
11339         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11340                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11341
11342                                 ;;
11343                         esac
11344                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11345                         ;;
11346                 esac
11347                 ;;
11348         *)
11349                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11350                 ;;
11351         esac
11352         ;;
11353 yes)
11354         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11355
11356         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11357
11358         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11359                 && test -z "${cf_tst_cflags}" \
11360                 && cf_fix_cppflags=no
11361         ;;
11362 esac
11363 done
11364
11365 if test -n "$cf_new_cflags" ; then
11366
11367         CFLAGS="$CFLAGS $cf_new_cflags"
11368 fi
11369
11370 if test -n "$cf_new_cppflags" ; then
11371
11372         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11373 fi
11374
11375 if test -n "$cf_new_extra_cppflags" ; then
11376
11377         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11378 fi
11379
11380                 ;;
11381         esac
11382         ;;
11383 esac
11384
11385 if test "$with_dmalloc" = yes ; then
11386         echo "$as_me:11386: checking for dmalloc.h" >&5
11387 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
11388 if test "${ac_cv_header_dmalloc_h+set}" = set; then
11389   echo $ECHO_N "(cached) $ECHO_C" >&6
11390 else
11391   cat >conftest.$ac_ext <<_ACEOF
11392 #line 11392 "configure"
11393 #include "confdefs.h"
11394 #include <dmalloc.h>
11395 _ACEOF
11396 if { (eval echo "$as_me:11396: \"$ac_cpp conftest.$ac_ext\"") >&5
11397   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11398   ac_status=$?
11399   egrep -v '^ *\+' conftest.er1 >conftest.err
11400   rm -f conftest.er1
11401   cat conftest.err >&5
11402   echo "$as_me:11402: \$? = $ac_status" >&5
11403   (exit $ac_status); } >/dev/null; then
11404   if test -s conftest.err; then
11405     ac_cpp_err=$ac_c_preproc_warn_flag
11406   else
11407     ac_cpp_err=
11408   fi
11409 else
11410   ac_cpp_err=yes
11411 fi
11412 if test -z "$ac_cpp_err"; then
11413   ac_cv_header_dmalloc_h=yes
11414 else
11415   echo "$as_me: failed program was:" >&5
11416   cat conftest.$ac_ext >&5
11417   ac_cv_header_dmalloc_h=no
11418 fi
11419 rm -f conftest.err conftest.$ac_ext
11420 fi
11421 echo "$as_me:11421: result: $ac_cv_header_dmalloc_h" >&5
11422 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
11423 if test $ac_cv_header_dmalloc_h = yes; then
11424
11425 echo "$as_me:11425: checking for dmalloc_debug in -ldmalloc" >&5
11426 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
11427 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
11428   echo $ECHO_N "(cached) $ECHO_C" >&6
11429 else
11430   ac_check_lib_save_LIBS=$LIBS
11431 LIBS="-ldmalloc  $LIBS"
11432 cat >conftest.$ac_ext <<_ACEOF
11433 #line 11433 "configure"
11434 #include "confdefs.h"
11435
11436 /* Override any gcc2 internal prototype to avoid an error.  */
11437 #ifdef __cplusplus
11438 extern "C"
11439 #endif
11440 /* We use char because int might match the return type of a gcc2
11441    builtin and then its argument prototype would still apply.  */
11442 char dmalloc_debug ();
11443 int
11444 main ()
11445 {
11446 dmalloc_debug ();
11447   ;
11448   return 0;
11449 }
11450 _ACEOF
11451 rm -f conftest.$ac_objext conftest$ac_exeext
11452 if { (eval echo "$as_me:11452: \"$ac_link\"") >&5
11453   (eval $ac_link) 2>&5
11454   ac_status=$?
11455   echo "$as_me:11455: \$? = $ac_status" >&5
11456   (exit $ac_status); } &&
11457          { ac_try='test -s conftest$ac_exeext'
11458   { (eval echo "$as_me:11458: \"$ac_try\"") >&5
11459   (eval $ac_try) 2>&5
11460   ac_status=$?
11461   echo "$as_me:11461: \$? = $ac_status" >&5
11462   (exit $ac_status); }; }; then
11463   ac_cv_lib_dmalloc_dmalloc_debug=yes
11464 else
11465   echo "$as_me: failed program was:" >&5
11466 cat conftest.$ac_ext >&5
11467 ac_cv_lib_dmalloc_dmalloc_debug=no
11468 fi
11469 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11470 LIBS=$ac_check_lib_save_LIBS
11471 fi
11472 echo "$as_me:11472: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
11473 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
11474 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
11475   cat >>confdefs.h <<EOF
11476 #define HAVE_LIBDMALLOC 1
11477 EOF
11478
11479   LIBS="-ldmalloc $LIBS"
11480
11481 fi
11482
11483 fi
11484
11485 fi
11486
11487 echo "$as_me:11487: checking if you want to use dbmalloc for testing" >&5
11488 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
11489
11490 # Check whether --with-dbmalloc or --without-dbmalloc was given.
11491 if test "${with_dbmalloc+set}" = set; then
11492   withval="$with_dbmalloc"
11493   cat >>confdefs.h <<\EOF
11494 #define USE_DBMALLOC 1
11495 EOF
11496
11497         : ${with_cflags:=-g}
11498         : ${with_no_leaks:=yes}
11499          with_dbmalloc=yes
11500 else
11501   with_dbmalloc=
11502 fi;
11503 echo "$as_me:11503: result: ${with_dbmalloc:-no}" >&5
11504 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
11505
11506 case .$with_cflags in #(vi
11507 .*-g*)
11508         case .$CFLAGS in #(vi
11509         .*-g*) #(vi
11510                 ;;
11511         *)
11512
11513 cf_fix_cppflags=no
11514 cf_new_cflags=
11515 cf_new_cppflags=
11516 cf_new_extra_cppflags=
11517
11518 for cf_add_cflags in -g
11519 do
11520 case $cf_fix_cppflags in
11521 no)
11522         case $cf_add_cflags in #(vi
11523         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11524                 case $cf_add_cflags in
11525                 -D*)
11526                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11527
11528                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11529                                 && test -z "${cf_tst_cflags}" \
11530                                 && cf_fix_cppflags=yes
11531
11532                         if test $cf_fix_cppflags = yes ; then
11533                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11534                                 continue
11535                         elif test "${cf_tst_cflags}" = "\"'" ; then
11536                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11537                                 continue
11538                         fi
11539                         ;;
11540                 esac
11541                 case "$CPPFLAGS" in
11542                 *$cf_add_cflags) #(vi
11543                         ;;
11544                 *) #(vi
11545                         case $cf_add_cflags in #(vi
11546                         -D*)
11547                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11548
11549 CPPFLAGS=`echo "$CPPFLAGS" | \
11550         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11551                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11552
11553                                 ;;
11554                         esac
11555                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11556                         ;;
11557                 esac
11558                 ;;
11559         *)
11560                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11561                 ;;
11562         esac
11563         ;;
11564 yes)
11565         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11566
11567         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11568
11569         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11570                 && test -z "${cf_tst_cflags}" \
11571                 && cf_fix_cppflags=no
11572         ;;
11573 esac
11574 done
11575
11576 if test -n "$cf_new_cflags" ; then
11577
11578         CFLAGS="$CFLAGS $cf_new_cflags"
11579 fi
11580
11581 if test -n "$cf_new_cppflags" ; then
11582
11583         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11584 fi
11585
11586 if test -n "$cf_new_extra_cppflags" ; then
11587
11588         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11589 fi
11590
11591                 ;;
11592         esac
11593         ;;
11594 esac
11595
11596 if test "$with_dbmalloc" = yes ; then
11597         echo "$as_me:11597: checking for dbmalloc.h" >&5
11598 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
11599 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
11600   echo $ECHO_N "(cached) $ECHO_C" >&6
11601 else
11602   cat >conftest.$ac_ext <<_ACEOF
11603 #line 11603 "configure"
11604 #include "confdefs.h"
11605 #include <dbmalloc.h>
11606 _ACEOF
11607 if { (eval echo "$as_me:11607: \"$ac_cpp conftest.$ac_ext\"") >&5
11608   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11609   ac_status=$?
11610   egrep -v '^ *\+' conftest.er1 >conftest.err
11611   rm -f conftest.er1
11612   cat conftest.err >&5
11613   echo "$as_me:11613: \$? = $ac_status" >&5
11614   (exit $ac_status); } >/dev/null; then
11615   if test -s conftest.err; then
11616     ac_cpp_err=$ac_c_preproc_warn_flag
11617   else
11618     ac_cpp_err=
11619   fi
11620 else
11621   ac_cpp_err=yes
11622 fi
11623 if test -z "$ac_cpp_err"; then
11624   ac_cv_header_dbmalloc_h=yes
11625 else
11626   echo "$as_me: failed program was:" >&5
11627   cat conftest.$ac_ext >&5
11628   ac_cv_header_dbmalloc_h=no
11629 fi
11630 rm -f conftest.err conftest.$ac_ext
11631 fi
11632 echo "$as_me:11632: result: $ac_cv_header_dbmalloc_h" >&5
11633 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
11634 if test $ac_cv_header_dbmalloc_h = yes; then
11635
11636 echo "$as_me:11636: checking for debug_malloc in -ldbmalloc" >&5
11637 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
11638 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
11639   echo $ECHO_N "(cached) $ECHO_C" >&6
11640 else
11641   ac_check_lib_save_LIBS=$LIBS
11642 LIBS="-ldbmalloc  $LIBS"
11643 cat >conftest.$ac_ext <<_ACEOF
11644 #line 11644 "configure"
11645 #include "confdefs.h"
11646
11647 /* Override any gcc2 internal prototype to avoid an error.  */
11648 #ifdef __cplusplus
11649 extern "C"
11650 #endif
11651 /* We use char because int might match the return type of a gcc2
11652    builtin and then its argument prototype would still apply.  */
11653 char debug_malloc ();
11654 int
11655 main ()
11656 {
11657 debug_malloc ();
11658   ;
11659   return 0;
11660 }
11661 _ACEOF
11662 rm -f conftest.$ac_objext conftest$ac_exeext
11663 if { (eval echo "$as_me:11663: \"$ac_link\"") >&5
11664   (eval $ac_link) 2>&5
11665   ac_status=$?
11666   echo "$as_me:11666: \$? = $ac_status" >&5
11667   (exit $ac_status); } &&
11668          { ac_try='test -s conftest$ac_exeext'
11669   { (eval echo "$as_me:11669: \"$ac_try\"") >&5
11670   (eval $ac_try) 2>&5
11671   ac_status=$?
11672   echo "$as_me:11672: \$? = $ac_status" >&5
11673   (exit $ac_status); }; }; then
11674   ac_cv_lib_dbmalloc_debug_malloc=yes
11675 else
11676   echo "$as_me: failed program was:" >&5
11677 cat conftest.$ac_ext >&5
11678 ac_cv_lib_dbmalloc_debug_malloc=no
11679 fi
11680 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11681 LIBS=$ac_check_lib_save_LIBS
11682 fi
11683 echo "$as_me:11683: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
11684 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
11685 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
11686   cat >>confdefs.h <<EOF
11687 #define HAVE_LIBDBMALLOC 1
11688 EOF
11689
11690   LIBS="-ldbmalloc $LIBS"
11691
11692 fi
11693
11694 fi
11695
11696 fi
11697
11698 echo "$as_me:11698: checking if you want to use valgrind for testing" >&5
11699 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
11700
11701 # Check whether --with-valgrind or --without-valgrind was given.
11702 if test "${with_valgrind+set}" = set; then
11703   withval="$with_valgrind"
11704   cat >>confdefs.h <<\EOF
11705 #define USE_VALGRIND 1
11706 EOF
11707
11708         : ${with_cflags:=-g}
11709         : ${with_no_leaks:=yes}
11710          with_valgrind=yes
11711 else
11712   with_valgrind=
11713 fi;
11714 echo "$as_me:11714: result: ${with_valgrind:-no}" >&5
11715 echo "${ECHO_T}${with_valgrind:-no}" >&6
11716
11717 case .$with_cflags in #(vi
11718 .*-g*)
11719         case .$CFLAGS in #(vi
11720         .*-g*) #(vi
11721                 ;;
11722         *)
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 -g
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                 ;;
11803         esac
11804         ;;
11805 esac
11806
11807 echo "$as_me:11807: checking if you want to perform memory-leak testing" >&5
11808 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
11809
11810 # Check whether --enable-leaks or --disable-leaks was given.
11811 if test "${enable_leaks+set}" = set; then
11812   enableval="$enable_leaks"
11813   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
11814 else
11815   : ${with_no_leaks:=no}
11816 fi;
11817 echo "$as_me:11817: result: $with_no_leaks" >&5
11818 echo "${ECHO_T}$with_no_leaks" >&6
11819
11820 if test "$with_no_leaks" = yes ; then
11821         cat >>confdefs.h <<\EOF
11822 #define NO_LEAKS 1
11823 EOF
11824
11825 fi
11826
11827 cat >>confdefs.h <<\EOF
11828 #define HAVE_NC_ALLOC_H 1
11829 EOF
11830
11831 ###     use option --enable-expanded to generate certain macros as functions
11832
11833 # Check whether --enable-expanded or --disable-expanded was given.
11834 if test "${enable_expanded+set}" = set; then
11835   enableval="$enable_expanded"
11836   test "$enableval" = yes && cat >>confdefs.h <<\EOF
11837 #define NCURSES_EXPANDED 1
11838 EOF
11839
11840 fi;
11841
11842 ###     use option --disable-macros to suppress macros in favor of functions
11843
11844 # Check whether --enable-macros or --disable-macros was given.
11845 if test "${enable_macros+set}" = set; then
11846   enableval="$enable_macros"
11847   test "$enableval" = no && cat >>confdefs.h <<\EOF
11848 #define NCURSES_NOMACROS 1
11849 EOF
11850
11851 fi;
11852
11853 # Normally we only add trace() to the debug-library.  Allow this to be
11854 # extended to all models of the ncurses library:
11855 cf_all_traces=no
11856 case "$CFLAGS $CPPFLAGS" in
11857 *-DTRACE*)
11858         cf_all_traces=yes
11859         ;;
11860 esac
11861
11862 echo "$as_me:11862: checking whether to add trace feature to all models" >&5
11863 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
11864
11865 # Check whether --with-trace or --without-trace was given.
11866 if test "${with_trace+set}" = set; then
11867   withval="$with_trace"
11868   cf_with_trace=$withval
11869 else
11870   cf_with_trace=$cf_all_traces
11871 fi;
11872 echo "$as_me:11872: result: $cf_with_trace" >&5
11873 echo "${ECHO_T}$cf_with_trace" >&6
11874
11875 if test "$cf_with_trace" = yes ; then
11876         LIB_TRACING=all
11877         ADA_TRACE=TRUE
11878
11879 cf_fix_cppflags=no
11880 cf_new_cflags=
11881 cf_new_cppflags=
11882 cf_new_extra_cppflags=
11883
11884 for cf_add_cflags in -DTRACE
11885 do
11886 case $cf_fix_cppflags in
11887 no)
11888         case $cf_add_cflags in #(vi
11889         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11890                 case $cf_add_cflags in
11891                 -D*)
11892                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11893
11894                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11895                                 && test -z "${cf_tst_cflags}" \
11896                                 && cf_fix_cppflags=yes
11897
11898                         if test $cf_fix_cppflags = yes ; then
11899                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11900                                 continue
11901                         elif test "${cf_tst_cflags}" = "\"'" ; then
11902                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11903                                 continue
11904                         fi
11905                         ;;
11906                 esac
11907                 case "$CPPFLAGS" in
11908                 *$cf_add_cflags) #(vi
11909                         ;;
11910                 *) #(vi
11911                         case $cf_add_cflags in #(vi
11912                         -D*)
11913                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11914
11915 CPPFLAGS=`echo "$CPPFLAGS" | \
11916         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11917                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11918
11919                                 ;;
11920                         esac
11921                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11922                         ;;
11923                 esac
11924                 ;;
11925         *)
11926                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11927                 ;;
11928         esac
11929         ;;
11930 yes)
11931         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11932
11933         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11934
11935         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11936                 && test -z "${cf_tst_cflags}" \
11937                 && cf_fix_cppflags=no
11938         ;;
11939 esac
11940 done
11941
11942 if test -n "$cf_new_cflags" ; then
11943
11944         CFLAGS="$CFLAGS $cf_new_cflags"
11945 fi
11946
11947 if test -n "$cf_new_cppflags" ; then
11948
11949         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11950 fi
11951
11952 if test -n "$cf_new_extra_cppflags" ; then
11953
11954         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11955 fi
11956
11957 else
11958         LIB_TRACING=DEBUG
11959         ADA_TRACE=FALSE
11960 fi
11961
11962 ###     Checks for libraries.
11963 case $cf_cv_system_name in #(vi
11964 *mingw32*) #(vi
11965         ;;
11966 *)
11967 echo "$as_me:11967: checking for gettimeofday" >&5
11968 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
11969 if test "${ac_cv_func_gettimeofday+set}" = set; then
11970   echo $ECHO_N "(cached) $ECHO_C" >&6
11971 else
11972   cat >conftest.$ac_ext <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975 /* System header to define __stub macros and hopefully few prototypes,
11976     which can conflict with char gettimeofday (); below.  */
11977 #include <assert.h>
11978 /* Override any gcc2 internal prototype to avoid an error.  */
11979 #ifdef __cplusplus
11980 extern "C"
11981 #endif
11982 /* We use char because int might match the return type of a gcc2
11983    builtin and then its argument prototype would still apply.  */
11984 char gettimeofday ();
11985 char (*f) ();
11986
11987 int
11988 main ()
11989 {
11990 /* The GNU C library defines this for functions which it implements
11991     to always fail with ENOSYS.  Some functions are actually named
11992     something starting with __ and the normal name is an alias.  */
11993 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
11994 choke me
11995 #else
11996 f = gettimeofday;
11997 #endif
11998
11999   ;
12000   return 0;
12001 }
12002 _ACEOF
12003 rm -f conftest.$ac_objext conftest$ac_exeext
12004 if { (eval echo "$as_me:12004: \"$ac_link\"") >&5
12005   (eval $ac_link) 2>&5
12006   ac_status=$?
12007   echo "$as_me:12007: \$? = $ac_status" >&5
12008   (exit $ac_status); } &&
12009          { ac_try='test -s conftest$ac_exeext'
12010   { (eval echo "$as_me:12010: \"$ac_try\"") >&5
12011   (eval $ac_try) 2>&5
12012   ac_status=$?
12013   echo "$as_me:12013: \$? = $ac_status" >&5
12014   (exit $ac_status); }; }; then
12015   ac_cv_func_gettimeofday=yes
12016 else
12017   echo "$as_me: failed program was:" >&5
12018 cat conftest.$ac_ext >&5
12019 ac_cv_func_gettimeofday=no
12020 fi
12021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12022 fi
12023 echo "$as_me:12023: result: $ac_cv_func_gettimeofday" >&5
12024 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12025 if test $ac_cv_func_gettimeofday = yes; then
12026   cat >>confdefs.h <<\EOF
12027 #define HAVE_GETTIMEOFDAY 1
12028 EOF
12029
12030 else
12031
12032 echo "$as_me:12032: checking for gettimeofday in -lbsd" >&5
12033 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12034 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12035   echo $ECHO_N "(cached) $ECHO_C" >&6
12036 else
12037   ac_check_lib_save_LIBS=$LIBS
12038 LIBS="-lbsd  $LIBS"
12039 cat >conftest.$ac_ext <<_ACEOF
12040 #line 12040 "configure"
12041 #include "confdefs.h"
12042
12043 /* Override any gcc2 internal prototype to avoid an error.  */
12044 #ifdef __cplusplus
12045 extern "C"
12046 #endif
12047 /* We use char because int might match the return type of a gcc2
12048    builtin and then its argument prototype would still apply.  */
12049 char gettimeofday ();
12050 int
12051 main ()
12052 {
12053 gettimeofday ();
12054   ;
12055   return 0;
12056 }
12057 _ACEOF
12058 rm -f conftest.$ac_objext conftest$ac_exeext
12059 if { (eval echo "$as_me:12059: \"$ac_link\"") >&5
12060   (eval $ac_link) 2>&5
12061   ac_status=$?
12062   echo "$as_me:12062: \$? = $ac_status" >&5
12063   (exit $ac_status); } &&
12064          { ac_try='test -s conftest$ac_exeext'
12065   { (eval echo "$as_me:12065: \"$ac_try\"") >&5
12066   (eval $ac_try) 2>&5
12067   ac_status=$?
12068   echo "$as_me:12068: \$? = $ac_status" >&5
12069   (exit $ac_status); }; }; then
12070   ac_cv_lib_bsd_gettimeofday=yes
12071 else
12072   echo "$as_me: failed program was:" >&5
12073 cat conftest.$ac_ext >&5
12074 ac_cv_lib_bsd_gettimeofday=no
12075 fi
12076 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12077 LIBS=$ac_check_lib_save_LIBS
12078 fi
12079 echo "$as_me:12079: result: $ac_cv_lib_bsd_gettimeofday" >&5
12080 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12081 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12082   cat >>confdefs.h <<\EOF
12083 #define HAVE_GETTIMEOFDAY 1
12084 EOF
12085
12086         LIBS="$LIBS -lbsd"
12087 fi
12088
12089 fi
12090         ;;
12091 esac
12092
12093 echo "$as_me:12093: checking if -lm needed for math functions" >&5
12094 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12095 if test "${cf_cv_need_libm+set}" = set; then
12096   echo $ECHO_N "(cached) $ECHO_C" >&6
12097 else
12098
12099         cat >conftest.$ac_ext <<_ACEOF
12100 #line 12100 "configure"
12101 #include "confdefs.h"
12102
12103         #include <stdio.h>
12104         #include <math.h>
12105
12106 int
12107 main ()
12108 {
12109 double x = rand(); printf("result = %g\n", sin(x))
12110   ;
12111   return 0;
12112 }
12113 _ACEOF
12114 rm -f conftest.$ac_objext conftest$ac_exeext
12115 if { (eval echo "$as_me:12115: \"$ac_link\"") >&5
12116   (eval $ac_link) 2>&5
12117   ac_status=$?
12118   echo "$as_me:12118: \$? = $ac_status" >&5
12119   (exit $ac_status); } &&
12120          { ac_try='test -s conftest$ac_exeext'
12121   { (eval echo "$as_me:12121: \"$ac_try\"") >&5
12122   (eval $ac_try) 2>&5
12123   ac_status=$?
12124   echo "$as_me:12124: \$? = $ac_status" >&5
12125   (exit $ac_status); }; }; then
12126   cf_cv_need_libm=no
12127 else
12128   echo "$as_me: failed program was:" >&5
12129 cat conftest.$ac_ext >&5
12130 cf_cv_need_libm=yes
12131 fi
12132 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12133 fi
12134 echo "$as_me:12134: result: $cf_cv_need_libm" >&5
12135 echo "${ECHO_T}$cf_cv_need_libm" >&6
12136 if test "$cf_cv_need_libm" = yes
12137 then
12138 MATH_LIB=-lm
12139 fi
12140
12141 ###     Checks for header files.
12142 echo "$as_me:12142: checking for ANSI C header files" >&5
12143 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12144 if test "${ac_cv_header_stdc+set}" = set; then
12145   echo $ECHO_N "(cached) $ECHO_C" >&6
12146 else
12147   cat >conftest.$ac_ext <<_ACEOF
12148 #line 12148 "configure"
12149 #include "confdefs.h"
12150 #include <stdlib.h>
12151 #include <stdarg.h>
12152 #include <string.h>
12153 #include <float.h>
12154
12155 _ACEOF
12156 if { (eval echo "$as_me:12156: \"$ac_cpp conftest.$ac_ext\"") >&5
12157   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12158   ac_status=$?
12159   egrep -v '^ *\+' conftest.er1 >conftest.err
12160   rm -f conftest.er1
12161   cat conftest.err >&5
12162   echo "$as_me:12162: \$? = $ac_status" >&5
12163   (exit $ac_status); } >/dev/null; then
12164   if test -s conftest.err; then
12165     ac_cpp_err=$ac_c_preproc_warn_flag
12166   else
12167     ac_cpp_err=
12168   fi
12169 else
12170   ac_cpp_err=yes
12171 fi
12172 if test -z "$ac_cpp_err"; then
12173   ac_cv_header_stdc=yes
12174 else
12175   echo "$as_me: failed program was:" >&5
12176   cat conftest.$ac_ext >&5
12177   ac_cv_header_stdc=no
12178 fi
12179 rm -f conftest.err conftest.$ac_ext
12180
12181 if test $ac_cv_header_stdc = yes; then
12182   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12183   cat >conftest.$ac_ext <<_ACEOF
12184 #line 12184 "configure"
12185 #include "confdefs.h"
12186 #include <string.h>
12187
12188 _ACEOF
12189 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12190   egrep "memchr" >/dev/null 2>&1; then
12191   :
12192 else
12193   ac_cv_header_stdc=no
12194 fi
12195 rm -f conftest*
12196
12197 fi
12198
12199 if test $ac_cv_header_stdc = yes; then
12200   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12201   cat >conftest.$ac_ext <<_ACEOF
12202 #line 12202 "configure"
12203 #include "confdefs.h"
12204 #include <stdlib.h>
12205
12206 _ACEOF
12207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12208   egrep "free" >/dev/null 2>&1; then
12209   :
12210 else
12211   ac_cv_header_stdc=no
12212 fi
12213 rm -f conftest*
12214
12215 fi
12216
12217 if test $ac_cv_header_stdc = yes; then
12218   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12219   if test "$cross_compiling" = yes; then
12220   :
12221 else
12222   cat >conftest.$ac_ext <<_ACEOF
12223 #line 12223 "configure"
12224 #include "confdefs.h"
12225 #include <ctype.h>
12226 #if ((' ' & 0x0FF) == 0x020)
12227 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12228 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12229 #else
12230 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12231                      || ('j' <= (c) && (c) <= 'r') \
12232                      || ('s' <= (c) && (c) <= 'z'))
12233 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12234 #endif
12235
12236 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12237 int
12238 main ()
12239 {
12240   int i;
12241   for (i = 0; i < 256; i++)
12242     if (XOR (islower (i), ISLOWER (i))
12243         || toupper (i) != TOUPPER (i))
12244       $ac_main_return(2);
12245   $ac_main_return (0);
12246 }
12247 _ACEOF
12248 rm -f conftest$ac_exeext
12249 if { (eval echo "$as_me:12249: \"$ac_link\"") >&5
12250   (eval $ac_link) 2>&5
12251   ac_status=$?
12252   echo "$as_me:12252: \$? = $ac_status" >&5
12253   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12254   { (eval echo "$as_me:12254: \"$ac_try\"") >&5
12255   (eval $ac_try) 2>&5
12256   ac_status=$?
12257   echo "$as_me:12257: \$? = $ac_status" >&5
12258   (exit $ac_status); }; }; then
12259   :
12260 else
12261   echo "$as_me: program exited with status $ac_status" >&5
12262 echo "$as_me: failed program was:" >&5
12263 cat conftest.$ac_ext >&5
12264 ac_cv_header_stdc=no
12265 fi
12266 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12267 fi
12268 fi
12269 fi
12270 echo "$as_me:12270: result: $ac_cv_header_stdc" >&5
12271 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12272 if test $ac_cv_header_stdc = yes; then
12273
12274 cat >>confdefs.h <<\EOF
12275 #define STDC_HEADERS 1
12276 EOF
12277
12278 fi
12279
12280 ac_header_dirent=no
12281 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12282   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12283 echo "$as_me:12283: checking for $ac_hdr that defines DIR" >&5
12284 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12285 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12286   echo $ECHO_N "(cached) $ECHO_C" >&6
12287 else
12288   cat >conftest.$ac_ext <<_ACEOF
12289 #line 12289 "configure"
12290 #include "confdefs.h"
12291 #include <sys/types.h>
12292 #include <$ac_hdr>
12293
12294 int
12295 main ()
12296 {
12297 if ((DIR *) 0)
12298 return 0;
12299   ;
12300   return 0;
12301 }
12302 _ACEOF
12303 rm -f conftest.$ac_objext
12304 if { (eval echo "$as_me:12304: \"$ac_compile\"") >&5
12305   (eval $ac_compile) 2>&5
12306   ac_status=$?
12307   echo "$as_me:12307: \$? = $ac_status" >&5
12308   (exit $ac_status); } &&
12309          { ac_try='test -s conftest.$ac_objext'
12310   { (eval echo "$as_me:12310: \"$ac_try\"") >&5
12311   (eval $ac_try) 2>&5
12312   ac_status=$?
12313   echo "$as_me:12313: \$? = $ac_status" >&5
12314   (exit $ac_status); }; }; then
12315   eval "$as_ac_Header=yes"
12316 else
12317   echo "$as_me: failed program was:" >&5
12318 cat conftest.$ac_ext >&5
12319 eval "$as_ac_Header=no"
12320 fi
12321 rm -f conftest.$ac_objext conftest.$ac_ext
12322 fi
12323 echo "$as_me:12323: result: `eval echo '${'$as_ac_Header'}'`" >&5
12324 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12325 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12326   cat >>confdefs.h <<EOF
12327 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12328 EOF
12329
12330 ac_header_dirent=$ac_hdr; break
12331 fi
12332
12333 done
12334 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12335 if test $ac_header_dirent = dirent.h; then
12336   echo "$as_me:12336: checking for opendir in -ldir" >&5
12337 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
12338 if test "${ac_cv_lib_dir_opendir+set}" = set; then
12339   echo $ECHO_N "(cached) $ECHO_C" >&6
12340 else
12341   ac_check_lib_save_LIBS=$LIBS
12342 LIBS="-ldir  $LIBS"
12343 cat >conftest.$ac_ext <<_ACEOF
12344 #line 12344 "configure"
12345 #include "confdefs.h"
12346
12347 /* Override any gcc2 internal prototype to avoid an error.  */
12348 #ifdef __cplusplus
12349 extern "C"
12350 #endif
12351 /* We use char because int might match the return type of a gcc2
12352    builtin and then its argument prototype would still apply.  */
12353 char opendir ();
12354 int
12355 main ()
12356 {
12357 opendir ();
12358   ;
12359   return 0;
12360 }
12361 _ACEOF
12362 rm -f conftest.$ac_objext conftest$ac_exeext
12363 if { (eval echo "$as_me:12363: \"$ac_link\"") >&5
12364   (eval $ac_link) 2>&5
12365   ac_status=$?
12366   echo "$as_me:12366: \$? = $ac_status" >&5
12367   (exit $ac_status); } &&
12368          { ac_try='test -s conftest$ac_exeext'
12369   { (eval echo "$as_me:12369: \"$ac_try\"") >&5
12370   (eval $ac_try) 2>&5
12371   ac_status=$?
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit $ac_status); }; }; then
12374   ac_cv_lib_dir_opendir=yes
12375 else
12376   echo "$as_me: failed program was:" >&5
12377 cat conftest.$ac_ext >&5
12378 ac_cv_lib_dir_opendir=no
12379 fi
12380 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12381 LIBS=$ac_check_lib_save_LIBS
12382 fi
12383 echo "$as_me:12383: result: $ac_cv_lib_dir_opendir" >&5
12384 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
12385 if test $ac_cv_lib_dir_opendir = yes; then
12386   LIBS="$LIBS -ldir"
12387 fi
12388
12389 else
12390   echo "$as_me:12390: checking for opendir in -lx" >&5
12391 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
12392 if test "${ac_cv_lib_x_opendir+set}" = set; then
12393   echo $ECHO_N "(cached) $ECHO_C" >&6
12394 else
12395   ac_check_lib_save_LIBS=$LIBS
12396 LIBS="-lx  $LIBS"
12397 cat >conftest.$ac_ext <<_ACEOF
12398 #line 12398 "configure"
12399 #include "confdefs.h"
12400
12401 /* Override any gcc2 internal prototype to avoid an error.  */
12402 #ifdef __cplusplus
12403 extern "C"
12404 #endif
12405 /* We use char because int might match the return type of a gcc2
12406    builtin and then its argument prototype would still apply.  */
12407 char opendir ();
12408 int
12409 main ()
12410 {
12411 opendir ();
12412   ;
12413   return 0;
12414 }
12415 _ACEOF
12416 rm -f conftest.$ac_objext conftest$ac_exeext
12417 if { (eval echo "$as_me:12417: \"$ac_link\"") >&5
12418   (eval $ac_link) 2>&5
12419   ac_status=$?
12420   echo "$as_me:12420: \$? = $ac_status" >&5
12421   (exit $ac_status); } &&
12422          { ac_try='test -s conftest$ac_exeext'
12423   { (eval echo "$as_me:12423: \"$ac_try\"") >&5
12424   (eval $ac_try) 2>&5
12425   ac_status=$?
12426   echo "$as_me:12426: \$? = $ac_status" >&5
12427   (exit $ac_status); }; }; then
12428   ac_cv_lib_x_opendir=yes
12429 else
12430   echo "$as_me: failed program was:" >&5
12431 cat conftest.$ac_ext >&5
12432 ac_cv_lib_x_opendir=no
12433 fi
12434 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12435 LIBS=$ac_check_lib_save_LIBS
12436 fi
12437 echo "$as_me:12437: result: $ac_cv_lib_x_opendir" >&5
12438 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
12439 if test $ac_cv_lib_x_opendir = yes; then
12440   LIBS="$LIBS -lx"
12441 fi
12442
12443 fi
12444
12445 echo "$as_me:12445: checking whether time.h and sys/time.h may both be included" >&5
12446 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
12447 if test "${ac_cv_header_time+set}" = set; then
12448   echo $ECHO_N "(cached) $ECHO_C" >&6
12449 else
12450   cat >conftest.$ac_ext <<_ACEOF
12451 #line 12451 "configure"
12452 #include "confdefs.h"
12453 #include <sys/types.h>
12454 #include <sys/time.h>
12455 #include <time.h>
12456
12457 int
12458 main ()
12459 {
12460 if ((struct tm *) 0)
12461 return 0;
12462   ;
12463   return 0;
12464 }
12465 _ACEOF
12466 rm -f conftest.$ac_objext
12467 if { (eval echo "$as_me:12467: \"$ac_compile\"") >&5
12468   (eval $ac_compile) 2>&5
12469   ac_status=$?
12470   echo "$as_me:12470: \$? = $ac_status" >&5
12471   (exit $ac_status); } &&
12472          { ac_try='test -s conftest.$ac_objext'
12473   { (eval echo "$as_me:12473: \"$ac_try\"") >&5
12474   (eval $ac_try) 2>&5
12475   ac_status=$?
12476   echo "$as_me:12476: \$? = $ac_status" >&5
12477   (exit $ac_status); }; }; then
12478   ac_cv_header_time=yes
12479 else
12480   echo "$as_me: failed program was:" >&5
12481 cat conftest.$ac_ext >&5
12482 ac_cv_header_time=no
12483 fi
12484 rm -f conftest.$ac_objext conftest.$ac_ext
12485 fi
12486 echo "$as_me:12486: result: $ac_cv_header_time" >&5
12487 echo "${ECHO_T}$ac_cv_header_time" >&6
12488 if test $ac_cv_header_time = yes; then
12489
12490 cat >>confdefs.h <<\EOF
12491 #define TIME_WITH_SYS_TIME 1
12492 EOF
12493
12494 fi
12495
12496 cf_regex_func=no
12497
12498 echo "$as_me:12498: checking for regcomp" >&5
12499 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
12500 if test "${ac_cv_func_regcomp+set}" = set; then
12501   echo $ECHO_N "(cached) $ECHO_C" >&6
12502 else
12503   cat >conftest.$ac_ext <<_ACEOF
12504 #line 12504 "configure"
12505 #include "confdefs.h"
12506 /* System header to define __stub macros and hopefully few prototypes,
12507     which can conflict with char regcomp (); below.  */
12508 #include <assert.h>
12509 /* Override any gcc2 internal prototype to avoid an error.  */
12510 #ifdef __cplusplus
12511 extern "C"
12512 #endif
12513 /* We use char because int might match the return type of a gcc2
12514    builtin and then its argument prototype would still apply.  */
12515 char regcomp ();
12516 char (*f) ();
12517
12518 int
12519 main ()
12520 {
12521 /* The GNU C library defines this for functions which it implements
12522     to always fail with ENOSYS.  Some functions are actually named
12523     something starting with __ and the normal name is an alias.  */
12524 #if defined (__stub_regcomp) || defined (__stub___regcomp)
12525 choke me
12526 #else
12527 f = regcomp;
12528 #endif
12529
12530   ;
12531   return 0;
12532 }
12533 _ACEOF
12534 rm -f conftest.$ac_objext conftest$ac_exeext
12535 if { (eval echo "$as_me:12535: \"$ac_link\"") >&5
12536   (eval $ac_link) 2>&5
12537   ac_status=$?
12538   echo "$as_me:12538: \$? = $ac_status" >&5
12539   (exit $ac_status); } &&
12540          { ac_try='test -s conftest$ac_exeext'
12541   { (eval echo "$as_me:12541: \"$ac_try\"") >&5
12542   (eval $ac_try) 2>&5
12543   ac_status=$?
12544   echo "$as_me:12544: \$? = $ac_status" >&5
12545   (exit $ac_status); }; }; then
12546   ac_cv_func_regcomp=yes
12547 else
12548   echo "$as_me: failed program was:" >&5
12549 cat conftest.$ac_ext >&5
12550 ac_cv_func_regcomp=no
12551 fi
12552 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12553 fi
12554 echo "$as_me:12554: result: $ac_cv_func_regcomp" >&5
12555 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
12556 if test $ac_cv_func_regcomp = yes; then
12557   cf_regex_func=regcomp
12558 else
12559
12560         for cf_regex_lib in regex re
12561         do
12562                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
12563 echo "$as_me:12563: checking for regcomp in -l$cf_regex_lib" >&5
12564 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
12565 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
12566   echo $ECHO_N "(cached) $ECHO_C" >&6
12567 else
12568   ac_check_lib_save_LIBS=$LIBS
12569 LIBS="-l$cf_regex_lib  $LIBS"
12570 cat >conftest.$ac_ext <<_ACEOF
12571 #line 12571 "configure"
12572 #include "confdefs.h"
12573
12574 /* Override any gcc2 internal prototype to avoid an error.  */
12575 #ifdef __cplusplus
12576 extern "C"
12577 #endif
12578 /* We use char because int might match the return type of a gcc2
12579    builtin and then its argument prototype would still apply.  */
12580 char regcomp ();
12581 int
12582 main ()
12583 {
12584 regcomp ();
12585   ;
12586   return 0;
12587 }
12588 _ACEOF
12589 rm -f conftest.$ac_objext conftest$ac_exeext
12590 if { (eval echo "$as_me:12590: \"$ac_link\"") >&5
12591   (eval $ac_link) 2>&5
12592   ac_status=$?
12593   echo "$as_me:12593: \$? = $ac_status" >&5
12594   (exit $ac_status); } &&
12595          { ac_try='test -s conftest$ac_exeext'
12596   { (eval echo "$as_me:12596: \"$ac_try\"") >&5
12597   (eval $ac_try) 2>&5
12598   ac_status=$?
12599   echo "$as_me:12599: \$? = $ac_status" >&5
12600   (exit $ac_status); }; }; then
12601   eval "$as_ac_Lib=yes"
12602 else
12603   echo "$as_me: failed program was:" >&5
12604 cat conftest.$ac_ext >&5
12605 eval "$as_ac_Lib=no"
12606 fi
12607 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12608 LIBS=$ac_check_lib_save_LIBS
12609 fi
12610 echo "$as_me:12610: result: `eval echo '${'$as_ac_Lib'}'`" >&5
12611 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
12612 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
12613
12614                                 LIBS="-l$cf_regex_lib $LIBS"
12615                                 cf_regex_func=regcomp
12616                                 break
12617 fi
12618
12619         done
12620
12621 fi
12622
12623 if test "$cf_regex_func" = no ; then
12624         echo "$as_me:12624: checking for compile" >&5
12625 echo $ECHO_N "checking for compile... $ECHO_C" >&6
12626 if test "${ac_cv_func_compile+set}" = set; then
12627   echo $ECHO_N "(cached) $ECHO_C" >&6
12628 else
12629   cat >conftest.$ac_ext <<_ACEOF
12630 #line 12630 "configure"
12631 #include "confdefs.h"
12632 /* System header to define __stub macros and hopefully few prototypes,
12633     which can conflict with char compile (); below.  */
12634 #include <assert.h>
12635 /* Override any gcc2 internal prototype to avoid an error.  */
12636 #ifdef __cplusplus
12637 extern "C"
12638 #endif
12639 /* We use char because int might match the return type of a gcc2
12640    builtin and then its argument prototype would still apply.  */
12641 char compile ();
12642 char (*f) ();
12643
12644 int
12645 main ()
12646 {
12647 /* The GNU C library defines this for functions which it implements
12648     to always fail with ENOSYS.  Some functions are actually named
12649     something starting with __ and the normal name is an alias.  */
12650 #if defined (__stub_compile) || defined (__stub___compile)
12651 choke me
12652 #else
12653 f = compile;
12654 #endif
12655
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f conftest.$ac_objext conftest$ac_exeext
12661 if { (eval echo "$as_me:12661: \"$ac_link\"") >&5
12662   (eval $ac_link) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit $ac_status); } &&
12666          { ac_try='test -s conftest$ac_exeext'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); }; }; then
12672   ac_cv_func_compile=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat conftest.$ac_ext >&5
12676 ac_cv_func_compile=no
12677 fi
12678 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12679 fi
12680 echo "$as_me:12680: result: $ac_cv_func_compile" >&5
12681 echo "${ECHO_T}$ac_cv_func_compile" >&6
12682 if test $ac_cv_func_compile = yes; then
12683   cf_regex_func=compile
12684 else
12685
12686                 echo "$as_me:12686: checking for compile in -lgen" >&5
12687 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
12688 if test "${ac_cv_lib_gen_compile+set}" = set; then
12689   echo $ECHO_N "(cached) $ECHO_C" >&6
12690 else
12691   ac_check_lib_save_LIBS=$LIBS
12692 LIBS="-lgen  $LIBS"
12693 cat >conftest.$ac_ext <<_ACEOF
12694 #line 12694 "configure"
12695 #include "confdefs.h"
12696
12697 /* Override any gcc2 internal prototype to avoid an error.  */
12698 #ifdef __cplusplus
12699 extern "C"
12700 #endif
12701 /* We use char because int might match the return type of a gcc2
12702    builtin and then its argument prototype would still apply.  */
12703 char compile ();
12704 int
12705 main ()
12706 {
12707 compile ();
12708   ;
12709   return 0;
12710 }
12711 _ACEOF
12712 rm -f conftest.$ac_objext conftest$ac_exeext
12713 if { (eval echo "$as_me:12713: \"$ac_link\"") >&5
12714   (eval $ac_link) 2>&5
12715   ac_status=$?
12716   echo "$as_me:12716: \$? = $ac_status" >&5
12717   (exit $ac_status); } &&
12718          { ac_try='test -s conftest$ac_exeext'
12719   { (eval echo "$as_me:12719: \"$ac_try\"") >&5
12720   (eval $ac_try) 2>&5
12721   ac_status=$?
12722   echo "$as_me:12722: \$? = $ac_status" >&5
12723   (exit $ac_status); }; }; then
12724   ac_cv_lib_gen_compile=yes
12725 else
12726   echo "$as_me: failed program was:" >&5
12727 cat conftest.$ac_ext >&5
12728 ac_cv_lib_gen_compile=no
12729 fi
12730 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12731 LIBS=$ac_check_lib_save_LIBS
12732 fi
12733 echo "$as_me:12733: result: $ac_cv_lib_gen_compile" >&5
12734 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
12735 if test $ac_cv_lib_gen_compile = yes; then
12736
12737                                 LIBS="-lgen $LIBS"
12738                                 cf_regex_func=compile
12739 fi
12740
12741 fi
12742
12743 fi
12744
12745 if test "$cf_regex_func" = no ; then
12746         { echo "$as_me:12746: WARNING: cannot find regular expression library" >&5
12747 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
12748 fi
12749
12750 echo "$as_me:12750: checking for regular-expression headers" >&5
12751 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
12752 if test "${cf_cv_regex_hdrs+set}" = set; then
12753   echo $ECHO_N "(cached) $ECHO_C" >&6
12754 else
12755
12756 cf_cv_regex_hdrs=no
12757 case $cf_regex_func in #(vi
12758 compile) #(vi
12759         for cf_regex_hdr in regexp.h regexpr.h
12760         do
12761                 cat >conftest.$ac_ext <<_ACEOF
12762 #line 12762 "configure"
12763 #include "confdefs.h"
12764 #include <$cf_regex_hdr>
12765 int
12766 main ()
12767 {
12768
12769                         char *p = compile("", "", "", 0);
12770                         int x = step("", "");
12771
12772   ;
12773   return 0;
12774 }
12775 _ACEOF
12776 rm -f conftest.$ac_objext conftest$ac_exeext
12777 if { (eval echo "$as_me:12777: \"$ac_link\"") >&5
12778   (eval $ac_link) 2>&5
12779   ac_status=$?
12780   echo "$as_me:12780: \$? = $ac_status" >&5
12781   (exit $ac_status); } &&
12782          { ac_try='test -s conftest$ac_exeext'
12783   { (eval echo "$as_me:12783: \"$ac_try\"") >&5
12784   (eval $ac_try) 2>&5
12785   ac_status=$?
12786   echo "$as_me:12786: \$? = $ac_status" >&5
12787   (exit $ac_status); }; }; then
12788
12789                         cf_cv_regex_hdrs=$cf_regex_hdr
12790                         break
12791
12792 else
12793   echo "$as_me: failed program was:" >&5
12794 cat conftest.$ac_ext >&5
12795 fi
12796 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12797         done
12798         ;;
12799 *)
12800         for cf_regex_hdr in regex.h
12801         do
12802                 cat >conftest.$ac_ext <<_ACEOF
12803 #line 12803 "configure"
12804 #include "confdefs.h"
12805 #include <sys/types.h>
12806 #include <$cf_regex_hdr>
12807 int
12808 main ()
12809 {
12810
12811                         regex_t *p;
12812                         int x = regcomp(p, "", 0);
12813                         int y = regexec(p, "", 0, 0, 0);
12814                         regfree(p);
12815
12816   ;
12817   return 0;
12818 }
12819 _ACEOF
12820 rm -f conftest.$ac_objext conftest$ac_exeext
12821 if { (eval echo "$as_me:12821: \"$ac_link\"") >&5
12822   (eval $ac_link) 2>&5
12823   ac_status=$?
12824   echo "$as_me:12824: \$? = $ac_status" >&5
12825   (exit $ac_status); } &&
12826          { ac_try='test -s conftest$ac_exeext'
12827   { (eval echo "$as_me:12827: \"$ac_try\"") >&5
12828   (eval $ac_try) 2>&5
12829   ac_status=$?
12830   echo "$as_me:12830: \$? = $ac_status" >&5
12831   (exit $ac_status); }; }; then
12832
12833                         cf_cv_regex_hdrs=$cf_regex_hdr
12834                         break
12835
12836 else
12837   echo "$as_me: failed program was:" >&5
12838 cat conftest.$ac_ext >&5
12839 fi
12840 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12841         done
12842         ;;
12843 esac
12844
12845 fi
12846 echo "$as_me:12846: result: $cf_cv_regex_hdrs" >&5
12847 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
12848
12849 case $cf_cv_regex_hdrs in #(vi
12850     no)        { echo "$as_me:12850: WARNING: no regular expression header found" >&5
12851 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
12852     regex.h)   cat >>confdefs.h <<\EOF
12853 #define HAVE_REGEX_H_FUNCS 1
12854 EOF
12855  ;; #(vi
12856     regexp.h)  cat >>confdefs.h <<\EOF
12857 #define HAVE_REGEXP_H_FUNCS 1
12858 EOF
12859  ;; #(vi
12860     regexpr.h) cat >>confdefs.h <<\EOF
12861 #define HAVE_REGEXPR_H_FUNCS 1
12862 EOF
12863  ;;
12864 esac
12865
12866 for ac_header in \
12867 fcntl.h \
12868 getopt.h \
12869 limits.h \
12870 locale.h \
12871 poll.h \
12872 sys/bsdtypes.h \
12873 sys/ioctl.h \
12874 sys/param.h \
12875 sys/poll.h \
12876 sys/select.h \
12877 sys/time.h \
12878 sys/times.h \
12879 ttyent.h \
12880 unistd.h \
12881 wctype.h \
12882
12883 do
12884 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12885 echo "$as_me:12885: checking for $ac_header" >&5
12886 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12887 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12888   echo $ECHO_N "(cached) $ECHO_C" >&6
12889 else
12890   cat >conftest.$ac_ext <<_ACEOF
12891 #line 12891 "configure"
12892 #include "confdefs.h"
12893 #include <$ac_header>
12894 _ACEOF
12895 if { (eval echo "$as_me:12895: \"$ac_cpp conftest.$ac_ext\"") >&5
12896   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12897   ac_status=$?
12898   egrep -v '^ *\+' conftest.er1 >conftest.err
12899   rm -f conftest.er1
12900   cat conftest.err >&5
12901   echo "$as_me:12901: \$? = $ac_status" >&5
12902   (exit $ac_status); } >/dev/null; then
12903   if test -s conftest.err; then
12904     ac_cpp_err=$ac_c_preproc_warn_flag
12905   else
12906     ac_cpp_err=
12907   fi
12908 else
12909   ac_cpp_err=yes
12910 fi
12911 if test -z "$ac_cpp_err"; then
12912   eval "$as_ac_Header=yes"
12913 else
12914   echo "$as_me: failed program was:" >&5
12915   cat conftest.$ac_ext >&5
12916   eval "$as_ac_Header=no"
12917 fi
12918 rm -f conftest.err conftest.$ac_ext
12919 fi
12920 echo "$as_me:12920: result: `eval echo '${'$as_ac_Header'}'`" >&5
12921 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12922 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12923   cat >>confdefs.h <<EOF
12924 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12925 EOF
12926
12927 fi
12928 done
12929
12930 # check for ISC (this may also define _POSIX_SOURCE)
12931 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
12932 if test "$ISC" = yes ; then
12933
12934 echo "$as_me:12934: checking for main in -lcposix" >&5
12935 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
12936 if test "${ac_cv_lib_cposix_main+set}" = set; then
12937   echo $ECHO_N "(cached) $ECHO_C" >&6
12938 else
12939   ac_check_lib_save_LIBS=$LIBS
12940 LIBS="-lcposix  $LIBS"
12941 cat >conftest.$ac_ext <<_ACEOF
12942 #line 12942 "configure"
12943 #include "confdefs.h"
12944
12945 int
12946 main ()
12947 {
12948 main ();
12949   ;
12950   return 0;
12951 }
12952 _ACEOF
12953 rm -f conftest.$ac_objext conftest$ac_exeext
12954 if { (eval echo "$as_me:12954: \"$ac_link\"") >&5
12955   (eval $ac_link) 2>&5
12956   ac_status=$?
12957   echo "$as_me:12957: \$? = $ac_status" >&5
12958   (exit $ac_status); } &&
12959          { ac_try='test -s conftest$ac_exeext'
12960   { (eval echo "$as_me:12960: \"$ac_try\"") >&5
12961   (eval $ac_try) 2>&5
12962   ac_status=$?
12963   echo "$as_me:12963: \$? = $ac_status" >&5
12964   (exit $ac_status); }; }; then
12965   ac_cv_lib_cposix_main=yes
12966 else
12967   echo "$as_me: failed program was:" >&5
12968 cat conftest.$ac_ext >&5
12969 ac_cv_lib_cposix_main=no
12970 fi
12971 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12972 LIBS=$ac_check_lib_save_LIBS
12973 fi
12974 echo "$as_me:12974: result: $ac_cv_lib_cposix_main" >&5
12975 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
12976 if test $ac_cv_lib_cposix_main = yes; then
12977   cat >>confdefs.h <<EOF
12978 #define HAVE_LIBCPOSIX 1
12979 EOF
12980
12981   LIBS="-lcposix $LIBS"
12982
12983 fi
12984
12985         echo "$as_me:12985: checking for bzero in -linet" >&5
12986 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
12987 if test "${ac_cv_lib_inet_bzero+set}" = set; then
12988   echo $ECHO_N "(cached) $ECHO_C" >&6
12989 else
12990   ac_check_lib_save_LIBS=$LIBS
12991 LIBS="-linet  $LIBS"
12992 cat >conftest.$ac_ext <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995
12996 /* Override any gcc2 internal prototype to avoid an error.  */
12997 #ifdef __cplusplus
12998 extern "C"
12999 #endif
13000 /* We use char because int might match the return type of a gcc2
13001    builtin and then its argument prototype would still apply.  */
13002 char bzero ();
13003 int
13004 main ()
13005 {
13006 bzero ();
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f conftest.$ac_objext conftest$ac_exeext
13012 if { (eval echo "$as_me:13012: \"$ac_link\"") >&5
13013   (eval $ac_link) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit $ac_status); } &&
13017          { ac_try='test -s conftest$ac_exeext'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit $ac_status); }; }; then
13023   ac_cv_lib_inet_bzero=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat conftest.$ac_ext >&5
13027 ac_cv_lib_inet_bzero=no
13028 fi
13029 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13030 LIBS=$ac_check_lib_save_LIBS
13031 fi
13032 echo "$as_me:13032: result: $ac_cv_lib_inet_bzero" >&5
13033 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13034 if test $ac_cv_lib_inet_bzero = yes; then
13035   LIBS="$LIBS -linet"
13036 fi
13037 fi
13038
13039 echo "$as_me:13039: checking if sys/time.h works with sys/select.h" >&5
13040 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13041 if test "${cf_cv_sys_time_select+set}" = set; then
13042   echo $ECHO_N "(cached) $ECHO_C" >&6
13043 else
13044
13045 cat >conftest.$ac_ext <<_ACEOF
13046 #line 13046 "configure"
13047 #include "confdefs.h"
13048
13049 #include <sys/types.h>
13050 #ifdef HAVE_SYS_TIME_H
13051 #include <sys/time.h>
13052 #endif
13053 #ifdef HAVE_SYS_SELECT_H
13054 #include <sys/select.h>
13055 #endif
13056
13057 int
13058 main ()
13059 {
13060
13061   ;
13062   return 0;
13063 }
13064 _ACEOF
13065 rm -f conftest.$ac_objext
13066 if { (eval echo "$as_me:13066: \"$ac_compile\"") >&5
13067   (eval $ac_compile) 2>&5
13068   ac_status=$?
13069   echo "$as_me:13069: \$? = $ac_status" >&5
13070   (exit $ac_status); } &&
13071          { ac_try='test -s conftest.$ac_objext'
13072   { (eval echo "$as_me:13072: \"$ac_try\"") >&5
13073   (eval $ac_try) 2>&5
13074   ac_status=$?
13075   echo "$as_me:13075: \$? = $ac_status" >&5
13076   (exit $ac_status); }; }; then
13077   cf_cv_sys_time_select=yes
13078 else
13079   echo "$as_me: failed program was:" >&5
13080 cat conftest.$ac_ext >&5
13081 cf_cv_sys_time_select=no
13082 fi
13083 rm -f conftest.$ac_objext conftest.$ac_ext
13084
13085 fi
13086
13087 echo "$as_me:13087: result: $cf_cv_sys_time_select" >&5
13088 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13089 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13090 #define HAVE_SYS_TIME_SELECT 1
13091 EOF
13092
13093 ###     checks for compiler characteristics
13094 ac_ext=c
13095 ac_cpp='$CPP $CPPFLAGS'
13096 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13097 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13098 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13099 ac_main_return=return
13100
13101 echo "$as_me:13101: checking for $CC option to accept ANSI C" >&5
13102 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13103 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13104   echo $ECHO_N "(cached) $ECHO_C" >&6
13105 else
13106   ac_cv_prog_cc_stdc=no
13107 ac_save_CC=$CC
13108 cat >conftest.$ac_ext <<_ACEOF
13109 #line 13109 "configure"
13110 #include "confdefs.h"
13111 #include <stdarg.h>
13112 #include <stdio.h>
13113 #include <sys/types.h>
13114 #include <sys/stat.h>
13115 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13116 struct buf { int x; };
13117 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13118 static char *e (p, i)
13119      char **p;
13120      int i;
13121 {
13122   return p[i];
13123 }
13124 static char *f (char * (*g) (char **, int), char **p, ...)
13125 {
13126   char *s;
13127   va_list v;
13128   va_start (v,p);
13129   s = g (p, va_arg (v,int));
13130   va_end (v);
13131   return s;
13132 }
13133 int test (int i, double x);
13134 struct s1 {int (*f) (int a);};
13135 struct s2 {int (*f) (double a);};
13136 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13137 int argc;
13138 char **argv;
13139 int
13140 main ()
13141 {
13142 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13143   ;
13144   return 0;
13145 }
13146 _ACEOF
13147 # Don't try gcc -ansi; that turns off useful extensions and
13148 # breaks some systems' header files.
13149 # AIX                   -qlanglvl=ansi
13150 # Ultrix and OSF/1      -std1
13151 # HP-UX 10.20 and later -Ae
13152 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13153 # SVR4                  -Xc -D__EXTENSIONS__
13154 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13155 do
13156   CC="$ac_save_CC $ac_arg"
13157   rm -f conftest.$ac_objext
13158 if { (eval echo "$as_me:13158: \"$ac_compile\"") >&5
13159   (eval $ac_compile) 2>&5
13160   ac_status=$?
13161   echo "$as_me:13161: \$? = $ac_status" >&5
13162   (exit $ac_status); } &&
13163          { ac_try='test -s conftest.$ac_objext'
13164   { (eval echo "$as_me:13164: \"$ac_try\"") >&5
13165   (eval $ac_try) 2>&5
13166   ac_status=$?
13167   echo "$as_me:13167: \$? = $ac_status" >&5
13168   (exit $ac_status); }; }; then
13169   ac_cv_prog_cc_stdc=$ac_arg
13170 break
13171 else
13172   echo "$as_me: failed program was:" >&5
13173 cat conftest.$ac_ext >&5
13174 fi
13175 rm -f conftest.$ac_objext
13176 done
13177 rm -f conftest.$ac_ext conftest.$ac_objext
13178 CC=$ac_save_CC
13179
13180 fi
13181
13182 case "x$ac_cv_prog_cc_stdc" in
13183   x|xno)
13184     echo "$as_me:13184: result: none needed" >&5
13185 echo "${ECHO_T}none needed" >&6 ;;
13186   *)
13187     echo "$as_me:13187: result: $ac_cv_prog_cc_stdc" >&5
13188 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13189     CC="$CC $ac_cv_prog_cc_stdc" ;;
13190 esac
13191
13192 echo "$as_me:13192: checking for an ANSI C-conforming const" >&5
13193 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13194 if test "${ac_cv_c_const+set}" = set; then
13195   echo $ECHO_N "(cached) $ECHO_C" >&6
13196 else
13197   cat >conftest.$ac_ext <<_ACEOF
13198 #line 13198 "configure"
13199 #include "confdefs.h"
13200
13201 int
13202 main ()
13203 {
13204 /* FIXME: Include the comments suggested by Paul. */
13205 #ifndef __cplusplus
13206   /* Ultrix mips cc rejects this.  */
13207   typedef int charset[2];
13208   const charset x;
13209   /* SunOS 4.1.1 cc rejects this.  */
13210   char const *const *ccp;
13211   char **p;
13212   /* NEC SVR4.0.2 mips cc rejects this.  */
13213   struct point {int x, y;};
13214   static struct point const zero = {0,0};
13215   /* AIX XL C 1.02.0.0 rejects this.
13216      It does not let you subtract one const X* pointer from another in
13217      an arm of an if-expression whose if-part is not a constant
13218      expression */
13219   const char *g = "string";
13220   ccp = &g + (g ? g-g : 0);
13221   /* HPUX 7.0 cc rejects these. */
13222   ++ccp;
13223   p = (char**) ccp;
13224   ccp = (char const *const *) p;
13225   { /* SCO 3.2v4 cc rejects this.  */
13226     char *t;
13227     char const *s = 0 ? (char *) 0 : (char const *) 0;
13228
13229     *t++ = 0;
13230   }
13231   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
13232     int x[] = {25, 17};
13233     const int *foo = &x[0];
13234     ++foo;
13235   }
13236   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
13237     typedef const int *iptr;
13238     iptr p = 0;
13239     ++p;
13240   }
13241   { /* AIX XL C 1.02.0.0 rejects this saying
13242        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
13243     struct s { int j; const int *ap[3]; };
13244     struct s *b; b->j = 5;
13245   }
13246   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
13247     const int foo = 10;
13248   }
13249 #endif
13250
13251   ;
13252   return 0;
13253 }
13254 _ACEOF
13255 rm -f conftest.$ac_objext
13256 if { (eval echo "$as_me:13256: \"$ac_compile\"") >&5
13257   (eval $ac_compile) 2>&5
13258   ac_status=$?
13259   echo "$as_me:13259: \$? = $ac_status" >&5
13260   (exit $ac_status); } &&
13261          { ac_try='test -s conftest.$ac_objext'
13262   { (eval echo "$as_me:13262: \"$ac_try\"") >&5
13263   (eval $ac_try) 2>&5
13264   ac_status=$?
13265   echo "$as_me:13265: \$? = $ac_status" >&5
13266   (exit $ac_status); }; }; then
13267   ac_cv_c_const=yes
13268 else
13269   echo "$as_me: failed program was:" >&5
13270 cat conftest.$ac_ext >&5
13271 ac_cv_c_const=no
13272 fi
13273 rm -f conftest.$ac_objext conftest.$ac_ext
13274 fi
13275 echo "$as_me:13275: result: $ac_cv_c_const" >&5
13276 echo "${ECHO_T}$ac_cv_c_const" >&6
13277 if test $ac_cv_c_const = no; then
13278
13279 cat >>confdefs.h <<\EOF
13280 #define const
13281 EOF
13282
13283 fi
13284
13285 echo "$as_me:13285: checking for inline" >&5
13286 echo $ECHO_N "checking for inline... $ECHO_C" >&6
13287 if test "${ac_cv_c_inline+set}" = set; then
13288   echo $ECHO_N "(cached) $ECHO_C" >&6
13289 else
13290   ac_cv_c_inline=no
13291 for ac_kw in inline __inline__ __inline; do
13292   cat >conftest.$ac_ext <<_ACEOF
13293 #line 13293 "configure"
13294 #include "confdefs.h"
13295 #ifndef __cplusplus
13296 static $ac_kw int static_foo () {return 0; }
13297 $ac_kw int foo () {return 0; }
13298 #endif
13299
13300 _ACEOF
13301 rm -f conftest.$ac_objext
13302 if { (eval echo "$as_me:13302: \"$ac_compile\"") >&5
13303   (eval $ac_compile) 2>&5
13304   ac_status=$?
13305   echo "$as_me:13305: \$? = $ac_status" >&5
13306   (exit $ac_status); } &&
13307          { ac_try='test -s conftest.$ac_objext'
13308   { (eval echo "$as_me:13308: \"$ac_try\"") >&5
13309   (eval $ac_try) 2>&5
13310   ac_status=$?
13311   echo "$as_me:13311: \$? = $ac_status" >&5
13312   (exit $ac_status); }; }; then
13313   ac_cv_c_inline=$ac_kw; break
13314 else
13315   echo "$as_me: failed program was:" >&5
13316 cat conftest.$ac_ext >&5
13317 fi
13318 rm -f conftest.$ac_objext conftest.$ac_ext
13319 done
13320
13321 fi
13322 echo "$as_me:13322: result: $ac_cv_c_inline" >&5
13323 echo "${ECHO_T}$ac_cv_c_inline" >&6
13324 case $ac_cv_c_inline in
13325   inline | yes) ;;
13326   no)
13327 cat >>confdefs.h <<\EOF
13328 #define inline
13329 EOF
13330  ;;
13331   *)  cat >>confdefs.h <<EOF
13332 #define inline $ac_cv_c_inline
13333 EOF
13334  ;;
13335 esac
13336
13337 NCURSES_INLINE=
13338 if test "$ac_cv_c_inline" != no ; then
13339   NCURSES_INLINE=inline
13340   if test "$INTEL_COMPILER" = yes
13341   then
13342     :
13343   elif test "$GCC" = yes
13344   then
13345     echo "$as_me:13345: checking if gcc supports options to tune inlining" >&5
13346 echo $ECHO_N "checking if gcc supports options to tune inlining... $ECHO_C" >&6
13347 if test "${cf_cv_gcc_inline+set}" = set; then
13348   echo $ECHO_N "(cached) $ECHO_C" >&6
13349 else
13350
13351       cf_save_CFLAGS=$CFLAGS
13352       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
13353       cat >conftest.$ac_ext <<_ACEOF
13354 #line 13354 "configure"
13355 #include "confdefs.h"
13356 inline int foo(void) { return 1; }
13357 int
13358 main ()
13359 {
13360 ${cf_cv_main_return:-return} foo()
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 rm -f conftest.$ac_objext
13366 if { (eval echo "$as_me:13366: \"$ac_compile\"") >&5
13367   (eval $ac_compile) 2>&5
13368   ac_status=$?
13369   echo "$as_me:13369: \$? = $ac_status" >&5
13370   (exit $ac_status); } &&
13371          { ac_try='test -s conftest.$ac_objext'
13372   { (eval echo "$as_me:13372: \"$ac_try\"") >&5
13373   (eval $ac_try) 2>&5
13374   ac_status=$?
13375   echo "$as_me:13375: \$? = $ac_status" >&5
13376   (exit $ac_status); }; }; then
13377   cf_cv_gcc_inline=yes
13378 else
13379   echo "$as_me: failed program was:" >&5
13380 cat conftest.$ac_ext >&5
13381 cf_cv_gcc_inline=no
13382 fi
13383 rm -f conftest.$ac_objext conftest.$ac_ext
13384       CFLAGS=$cf_save_CFLAGS
13385
13386 fi
13387 echo "$as_me:13387: result: $cf_cv_gcc_inline" >&5
13388 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
13389     if test "$cf_cv_gcc_inline" = yes ; then
13390
13391 cf_fix_cppflags=no
13392 cf_new_cflags=
13393 cf_new_cppflags=
13394 cf_new_extra_cppflags=
13395
13396 for cf_add_cflags in --param max-inline-insns-single=1200
13397 do
13398 case $cf_fix_cppflags in
13399 no)
13400         case $cf_add_cflags in #(vi
13401         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
13402                 case $cf_add_cflags in
13403                 -D*)
13404                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13405
13406                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13407                                 && test -z "${cf_tst_cflags}" \
13408                                 && cf_fix_cppflags=yes
13409
13410                         if test $cf_fix_cppflags = yes ; then
13411                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13412                                 continue
13413                         elif test "${cf_tst_cflags}" = "\"'" ; then
13414                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13415                                 continue
13416                         fi
13417                         ;;
13418                 esac
13419                 case "$CPPFLAGS" in
13420                 *$cf_add_cflags) #(vi
13421                         ;;
13422                 *) #(vi
13423                         case $cf_add_cflags in #(vi
13424                         -D*)
13425                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13426
13427 CPPFLAGS=`echo "$CPPFLAGS" | \
13428         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
13429                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
13430
13431                                 ;;
13432                         esac
13433                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
13434                         ;;
13435                 esac
13436                 ;;
13437         *)
13438                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
13439                 ;;
13440         esac
13441         ;;
13442 yes)
13443         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
13444
13445         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13446
13447         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
13448                 && test -z "${cf_tst_cflags}" \
13449                 && cf_fix_cppflags=no
13450         ;;
13451 esac
13452 done
13453
13454 if test -n "$cf_new_cflags" ; then
13455
13456         CFLAGS="$CFLAGS $cf_new_cflags"
13457 fi
13458
13459 if test -n "$cf_new_cppflags" ; then
13460
13461         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
13462 fi
13463
13464 if test -n "$cf_new_extra_cppflags" ; then
13465
13466         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
13467 fi
13468
13469     fi
13470   fi
13471 fi
13472
13473 echo "$as_me:13473: checking for signal global datatype" >&5
13474 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
13475 if test "${cf_cv_sig_atomic_t+set}" = set; then
13476   echo $ECHO_N "(cached) $ECHO_C" >&6
13477 else
13478
13479         for cf_type in \
13480                 "volatile sig_atomic_t" \
13481                 "sig_atomic_t" \
13482                 "int"
13483         do
13484         cat >conftest.$ac_ext <<_ACEOF
13485 #line 13485 "configure"
13486 #include "confdefs.h"
13487
13488 #include <sys/types.h>
13489 #include <signal.h>
13490 #include <stdio.h>
13491
13492 extern $cf_type x;
13493 $cf_type x;
13494 static void handler(int sig)
13495 {
13496         x = 5;
13497 }
13498 int
13499 main ()
13500 {
13501 signal(SIGINT, handler);
13502                  x = 1
13503   ;
13504   return 0;
13505 }
13506 _ACEOF
13507 rm -f conftest.$ac_objext
13508 if { (eval echo "$as_me:13508: \"$ac_compile\"") >&5
13509   (eval $ac_compile) 2>&5
13510   ac_status=$?
13511   echo "$as_me:13511: \$? = $ac_status" >&5
13512   (exit $ac_status); } &&
13513          { ac_try='test -s conftest.$ac_objext'
13514   { (eval echo "$as_me:13514: \"$ac_try\"") >&5
13515   (eval $ac_try) 2>&5
13516   ac_status=$?
13517   echo "$as_me:13517: \$? = $ac_status" >&5
13518   (exit $ac_status); }; }; then
13519   cf_cv_sig_atomic_t=$cf_type
13520 else
13521   echo "$as_me: failed program was:" >&5
13522 cat conftest.$ac_ext >&5
13523 cf_cv_sig_atomic_t=no
13524 fi
13525 rm -f conftest.$ac_objext conftest.$ac_ext
13526                 test "$cf_cv_sig_atomic_t" != no && break
13527         done
13528
13529 fi
13530
13531 echo "$as_me:13531: result: $cf_cv_sig_atomic_t" >&5
13532 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
13533 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
13534 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
13535 EOF
13536
13537 if test $NCURSES_CHTYPE = auto ; then
13538
13539 echo "$as_me:13539: checking for type of chtype" >&5
13540 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13541 if test "${cf_cv_typeof_chtype+set}" = set; then
13542   echo $ECHO_N "(cached) $ECHO_C" >&6
13543 else
13544
13545                 if test "$cross_compiling" = yes; then
13546   cf_cv_typeof_chtype=long
13547 else
13548   cat >conftest.$ac_ext <<_ACEOF
13549 #line 13549 "configure"
13550 #include "confdefs.h"
13551
13552 #define WANT_BITS 31
13553 #include <stdio.h>
13554 int main()
13555 {
13556         FILE *fp = fopen("cf_test.out", "w");
13557         if (fp != 0) {
13558                 char *result = "long";
13559                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
13560                         int n;
13561                         unsigned int x, y;
13562                         for (n = 0; n < WANT_BITS; n++) {
13563                                 x = (1 << n);
13564                                 y = (x >> n);
13565                                 if (y != 1 || x == 0) {
13566                                         x = 0;
13567                                         break;
13568                                 }
13569                         }
13570                         /*
13571                          * If x is nonzero, an int is big enough for the bits
13572                          * that we want.
13573                          */
13574                         result = (x != 0) ? "int" : "long";
13575                 }
13576                 fputs(result, fp);
13577                 fclose(fp);
13578         }
13579         ${cf_cv_main_return:-return}(0);
13580 }
13581
13582 _ACEOF
13583 rm -f conftest$ac_exeext
13584 if { (eval echo "$as_me:13584: \"$ac_link\"") >&5
13585   (eval $ac_link) 2>&5
13586   ac_status=$?
13587   echo "$as_me:13587: \$? = $ac_status" >&5
13588   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13589   { (eval echo "$as_me:13589: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit $ac_status); }; }; then
13594   cf_cv_typeof_chtype=`cat cf_test.out`
13595 else
13596   echo "$as_me: program exited with status $ac_status" >&5
13597 echo "$as_me: failed program was:" >&5
13598 cat conftest.$ac_ext >&5
13599 cf_cv_typeof_chtype=long
13600 fi
13601 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13602 fi
13603                 rm -f cf_test.out
13604
13605 fi
13606
13607 echo "$as_me:13607: result: $cf_cv_typeof_chtype" >&5
13608 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
13609
13610 cat >>confdefs.h <<EOF
13611 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
13612 EOF
13613
13614 else
13615         cf_cv_typeof_chtype=$NCURSES_CHTYPE
13616 fi
13617 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
13618
13619 echo "$as_me:13619: checking if unsigned literals are legal" >&5
13620 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
13621 if test "${cf_cv_unsigned_literals+set}" = set; then
13622   echo $ECHO_N "(cached) $ECHO_C" >&6
13623 else
13624
13625         cat >conftest.$ac_ext <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628
13629 int
13630 main ()
13631 {
13632 long x = 1L + 1UL + 1U + 1
13633   ;
13634   return 0;
13635 }
13636 _ACEOF
13637 rm -f conftest.$ac_objext
13638 if { (eval echo "$as_me:13638: \"$ac_compile\"") >&5
13639   (eval $ac_compile) 2>&5
13640   ac_status=$?
13641   echo "$as_me:13641: \$? = $ac_status" >&5
13642   (exit $ac_status); } &&
13643          { ac_try='test -s conftest.$ac_objext'
13644   { (eval echo "$as_me:13644: \"$ac_try\"") >&5
13645   (eval $ac_try) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit $ac_status); }; }; then
13649   cf_cv_unsigned_literals=yes
13650 else
13651   echo "$as_me: failed program was:" >&5
13652 cat conftest.$ac_ext >&5
13653 cf_cv_unsigned_literals=no
13654 fi
13655 rm -f conftest.$ac_objext conftest.$ac_ext
13656
13657 fi
13658
13659 echo "$as_me:13659: result: $cf_cv_unsigned_literals" >&5
13660 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
13661
13662 cf_cv_1UL="1"
13663 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
13664 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
13665
13666 if test $NCURSES_MMASK_T = auto ; then
13667         cf_cv_typeof_mmask_t=long
13668 else
13669         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
13670 fi
13671 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
13672
13673 ###     Checks for external-data
13674
13675 echo "$as_me:13675: checking if external errno is declared" >&5
13676 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
13677 if test "${cf_cv_dcl_errno+set}" = set; then
13678   echo $ECHO_N "(cached) $ECHO_C" >&6
13679 else
13680
13681     cat >conftest.$ac_ext <<_ACEOF
13682 #line 13682 "configure"
13683 #include "confdefs.h"
13684
13685 #ifdef HAVE_STDLIB_H
13686 #include <stdlib.h>
13687 #endif
13688 #include <stdio.h>
13689 #include <sys/types.h>
13690 #include <errno.h>
13691 int
13692 main ()
13693 {
13694 int x = (int) errno
13695   ;
13696   return 0;
13697 }
13698 _ACEOF
13699 rm -f conftest.$ac_objext
13700 if { (eval echo "$as_me:13700: \"$ac_compile\"") >&5
13701   (eval $ac_compile) 2>&5
13702   ac_status=$?
13703   echo "$as_me:13703: \$? = $ac_status" >&5
13704   (exit $ac_status); } &&
13705          { ac_try='test -s conftest.$ac_objext'
13706   { (eval echo "$as_me:13706: \"$ac_try\"") >&5
13707   (eval $ac_try) 2>&5
13708   ac_status=$?
13709   echo "$as_me:13709: \$? = $ac_status" >&5
13710   (exit $ac_status); }; }; then
13711   cf_cv_dcl_errno=yes
13712 else
13713   echo "$as_me: failed program was:" >&5
13714 cat conftest.$ac_ext >&5
13715 cf_cv_dcl_errno=no
13716 fi
13717 rm -f conftest.$ac_objext conftest.$ac_ext
13718
13719 fi
13720 echo "$as_me:13720: result: $cf_cv_dcl_errno" >&5
13721 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
13722
13723 if test "$cf_cv_dcl_errno" = no ; then
13724
13725 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13726
13727     cat >>confdefs.h <<EOF
13728 #define $cf_result 1
13729 EOF
13730
13731 fi
13732
13733 # It's possible (for near-UNIX clones) that the data doesn't exist
13734
13735 echo "$as_me:13735: checking if external errno exists" >&5
13736 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
13737 if test "${cf_cv_have_errno+set}" = set; then
13738   echo $ECHO_N "(cached) $ECHO_C" >&6
13739 else
13740
13741     cat >conftest.$ac_ext <<_ACEOF
13742 #line 13742 "configure"
13743 #include "confdefs.h"
13744
13745 #undef errno
13746 extern int errno;
13747
13748 int
13749 main ()
13750 {
13751 errno = 2
13752   ;
13753   return 0;
13754 }
13755 _ACEOF
13756 rm -f conftest.$ac_objext conftest$ac_exeext
13757 if { (eval echo "$as_me:13757: \"$ac_link\"") >&5
13758   (eval $ac_link) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit $ac_status); } &&
13762          { ac_try='test -s conftest$ac_exeext'
13763   { (eval echo "$as_me:13763: \"$ac_try\"") >&5
13764   (eval $ac_try) 2>&5
13765   ac_status=$?
13766   echo "$as_me:13766: \$? = $ac_status" >&5
13767   (exit $ac_status); }; }; then
13768   cf_cv_have_errno=yes
13769 else
13770   echo "$as_me: failed program was:" >&5
13771 cat conftest.$ac_ext >&5
13772 cf_cv_have_errno=no
13773 fi
13774 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13775
13776 fi
13777 echo "$as_me:13777: result: $cf_cv_have_errno" >&5
13778 echo "${ECHO_T}$cf_cv_have_errno" >&6
13779
13780 if test "$cf_cv_have_errno" = yes ; then
13781
13782 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13783
13784     cat >>confdefs.h <<EOF
13785 #define $cf_result 1
13786 EOF
13787
13788 fi
13789
13790 echo "$as_me:13790: checking if data-only library module links" >&5
13791 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
13792 if test "${cf_cv_link_dataonly+set}" = set; then
13793   echo $ECHO_N "(cached) $ECHO_C" >&6
13794 else
13795
13796         rm -f conftest.a
13797         cat >conftest.$ac_ext <<EOF
13798 #line 13798 "configure"
13799 int     testdata[3] = { 123, 456, 789 };
13800 EOF
13801         if { (eval echo "$as_me:13801: \"$ac_compile\"") >&5
13802   (eval $ac_compile) 2>&5
13803   ac_status=$?
13804   echo "$as_me:13804: \$? = $ac_status" >&5
13805   (exit $ac_status); } ; then
13806                 mv conftest.o data.o && \
13807                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
13808         fi
13809         rm -f conftest.$ac_ext data.o
13810         cat >conftest.$ac_ext <<EOF
13811 #line 13811 "configure"
13812 int     testfunc()
13813 {
13814 #if defined(NeXT)
13815         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
13816 #else
13817         extern int testdata[3];
13818         return testdata[0] == 123
13819            &&  testdata[1] == 456
13820            &&  testdata[2] == 789;
13821 #endif
13822 }
13823 EOF
13824         if { (eval echo "$as_me:13824: \"$ac_compile\"") >&5
13825   (eval $ac_compile) 2>&5
13826   ac_status=$?
13827   echo "$as_me:13827: \$? = $ac_status" >&5
13828   (exit $ac_status); }; then
13829                 mv conftest.o func.o && \
13830                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
13831         fi
13832         rm -f conftest.$ac_ext func.o
13833         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
13834         cf_saveLIBS="$LIBS"
13835         LIBS="conftest.a $LIBS"
13836         if test "$cross_compiling" = yes; then
13837   cf_cv_link_dataonly=unknown
13838 else
13839   cat >conftest.$ac_ext <<_ACEOF
13840 #line 13840 "configure"
13841 #include "confdefs.h"
13842
13843         int main()
13844         {
13845                 extern int testfunc();
13846                 ${cf_cv_main_return:-return} (!testfunc());
13847         }
13848
13849 _ACEOF
13850 rm -f conftest$ac_exeext
13851 if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
13852   (eval $ac_link) 2>&5
13853   ac_status=$?
13854   echo "$as_me:13854: \$? = $ac_status" >&5
13855   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13856   { (eval echo "$as_me:13856: \"$ac_try\"") >&5
13857   (eval $ac_try) 2>&5
13858   ac_status=$?
13859   echo "$as_me:13859: \$? = $ac_status" >&5
13860   (exit $ac_status); }; }; then
13861   cf_cv_link_dataonly=yes
13862 else
13863   echo "$as_me: program exited with status $ac_status" >&5
13864 echo "$as_me: failed program was:" >&5
13865 cat conftest.$ac_ext >&5
13866 cf_cv_link_dataonly=no
13867 fi
13868 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13869 fi
13870         LIBS="$cf_saveLIBS"
13871
13872 fi
13873
13874 echo "$as_me:13874: result: $cf_cv_link_dataonly" >&5
13875 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
13876
13877 if test "$cf_cv_link_dataonly" = no ; then
13878         cat >>confdefs.h <<\EOF
13879 #define BROKEN_LINKER 1
13880 EOF
13881
13882         BROKEN_LINKER=1
13883 fi
13884
13885 ###     Checks for library functions.
13886
13887 for ac_func in \
13888 getcwd \
13889 getegid \
13890 geteuid \
13891 getttynam \
13892 issetugid \
13893 poll \
13894 remove \
13895 select \
13896 setbuf \
13897 setbuffer \
13898 setvbuf \
13899 sigaction \
13900 sigvec \
13901 strdup \
13902 strstr \
13903 tcgetpgrp \
13904 times \
13905 vsnprintf \
13906
13907 do
13908 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13909 echo "$as_me:13909: checking for $ac_func" >&5
13910 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13911 if eval "test \"\${$as_ac_var+set}\" = set"; then
13912   echo $ECHO_N "(cached) $ECHO_C" >&6
13913 else
13914   cat >conftest.$ac_ext <<_ACEOF
13915 #line 13915 "configure"
13916 #include "confdefs.h"
13917 /* System header to define __stub macros and hopefully few prototypes,
13918     which can conflict with char $ac_func (); below.  */
13919 #include <assert.h>
13920 /* Override any gcc2 internal prototype to avoid an error.  */
13921 #ifdef __cplusplus
13922 extern "C"
13923 #endif
13924 /* We use char because int might match the return type of a gcc2
13925    builtin and then its argument prototype would still apply.  */
13926 char $ac_func ();
13927 char (*f) ();
13928
13929 int
13930 main ()
13931 {
13932 /* The GNU C library defines this for functions which it implements
13933     to always fail with ENOSYS.  Some functions are actually named
13934     something starting with __ and the normal name is an alias.  */
13935 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13936 choke me
13937 #else
13938 f = $ac_func;
13939 #endif
13940
13941   ;
13942   return 0;
13943 }
13944 _ACEOF
13945 rm -f conftest.$ac_objext conftest$ac_exeext
13946 if { (eval echo "$as_me:13946: \"$ac_link\"") >&5
13947   (eval $ac_link) 2>&5
13948   ac_status=$?
13949   echo "$as_me:13949: \$? = $ac_status" >&5
13950   (exit $ac_status); } &&
13951          { ac_try='test -s conftest$ac_exeext'
13952   { (eval echo "$as_me:13952: \"$ac_try\"") >&5
13953   (eval $ac_try) 2>&5
13954   ac_status=$?
13955   echo "$as_me:13955: \$? = $ac_status" >&5
13956   (exit $ac_status); }; }; then
13957   eval "$as_ac_var=yes"
13958 else
13959   echo "$as_me: failed program was:" >&5
13960 cat conftest.$ac_ext >&5
13961 eval "$as_ac_var=no"
13962 fi
13963 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13964 fi
13965 echo "$as_me:13965: result: `eval echo '${'$as_ac_var'}'`" >&5
13966 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13967 if test `eval echo '${'$as_ac_var'}'` = yes; then
13968   cat >>confdefs.h <<EOF
13969 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13970 EOF
13971
13972 fi
13973 done
13974
13975 if test "$with_getcap" = "yes" ; then
13976
13977 echo "$as_me:13977: checking for terminal-capability database functions" >&5
13978 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
13979 if test "${cf_cv_cgetent+set}" = set; then
13980   echo $ECHO_N "(cached) $ECHO_C" >&6
13981 else
13982
13983 cat >conftest.$ac_ext <<_ACEOF
13984 #line 13984 "configure"
13985 #include "confdefs.h"
13986
13987 #include <stdlib.h>
13988 int
13989 main ()
13990 {
13991
13992         char temp[128];
13993         char *buf = temp;
13994         char *db_array = temp;
13995         cgetent(&buf, /* int *, */ &db_array, "vt100");
13996         cgetcap(buf, "tc", '=');
13997         cgetmatch(buf, "tc");
13998
13999   ;
14000   return 0;
14001 }
14002 _ACEOF
14003 rm -f conftest.$ac_objext conftest$ac_exeext
14004 if { (eval echo "$as_me:14004: \"$ac_link\"") >&5
14005   (eval $ac_link) 2>&5
14006   ac_status=$?
14007   echo "$as_me:14007: \$? = $ac_status" >&5
14008   (exit $ac_status); } &&
14009          { ac_try='test -s conftest$ac_exeext'
14010   { (eval echo "$as_me:14010: \"$ac_try\"") >&5
14011   (eval $ac_try) 2>&5
14012   ac_status=$?
14013   echo "$as_me:14013: \$? = $ac_status" >&5
14014   (exit $ac_status); }; }; then
14015   cf_cv_cgetent=yes
14016 else
14017   echo "$as_me: failed program was:" >&5
14018 cat conftest.$ac_ext >&5
14019 cf_cv_cgetent=no
14020 fi
14021 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14022
14023 fi
14024
14025 echo "$as_me:14025: result: $cf_cv_cgetent" >&5
14026 echo "${ECHO_T}$cf_cv_cgetent" >&6
14027 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14028 #define HAVE_BSD_CGETENT 1
14029 EOF
14030
14031 fi
14032
14033 echo "$as_me:14033: checking for isascii" >&5
14034 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14035 if test "${cf_cv_have_isascii+set}" = set; then
14036   echo $ECHO_N "(cached) $ECHO_C" >&6
14037 else
14038
14039         cat >conftest.$ac_ext <<_ACEOF
14040 #line 14040 "configure"
14041 #include "confdefs.h"
14042 #include <ctype.h>
14043 int
14044 main ()
14045 {
14046 int x = isascii(' ')
14047   ;
14048   return 0;
14049 }
14050 _ACEOF
14051 rm -f conftest.$ac_objext conftest$ac_exeext
14052 if { (eval echo "$as_me:14052: \"$ac_link\"") >&5
14053   (eval $ac_link) 2>&5
14054   ac_status=$?
14055   echo "$as_me:14055: \$? = $ac_status" >&5
14056   (exit $ac_status); } &&
14057          { ac_try='test -s conftest$ac_exeext'
14058   { (eval echo "$as_me:14058: \"$ac_try\"") >&5
14059   (eval $ac_try) 2>&5
14060   ac_status=$?
14061   echo "$as_me:14061: \$? = $ac_status" >&5
14062   (exit $ac_status); }; }; then
14063   cf_cv_have_isascii=yes
14064 else
14065   echo "$as_me: failed program was:" >&5
14066 cat conftest.$ac_ext >&5
14067 cf_cv_have_isascii=no
14068 fi
14069 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14070
14071 fi
14072 echo "$as_me:14072: result: $cf_cv_have_isascii" >&5
14073 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14074 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14075 #define HAVE_ISASCII 1
14076 EOF
14077
14078 if test "$ac_cv_func_sigaction" = yes; then
14079 echo "$as_me:14079: checking whether sigaction needs _POSIX_SOURCE" >&5
14080 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14081 cat >conftest.$ac_ext <<_ACEOF
14082 #line 14082 "configure"
14083 #include "confdefs.h"
14084
14085 #include <sys/types.h>
14086 #include <signal.h>
14087 int
14088 main ()
14089 {
14090 struct sigaction act
14091   ;
14092   return 0;
14093 }
14094 _ACEOF
14095 rm -f conftest.$ac_objext
14096 if { (eval echo "$as_me:14096: \"$ac_compile\"") >&5
14097   (eval $ac_compile) 2>&5
14098   ac_status=$?
14099   echo "$as_me:14099: \$? = $ac_status" >&5
14100   (exit $ac_status); } &&
14101          { ac_try='test -s conftest.$ac_objext'
14102   { (eval echo "$as_me:14102: \"$ac_try\"") >&5
14103   (eval $ac_try) 2>&5
14104   ac_status=$?
14105   echo "$as_me:14105: \$? = $ac_status" >&5
14106   (exit $ac_status); }; }; then
14107   sigact_bad=no
14108 else
14109   echo "$as_me: failed program was:" >&5
14110 cat conftest.$ac_ext >&5
14111
14112 cat >conftest.$ac_ext <<_ACEOF
14113 #line 14113 "configure"
14114 #include "confdefs.h"
14115
14116 #define _POSIX_SOURCE
14117 #include <sys/types.h>
14118 #include <signal.h>
14119 int
14120 main ()
14121 {
14122 struct sigaction act
14123   ;
14124   return 0;
14125 }
14126 _ACEOF
14127 rm -f conftest.$ac_objext
14128 if { (eval echo "$as_me:14128: \"$ac_compile\"") >&5
14129   (eval $ac_compile) 2>&5
14130   ac_status=$?
14131   echo "$as_me:14131: \$? = $ac_status" >&5
14132   (exit $ac_status); } &&
14133          { ac_try='test -s conftest.$ac_objext'
14134   { (eval echo "$as_me:14134: \"$ac_try\"") >&5
14135   (eval $ac_try) 2>&5
14136   ac_status=$?
14137   echo "$as_me:14137: \$? = $ac_status" >&5
14138   (exit $ac_status); }; }; then
14139   sigact_bad=yes
14140          cat >>confdefs.h <<\EOF
14141 #define SVR4_ACTION 1
14142 EOF
14143
14144 else
14145   echo "$as_me: failed program was:" >&5
14146 cat conftest.$ac_ext >&5
14147 sigact_bad=unknown
14148 fi
14149 rm -f conftest.$ac_objext conftest.$ac_ext
14150 fi
14151 rm -f conftest.$ac_objext conftest.$ac_ext
14152 echo "$as_me:14152: result: $sigact_bad" >&5
14153 echo "${ECHO_T}$sigact_bad" >&6
14154 fi
14155
14156 echo "$as_me:14156: checking if nanosleep really works" >&5
14157 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14158 if test "${cf_cv_func_nanosleep+set}" = set; then
14159   echo $ECHO_N "(cached) $ECHO_C" >&6
14160 else
14161
14162 if test "$cross_compiling" = yes; then
14163   cf_cv_func_nanosleep=unknown
14164 else
14165   cat >conftest.$ac_ext <<_ACEOF
14166 #line 14166 "configure"
14167 #include "confdefs.h"
14168
14169 #include <stdio.h>
14170 #include <errno.h>
14171 #include <time.h>
14172
14173 #ifdef HAVE_SYS_TIME_H
14174 #include <sys/time.h>
14175 #endif
14176
14177 int main() {
14178         struct timespec ts1, ts2;
14179         int code;
14180         ts1.tv_sec  = 0;
14181         ts1.tv_nsec = 750000000;
14182         ts2.tv_sec  = 0;
14183         ts2.tv_nsec = 0;
14184         errno = 0;
14185         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14186         ${cf_cv_main_return:-return}(code != 0);
14187 }
14188
14189 _ACEOF
14190 rm -f conftest$ac_exeext
14191 if { (eval echo "$as_me:14191: \"$ac_link\"") >&5
14192   (eval $ac_link) 2>&5
14193   ac_status=$?
14194   echo "$as_me:14194: \$? = $ac_status" >&5
14195   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14196   { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit $ac_status); }; }; then
14201   cf_cv_func_nanosleep=yes
14202 else
14203   echo "$as_me: program exited with status $ac_status" >&5
14204 echo "$as_me: failed program was:" >&5
14205 cat conftest.$ac_ext >&5
14206 cf_cv_func_nanosleep=no
14207 fi
14208 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14209 fi
14210 fi
14211 echo "$as_me:14211: result: $cf_cv_func_nanosleep" >&5
14212 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14213
14214 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14215 #define HAVE_NANOSLEEP 1
14216 EOF
14217
14218 for ac_header in \
14219 termio.h \
14220 termios.h \
14221 unistd.h \
14222
14223 do
14224 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14225 echo "$as_me:14225: checking for $ac_header" >&5
14226 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14227 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14228   echo $ECHO_N "(cached) $ECHO_C" >&6
14229 else
14230   cat >conftest.$ac_ext <<_ACEOF
14231 #line 14231 "configure"
14232 #include "confdefs.h"
14233 #include <$ac_header>
14234 _ACEOF
14235 if { (eval echo "$as_me:14235: \"$ac_cpp conftest.$ac_ext\"") >&5
14236   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14237   ac_status=$?
14238   egrep -v '^ *\+' conftest.er1 >conftest.err
14239   rm -f conftest.er1
14240   cat conftest.err >&5
14241   echo "$as_me:14241: \$? = $ac_status" >&5
14242   (exit $ac_status); } >/dev/null; then
14243   if test -s conftest.err; then
14244     ac_cpp_err=$ac_c_preproc_warn_flag
14245   else
14246     ac_cpp_err=
14247   fi
14248 else
14249   ac_cpp_err=yes
14250 fi
14251 if test -z "$ac_cpp_err"; then
14252   eval "$as_ac_Header=yes"
14253 else
14254   echo "$as_me: failed program was:" >&5
14255   cat conftest.$ac_ext >&5
14256   eval "$as_ac_Header=no"
14257 fi
14258 rm -f conftest.err conftest.$ac_ext
14259 fi
14260 echo "$as_me:14260: result: `eval echo '${'$as_ac_Header'}'`" >&5
14261 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14262 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14263   cat >>confdefs.h <<EOF
14264 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14265 EOF
14266
14267 fi
14268 done
14269
14270 if test "$ISC" = yes ; then
14271
14272 for ac_header in sys/termio.h
14273 do
14274 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14275 echo "$as_me:14275: checking for $ac_header" >&5
14276 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14277 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14278   echo $ECHO_N "(cached) $ECHO_C" >&6
14279 else
14280   cat >conftest.$ac_ext <<_ACEOF
14281 #line 14281 "configure"
14282 #include "confdefs.h"
14283 #include <$ac_header>
14284 _ACEOF
14285 if { (eval echo "$as_me:14285: \"$ac_cpp conftest.$ac_ext\"") >&5
14286   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14287   ac_status=$?
14288   egrep -v '^ *\+' conftest.er1 >conftest.err
14289   rm -f conftest.er1
14290   cat conftest.err >&5
14291   echo "$as_me:14291: \$? = $ac_status" >&5
14292   (exit $ac_status); } >/dev/null; then
14293   if test -s conftest.err; then
14294     ac_cpp_err=$ac_c_preproc_warn_flag
14295   else
14296     ac_cpp_err=
14297   fi
14298 else
14299   ac_cpp_err=yes
14300 fi
14301 if test -z "$ac_cpp_err"; then
14302   eval "$as_ac_Header=yes"
14303 else
14304   echo "$as_me: failed program was:" >&5
14305   cat conftest.$ac_ext >&5
14306   eval "$as_ac_Header=no"
14307 fi
14308 rm -f conftest.err conftest.$ac_ext
14309 fi
14310 echo "$as_me:14310: result: `eval echo '${'$as_ac_Header'}'`" >&5
14311 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14312 if test `eval echo '${'$as_ac_Header'}'` = yes; then
14313   cat >>confdefs.h <<EOF
14314 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14315 EOF
14316
14317 fi
14318 done
14319
14320 fi
14321 if test "$ac_cv_header_termios_h" = yes ; then
14322         case "$CFLAGS $CPPFLAGS" in
14323         *-D_POSIX_SOURCE*)
14324                 termios_bad=dunno ;;
14325         *)      termios_bad=maybe ;;
14326         esac
14327         if test "$termios_bad" = maybe ; then
14328         echo "$as_me:14328: checking whether termios.h needs _POSIX_SOURCE" >&5
14329 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
14330         cat >conftest.$ac_ext <<_ACEOF
14331 #line 14331 "configure"
14332 #include "confdefs.h"
14333 #include <termios.h>
14334 int
14335 main ()
14336 {
14337 struct termios foo; int x = foo.c_iflag
14338   ;
14339   return 0;
14340 }
14341 _ACEOF
14342 rm -f conftest.$ac_objext
14343 if { (eval echo "$as_me:14343: \"$ac_compile\"") >&5
14344   (eval $ac_compile) 2>&5
14345   ac_status=$?
14346   echo "$as_me:14346: \$? = $ac_status" >&5
14347   (exit $ac_status); } &&
14348          { ac_try='test -s conftest.$ac_objext'
14349   { (eval echo "$as_me:14349: \"$ac_try\"") >&5
14350   (eval $ac_try) 2>&5
14351   ac_status=$?
14352   echo "$as_me:14352: \$? = $ac_status" >&5
14353   (exit $ac_status); }; }; then
14354   termios_bad=no
14355 else
14356   echo "$as_me: failed program was:" >&5
14357 cat conftest.$ac_ext >&5
14358
14359                 cat >conftest.$ac_ext <<_ACEOF
14360 #line 14360 "configure"
14361 #include "confdefs.h"
14362
14363 #define _POSIX_SOURCE
14364 #include <termios.h>
14365 int
14366 main ()
14367 {
14368 struct termios foo; int x = foo.c_iflag
14369   ;
14370   return 0;
14371 }
14372 _ACEOF
14373 rm -f conftest.$ac_objext
14374 if { (eval echo "$as_me:14374: \"$ac_compile\"") >&5
14375   (eval $ac_compile) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit $ac_status); } &&
14379          { ac_try='test -s conftest.$ac_objext'
14380   { (eval echo "$as_me:14380: \"$ac_try\"") >&5
14381   (eval $ac_try) 2>&5
14382   ac_status=$?
14383   echo "$as_me:14383: \$? = $ac_status" >&5
14384   (exit $ac_status); }; }; then
14385   termios_bad=unknown
14386 else
14387   echo "$as_me: failed program was:" >&5
14388 cat conftest.$ac_ext >&5
14389 termios_bad=yes cat >>confdefs.h <<\EOF
14390 #define SVR4_TERMIO 1
14391 EOF
14392
14393 fi
14394 rm -f conftest.$ac_objext conftest.$ac_ext
14395
14396 fi
14397 rm -f conftest.$ac_objext conftest.$ac_ext
14398         echo "$as_me:14398: result: $termios_bad" >&5
14399 echo "${ECHO_T}$termios_bad" >&6
14400         fi
14401 fi
14402
14403 echo "$as_me:14403: checking for tcgetattr" >&5
14404 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
14405 if test "${cf_cv_have_tcgetattr+set}" = set; then
14406   echo $ECHO_N "(cached) $ECHO_C" >&6
14407 else
14408
14409 cat >conftest.$ac_ext <<_ACEOF
14410 #line 14410 "configure"
14411 #include "confdefs.h"
14412
14413 #include <sys/types.h>
14414 #ifdef HAVE_UNISTD_H
14415 #include <unistd.h>
14416 #endif
14417 #ifdef HAVE_TERMIOS_H
14418 #include <termios.h>
14419 #define TTY struct termios
14420 #else
14421 #ifdef HAVE_TERMIO_H
14422 #include <termio.h>
14423 #define TTY struct termio
14424 #endif
14425 #endif
14426
14427 int
14428 main ()
14429 {
14430
14431 TTY foo;
14432 tcgetattr(1, &foo);
14433   ;
14434   return 0;
14435 }
14436 _ACEOF
14437 rm -f conftest.$ac_objext conftest$ac_exeext
14438 if { (eval echo "$as_me:14438: \"$ac_link\"") >&5
14439   (eval $ac_link) 2>&5
14440   ac_status=$?
14441   echo "$as_me:14441: \$? = $ac_status" >&5
14442   (exit $ac_status); } &&
14443          { ac_try='test -s conftest$ac_exeext'
14444   { (eval echo "$as_me:14444: \"$ac_try\"") >&5
14445   (eval $ac_try) 2>&5
14446   ac_status=$?
14447   echo "$as_me:14447: \$? = $ac_status" >&5
14448   (exit $ac_status); }; }; then
14449   cf_cv_have_tcgetattr=yes
14450 else
14451   echo "$as_me: failed program was:" >&5
14452 cat conftest.$ac_ext >&5
14453 cf_cv_have_tcgetattr=no
14454 fi
14455 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14456 fi
14457 echo "$as_me:14457: result: $cf_cv_have_tcgetattr" >&5
14458 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
14459 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
14460 #define HAVE_TCGETATTR 1
14461 EOF
14462
14463 echo "$as_me:14463: checking for vsscanf function or workaround" >&5
14464 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
14465 if test "${cf_cv_func_vsscanf+set}" = set; then
14466   echo $ECHO_N "(cached) $ECHO_C" >&6
14467 else
14468
14469 cat >conftest.$ac_ext <<_ACEOF
14470 #line 14470 "configure"
14471 #include "confdefs.h"
14472
14473 #include <stdarg.h>
14474 #include <stdio.h>
14475 int
14476 main ()
14477 {
14478
14479         va_list ap;
14480         vsscanf("from", "%d", ap)
14481   ;
14482   return 0;
14483 }
14484 _ACEOF
14485 rm -f conftest.$ac_objext conftest$ac_exeext
14486 if { (eval echo "$as_me:14486: \"$ac_link\"") >&5
14487   (eval $ac_link) 2>&5
14488   ac_status=$?
14489   echo "$as_me:14489: \$? = $ac_status" >&5
14490   (exit $ac_status); } &&
14491          { ac_try='test -s conftest$ac_exeext'
14492   { (eval echo "$as_me:14492: \"$ac_try\"") >&5
14493   (eval $ac_try) 2>&5
14494   ac_status=$?
14495   echo "$as_me:14495: \$? = $ac_status" >&5
14496   (exit $ac_status); }; }; then
14497   cf_cv_func_vsscanf=vsscanf
14498 else
14499   echo "$as_me: failed program was:" >&5
14500 cat conftest.$ac_ext >&5
14501
14502 cat >conftest.$ac_ext <<_ACEOF
14503 #line 14503 "configure"
14504 #include "confdefs.h"
14505
14506 #include <stdarg.h>
14507 #include <stdio.h>
14508 int
14509 main ()
14510 {
14511
14512     FILE strbuf;
14513     char *str = "from";
14514
14515     strbuf._flag = _IOREAD;
14516     strbuf._ptr = strbuf._base = (unsigned char *) str;
14517     strbuf._cnt = strlen(str);
14518     strbuf._file = _NFILE;
14519     return (vfscanf(&strbuf, "%d", ap))
14520   ;
14521   return 0;
14522 }
14523 _ACEOF
14524 rm -f conftest.$ac_objext conftest$ac_exeext
14525 if { (eval echo "$as_me:14525: \"$ac_link\"") >&5
14526   (eval $ac_link) 2>&5
14527   ac_status=$?
14528   echo "$as_me:14528: \$? = $ac_status" >&5
14529   (exit $ac_status); } &&
14530          { ac_try='test -s conftest$ac_exeext'
14531   { (eval echo "$as_me:14531: \"$ac_try\"") >&5
14532   (eval $ac_try) 2>&5
14533   ac_status=$?
14534   echo "$as_me:14534: \$? = $ac_status" >&5
14535   (exit $ac_status); }; }; then
14536   cf_cv_func_vsscanf=vfscanf
14537 else
14538   echo "$as_me: failed program was:" >&5
14539 cat conftest.$ac_ext >&5
14540
14541 cat >conftest.$ac_ext <<_ACEOF
14542 #line 14542 "configure"
14543 #include "confdefs.h"
14544
14545 #include <stdarg.h>
14546 #include <stdio.h>
14547 int
14548 main ()
14549 {
14550
14551     FILE strbuf;
14552     char *str = "from";
14553
14554     strbuf._flag = _IOREAD;
14555     strbuf._ptr = strbuf._base = (unsigned char *) str;
14556     strbuf._cnt = strlen(str);
14557     strbuf._file = _NFILE;
14558     return (_doscan(&strbuf, "%d", ap))
14559   ;
14560   return 0;
14561 }
14562 _ACEOF
14563 rm -f conftest.$ac_objext conftest$ac_exeext
14564 if { (eval echo "$as_me:14564: \"$ac_link\"") >&5
14565   (eval $ac_link) 2>&5
14566   ac_status=$?
14567   echo "$as_me:14567: \$? = $ac_status" >&5
14568   (exit $ac_status); } &&
14569          { ac_try='test -s conftest$ac_exeext'
14570   { (eval echo "$as_me:14570: \"$ac_try\"") >&5
14571   (eval $ac_try) 2>&5
14572   ac_status=$?
14573   echo "$as_me:14573: \$? = $ac_status" >&5
14574   (exit $ac_status); }; }; then
14575   cf_cv_func_vsscanf=_doscan
14576 else
14577   echo "$as_me: failed program was:" >&5
14578 cat conftest.$ac_ext >&5
14579
14580 cf_cv_func_vsscanf=no
14581 fi
14582 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14583 fi
14584 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14585 fi
14586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14587 fi
14588 echo "$as_me:14588: result: $cf_cv_func_vsscanf" >&5
14589 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
14590
14591 case $cf_cv_func_vsscanf in #(vi
14592 vsscanf) cat >>confdefs.h <<\EOF
14593 #define HAVE_VSSCANF 1
14594 EOF
14595 ;; #(vi
14596 vfscanf) cat >>confdefs.h <<\EOF
14597 #define HAVE_VFSCANF 1
14598 EOF
14599 ;; #(vi
14600 _doscan) cat >>confdefs.h <<\EOF
14601 #define HAVE__DOSCAN 1
14602 EOF
14603 ;;
14604 esac
14605
14606 echo "$as_me:14606: checking for working mkstemp" >&5
14607 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
14608 if test "${cf_cv_func_mkstemp+set}" = set; then
14609   echo $ECHO_N "(cached) $ECHO_C" >&6
14610 else
14611
14612 rm -f conftest*
14613 if test "$cross_compiling" = yes; then
14614   echo "$as_me:14614: checking for mkstemp" >&5
14615 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
14616 if test "${ac_cv_func_mkstemp+set}" = set; then
14617   echo $ECHO_N "(cached) $ECHO_C" >&6
14618 else
14619   cat >conftest.$ac_ext <<_ACEOF
14620 #line 14620 "configure"
14621 #include "confdefs.h"
14622 /* System header to define __stub macros and hopefully few prototypes,
14623     which can conflict with char mkstemp (); below.  */
14624 #include <assert.h>
14625 /* Override any gcc2 internal prototype to avoid an error.  */
14626 #ifdef __cplusplus
14627 extern "C"
14628 #endif
14629 /* We use char because int might match the return type of a gcc2
14630    builtin and then its argument prototype would still apply.  */
14631 char mkstemp ();
14632 char (*f) ();
14633
14634 int
14635 main ()
14636 {
14637 /* The GNU C library defines this for functions which it implements
14638     to always fail with ENOSYS.  Some functions are actually named
14639     something starting with __ and the normal name is an alias.  */
14640 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
14641 choke me
14642 #else
14643 f = mkstemp;
14644 #endif
14645
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 rm -f conftest.$ac_objext conftest$ac_exeext
14651 if { (eval echo "$as_me:14651: \"$ac_link\"") >&5
14652   (eval $ac_link) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit $ac_status); } &&
14656          { ac_try='test -s conftest$ac_exeext'
14657   { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658   (eval $ac_try) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit $ac_status); }; }; then
14662   ac_cv_func_mkstemp=yes
14663 else
14664   echo "$as_me: failed program was:" >&5
14665 cat conftest.$ac_ext >&5
14666 ac_cv_func_mkstemp=no
14667 fi
14668 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14669 fi
14670 echo "$as_me:14670: result: $ac_cv_func_mkstemp" >&5
14671 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
14672
14673 else
14674   cat >conftest.$ac_ext <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677
14678 #include <sys/types.h>
14679 #include <stdlib.h>
14680 #include <stdio.h>
14681 #include <string.h>
14682 #include <sys/stat.h>
14683 int main()
14684 {
14685         char *tmpl = "conftestXXXXXX";
14686         char name[2][80];
14687         int n;
14688         int result = 0;
14689         int fd;
14690         struct stat sb;
14691
14692         umask(077);
14693         for (n = 0; n < 2; ++n) {
14694                 strcpy(name[n], tmpl);
14695                 if ((fd = mkstemp(name[n])) >= 0) {
14696                         if (!strcmp(name[n], tmpl)
14697                          || stat(name[n], &sb) != 0
14698                          || (sb.st_mode & S_IFMT) != S_IFREG
14699                          || (sb.st_mode & 077) != 0) {
14700                                 result = 1;
14701                         }
14702                         close(fd);
14703                 }
14704         }
14705         if (result == 0
14706          && !strcmp(name[0], name[1]))
14707                 result = 1;
14708         ${cf_cv_main_return:-return}(result);
14709 }
14710
14711 _ACEOF
14712 rm -f conftest$ac_exeext
14713 if { (eval echo "$as_me:14713: \"$ac_link\"") >&5
14714   (eval $ac_link) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14718   { (eval echo "$as_me:14718: \"$ac_try\"") >&5
14719   (eval $ac_try) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit $ac_status); }; }; then
14723   cf_cv_func_mkstemp=yes
14724
14725 else
14726   echo "$as_me: program exited with status $ac_status" >&5
14727 echo "$as_me: failed program was:" >&5
14728 cat conftest.$ac_ext >&5
14729 cf_cv_func_mkstemp=no
14730
14731 fi
14732 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14733 fi
14734
14735 fi
14736 echo "$as_me:14736: result: $cf_cv_func_mkstemp" >&5
14737 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
14738 if test "$cf_cv_func_mkstemp" = yes ; then
14739         cat >>confdefs.h <<\EOF
14740 #define HAVE_MKSTEMP 1
14741 EOF
14742
14743 fi
14744
14745 # setup for prototype of fallback for vsscanf()
14746
14747 if test "$cf_cv_func_vsscanf" = vsscanf ; then
14748         HAVE_VSSCANF=1
14749 else
14750         HAVE_VSSCANF=0
14751 fi
14752
14753 if test "$cross_compiling" = yes ; then
14754         { echo "$as_me:14754: WARNING: cross compiling: assume setvbuf params not reversed" >&5
14755 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
14756 else
14757         echo "$as_me:14757: checking whether setvbuf arguments are reversed" >&5
14758 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
14759 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
14760   echo $ECHO_N "(cached) $ECHO_C" >&6
14761 else
14762   if test "$cross_compiling" = yes; then
14763   { { echo "$as_me:14763: error: cannot run test program while cross compiling" >&5
14764 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14765    { (exit 1); exit 1; }; }
14766 else
14767   cat >conftest.$ac_ext <<_ACEOF
14768 #line 14768 "configure"
14769 #include "confdefs.h"
14770 #include <stdio.h>
14771 /* If setvbuf has the reversed format, exit 0. */
14772 int
14773 main ()
14774 {
14775   /* This call has the arguments reversed.
14776      A reversed system may check and see that the address of main
14777      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
14778   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
14779     $ac_main_return(1);
14780   putc('\r', stdout);
14781   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
14782 }
14783 _ACEOF
14784 rm -f conftest$ac_exeext
14785 if { (eval echo "$as_me:14785: \"$ac_link\"") >&5
14786   (eval $ac_link) 2>&5
14787   ac_status=$?
14788   echo "$as_me:14788: \$? = $ac_status" >&5
14789   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14790   { (eval echo "$as_me:14790: \"$ac_try\"") >&5
14791   (eval $ac_try) 2>&5
14792   ac_status=$?
14793   echo "$as_me:14793: \$? = $ac_status" >&5
14794   (exit $ac_status); }; }; then
14795   ac_cv_func_setvbuf_reversed=yes
14796 else
14797   echo "$as_me: program exited with status $ac_status" >&5
14798 echo "$as_me: failed program was:" >&5
14799 cat conftest.$ac_ext >&5
14800 ac_cv_func_setvbuf_reversed=no
14801 fi
14802 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14803 fi
14804 rm -f core core.* *.core
14805 fi
14806 echo "$as_me:14806: result: $ac_cv_func_setvbuf_reversed" >&5
14807 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
14808 if test $ac_cv_func_setvbuf_reversed = yes; then
14809
14810 cat >>confdefs.h <<\EOF
14811 #define SETVBUF_REVERSED 1
14812 EOF
14813
14814 fi
14815
14816 fi
14817 echo "$as_me:14817: checking return type of signal handlers" >&5
14818 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
14819 if test "${ac_cv_type_signal+set}" = set; then
14820   echo $ECHO_N "(cached) $ECHO_C" >&6
14821 else
14822   cat >conftest.$ac_ext <<_ACEOF
14823 #line 14823 "configure"
14824 #include "confdefs.h"
14825 #include <sys/types.h>
14826 #include <signal.h>
14827 #ifdef signal
14828 # undef signal
14829 #endif
14830 #ifdef __cplusplus
14831 extern "C" void (*signal (int, void (*)(int)))(int);
14832 #else
14833 void (*signal ()) ();
14834 #endif
14835
14836 int
14837 main ()
14838 {
14839 int i;
14840   ;
14841   return 0;
14842 }
14843 _ACEOF
14844 rm -f conftest.$ac_objext
14845 if { (eval echo "$as_me:14845: \"$ac_compile\"") >&5
14846   (eval $ac_compile) 2>&5
14847   ac_status=$?
14848   echo "$as_me:14848: \$? = $ac_status" >&5
14849   (exit $ac_status); } &&
14850          { ac_try='test -s conftest.$ac_objext'
14851   { (eval echo "$as_me:14851: \"$ac_try\"") >&5
14852   (eval $ac_try) 2>&5
14853   ac_status=$?
14854   echo "$as_me:14854: \$? = $ac_status" >&5
14855   (exit $ac_status); }; }; then
14856   ac_cv_type_signal=void
14857 else
14858   echo "$as_me: failed program was:" >&5
14859 cat conftest.$ac_ext >&5
14860 ac_cv_type_signal=int
14861 fi
14862 rm -f conftest.$ac_objext conftest.$ac_ext
14863 fi
14864 echo "$as_me:14864: result: $ac_cv_type_signal" >&5
14865 echo "${ECHO_T}$ac_cv_type_signal" >&6
14866
14867 cat >>confdefs.h <<EOF
14868 #define RETSIGTYPE $ac_cv_type_signal
14869 EOF
14870
14871 echo "$as_me:14871: checking for type sigaction_t" >&5
14872 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
14873 if test "${cf_cv_type_sigaction+set}" = set; then
14874   echo $ECHO_N "(cached) $ECHO_C" >&6
14875 else
14876
14877         cat >conftest.$ac_ext <<_ACEOF
14878 #line 14878 "configure"
14879 #include "confdefs.h"
14880
14881 #include <signal.h>
14882 int
14883 main ()
14884 {
14885 sigaction_t x
14886   ;
14887   return 0;
14888 }
14889 _ACEOF
14890 rm -f conftest.$ac_objext
14891 if { (eval echo "$as_me:14891: \"$ac_compile\"") >&5
14892   (eval $ac_compile) 2>&5
14893   ac_status=$?
14894   echo "$as_me:14894: \$? = $ac_status" >&5
14895   (exit $ac_status); } &&
14896          { ac_try='test -s conftest.$ac_objext'
14897   { (eval echo "$as_me:14897: \"$ac_try\"") >&5
14898   (eval $ac_try) 2>&5
14899   ac_status=$?
14900   echo "$as_me:14900: \$? = $ac_status" >&5
14901   (exit $ac_status); }; }; then
14902   cf_cv_type_sigaction=yes
14903 else
14904   echo "$as_me: failed program was:" >&5
14905 cat conftest.$ac_ext >&5
14906 cf_cv_type_sigaction=no
14907 fi
14908 rm -f conftest.$ac_objext conftest.$ac_ext
14909 fi
14910
14911 echo "$as_me:14911: result: $cf_cv_type_sigaction" >&5
14912 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
14913 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
14914 #define HAVE_TYPE_SIGACTION 1
14915 EOF
14916
14917 echo "$as_me:14917: checking declaration of size-change" >&5
14918 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
14919 if test "${cf_cv_sizechange+set}" = set; then
14920   echo $ECHO_N "(cached) $ECHO_C" >&6
14921 else
14922
14923     cf_cv_sizechange=unknown
14924     cf_save_CPPFLAGS="$CPPFLAGS"
14925
14926 for cf_opts in "" "NEED_PTEM_H"
14927 do
14928
14929     CPPFLAGS="$cf_save_CPPFLAGS"
14930     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
14931     cat >conftest.$ac_ext <<_ACEOF
14932 #line 14932 "configure"
14933 #include "confdefs.h"
14934 #include <sys/types.h>
14935 #ifdef HAVE_TERMIOS_H
14936 #include <termios.h>
14937 #else
14938 #ifdef HAVE_TERMIO_H
14939 #include <termio.h>
14940 #endif
14941 #endif
14942 #ifdef NEED_PTEM_H
14943 /* This is a workaround for SCO:  they neglected to define struct winsize in
14944  * termios.h -- it's only in termio.h and ptem.h
14945  */
14946 #include        <sys/stream.h>
14947 #include        <sys/ptem.h>
14948 #endif
14949 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
14950 #include <sys/ioctl.h>
14951 #endif
14952
14953 int
14954 main ()
14955 {
14956
14957 #ifdef TIOCGSIZE
14958         struct ttysize win;     /* FIXME: what system is this? */
14959         int y = win.ts_lines;
14960         int x = win.ts_cols;
14961 #else
14962 #ifdef TIOCGWINSZ
14963         struct winsize win;
14964         int y = win.ws_row;
14965         int x = win.ws_col;
14966 #else
14967         no TIOCGSIZE or TIOCGWINSZ
14968 #endif /* TIOCGWINSZ */
14969 #endif /* TIOCGSIZE */
14970
14971   ;
14972   return 0;
14973 }
14974 _ACEOF
14975 rm -f conftest.$ac_objext
14976 if { (eval echo "$as_me:14976: \"$ac_compile\"") >&5
14977   (eval $ac_compile) 2>&5
14978   ac_status=$?
14979   echo "$as_me:14979: \$? = $ac_status" >&5
14980   (exit $ac_status); } &&
14981          { ac_try='test -s conftest.$ac_objext'
14982   { (eval echo "$as_me:14982: \"$ac_try\"") >&5
14983   (eval $ac_try) 2>&5
14984   ac_status=$?
14985   echo "$as_me:14985: \$? = $ac_status" >&5
14986   (exit $ac_status); }; }; then
14987   cf_cv_sizechange=yes
14988 else
14989   echo "$as_me: failed program was:" >&5
14990 cat conftest.$ac_ext >&5
14991 cf_cv_sizechange=no
14992 fi
14993 rm -f conftest.$ac_objext conftest.$ac_ext
14994
14995         CPPFLAGS="$cf_save_CPPFLAGS"
14996         if test "$cf_cv_sizechange" = yes ; then
14997                 echo "size-change succeeded ($cf_opts)" >&5
14998                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
14999                 break
15000         fi
15001 done
15002
15003 fi
15004 echo "$as_me:15004: result: $cf_cv_sizechange" >&5
15005 echo "${ECHO_T}$cf_cv_sizechange" >&6
15006 if test "$cf_cv_sizechange" != no ; then
15007         cat >>confdefs.h <<\EOF
15008 #define HAVE_SIZECHANGE 1
15009 EOF
15010
15011         case $cf_cv_sizechange in #(vi
15012         NEED*)
15013                 cat >>confdefs.h <<EOF
15014 #define $cf_cv_sizechange  1
15015 EOF
15016
15017                 ;;
15018         esac
15019 fi
15020
15021 echo "$as_me:15021: checking for memmove" >&5
15022 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15023 if test "${ac_cv_func_memmove+set}" = set; then
15024   echo $ECHO_N "(cached) $ECHO_C" >&6
15025 else
15026   cat >conftest.$ac_ext <<_ACEOF
15027 #line 15027 "configure"
15028 #include "confdefs.h"
15029 /* System header to define __stub macros and hopefully few prototypes,
15030     which can conflict with char memmove (); below.  */
15031 #include <assert.h>
15032 /* Override any gcc2 internal prototype to avoid an error.  */
15033 #ifdef __cplusplus
15034 extern "C"
15035 #endif
15036 /* We use char because int might match the return type of a gcc2
15037    builtin and then its argument prototype would still apply.  */
15038 char memmove ();
15039 char (*f) ();
15040
15041 int
15042 main ()
15043 {
15044 /* The GNU C library defines this for functions which it implements
15045     to always fail with ENOSYS.  Some functions are actually named
15046     something starting with __ and the normal name is an alias.  */
15047 #if defined (__stub_memmove) || defined (__stub___memmove)
15048 choke me
15049 #else
15050 f = memmove;
15051 #endif
15052
15053   ;
15054   return 0;
15055 }
15056 _ACEOF
15057 rm -f conftest.$ac_objext conftest$ac_exeext
15058 if { (eval echo "$as_me:15058: \"$ac_link\"") >&5
15059   (eval $ac_link) 2>&5
15060   ac_status=$?
15061   echo "$as_me:15061: \$? = $ac_status" >&5
15062   (exit $ac_status); } &&
15063          { ac_try='test -s conftest$ac_exeext'
15064   { (eval echo "$as_me:15064: \"$ac_try\"") >&5
15065   (eval $ac_try) 2>&5
15066   ac_status=$?
15067   echo "$as_me:15067: \$? = $ac_status" >&5
15068   (exit $ac_status); }; }; then
15069   ac_cv_func_memmove=yes
15070 else
15071   echo "$as_me: failed program was:" >&5
15072 cat conftest.$ac_ext >&5
15073 ac_cv_func_memmove=no
15074 fi
15075 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15076 fi
15077 echo "$as_me:15077: result: $ac_cv_func_memmove" >&5
15078 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15079 if test $ac_cv_func_memmove = yes; then
15080   :
15081 else
15082
15083 echo "$as_me:15083: checking for bcopy" >&5
15084 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15085 if test "${ac_cv_func_bcopy+set}" = set; then
15086   echo $ECHO_N "(cached) $ECHO_C" >&6
15087 else
15088   cat >conftest.$ac_ext <<_ACEOF
15089 #line 15089 "configure"
15090 #include "confdefs.h"
15091 /* System header to define __stub macros and hopefully few prototypes,
15092     which can conflict with char bcopy (); below.  */
15093 #include <assert.h>
15094 /* Override any gcc2 internal prototype to avoid an error.  */
15095 #ifdef __cplusplus
15096 extern "C"
15097 #endif
15098 /* We use char because int might match the return type of a gcc2
15099    builtin and then its argument prototype would still apply.  */
15100 char bcopy ();
15101 char (*f) ();
15102
15103 int
15104 main ()
15105 {
15106 /* The GNU C library defines this for functions which it implements
15107     to always fail with ENOSYS.  Some functions are actually named
15108     something starting with __ and the normal name is an alias.  */
15109 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15110 choke me
15111 #else
15112 f = bcopy;
15113 #endif
15114
15115   ;
15116   return 0;
15117 }
15118 _ACEOF
15119 rm -f conftest.$ac_objext conftest$ac_exeext
15120 if { (eval echo "$as_me:15120: \"$ac_link\"") >&5
15121   (eval $ac_link) 2>&5
15122   ac_status=$?
15123   echo "$as_me:15123: \$? = $ac_status" >&5
15124   (exit $ac_status); } &&
15125          { ac_try='test -s conftest$ac_exeext'
15126   { (eval echo "$as_me:15126: \"$ac_try\"") >&5
15127   (eval $ac_try) 2>&5
15128   ac_status=$?
15129   echo "$as_me:15129: \$? = $ac_status" >&5
15130   (exit $ac_status); }; }; then
15131   ac_cv_func_bcopy=yes
15132 else
15133   echo "$as_me: failed program was:" >&5
15134 cat conftest.$ac_ext >&5
15135 ac_cv_func_bcopy=no
15136 fi
15137 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15138 fi
15139 echo "$as_me:15139: result: $ac_cv_func_bcopy" >&5
15140 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15141 if test $ac_cv_func_bcopy = yes; then
15142
15143         echo "$as_me:15143: checking if bcopy does overlapping moves" >&5
15144 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15145 if test "${cf_cv_good_bcopy+set}" = set; then
15146   echo $ECHO_N "(cached) $ECHO_C" >&6
15147 else
15148
15149                 if test "$cross_compiling" = yes; then
15150   cf_cv_good_bcopy=unknown
15151 else
15152   cat >conftest.$ac_ext <<_ACEOF
15153 #line 15153 "configure"
15154 #include "confdefs.h"
15155
15156 int main() {
15157         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15158         char temp[40];
15159         bcopy(data, temp, sizeof(data));
15160         bcopy(temp+10, temp, 15);
15161         bcopy(temp+5, temp+15, 10);
15162         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15163 }
15164
15165 _ACEOF
15166 rm -f conftest$ac_exeext
15167 if { (eval echo "$as_me:15167: \"$ac_link\"") >&5
15168   (eval $ac_link) 2>&5
15169   ac_status=$?
15170   echo "$as_me:15170: \$? = $ac_status" >&5
15171   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15172   { (eval echo "$as_me:15172: \"$ac_try\"") >&5
15173   (eval $ac_try) 2>&5
15174   ac_status=$?
15175   echo "$as_me:15175: \$? = $ac_status" >&5
15176   (exit $ac_status); }; }; then
15177   cf_cv_good_bcopy=yes
15178 else
15179   echo "$as_me: program exited with status $ac_status" >&5
15180 echo "$as_me: failed program was:" >&5
15181 cat conftest.$ac_ext >&5
15182 cf_cv_good_bcopy=no
15183 fi
15184 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15185 fi
15186
15187 fi
15188 echo "$as_me:15188: result: $cf_cv_good_bcopy" >&5
15189 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15190
15191 else
15192   cf_cv_good_bcopy=no
15193 fi
15194
15195         if test "$cf_cv_good_bcopy" = yes ; then
15196                 cat >>confdefs.h <<\EOF
15197 #define USE_OK_BCOPY 1
15198 EOF
15199
15200         else
15201                 cat >>confdefs.h <<\EOF
15202 #define USE_MY_MEMMOVE 1
15203 EOF
15204
15205         fi
15206
15207 fi
15208
15209 echo "$as_me:15209: checking if poll really works" >&5
15210 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15211 if test "${cf_cv_working_poll+set}" = set; then
15212   echo $ECHO_N "(cached) $ECHO_C" >&6
15213 else
15214
15215 if test "$cross_compiling" = yes; then
15216   cf_cv_working_poll=unknown
15217 else
15218   cat >conftest.$ac_ext <<_ACEOF
15219 #line 15219 "configure"
15220 #include "confdefs.h"
15221
15222 #include <stdio.h>
15223 #ifdef HAVE_POLL_H
15224 #include <poll.h>
15225 #else
15226 #include <sys/poll.h>
15227 #endif
15228 int main() {
15229         struct pollfd myfds;
15230         int ret;
15231
15232         myfds.fd = 0;
15233         myfds.events = POLLIN;
15234
15235         ret = poll(&myfds, 1, 100);
15236         ${cf_cv_main_return:-return}(ret != 0);
15237 }
15238 _ACEOF
15239 rm -f conftest$ac_exeext
15240 if { (eval echo "$as_me:15240: \"$ac_link\"") >&5
15241   (eval $ac_link) 2>&5
15242   ac_status=$?
15243   echo "$as_me:15243: \$? = $ac_status" >&5
15244   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15245   { (eval echo "$as_me:15245: \"$ac_try\"") >&5
15246   (eval $ac_try) 2>&5
15247   ac_status=$?
15248   echo "$as_me:15248: \$? = $ac_status" >&5
15249   (exit $ac_status); }; }; then
15250   cf_cv_working_poll=yes
15251 else
15252   echo "$as_me: program exited with status $ac_status" >&5
15253 echo "$as_me: failed program was:" >&5
15254 cat conftest.$ac_ext >&5
15255 cf_cv_working_poll=no
15256 fi
15257 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15258 fi
15259 fi
15260 echo "$as_me:15260: result: $cf_cv_working_poll" >&5
15261 echo "${ECHO_T}$cf_cv_working_poll" >&6
15262 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
15263 #define HAVE_WORKING_POLL 1
15264 EOF
15265
15266 echo "$as_me:15266: checking for va_copy" >&5
15267 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
15268 if test "${cf_cv_have_va_copy+set}" = set; then
15269   echo $ECHO_N "(cached) $ECHO_C" >&6
15270 else
15271
15272 cat >conftest.$ac_ext <<_ACEOF
15273 #line 15273 "configure"
15274 #include "confdefs.h"
15275
15276 #include <stdarg.h>
15277
15278 int
15279 main ()
15280 {
15281
15282         static va_list dst;
15283         static va_list src;
15284         va_copy(dst, src)
15285   ;
15286   return 0;
15287 }
15288 _ACEOF
15289 rm -f conftest.$ac_objext conftest$ac_exeext
15290 if { (eval echo "$as_me:15290: \"$ac_link\"") >&5
15291   (eval $ac_link) 2>&5
15292   ac_status=$?
15293   echo "$as_me:15293: \$? = $ac_status" >&5
15294   (exit $ac_status); } &&
15295          { ac_try='test -s conftest$ac_exeext'
15296   { (eval echo "$as_me:15296: \"$ac_try\"") >&5
15297   (eval $ac_try) 2>&5
15298   ac_status=$?
15299   echo "$as_me:15299: \$? = $ac_status" >&5
15300   (exit $ac_status); }; }; then
15301   cf_cv_have_va_copy=yes
15302 else
15303   echo "$as_me: failed program was:" >&5
15304 cat conftest.$ac_ext >&5
15305 cf_cv_have_va_copy=no
15306 fi
15307 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15308 fi
15309 echo "$as_me:15309: result: $cf_cv_have_va_copy" >&5
15310 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
15311
15312 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
15313 #define HAVE_VA_COPY 1
15314 EOF
15315
15316 echo "$as_me:15316: checking for __va_copy" >&5
15317 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
15318 if test "${cf_cv_have___va_copy+set}" = set; then
15319   echo $ECHO_N "(cached) $ECHO_C" >&6
15320 else
15321
15322 cat >conftest.$ac_ext <<_ACEOF
15323 #line 15323 "configure"
15324 #include "confdefs.h"
15325
15326 #include <stdarg.h>
15327
15328 int
15329 main ()
15330 {
15331
15332         static va_list dst;
15333         static va_list src;
15334         __va_copy(dst, src)
15335   ;
15336   return 0;
15337 }
15338 _ACEOF
15339 rm -f conftest.$ac_objext conftest$ac_exeext
15340 if { (eval echo "$as_me:15340: \"$ac_link\"") >&5
15341   (eval $ac_link) 2>&5
15342   ac_status=$?
15343   echo "$as_me:15343: \$? = $ac_status" >&5
15344   (exit $ac_status); } &&
15345          { ac_try='test -s conftest$ac_exeext'
15346   { (eval echo "$as_me:15346: \"$ac_try\"") >&5
15347   (eval $ac_try) 2>&5
15348   ac_status=$?
15349   echo "$as_me:15349: \$? = $ac_status" >&5
15350   (exit $ac_status); }; }; then
15351   cf_cv_have___va_copy=yes
15352 else
15353   echo "$as_me: failed program was:" >&5
15354 cat conftest.$ac_ext >&5
15355 cf_cv_have___va_copy=no
15356 fi
15357 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15358 fi
15359 echo "$as_me:15359: result: $cf_cv_have___va_copy" >&5
15360 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
15361
15362 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
15363 #define HAVE___VA_COPY 1
15364 EOF
15365
15366 echo "$as_me:15366: checking for pid_t" >&5
15367 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
15368 if test "${ac_cv_type_pid_t+set}" = set; then
15369   echo $ECHO_N "(cached) $ECHO_C" >&6
15370 else
15371   cat >conftest.$ac_ext <<_ACEOF
15372 #line 15372 "configure"
15373 #include "confdefs.h"
15374 $ac_includes_default
15375 int
15376 main ()
15377 {
15378 if ((pid_t *) 0)
15379   return 0;
15380 if (sizeof (pid_t))
15381   return 0;
15382   ;
15383   return 0;
15384 }
15385 _ACEOF
15386 rm -f conftest.$ac_objext
15387 if { (eval echo "$as_me:15387: \"$ac_compile\"") >&5
15388   (eval $ac_compile) 2>&5
15389   ac_status=$?
15390   echo "$as_me:15390: \$? = $ac_status" >&5
15391   (exit $ac_status); } &&
15392          { ac_try='test -s conftest.$ac_objext'
15393   { (eval echo "$as_me:15393: \"$ac_try\"") >&5
15394   (eval $ac_try) 2>&5
15395   ac_status=$?
15396   echo "$as_me:15396: \$? = $ac_status" >&5
15397   (exit $ac_status); }; }; then
15398   ac_cv_type_pid_t=yes
15399 else
15400   echo "$as_me: failed program was:" >&5
15401 cat conftest.$ac_ext >&5
15402 ac_cv_type_pid_t=no
15403 fi
15404 rm -f conftest.$ac_objext conftest.$ac_ext
15405 fi
15406 echo "$as_me:15406: result: $ac_cv_type_pid_t" >&5
15407 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
15408 if test $ac_cv_type_pid_t = yes; then
15409   :
15410 else
15411
15412 cat >>confdefs.h <<EOF
15413 #define pid_t int
15414 EOF
15415
15416 fi
15417
15418 for ac_header in unistd.h vfork.h
15419 do
15420 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15421 echo "$as_me:15421: checking for $ac_header" >&5
15422 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15423 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15424   echo $ECHO_N "(cached) $ECHO_C" >&6
15425 else
15426   cat >conftest.$ac_ext <<_ACEOF
15427 #line 15427 "configure"
15428 #include "confdefs.h"
15429 #include <$ac_header>
15430 _ACEOF
15431 if { (eval echo "$as_me:15431: \"$ac_cpp conftest.$ac_ext\"") >&5
15432   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15433   ac_status=$?
15434   egrep -v '^ *\+' conftest.er1 >conftest.err
15435   rm -f conftest.er1
15436   cat conftest.err >&5
15437   echo "$as_me:15437: \$? = $ac_status" >&5
15438   (exit $ac_status); } >/dev/null; then
15439   if test -s conftest.err; then
15440     ac_cpp_err=$ac_c_preproc_warn_flag
15441   else
15442     ac_cpp_err=
15443   fi
15444 else
15445   ac_cpp_err=yes
15446 fi
15447 if test -z "$ac_cpp_err"; then
15448   eval "$as_ac_Header=yes"
15449 else
15450   echo "$as_me: failed program was:" >&5
15451   cat conftest.$ac_ext >&5
15452   eval "$as_ac_Header=no"
15453 fi
15454 rm -f conftest.err conftest.$ac_ext
15455 fi
15456 echo "$as_me:15456: result: `eval echo '${'$as_ac_Header'}'`" >&5
15457 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15458 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15459   cat >>confdefs.h <<EOF
15460 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15461 EOF
15462
15463 fi
15464 done
15465
15466 for ac_func in fork vfork
15467 do
15468 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15469 echo "$as_me:15469: checking for $ac_func" >&5
15470 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15471 if eval "test \"\${$as_ac_var+set}\" = set"; then
15472   echo $ECHO_N "(cached) $ECHO_C" >&6
15473 else
15474   cat >conftest.$ac_ext <<_ACEOF
15475 #line 15475 "configure"
15476 #include "confdefs.h"
15477 /* System header to define __stub macros and hopefully few prototypes,
15478     which can conflict with char $ac_func (); below.  */
15479 #include <assert.h>
15480 /* Override any gcc2 internal prototype to avoid an error.  */
15481 #ifdef __cplusplus
15482 extern "C"
15483 #endif
15484 /* We use char because int might match the return type of a gcc2
15485    builtin and then its argument prototype would still apply.  */
15486 char $ac_func ();
15487 char (*f) ();
15488
15489 int
15490 main ()
15491 {
15492 /* The GNU C library defines this for functions which it implements
15493     to always fail with ENOSYS.  Some functions are actually named
15494     something starting with __ and the normal name is an alias.  */
15495 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15496 choke me
15497 #else
15498 f = $ac_func;
15499 #endif
15500
15501   ;
15502   return 0;
15503 }
15504 _ACEOF
15505 rm -f conftest.$ac_objext conftest$ac_exeext
15506 if { (eval echo "$as_me:15506: \"$ac_link\"") >&5
15507   (eval $ac_link) 2>&5
15508   ac_status=$?
15509   echo "$as_me:15509: \$? = $ac_status" >&5
15510   (exit $ac_status); } &&
15511          { ac_try='test -s conftest$ac_exeext'
15512   { (eval echo "$as_me:15512: \"$ac_try\"") >&5
15513   (eval $ac_try) 2>&5
15514   ac_status=$?
15515   echo "$as_me:15515: \$? = $ac_status" >&5
15516   (exit $ac_status); }; }; then
15517   eval "$as_ac_var=yes"
15518 else
15519   echo "$as_me: failed program was:" >&5
15520 cat conftest.$ac_ext >&5
15521 eval "$as_ac_var=no"
15522 fi
15523 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15524 fi
15525 echo "$as_me:15525: result: `eval echo '${'$as_ac_var'}'`" >&5
15526 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15527 if test `eval echo '${'$as_ac_var'}'` = yes; then
15528   cat >>confdefs.h <<EOF
15529 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15530 EOF
15531
15532 fi
15533 done
15534
15535 ac_cv_func_fork_works=$ac_cv_func_fork
15536 if test "x$ac_cv_func_fork" = xyes; then
15537   echo "$as_me:15537: checking for working fork" >&5
15538 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
15539 if test "${ac_cv_func_fork_works+set}" = set; then
15540   echo $ECHO_N "(cached) $ECHO_C" >&6
15541 else
15542   if test "$cross_compiling" = yes; then
15543   ac_cv_func_fork_works=cross
15544 else
15545   cat >conftest.$ac_ext <<_ACEOF
15546 /* By Rüdiger Kuhlmann. */
15547       #include <sys/types.h>
15548       #if HAVE_UNISTD_H
15549       # include <unistd.h>
15550       #endif
15551       /* Some systems only have a dummy stub for fork() */
15552       int main ()
15553       {
15554         if (fork() < 0)
15555           $ac_main_return (1);
15556         $ac_main_return (0);
15557       }
15558 _ACEOF
15559 rm -f conftest$ac_exeext
15560 if { (eval echo "$as_me:15560: \"$ac_link\"") >&5
15561   (eval $ac_link) 2>&5
15562   ac_status=$?
15563   echo "$as_me:15563: \$? = $ac_status" >&5
15564   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15565   { (eval echo "$as_me:15565: \"$ac_try\"") >&5
15566   (eval $ac_try) 2>&5
15567   ac_status=$?
15568   echo "$as_me:15568: \$? = $ac_status" >&5
15569   (exit $ac_status); }; }; then
15570   ac_cv_func_fork_works=yes
15571 else
15572   echo "$as_me: program exited with status $ac_status" >&5
15573 echo "$as_me: failed program was:" >&5
15574 cat conftest.$ac_ext >&5
15575 ac_cv_func_fork_works=no
15576 fi
15577 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15578 fi
15579 fi
15580 echo "$as_me:15580: result: $ac_cv_func_fork_works" >&5
15581 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
15582
15583 fi
15584 if test "x$ac_cv_func_fork_works" = xcross; then
15585   case $host in
15586     *-*-amigaos* | *-*-msdosdjgpp*)
15587       # Override, as these systems have only a dummy fork() stub
15588       ac_cv_func_fork_works=no
15589       ;;
15590     *)
15591       ac_cv_func_fork_works=yes
15592       ;;
15593   esac
15594   { echo "$as_me:15594: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
15595 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
15596 fi
15597 ac_cv_func_vfork_works=$ac_cv_func_vfork
15598 if test "x$ac_cv_func_vfork" = xyes; then
15599   echo "$as_me:15599: checking for working vfork" >&5
15600 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
15601 if test "${ac_cv_func_vfork_works+set}" = set; then
15602   echo $ECHO_N "(cached) $ECHO_C" >&6
15603 else
15604   if test "$cross_compiling" = yes; then
15605   ac_cv_func_vfork_works=cross
15606 else
15607   cat >conftest.$ac_ext <<_ACEOF
15608 #line 15608 "configure"
15609 #include "confdefs.h"
15610 /* Thanks to Paul Eggert for this test.  */
15611 #include <stdio.h>
15612 #include <sys/types.h>
15613 #include <sys/stat.h>
15614 #if HAVE_UNISTD_H
15615 # include <unistd.h>
15616 #endif
15617 #if HAVE_VFORK_H
15618 # include <vfork.h>
15619 #endif
15620 /* On some sparc systems, changes by the child to local and incoming
15621    argument registers are propagated back to the parent.  The compiler
15622    is told about this with #include <vfork.h>, but some compilers
15623    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
15624    static variable whose address is put into a register that is
15625    clobbered by the vfork.  */
15626 static
15627 #ifdef __cplusplus
15628 sparc_address_test (int arg)
15629 # else
15630 sparc_address_test (arg) int arg;
15631 #endif
15632 {
15633   static pid_t child;
15634   if (!child) {
15635     child = vfork ();
15636     if (child < 0) {
15637       perror ("vfork");
15638       _exit(2);
15639     }
15640     if (!child) {
15641       arg = getpid();
15642       write(-1, "", 0);
15643       _exit (arg);
15644     }
15645   }
15646 }
15647
15648 int
15649 main ()
15650 {
15651   pid_t parent = getpid ();
15652   pid_t child;
15653
15654   sparc_address_test ();
15655
15656   child = vfork ();
15657
15658   if (child == 0) {
15659     /* Here is another test for sparc vfork register problems.  This
15660        test uses lots of local variables, at least as many local
15661        variables as main has allocated so far including compiler
15662        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
15663        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
15664        reuse the register of parent for one of the local variables,
15665        since it will think that parent can't possibly be used any more
15666        in this routine.  Assigning to the local variable will thus
15667        munge parent in the parent process.  */
15668     pid_t
15669       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
15670       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
15671     /* Convince the compiler that p..p7 are live; otherwise, it might
15672        use the same hardware register for all 8 local variables.  */
15673     if (p != p1 || p != p2 || p != p3 || p != p4
15674         || p != p5 || p != p6 || p != p7)
15675       _exit(1);
15676
15677     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
15678        from child file descriptors.  If the child closes a descriptor
15679        before it execs or exits, this munges the parent's descriptor
15680        as well.  Test for this by closing stdout in the child.  */
15681     _exit(close(fileno(stdout)) != 0);
15682   } else {
15683     int status;
15684     struct stat st;
15685
15686     while (wait(&status) != child)
15687       ;
15688     $ac_main_return(
15689          /* Was there some problem with vforking?  */
15690          child < 0
15691
15692          /* Did the child fail?  (This shouldn't happen.)  */
15693          || status
15694
15695          /* Did the vfork/compiler bug occur?  */
15696          || parent != getpid()
15697
15698          /* Did the file descriptor bug occur?  */
15699          || fstat(fileno(stdout), &st) != 0
15700          );
15701   }
15702 }
15703 _ACEOF
15704 rm -f conftest$ac_exeext
15705 if { (eval echo "$as_me:15705: \"$ac_link\"") >&5
15706   (eval $ac_link) 2>&5
15707   ac_status=$?
15708   echo "$as_me:15708: \$? = $ac_status" >&5
15709   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15710   { (eval echo "$as_me:15710: \"$ac_try\"") >&5
15711   (eval $ac_try) 2>&5
15712   ac_status=$?
15713   echo "$as_me:15713: \$? = $ac_status" >&5
15714   (exit $ac_status); }; }; then
15715   ac_cv_func_vfork_works=yes
15716 else
15717   echo "$as_me: program exited with status $ac_status" >&5
15718 echo "$as_me: failed program was:" >&5
15719 cat conftest.$ac_ext >&5
15720 ac_cv_func_vfork_works=no
15721 fi
15722 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15723 fi
15724 fi
15725 echo "$as_me:15725: result: $ac_cv_func_vfork_works" >&5
15726 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
15727
15728 fi;
15729 if test "x$ac_cv_func_fork_works" = xcross; then
15730   ac_cv_func_vfork_works=ac_cv_func_vfork
15731   { echo "$as_me:15731: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
15732 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
15733 fi
15734
15735 if test "x$ac_cv_func_vfork_works" = xyes; then
15736
15737 cat >>confdefs.h <<\EOF
15738 #define HAVE_WORKING_VFORK 1
15739 EOF
15740
15741 else
15742
15743 cat >>confdefs.h <<\EOF
15744 #define vfork fork
15745 EOF
15746
15747 fi
15748 if test "x$ac_cv_func_fork_works" = xyes; then
15749
15750 cat >>confdefs.h <<\EOF
15751 #define HAVE_WORKING_FORK 1
15752 EOF
15753
15754 fi
15755
15756 # special check for test/ditto.c
15757
15758 echo "$as_me:15758: checking for openpty in -lutil" >&5
15759 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
15760 if test "${ac_cv_lib_util_openpty+set}" = set; then
15761   echo $ECHO_N "(cached) $ECHO_C" >&6
15762 else
15763   ac_check_lib_save_LIBS=$LIBS
15764 LIBS="-lutil  $LIBS"
15765 cat >conftest.$ac_ext <<_ACEOF
15766 #line 15766 "configure"
15767 #include "confdefs.h"
15768
15769 /* Override any gcc2 internal prototype to avoid an error.  */
15770 #ifdef __cplusplus
15771 extern "C"
15772 #endif
15773 /* We use char because int might match the return type of a gcc2
15774    builtin and then its argument prototype would still apply.  */
15775 char openpty ();
15776 int
15777 main ()
15778 {
15779 openpty ();
15780   ;
15781   return 0;
15782 }
15783 _ACEOF
15784 rm -f conftest.$ac_objext conftest$ac_exeext
15785 if { (eval echo "$as_me:15785: \"$ac_link\"") >&5
15786   (eval $ac_link) 2>&5
15787   ac_status=$?
15788   echo "$as_me:15788: \$? = $ac_status" >&5
15789   (exit $ac_status); } &&
15790          { ac_try='test -s conftest$ac_exeext'
15791   { (eval echo "$as_me:15791: \"$ac_try\"") >&5
15792   (eval $ac_try) 2>&5
15793   ac_status=$?
15794   echo "$as_me:15794: \$? = $ac_status" >&5
15795   (exit $ac_status); }; }; then
15796   ac_cv_lib_util_openpty=yes
15797 else
15798   echo "$as_me: failed program was:" >&5
15799 cat conftest.$ac_ext >&5
15800 ac_cv_lib_util_openpty=no
15801 fi
15802 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15803 LIBS=$ac_check_lib_save_LIBS
15804 fi
15805 echo "$as_me:15805: result: $ac_cv_lib_util_openpty" >&5
15806 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
15807 if test $ac_cv_lib_util_openpty = yes; then
15808   cf_cv_lib_util=yes
15809 else
15810   cf_cv_lib_util=no
15811 fi
15812
15813 echo "$as_me:15813: checking for openpty header" >&5
15814 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
15815 if test "${cf_cv_func_openpty+set}" = set; then
15816   echo $ECHO_N "(cached) $ECHO_C" >&6
15817 else
15818
15819     cf_save_LIBS="$LIBS"
15820     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
15821     for cf_header in pty.h libutil.h util.h
15822     do
15823     cat >conftest.$ac_ext <<_ACEOF
15824 #line 15824 "configure"
15825 #include "confdefs.h"
15826
15827 #include <$cf_header>
15828
15829 int
15830 main ()
15831 {
15832
15833     int x = openpty((int *)0, (int *)0, (char *)0,
15834                    (struct termios *)0, (struct winsize *)0);
15835
15836   ;
15837   return 0;
15838 }
15839 _ACEOF
15840 rm -f conftest.$ac_objext conftest$ac_exeext
15841 if { (eval echo "$as_me:15841: \"$ac_link\"") >&5
15842   (eval $ac_link) 2>&5
15843   ac_status=$?
15844   echo "$as_me:15844: \$? = $ac_status" >&5
15845   (exit $ac_status); } &&
15846          { ac_try='test -s conftest$ac_exeext'
15847   { (eval echo "$as_me:15847: \"$ac_try\"") >&5
15848   (eval $ac_try) 2>&5
15849   ac_status=$?
15850   echo "$as_me:15850: \$? = $ac_status" >&5
15851   (exit $ac_status); }; }; then
15852
15853         cf_cv_func_openpty=$cf_header
15854         break
15855
15856 else
15857   echo "$as_me: failed program was:" >&5
15858 cat conftest.$ac_ext >&5
15859
15860         cf_cv_func_openpty=no
15861
15862 fi
15863 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15864     done
15865     LIBS="$cf_save_LIBS"
15866
15867 fi
15868 echo "$as_me:15868: result: $cf_cv_func_openpty" >&5
15869 echo "${ECHO_T}$cf_cv_func_openpty" >&6
15870
15871 if test "$cf_cv_func_openpty" != no ; then
15872     cat >>confdefs.h <<EOF
15873 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
15874 EOF
15875
15876     cat >>confdefs.h <<\EOF
15877 #define USE_XTERM_PTY 1
15878 EOF
15879
15880     if test "$cf_cv_lib_util" = yes ; then
15881         TEST_LIBS="-lutil $TEST_LIBS"
15882     fi
15883 fi
15884
15885 if test "$with_hashed_db" != no ; then
15886         cat >>confdefs.h <<\EOF
15887 #define USE_HASHED_DB 1
15888 EOF
15889
15890 case $with_hashed_db in #(vi
15891 yes|*able*) #(vi
15892     ;;
15893 *)
15894     if test -d "$with_hashed_db" ; then
15895
15896 if test -n "$with_hashed_db/include" ; then
15897   for cf_add_incdir in $with_hashed_db/include
15898   do
15899         while test $cf_add_incdir != /usr/include
15900         do
15901           if test -d $cf_add_incdir
15902           then
15903                 cf_have_incdir=no
15904                 if test -n "$CFLAGS$CPPFLAGS" ; then
15905                   # a loop is needed to ensure we can add subdirs of existing dirs
15906                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15907                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15908                           cf_have_incdir=yes; break
15909                         fi
15910                   done
15911                 fi
15912
15913                 if test "$cf_have_incdir" = no ; then
15914                   if test "$cf_add_incdir" = /usr/local/include ; then
15915                         if test "$GCC" = yes
15916                         then
15917                           cf_save_CPPFLAGS=$CPPFLAGS
15918                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15919                           cat >conftest.$ac_ext <<_ACEOF
15920 #line 15920 "configure"
15921 #include "confdefs.h"
15922 #include <stdio.h>
15923 int
15924 main ()
15925 {
15926 printf("Hello")
15927   ;
15928   return 0;
15929 }
15930 _ACEOF
15931 rm -f conftest.$ac_objext
15932 if { (eval echo "$as_me:15932: \"$ac_compile\"") >&5
15933   (eval $ac_compile) 2>&5
15934   ac_status=$?
15935   echo "$as_me:15935: \$? = $ac_status" >&5
15936   (exit $ac_status); } &&
15937          { ac_try='test -s conftest.$ac_objext'
15938   { (eval echo "$as_me:15938: \"$ac_try\"") >&5
15939   (eval $ac_try) 2>&5
15940   ac_status=$?
15941   echo "$as_me:15941: \$? = $ac_status" >&5
15942   (exit $ac_status); }; }; then
15943   :
15944 else
15945   echo "$as_me: failed program was:" >&5
15946 cat conftest.$ac_ext >&5
15947 cf_have_incdir=yes
15948 fi
15949 rm -f conftest.$ac_objext conftest.$ac_ext
15950                           CPPFLAGS=$cf_save_CPPFLAGS
15951                         fi
15952                   fi
15953                 fi
15954
15955                 if test "$cf_have_incdir" = no ; then
15956                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
15957
15958 echo "${as_me-configure}:15958: testing adding $cf_add_incdir to include-path ..." 1>&5
15959
15960                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15961
15962                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15963                   test "$cf_top_incdir" = "$cf_add_incdir" && break
15964                   cf_add_incdir="$cf_top_incdir"
15965                 else
15966                   break
15967                 fi
15968           fi
15969         done
15970   done
15971 fi
15972
15973 if test -n "$with_hashed_db/lib" ; then
15974   for cf_add_libdir in $with_hashed_db/lib
15975   do
15976     if test $cf_add_libdir = /usr/lib ; then
15977       :
15978     elif test -d $cf_add_libdir
15979     then
15980       cf_have_libdir=no
15981       if test -n "$LDFLAGS$LIBS" ; then
15982         # a loop is needed to ensure we can add subdirs of existing dirs
15983         for cf_test_libdir in $LDFLAGS $LIBS ; do
15984           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
15985             cf_have_libdir=yes; break
15986           fi
15987         done
15988       fi
15989       if test "$cf_have_libdir" = no ; then
15990         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
15991
15992 echo "${as_me-configure}:15992: testing adding $cf_add_libdir to library-path ..." 1>&5
15993
15994         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
15995       fi
15996     fi
15997   done
15998 fi
15999
16000     fi
16001 esac
16002
16003 echo "$as_me:16003: checking for db.h" >&5
16004 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16005 if test "${ac_cv_header_db_h+set}" = set; then
16006   echo $ECHO_N "(cached) $ECHO_C" >&6
16007 else
16008   cat >conftest.$ac_ext <<_ACEOF
16009 #line 16009 "configure"
16010 #include "confdefs.h"
16011 #include <db.h>
16012 _ACEOF
16013 if { (eval echo "$as_me:16013: \"$ac_cpp conftest.$ac_ext\"") >&5
16014   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16015   ac_status=$?
16016   egrep -v '^ *\+' conftest.er1 >conftest.err
16017   rm -f conftest.er1
16018   cat conftest.err >&5
16019   echo "$as_me:16019: \$? = $ac_status" >&5
16020   (exit $ac_status); } >/dev/null; then
16021   if test -s conftest.err; then
16022     ac_cpp_err=$ac_c_preproc_warn_flag
16023   else
16024     ac_cpp_err=
16025   fi
16026 else
16027   ac_cpp_err=yes
16028 fi
16029 if test -z "$ac_cpp_err"; then
16030   ac_cv_header_db_h=yes
16031 else
16032   echo "$as_me: failed program was:" >&5
16033   cat conftest.$ac_ext >&5
16034   ac_cv_header_db_h=no
16035 fi
16036 rm -f conftest.err conftest.$ac_ext
16037 fi
16038 echo "$as_me:16038: result: $ac_cv_header_db_h" >&5
16039 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16040 if test $ac_cv_header_db_h = yes; then
16041
16042 echo "$as_me:16042: checking for version of db" >&5
16043 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16044 if test "${cf_cv_hashed_db_version+set}" = set; then
16045   echo $ECHO_N "(cached) $ECHO_C" >&6
16046 else
16047
16048 cf_cv_hashed_db_version=unknown
16049
16050 for cf_db_version in 1 2 3 4 5
16051 do
16052
16053 echo "${as_me-configure}:16053: testing checking for db version $cf_db_version ..." 1>&5
16054
16055         cat >conftest.$ac_ext <<_ACEOF
16056 #line 16056 "configure"
16057 #include "confdefs.h"
16058
16059 $ac_includes_default
16060 #include <db.h>
16061
16062 #ifdef DB_VERSION_MAJOR
16063         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16064 #if $cf_db_version == DB_VERSION_MAJOR
16065         /* ok */
16066 #else
16067         make an error
16068 #endif
16069 #else
16070 #if $cf_db_version == 1
16071         /* ok: assuming this is DB 1.8.5 */
16072 #else
16073         make an error
16074 #endif
16075 #endif
16076
16077 int
16078 main ()
16079 {
16080 DBT *foo = 0
16081   ;
16082   return 0;
16083 }
16084 _ACEOF
16085 rm -f conftest.$ac_objext
16086 if { (eval echo "$as_me:16086: \"$ac_compile\"") >&5
16087   (eval $ac_compile) 2>&5
16088   ac_status=$?
16089   echo "$as_me:16089: \$? = $ac_status" >&5
16090   (exit $ac_status); } &&
16091          { ac_try='test -s conftest.$ac_objext'
16092   { (eval echo "$as_me:16092: \"$ac_try\"") >&5
16093   (eval $ac_try) 2>&5
16094   ac_status=$?
16095   echo "$as_me:16095: \$? = $ac_status" >&5
16096   (exit $ac_status); }; }; then
16097
16098         cf_cv_hashed_db_version=$cf_db_version
16099         break
16100
16101 else
16102   echo "$as_me: failed program was:" >&5
16103 cat conftest.$ac_ext >&5
16104 fi
16105 rm -f conftest.$ac_objext conftest.$ac_ext
16106 done
16107
16108 fi
16109 echo "$as_me:16109: result: $cf_cv_hashed_db_version" >&5
16110 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16111
16112 if test "$cf_cv_hashed_db_version" = unknown ; then
16113         { { echo "$as_me:16113: error: Cannot determine version of db" >&5
16114 echo "$as_me: error: Cannot determine version of db" >&2;}
16115    { (exit 1); exit 1; }; }
16116 else
16117
16118 echo "$as_me:16118: checking for db libraries" >&5
16119 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16120 if test "${cf_cv_hashed_db_libs+set}" = set; then
16121   echo $ECHO_N "(cached) $ECHO_C" >&6
16122 else
16123
16124 cf_cv_hashed_db_libs=unknown
16125 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16126 do
16127         cf_save_libs="$LIBS"
16128         if test -n "$cf_db_libs"; then
16129                 LIBS="-l$cf_db_libs $LIBS"
16130         fi
16131
16132 echo "${as_me-configure}:16132: testing checking for library "$cf_db_libs" ..." 1>&5
16133
16134         cat >conftest.$ac_ext <<_ACEOF
16135 #line 16135 "configure"
16136 #include "confdefs.h"
16137
16138 $ac_includes_default
16139 #include <db.h>
16140
16141 int
16142 main ()
16143 {
16144
16145         char *path = "/tmp/foo";
16146 #ifdef DB_VERSION_MAJOR
16147 #if DB_VERSION_MAJOR >= 4
16148         DB *result = 0;
16149         db_create(&result, NULL, 0);
16150         result->open(result,
16151                 NULL,
16152                 path,
16153                 path,
16154                 DB_HASH,
16155                 DB_CREATE,
16156                 0644);
16157 #elif DB_VERSION_MAJOR >= 3
16158         DB *result = 0;
16159         db_create(&result, NULL, 0);
16160         result->open(result,
16161                 path,
16162                 path,
16163                 DB_HASH,
16164                 DB_CREATE,
16165                 0644);
16166 #elif DB_VERSION_MAJOR >= 2
16167         DB *result = 0;
16168         db_open(path,
16169                 DB_HASH,
16170                 DB_CREATE,
16171                 0644,
16172                 (DB_ENV *) 0,
16173                 (DB_INFO *) 0,
16174                 &result);
16175 #endif /* DB_VERSION_MAJOR */
16176 #else
16177         DB *result = dbopen(path,
16178                      2,
16179                      0644,
16180                      DB_HASH,
16181                      0);
16182 #endif
16183         ${cf_cv_main_return:-return}(result != 0)
16184
16185   ;
16186   return 0;
16187 }
16188 _ACEOF
16189 rm -f conftest.$ac_objext conftest$ac_exeext
16190 if { (eval echo "$as_me:16190: \"$ac_link\"") >&5
16191   (eval $ac_link) 2>&5
16192   ac_status=$?
16193   echo "$as_me:16193: \$? = $ac_status" >&5
16194   (exit $ac_status); } &&
16195          { ac_try='test -s conftest$ac_exeext'
16196   { (eval echo "$as_me:16196: \"$ac_try\"") >&5
16197   (eval $ac_try) 2>&5
16198   ac_status=$?
16199   echo "$as_me:16199: \$? = $ac_status" >&5
16200   (exit $ac_status); }; }; then
16201
16202         if test -n "$cf_db_libs" ; then
16203                 cf_cv_hashed_db_libs=$cf_db_libs
16204         else
16205                 cf_cv_hashed_db_libs=default
16206         fi
16207         LIBS="$cf_save_libs"
16208         break
16209
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat conftest.$ac_ext >&5
16213 fi
16214 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16215         LIBS="$cf_save_libs"
16216 done
16217
16218 fi
16219 echo "$as_me:16219: result: $cf_cv_hashed_db_libs" >&5
16220 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16221
16222         if test "$cf_cv_hashed_db_libs" = unknown ; then
16223                 { { echo "$as_me:16223: error: Cannot determine library for db" >&5
16224 echo "$as_me: error: Cannot determine library for db" >&2;}
16225    { (exit 1); exit 1; }; }
16226         elif test "$cf_cv_hashed_db_libs" != default ; then
16227                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
16228         fi
16229 fi
16230
16231 else
16232
16233         { { echo "$as_me:16233: error: Cannot find db.h" >&5
16234 echo "$as_me: error: Cannot find db.h" >&2;}
16235    { (exit 1); exit 1; }; }
16236
16237 fi
16238
16239 fi
16240
16241 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
16242         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16243         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
16244 fi
16245
16246 # Just in case, check if the C compiler has a bool type.
16247
16248 echo "$as_me:16248: checking if we should include stdbool.h" >&5
16249 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16250
16251 if test "${cf_cv_header_stdbool_h+set}" = set; then
16252   echo $ECHO_N "(cached) $ECHO_C" >&6
16253 else
16254
16255         cat >conftest.$ac_ext <<_ACEOF
16256 #line 16256 "configure"
16257 #include "confdefs.h"
16258
16259 int
16260 main ()
16261 {
16262 bool foo = false
16263   ;
16264   return 0;
16265 }
16266 _ACEOF
16267 rm -f conftest.$ac_objext
16268 if { (eval echo "$as_me:16268: \"$ac_compile\"") >&5
16269   (eval $ac_compile) 2>&5
16270   ac_status=$?
16271   echo "$as_me:16271: \$? = $ac_status" >&5
16272   (exit $ac_status); } &&
16273          { ac_try='test -s conftest.$ac_objext'
16274   { (eval echo "$as_me:16274: \"$ac_try\"") >&5
16275   (eval $ac_try) 2>&5
16276   ac_status=$?
16277   echo "$as_me:16277: \$? = $ac_status" >&5
16278   (exit $ac_status); }; }; then
16279   cf_cv_header_stdbool_h=0
16280 else
16281   echo "$as_me: failed program was:" >&5
16282 cat conftest.$ac_ext >&5
16283 cat >conftest.$ac_ext <<_ACEOF
16284 #line 16284 "configure"
16285 #include "confdefs.h"
16286
16287 #ifndef __BEOS__
16288 #include <stdbool.h>
16289 #endif
16290
16291 int
16292 main ()
16293 {
16294 bool foo = false
16295   ;
16296   return 0;
16297 }
16298 _ACEOF
16299 rm -f conftest.$ac_objext
16300 if { (eval echo "$as_me:16300: \"$ac_compile\"") >&5
16301   (eval $ac_compile) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit $ac_status); } &&
16305          { ac_try='test -s conftest.$ac_objext'
16306   { (eval echo "$as_me:16306: \"$ac_try\"") >&5
16307   (eval $ac_try) 2>&5
16308   ac_status=$?
16309   echo "$as_me:16309: \$? = $ac_status" >&5
16310   (exit $ac_status); }; }; then
16311   cf_cv_header_stdbool_h=1
16312 else
16313   echo "$as_me: failed program was:" >&5
16314 cat conftest.$ac_ext >&5
16315 cf_cv_header_stdbool_h=0
16316 fi
16317 rm -f conftest.$ac_objext conftest.$ac_ext
16318 fi
16319 rm -f conftest.$ac_objext conftest.$ac_ext
16320 fi
16321
16322 if test "$cf_cv_header_stdbool_h" = 1
16323 then    echo "$as_me:16323: result: yes" >&5
16324 echo "${ECHO_T}yes" >&6
16325 else    echo "$as_me:16325: result: no" >&5
16326 echo "${ECHO_T}no" >&6
16327 fi
16328
16329 echo "$as_me:16329: checking for builtin bool type" >&5
16330 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16331
16332 if test "${cf_cv_cc_bool_type+set}" = set; then
16333   echo $ECHO_N "(cached) $ECHO_C" >&6
16334 else
16335
16336         cat >conftest.$ac_ext <<_ACEOF
16337 #line 16337 "configure"
16338 #include "confdefs.h"
16339
16340 #include <stdio.h>
16341 #include <sys/types.h>
16342
16343 int
16344 main ()
16345 {
16346 bool x = false
16347   ;
16348   return 0;
16349 }
16350 _ACEOF
16351 rm -f conftest.$ac_objext
16352 if { (eval echo "$as_me:16352: \"$ac_compile\"") >&5
16353   (eval $ac_compile) 2>&5
16354   ac_status=$?
16355   echo "$as_me:16355: \$? = $ac_status" >&5
16356   (exit $ac_status); } &&
16357          { ac_try='test -s conftest.$ac_objext'
16358   { (eval echo "$as_me:16358: \"$ac_try\"") >&5
16359   (eval $ac_try) 2>&5
16360   ac_status=$?
16361   echo "$as_me:16361: \$? = $ac_status" >&5
16362   (exit $ac_status); }; }; then
16363   cf_cv_cc_bool_type=1
16364 else
16365   echo "$as_me: failed program was:" >&5
16366 cat conftest.$ac_ext >&5
16367 cf_cv_cc_bool_type=0
16368 fi
16369 rm -f conftest.$ac_objext conftest.$ac_ext
16370
16371 fi
16372
16373 if test "$cf_cv_cc_bool_type" = 1
16374 then    echo "$as_me:16374: result: yes" >&5
16375 echo "${ECHO_T}yes" >&6
16376 else    echo "$as_me:16376: result: no" >&5
16377 echo "${ECHO_T}no" >&6
16378 fi
16379
16380 # Check for C++ compiler characteristics (and ensure that it's there!)
16381 if test -n "$CXX" ; then
16382         ac_ext=cc
16383 ac_cpp='$CXXCPP $CPPFLAGS'
16384 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16385 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16386 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16387 ac_main_return=return
16388
16389 if test -n "$GXX" ; then
16390 case $cf_cv_system_name in #(vi
16391 os2*) #(vi
16392         cf_stdcpp_libname=stdcpp
16393         ;;
16394 *)
16395         cf_stdcpp_libname=stdc++
16396         ;;
16397 esac
16398 echo "$as_me:16398: checking for library $cf_stdcpp_libname" >&5
16399 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
16400 if test "${cf_cv_libstdcpp+set}" = set; then
16401   echo $ECHO_N "(cached) $ECHO_C" >&6
16402 else
16403
16404         cf_save="$LIBS"
16405         LIBS="-l$cf_stdcpp_libname $LIBS"
16406 cat >conftest.$ac_ext <<_ACEOF
16407 #line 16407 "configure"
16408 #include "confdefs.h"
16409
16410 #include <strstream.h>
16411 int
16412 main ()
16413 {
16414
16415 char buf[80];
16416 strstreambuf foo(buf, sizeof(buf))
16417
16418   ;
16419   return 0;
16420 }
16421 _ACEOF
16422 rm -f conftest.$ac_objext conftest$ac_exeext
16423 if { (eval echo "$as_me:16423: \"$ac_link\"") >&5
16424   (eval $ac_link) 2>&5
16425   ac_status=$?
16426   echo "$as_me:16426: \$? = $ac_status" >&5
16427   (exit $ac_status); } &&
16428          { ac_try='test -s conftest$ac_exeext'
16429   { (eval echo "$as_me:16429: \"$ac_try\"") >&5
16430   (eval $ac_try) 2>&5
16431   ac_status=$?
16432   echo "$as_me:16432: \$? = $ac_status" >&5
16433   (exit $ac_status); }; }; then
16434   cf_cv_libstdcpp=yes
16435 else
16436   echo "$as_me: failed program was:" >&5
16437 cat conftest.$ac_ext >&5
16438 cf_cv_libstdcpp=no
16439 fi
16440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16441         LIBS="$cf_save"
16442
16443 fi
16444 echo "$as_me:16444: result: $cf_cv_libstdcpp" >&5
16445 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
16446 test "$cf_cv_libstdcpp" = yes && CXXLIBS="$CXXLIBS -l$cf_stdcpp_libname"
16447 fi
16448
16449         echo "$as_me:16449: checking whether $CXX understands -c and -o together" >&5
16450 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
16451 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
16452   echo $ECHO_N "(cached) $ECHO_C" >&6
16453 else
16454
16455 cat > conftest.$ac_ext <<CF_EOF
16456 #include <stdio.h>
16457 int main()
16458 {
16459         ${cf_cv_main_return:-return}(0);
16460 }
16461 CF_EOF
16462 # We do the test twice because some compilers refuse to overwrite an
16463 # existing .o file with -o, though they will create one.
16464 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
16465 if { (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); } &&
16470   test -f conftest2.$ac_objext && { (eval echo "$as_me:16470: \"$ac_try\"") >&5
16471   (eval $ac_try) 2>&5
16472   ac_status=$?
16473   echo "$as_me:16473: \$? = $ac_status" >&5
16474   (exit $ac_status); };
16475 then
16476   eval cf_cv_prog_CXX_c_o=yes
16477 else
16478   eval cf_cv_prog_CXX_c_o=no
16479 fi
16480 rm -f conftest*
16481
16482 fi
16483 if test $cf_cv_prog_CXX_c_o = yes; then
16484   echo "$as_me:16484: result: yes" >&5
16485 echo "${ECHO_T}yes" >&6
16486 else
16487   echo "$as_me:16487: result: no" >&5
16488 echo "${ECHO_T}no" >&6
16489 fi
16490
16491         case $GXX_VERSION in
16492         1*|2.0-6*)
16493                 cf_cxx_library=yes
16494                 ;;
16495         *-2.7*|2.7*)
16496
16497 cf_cxx_library=unknown
16498 case $cf_cv_system_name in #(vi
16499 os2*) #(vi
16500         cf_gpp_libname=gpp
16501         ;;
16502 *)
16503         cf_gpp_libname=g++
16504         ;;
16505 esac
16506 if test "$GXX" = yes; then
16507         echo "$as_me:16507: checking for lib$cf_gpp_libname" >&5
16508 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
16509         cf_save="$LIBS"
16510         LIBS="-l$cf_gpp_libname $LIBS"
16511         cat >conftest.$ac_ext <<_ACEOF
16512 #line 16512 "configure"
16513 #include "confdefs.h"
16514
16515 #include <$cf_gpp_libname/builtin.h>
16516
16517 int
16518 main ()
16519 {
16520 two_arg_error_handler_t foo2 = lib_error_handler
16521   ;
16522   return 0;
16523 }
16524 _ACEOF
16525 rm -f conftest.$ac_objext conftest$ac_exeext
16526 if { (eval echo "$as_me:16526: \"$ac_link\"") >&5
16527   (eval $ac_link) 2>&5
16528   ac_status=$?
16529   echo "$as_me:16529: \$? = $ac_status" >&5
16530   (exit $ac_status); } &&
16531          { ac_try='test -s conftest$ac_exeext'
16532   { (eval echo "$as_me:16532: \"$ac_try\"") >&5
16533   (eval $ac_try) 2>&5
16534   ac_status=$?
16535   echo "$as_me:16535: \$? = $ac_status" >&5
16536   (exit $ac_status); }; }; then
16537   cf_cxx_library=yes
16538          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16539          if test "$cf_gpp_libname" = cpp ; then
16540             cat >>confdefs.h <<\EOF
16541 #define HAVE_GPP_BUILTIN_H 1
16542 EOF
16543
16544          else
16545             cat >>confdefs.h <<\EOF
16546 #define HAVE_GXX_BUILTIN_H 1
16547 EOF
16548
16549          fi
16550 else
16551   echo "$as_me: failed program was:" >&5
16552 cat conftest.$ac_ext >&5
16553 cat >conftest.$ac_ext <<_ACEOF
16554 #line 16554 "configure"
16555 #include "confdefs.h"
16556
16557 #include <builtin.h>
16558
16559 int
16560 main ()
16561 {
16562 two_arg_error_handler_t foo2 = lib_error_handler
16563   ;
16564   return 0;
16565 }
16566 _ACEOF
16567 rm -f conftest.$ac_objext conftest$ac_exeext
16568 if { (eval echo "$as_me:16568: \"$ac_link\"") >&5
16569   (eval $ac_link) 2>&5
16570   ac_status=$?
16571   echo "$as_me:16571: \$? = $ac_status" >&5
16572   (exit $ac_status); } &&
16573          { ac_try='test -s conftest$ac_exeext'
16574   { (eval echo "$as_me:16574: \"$ac_try\"") >&5
16575   (eval $ac_try) 2>&5
16576   ac_status=$?
16577   echo "$as_me:16577: \$? = $ac_status" >&5
16578   (exit $ac_status); }; }; then
16579   cf_cxx_library=yes
16580          CXXLIBS="$CXXLIBS -l$cf_gpp_libname"
16581          cat >>confdefs.h <<\EOF
16582 #define HAVE_BUILTIN_H 1
16583 EOF
16584
16585 else
16586   echo "$as_me: failed program was:" >&5
16587 cat conftest.$ac_ext >&5
16588 cf_cxx_library=no
16589 fi
16590 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16591 fi
16592 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16593         LIBS="$cf_save"
16594         echo "$as_me:16594: result: $cf_cxx_library" >&5
16595 echo "${ECHO_T}$cf_cxx_library" >&6
16596 fi
16597
16598                 ;;
16599         *)
16600                 cf_cxx_library=no
16601                 ;;
16602         esac
16603
16604         ac_ext=cc
16605 ac_cpp='$CXXCPP $CPPFLAGS'
16606 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16607 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16608 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16609 ac_main_return=return
16610 echo "$as_me:16610: checking how to run the C++ preprocessor" >&5
16611 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
16612 if test -z "$CXXCPP"; then
16613   if test "${ac_cv_prog_CXXCPP+set}" = set; then
16614   echo $ECHO_N "(cached) $ECHO_C" >&6
16615 else
16616       # Double quotes because CXXCPP needs to be expanded
16617     for CXXCPP in "$CXX -E" "/lib/cpp"
16618     do
16619       ac_preproc_ok=false
16620 for ac_cxx_preproc_warn_flag in '' yes
16621 do
16622   # Use a header file that comes with gcc, so configuring glibc
16623   # with a fresh cross-compiler works.
16624   # On the NeXT, cc -E runs the code through the compiler's parser,
16625   # not just through cpp. "Syntax error" is here to catch this case.
16626   cat >conftest.$ac_ext <<_ACEOF
16627 #line 16627 "configure"
16628 #include "confdefs.h"
16629 #include <assert.h>
16630                      Syntax error
16631 _ACEOF
16632 if { (eval echo "$as_me:16632: \"$ac_cpp conftest.$ac_ext\"") >&5
16633   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16634   ac_status=$?
16635   egrep -v '^ *\+' conftest.er1 >conftest.err
16636   rm -f conftest.er1
16637   cat conftest.err >&5
16638   echo "$as_me:16638: \$? = $ac_status" >&5
16639   (exit $ac_status); } >/dev/null; then
16640   if test -s conftest.err; then
16641     ac_cpp_err=$ac_cxx_preproc_warn_flag
16642   else
16643     ac_cpp_err=
16644   fi
16645 else
16646   ac_cpp_err=yes
16647 fi
16648 if test -z "$ac_cpp_err"; then
16649   :
16650 else
16651   echo "$as_me: failed program was:" >&5
16652   cat conftest.$ac_ext >&5
16653   # Broken: fails on valid input.
16654 continue
16655 fi
16656 rm -f conftest.err conftest.$ac_ext
16657
16658   # OK, works on sane cases.  Now check whether non-existent headers
16659   # can be detected and how.
16660   cat >conftest.$ac_ext <<_ACEOF
16661 #line 16661 "configure"
16662 #include "confdefs.h"
16663 #include <ac_nonexistent.h>
16664 _ACEOF
16665 if { (eval echo "$as_me:16665: \"$ac_cpp conftest.$ac_ext\"") >&5
16666   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16667   ac_status=$?
16668   egrep -v '^ *\+' conftest.er1 >conftest.err
16669   rm -f conftest.er1
16670   cat conftest.err >&5
16671   echo "$as_me:16671: \$? = $ac_status" >&5
16672   (exit $ac_status); } >/dev/null; then
16673   if test -s conftest.err; then
16674     ac_cpp_err=$ac_cxx_preproc_warn_flag
16675   else
16676     ac_cpp_err=
16677   fi
16678 else
16679   ac_cpp_err=yes
16680 fi
16681 if test -z "$ac_cpp_err"; then
16682   # Broken: success on invalid input.
16683 continue
16684 else
16685   echo "$as_me: failed program was:" >&5
16686   cat conftest.$ac_ext >&5
16687   # Passes both tests.
16688 ac_preproc_ok=:
16689 break
16690 fi
16691 rm -f conftest.err conftest.$ac_ext
16692
16693 done
16694 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16695 rm -f conftest.err conftest.$ac_ext
16696 if $ac_preproc_ok; then
16697   break
16698 fi
16699
16700     done
16701     ac_cv_prog_CXXCPP=$CXXCPP
16702
16703 fi
16704   CXXCPP=$ac_cv_prog_CXXCPP
16705 else
16706   ac_cv_prog_CXXCPP=$CXXCPP
16707 fi
16708 echo "$as_me:16708: result: $CXXCPP" >&5
16709 echo "${ECHO_T}$CXXCPP" >&6
16710 ac_preproc_ok=false
16711 for ac_cxx_preproc_warn_flag in '' yes
16712 do
16713   # Use a header file that comes with gcc, so configuring glibc
16714   # with a fresh cross-compiler works.
16715   # On the NeXT, cc -E runs the code through the compiler's parser,
16716   # not just through cpp. "Syntax error" is here to catch this case.
16717   cat >conftest.$ac_ext <<_ACEOF
16718 #line 16718 "configure"
16719 #include "confdefs.h"
16720 #include <assert.h>
16721                      Syntax error
16722 _ACEOF
16723 if { (eval echo "$as_me:16723: \"$ac_cpp conftest.$ac_ext\"") >&5
16724   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16725   ac_status=$?
16726   egrep -v '^ *\+' conftest.er1 >conftest.err
16727   rm -f conftest.er1
16728   cat conftest.err >&5
16729   echo "$as_me:16729: \$? = $ac_status" >&5
16730   (exit $ac_status); } >/dev/null; then
16731   if test -s conftest.err; then
16732     ac_cpp_err=$ac_cxx_preproc_warn_flag
16733   else
16734     ac_cpp_err=
16735   fi
16736 else
16737   ac_cpp_err=yes
16738 fi
16739 if test -z "$ac_cpp_err"; then
16740   :
16741 else
16742   echo "$as_me: failed program was:" >&5
16743   cat conftest.$ac_ext >&5
16744   # Broken: fails on valid input.
16745 continue
16746 fi
16747 rm -f conftest.err conftest.$ac_ext
16748
16749   # OK, works on sane cases.  Now check whether non-existent headers
16750   # can be detected and how.
16751   cat >conftest.$ac_ext <<_ACEOF
16752 #line 16752 "configure"
16753 #include "confdefs.h"
16754 #include <ac_nonexistent.h>
16755 _ACEOF
16756 if { (eval echo "$as_me:16756: \"$ac_cpp conftest.$ac_ext\"") >&5
16757   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16758   ac_status=$?
16759   egrep -v '^ *\+' conftest.er1 >conftest.err
16760   rm -f conftest.er1
16761   cat conftest.err >&5
16762   echo "$as_me:16762: \$? = $ac_status" >&5
16763   (exit $ac_status); } >/dev/null; then
16764   if test -s conftest.err; then
16765     ac_cpp_err=$ac_cxx_preproc_warn_flag
16766   else
16767     ac_cpp_err=
16768   fi
16769 else
16770   ac_cpp_err=yes
16771 fi
16772 if test -z "$ac_cpp_err"; then
16773   # Broken: success on invalid input.
16774 continue
16775 else
16776   echo "$as_me: failed program was:" >&5
16777   cat conftest.$ac_ext >&5
16778   # Passes both tests.
16779 ac_preproc_ok=:
16780 break
16781 fi
16782 rm -f conftest.err conftest.$ac_ext
16783
16784 done
16785 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
16786 rm -f conftest.err conftest.$ac_ext
16787 if $ac_preproc_ok; then
16788   :
16789 else
16790   { { echo "$as_me:16790: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
16791 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
16792    { (exit 1); exit 1; }; }
16793 fi
16794
16795 ac_ext=cc
16796 ac_cpp='$CXXCPP $CPPFLAGS'
16797 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16798 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16799 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16800 ac_main_return=return
16801
16802 for ac_header in iostream typeinfo
16803 do
16804 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16805 echo "$as_me:16805: checking for $ac_header" >&5
16806 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16807 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16808   echo $ECHO_N "(cached) $ECHO_C" >&6
16809 else
16810   cat >conftest.$ac_ext <<_ACEOF
16811 #line 16811 "configure"
16812 #include "confdefs.h"
16813 #include <$ac_header>
16814 _ACEOF
16815 if { (eval echo "$as_me:16815: \"$ac_cpp conftest.$ac_ext\"") >&5
16816   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16817   ac_status=$?
16818   egrep -v '^ *\+' conftest.er1 >conftest.err
16819   rm -f conftest.er1
16820   cat conftest.err >&5
16821   echo "$as_me:16821: \$? = $ac_status" >&5
16822   (exit $ac_status); } >/dev/null; then
16823   if test -s conftest.err; then
16824     ac_cpp_err=$ac_cxx_preproc_warn_flag
16825   else
16826     ac_cpp_err=
16827   fi
16828 else
16829   ac_cpp_err=yes
16830 fi
16831 if test -z "$ac_cpp_err"; then
16832   eval "$as_ac_Header=yes"
16833 else
16834   echo "$as_me: failed program was:" >&5
16835   cat conftest.$ac_ext >&5
16836   eval "$as_ac_Header=no"
16837 fi
16838 rm -f conftest.err conftest.$ac_ext
16839 fi
16840 echo "$as_me:16840: result: `eval echo '${'$as_ac_Header'}'`" >&5
16841 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16842 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16843   cat >>confdefs.h <<EOF
16844 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16845 EOF
16846
16847 fi
16848 done
16849
16850     if test x"$ac_cv_header_iostream" = xyes ; then
16851         echo "$as_me:16851: checking if iostream uses std-namespace" >&5
16852 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
16853         cat >conftest.$ac_ext <<_ACEOF
16854 #line 16854 "configure"
16855 #include "confdefs.h"
16856
16857 #include <iostream>
16858 using std::endl;
16859 using std::cerr;
16860 int
16861 main ()
16862 {
16863
16864 cerr << "testing" << endl;
16865
16866   ;
16867   return 0;
16868 }
16869 _ACEOF
16870 rm -f conftest.$ac_objext
16871 if { (eval echo "$as_me:16871: \"$ac_compile\"") >&5
16872   (eval $ac_compile) 2>&5
16873   ac_status=$?
16874   echo "$as_me:16874: \$? = $ac_status" >&5
16875   (exit $ac_status); } &&
16876          { ac_try='test -s conftest.$ac_objext'
16877   { (eval echo "$as_me:16877: \"$ac_try\"") >&5
16878   (eval $ac_try) 2>&5
16879   ac_status=$?
16880   echo "$as_me:16880: \$? = $ac_status" >&5
16881   (exit $ac_status); }; }; then
16882   cf_iostream_namespace=yes
16883 else
16884   echo "$as_me: failed program was:" >&5
16885 cat conftest.$ac_ext >&5
16886 cf_iostream_namespace=no
16887 fi
16888 rm -f conftest.$ac_objext conftest.$ac_ext
16889         echo "$as_me:16889: result: $cf_iostream_namespace" >&5
16890 echo "${ECHO_T}$cf_iostream_namespace" >&6
16891         if test "$cf_iostream_namespace" = yes ; then
16892             cat >>confdefs.h <<\EOF
16893 #define IOSTREAM_NAMESPACE 1
16894 EOF
16895
16896         fi
16897     fi
16898
16899 echo "$as_me:16899: checking if we should include stdbool.h" >&5
16900 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
16901
16902 if test "${cf_cv_header_stdbool_h+set}" = set; then
16903   echo $ECHO_N "(cached) $ECHO_C" >&6
16904 else
16905
16906         cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 int
16911 main ()
16912 {
16913 bool foo = false
16914   ;
16915   return 0;
16916 }
16917 _ACEOF
16918 rm -f conftest.$ac_objext
16919 if { (eval echo "$as_me:16919: \"$ac_compile\"") >&5
16920   (eval $ac_compile) 2>&5
16921   ac_status=$?
16922   echo "$as_me:16922: \$? = $ac_status" >&5
16923   (exit $ac_status); } &&
16924          { ac_try='test -s conftest.$ac_objext'
16925   { (eval echo "$as_me:16925: \"$ac_try\"") >&5
16926   (eval $ac_try) 2>&5
16927   ac_status=$?
16928   echo "$as_me:16928: \$? = $ac_status" >&5
16929   (exit $ac_status); }; }; then
16930   cf_cv_header_stdbool_h=0
16931 else
16932   echo "$as_me: failed program was:" >&5
16933 cat conftest.$ac_ext >&5
16934 cat >conftest.$ac_ext <<_ACEOF
16935 #line 16935 "configure"
16936 #include "confdefs.h"
16937
16938 #ifndef __BEOS__
16939 #include <stdbool.h>
16940 #endif
16941
16942 int
16943 main ()
16944 {
16945 bool foo = false
16946   ;
16947   return 0;
16948 }
16949 _ACEOF
16950 rm -f conftest.$ac_objext
16951 if { (eval echo "$as_me:16951: \"$ac_compile\"") >&5
16952   (eval $ac_compile) 2>&5
16953   ac_status=$?
16954   echo "$as_me:16954: \$? = $ac_status" >&5
16955   (exit $ac_status); } &&
16956          { ac_try='test -s conftest.$ac_objext'
16957   { (eval echo "$as_me:16957: \"$ac_try\"") >&5
16958   (eval $ac_try) 2>&5
16959   ac_status=$?
16960   echo "$as_me:16960: \$? = $ac_status" >&5
16961   (exit $ac_status); }; }; then
16962   cf_cv_header_stdbool_h=1
16963 else
16964   echo "$as_me: failed program was:" >&5
16965 cat conftest.$ac_ext >&5
16966 cf_cv_header_stdbool_h=0
16967 fi
16968 rm -f conftest.$ac_objext conftest.$ac_ext
16969 fi
16970 rm -f conftest.$ac_objext conftest.$ac_ext
16971 fi
16972
16973 if test "$cf_cv_header_stdbool_h" = 1
16974 then    echo "$as_me:16974: result: yes" >&5
16975 echo "${ECHO_T}yes" >&6
16976 else    echo "$as_me:16976: result: no" >&5
16977 echo "${ECHO_T}no" >&6
16978 fi
16979
16980 echo "$as_me:16980: checking for builtin bool type" >&5
16981 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
16982
16983 if test "${cf_cv_builtin_bool+set}" = set; then
16984   echo $ECHO_N "(cached) $ECHO_C" >&6
16985 else
16986
16987         cat >conftest.$ac_ext <<_ACEOF
16988 #line 16988 "configure"
16989 #include "confdefs.h"
16990
16991 #include <stdio.h>
16992 #include <sys/types.h>
16993
16994 int
16995 main ()
16996 {
16997 bool x = false
16998   ;
16999   return 0;
17000 }
17001 _ACEOF
17002 rm -f conftest.$ac_objext
17003 if { (eval echo "$as_me:17003: \"$ac_compile\"") >&5
17004   (eval $ac_compile) 2>&5
17005   ac_status=$?
17006   echo "$as_me:17006: \$? = $ac_status" >&5
17007   (exit $ac_status); } &&
17008          { ac_try='test -s conftest.$ac_objext'
17009   { (eval echo "$as_me:17009: \"$ac_try\"") >&5
17010   (eval $ac_try) 2>&5
17011   ac_status=$?
17012   echo "$as_me:17012: \$? = $ac_status" >&5
17013   (exit $ac_status); }; }; then
17014   cf_cv_builtin_bool=1
17015 else
17016   echo "$as_me: failed program was:" >&5
17017 cat conftest.$ac_ext >&5
17018 cf_cv_builtin_bool=0
17019 fi
17020 rm -f conftest.$ac_objext conftest.$ac_ext
17021
17022 fi
17023
17024 if test "$cf_cv_builtin_bool" = 1
17025 then    echo "$as_me:17025: result: yes" >&5
17026 echo "${ECHO_T}yes" >&6
17027 else    echo "$as_me:17027: result: no" >&5
17028 echo "${ECHO_T}no" >&6
17029 fi
17030
17031 echo "$as_me:17031: checking for size of bool" >&5
17032 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17033 if test "${cf_cv_type_of_bool+set}" = set; then
17034   echo $ECHO_N "(cached) $ECHO_C" >&6
17035 else
17036
17037         rm -f cf_test.out
17038         if test "$cross_compiling" = yes; then
17039   cf_cv_type_of_bool=unknown
17040 else
17041   cat >conftest.$ac_ext <<_ACEOF
17042 #line 17042 "configure"
17043 #include "confdefs.h"
17044
17045 #include <stdlib.h>
17046 #include <stdio.h>
17047
17048 #if defined(__cplusplus)
17049
17050 #ifdef HAVE_GXX_BUILTIN_H
17051 #include <g++/builtin.h>
17052 #elif HAVE_GPP_BUILTIN_H
17053 #include <gpp/builtin.h>
17054 #elif HAVE_BUILTIN_H
17055 #include <builtin.h>
17056 #endif
17057
17058 #else
17059
17060 #if $cf_cv_header_stdbool_h
17061 #include <stdbool.h>
17062 #endif
17063
17064 #endif
17065
17066 main()
17067 {
17068         FILE *fp = fopen("cf_test.out", "w");
17069         if (fp != 0) {
17070                 bool x = true;
17071                 if ((bool)(-x) >= 0)
17072                         fputs("unsigned ", fp);
17073                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17074                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17075                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17076                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17077                 fclose(fp);
17078         }
17079         ${cf_cv_main_return:-return}(0);
17080 }
17081
17082 _ACEOF
17083 rm -f conftest$ac_exeext
17084 if { (eval echo "$as_me:17084: \"$ac_link\"") >&5
17085   (eval $ac_link) 2>&5
17086   ac_status=$?
17087   echo "$as_me:17087: \$? = $ac_status" >&5
17088   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17089   { (eval echo "$as_me:17089: \"$ac_try\"") >&5
17090   (eval $ac_try) 2>&5
17091   ac_status=$?
17092   echo "$as_me:17092: \$? = $ac_status" >&5
17093   (exit $ac_status); }; }; then
17094   cf_cv_type_of_bool=`cat cf_test.out`
17095                  if test -z "$cf_cv_type_of_bool"; then
17096                    cf_cv_type_of_bool=unknown
17097                  fi
17098 else
17099   echo "$as_me: program exited with status $ac_status" >&5
17100 echo "$as_me: failed program was:" >&5
17101 cat conftest.$ac_ext >&5
17102 cf_cv_type_of_bool=unknown
17103 fi
17104 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17105 fi
17106
17107 fi
17108
17109         rm -f cf_test.out
17110 echo "$as_me:17110: result: $cf_cv_type_of_bool" >&5
17111 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17112 if test "$cf_cv_type_of_bool" = unknown ; then
17113         case .$NCURSES_BOOL in #(vi
17114         .auto|.) NCURSES_BOOL=unsigned;;
17115         esac
17116         { echo "$as_me:17116: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17117 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17118         cf_cv_type_of_bool=$NCURSES_BOOL
17119 fi
17120
17121 echo "$as_me:17121: checking for special defines needed for etip.h" >&5
17122 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17123 cf_save_CXXFLAGS="$CXXFLAGS"
17124 cf_result="none"
17125 for cf_math in "" MATH_H
17126 do
17127 for cf_excp in "" MATH_EXCEPTION
17128 do
17129         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17130         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17131         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17132 cat >conftest.$ac_ext <<_ACEOF
17133 #line 17133 "configure"
17134 #include "confdefs.h"
17135
17136 #include <etip.h.in>
17137
17138 int
17139 main ()
17140 {
17141
17142   ;
17143   return 0;
17144 }
17145 _ACEOF
17146 rm -f conftest.$ac_objext
17147 if { (eval echo "$as_me:17147: \"$ac_compile\"") >&5
17148   (eval $ac_compile) 2>&5
17149   ac_status=$?
17150   echo "$as_me:17150: \$? = $ac_status" >&5
17151   (exit $ac_status); } &&
17152          { ac_try='test -s conftest.$ac_objext'
17153   { (eval echo "$as_me:17153: \"$ac_try\"") >&5
17154   (eval $ac_try) 2>&5
17155   ac_status=$?
17156   echo "$as_me:17156: \$? = $ac_status" >&5
17157   (exit $ac_status); }; }; then
17158
17159         test -n "$cf_math" && cat >>confdefs.h <<EOF
17160 #define ETIP_NEEDS_${cf_math} 1
17161 EOF
17162
17163         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17164 #define ETIP_NEEDS_${cf_excp} 1
17165 EOF
17166
17167         cf_result="$cf_math $cf_excp"
17168         break
17169
17170 else
17171   echo "$as_me: failed program was:" >&5
17172 cat conftest.$ac_ext >&5
17173 fi
17174 rm -f conftest.$ac_objext conftest.$ac_ext
17175 done
17176 done
17177 echo "$as_me:17177: result: $cf_result" >&5
17178 echo "${ECHO_T}$cf_result" >&6
17179 CXXFLAGS="$cf_save_CXXFLAGS"
17180
17181 if test -n "$CXX"; then
17182 echo "$as_me:17182: checking if $CXX accepts parameter initialization" >&5
17183 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17184 if test "${cf_cv_cpp_param_init+set}" = set; then
17185   echo $ECHO_N "(cached) $ECHO_C" >&6
17186 else
17187
17188         ac_ext=cc
17189 ac_cpp='$CXXCPP $CPPFLAGS'
17190 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17191 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17192 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17193 ac_main_return=return
17194
17195         if test "$cross_compiling" = yes; then
17196   cf_cv_cpp_param_init=unknown
17197 else
17198   cat >conftest.$ac_ext <<_ACEOF
17199 #line 17199 "configure"
17200 #include "confdefs.h"
17201
17202 class TEST {
17203 private:
17204         int value;
17205 public:
17206         TEST(int x = 1);
17207         ~TEST();
17208 };
17209
17210 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17211 {
17212         value = x;
17213 }
17214 void main() { }
17215
17216 _ACEOF
17217 rm -f conftest$ac_exeext
17218 if { (eval echo "$as_me:17218: \"$ac_link\"") >&5
17219   (eval $ac_link) 2>&5
17220   ac_status=$?
17221   echo "$as_me:17221: \$? = $ac_status" >&5
17222   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17223   { (eval echo "$as_me:17223: \"$ac_try\"") >&5
17224   (eval $ac_try) 2>&5
17225   ac_status=$?
17226   echo "$as_me:17226: \$? = $ac_status" >&5
17227   (exit $ac_status); }; }; then
17228   cf_cv_cpp_param_init=yes
17229 else
17230   echo "$as_me: program exited with status $ac_status" >&5
17231 echo "$as_me: failed program was:" >&5
17232 cat conftest.$ac_ext >&5
17233 cf_cv_cpp_param_init=no
17234 fi
17235 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17236 fi
17237         ac_ext=cc
17238 ac_cpp='$CXXCPP $CPPFLAGS'
17239 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17240 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17241 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17242 ac_main_return=return
17243
17244 fi
17245 echo "$as_me:17245: result: $cf_cv_cpp_param_init" >&5
17246 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
17247 fi
17248 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
17249 #define CPP_HAS_PARAM_INIT 1
17250 EOF
17251
17252 if test -n "$CXX"; then
17253
17254 echo "$as_me:17254: checking if $CXX accepts static_cast" >&5
17255 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
17256 if test "${cf_cv_cpp_static_cast+set}" = set; then
17257   echo $ECHO_N "(cached) $ECHO_C" >&6
17258 else
17259
17260         ac_ext=cc
17261 ac_cpp='$CXXCPP $CPPFLAGS'
17262 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17263 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17264 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17265 ac_main_return=return
17266
17267         cat >conftest.$ac_ext <<_ACEOF
17268 #line 17268 "configure"
17269 #include "confdefs.h"
17270
17271 class NCursesPanel
17272 {
17273 public:
17274   NCursesPanel(int nlines,
17275                int ncols,
17276                int begin_y = 0,
17277                int begin_x = 0)
17278   {
17279   }
17280
17281   ~NCursesPanel();
17282 };
17283
17284 template<class T> class NCursesUserPanel : public NCursesPanel
17285 {
17286 public:
17287   NCursesUserPanel (int nlines,
17288                     int ncols,
17289                     int begin_y = 0,
17290                     int begin_x = 0,
17291                     const T* p_UserData = static_cast<T*>(0))
17292     : NCursesPanel (nlines, ncols, begin_y, begin_x)
17293   {
17294   };
17295   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
17296   {
17297   };
17298
17299   virtual ~NCursesUserPanel() {};
17300 };
17301
17302 int
17303 main ()
17304 {
17305
17306         const char* p_UserData = static_cast<char*>(0)
17307   ;
17308   return 0;
17309 }
17310 _ACEOF
17311 rm -f conftest.$ac_objext
17312 if { (eval echo "$as_me:17312: \"$ac_compile\"") >&5
17313   (eval $ac_compile) 2>&5
17314   ac_status=$?
17315   echo "$as_me:17315: \$? = $ac_status" >&5
17316   (exit $ac_status); } &&
17317          { ac_try='test -s conftest.$ac_objext'
17318   { (eval echo "$as_me:17318: \"$ac_try\"") >&5
17319   (eval $ac_try) 2>&5
17320   ac_status=$?
17321   echo "$as_me:17321: \$? = $ac_status" >&5
17322   (exit $ac_status); }; }; then
17323   cf_cv_cpp_static_cast=yes
17324 else
17325   echo "$as_me: failed program was:" >&5
17326 cat conftest.$ac_ext >&5
17327 cf_cv_cpp_static_cast=no
17328 fi
17329 rm -f conftest.$ac_objext conftest.$ac_ext
17330
17331         ac_ext=cc
17332 ac_cpp='$CXXCPP $CPPFLAGS'
17333 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17334 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17335 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17336 ac_main_return=return
17337
17338 fi
17339 echo "$as_me:17339: result: $cf_cv_cpp_static_cast" >&5
17340 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
17341
17342 fi
17343
17344 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
17345 #define CPP_HAS_STATIC_CAST 1
17346 EOF
17347
17348         CXX_AR='$(AR)'
17349         CXX_ARFLAGS='$(ARFLAGS)'
17350         case $cf_cv_system_name in #(vi
17351         irix*) #(vi
17352             if test "$GXX" != yes ; then
17353                 CXX_AR='$(CXX)'
17354                 CXX_ARFLAGS='-ar -o'
17355             fi
17356             ;;
17357         sco3.2v5*) #(vi
17358             CXXLDFLAGS="-u main"
17359             ;;
17360         solaris2*)
17361             if test "$GXX" != yes ; then
17362                 CXX_AR='$(CXX)'
17363                 CXX_ARFLAGS='-xar -o'
17364             fi
17365             ;;
17366         esac
17367
17368 else
17369         cf_cxx_library=no
17370         cf_cv_builtin_bool=1
17371
17372         # Just because we are not configuring against C++ right now does not
17373         # mean that a user will not want to use C++.  Some distributors disable
17374         # the C++ portion of this configuration as a shortcut (or just to avoid
17375         # compiling the demo in the c++ directory).  So we need a reasonable
17376         # default for the 'bool' type.
17377         #
17378         # Caveat: since the storage of the bool type is not standardized, it
17379         # may change.
17380
17381         if test "$NCURSES_BOOL" != auto ; then
17382                 cf_cv_type_of_bool=$NCURSES_BOOL
17383                 cf_cv_header_stdbool_h=0
17384         else
17385                 if test "$cf_cv_header_stdbool_h" = 1 ; then
17386
17387 echo "$as_me:17387: checking for size of bool" >&5
17388 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17389 if test "${cf_cv_type_of_bool+set}" = set; then
17390   echo $ECHO_N "(cached) $ECHO_C" >&6
17391 else
17392
17393         rm -f cf_test.out
17394         if test "$cross_compiling" = yes; then
17395   cf_cv_type_of_bool=unknown
17396 else
17397   cat >conftest.$ac_ext <<_ACEOF
17398 #line 17398 "configure"
17399 #include "confdefs.h"
17400
17401 #include <stdlib.h>
17402 #include <stdio.h>
17403
17404 #if defined(__cplusplus)
17405
17406 #ifdef HAVE_GXX_BUILTIN_H
17407 #include <g++/builtin.h>
17408 #elif HAVE_GPP_BUILTIN_H
17409 #include <gpp/builtin.h>
17410 #elif HAVE_BUILTIN_H
17411 #include <builtin.h>
17412 #endif
17413
17414 #else
17415
17416 #if $cf_cv_header_stdbool_h
17417 #include <stdbool.h>
17418 #endif
17419
17420 #endif
17421
17422 main()
17423 {
17424         FILE *fp = fopen("cf_test.out", "w");
17425         if (fp != 0) {
17426                 bool x = true;
17427                 if ((bool)(-x) >= 0)
17428                         fputs("unsigned ", fp);
17429                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17430                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17431                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17432                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17433                 fclose(fp);
17434         }
17435         ${cf_cv_main_return:-return}(0);
17436 }
17437
17438 _ACEOF
17439 rm -f conftest$ac_exeext
17440 if { (eval echo "$as_me:17440: \"$ac_link\"") >&5
17441   (eval $ac_link) 2>&5
17442   ac_status=$?
17443   echo "$as_me:17443: \$? = $ac_status" >&5
17444   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17445   { (eval echo "$as_me:17445: \"$ac_try\"") >&5
17446   (eval $ac_try) 2>&5
17447   ac_status=$?
17448   echo "$as_me:17448: \$? = $ac_status" >&5
17449   (exit $ac_status); }; }; then
17450   cf_cv_type_of_bool=`cat cf_test.out`
17451                  if test -z "$cf_cv_type_of_bool"; then
17452                    cf_cv_type_of_bool=unknown
17453                  fi
17454 else
17455   echo "$as_me: program exited with status $ac_status" >&5
17456 echo "$as_me: failed program was:" >&5
17457 cat conftest.$ac_ext >&5
17458 cf_cv_type_of_bool=unknown
17459 fi
17460 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17461 fi
17462
17463 fi
17464
17465         rm -f cf_test.out
17466 echo "$as_me:17466: result: $cf_cv_type_of_bool" >&5
17467 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17468 if test "$cf_cv_type_of_bool" = unknown ; then
17469         case .$NCURSES_BOOL in #(vi
17470         .auto|.) NCURSES_BOOL=unsigned;;
17471         esac
17472         { echo "$as_me:17472: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17473 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17474         cf_cv_type_of_bool=$NCURSES_BOOL
17475 fi
17476
17477                 else
17478                         echo "$as_me:17478: checking for fallback type of bool" >&5
17479 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
17480                         case "$host_cpu" in #(vi
17481                         i?86)   cf_cv_type_of_bool=char ;; #(vi
17482                         *)      cf_cv_type_of_bool=int  ;;
17483                         esac
17484                         echo "$as_me:17484: result: $cf_cv_type_of_bool" >&5
17485 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17486                 fi
17487         fi
17488 fi
17489
17490 # If the C compiler did not declare bool, and we did not determine that the C++
17491 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
17492 # ncurses library use the same type as C++ bool.  Note that this allows one to
17493 # specify the type of bool in a configure-script option and postpone
17494 # integration with the C++ compiler provided that the types are compatible.
17495 USE_CXX_BOOL=1
17496 if test $cf_cv_cc_bool_type = 1
17497 then
17498         # oops: C has a bool.  Unlikely, but C++ could differ.
17499         USE_CXX_BOOL=0
17500 elif test $cf_cv_builtin_bool = 0
17501 then
17502         # C++ has no bool
17503         USE_CXX_BOOL=0
17504 else
17505         # this is the normal case
17506         USE_CXX_BOOL='defined(__cplusplus)'
17507 fi
17508
17509 if test -f "${srcdir}/Ada95/Makefile.in" ; then
17510
17511 if test "$cf_with_ada" != "no" ; then
17512     if test "$with_libtool" != "no"; then
17513         { echo "$as_me:17513: WARNING: libtool does not support Ada - disabling feature" >&5
17514 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
17515         cf_with_ada=no
17516     fi
17517 fi
17518
17519 if test "$cf_with_ada" != "no" ; then
17520 cf_ada_make=gnatmake
17521 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
17522 set dummy $cf_ada_make; ac_word=$2
17523 echo "$as_me:17523: checking for $ac_word" >&5
17524 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17525 if test "${ac_cv_prog_gnat_exists+set}" = set; then
17526   echo $ECHO_N "(cached) $ECHO_C" >&6
17527 else
17528   if test -n "$gnat_exists"; then
17529   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
17530 else
17531   ac_save_IFS=$IFS; IFS=$ac_path_separator
17532 ac_dummy="$PATH"
17533 for ac_dir in $ac_dummy; do
17534   IFS=$ac_save_IFS
17535   test -z "$ac_dir" && ac_dir=.
17536   $as_executable_p "$ac_dir/$ac_word" || continue
17537 ac_cv_prog_gnat_exists="yes"
17538 echo "$as_me:17538: found $ac_dir/$ac_word" >&5
17539 break
17540 done
17541
17542   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
17543 fi
17544 fi
17545 gnat_exists=$ac_cv_prog_gnat_exists
17546 if test -n "$gnat_exists"; then
17547   echo "$as_me:17547: result: $gnat_exists" >&5
17548 echo "${ECHO_T}$gnat_exists" >&6
17549 else
17550   echo "$as_me:17550: result: no" >&5
17551 echo "${ECHO_T}no" >&6
17552 fi
17553
17554 if test "$ac_cv_prog_gnat_exists" = no; then
17555    cf_ada_make=
17556 else
17557
17558 echo "$as_me:17558: checking for gnat version" >&5
17559 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
17560 cf_gnat_version=`${cf_ada_make-gnatmake} -v 2>&1 | grep '[0-9].[0-9][0-9]*' |\
17561   sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
17562 echo "$as_me:17562: result: $cf_gnat_version" >&5
17563 echo "${ECHO_T}$cf_gnat_version" >&6
17564
17565 case $cf_gnat_version in
17566   3.1[1-9]*|3.[2-9]*|[4-9].*)
17567     cf_cv_prog_gnat_correct=yes
17568     ;;
17569   *) echo Unsupported GNAT version $cf_gnat_version. Required is 3.11 or better. Disabling Ada95 binding.
17570      cf_cv_prog_gnat_correct=no
17571      ;;
17572 esac
17573 case $cf_gnat_version in
17574   3.[1-9]*|[4-9].*)
17575       cf_compile_generics=generics
17576       cf_generic_objects="\${GENOBJS}"
17577       ;;
17578   *)  cf_compile_generics=
17579       cf_generic_objects=
17580       ;;
17581 esac
17582
17583    # Extract the first word of "m4", so it can be a program name with args.
17584 set dummy m4; ac_word=$2
17585 echo "$as_me:17585: checking for $ac_word" >&5
17586 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17587 if test "${ac_cv_prog_M4_exists+set}" = set; then
17588   echo $ECHO_N "(cached) $ECHO_C" >&6
17589 else
17590   if test -n "$M4_exists"; then
17591   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
17592 else
17593   ac_save_IFS=$IFS; IFS=$ac_path_separator
17594 ac_dummy="$PATH"
17595 for ac_dir in $ac_dummy; do
17596   IFS=$ac_save_IFS
17597   test -z "$ac_dir" && ac_dir=.
17598   $as_executable_p "$ac_dir/$ac_word" || continue
17599 ac_cv_prog_M4_exists="yes"
17600 echo "$as_me:17600: found $ac_dir/$ac_word" >&5
17601 break
17602 done
17603
17604   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
17605 fi
17606 fi
17607 M4_exists=$ac_cv_prog_M4_exists
17608 if test -n "$M4_exists"; then
17609   echo "$as_me:17609: result: $M4_exists" >&5
17610 echo "${ECHO_T}$M4_exists" >&6
17611 else
17612   echo "$as_me:17612: result: no" >&5
17613 echo "${ECHO_T}no" >&6
17614 fi
17615
17616    if test "$ac_cv_prog_M4_exists" = no; then
17617       cf_cv_prog_gnat_correct=no
17618       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
17619    fi
17620    if test "$cf_cv_prog_gnat_correct" = yes; then
17621       echo "$as_me:17621: checking if GNAT works" >&5
17622 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
17623
17624 rm -f conftest*
17625 cat >>conftest.ads <<CF_EOF
17626 procedure conftest;
17627 CF_EOF
17628 cat >>conftest.adb <<CF_EOF
17629 with Text_IO;
17630 with GNAT.OS_Lib;
17631 procedure conftest is
17632 begin
17633    Text_IO.Put ("Hello World");
17634    Text_IO.New_Line;
17635    GNAT.OS_Lib.OS_Exit (0);
17636 end conftest;
17637 CF_EOF
17638 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17639    if ( ./conftest 1>&5 2>&1 ) ; then
17640       cf_cv_prog_gnat_correct=yes
17641    else
17642       cf_cv_prog_gnat_correct=no
17643    fi
17644 else
17645    cf_cv_prog_gnat_correct=no
17646 fi
17647 rm -f conftest*
17648
17649       echo "$as_me:17649: result: $cf_cv_prog_gnat_correct" >&5
17650 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
17651    fi
17652 fi
17653 if test "$cf_cv_prog_gnat_correct" = yes; then
17654    ADAFLAGS="-O3 -gnatpn $ADAFLAGS"
17655
17656    echo "$as_me:17656: checking if GNAT pragma Unreferenced works" >&5
17657 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
17658
17659 rm -f conftest*
17660 cat >>conftest.ads <<CF_EOF
17661 procedure conftest;
17662 CF_EOF
17663 cat >>conftest.adb <<CF_EOF
17664 with Text_IO;
17665 with GNAT.OS_Lib;
17666 procedure conftest is
17667    test : Integer;
17668    pragma Unreferenced (test);
17669 begin
17670    test := 1;
17671    Text_IO.Put ("Hello World");
17672    Text_IO.New_Line;
17673    GNAT.OS_Lib.OS_Exit (0);
17674 end conftest;
17675 CF_EOF
17676 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
17677       cf_cv_pragma_unreferenced=yes
17678 else
17679    cf_cv_pragma_unreferenced=no
17680 fi
17681 rm -f conftest*
17682
17683    echo "$as_me:17683: result: $cf_cv_pragma_unreferenced" >&5
17684 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
17685
17686    # if the pragma is supported, use it (needed in the Trace code).
17687    if test $cf_cv_pragma_unreferenced = yes ; then
17688       PRAGMA_UNREF=TRUE
17689    else
17690       PRAGMA_UNREF=FALSE
17691    fi
17692
17693 # Check whether --with-ada-compiler or --without-ada-compiler was given.
17694 if test "${with_ada_compiler+set}" = set; then
17695   withval="$with_ada_compiler"
17696   cf_ada_compiler=$withval
17697 else
17698   cf_ada_compiler=gnatmake
17699 fi;
17700
17701    cf_ada_package=terminal_interface
17702
17703 # Check whether --with-ada-include or --without-ada-include was given.
17704 if test "${with_ada_include+set}" = set; then
17705   withval="$with_ada_include"
17706
17707 else
17708   withval="${ADA_INCLUDE-$prefix/lib/ada/adainclude}"
17709 fi; if test -n "$prefix/lib/ada/adainclude" ; then
17710
17711 if test "x$prefix" != xNONE; then
17712   cf_path_syntax="$prefix"
17713 else
17714   cf_path_syntax="$ac_default_prefix"
17715 fi
17716
17717 case ".$withval" in #(vi
17718 .\$\(*\)*|.\'*\'*) #(vi
17719   ;;
17720 ..|./*|.\\*) #(vi
17721   ;;
17722 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17723   ;;
17724 .\${*prefix}*) #(vi
17725   eval withval="$withval"
17726   case ".$withval" in #(vi
17727   .NONE/*)
17728     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17729     ;;
17730   esac
17731   ;; #(vi
17732 .no|.NONE/*)
17733   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17734   ;;
17735 *)
17736   { { echo "$as_me:17736: error: expected a pathname, not \"$withval\"" >&5
17737 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17738    { (exit 1); exit 1; }; }
17739   ;;
17740 esac
17741
17742 fi
17743 ADA_INCLUDE="$withval"
17744
17745 # Check whether --with-ada-objects or --without-ada-objects was given.
17746 if test "${with_ada_objects+set}" = set; then
17747   withval="$with_ada_objects"
17748
17749 else
17750   withval="${ADA_OBJECTS-$prefix/lib/ada/adalib}"
17751 fi; if test -n "$prefix/lib/ada/adalib" ; then
17752
17753 if test "x$prefix" != xNONE; then
17754   cf_path_syntax="$prefix"
17755 else
17756   cf_path_syntax="$ac_default_prefix"
17757 fi
17758
17759 case ".$withval" in #(vi
17760 .\$\(*\)*|.\'*\'*) #(vi
17761   ;;
17762 ..|./*|.\\*) #(vi
17763   ;;
17764 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
17765   ;;
17766 .\${*prefix}*) #(vi
17767   eval withval="$withval"
17768   case ".$withval" in #(vi
17769   .NONE/*)
17770     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17771     ;;
17772   esac
17773   ;; #(vi
17774 .no|.NONE/*)
17775   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
17776   ;;
17777 *)
17778   { { echo "$as_me:17778: error: expected a pathname, not \"$withval\"" >&5
17779 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
17780    { (exit 1); exit 1; }; }
17781   ;;
17782 esac
17783
17784 fi
17785 ADA_OBJECTS="$withval"
17786
17787 fi
17788 fi
17789 else
17790    cf_with_ada=no
17791 fi
17792
17793 ### Construct the ncurses library-subsets, if any, from this set of keywords:
17794 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
17795 ###
17796 ### ticlib modules may be a separate library, otherwise contained in termlib.
17797 ### termlib modules may be a separate library, otherwise contained in ncurses.
17798 ###
17799 ### The of "+" or " " between the tokens controls the way the script
17800 ### chooses to split module lists into libraries.
17801 ###
17802 ### (see CF_LIB_RULES).
17803 echo "$as_me:17803: checking for library subsets" >&5
17804 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
17805 LIB_SUBSETS=
17806
17807 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
17808         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
17809         if test "$with_ticlib" != no ; then
17810                 LIB_SUBSETS="${LIB_SUBSETS} "
17811         else
17812                 LIB_SUBSETS="${LIB_SUBSETS}+"
17813         fi
17814 fi
17815
17816 LIB_SUBSETS="${LIB_SUBSETS}termlib"
17817 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
17818
17819 if test "$with_termlib" != no ; then
17820         LIB_SUBSETS="${LIB_SUBSETS} "
17821 else
17822         LIB_SUBSETS="${LIB_SUBSETS}+"
17823 fi
17824
17825 LIB_SUBSETS="${LIB_SUBSETS}base"
17826
17827 # Most term-driver calls are to tinfo, but some like init_pair are to the
17828 # base library (so it resides in base).
17829 if test "$with_term_driver" != no ; then
17830         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
17831         case $cf_cv_system_name in #(vi
17832         *mingw32*) #(vi
17833                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
17834                 ;;
17835         *) #(vi
17836                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
17837                 ;;
17838         esac
17839 fi
17840
17841 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
17842 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
17843
17844 echo "$as_me:17844: result: $LIB_SUBSETS" >&5
17845 echo "${ECHO_T}$LIB_SUBSETS" >&6
17846
17847 ### Construct the list of include-directories to be generated
17848
17849 CPPFLAGS="$CPPFLAGS -I. -I../include"
17850 if test "$srcdir" != "."; then
17851         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
17852 fi
17853 if test "$GCC" != yes; then
17854         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17855 elif test "$includedir" != "/usr/include"; then
17856         if test "$includedir" = '${prefix}/include' ; then
17857                 if test $prefix != /usr ; then
17858                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
17859                 fi
17860         else
17861                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
17862         fi
17863 fi
17864
17865 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
17866 if test "$srcdir" != "."; then
17867         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
17868 fi
17869 if test "$GCC" != yes; then
17870         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17871 elif test "$includedir" != "/usr/include"; then
17872         if test "$includedir" = '${prefix}/include' ; then
17873                 if test $prefix != /usr ; then
17874                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17875                 fi
17876         else
17877                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
17878         fi
17879 fi
17880
17881 ### Build up pieces for makefile rules
17882 echo "$as_me:17882: checking default library suffix" >&5
17883 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
17884
17885         case $DFT_LWR_MODEL in
17886         libtool) DFT_ARG_SUFFIX=''   ;;
17887         normal)  DFT_ARG_SUFFIX=''   ;;
17888         debug)   DFT_ARG_SUFFIX='_g' ;;
17889         profile) DFT_ARG_SUFFIX='_p' ;;
17890         shared)  DFT_ARG_SUFFIX=''   ;;
17891         esac
17892         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
17893 echo "$as_me:17893: result: $DFT_ARG_SUFFIX" >&5
17894 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
17895
17896 echo "$as_me:17896: checking default library-dependency suffix" >&5
17897 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
17898
17899         case $DFT_LWR_MODEL in #(vi
17900         libtool) #(vi
17901                 DFT_LIB_SUFFIX='.la'
17902                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17903                 ;;
17904         normal) #(vi
17905                 DFT_LIB_SUFFIX='.a'
17906                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17907                 ;;
17908         debug) #(vi
17909                 DFT_LIB_SUFFIX='_g.a'
17910                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17911                 ;;
17912         profile) #(vi
17913                 DFT_LIB_SUFFIX='_p.a'
17914                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17915                 ;;
17916         shared) #(vi
17917                 case $cf_cv_system_name in
17918                 aix[56]*) #(vi
17919                         DFT_LIB_SUFFIX='.a'
17920                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17921                         ;;
17922                 cygwin*) #(vi
17923                         DFT_LIB_SUFFIX='.dll'
17924                         DFT_DEP_SUFFIX='.dll.a'
17925                         ;;
17926                 darwin*) #(vi
17927                         DFT_LIB_SUFFIX='.dylib'
17928                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17929                         ;;
17930                 hpux*) #(vi
17931                         case $target in
17932                         ia64*) #(vi
17933                                 DFT_LIB_SUFFIX='.so'
17934                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17935                                 ;;
17936                         *) #(vi
17937                                 DFT_LIB_SUFFIX='.sl'
17938                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17939                                 ;;
17940                         esac
17941                         ;;
17942                 *)      DFT_LIB_SUFFIX='.so'
17943                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
17944                         ;;
17945                 esac
17946         esac
17947         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
17948         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
17949 echo "$as_me:17949: result: $DFT_DEP_SUFFIX" >&5
17950 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
17951
17952 echo "$as_me:17952: checking default object directory" >&5
17953 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
17954
17955         case $DFT_LWR_MODEL in
17956         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
17957         normal)  DFT_OBJ_SUBDIR='objects' ;;
17958         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
17959         profile) DFT_OBJ_SUBDIR='obj_p' ;;
17960         shared)
17961                 case $cf_cv_system_name in #(vi
17962                 cygwin) #(vi
17963                         DFT_OBJ_SUBDIR='objects' ;;
17964                 *)
17965                         DFT_OBJ_SUBDIR='obj_s' ;;
17966                 esac
17967         esac
17968 echo "$as_me:17968: result: $DFT_OBJ_SUBDIR" >&5
17969 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
17970
17971 # libtool thinks it can make c++ shared libraries (perhaps only g++)
17972 if test "$cf_with_cxx" = yes ; then
17973 echo "$as_me:17973: checking c++ library-dependency suffix" >&5
17974 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
17975 if test "$with_libtool" != "no"; then
17976         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
17977 else
17978
17979         case normal in #(vi
17980         libtool) #(vi
17981                 CXX_LIB_SUFFIX='.la'
17982                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17983                 ;;
17984         normal) #(vi
17985                 CXX_LIB_SUFFIX='.a'
17986                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17987                 ;;
17988         debug) #(vi
17989                 CXX_LIB_SUFFIX='_g.a'
17990                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17991                 ;;
17992         profile) #(vi
17993                 CXX_LIB_SUFFIX='_p.a'
17994                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
17995                 ;;
17996         shared) #(vi
17997                 case $cf_cv_system_name in
17998                 aix[56]*) #(vi
17999                         CXX_LIB_SUFFIX='.a'
18000                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18001                         ;;
18002                 cygwin*) #(vi
18003                         CXX_LIB_SUFFIX='.dll'
18004                         CXX_DEP_SUFFIX='.dll.a'
18005                         ;;
18006                 darwin*) #(vi
18007                         CXX_LIB_SUFFIX='.dylib'
18008                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18009                         ;;
18010                 hpux*) #(vi
18011                         case $target in
18012                         ia64*) #(vi
18013                                 CXX_LIB_SUFFIX='.so'
18014                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18015                                 ;;
18016                         *) #(vi
18017                                 CXX_LIB_SUFFIX='.sl'
18018                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18019                                 ;;
18020                         esac
18021                         ;;
18022                 *)      CXX_LIB_SUFFIX='.so'
18023                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18024                         ;;
18025                 esac
18026         esac
18027         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
18028         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
18029 fi
18030 echo "$as_me:18030: result: $CXX_LIB_SUFFIX" >&5
18031 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
18032
18033 fi
18034
18035 # do not want -ldl in build except as needed for -lncurses dependency
18036 if test "$with_dlsym" = yes ; then
18037 if test $DFT_LWR_MODEL = shared || \
18038    test $DFT_LWR_MODEL = libtool ; then
18039
18040 # remove dl library from $LIBS
18041 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
18042
18043 fi
18044 fi
18045 ### Set up low-level terminfo dependencies for makefiles.
18046
18047 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
18048 # do not need libdl
18049 TICS_LIST=
18050 if test "$with_dlsym" = yes ; then
18051
18052 # remove dl library from $SHLIB_LIST
18053 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
18054
18055 fi
18056
18057 if test "$with_ticlib" != no ; then
18058
18059         if test "$with_ticlib" != yes ; then
18060                 TICS_NAME=$with_ticlib
18061                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18062                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18063                 TICS_LIB_SUFFIX="${with_ticlib}"
18064         else
18065                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
18066                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
18067                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
18068         fi
18069         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
18070 else
18071         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18072 fi
18073
18074 if test "$with_termlib" != no ; then
18075
18076         if test "$with_termlib" != yes ; then
18077                 TINFO_NAME=$with_termlib
18078                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18079                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18080                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
18081                 TINFO_LIB_SUFFIX="${with_termlib}"
18082         else
18083                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18084                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
18085                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
18086                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
18087         fi
18088
18089         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18090         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
18091         if test "$DFT_LWR_MODEL" = "libtool"; then
18092                 TEST_ARGS="${TEST_DEPS}"
18093                 TEST_ARG2="${TEST_DEP2}"
18094                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18095                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
18096                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
18097         else
18098                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
18099                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
18100                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18101                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
18102                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
18103         fi
18104 else
18105         # the next lines are needed for linking libtic over libncurses
18106         TINFO_NAME=${LIB_NAME}
18107         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
18108         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
18109         if test "$with_tic_depends" = yes ; then
18110                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18111         else
18112                 TICS_LIST="$SHLIB_LIST"
18113         fi
18114
18115         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
18116 fi
18117
18118 if test "$DFT_LWR_MODEL" = shared ; then
18119         case $cf_cv_system_name in #(vi
18120         cygwin*)
18121                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
18122                 TINFO_SUFFIX=.dll
18123                 ;;
18124         esac
18125 fi
18126
18127 if test "$with_dlsym" = yes ; then
18128
18129 # remove dl library from $TICS_LIST
18130 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
18131
18132 fi
18133
18134 if test "$DFT_LWR_MODEL" = "libtool"; then
18135     OBJEXT=lo
18136 fi
18137
18138 # needed for Ada95
18139 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
18140
18141 case $DFT_LWR_MODEL in
18142 normal|debug|profile)
18143
18144 if test "$GCC" = yes ; then
18145         case $cf_cv_system_name in #(
18146         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
18147                 LDFLAGS_STATIC=
18148                 LDFLAGS_SHARED=
18149                 ;;
18150     *)  #( normally, except when broken
18151         LDFLAGS_STATIC=-static
18152         LDFLAGS_SHARED=-dynamic
18153         ;;
18154     esac
18155 else
18156         case $cf_cv_system_name in #(
18157         aix[456]*)      #( from ld manpage
18158                 LDFLAGS_STATIC=-bstatic
18159                 LDFLAGS_SHARED=-bdynamic
18160                 ;;
18161         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
18162                 # We could also use just "archive" and "shared".
18163                 LDFLAGS_STATIC=-Wl,-a,archive_shared
18164                 LDFLAGS_SHARED=-Wl,-a,shared_archive
18165                 ;;
18166         irix*)          #( from ld manpage IRIX64
18167                 LDFLAGS_STATIC=-Bstatic
18168                 LDFLAGS_SHARED=-Bdynamic
18169                 ;;
18170         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
18171                 # alternative "-oldstyle_liblookup" (not in cc manpage)
18172                 LDFLAGS_STATIC=-noso
18173                 LDFLAGS_SHARED=-so_archive
18174                 ;;
18175         solaris2*)
18176                 LDFLAGS_STATIC=-Bstatic
18177                 LDFLAGS_SHARED=-Bdynamic
18178                 ;;
18179         esac
18180 fi
18181
18182         ;;
18183 esac
18184
18185 echo "$as_me:18185: checking where we will install curses.h" >&5
18186 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
18187 test "$with_overwrite" = no && \
18188 test "x$includedir" = 'x${prefix}/include' && \
18189         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
18190 echo "$as_me:18190: result: $includedir" >&5
18191 echo "${ECHO_T}$includedir" >&6
18192
18193 ### Resolve a conflict between normal and wide-curses by forcing applications
18194 ### that will need libutf8 to add it to their configure script.
18195 if test "$with_overwrite" != no ; then
18196 if test "$NCURSES_LIBUTF8" = 1 ; then
18197         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
18198         { echo "$as_me:18198: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
18199 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
18200 fi
18201 fi
18202 WITH_OVERWRITE=$with_overwrite
18203
18204 # used to separate tack out of the tree
18205 NCURSES_TREE=
18206
18207 ### predefined stuff for the test programs
18208 cat >>confdefs.h <<\EOF
18209 #define HAVE_SLK_COLOR 1
18210 EOF
18211
18212 ### Construct the list of subdirectories for which we'll customize makefiles
18213 ### with the appropriate compile-rules.
18214
18215 echo "$as_me:18215: checking for src modules" >&5
18216 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
18217
18218 # dependencies and linker-arguments for test-programs
18219 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
18220 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
18221 if test "$DFT_LWR_MODEL" = "libtool"; then
18222         TEST_ARGS="${TEST_DEPS}"
18223         TEST_ARG2="${TEST_DEP2}"
18224 else
18225         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
18226         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
18227 fi
18228
18229 cf_cv_src_modules=
18230 for cf_dir in $modules_to_build
18231 do
18232         if test -f $srcdir/$cf_dir/modules; then
18233
18234                 # We may/may not have tack in the distribution, though the
18235                 # makefile is.
18236                 if test $cf_dir = tack ; then
18237                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
18238                                 continue
18239                         fi
18240                 fi
18241
18242                 if test -z "$cf_cv_src_modules"; then
18243                         cf_cv_src_modules=$cf_dir
18244                 else
18245                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
18246                 fi
18247
18248                 # Make the ncurses_cfg.h file record the library interface files as
18249                 # well.  These are header files that are the same name as their
18250                 # directory.  Ncurses is the only library that does not follow
18251                 # that pattern.
18252                 if test $cf_dir = tack ; then
18253                         continue
18254                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
18255
18256 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18257
18258                         cat >>confdefs.h <<EOF
18259 #define HAVE_${cf_have_include}_H 1
18260 EOF
18261
18262                         cat >>confdefs.h <<EOF
18263 #define HAVE_LIB${cf_have_include} 1
18264 EOF
18265
18266                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
18267                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
18268                         if test "$DFT_LWR_MODEL" = "libtool"; then
18269                                 TEST_ARGS="${TEST_DEPS}"
18270                                 TEST_ARG2="${TEST_DEP2}"
18271                         else
18272                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
18273                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
18274                         fi
18275                 fi
18276         fi
18277 done
18278 echo "$as_me:18278: result: $cf_cv_src_modules" >&5
18279 echo "${ECHO_T}$cf_cv_src_modules" >&6
18280
18281 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
18282 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
18283
18284 SRC_SUBDIRS=
18285 if test "x$cf_with_manpages" != xno ; then
18286         SRC_SUBDIRS="$SRC_SUBDIRS man"
18287 fi
18288 SRC_SUBDIRS="$SRC_SUBDIRS include"
18289 for cf_dir in $cf_cv_src_modules
18290 do
18291         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
18292 done
18293 SRC_SUBDIRS="$SRC_SUBDIRS test"
18294 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
18295 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
18296
18297 ADA_SUBDIRS=
18298 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
18299         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
18300         ADA_SUBDIRS="gen src samples"
18301 fi
18302
18303 SUB_MAKEFILES=
18304 for cf_dir in $SRC_SUBDIRS
18305 do
18306         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
18307 done
18308
18309 if test -n "$ADA_SUBDIRS"; then
18310         for cf_dir in $ADA_SUBDIRS
18311         do
18312                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
18313         done
18314
18315 fi
18316
18317 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
18318    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
18319    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
18320 fi
18321
18322 DIRS_TO_MAKE="lib"
18323 for cf_item in $cf_list_models
18324 do
18325
18326         case $cf_item in
18327         libtool) cf_subdir='obj_lo'  ;;
18328         normal)  cf_subdir='objects' ;;
18329         debug)   cf_subdir='obj_g' ;;
18330         profile) cf_subdir='obj_p' ;;
18331         shared)
18332                 case $cf_cv_system_name in #(vi
18333                 cygwin) #(vi
18334                         cf_subdir='objects' ;;
18335                 *)
18336                         cf_subdir='obj_s' ;;
18337                 esac
18338         esac
18339
18340         for cf_item2 in $DIRS_TO_MAKE
18341         do
18342                 test $cf_item2 = $cf_subdir && break
18343         done
18344         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
18345 done
18346 for cf_dir in $DIRS_TO_MAKE
18347 do
18348         test ! -d $cf_dir && mkdir $cf_dir
18349 done
18350
18351 # symbols that differ when compiling Ada95 by itself.
18352 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
18353
18354 NCURSES_COPY2='sh $(top_srcdir)/tar-copy.sh'
18355
18356 # values to use as strings
18357 cat >>confdefs.h <<EOF
18358 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
18359 EOF
18360
18361 cat >>confdefs.h <<EOF
18362 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
18363 EOF
18364
18365 ### Now that we're done running tests, add the compiler-warnings, if any
18366
18367 cf_fix_cppflags=no
18368 cf_new_cflags=
18369 cf_new_cppflags=
18370 cf_new_extra_cppflags=
18371
18372 for cf_add_cflags in $EXTRA_CFLAGS
18373 do
18374 case $cf_fix_cppflags in
18375 no)
18376         case $cf_add_cflags in #(vi
18377         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
18378                 case $cf_add_cflags in
18379                 -D*)
18380                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18381
18382                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18383                                 && test -z "${cf_tst_cflags}" \
18384                                 && cf_fix_cppflags=yes
18385
18386                         if test $cf_fix_cppflags = yes ; then
18387                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18388                                 continue
18389                         elif test "${cf_tst_cflags}" = "\"'" ; then
18390                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18391                                 continue
18392                         fi
18393                         ;;
18394                 esac
18395                 case "$CPPFLAGS" in
18396                 *$cf_add_cflags) #(vi
18397                         ;;
18398                 *) #(vi
18399                         case $cf_add_cflags in #(vi
18400                         -D*)
18401                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18402
18403 CPPFLAGS=`echo "$CPPFLAGS" | \
18404         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18405                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18406
18407                                 ;;
18408                         esac
18409                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
18410                         ;;
18411                 esac
18412                 ;;
18413         *)
18414                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
18415                 ;;
18416         esac
18417         ;;
18418 yes)
18419         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
18420
18421         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18422
18423         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
18424                 && test -z "${cf_tst_cflags}" \
18425                 && cf_fix_cppflags=no
18426         ;;
18427 esac
18428 done
18429
18430 if test -n "$cf_new_cflags" ; then
18431
18432         CFLAGS="$CFLAGS $cf_new_cflags"
18433 fi
18434
18435 if test -n "$cf_new_cppflags" ; then
18436
18437         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
18438 fi
18439
18440 if test -n "$cf_new_extra_cppflags" ; then
18441
18442         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
18443 fi
18444
18445 ### If we're building with rpath, try to link non-standard libs that way too.
18446 if test "$DFT_LWR_MODEL" = "shared"; then
18447
18448 echo "$as_me:18448: checking for updated LDFLAGS" >&5
18449 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
18450 if test -n "$LD_RPATH_OPT" ; then
18451         echo "$as_me:18451: result: maybe" >&5
18452 echo "${ECHO_T}maybe" >&6
18453
18454         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18455
18456 echo "${as_me-configure}:18456: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18457
18458 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
18459
18460 echo "${as_me-configure}:18460: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
18461
18462 cf_rpath_dst=
18463 for cf_rpath_src in $LDFLAGS
18464 do
18465         case $cf_rpath_src in #(vi
18466         -L*) #(vi
18467                 if test "$LD_RPATH_OPT" = "-R " ; then
18468                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18469                 else
18470                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18471                 fi
18472                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18473
18474 echo "${as_me-configure}:18474: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18475
18476                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18477                 ;;
18478         esac
18479         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18480 done
18481 LDFLAGS=$cf_rpath_dst
18482
18483 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
18484
18485 echo "${as_me-configure}:18485: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
18486
18487 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
18488
18489 echo "${as_me-configure}:18489: testing ...checking LIBS $LIBS ..." 1>&5
18490
18491 cf_rpath_dst=
18492 for cf_rpath_src in $LIBS
18493 do
18494         case $cf_rpath_src in #(vi
18495         -L*) #(vi
18496                 if test "$LD_RPATH_OPT" = "-R " ; then
18497                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
18498                 else
18499                         cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
18500                 fi
18501                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
18502
18503 echo "${as_me-configure}:18503: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
18504
18505                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
18506                 ;;
18507         esac
18508         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
18509 done
18510 LIBS=$cf_rpath_dst
18511
18512 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
18513
18514 echo "${as_me-configure}:18514: testing ...checked LIBS $LIBS ..." 1>&5
18515
18516         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
18517
18518 echo "${as_me-configure}:18518: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
18519
18520 fi
18521
18522 fi
18523
18524 ### Define substitutions for header files to avoid name-pollution
18525
18526 if test "$cf_cv_have_tcgetattr" = yes ; then
18527         HAVE_TCGETATTR=1
18528 else
18529         HAVE_TCGETATTR=0
18530 fi
18531
18532 if test "$ac_cv_header_termio_h" = yes ; then
18533         HAVE_TERMIO_H=1
18534 else
18535         HAVE_TERMIO_H=0
18536 fi
18537
18538 if test "$ac_cv_header_termios_h" = yes ; then
18539         HAVE_TERMIOS_H=1
18540 else
18541         HAVE_TERMIOS_H=0
18542 fi
18543
18544 ################################################################################
18545 test "$use_database" = yes && \
18546 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
18547
18548 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
18549 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
18550
18551 if test x"$enable_pc_files" = xyes ; then \
18552 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
18553 MAKE_PC_FILES=
18554 else
18555 MAKE_PC_FILES="#"
18556 fi
18557
18558 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"
18559 ac_config_commands="$ac_config_commands default"
18560 cat >confcache <<\_ACEOF
18561 # This file is a shell script that caches the results of configure
18562 # tests run on this system so they can be shared between configure
18563 # scripts and configure runs, see configure's option --config-cache.
18564 # It is not useful on other systems.  If it contains results you don't
18565 # want to keep, you may remove or edit it.
18566 #
18567 # config.status only pays attention to the cache file if you give it
18568 # the --recheck option to rerun configure.
18569 #
18570 # `ac_cv_env_foo' variables (set or unset) will be overriden when
18571 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18572 # following values.
18573
18574 _ACEOF
18575
18576 # The following way of writing the cache mishandles newlines in values,
18577 # but we know of no workaround that is simple, portable, and efficient.
18578 # So, don't put newlines in cache variables' values.
18579 # Ultrix sh set writes to stderr and can't be redirected directly,
18580 # and sets the high bit in the cache file unless we assign to the vars.
18581 {
18582   (set) 2>&1 |
18583     case `(ac_space=' '; set | grep ac_space) 2>&1` in
18584     *ac_space=\ *)
18585       # `set' does not quote correctly, so add quotes (double-quote
18586       # substitution turns \\\\ into \\, and sed turns \\ into \).
18587       sed -n \
18588         "s/'/'\\\\''/g;
18589           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18590       ;;
18591     *)
18592       # `set' quotes correctly as required by POSIX, so do not add quotes.
18593       sed -n \
18594         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
18595       ;;
18596     esac;
18597 } |
18598   sed '
18599      t clear
18600      : clear
18601      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18602      t end
18603      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18604      : end' >>confcache
18605 if cmp -s $cache_file confcache; then :; else
18606   if test -w $cache_file; then
18607     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
18608     cat confcache >$cache_file
18609   else
18610     echo "not updating unwritable cache $cache_file"
18611   fi
18612 fi
18613 rm -f confcache
18614
18615 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18616 # Let make expand exec_prefix.
18617 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18618
18619 # VPATH may cause trouble with some makes, so we remove $(srcdir),
18620 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
18621 # trailing colons and then remove the whole line if VPATH becomes empty
18622 # (actually we leave an empty line to preserve line numbers).
18623 if test "x$srcdir" = x.; then
18624   ac_vpsub='/^[         ]*VPATH[        ]*=/{
18625 s/:*\$(srcdir):*/:/;
18626 s/:*\${srcdir}:*/:/;
18627 s/:*@srcdir@:*/:/;
18628 s/^\([^=]*=[    ]*\):*/\1/;
18629 s/:*$//;
18630 s/^[^=]*=[      ]*$//;
18631 }'
18632 fi
18633
18634 DEFS=-DHAVE_CONFIG_H
18635
18636 : ${CONFIG_STATUS=./config.status}
18637 ac_clean_files_save=$ac_clean_files
18638 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18639 { echo "$as_me:18639: creating $CONFIG_STATUS" >&5
18640 echo "$as_me: creating $CONFIG_STATUS" >&6;}
18641 cat >$CONFIG_STATUS <<_ACEOF
18642 #! $SHELL
18643 # Generated automatically by configure.
18644 # Run this file to recreate the current configuration.
18645 # Compiler output produced by configure, useful for debugging
18646 # configure, is in config.log if it exists.
18647
18648 debug=false
18649 SHELL=\${CONFIG_SHELL-$SHELL}
18650 ac_cs_invocation="\$0 \$@"
18651
18652 _ACEOF
18653
18654 cat >>$CONFIG_STATUS <<\_ACEOF
18655 # Be Bourne compatible
18656 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
18657   emulate sh
18658   NULLCMD=:
18659 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
18660   set -o posix
18661 fi
18662
18663 # Name of the executable.
18664 as_me=`echo "$0" |sed 's,.*[\\/],,'`
18665
18666 if expr a : '\(a\)' >/dev/null 2>&1; then
18667   as_expr=expr
18668 else
18669   as_expr=false
18670 fi
18671
18672 rm -f conf$$ conf$$.exe conf$$.file
18673 echo >conf$$.file
18674 if ln -s conf$$.file conf$$ 2>/dev/null; then
18675   # We could just check for DJGPP; but this test a) works b) is more generic
18676   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
18677   if test -f conf$$.exe; then
18678     # Don't use ln at all; we don't have any links
18679     as_ln_s='cp -p'
18680   else
18681     as_ln_s='ln -s'
18682   fi
18683 elif ln conf$$.file conf$$ 2>/dev/null; then
18684   as_ln_s=ln
18685 else
18686   as_ln_s='cp -p'
18687 fi
18688 rm -f conf$$ conf$$.exe conf$$.file
18689
18690 as_executable_p="test -f"
18691
18692 # Support unset when possible.
18693 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
18694   as_unset=unset
18695 else
18696   as_unset=false
18697 fi
18698
18699 # NLS nuisances.
18700 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
18701 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
18702 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
18703 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
18704 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
18705 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
18706 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
18707 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
18708
18709 # IFS
18710 # We need space, tab and new line, in precisely that order.
18711 as_nl='
18712 '
18713 IFS="   $as_nl"
18714
18715 # CDPATH.
18716 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
18717
18718 exec 6>&1
18719
18720 _ACEOF
18721
18722 # Files that config.status was made for.
18723 if test -n "$ac_config_files"; then
18724   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
18725 fi
18726
18727 if test -n "$ac_config_headers"; then
18728   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
18729 fi
18730
18731 if test -n "$ac_config_links"; then
18732   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
18733 fi
18734
18735 if test -n "$ac_config_commands"; then
18736   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
18737 fi
18738
18739 cat >>$CONFIG_STATUS <<\EOF
18740
18741 ac_cs_usage="\
18742 \`$as_me' instantiates files from templates according to the
18743 current configuration.
18744
18745 Usage: $0 [OPTIONS] [FILE]...
18746
18747   -h, --help       print this help, then exit
18748   -V, --version    print version number, then exit
18749   -d, --debug      don't remove temporary files
18750       --recheck    update $as_me by reconfiguring in the same conditions
18751   --file=FILE[:TEMPLATE]
18752                    instantiate the configuration file FILE
18753   --header=FILE[:TEMPLATE]
18754                    instantiate the configuration header FILE
18755
18756 Configuration files:
18757 $config_files
18758
18759 Configuration headers:
18760 $config_headers
18761
18762 Configuration commands:
18763 $config_commands
18764
18765 Report bugs to <bug-autoconf@gnu.org>."
18766 EOF
18767
18768 cat >>$CONFIG_STATUS <<EOF
18769 ac_cs_version="\\
18770 config.status
18771 configured by $0, generated by GNU Autoconf 2.52.20100320,
18772   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
18773
18774 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
18775 Free Software Foundation, Inc.
18776 This config.status script is free software; the Free Software Foundation
18777 gives unlimited permission to copy, distribute and modify it."
18778 srcdir=$srcdir
18779 INSTALL="$INSTALL"
18780 EOF
18781
18782 cat >>$CONFIG_STATUS <<\EOF
18783 # If no file are specified by the user, then we need to provide default
18784 # value.  By we need to know if files were specified by the user.
18785 ac_need_defaults=:
18786 while test $# != 0
18787 do
18788   case $1 in
18789   --*=*)
18790     ac_option=`expr "x$1" : 'x\([^=]*\)='`
18791     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
18792     shift
18793     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
18794     shift
18795     ;;
18796   -*);;
18797   *) # This is not an option, so the user has probably given explicit
18798      # arguments.
18799      ac_need_defaults=false;;
18800   esac
18801
18802   case $1 in
18803   # Handling of the options.
18804 EOF
18805 cat >>$CONFIG_STATUS <<EOF
18806   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18807     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
18808     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
18809 EOF
18810 cat >>$CONFIG_STATUS <<\EOF
18811   --version | --vers* | -V )
18812     echo "$ac_cs_version"; exit 0 ;;
18813   --he | --h)
18814     # Conflict between --help and --header
18815     { { echo "$as_me:18815: error: ambiguous option: $1
18816 Try \`$0 --help' for more information." >&5
18817 echo "$as_me: error: ambiguous option: $1
18818 Try \`$0 --help' for more information." >&2;}
18819    { (exit 1); exit 1; }; };;
18820   --help | --hel | -h )
18821     echo "$ac_cs_usage"; exit 0 ;;
18822   --debug | --d* | -d )
18823     debug=: ;;
18824   --file | --fil | --fi | --f )
18825     shift
18826     CONFIG_FILES="$CONFIG_FILES $1"
18827     ac_need_defaults=false;;
18828   --header | --heade | --head | --hea )
18829     shift
18830     CONFIG_HEADERS="$CONFIG_HEADERS $1"
18831     ac_need_defaults=false;;
18832
18833   # This is an error.
18834   -*) { { echo "$as_me:18834: error: unrecognized option: $1
18835 Try \`$0 --help' for more information." >&5
18836 echo "$as_me: error: unrecognized option: $1
18837 Try \`$0 --help' for more information." >&2;}
18838    { (exit 1); exit 1; }; } ;;
18839
18840   *) ac_config_targets="$ac_config_targets $1" ;;
18841
18842   esac
18843   shift
18844 done
18845
18846 exec 5>>config.log
18847 cat >&5 << _ACEOF
18848
18849 ## ----------------------- ##
18850 ## Running config.status.  ##
18851 ## ----------------------- ##
18852
18853 This file was extended by $as_me 2.52.20100320, executed with
18854   CONFIG_FILES    = $CONFIG_FILES
18855   CONFIG_HEADERS  = $CONFIG_HEADERS
18856   CONFIG_LINKS    = $CONFIG_LINKS
18857   CONFIG_COMMANDS = $CONFIG_COMMANDS
18858   > $ac_cs_invocation
18859 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18860
18861 _ACEOF
18862 EOF
18863
18864 cat >>$CONFIG_STATUS <<EOF
18865 #
18866 # INIT-COMMANDS section.
18867 #
18868
18869 ### Special initialization commands, used to pass information from the
18870 ### configuration-run into config.status
18871
18872 AWK="$AWK"
18873 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
18874 DFT_LWR_MODEL="$DFT_LWR_MODEL"
18875 ECHO_LINK="$ECHO_LINK"
18876 LDCONFIG="$LDCONFIG"
18877 LIB_NAME="$LIB_NAME"
18878 LIB_SUBSETS="$LIB_SUBSETS"
18879 LIB_SUFFIX="$LIB_SUFFIX"
18880 LIB_TRACING="$LIB_TRACING"
18881 MAKE_TERMINFO="$MAKE_TERMINFO"
18882 NCURSES_MAJOR="$NCURSES_MAJOR"
18883 NCURSES_MINOR="$NCURSES_MINOR"
18884 NCURSES_OSPEED="$NCURSES_OSPEED"
18885 NCURSES_PATCH="$NCURSES_PATCH"
18886 SRC_SUBDIRS="$SRC_SUBDIRS"
18887 TERMINFO="$TERMINFO"
18888 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
18889 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
18890 TICS_NAME="$TICS_NAME"
18891 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
18892 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
18893 TINFO_NAME="$TINFO_NAME"
18894 TINFO_SUFFIX="$TINFO_SUFFIX"
18895 WITH_CURSES_H="$with_curses_h"
18896 WITH_ECHO="$with_echo"
18897 WITH_OVERWRITE="$with_overwrite"
18898 cf_LIST_MODELS="$cf_list_models"
18899 cf_cv_abi_version="$cf_cv_abi_version"
18900 cf_cv_do_relink="$cf_cv_do_relink"
18901 cf_cv_do_symlinks="$cf_cv_do_symlinks"
18902 cf_cv_enable_lp64="$cf_cv_enable_lp64"
18903 cf_cv_enable_opaque="$cf_cv_enable_opaque"
18904 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
18905 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
18906 cf_cv_rel_version="$cf_cv_rel_version"
18907 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
18908 cf_cv_shared_soname='$cf_cv_shared_soname'
18909 cf_cv_shlib_version="$cf_cv_shlib_version"
18910 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
18911 cf_cv_system_name="$cf_cv_system_name"
18912 cf_with_cxx_binding="$cf_with_cxx_binding"
18913 cf_with_manpages="$cf_with_manpages"
18914 host="$host"
18915 target="$target"
18916
18917 EOF
18918
18919 cat >>$CONFIG_STATUS <<\EOF
18920 for ac_config_target in $ac_config_targets
18921 do
18922   case "$ac_config_target" in
18923   # Handling of arguments.
18924   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
18925   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
18926   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
18927   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
18928   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
18929   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
18930   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18931   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
18932   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
18933   *) { { echo "$as_me:18933: error: invalid argument: $ac_config_target" >&5
18934 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
18935    { (exit 1); exit 1; }; };;
18936   esac
18937 done
18938
18939 # If the user did not use the arguments to specify the items to instantiate,
18940 # then the envvar interface is used.  Set only those that are not.
18941 # We use the long form for the default assignment because of an extremely
18942 # bizarre bug on SunOS 4.1.3.
18943 if $ac_need_defaults; then
18944   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18945   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18946   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
18947 fi
18948
18949 # Create a temporary directory, and hook for its removal unless debugging.
18950 $debug ||
18951 {
18952   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
18953   trap '{ (exit 1); exit 1; }' 1 2 13 15
18954 }
18955
18956 # Create a (secure) tmp directory for tmp files.
18957 : ${TMPDIR=/tmp}
18958 {
18959   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
18960   test -n "$tmp" && test -d "$tmp"
18961 }  ||
18962 {
18963   tmp=$TMPDIR/cs$$-$RANDOM
18964   (umask 077 && mkdir $tmp)
18965 } ||
18966 {
18967    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
18968    { (exit 1); exit 1; }
18969 }
18970
18971 EOF
18972
18973 cat >>$CONFIG_STATUS <<EOF
18974
18975 #
18976 # CONFIG_FILES section.
18977 #
18978
18979 # No need to generate the scripts if there are no CONFIG_FILES.
18980 # This happens for instance when ./config.status config.h
18981 if test -n "\$CONFIG_FILES"; then
18982   # Protect against being on the right side of a sed subst in config.status.
18983   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
18984    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
18985 s,@SHELL@,$SHELL,;t t
18986 s,@exec_prefix@,$exec_prefix,;t t
18987 s,@prefix@,$prefix,;t t
18988 s,@program_transform_name@,$program_transform_name,;t t
18989 s,@bindir@,$bindir,;t t
18990 s,@sbindir@,$sbindir,;t t
18991 s,@libexecdir@,$libexecdir,;t t
18992 s,@datadir@,$datadir,;t t
18993 s,@sysconfdir@,$sysconfdir,;t t
18994 s,@sharedstatedir@,$sharedstatedir,;t t
18995 s,@localstatedir@,$localstatedir,;t t
18996 s,@libdir@,$libdir,;t t
18997 s,@includedir@,$includedir,;t t
18998 s,@oldincludedir@,$oldincludedir,;t t
18999 s,@infodir@,$infodir,;t t
19000 s,@mandir@,$mandir,;t t
19001 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
19002 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
19003 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
19004 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
19005 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
19006 s,@build_alias@,$build_alias,;t t
19007 s,@host_alias@,$host_alias,;t t
19008 s,@target_alias@,$target_alias,;t t
19009 s,@ECHO_C@,$ECHO_C,;t t
19010 s,@ECHO_N@,$ECHO_N,;t t
19011 s,@ECHO_T@,$ECHO_T,;t t
19012 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
19013 s,@DEFS@,$DEFS,;t t
19014 s,@LIBS@,$LIBS,;t t
19015 s,@top_builddir@,$top_builddir,;t t
19016 s,@EGREP@,$EGREP,;t t
19017 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
19018 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
19019 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
19020 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
19021 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
19022 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
19023 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
19024 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
19025 s,@build@,$build,;t t
19026 s,@build_cpu@,$build_cpu,;t t
19027 s,@build_vendor@,$build_vendor,;t t
19028 s,@build_os@,$build_os,;t t
19029 s,@host@,$host,;t t
19030 s,@host_cpu@,$host_cpu,;t t
19031 s,@host_vendor@,$host_vendor,;t t
19032 s,@host_os@,$host_os,;t t
19033 s,@target@,$target,;t t
19034 s,@target_cpu@,$target_cpu,;t t
19035 s,@target_vendor@,$target_vendor,;t t
19036 s,@target_os@,$target_os,;t t
19037 s,@CC@,$CC,;t t
19038 s,@CFLAGS@,$CFLAGS,;t t
19039 s,@LDFLAGS@,$LDFLAGS,;t t
19040 s,@CPPFLAGS@,$CPPFLAGS,;t t
19041 s,@ac_ct_CC@,$ac_ct_CC,;t t
19042 s,@EXEEXT@,$EXEEXT,;t t
19043 s,@OBJEXT@,$OBJEXT,;t t
19044 s,@CPP@,$CPP,;t t
19045 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
19046 s,@PROG_EXT@,$PROG_EXT,;t t
19047 s,@LDCONFIG@,$LDCONFIG,;t t
19048 s,@CXX@,$CXX,;t t
19049 s,@CXXFLAGS@,$CXXFLAGS,;t t
19050 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
19051 s,@AWK@,$AWK,;t t
19052 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
19053 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
19054 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
19055 s,@LINT@,$LINT,;t t
19056 s,@LINT_OPTS@,$LINT_OPTS,;t t
19057 s,@LN_S@,$LN_S,;t t
19058 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
19059 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
19060 s,@SET_MAKE@,$SET_MAKE,;t t
19061 s,@CTAGS@,$CTAGS,;t t
19062 s,@ETAGS@,$ETAGS,;t t
19063 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
19064 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
19065 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
19066 s,@RANLIB@,$RANLIB,;t t
19067 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
19068 s,@LD@,$LD,;t t
19069 s,@ac_ct_LD@,$ac_ct_LD,;t t
19070 s,@AR@,$AR,;t t
19071 s,@ac_ct_AR@,$ac_ct_AR,;t t
19072 s,@ARFLAGS@,$ARFLAGS,;t t
19073 s,@DESTDIR@,$DESTDIR,;t t
19074 s,@BUILD_CC@,$BUILD_CC,;t t
19075 s,@BUILD_CPP@,$BUILD_CPP,;t t
19076 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
19077 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
19078 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
19079 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
19080 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
19081 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
19082 s,@cf_list_models@,$cf_list_models,;t t
19083 s,@LIBTOOL@,$LIBTOOL,;t t
19084 s,@LT_UNDEF@,$LT_UNDEF,;t t
19085 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
19086 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
19087 s,@LIB_CREATE@,$LIB_CREATE,;t t
19088 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
19089 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
19090 s,@LIB_PREP@,$LIB_PREP,;t t
19091 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
19092 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
19093 s,@LIB_LINK@,$LIB_LINK,;t t
19094 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
19095 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
19096 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
19097 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
19098 s,@TICS_NAME@,$TICS_NAME,;t t
19099 s,@TINFO_NAME@,$TINFO_NAME,;t t
19100 s,@LIB_NAME@,$LIB_NAME,;t t
19101 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
19102 s,@CC_G_OPT@,$CC_G_OPT,;t t
19103 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
19104 s,@LD_MODEL@,$LD_MODEL,;t t
19105 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
19106 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
19107 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
19108 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
19109 s,@LINK_PROGS@,$LINK_PROGS,;t t
19110 s,@LINK_TESTS@,$LINK_TESTS,;t t
19111 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
19112 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
19113 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
19114 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
19115 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
19116 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
19117 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
19118 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
19119 s,@TERMINFO@,$TERMINFO,;t t
19120 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
19121 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
19122 s,@TERMPATH@,$TERMPATH,;t t
19123 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
19124 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
19125 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
19126 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
19127 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
19128 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
19129 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
19130 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
19131 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
19132 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
19133 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
19134 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
19135 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
19136 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
19137 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
19138 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
19139 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
19140 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
19141 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
19142 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
19143 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
19144 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
19145 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
19146 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
19147 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
19148 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
19149 s,@PTHREAD@,$PTHREAD,;t t
19150 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
19151 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
19152 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
19153 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
19154 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
19155 s,@ECHO_LINK@,$ECHO_LINK,;t t
19156 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
19157 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
19158 s,@ADA_TRACE@,$ADA_TRACE,;t t
19159 s,@MATH_LIB@,$MATH_LIB,;t t
19160 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
19161 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
19162 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
19163 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
19164 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
19165 s,@TEST_LIBS@,$TEST_LIBS,;t t
19166 s,@CXXCPP@,$CXXCPP,;t t
19167 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
19168 s,@CXX_AR@,$CXX_AR,;t t
19169 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
19170 s,@CXXLIBS@,$CXXLIBS,;t t
19171 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
19172 s,@gnat_exists@,$gnat_exists,;t t
19173 s,@M4_exists@,$M4_exists,;t t
19174 s,@cf_ada_make@,$cf_ada_make,;t t
19175 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
19176 s,@cf_ada_package@,$cf_ada_package,;t t
19177 s,@ADAFLAGS@,$ADAFLAGS,;t t
19178 s,@cf_compile_generics@,$cf_compile_generics,;t t
19179 s,@cf_generic_objects@,$cf_generic_objects,;t t
19180 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
19181 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
19182 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
19183 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
19184 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
19185 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
19186 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
19187 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
19188 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
19189 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
19190 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
19191 s,@TICS_ARGS@,$TICS_ARGS,;t t
19192 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
19193 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
19194 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
19195 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
19196 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
19197 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
19198 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
19199 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
19200 s,@TICS_LIST@,$TICS_LIST,;t t
19201 s,@TINFO_LIST@,$TINFO_LIST,;t t
19202 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
19203 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
19204 s,@TEST_ARGS@,$TEST_ARGS,;t t
19205 s,@TEST_DEPS@,$TEST_DEPS,;t t
19206 s,@TEST_ARG2@,$TEST_ARG2,;t t
19207 s,@TEST_DEP2@,$TEST_DEP2,;t t
19208 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
19209 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
19210 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
19211 s,@NCURSES_COPY2@,$NCURSES_COPY2,;t t
19212 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
19213 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
19214 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
19215 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
19216 s,@cross_compiling@,$cross_compiling,;t t
19217 CEOF
19218
19219 EOF
19220
19221   cat >>$CONFIG_STATUS <<\EOF
19222   # Split the substitutions into bite-sized pieces for seds with
19223   # small command number limits, like on Digital OSF/1 and HP-UX.
19224   ac_max_sed_lines=48
19225   ac_sed_frag=1 # Number of current file.
19226   ac_beg=1 # First line for current file.
19227   ac_end=$ac_max_sed_lines # Line after last line for current file.
19228   ac_more_lines=:
19229   ac_sed_cmds=
19230   while $ac_more_lines; do
19231     if test $ac_beg -gt 1; then
19232       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19233     else
19234       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
19235     fi
19236     if test ! -s $tmp/subs.frag; then
19237       ac_more_lines=false
19238     else
19239       # The purpose of the label and of the branching condition is to
19240       # speed up the sed processing (if there are no `@' at all, there
19241       # is no need to browse any of the substitutions).
19242       # These are the two extra sed commands mentioned above.
19243       (echo ':t
19244   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
19245       if test -z "$ac_sed_cmds"; then
19246         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
19247       else
19248         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
19249       fi
19250       ac_sed_frag=`expr $ac_sed_frag + 1`
19251       ac_beg=$ac_end
19252       ac_end=`expr $ac_end + $ac_max_sed_lines`
19253     fi
19254   done
19255   if test -z "$ac_sed_cmds"; then
19256     ac_sed_cmds=cat
19257   fi
19258 fi # test -n "$CONFIG_FILES"
19259
19260 EOF
19261 cat >>$CONFIG_STATUS <<\EOF
19262 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
19263   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19264   case $ac_file in
19265   - | *:- | *:-:* ) # input from stdin
19266         cat >$tmp/stdin
19267         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19268         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19269   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19270         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19271   * )   ac_file_in=$ac_file.in ;;
19272   esac
19273
19274   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
19275   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19276          X"$ac_file" : 'X\(//\)[^/]' \| \
19277          X"$ac_file" : 'X\(//\)$' \| \
19278          X"$ac_file" : 'X\(/\)' \| \
19279          .     : '\(.\)' 2>/dev/null ||
19280 echo X"$ac_file" |
19281     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19282           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19283           /^X\(\/\/\)$/{ s//\1/; q; }
19284           /^X\(\/\).*/{ s//\1/; q; }
19285           s/.*/./; q'`
19286   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19287     { case "$ac_dir" in
19288   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19289   *)                      as_incr_dir=.;;
19290 esac
19291 as_dummy="$ac_dir"
19292 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19293   case $as_mkdir_dir in
19294     # Skip DOS drivespec
19295     ?:) as_incr_dir=$as_mkdir_dir ;;
19296     *)
19297       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19298       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19299     ;;
19300   esac
19301 done; }
19302
19303     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
19304     # A "../" for each directory in $ac_dir_suffix.
19305     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
19306   else
19307     ac_dir_suffix= ac_dots=
19308   fi
19309
19310   case $srcdir in
19311   .)  ac_srcdir=.
19312       if test -z "$ac_dots"; then
19313          ac_top_srcdir=.
19314       else
19315          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
19316       fi ;;
19317   [\\/]* | ?:[\\/]* )
19318       ac_srcdir=$srcdir$ac_dir_suffix;
19319       ac_top_srcdir=$srcdir ;;
19320   *) # Relative path.
19321     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
19322     ac_top_srcdir=$ac_dots$srcdir ;;
19323   esac
19324
19325   case $INSTALL in
19326   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19327   *) ac_INSTALL=$ac_dots$INSTALL ;;
19328   esac
19329
19330   if test x"$ac_file" != x-; then
19331     { echo "$as_me:19331: creating $ac_file" >&5
19332 echo "$as_me: creating $ac_file" >&6;}
19333     rm -f "$ac_file"
19334   fi
19335   # Let's still pretend it is `configure' which instantiates (i.e., don't
19336   # use $as_me), people would be surprised to read:
19337   #    /* config.h.  Generated automatically by config.status.  */
19338   configure_input="Generated automatically from `echo $ac_file_in |
19339                                                  sed 's,.*/,,'` by configure."
19340
19341   # First look for the input files in the build tree, otherwise in the
19342   # src tree.
19343   ac_file_inputs=`IFS=:
19344     for f in $ac_file_in; do
19345       case $f in
19346       -) echo $tmp/stdin ;;
19347       [\\/$]*)
19348          # Absolute (can't be DOS-style, as IFS=:)
19349          test -f "$f" || { { echo "$as_me:19349: error: cannot find input file: $f" >&5
19350 echo "$as_me: error: cannot find input file: $f" >&2;}
19351    { (exit 1); exit 1; }; }
19352          echo $f;;
19353       *) # Relative
19354          if test -f "$f"; then
19355            # Build tree
19356            echo $f
19357          elif test -f "$srcdir/$f"; then
19358            # Source tree
19359            echo $srcdir/$f
19360          else
19361            # /dev/null tree
19362            { { echo "$as_me:19362: error: cannot find input file: $f" >&5
19363 echo "$as_me: error: cannot find input file: $f" >&2;}
19364    { (exit 1); exit 1; }; }
19365          fi;;
19366       esac
19367     done` || { (exit 1); exit 1; }
19368 EOF
19369 cat >>$CONFIG_STATUS <<EOF
19370   sed "$ac_vpsub
19371 $extrasub
19372 EOF
19373 cat >>$CONFIG_STATUS <<\EOF
19374 :t
19375 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19376 s,@configure_input@,$configure_input,;t t
19377 s,@srcdir@,$ac_srcdir,;t t
19378 s,@top_srcdir@,$ac_top_srcdir,;t t
19379 s,@INSTALL@,$ac_INSTALL,;t t
19380 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
19381   rm -f $tmp/stdin
19382   if test x"$ac_file" != x-; then
19383     mv $tmp/out $ac_file
19384   else
19385     cat $tmp/out
19386     rm -f $tmp/out
19387   fi
19388
19389 done
19390 EOF
19391 cat >>$CONFIG_STATUS <<\EOF
19392
19393 #
19394 # CONFIG_HEADER section.
19395 #
19396
19397 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
19398 # NAME is the cpp macro being defined and VALUE is the value it is being given.
19399 #
19400 # ac_d sets the value in "#define NAME VALUE" lines.
19401 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
19402 ac_dB='[        ].*$,\1#\2'
19403 ac_dC=' '
19404 ac_dD=',;t'
19405 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
19406 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19407 ac_iB='\([      ]\),\1#\2define\3'
19408 ac_iC=' '
19409 ac_iD='\4,;t'
19410 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
19411 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
19412 ac_uB='$,\1#\2define\3'
19413 ac_uC=' '
19414 ac_uD=',;t'
19415
19416 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
19417   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
19418   case $ac_file in
19419   - | *:- | *:-:* ) # input from stdin
19420         cat >$tmp/stdin
19421         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19422         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19423   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
19424         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
19425   * )   ac_file_in=$ac_file.in ;;
19426   esac
19427
19428   test x"$ac_file" != x- && { echo "$as_me:19428: creating $ac_file" >&5
19429 echo "$as_me: creating $ac_file" >&6;}
19430
19431   # First look for the input files in the build tree, otherwise in the
19432   # src tree.
19433   ac_file_inputs=`IFS=:
19434     for f in $ac_file_in; do
19435       case $f in
19436       -) echo $tmp/stdin ;;
19437       [\\/$]*)
19438          # Absolute (can't be DOS-style, as IFS=:)
19439          test -f "$f" || { { echo "$as_me:19439: error: cannot find input file: $f" >&5
19440 echo "$as_me: error: cannot find input file: $f" >&2;}
19441    { (exit 1); exit 1; }; }
19442          echo $f;;
19443       *) # Relative
19444          if test -f "$f"; then
19445            # Build tree
19446            echo $f
19447          elif test -f "$srcdir/$f"; then
19448            # Source tree
19449            echo $srcdir/$f
19450          else
19451            # /dev/null tree
19452            { { echo "$as_me:19452: error: cannot find input file: $f" >&5
19453 echo "$as_me: error: cannot find input file: $f" >&2;}
19454    { (exit 1); exit 1; }; }
19455          fi;;
19456       esac
19457     done` || { (exit 1); exit 1; }
19458   # Remove the trailing spaces.
19459   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
19460
19461 EOF
19462
19463 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
19464 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
19465 # be either 'cat' or 'sort'.
19466 cat confdefs.h | uniq >conftest.vals
19467
19468 # Break up conftest.vals because some shells have a limit on
19469 # the size of here documents, and old seds have small limits too.
19470
19471 rm -f conftest.tail
19472 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
19473 while grep . conftest.vals >/dev/null
19474 do
19475   # Write chunks of a limited-size here document to conftest.frag.
19476   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
19477   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
19478   echo 'CEOF' >> $CONFIG_STATUS
19479   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
19480   rm -f conftest.vals
19481   mv conftest.tail conftest.vals
19482 done
19483 rm -f conftest.vals
19484
19485 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
19486 # marker @DEFS@.
19487 echo '  cat >> conftest.edit <<CEOF
19488 /@DEFS@/r conftest.frag
19489 /@DEFS@/d
19490 CEOF
19491 sed -f conftest.edit $tmp/in > $tmp/out
19492 rm -f $tmp/in
19493 mv $tmp/out $tmp/in
19494 rm -f conftest.edit conftest.frag
19495 ' >> $CONFIG_STATUS
19496
19497 cat >>$CONFIG_STATUS <<\EOF
19498   # Let's still pretend it is `configure' which instantiates (i.e., don't
19499   # use $as_me), people would be surprised to read:
19500   #    /* config.h.  Generated automatically by config.status.  */
19501   if test x"$ac_file" = x-; then
19502     echo "/* Generated automatically by configure.  */" >$tmp/config.h
19503   else
19504     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
19505   fi
19506   cat $tmp/in >>$tmp/config.h
19507   rm -f $tmp/in
19508   if test x"$ac_file" != x-; then
19509     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
19510       { echo "$as_me:19510: $ac_file is unchanged" >&5
19511 echo "$as_me: $ac_file is unchanged" >&6;}
19512     else
19513       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19514          X"$ac_file" : 'X\(//\)[^/]' \| \
19515          X"$ac_file" : 'X\(//\)$' \| \
19516          X"$ac_file" : 'X\(/\)' \| \
19517          .     : '\(.\)' 2>/dev/null ||
19518 echo X"$ac_file" |
19519     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
19520           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
19521           /^X\(\/\/\)$/{ s//\1/; q; }
19522           /^X\(\/\).*/{ s//\1/; q; }
19523           s/.*/./; q'`
19524       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
19525         { case "$ac_dir" in
19526   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
19527   *)                      as_incr_dir=.;;
19528 esac
19529 as_dummy="$ac_dir"
19530 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
19531   case $as_mkdir_dir in
19532     # Skip DOS drivespec
19533     ?:) as_incr_dir=$as_mkdir_dir ;;
19534     *)
19535       as_incr_dir=$as_incr_dir/$as_mkdir_dir
19536       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
19537     ;;
19538   esac
19539 done; }
19540
19541       fi
19542       rm -f $ac_file
19543       mv $tmp/config.h $ac_file
19544     fi
19545   else
19546     cat $tmp/config.h
19547     rm -f $tmp/config.h
19548   fi
19549 done
19550 EOF
19551 cat >>$CONFIG_STATUS <<\EOF
19552
19553 #
19554 # CONFIG_COMMANDS section.
19555 #
19556 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
19557   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
19558   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
19559
19560   case $ac_dest in
19561     default )
19562
19563 for cf_dir in test
19564 do
19565         if test ! -d $srcdir/$cf_dir; then
19566                 continue
19567         elif test -f $srcdir/$cf_dir/programs; then
19568                 $AWK -f $srcdir/test/mk-test.awk ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
19569         fi
19570 done
19571
19572         case $cf_cv_system_name in #(vi
19573         OS/2*|os2*) #(vi
19574         LIB_PREFIX=''
19575         ;;
19576         *)      LIB_PREFIX='lib'
19577         ;;
19578         esac
19579 cf_prefix=$LIB_PREFIX
19580
19581 if test $cf_cv_shlib_version = cygdll ; then
19582         TINFO_NAME=$TINFO_ARG_SUFFIX
19583         TINFO_SUFFIX=.dll
19584 fi
19585
19586 for cf_dir in $SRC_SUBDIRS
19587 do
19588         if test ! -d $srcdir/$cf_dir ; then
19589                 continue
19590         elif test -f $srcdir/$cf_dir/modules; then
19591
19592                 SHARED_LIB=
19593                 LIBS_TO_MAKE=
19594                 for cf_item in $cf_LIST_MODELS
19595                 do
19596
19597         case $cf_item in #(vi
19598         libtool) #(vi
19599                 cf_suffix='.la'
19600                 cf_depsuf=$cf_suffix
19601                 ;;
19602         normal) #(vi
19603                 cf_suffix='.a'
19604                 cf_depsuf=$cf_suffix
19605                 ;;
19606         debug) #(vi
19607                 cf_suffix='_g.a'
19608                 cf_depsuf=$cf_suffix
19609                 ;;
19610         profile) #(vi
19611                 cf_suffix='_p.a'
19612                 cf_depsuf=$cf_suffix
19613                 ;;
19614         shared) #(vi
19615                 case $cf_cv_system_name in
19616                 aix[56]*) #(vi
19617                         cf_suffix='.a'
19618                         cf_depsuf=$cf_suffix
19619                         ;;
19620                 cygwin*) #(vi
19621                         cf_suffix='.dll'
19622                         cf_depsuf='.dll.a'
19623                         ;;
19624                 darwin*) #(vi
19625                         cf_suffix='.dylib'
19626                         cf_depsuf=$cf_suffix
19627                         ;;
19628                 hpux*) #(vi
19629                         case $target in
19630                         ia64*) #(vi
19631                                 cf_suffix='.so'
19632                                 cf_depsuf=$cf_suffix
19633                                 ;;
19634                         *) #(vi
19635                                 cf_suffix='.sl'
19636                                 cf_depsuf=$cf_suffix
19637                                 ;;
19638                         esac
19639                         ;;
19640                 *)      cf_suffix='.so'
19641                         cf_depsuf=$cf_suffix
19642                         ;;
19643                 esac
19644         esac
19645         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19646         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19647
19648                         if test $cf_item = shared ; then
19649                         if test "$cf_cv_do_symlinks" = yes ; then
19650                                 case "$cf_cv_shlib_version" in #(vi
19651                                 rel) #(vi
19652                                         case "$cf_cv_system_name" in #(vi
19653                                         darwin*)
19654                                         case .${LIB_SUFFIX} in
19655                                         .w*)
19656                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19657                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
19658                                                 ;;
19659                                         *)
19660                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
19661                                                 ;;
19662                                         esac
19663                                         ;; #(vi
19664                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
19665                                         esac
19666                                         ;;
19667                                 abi)
19668                                         case "$cf_cv_system_name" in #(vi
19669                                         darwin*)
19670                                         case .${LIB_SUFFIX} in
19671                                         .w*)
19672                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19673                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
19674                                                 ;;
19675                                         *)
19676                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
19677                                                 ;;
19678                                         esac
19679                                         ;; #(vi
19680                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
19681                                         esac
19682                                         ;;
19683                                 esac
19684                         fi
19685                         # cygwin needs import library, and has unique naming convention
19686                         # use autodetected ${cf_prefix} for import lib and static lib, but
19687                         # use 'cyg' prefix for shared lib.
19688                         if test $cf_cv_shlib_version = cygdll ; then
19689                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
19690                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
19691                                 continue
19692                         fi
19693                         fi
19694                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
19695                 done
19696
19697                 if test $cf_dir = ncurses ; then
19698                         cf_subsets="$LIB_SUBSETS"
19699                         cf_r_parts="$cf_subsets"
19700                         cf_liblist="$LIBS_TO_MAKE"
19701
19702                         while test -n "$cf_r_parts"
19703                         do
19704                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
19705                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
19706                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
19707                                         cf_item=
19708                                         case $cf_l_parts in #(vi
19709                                         *termlib*) #(vi
19710                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
19711                                                 ;;
19712                                         *ticlib*)
19713                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
19714                                                 ;;
19715                                         *)
19716                                                 break
19717                                                 ;;
19718                                         esac
19719                                         if test -n "$cf_item"; then
19720                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
19721                                         fi
19722                                 else
19723                                         break
19724                                 fi
19725                         done
19726                 else
19727                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
19728                 fi
19729
19730                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
19731                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
19732                         $cf_dir/Makefile >$cf_dir/Makefile.out
19733                 mv $cf_dir/Makefile.out $cf_dir/Makefile
19734
19735                 $AWK -f $srcdir/mk-0th.awk \
19736                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
19737                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19738
19739                 for cf_subset in $cf_subsets
19740                 do
19741                         cf_subdirs=
19742                         for cf_item in $cf_LIST_MODELS
19743                         do
19744                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
19745
19746 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19747
19748         case $cf_item in #(vi
19749         libtool) #(vi
19750                 cf_suffix='.la'
19751                 cf_depsuf=$cf_suffix
19752                 ;;
19753         normal) #(vi
19754                 cf_suffix='.a'
19755                 cf_depsuf=$cf_suffix
19756                 ;;
19757         debug) #(vi
19758                 cf_suffix='_g.a'
19759                 cf_depsuf=$cf_suffix
19760                 ;;
19761         profile) #(vi
19762                 cf_suffix='_p.a'
19763                 cf_depsuf=$cf_suffix
19764                 ;;
19765         shared) #(vi
19766                 case $cf_cv_system_name in
19767                 aix[56]*) #(vi
19768                         cf_suffix='.a'
19769                         cf_depsuf=$cf_suffix
19770                         ;;
19771                 cygwin*) #(vi
19772                         cf_suffix='.dll'
19773                         cf_depsuf='.dll.a'
19774                         ;;
19775                 darwin*) #(vi
19776                         cf_suffix='.dylib'
19777                         cf_depsuf=$cf_suffix
19778                         ;;
19779                 hpux*) #(vi
19780                         case $target in
19781                         ia64*) #(vi
19782                                 cf_suffix='.so'
19783                                 cf_depsuf=$cf_suffix
19784                                 ;;
19785                         *) #(vi
19786                                 cf_suffix='.sl'
19787                                 cf_depsuf=$cf_suffix
19788                                 ;;
19789                         esac
19790                         ;;
19791                 *)      cf_suffix='.so'
19792                         cf_depsuf=$cf_suffix
19793                         ;;
19794                 esac
19795         esac
19796         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
19797         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
19798
19799         case $cf_item in
19800         libtool) cf_subdir='obj_lo'  ;;
19801         normal)  cf_subdir='objects' ;;
19802         debug)   cf_subdir='obj_g' ;;
19803         profile) cf_subdir='obj_p' ;;
19804         shared)
19805                 case $cf_cv_system_name in #(vi
19806                 cygwin) #(vi
19807                         cf_subdir='objects' ;;
19808                 *)
19809                         cf_subdir='obj_s' ;;
19810                 esac
19811         esac
19812
19813                         # Test for case where we build libtinfo with a different name.
19814                         cf_libname=$cf_dir
19815                         if test $cf_dir = ncurses ; then
19816                                 case $cf_subset in
19817                                 *base*)
19818                                         cf_libname=${cf_libname}$LIB_SUFFIX
19819                                         ;;
19820                                 *termlib*)
19821                                         cf_libname=$TINFO_LIB_SUFFIX
19822                                         ;;
19823                                 ticlib*)
19824                                         cf_libname=$TICS_LIB_SUFFIX
19825                                         ;;
19826                                 esac
19827                         else
19828                                 cf_libname=${cf_libname}$LIB_SUFFIX
19829                         fi
19830                         if test -n "${DFT_ARG_SUFFIX}" ; then
19831                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
19832                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
19833                         fi
19834
19835                         # These dependencies really are for development, not
19836                         # builds, but they are useful in porting, too.
19837                         cf_depend="../include/ncurses_cfg.h"
19838                         if test "$srcdir" = "."; then
19839                                 cf_reldir="."
19840                         else
19841                                 cf_reldir="\${srcdir}"
19842                         fi
19843
19844                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
19845                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
19846                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
19847                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
19848                         fi
19849
19850                         cf_dir_suffix=
19851                         old_cf_suffix="$cf_suffix"
19852                         if test "$cf_cv_shlib_version_infix" = yes ; then
19853                         if test -n "$LIB_SUFFIX" ; then
19854                                 case $LIB_SUFFIX in
19855                                 w*)
19856                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
19857                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
19858                                         cf_dir_suffix=w
19859                                         ;;
19860                                 esac
19861                         fi
19862                         fi
19863
19864                         $AWK -f $srcdir/mk-1st.awk \
19865                                 name=${cf_libname}${cf_dir_suffix} \
19866                                 traces=$LIB_TRACING \
19867                                 MODEL=$cf_ITEM \
19868                                 model=$cf_subdir \
19869                                 prefix=$cf_prefix \
19870                                 suffix=$cf_suffix \
19871                                 subset=$cf_subset \
19872                                 TermlibRoot=$TINFO_NAME \
19873                                 TermlibSuffix=$TINFO_SUFFIX \
19874                                 ShlibVer=$cf_cv_shlib_version \
19875                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
19876                                 ReLink=${cf_cv_do_relink-no} \
19877                                 DoLinks=$cf_cv_do_symlinks \
19878                                 rmSoLocs=$cf_cv_rm_so_locs \
19879                                 ldconfig="$LDCONFIG" \
19880                                 overwrite=$WITH_OVERWRITE \
19881                                 depend="$cf_depend" \
19882                                 host="$host" \
19883                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19884
19885                         cf_suffix="$old_cf_suffix"
19886
19887                         for cf_subdir2 in $cf_subdirs lib
19888                         do
19889                                 test $cf_subdir = $cf_subdir2 && break
19890                         done
19891                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
19892                         $AWK -f $srcdir/mk-2nd.awk \
19893                                 name=$cf_dir \
19894                                 traces=$LIB_TRACING \
19895                                 MODEL=$cf_ITEM \
19896                                 model=$cf_subdir \
19897                                 subset=$cf_subset \
19898                                 srcdir=$srcdir \
19899                                 echo=$WITH_ECHO \
19900                                 crenames=$cf_cv_prog_CC_c_o \
19901                                 cxxrenames=$cf_cv_prog_CXX_c_o \
19902                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
19903                         cf_subdirs="$cf_subdirs $cf_subdir"
19904                         done
19905                 done
19906         fi
19907
19908         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
19909 done
19910
19911 for cf_dir in $SRC_SUBDIRS
19912 do
19913         if test ! -d $srcdir/$cf_dir ; then
19914                 continue
19915         fi
19916
19917         if test -f $cf_dir/Makefile ; then
19918                 case "$cf_dir" in
19919                 Ada95) #(vi
19920                         echo 'libs \' >> Makefile
19921                         echo 'install.libs \' >> Makefile
19922                         echo 'uninstall.libs ::' >> Makefile
19923                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
19924                         ;;
19925                 esac
19926         fi
19927
19928         if test -f $srcdir/$cf_dir/modules; then
19929                 echo >> Makefile
19930                 if test -f $srcdir/$cf_dir/headers; then
19931 cat >> Makefile <<CF_EOF
19932 install.includes \\
19933 uninstall.includes \\
19934 CF_EOF
19935                 fi
19936 if test "$cf_dir" != "c++" ; then
19937 echo 'lint \' >> Makefile
19938 fi
19939 cat >> Makefile <<CF_EOF
19940 libs \\
19941 lintlib \\
19942 install.libs \\
19943 uninstall.libs \\
19944 install.$cf_dir \\
19945 uninstall.$cf_dir ::
19946         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19947 CF_EOF
19948         elif test -f $srcdir/$cf_dir/headers; then
19949 cat >> Makefile <<CF_EOF
19950
19951 libs \\
19952 install.libs \\
19953 uninstall.libs \\
19954 install.includes \\
19955 uninstall.includes ::
19956         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
19957 CF_EOF
19958 fi
19959 done
19960
19961 cat >> Makefile <<CF_EOF
19962
19963 install.libs uninstall.libs \\
19964 install.data uninstall.data ::
19965 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
19966 CF_EOF
19967
19968 if test "x$cf_with_manpages" = xyes; then
19969 cat >> Makefile <<CF_EOF
19970
19971 install.man \\
19972 uninstall.man ::
19973         cd man && \${MAKE} \${CF_MFLAGS} \$@
19974 CF_EOF
19975 fi
19976
19977 cat >> Makefile <<CF_EOF
19978
19979 distclean ::
19980         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
19981         rm -f headers.sh headers.sed mk_shared_lib.sh
19982         rm -f edit_man.* man_alias.*
19983         rm -rf \${DIRS_TO_MAKE}
19984 CF_EOF
19985
19986 # Special case: tack's manpage lives in its own directory.
19987 if test "x$cf_with_manpages" = xyes; then
19988 if test -d tack ; then
19989 if test -f $srcdir/$tack.h; then
19990 cat >> Makefile <<CF_EOF
19991
19992 install.man \\
19993 uninstall.man ::
19994         cd tack && \${MAKE} \${CF_MFLAGS} \$@
19995 CF_EOF
19996 fi
19997 fi
19998 fi
19999
20000 rm -f headers.sed headers.sh
20001
20002 echo creating headers.sh
20003 cat >headers.sh <<CF_EOF
20004 #! /bin/sh
20005 # This shell script is generated by the 'configure' script.  It is invoked in a
20006 # subdirectory of the build tree.  It generates a sed-script in the parent
20007 # directory that is used to adjust includes for header files that reside in a
20008 # subdirectory of /usr/include, etc.
20009 PRG=""
20010 while test \$# != 3
20011 do
20012 PRG="\$PRG \$1"; shift
20013 done
20014 DST=\$1
20015 REF=\$2
20016 SRC=\$3
20017 TMPSRC=\${TMPDIR-/tmp}/\`basename \$SRC\`\$\$
20018 TMPSED=\${TMPDIR-/tmp}/headers.sed\$\$
20019 echo installing \$SRC in \$DST
20020 CF_EOF
20021
20022 if test $WITH_CURSES_H = yes; then
20023         cat >>headers.sh <<CF_EOF
20024 case \$DST in
20025 /*/include/*)
20026         END=\`basename \$DST\`
20027         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20028         do
20029                 NAME=\`basename \$i\`
20030                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20031         done
20032         ;;
20033 *)
20034         echo "" >> \$TMPSED
20035         ;;
20036 esac
20037 CF_EOF
20038
20039 else
20040         cat >>headers.sh <<CF_EOF
20041 case \$DST in
20042 /*/include/*)
20043         END=\`basename \$DST\`
20044         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
20045         do
20046                 NAME=\`basename \$i\`
20047                 if test "\$NAME" = "curses.h"
20048                 then
20049                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20050                         NAME=ncurses.h
20051                 fi
20052                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
20053         done
20054         ;;
20055 *)
20056         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
20057         ;;
20058 esac
20059 CF_EOF
20060 fi
20061 cat >>headers.sh <<CF_EOF
20062 rm -f \$TMPSRC
20063 sed -f \$TMPSED \$SRC > \$TMPSRC
20064 NAME=\`basename \$SRC\`
20065 CF_EOF
20066 if test $WITH_CURSES_H != yes; then
20067         cat >>headers.sh <<CF_EOF
20068 test "\$NAME" = "curses.h" && NAME=ncurses.h
20069 CF_EOF
20070 fi
20071 cat >>headers.sh <<CF_EOF
20072 # Just in case someone gzip'd manpages, remove the conflicting copy.
20073 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
20074
20075 eval \$PRG \$TMPSRC \$DST/\$NAME
20076 rm -f \$TMPSRC \$TMPSED
20077 CF_EOF
20078
20079 chmod 0755 headers.sh
20080
20081 for cf_dir in $SRC_SUBDIRS
20082 do
20083         if test ! -d $srcdir/$cf_dir ; then
20084                 continue
20085         fi
20086
20087         if test -f $srcdir/$cf_dir/headers; then
20088                 $AWK -f $srcdir/mk-hdr.awk \
20089                         subset="$LIB_SUBSETS" \
20090                         compat="$WITH_CURSES_H" \
20091                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
20092         fi
20093
20094         if test -f $srcdir/$cf_dir/modules; then
20095                 if test "$cf_dir" != "c++" ; then
20096                         cat >>$cf_dir/Makefile <<"CF_EOF"
20097 depend : ${AUTO_SRC}
20098         makedepend -- ${CPPFLAGS} -- ${C_SRC}
20099
20100 # DO NOT DELETE THIS LINE -- make depend depends on it.
20101 CF_EOF
20102                 fi
20103         fi
20104 done
20105
20106  ;;
20107   esac
20108 done
20109 EOF
20110
20111 cat >>$CONFIG_STATUS <<\EOF
20112
20113 { (exit 0); exit 0; }
20114 EOF
20115 chmod +x $CONFIG_STATUS
20116 ac_clean_files=$ac_clean_files_save
20117
20118 # configure is writing to config.log, and then calls config.status.
20119 # config.status does its own redirection, appending to config.log.
20120 # Unfortunately, on DOS this fails, as config.log is still kept open
20121 # by configure, so config.status won't be able to write to it; its
20122 # output is simply discarded.  So we exec the FD to /dev/null,
20123 # effectively closing config.log, so it can be properly (re)opened and
20124 # appended to by config.status.  When coming back to configure, we
20125 # need to make the FD available again.
20126 if test "$no_create" != yes; then
20127   ac_cs_success=:
20128   exec 5>/dev/null
20129   $SHELL $CONFIG_STATUS || ac_cs_success=false
20130   exec 5>>config.log
20131   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20132   # would make configure fail if this is the last instruction.
20133   $ac_cs_success || { (exit 1); exit 1; }
20134 fi
20135 ${MAKE-make} preinstall