]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 5.9 - patch 20110730
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.523 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20101002.
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-tests         suppress build with test-programs
703   --without-curses-h      install curses.h as ncurses.h only
704   --with-pkg-config{=path} enable/disable use of pkg-config
705   --enable-pc-files       generate and install .pc files for pkg-config
706   --enable-mixed-case     tic should assume mixed-case filenames
707   --with-install-prefix   prefixes actual install-location ($DESTDIR)
708 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
709   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
710   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
711   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
712   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
713   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
714   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
715 Options to Specify the Libraries Built/Used:
716   --disable-libtool-version  enable to use libtool's incompatible naming scheme
717   --with-libtool          generate libraries with libtool
718   --with-shared           generate shared-libraries
719   --with-normal           generate normal-libraries (default)
720   --with-debug            generate debug-libraries (default)
721   --with-profile          generate profile-libraries
722   --with-termlib          generate separate terminfo library
723   --with-ticlib           generate separate tic library
724   --with-gpm              use Alessandro Rubini's GPM library
725   --without-dlsym         do not use dlsym() to load GPM dynamically
726   --with-sysmouse         use sysmouse (FreeBSD console)
727   --enable-rpath          use rpath option when generating shared libraries
728   --disable-relink        relink shared libraries during install
729   --with-shlib-version=X  Specify rel or abi version for shared libs
730   --disable-rpath-hack    don't add rpath options for additional libraries
731 Fine-Tuning Your Configuration:
732   --disable-overwrite     leave out the link to -lcurses
733   --disable-database      do not use terminfo, only fallbacks/termcap
734   --with-database=XXX     specify terminfo source to install
735   --with-hashed-db        specify hashed-database library
736   --with-fallbacks=XXX    specify list of fallback terminal descriptions
737   --without-xterm-new     specify if xterm terminfo should be old version
738   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
739   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
740   --disable-big-core      assume machine has little memory
741   --disable-big-strings   assume compiler has only standard-size strings
742   --enable-termcap        compile in termcap fallback support
743   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
744   --enable-getcap         fast termcap load, no xrefs to terminfo
745   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
746   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
747   --disable-root-environ  restrict environment when running as root
748   --enable-symlinks       make tic use symbolic links not hard links
749   --enable-broken_linker  compile with broken-linker support code
750   --enable-bsdpad         recognize BSD-style prefix padding
751   --enable-widec          compile with wide-char/UTF-8 code
752   --disable-lp64          allow chtype to be long (ignore _LP64)
753   --disable-largefile     omit support for large files
754   --disable-tparm-varargs compile tparm() without varargs interface
755   --disable-tic-depends   link tic library without explicit dependency on ncurses library
756   --with-bool=TYPE        override fallback type of bool variable
757   --with-caps=alt         compile with alternate Caps file
758   --with-chtype=TYPE      override type of chtype
759   --with-ospeed=TYPE      override type of ospeed variable
760   --with-mmask-t=TYPE     override type of mmask_t
761   --with-ccharw-max=XXX   override size CCHARW_MAX
762   --with-rcs-ids          compile-in RCS identifiers
763 Options to Specify How Manpages are Installed:
764   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
765                           optionally formatted/catonly, e.g., gzip,formatted
766   --with-manpage-renames  specify manpage-renaming
767   --with-manpage-aliases  specify manpage-aliases using .so
768   --with-manpage-symlinks specify manpage-aliases using symlinks
769   --with-manpage-tbl      specify manpage processing with tbl
770 Extensions:
771   --disable-ext-funcs     disable function-extensions
772   --enable-sp-funcs       enable experimental SCREEN-extensions
773   --enable-term-driver    enable experimental terminal-driver
774   --enable-const          compile with extra/non-standard const
775   --enable-ext-colors     compile for 256-color support
776   --enable-ext-mouse      compile for extended mouse-encoding
777   --enable-no-padding     compile with $NCURSES_NO_PADDING code
778   --enable-signed-char    compile using signed Boolean's in term.h
779   --enable-sigwinch       compile with SIGWINCH handler
780   --enable-tcap-names     compile with user-definable terminal capabilities
781 Development Code:
782   --without-develop       disable development options
783   --enable-hard-tabs      compile with hard-tabs code
784   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
785 Experimental Code:
786   --disable-assumed-color do not assume anything about default-colors
787   --disable-hashmap       compile without hashmap scrolling-optimization
788   --enable-colorfgbg      compile-in experimental $COLORFGBG code
789   --enable-interop        compile-in experimental interop bindings
790   --with-pthread          use POSIX thread library
791   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
792   --enable-weak-symbols   enable weak-symbols for pthreads
793   --enable-reentrant      compile with experimental reentrant code
794   --with-wrap-prefix=XXX  override prefix used for public variables
795   --enable-safe-sprintf   compile with experimental safe-sprintf code
796   --disable-scroll-hints  compile without scroll-hints code
797   --enable-wgetch-events  compile with experimental wgetch-events code
798 Testing/development Options:
799   --enable-echo           build: display "compiling" commands (default)
800   --enable-warnings       build: turn on GCC compiler warnings
801   --enable-assertions     test: turn on generation of assertion code
802   --with-dmalloc          test: use Gray Watson's dmalloc library
803   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
804   --with-valgrind         test: use valgrind
805   --disable-leaks         test: free permanent memory, analyze leaks
806   --enable-expanded       test: generate functions for certain macros
807   --disable-macros        test: use functions rather than macros
808   --with-trace            test: add trace() function to all models of ncurses
809 Ada95 Binding Options:
810   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
811   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
812   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
813   --with-ada-sharedlib=XX build Ada95 shared-library
814
815 Some influential environment variables:
816   CC          C compiler command
817   CFLAGS      C compiler flags
818   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
819               nonstandard directory <lib dir>
820   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
821               headers in a nonstandard directory <include dir>
822   CPP         C preprocessor
823   CXX         C++ compiler command
824   CXXFLAGS    C++ compiler flags
825   CXXCPP      C++ preprocessor
826
827 Use these variables to override the choices made by `configure' or to help
828 it to find libraries and programs with nonstandard names/locations.
829
830 EOF
831 fi
832
833 if test "$ac_init_help" = "recursive"; then
834   # If there are subdirs, report their specific --help.
835   ac_popdir=`pwd`
836   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
837     cd $ac_subdir
838     # A "../" for each directory in /$ac_subdir.
839     ac_dots=`echo $ac_subdir |
840              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
841
842     case $srcdir in
843     .) # No --srcdir option.  We are building in place.
844       ac_sub_srcdir=$srcdir ;;
845     [\\/]* | ?:[\\/]* ) # Absolute path.
846       ac_sub_srcdir=$srcdir/$ac_subdir ;;
847     *) # Relative path.
848       ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
849     esac
850
851     # Check for guested configure; otherwise get Cygnus style configure.
852     if test -f $ac_sub_srcdir/configure.gnu; then
853       echo
854       $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
855     elif test -f $ac_sub_srcdir/configure; then
856       echo
857       $SHELL $ac_sub_srcdir/configure  --help=recursive
858     elif test -f $ac_sub_srcdir/configure.ac ||
859            test -f $ac_sub_srcdir/configure.in; then
860       echo
861       $ac_configure --help
862     else
863       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
864     fi
865     cd $ac_popdir
866   done
867 fi
868
869 test -n "$ac_init_help" && exit 0
870 if $ac_init_version; then
871   cat <<\EOF
872
873 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
874 Free Software Foundation, Inc.
875 This configure script is free software; the Free Software Foundation
876 gives unlimited permission to copy, distribute and modify it.
877 EOF
878   exit 0
879 fi
880 exec 5>config.log
881 cat >&5 <<EOF
882 This file contains any messages produced by compilers while
883 running configure, to aid debugging if configure makes a mistake.
884
885 It was created by $as_me, which was
886 generated by GNU Autoconf 2.52.20101002.  Invocation command line was
887
888   $ $0 $@
889
890 EOF
891 {
892 cat <<_ASUNAME
893 ## ---------- ##
894 ## Platform.  ##
895 ## ---------- ##
896
897 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
898 uname -m = `(uname -m) 2>/dev/null || echo unknown`
899 uname -r = `(uname -r) 2>/dev/null || echo unknown`
900 uname -s = `(uname -s) 2>/dev/null || echo unknown`
901 uname -v = `(uname -v) 2>/dev/null || echo unknown`
902
903 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
904 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
905
906 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
907 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
908 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
909 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
910 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
911 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
912 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
913
914 PATH = $PATH
915
916 _ASUNAME
917 } >&5
918
919 cat >&5 <<EOF
920 ## ------------ ##
921 ## Core tests.  ##
922 ## ------------ ##
923
924 EOF
925
926 # Keep a trace of the command line.
927 # Strip out --no-create and --no-recursion so they do not pile up.
928 # Also quote any args containing shell meta-characters.
929 ac_configure_args=
930 ac_sep=
931 for ac_arg
932 do
933   case $ac_arg in
934   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
935   | --no-cr | --no-c) ;;
936   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
937   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
938   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
939     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
940     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
941     ac_sep=" " ;;
942   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
943      ac_sep=" " ;;
944   esac
945   # Get rid of the leading space.
946 done
947
948 # When interrupted or exit'd, cleanup temporary files, and complete
949 # config.log.  We remove comments because anyway the quotes in there
950 # would cause problems or look ugly.
951 trap 'exit_status=$?
952   # Save into config.log some information that might help in debugging.
953   echo >&5
954   echo "## ----------------- ##" >&5
955   echo "## Cache variables.  ##" >&5
956   echo "## ----------------- ##" >&5
957   echo >&5
958   # The following way of writing the cache mishandles newlines in values,
959 {
960   (set) 2>&1 |
961     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
962     *ac_space=\ *)
963       sed -n \
964         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
965           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
966       ;;
967     *)
968       sed -n \
969         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
970       ;;
971     esac;
972 } >&5
973   sed "/^$/d" confdefs.h >conftest.log
974   if test -s conftest.log; then
975     echo >&5
976     echo "## ------------ ##" >&5
977     echo "## confdefs.h.  ##" >&5
978     echo "## ------------ ##" >&5
979     echo >&5
980     cat conftest.log >&5
981   fi
982   (echo; echo) >&5
983   test "$ac_signal" != 0 &&
984     echo "$as_me: caught signal $ac_signal" >&5
985   echo "$as_me: exit $exit_status" >&5
986   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
987     exit $exit_status
988      ' 0
989 for ac_signal in 1 2 13 15; do
990   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
991 done
992 ac_signal=0
993
994 # confdefs.h avoids OS command line length limits that DEFS can exceed.
995 rm -rf conftest* confdefs.h
996 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
997 echo >confdefs.h
998
999 # Let the site file select an alternate cache file if it wants to.
1000 # Prefer explicitly selected file to automatically selected ones.
1001 if test -z "$CONFIG_SITE"; then
1002   if test "x$prefix" != xNONE; then
1003     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1004   else
1005     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1006   fi
1007 fi
1008 for ac_site_file in $CONFIG_SITE; do
1009   if test -r "$ac_site_file"; then
1010     { echo "$as_me:1010: loading site script $ac_site_file" >&5
1011 echo "$as_me: loading site script $ac_site_file" >&6;}
1012     cat "$ac_site_file" >&5
1013     . "$ac_site_file"
1014   fi
1015 done
1016
1017 if test -r "$cache_file"; then
1018   # Some versions of bash will fail to source /dev/null (special
1019   # files actually), so we avoid doing that.
1020   if test -f "$cache_file"; then
1021     { echo "$as_me:1021: loading cache $cache_file" >&5
1022 echo "$as_me: loading cache $cache_file" >&6;}
1023     case $cache_file in
1024       [\\/]* | ?:[\\/]* ) . $cache_file;;
1025       *)                      . ./$cache_file;;
1026     esac
1027   fi
1028 else
1029   { echo "$as_me:1029: creating cache $cache_file" >&5
1030 echo "$as_me: creating cache $cache_file" >&6;}
1031   >$cache_file
1032 fi
1033
1034 # Check that the precious variables saved in the cache have kept the same
1035 # value.
1036 ac_cache_corrupted=false
1037 for ac_var in `(set) 2>&1 |
1038                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1039   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1040   eval ac_new_set=\$ac_env_${ac_var}_set
1041   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1042   eval ac_new_val="\$ac_env_${ac_var}_value"
1043   case $ac_old_set,$ac_new_set in
1044     set,)
1045       { echo "$as_me:1045: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1046 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1047       ac_cache_corrupted=: ;;
1048     ,set)
1049       { echo "$as_me:1049: error: \`$ac_var' was not set in the previous run" >&5
1050 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1051       ac_cache_corrupted=: ;;
1052     ,);;
1053     *)
1054       if test "x$ac_old_val" != "x$ac_new_val"; then
1055         { echo "$as_me:1055: error: \`$ac_var' has changed since the previous run:" >&5
1056 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1057         { echo "$as_me:1057:   former value:  $ac_old_val" >&5
1058 echo "$as_me:   former value:  $ac_old_val" >&2;}
1059         { echo "$as_me:1059:   current value: $ac_new_val" >&5
1060 echo "$as_me:   current value: $ac_new_val" >&2;}
1061         ac_cache_corrupted=:
1062       fi;;
1063   esac
1064   # Pass precious variables to config.status.  It doesn't matter if
1065   # we pass some twice (in addition to the command line arguments).
1066   if test "$ac_new_set" = set; then
1067     case $ac_new_val in
1068     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1069       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1070       ac_configure_args="$ac_configure_args '$ac_arg'"
1071       ;;
1072     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1073        ;;
1074     esac
1075   fi
1076 done
1077 if $ac_cache_corrupted; then
1078   { echo "$as_me:1078: error: changes in the environment can compromise the build" >&5
1079 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1080   { { echo "$as_me:1080: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1081 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1082    { (exit 1); exit 1; }; }
1083 fi
1084
1085 ac_ext=c
1086 ac_cpp='$CPP $CPPFLAGS'
1087 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1088 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1089 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1090 ac_main_return=return
1091
1092 case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
1093   *c*,-n*) ECHO_N= ECHO_C='
1094 ' ECHO_T='      ' ;;
1095   *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1096   *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1097 esac
1098 echo "#! $SHELL" >conftest.sh
1099 echo  "exit 0"   >>conftest.sh
1100 chmod +x conftest.sh
1101 if { (echo "$as_me:1101: PATH=\".;.\"; conftest.sh") >&5
1102   (PATH=".;."; conftest.sh) 2>&5
1103   ac_status=$?
1104   echo "$as_me:1104: \$? = $ac_status" >&5
1105   (exit $ac_status); }; then
1106   ac_path_separator=';'
1107 else
1108   ac_path_separator=:
1109 fi
1110 PATH_SEPARATOR="$ac_path_separator"
1111 rm -f conftest.sh
1112
1113 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1114
1115 top_builddir=`pwd`
1116
1117 echo "$as_me:1117: checking for egrep" >&5
1118 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1119 if test "${ac_cv_prog_egrep+set}" = set; then
1120   echo $ECHO_N "(cached) $ECHO_C" >&6
1121 else
1122   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
1123     then ac_cv_prog_egrep='grep -E'
1124     else ac_cv_prog_egrep='egrep'
1125     fi
1126 fi
1127 echo "$as_me:1127: result: $ac_cv_prog_egrep" >&5
1128 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
1129  EGREP=$ac_cv_prog_egrep
1130
1131 test -z "$EGREP" && { { echo "$as_me:1131: error: No egrep program found" >&5
1132 echo "$as_me: error: No egrep program found" >&2;}
1133    { (exit 1); exit 1; }; }
1134
1135 NCURSES_MAJOR="`$ac_cv_prog_egrep '^NCURSES_MAJOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1136 NCURSES_MINOR="`$ac_cv_prog_egrep '^NCURSES_MINOR[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1137 NCURSES_PATCH="`$ac_cv_prog_egrep '^NCURSES_PATCH[      ]*=' $srcdir/dist.mk | sed -e 's/^[^0-9]*//'`"
1138 cf_cv_abi_version=${NCURSES_MAJOR}
1139 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1140 cf_cv_timestamp=`date`
1141 echo "$as_me:1141: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1142 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1143
1144 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1145
1146 # Check whether --with-rel-version or --without-rel-version was given.
1147 if test "${with_rel_version+set}" = set; then
1148   withval="$with_rel_version"
1149   { echo "$as_me:1149: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1150 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1151  cf_cv_rel_version=$withval
1152 fi;
1153
1154  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1155  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1156
1157 if test -n "$NCURSES_MAJOR" ; then
1158   case $NCURSES_MAJOR in #(vi
1159   [0-9]*) #(vi
1160         ;;
1161   *)
1162         { { echo "$as_me:1162: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1163 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1164    { (exit 1); exit 1; }; }
1165         ;;
1166   esac
1167 else
1168   { { echo "$as_me:1168: error: Release major-version value is empty" >&5
1169 echo "$as_me: error: Release major-version value is empty" >&2;}
1170    { (exit 1); exit 1; }; }
1171 fi
1172
1173 if test -n "$NCURSES_MINOR" ; then
1174   case $NCURSES_MINOR in #(vi
1175   [0-9]*) #(vi
1176         ;;
1177   *)
1178         { { echo "$as_me:1178: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1179 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1180    { (exit 1); exit 1; }; }
1181         ;;
1182   esac
1183 else
1184   { { echo "$as_me:1184: error: Release minor-version value is empty" >&5
1185 echo "$as_me: error: Release minor-version value is empty" >&2;}
1186    { (exit 1); exit 1; }; }
1187 fi
1188
1189 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1190
1191 # Check whether --with-abi-version or --without-abi-version was given.
1192 if test "${with_abi_version+set}" = set; then
1193   withval="$with_abi_version"
1194   { echo "$as_me:1194: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1195 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1196  cf_cv_abi_version=$withval
1197 fi;
1198
1199 if test -n "$cf_cv_abi_version" ; then
1200   case $cf_cv_abi_version in #(vi
1201   [0-9]*) #(vi
1202         ;;
1203   *)
1204         { { echo "$as_me:1204: error: ABI version is not a number: $cf_cv_abi_version" >&5
1205 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1206    { (exit 1); exit 1; }; }
1207         ;;
1208   esac
1209 else
1210   { { echo "$as_me:1210: error: ABI version value is empty" >&5
1211 echo "$as_me: error: ABI version value is empty" >&2;}
1212    { (exit 1); exit 1; }; }
1213 fi
1214
1215 ac_aux_dir=
1216 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1217   if test -f $ac_dir/install-sh; then
1218     ac_aux_dir=$ac_dir
1219     ac_install_sh="$ac_aux_dir/install-sh -c"
1220     break
1221   elif test -f $ac_dir/install.sh; then
1222     ac_aux_dir=$ac_dir
1223     ac_install_sh="$ac_aux_dir/install.sh -c"
1224     break
1225   elif test -f $ac_dir/shtool; then
1226     ac_aux_dir=$ac_dir
1227     ac_install_sh="$ac_aux_dir/shtool install -c"
1228     break
1229   fi
1230 done
1231 if test -z "$ac_aux_dir"; then
1232   { { echo "$as_me:1232: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1233 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1234    { (exit 1); exit 1; }; }
1235 fi
1236 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1237 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1238 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1239
1240 # Make sure we can run config.sub.
1241 $ac_config_sub sun4 >/dev/null 2>&1 ||
1242   { { echo "$as_me:1242: error: cannot run $ac_config_sub" >&5
1243 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1244    { (exit 1); exit 1; }; }
1245
1246 echo "$as_me:1246: checking build system type" >&5
1247 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1248 if test "${ac_cv_build+set}" = set; then
1249   echo $ECHO_N "(cached) $ECHO_C" >&6
1250 else
1251   ac_cv_build_alias=$build_alias
1252 test -z "$ac_cv_build_alias" &&
1253   ac_cv_build_alias=`$ac_config_guess`
1254 test -z "$ac_cv_build_alias" &&
1255   { { echo "$as_me:1255: error: cannot guess build type; you must specify one" >&5
1256 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1257    { (exit 1); exit 1; }; }
1258 ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1259   { { echo "$as_me:1259: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1260 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1261    { (exit 1); exit 1; }; }
1262
1263 fi
1264 echo "$as_me:1264: result: $ac_cv_build" >&5
1265 echo "${ECHO_T}$ac_cv_build" >&6
1266 build=$ac_cv_build
1267 build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1268 build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1269 build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1270
1271 echo "$as_me:1271: checking host system type" >&5
1272 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1273 if test "${ac_cv_host+set}" = set; then
1274   echo $ECHO_N "(cached) $ECHO_C" >&6
1275 else
1276   ac_cv_host_alias=$host_alias
1277 test -z "$ac_cv_host_alias" &&
1278   ac_cv_host_alias=$ac_cv_build_alias
1279 ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1280   { { echo "$as_me:1280: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1281 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1282    { (exit 1); exit 1; }; }
1283
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_host" >&5
1286 echo "${ECHO_T}$ac_cv_host" >&6
1287 host=$ac_cv_host
1288 host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1289 host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1290 host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1291
1292 if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1293         echo "$as_me:1293: checking target system type" >&5
1294 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1295 if test "${ac_cv_target+set}" = set; then
1296   echo $ECHO_N "(cached) $ECHO_C" >&6
1297 else
1298   ac_cv_target_alias=$target_alias
1299 test "x$ac_cv_target_alias" = "x" &&
1300   ac_cv_target_alias=$ac_cv_host_alias
1301 ac_cv_target=`$ac_config_sub $ac_cv_target_alias` ||
1302   { { echo "$as_me:1302: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1303 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1304    { (exit 1); exit 1; }; }
1305
1306 fi
1307 echo "$as_me:1307: result: $ac_cv_target" >&5
1308 echo "${ECHO_T}$ac_cv_target" >&6
1309 target=$ac_cv_target
1310 target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1311 target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1312 target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1313
1314 # The aliases save the names the user supplied, while $host etc.
1315 # will get canonicalized.
1316 test -n "$target_alias" &&
1317   test "$program_prefix$program_suffix$program_transform_name" = \
1318     NONENONEs,x,x, &&
1319   program_prefix=${target_alias}-
1320         system_name="$host_os"
1321 else
1322         system_name="`(uname -s -r) 2>/dev/null`"
1323         if test -z "$system_name" ; then
1324                 system_name="`(hostname) 2>/dev/null`"
1325         fi
1326 fi
1327 test -n "$system_name" && cat >>confdefs.h <<EOF
1328 #define SYSTEM_NAME "$system_name"
1329 EOF
1330
1331 if test "${cf_cv_system_name+set}" = set; then
1332   echo $ECHO_N "(cached) $ECHO_C" >&6
1333 else
1334   cf_cv_system_name="$system_name"
1335 fi
1336
1337 test -z "$system_name" && system_name="$cf_cv_system_name"
1338 test -n "$cf_cv_system_name" && echo "$as_me:1338: result: Configuring for $cf_cv_system_name" >&5
1339 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1340
1341 if test ".$system_name" != ".$cf_cv_system_name" ; then
1342         echo "$as_me:1342: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1343 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1344         { { echo "$as_me:1344: error: \"Please remove config.cache and try again.\"" >&5
1345 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # Check whether --with-system-type or --without-system-type was given.
1350 if test "${with_system_type+set}" = set; then
1351   withval="$with_system_type"
1352   { echo "$as_me:1352: WARNING: overriding system type to $withval" >&5
1353 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1354  cf_cv_system_name=$withval
1355 fi;
1356
1357 ###     Save the given $CFLAGS to allow user-override.
1358 cf_user_CFLAGS="$CFLAGS"
1359
1360 ###     Default install-location
1361
1362 echo "$as_me:1362: checking for prefix" >&5
1363 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1364 if test "x$prefix" = "xNONE" ; then
1365         case "$cf_cv_system_name" in
1366                 # non-vendor systems don't have a conflict
1367         openbsd*|freebsd*|mirbsd*|linux*|cygwin*|k*bsd*-gnu)
1368                 prefix=/usr
1369                 ;;
1370         *)      prefix=$ac_default_prefix
1371                 ;;
1372         esac
1373 fi
1374 echo "$as_me:1374: result: $prefix" >&5
1375 echo "${ECHO_T}$prefix" >&6
1376
1377 if test "x$prefix" = "xNONE" ; then
1378 echo "$as_me:1378: checking for default include-directory" >&5
1379 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1380 test -n "$verbose" && echo 1>&6
1381 for cf_symbol in \
1382         $includedir \
1383         $includedir/ncurses \
1384         $prefix/include \
1385         $prefix/include/ncurses \
1386         /usr/local/include \
1387         /usr/local/include/ncurses \
1388         /usr/include \
1389         /usr/include/ncurses
1390 do
1391         cf_dir=`eval echo $cf_symbol`
1392         if test -f $cf_dir/curses.h ; then
1393         if ( fgrep NCURSES_VERSION $cf_dir/curses.h 2>&1 >/dev/null ) ; then
1394                 includedir="$cf_symbol"
1395                 test -n "$verbose"  && echo $ac_n "     found " 1>&6
1396                 break
1397         fi
1398         fi
1399         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1400 done
1401 echo "$as_me:1401: result: $includedir" >&5
1402 echo "${ECHO_T}$includedir" >&6
1403 fi
1404
1405 ###     Checks for programs.
1406 ac_ext=c
1407 ac_cpp='$CPP $CPPFLAGS'
1408 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1409 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1410 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1411 ac_main_return=return
1412 if test -n "$ac_tool_prefix"; then
1413   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1414 set dummy ${ac_tool_prefix}gcc; ac_word=$2
1415 echo "$as_me:1415: checking for $ac_word" >&5
1416 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1417 if test "${ac_cv_prog_CC+set}" = set; then
1418   echo $ECHO_N "(cached) $ECHO_C" >&6
1419 else
1420   if test -n "$CC"; then
1421   ac_cv_prog_CC="$CC" # Let the user override the test.
1422 else
1423   ac_save_IFS=$IFS; IFS=$ac_path_separator
1424 ac_dummy="$PATH"
1425 for ac_dir in $ac_dummy; do
1426   IFS=$ac_save_IFS
1427   test -z "$ac_dir" && ac_dir=.
1428   $as_executable_p "$ac_dir/$ac_word" || continue
1429 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1430 echo "$as_me:1430: found $ac_dir/$ac_word" >&5
1431 break
1432 done
1433
1434 fi
1435 fi
1436 CC=$ac_cv_prog_CC
1437 if test -n "$CC"; then
1438   echo "$as_me:1438: result: $CC" >&5
1439 echo "${ECHO_T}$CC" >&6
1440 else
1441   echo "$as_me:1441: result: no" >&5
1442 echo "${ECHO_T}no" >&6
1443 fi
1444
1445 fi
1446 if test -z "$ac_cv_prog_CC"; then
1447   ac_ct_CC=$CC
1448   # Extract the first word of "gcc", so it can be a program name with args.
1449 set dummy gcc; ac_word=$2
1450 echo "$as_me:1450: checking for $ac_word" >&5
1451 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1452 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1453   echo $ECHO_N "(cached) $ECHO_C" >&6
1454 else
1455   if test -n "$ac_ct_CC"; then
1456   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1457 else
1458   ac_save_IFS=$IFS; IFS=$ac_path_separator
1459 ac_dummy="$PATH"
1460 for ac_dir in $ac_dummy; do
1461   IFS=$ac_save_IFS
1462   test -z "$ac_dir" && ac_dir=.
1463   $as_executable_p "$ac_dir/$ac_word" || continue
1464 ac_cv_prog_ac_ct_CC="gcc"
1465 echo "$as_me:1465: found $ac_dir/$ac_word" >&5
1466 break
1467 done
1468
1469 fi
1470 fi
1471 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1472 if test -n "$ac_ct_CC"; then
1473   echo "$as_me:1473: result: $ac_ct_CC" >&5
1474 echo "${ECHO_T}$ac_ct_CC" >&6
1475 else
1476   echo "$as_me:1476: result: no" >&5
1477 echo "${ECHO_T}no" >&6
1478 fi
1479
1480   CC=$ac_ct_CC
1481 else
1482   CC="$ac_cv_prog_CC"
1483 fi
1484
1485 if test -z "$CC"; then
1486   if test -n "$ac_tool_prefix"; then
1487   # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1488 set dummy ${ac_tool_prefix}cc; ac_word=$2
1489 echo "$as_me:1489: checking for $ac_word" >&5
1490 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1491 if test "${ac_cv_prog_CC+set}" = set; then
1492   echo $ECHO_N "(cached) $ECHO_C" >&6
1493 else
1494   if test -n "$CC"; then
1495   ac_cv_prog_CC="$CC" # Let the user override the test.
1496 else
1497   ac_save_IFS=$IFS; IFS=$ac_path_separator
1498 ac_dummy="$PATH"
1499 for ac_dir in $ac_dummy; do
1500   IFS=$ac_save_IFS
1501   test -z "$ac_dir" && ac_dir=.
1502   $as_executable_p "$ac_dir/$ac_word" || continue
1503 ac_cv_prog_CC="${ac_tool_prefix}cc"
1504 echo "$as_me:1504: found $ac_dir/$ac_word" >&5
1505 break
1506 done
1507
1508 fi
1509 fi
1510 CC=$ac_cv_prog_CC
1511 if test -n "$CC"; then
1512   echo "$as_me:1512: result: $CC" >&5
1513 echo "${ECHO_T}$CC" >&6
1514 else
1515   echo "$as_me:1515: result: no" >&5
1516 echo "${ECHO_T}no" >&6
1517 fi
1518
1519 fi
1520 if test -z "$ac_cv_prog_CC"; then
1521   ac_ct_CC=$CC
1522   # Extract the first word of "cc", so it can be a program name with args.
1523 set dummy cc; ac_word=$2
1524 echo "$as_me:1524: checking for $ac_word" >&5
1525 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1526 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1527   echo $ECHO_N "(cached) $ECHO_C" >&6
1528 else
1529   if test -n "$ac_ct_CC"; then
1530   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1531 else
1532   ac_save_IFS=$IFS; IFS=$ac_path_separator
1533 ac_dummy="$PATH"
1534 for ac_dir in $ac_dummy; do
1535   IFS=$ac_save_IFS
1536   test -z "$ac_dir" && ac_dir=.
1537   $as_executable_p "$ac_dir/$ac_word" || continue
1538 ac_cv_prog_ac_ct_CC="cc"
1539 echo "$as_me:1539: found $ac_dir/$ac_word" >&5
1540 break
1541 done
1542
1543 fi
1544 fi
1545 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1546 if test -n "$ac_ct_CC"; then
1547   echo "$as_me:1547: result: $ac_ct_CC" >&5
1548 echo "${ECHO_T}$ac_ct_CC" >&6
1549 else
1550   echo "$as_me:1550: result: no" >&5
1551 echo "${ECHO_T}no" >&6
1552 fi
1553
1554   CC=$ac_ct_CC
1555 else
1556   CC="$ac_cv_prog_CC"
1557 fi
1558
1559 fi
1560 if test -z "$CC"; then
1561   # Extract the first word of "cc", so it can be a program name with args.
1562 set dummy cc; ac_word=$2
1563 echo "$as_me:1563: checking for $ac_word" >&5
1564 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1565 if test "${ac_cv_prog_CC+set}" = set; then
1566   echo $ECHO_N "(cached) $ECHO_C" >&6
1567 else
1568   if test -n "$CC"; then
1569   ac_cv_prog_CC="$CC" # Let the user override the test.
1570 else
1571   ac_prog_rejected=no
1572   ac_save_IFS=$IFS; IFS=$ac_path_separator
1573 ac_dummy="$PATH"
1574 for ac_dir in $ac_dummy; do
1575   IFS=$ac_save_IFS
1576   test -z "$ac_dir" && ac_dir=.
1577   $as_executable_p "$ac_dir/$ac_word" || continue
1578 if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1579   ac_prog_rejected=yes
1580   continue
1581 fi
1582 ac_cv_prog_CC="cc"
1583 echo "$as_me:1583: found $ac_dir/$ac_word" >&5
1584 break
1585 done
1586
1587 if test $ac_prog_rejected = yes; then
1588   # We found a bogon in the path, so make sure we never use it.
1589   set dummy $ac_cv_prog_CC
1590   shift
1591   if test $# != 0; then
1592     # We chose a different compiler from the bogus one.
1593     # However, it has the same basename, so the bogon will be chosen
1594     # first if we set CC to just the basename; use the full file name.
1595     shift
1596     set dummy "$ac_dir/$ac_word" ${1+"$@"}
1597     shift
1598     ac_cv_prog_CC="$@"
1599   fi
1600 fi
1601 fi
1602 fi
1603 CC=$ac_cv_prog_CC
1604 if test -n "$CC"; then
1605   echo "$as_me:1605: result: $CC" >&5
1606 echo "${ECHO_T}$CC" >&6
1607 else
1608   echo "$as_me:1608: result: no" >&5
1609 echo "${ECHO_T}no" >&6
1610 fi
1611
1612 fi
1613 if test -z "$CC"; then
1614   if test -n "$ac_tool_prefix"; then
1615   for ac_prog in cl
1616   do
1617     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1618 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1619 echo "$as_me:1619: checking for $ac_word" >&5
1620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1621 if test "${ac_cv_prog_CC+set}" = set; then
1622   echo $ECHO_N "(cached) $ECHO_C" >&6
1623 else
1624   if test -n "$CC"; then
1625   ac_cv_prog_CC="$CC" # Let the user override the test.
1626 else
1627   ac_save_IFS=$IFS; IFS=$ac_path_separator
1628 ac_dummy="$PATH"
1629 for ac_dir in $ac_dummy; do
1630   IFS=$ac_save_IFS
1631   test -z "$ac_dir" && ac_dir=.
1632   $as_executable_p "$ac_dir/$ac_word" || continue
1633 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1634 echo "$as_me:1634: found $ac_dir/$ac_word" >&5
1635 break
1636 done
1637
1638 fi
1639 fi
1640 CC=$ac_cv_prog_CC
1641 if test -n "$CC"; then
1642   echo "$as_me:1642: result: $CC" >&5
1643 echo "${ECHO_T}$CC" >&6
1644 else
1645   echo "$as_me:1645: result: no" >&5
1646 echo "${ECHO_T}no" >&6
1647 fi
1648
1649     test -n "$CC" && break
1650   done
1651 fi
1652 if test -z "$CC"; then
1653   ac_ct_CC=$CC
1654   for ac_prog in cl
1655 do
1656   # Extract the first word of "$ac_prog", so it can be a program name with args.
1657 set dummy $ac_prog; ac_word=$2
1658 echo "$as_me:1658: checking for $ac_word" >&5
1659 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1660 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1661   echo $ECHO_N "(cached) $ECHO_C" >&6
1662 else
1663   if test -n "$ac_ct_CC"; then
1664   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1665 else
1666   ac_save_IFS=$IFS; IFS=$ac_path_separator
1667 ac_dummy="$PATH"
1668 for ac_dir in $ac_dummy; do
1669   IFS=$ac_save_IFS
1670   test -z "$ac_dir" && ac_dir=.
1671   $as_executable_p "$ac_dir/$ac_word" || continue
1672 ac_cv_prog_ac_ct_CC="$ac_prog"
1673 echo "$as_me:1673: found $ac_dir/$ac_word" >&5
1674 break
1675 done
1676
1677 fi
1678 fi
1679 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1680 if test -n "$ac_ct_CC"; then
1681   echo "$as_me:1681: result: $ac_ct_CC" >&5
1682 echo "${ECHO_T}$ac_ct_CC" >&6
1683 else
1684   echo "$as_me:1684: result: no" >&5
1685 echo "${ECHO_T}no" >&6
1686 fi
1687
1688   test -n "$ac_ct_CC" && break
1689 done
1690
1691   CC=$ac_ct_CC
1692 fi
1693
1694 fi
1695
1696 test -z "$CC" && { { echo "$as_me:1696: error: no acceptable cc found in \$PATH" >&5
1697 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1698    { (exit 1); exit 1; }; }
1699
1700 # Provide some information about the compiler.
1701 echo "$as_me:1701:" \
1702      "checking for C compiler version" >&5
1703 ac_compiler=`set X $ac_compile; echo $2`
1704 { (eval echo "$as_me:1704: \"$ac_compiler --version </dev/null >&5\"") >&5
1705   (eval $ac_compiler --version </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 { (eval echo "$as_me:1714: \"$ac_compiler -V </dev/null >&5\"") >&5
1715   (eval $ac_compiler -V </dev/null >&5) 2>&5
1716   ac_status=$?
1717   echo "$as_me:1717: \$? = $ac_status" >&5
1718   (exit $ac_status); }
1719
1720 cat >conftest.$ac_ext <<_ACEOF
1721 #line 1721 "configure"
1722 #include "confdefs.h"
1723
1724 int
1725 main ()
1726 {
1727
1728   ;
1729   return 0;
1730 }
1731 _ACEOF
1732 ac_clean_files_save=$ac_clean_files
1733 ac_clean_files="$ac_clean_files a.out a.exe"
1734 # Try to create an executable without -o first, disregard a.out.
1735 # It will help us diagnose broken compilers, and finding out an intuition
1736 # of exeext.
1737 echo "$as_me:1737: checking for C compiler default output" >&5
1738 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1739 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1740 if { (eval echo "$as_me:1740: \"$ac_link_default\"") >&5
1741   (eval $ac_link_default) 2>&5
1742   ac_status=$?
1743   echo "$as_me:1743: \$? = $ac_status" >&5
1744   (exit $ac_status); }; then
1745   # Find the output, starting from the most likely.  This scheme is
1746 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1747 # resort.
1748 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1749                 ls a.out conftest 2>/dev/null;
1750                 ls a.* conftest.* 2>/dev/null`; do
1751   case $ac_file in
1752     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1753     a.out ) # We found the default executable, but exeext='' is most
1754             # certainly right.
1755             break;;
1756     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1757           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1758           export ac_cv_exeext
1759           break;;
1760     * ) break;;
1761   esac
1762 done
1763 else
1764   echo "$as_me: failed program was:" >&5
1765 cat conftest.$ac_ext >&5
1766 { { echo "$as_me:1766: error: C compiler cannot create executables" >&5
1767 echo "$as_me: error: C compiler cannot create executables" >&2;}
1768    { (exit 77); exit 77; }; }
1769 fi
1770
1771 ac_exeext=$ac_cv_exeext
1772 echo "$as_me:1772: result: $ac_file" >&5
1773 echo "${ECHO_T}$ac_file" >&6
1774
1775 # Check the compiler produces executables we can run.  If not, either
1776 # the compiler is broken, or we cross compile.
1777 echo "$as_me:1777: checking whether the C compiler works" >&5
1778 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1779 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1780 # If not cross compiling, check that we can run a simple program.
1781 if test "$cross_compiling" != yes; then
1782   if { ac_try='./$ac_file'
1783   { (eval echo "$as_me:1783: \"$ac_try\"") >&5
1784   (eval $ac_try) 2>&5
1785   ac_status=$?
1786   echo "$as_me:1786: \$? = $ac_status" >&5
1787   (exit $ac_status); }; }; then
1788     cross_compiling=no
1789   else
1790     if test "$cross_compiling" = maybe; then
1791         cross_compiling=yes
1792     else
1793         { { echo "$as_me:1793: error: cannot run C compiled programs.
1794 If you meant to cross compile, use \`--host'." >&5
1795 echo "$as_me: error: cannot run C compiled programs.
1796 If you meant to cross compile, use \`--host'." >&2;}
1797    { (exit 1); exit 1; }; }
1798     fi
1799   fi
1800 fi
1801 echo "$as_me:1801: result: yes" >&5
1802 echo "${ECHO_T}yes" >&6
1803
1804 rm -f a.out a.exe conftest$ac_cv_exeext
1805 ac_clean_files=$ac_clean_files_save
1806 # Check the compiler produces executables we can run.  If not, either
1807 # the compiler is broken, or we cross compile.
1808 echo "$as_me:1808: checking whether we are cross compiling" >&5
1809 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1810 echo "$as_me:1810: result: $cross_compiling" >&5
1811 echo "${ECHO_T}$cross_compiling" >&6
1812
1813 echo "$as_me:1813: checking for executable suffix" >&5
1814 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1815 if { (eval echo "$as_me:1815: \"$ac_link\"") >&5
1816   (eval $ac_link) 2>&5
1817   ac_status=$?
1818   echo "$as_me:1818: \$? = $ac_status" >&5
1819   (exit $ac_status); }; then
1820   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1821 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1822 # work properly (i.e., refer to `conftest.exe'), while it won't with
1823 # `rm'.
1824 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1825   case $ac_file in
1826     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1827     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1828           export ac_cv_exeext
1829           break;;
1830     * ) break;;
1831   esac
1832 done
1833 else
1834   { { echo "$as_me:1834: error: cannot compute EXEEXT: cannot compile and link" >&5
1835 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1836    { (exit 1); exit 1; }; }
1837 fi
1838
1839 rm -f conftest$ac_cv_exeext
1840 echo "$as_me:1840: result: $ac_cv_exeext" >&5
1841 echo "${ECHO_T}$ac_cv_exeext" >&6
1842
1843 rm -f conftest.$ac_ext
1844 EXEEXT=$ac_cv_exeext
1845 ac_exeext=$EXEEXT
1846 echo "$as_me:1846: checking for object suffix" >&5
1847 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1848 if test "${ac_cv_objext+set}" = set; then
1849   echo $ECHO_N "(cached) $ECHO_C" >&6
1850 else
1851   cat >conftest.$ac_ext <<_ACEOF
1852 #line 1852 "configure"
1853 #include "confdefs.h"
1854
1855 int
1856 main ()
1857 {
1858
1859   ;
1860   return 0;
1861 }
1862 _ACEOF
1863 rm -f conftest.o conftest.obj
1864 if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865   (eval $ac_compile) 2>&5
1866   ac_status=$?
1867   echo "$as_me:1867: \$? = $ac_status" >&5
1868   (exit $ac_status); }; then
1869   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1870   case $ac_file in
1871     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1872     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1873        break;;
1874   esac
1875 done
1876 else
1877   echo "$as_me: failed program was:" >&5
1878 cat conftest.$ac_ext >&5
1879 { { echo "$as_me:1879: error: cannot compute OBJEXT: cannot compile" >&5
1880 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1881    { (exit 1); exit 1; }; }
1882 fi
1883
1884 rm -f conftest.$ac_cv_objext conftest.$ac_ext
1885 fi
1886 echo "$as_me:1886: result: $ac_cv_objext" >&5
1887 echo "${ECHO_T}$ac_cv_objext" >&6
1888 OBJEXT=$ac_cv_objext
1889 ac_objext=$OBJEXT
1890 echo "$as_me:1890: checking whether we are using the GNU C compiler" >&5
1891 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1892 if test "${ac_cv_c_compiler_gnu+set}" = set; then
1893   echo $ECHO_N "(cached) $ECHO_C" >&6
1894 else
1895   cat >conftest.$ac_ext <<_ACEOF
1896 #line 1896 "configure"
1897 #include "confdefs.h"
1898
1899 int
1900 main ()
1901 {
1902 #ifndef __GNUC__
1903        choke me
1904 #endif
1905
1906   ;
1907   return 0;
1908 }
1909 _ACEOF
1910 rm -f conftest.$ac_objext
1911 if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912   (eval $ac_compile) 2>&5
1913   ac_status=$?
1914   echo "$as_me:1914: \$? = $ac_status" >&5
1915   (exit $ac_status); } &&
1916          { ac_try='test -s conftest.$ac_objext'
1917   { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918   (eval $ac_try) 2>&5
1919   ac_status=$?
1920   echo "$as_me:1920: \$? = $ac_status" >&5
1921   (exit $ac_status); }; }; then
1922   ac_compiler_gnu=yes
1923 else
1924   echo "$as_me: failed program was:" >&5
1925 cat conftest.$ac_ext >&5
1926 ac_compiler_gnu=no
1927 fi
1928 rm -f conftest.$ac_objext conftest.$ac_ext
1929 ac_cv_c_compiler_gnu=$ac_compiler_gnu
1930
1931 fi
1932 echo "$as_me:1932: result: $ac_cv_c_compiler_gnu" >&5
1933 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1934 GCC=`test $ac_compiler_gnu = yes && echo yes`
1935 ac_test_CFLAGS=${CFLAGS+set}
1936 ac_save_CFLAGS=$CFLAGS
1937 CFLAGS="-g"
1938 echo "$as_me:1938: checking whether $CC accepts -g" >&5
1939 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1940 if test "${ac_cv_prog_cc_g+set}" = set; then
1941   echo $ECHO_N "(cached) $ECHO_C" >&6
1942 else
1943   cat >conftest.$ac_ext <<_ACEOF
1944 #line 1944 "configure"
1945 #include "confdefs.h"
1946
1947 int
1948 main ()
1949 {
1950
1951   ;
1952   return 0;
1953 }
1954 _ACEOF
1955 rm -f conftest.$ac_objext
1956 if { (eval echo "$as_me:1956: \"$ac_compile\"") >&5
1957   (eval $ac_compile) 2>&5
1958   ac_status=$?
1959   echo "$as_me:1959: \$? = $ac_status" >&5
1960   (exit $ac_status); } &&
1961          { ac_try='test -s conftest.$ac_objext'
1962   { (eval echo "$as_me:1962: \"$ac_try\"") >&5
1963   (eval $ac_try) 2>&5
1964   ac_status=$?
1965   echo "$as_me:1965: \$? = $ac_status" >&5
1966   (exit $ac_status); }; }; then
1967   ac_cv_prog_cc_g=yes
1968 else
1969   echo "$as_me: failed program was:" >&5
1970 cat conftest.$ac_ext >&5
1971 ac_cv_prog_cc_g=no
1972 fi
1973 rm -f conftest.$ac_objext conftest.$ac_ext
1974 fi
1975 echo "$as_me:1975: result: $ac_cv_prog_cc_g" >&5
1976 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1977 if test "$ac_test_CFLAGS" = set; then
1978   CFLAGS=$ac_save_CFLAGS
1979 elif test $ac_cv_prog_cc_g = yes; then
1980   if test "$GCC" = yes; then
1981     CFLAGS="-g -O2"
1982   else
1983     CFLAGS="-g"
1984   fi
1985 else
1986   if test "$GCC" = yes; then
1987     CFLAGS="-O2"
1988   else
1989     CFLAGS=
1990   fi
1991 fi
1992 # Some people use a C++ compiler to compile C.  Since we use `exit',
1993 # in C++ we need to declare it.  In case someone uses the same compiler
1994 # for both compiling C and C++ we need to have the C++ compiler decide
1995 # the declaration of exit, since it's the most demanding environment.
1996 cat >conftest.$ac_ext <<_ACEOF
1997 #ifndef __cplusplus
1998   choke me
1999 #endif
2000 _ACEOF
2001 rm -f conftest.$ac_objext
2002 if { (eval echo "$as_me:2002: \"$ac_compile\"") >&5
2003   (eval $ac_compile) 2>&5
2004   ac_status=$?
2005   echo "$as_me:2005: \$? = $ac_status" >&5
2006   (exit $ac_status); } &&
2007          { ac_try='test -s conftest.$ac_objext'
2008   { (eval echo "$as_me:2008: \"$ac_try\"") >&5
2009   (eval $ac_try) 2>&5
2010   ac_status=$?
2011   echo "$as_me:2011: \$? = $ac_status" >&5
2012   (exit $ac_status); }; }; then
2013   for ac_declaration in \
2014    ''\
2015    '#include <stdlib.h>' \
2016    'extern "C" void std::exit (int) throw (); using std::exit;' \
2017    'extern "C" void std::exit (int); using std::exit;' \
2018    'extern "C" void exit (int) throw ();' \
2019    'extern "C" void exit (int);' \
2020    'void exit (int);'
2021 do
2022   cat >conftest.$ac_ext <<_ACEOF
2023 #line 2023 "configure"
2024 #include "confdefs.h"
2025 #include <stdlib.h>
2026 $ac_declaration
2027 int
2028 main ()
2029 {
2030 exit (42);
2031   ;
2032   return 0;
2033 }
2034 _ACEOF
2035 rm -f conftest.$ac_objext
2036 if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037   (eval $ac_compile) 2>&5
2038   ac_status=$?
2039   echo "$as_me:2039: \$? = $ac_status" >&5
2040   (exit $ac_status); } &&
2041          { ac_try='test -s conftest.$ac_objext'
2042   { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043   (eval $ac_try) 2>&5
2044   ac_status=$?
2045   echo "$as_me:2045: \$? = $ac_status" >&5
2046   (exit $ac_status); }; }; then
2047   :
2048 else
2049   echo "$as_me: failed program was:" >&5
2050 cat conftest.$ac_ext >&5
2051 continue
2052 fi
2053 rm -f conftest.$ac_objext conftest.$ac_ext
2054   cat >conftest.$ac_ext <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057 $ac_declaration
2058 int
2059 main ()
2060 {
2061 exit (42);
2062   ;
2063   return 0;
2064 }
2065 _ACEOF
2066 rm -f conftest.$ac_objext
2067 if { (eval echo "$as_me:2067: \"$ac_compile\"") >&5
2068   (eval $ac_compile) 2>&5
2069   ac_status=$?
2070   echo "$as_me:2070: \$? = $ac_status" >&5
2071   (exit $ac_status); } &&
2072          { ac_try='test -s conftest.$ac_objext'
2073   { (eval echo "$as_me:2073: \"$ac_try\"") >&5
2074   (eval $ac_try) 2>&5
2075   ac_status=$?
2076   echo "$as_me:2076: \$? = $ac_status" >&5
2077   (exit $ac_status); }; }; then
2078   break
2079 else
2080   echo "$as_me: failed program was:" >&5
2081 cat conftest.$ac_ext >&5
2082 fi
2083 rm -f conftest.$ac_objext conftest.$ac_ext
2084 done
2085 rm -rf conftest*
2086 if test -n "$ac_declaration"; then
2087   echo '#ifdef __cplusplus' >>confdefs.h
2088   echo $ac_declaration      >>confdefs.h
2089   echo '#endif'             >>confdefs.h
2090 fi
2091
2092 else
2093   echo "$as_me: failed program was:" >&5
2094 cat conftest.$ac_ext >&5
2095 fi
2096 rm -f conftest.$ac_objext conftest.$ac_ext
2097 ac_ext=c
2098 ac_cpp='$CPP $CPPFLAGS'
2099 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2100 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2101 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2102 ac_main_return=return
2103
2104 GCC_VERSION=none
2105 if test "$GCC" = yes ; then
2106         echo "$as_me:2106: checking version of $CC" >&5
2107 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2108         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2109         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2110         echo "$as_me:2110: result: $GCC_VERSION" >&5
2111 echo "${ECHO_T}$GCC_VERSION" >&6
2112 fi
2113
2114 ac_ext=c
2115 ac_cpp='$CPP $CPPFLAGS'
2116 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2117 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2118 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2119 ac_main_return=return
2120 echo "$as_me:2120: checking how to run the C preprocessor" >&5
2121 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2122 # On Suns, sometimes $CPP names a directory.
2123 if test -n "$CPP" && test -d "$CPP"; then
2124   CPP=
2125 fi
2126 if test -z "$CPP"; then
2127   if test "${ac_cv_prog_CPP+set}" = set; then
2128   echo $ECHO_N "(cached) $ECHO_C" >&6
2129 else
2130       # Double quotes because CPP needs to be expanded
2131     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2132     do
2133       ac_preproc_ok=false
2134 for ac_c_preproc_warn_flag in '' yes
2135 do
2136   # Use a header file that comes with gcc, so configuring glibc
2137   # with a fresh cross-compiler works.
2138   # On the NeXT, cc -E runs the code through the compiler's parser,
2139   # not just through cpp. "Syntax error" is here to catch this case.
2140   cat >conftest.$ac_ext <<_ACEOF
2141 #line 2141 "configure"
2142 #include "confdefs.h"
2143 #include <assert.h>
2144                      Syntax error
2145 _ACEOF
2146 if { (eval echo "$as_me:2146: \"$ac_cpp conftest.$ac_ext\"") >&5
2147   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2148   ac_status=$?
2149   egrep -v '^ *\+' conftest.er1 >conftest.err
2150   rm -f conftest.er1
2151   cat conftest.err >&5
2152   echo "$as_me:2152: \$? = $ac_status" >&5
2153   (exit $ac_status); } >/dev/null; then
2154   if test -s conftest.err; then
2155     ac_cpp_err=$ac_c_preproc_warn_flag
2156   else
2157     ac_cpp_err=
2158   fi
2159 else
2160   ac_cpp_err=yes
2161 fi
2162 if test -z "$ac_cpp_err"; then
2163   :
2164 else
2165   echo "$as_me: failed program was:" >&5
2166   cat conftest.$ac_ext >&5
2167   # Broken: fails on valid input.
2168 continue
2169 fi
2170 rm -f conftest.err conftest.$ac_ext
2171
2172   # OK, works on sane cases.  Now check whether non-existent headers
2173   # can be detected and how.
2174   cat >conftest.$ac_ext <<_ACEOF
2175 #line 2175 "configure"
2176 #include "confdefs.h"
2177 #include <ac_nonexistent.h>
2178 _ACEOF
2179 if { (eval echo "$as_me:2179: \"$ac_cpp conftest.$ac_ext\"") >&5
2180   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2181   ac_status=$?
2182   egrep -v '^ *\+' conftest.er1 >conftest.err
2183   rm -f conftest.er1
2184   cat conftest.err >&5
2185   echo "$as_me:2185: \$? = $ac_status" >&5
2186   (exit $ac_status); } >/dev/null; then
2187   if test -s conftest.err; then
2188     ac_cpp_err=$ac_c_preproc_warn_flag
2189   else
2190     ac_cpp_err=
2191   fi
2192 else
2193   ac_cpp_err=yes
2194 fi
2195 if test -z "$ac_cpp_err"; then
2196   # Broken: success on invalid input.
2197 continue
2198 else
2199   echo "$as_me: failed program was:" >&5
2200   cat conftest.$ac_ext >&5
2201   # Passes both tests.
2202 ac_preproc_ok=:
2203 break
2204 fi
2205 rm -f conftest.err conftest.$ac_ext
2206
2207 done
2208 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2209 rm -f conftest.err conftest.$ac_ext
2210 if $ac_preproc_ok; then
2211   break
2212 fi
2213
2214     done
2215     ac_cv_prog_CPP=$CPP
2216
2217 fi
2218   CPP=$ac_cv_prog_CPP
2219 else
2220   ac_cv_prog_CPP=$CPP
2221 fi
2222 echo "$as_me:2222: result: $CPP" >&5
2223 echo "${ECHO_T}$CPP" >&6
2224 ac_preproc_ok=false
2225 for ac_c_preproc_warn_flag in '' yes
2226 do
2227   # Use a header file that comes with gcc, so configuring glibc
2228   # with a fresh cross-compiler works.
2229   # On the NeXT, cc -E runs the code through the compiler's parser,
2230   # not just through cpp. "Syntax error" is here to catch this case.
2231   cat >conftest.$ac_ext <<_ACEOF
2232 #line 2232 "configure"
2233 #include "confdefs.h"
2234 #include <assert.h>
2235                      Syntax error
2236 _ACEOF
2237 if { (eval echo "$as_me:2237: \"$ac_cpp conftest.$ac_ext\"") >&5
2238   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2239   ac_status=$?
2240   egrep -v '^ *\+' conftest.er1 >conftest.err
2241   rm -f conftest.er1
2242   cat conftest.err >&5
2243   echo "$as_me:2243: \$? = $ac_status" >&5
2244   (exit $ac_status); } >/dev/null; then
2245   if test -s conftest.err; then
2246     ac_cpp_err=$ac_c_preproc_warn_flag
2247   else
2248     ac_cpp_err=
2249   fi
2250 else
2251   ac_cpp_err=yes
2252 fi
2253 if test -z "$ac_cpp_err"; then
2254   :
2255 else
2256   echo "$as_me: failed program was:" >&5
2257   cat conftest.$ac_ext >&5
2258   # Broken: fails on valid input.
2259 continue
2260 fi
2261 rm -f conftest.err conftest.$ac_ext
2262
2263   # OK, works on sane cases.  Now check whether non-existent headers
2264   # can be detected and how.
2265   cat >conftest.$ac_ext <<_ACEOF
2266 #line 2266 "configure"
2267 #include "confdefs.h"
2268 #include <ac_nonexistent.h>
2269 _ACEOF
2270 if { (eval echo "$as_me:2270: \"$ac_cpp conftest.$ac_ext\"") >&5
2271   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2272   ac_status=$?
2273   egrep -v '^ *\+' conftest.er1 >conftest.err
2274   rm -f conftest.er1
2275   cat conftest.err >&5
2276   echo "$as_me:2276: \$? = $ac_status" >&5
2277   (exit $ac_status); } >/dev/null; then
2278   if test -s conftest.err; then
2279     ac_cpp_err=$ac_c_preproc_warn_flag
2280   else
2281     ac_cpp_err=
2282   fi
2283 else
2284   ac_cpp_err=yes
2285 fi
2286 if test -z "$ac_cpp_err"; then
2287   # Broken: success on invalid input.
2288 continue
2289 else
2290   echo "$as_me: failed program was:" >&5
2291   cat conftest.$ac_ext >&5
2292   # Passes both tests.
2293 ac_preproc_ok=:
2294 break
2295 fi
2296 rm -f conftest.err conftest.$ac_ext
2297
2298 done
2299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2300 rm -f conftest.err conftest.$ac_ext
2301 if $ac_preproc_ok; then
2302   :
2303 else
2304   { { echo "$as_me:2304: error: C preprocessor \"$CPP\" fails sanity check" >&5
2305 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2306    { (exit 1); exit 1; }; }
2307 fi
2308
2309 ac_ext=c
2310 ac_cpp='$CPP $CPPFLAGS'
2311 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2312 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2313 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2314 ac_main_return=return
2315
2316 if test $ac_cv_c_compiler_gnu = yes; then
2317     echo "$as_me:2317: checking whether $CC needs -traditional" >&5
2318 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2319 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2320   echo $ECHO_N "(cached) $ECHO_C" >&6
2321 else
2322     ac_pattern="Autoconf.*'x'"
2323   cat >conftest.$ac_ext <<_ACEOF
2324 #line 2324 "configure"
2325 #include "confdefs.h"
2326 #include <sgtty.h>
2327 int Autoconf = TIOCGETP;
2328 _ACEOF
2329 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2330   egrep "$ac_pattern" >/dev/null 2>&1; then
2331   ac_cv_prog_gcc_traditional=yes
2332 else
2333   ac_cv_prog_gcc_traditional=no
2334 fi
2335 rm -rf conftest*
2336
2337   if test $ac_cv_prog_gcc_traditional = no; then
2338     cat >conftest.$ac_ext <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341 #include <termio.h>
2342 int Autoconf = TCGETA;
2343 _ACEOF
2344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2345   egrep "$ac_pattern" >/dev/null 2>&1; then
2346   ac_cv_prog_gcc_traditional=yes
2347 fi
2348 rm -rf conftest*
2349
2350   fi
2351 fi
2352 echo "$as_me:2352: result: $ac_cv_prog_gcc_traditional" >&5
2353 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2354   if test $ac_cv_prog_gcc_traditional = yes; then
2355     CC="$CC -traditional"
2356   fi
2357 fi
2358
2359 echo "$as_me:2359: checking whether $CC understands -c and -o together" >&5
2360 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
2361 if test "${cf_cv_prog_CC_c_o+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364
2365 cat > conftest.$ac_ext <<CF_EOF
2366 #include <stdio.h>
2367 int main()
2368 {
2369         ${cf_cv_main_return:-return}(0);
2370 }
2371 CF_EOF
2372 # We do the test twice because some compilers refuse to overwrite an
2373 # existing .o file with -o, though they will create one.
2374 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
2375 if { (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   test -f conftest2.$ac_objext && { (eval echo "$as_me:2380: \"$ac_try\"") >&5
2381   (eval $ac_try) 2>&5
2382   ac_status=$?
2383   echo "$as_me:2383: \$? = $ac_status" >&5
2384   (exit $ac_status); };
2385 then
2386   eval cf_cv_prog_CC_c_o=yes
2387 else
2388   eval cf_cv_prog_CC_c_o=no
2389 fi
2390 rm -rf conftest*
2391
2392 fi
2393 if test $cf_cv_prog_CC_c_o = yes; then
2394   echo "$as_me:2394: result: yes" >&5
2395 echo "${ECHO_T}yes" >&6
2396 else
2397   echo "$as_me:2397: result: no" >&5
2398 echo "${ECHO_T}no" >&6
2399 fi
2400
2401 echo "$as_me:2401: checking for POSIXized ISC" >&5
2402 echo $ECHO_N "checking for POSIXized ISC... $ECHO_C" >&6
2403 if test -d /etc/conf/kconfig.d &&
2404    grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
2405 then
2406   echo "$as_me:2406: result: yes" >&5
2407 echo "${ECHO_T}yes" >&6
2408   ISC=yes # If later tests want to check for ISC.
2409
2410 cat >>confdefs.h <<\EOF
2411 #define _POSIX_SOURCE 1
2412 EOF
2413
2414   if test "$GCC" = yes; then
2415     CC="$CC -posix"
2416   else
2417     CC="$CC -Xp"
2418   fi
2419 else
2420   echo "$as_me:2420: result: no" >&5
2421 echo "${ECHO_T}no" >&6
2422   ISC=
2423 fi
2424
2425 # This should have been defined by AC_PROG_CC
2426 : ${CC:=cc}
2427
2428 # Check for user's environment-breakage by stuffing CFLAGS/CPPFLAGS content
2429 # into CC.  This will not help with broken scripts that wrap the compiler with
2430 # options, but eliminates a more common category of user confusion.
2431 echo "$as_me:2431: checking \$CC variable" >&5
2432 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2433 case "$CC" in #(vi
2434 *[\ \   ]-[IUD]*)
2435         echo "$as_me:2435: result: broken" >&5
2436 echo "${ECHO_T}broken" >&6
2437         { echo "$as_me:2437: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2438 echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2439         # humor him...
2440         cf_flags=`echo "$CC" | sed -e 's/^[^    ]*[     ]//'`
2441         CC=`echo "$CC" | sed -e 's/[    ].*//'`
2442
2443 cf_fix_cppflags=no
2444 cf_new_cflags=
2445 cf_new_cppflags=
2446 cf_new_extra_cppflags=
2447
2448 for cf_add_cflags in $cf_flags
2449 do
2450 case $cf_fix_cppflags in
2451 no)
2452         case $cf_add_cflags in #(vi
2453         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2454                 case $cf_add_cflags in
2455                 -D*)
2456                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2457
2458                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2459                                 && test -z "${cf_tst_cflags}" \
2460                                 && cf_fix_cppflags=yes
2461
2462                         if test $cf_fix_cppflags = yes ; then
2463                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2464                                 continue
2465                         elif test "${cf_tst_cflags}" = "\"'" ; then
2466                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2467                                 continue
2468                         fi
2469                         ;;
2470                 esac
2471                 case "$CPPFLAGS" in
2472                 *$cf_add_cflags) #(vi
2473                         ;;
2474                 *) #(vi
2475                         case $cf_add_cflags in #(vi
2476                         -D*)
2477                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2478
2479 CPPFLAGS=`echo "$CPPFLAGS" | \
2480         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2481                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2482
2483                                 ;;
2484                         esac
2485                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2486                         ;;
2487                 esac
2488                 ;;
2489         *)
2490                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2491                 ;;
2492         esac
2493         ;;
2494 yes)
2495         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2496
2497         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2498
2499         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2500                 && test -z "${cf_tst_cflags}" \
2501                 && cf_fix_cppflags=no
2502         ;;
2503 esac
2504 done
2505
2506 if test -n "$cf_new_cflags" ; then
2507
2508         CFLAGS="$CFLAGS $cf_new_cflags"
2509 fi
2510
2511 if test -n "$cf_new_cppflags" ; then
2512
2513         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2514 fi
2515
2516 if test -n "$cf_new_extra_cppflags" ; then
2517
2518         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2519 fi
2520
2521         ;;
2522 *)
2523         echo "$as_me:2523: result: ok" >&5
2524 echo "${ECHO_T}ok" >&6
2525         ;;
2526 esac
2527
2528 echo "$as_me:2528: checking for ${CC:-cc} option to accept ANSI C" >&5
2529 echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
2530 if test "${cf_cv_ansi_cc+set}" = set; then
2531   echo $ECHO_N "(cached) $ECHO_C" >&6
2532 else
2533
2534 cf_cv_ansi_cc=no
2535 cf_save_CFLAGS="$CFLAGS"
2536 cf_save_CPPFLAGS="$CPPFLAGS"
2537 # Don't try gcc -ansi; that turns off useful extensions and
2538 # breaks some systems' header files.
2539 # AIX                   -qlanglvl=ansi
2540 # Ultrix and OSF/1      -std1
2541 # HP-UX                 -Aa -D_HPUX_SOURCE
2542 # SVR4                  -Xc
2543 # UnixWare 1.2          (cannot use -Xc, since ANSI/POSIX clashes)
2544 for cf_arg in "-DCC_HAS_PROTOS" \
2545         "" \
2546         -qlanglvl=ansi \
2547         -std1 \
2548         -Ae \
2549         "-Aa -D_HPUX_SOURCE" \
2550         -Xc
2551 do
2552
2553 cf_fix_cppflags=no
2554 cf_new_cflags=
2555 cf_new_cppflags=
2556 cf_new_extra_cppflags=
2557
2558 for cf_add_cflags in $cf_arg
2559 do
2560 case $cf_fix_cppflags in
2561 no)
2562         case $cf_add_cflags in #(vi
2563         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2564                 case $cf_add_cflags in
2565                 -D*)
2566                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2567
2568                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2569                                 && test -z "${cf_tst_cflags}" \
2570                                 && cf_fix_cppflags=yes
2571
2572                         if test $cf_fix_cppflags = yes ; then
2573                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2574                                 continue
2575                         elif test "${cf_tst_cflags}" = "\"'" ; then
2576                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2577                                 continue
2578                         fi
2579                         ;;
2580                 esac
2581                 case "$CPPFLAGS" in
2582                 *$cf_add_cflags) #(vi
2583                         ;;
2584                 *) #(vi
2585                         case $cf_add_cflags in #(vi
2586                         -D*)
2587                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2588
2589 CPPFLAGS=`echo "$CPPFLAGS" | \
2590         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2591                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2592
2593                                 ;;
2594                         esac
2595                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2596                         ;;
2597                 esac
2598                 ;;
2599         *)
2600                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2601                 ;;
2602         esac
2603         ;;
2604 yes)
2605         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2606
2607         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2608
2609         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2610                 && test -z "${cf_tst_cflags}" \
2611                 && cf_fix_cppflags=no
2612         ;;
2613 esac
2614 done
2615
2616 if test -n "$cf_new_cflags" ; then
2617
2618         CFLAGS="$CFLAGS $cf_new_cflags"
2619 fi
2620
2621 if test -n "$cf_new_cppflags" ; then
2622
2623         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2624 fi
2625
2626 if test -n "$cf_new_extra_cppflags" ; then
2627
2628         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2629 fi
2630
2631         cat >conftest.$ac_ext <<_ACEOF
2632 #line 2632 "configure"
2633 #include "confdefs.h"
2634
2635 #ifndef CC_HAS_PROTOS
2636 #if !defined(__STDC__) || (__STDC__ != 1)
2637 choke me
2638 #endif
2639 #endif
2640
2641 int
2642 main ()
2643 {
2644
2645         int test (int i, double x);
2646         struct s1 {int (*f) (int a);};
2647         struct s2 {int (*f) (double a);};
2648   ;
2649   return 0;
2650 }
2651 _ACEOF
2652 rm -f conftest.$ac_objext
2653 if { (eval echo "$as_me:2653: \"$ac_compile\"") >&5
2654   (eval $ac_compile) 2>&5
2655   ac_status=$?
2656   echo "$as_me:2656: \$? = $ac_status" >&5
2657   (exit $ac_status); } &&
2658          { ac_try='test -s conftest.$ac_objext'
2659   { (eval echo "$as_me:2659: \"$ac_try\"") >&5
2660   (eval $ac_try) 2>&5
2661   ac_status=$?
2662   echo "$as_me:2662: \$? = $ac_status" >&5
2663   (exit $ac_status); }; }; then
2664   cf_cv_ansi_cc="$cf_arg"; break
2665 else
2666   echo "$as_me: failed program was:" >&5
2667 cat conftest.$ac_ext >&5
2668 fi
2669 rm -f conftest.$ac_objext conftest.$ac_ext
2670 done
2671 CFLAGS="$cf_save_CFLAGS"
2672 CPPFLAGS="$cf_save_CPPFLAGS"
2673
2674 fi
2675 echo "$as_me:2675: result: $cf_cv_ansi_cc" >&5
2676 echo "${ECHO_T}$cf_cv_ansi_cc" >&6
2677
2678 if test "$cf_cv_ansi_cc" != "no"; then
2679 if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
2680
2681 cf_fix_cppflags=no
2682 cf_new_cflags=
2683 cf_new_cppflags=
2684 cf_new_extra_cppflags=
2685
2686 for cf_add_cflags in $cf_cv_ansi_cc
2687 do
2688 case $cf_fix_cppflags in
2689 no)
2690         case $cf_add_cflags in #(vi
2691         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
2692                 case $cf_add_cflags in
2693                 -D*)
2694                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2695
2696                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2697                                 && test -z "${cf_tst_cflags}" \
2698                                 && cf_fix_cppflags=yes
2699
2700                         if test $cf_fix_cppflags = yes ; then
2701                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2702                                 continue
2703                         elif test "${cf_tst_cflags}" = "\"'" ; then
2704                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2705                                 continue
2706                         fi
2707                         ;;
2708                 esac
2709                 case "$CPPFLAGS" in
2710                 *$cf_add_cflags) #(vi
2711                         ;;
2712                 *) #(vi
2713                         case $cf_add_cflags in #(vi
2714                         -D*)
2715                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2716
2717 CPPFLAGS=`echo "$CPPFLAGS" | \
2718         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2719                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2720
2721                                 ;;
2722                         esac
2723                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2724                         ;;
2725                 esac
2726                 ;;
2727         *)
2728                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2729                 ;;
2730         esac
2731         ;;
2732 yes)
2733         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2734
2735         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2736
2737         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
2738                 && test -z "${cf_tst_cflags}" \
2739                 && cf_fix_cppflags=no
2740         ;;
2741 esac
2742 done
2743
2744 if test -n "$cf_new_cflags" ; then
2745
2746         CFLAGS="$CFLAGS $cf_new_cflags"
2747 fi
2748
2749 if test -n "$cf_new_cppflags" ; then
2750
2751         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2752 fi
2753
2754 if test -n "$cf_new_extra_cppflags" ; then
2755
2756         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2757 fi
2758
2759 else
2760         cat >>confdefs.h <<\EOF
2761 #define CC_HAS_PROTOS 1
2762 EOF
2763
2764 fi
2765 fi
2766
2767 if test "$cf_cv_ansi_cc" = "no"; then
2768         { { echo "$as_me:2768: error: Your compiler does not appear to recognize prototypes.
2769 You have the following choices:
2770         a. adjust your compiler options
2771         b. get an up-to-date compiler
2772         c. use a wrapper such as unproto" >&5
2773 echo "$as_me: error: Your compiler does not appear to recognize prototypes.
2774 You have the following choices:
2775         a. adjust your compiler options
2776         b. get an up-to-date compiler
2777         c. use a wrapper such as unproto" >&2;}
2778    { (exit 1); exit 1; }; }
2779 fi
2780
2781 case $cf_cv_system_name in
2782 os2*)
2783     CFLAGS="$CFLAGS -Zmt"
2784     CPPFLAGS="$CPPFLAGS -D__ST_MT_ERRNO__"
2785     CXXFLAGS="$CXXFLAGS -Zmt"
2786     # autoconf's macro sets -Zexe and suffix both, which conflict:w
2787     LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
2788     ac_cv_exeext=.exe
2789     ;;
2790 esac
2791
2792 PROG_EXT="$EXEEXT"
2793
2794 test -n "$PROG_EXT" && cat >>confdefs.h <<EOF
2795 #define PROG_EXT "$PROG_EXT"
2796 EOF
2797
2798 if test "$cross_compiling" = yes ; then
2799   LDCONFIG=:
2800 else
2801 case "$cf_cv_system_name" in #(vi
2802 dragonfly*|mirbsd*|freebsd*) #(vi
2803   test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
2804   ;;
2805 *) LDPATH=$PATH:/sbin:/usr/sbin
2806   # Extract the first word of "ldconfig", so it can be a program name with args.
2807 set dummy ldconfig; ac_word=$2
2808 echo "$as_me:2808: checking for $ac_word" >&5
2809 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2810 if test "${ac_cv_path_LDCONFIG+set}" = set; then
2811   echo $ECHO_N "(cached) $ECHO_C" >&6
2812 else
2813   case $LDCONFIG in
2814   [\\/]* | ?:[\\/]*)
2815   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
2816   ;;
2817   *)
2818   ac_save_IFS=$IFS; IFS=$ac_path_separator
2819 ac_dummy="$LDPATH"
2820 for ac_dir in $ac_dummy; do
2821   IFS=$ac_save_IFS
2822   test -z "$ac_dir" && ac_dir=.
2823   if $as_executable_p "$ac_dir/$ac_word"; then
2824    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
2825    echo "$as_me:2825: found $ac_dir/$ac_word" >&5
2826    break
2827 fi
2828 done
2829
2830   ;;
2831 esac
2832 fi
2833 LDCONFIG=$ac_cv_path_LDCONFIG
2834
2835 if test -n "$LDCONFIG"; then
2836   echo "$as_me:2836: result: $LDCONFIG" >&5
2837 echo "${ECHO_T}$LDCONFIG" >&6
2838 else
2839   echo "$as_me:2839: result: no" >&5
2840 echo "${ECHO_T}no" >&6
2841 fi
2842
2843   ;;
2844 esac
2845 fi
2846
2847 echo "$as_me:2847: checking if you want to ensure bool is consistent with C++" >&5
2848 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
2849
2850 # Check whether --with-cxx or --without-cxx was given.
2851 if test "${with_cxx+set}" = set; then
2852   withval="$with_cxx"
2853   cf_with_cxx=$withval
2854 else
2855   cf_with_cxx=yes
2856 fi;
2857 echo "$as_me:2857: result: $cf_with_cxx" >&5
2858 echo "${ECHO_T}$cf_with_cxx" >&6
2859 if test "X$cf_with_cxx" = Xno ; then
2860         CXX=""
2861         GXX=""
2862 else
2863         # with autoconf 2.13, we can change the error to a warning:
2864                 ac_ext=cc
2865 ac_cpp='$CXXCPP $CPPFLAGS'
2866 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2867 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2868 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
2869 ac_main_return=return
2870 if test -n "$ac_tool_prefix"; then
2871   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2872   do
2873     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2874 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2875 echo "$as_me:2875: checking for $ac_word" >&5
2876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2877 if test "${ac_cv_prog_CXX+set}" = set; then
2878   echo $ECHO_N "(cached) $ECHO_C" >&6
2879 else
2880   if test -n "$CXX"; then
2881   ac_cv_prog_CXX="$CXX" # Let the user override the test.
2882 else
2883   ac_save_IFS=$IFS; IFS=$ac_path_separator
2884 ac_dummy="$PATH"
2885 for ac_dir in $ac_dummy; do
2886   IFS=$ac_save_IFS
2887   test -z "$ac_dir" && ac_dir=.
2888   $as_executable_p "$ac_dir/$ac_word" || continue
2889 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
2890 echo "$as_me:2890: found $ac_dir/$ac_word" >&5
2891 break
2892 done
2893
2894 fi
2895 fi
2896 CXX=$ac_cv_prog_CXX
2897 if test -n "$CXX"; then
2898   echo "$as_me:2898: result: $CXX" >&5
2899 echo "${ECHO_T}$CXX" >&6
2900 else
2901   echo "$as_me:2901: result: no" >&5
2902 echo "${ECHO_T}no" >&6
2903 fi
2904
2905     test -n "$CXX" && break
2906   done
2907 fi
2908 if test -z "$CXX"; then
2909   ac_ct_CXX=$CXX
2910   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
2911 do
2912   # Extract the first word of "$ac_prog", so it can be a program name with args.
2913 set dummy $ac_prog; ac_word=$2
2914 echo "$as_me:2914: checking for $ac_word" >&5
2915 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2916 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
2917   echo $ECHO_N "(cached) $ECHO_C" >&6
2918 else
2919   if test -n "$ac_ct_CXX"; then
2920   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
2921 else
2922   ac_save_IFS=$IFS; IFS=$ac_path_separator
2923 ac_dummy="$PATH"
2924 for ac_dir in $ac_dummy; do
2925   IFS=$ac_save_IFS
2926   test -z "$ac_dir" && ac_dir=.
2927   $as_executable_p "$ac_dir/$ac_word" || continue
2928 ac_cv_prog_ac_ct_CXX="$ac_prog"
2929 echo "$as_me:2929: found $ac_dir/$ac_word" >&5
2930 break
2931 done
2932
2933 fi
2934 fi
2935 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
2936 if test -n "$ac_ct_CXX"; then
2937   echo "$as_me:2937: result: $ac_ct_CXX" >&5
2938 echo "${ECHO_T}$ac_ct_CXX" >&6
2939 else
2940   echo "$as_me:2940: result: no" >&5
2941 echo "${ECHO_T}no" >&6
2942 fi
2943
2944   test -n "$ac_ct_CXX" && break
2945 done
2946 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
2947
2948   CXX=$ac_ct_CXX
2949 fi
2950
2951 # Provide some information about the compiler.
2952 echo "$as_me:2952:" \
2953      "checking for C++ compiler version" >&5
2954 ac_compiler=`set X $ac_compile; echo $2`
2955 { (eval echo "$as_me:2955: \"$ac_compiler --version </dev/null >&5\"") >&5
2956   (eval $ac_compiler --version </dev/null >&5) 2>&5
2957   ac_status=$?
2958   echo "$as_me:2958: \$? = $ac_status" >&5
2959   (exit $ac_status); }
2960 { (eval echo "$as_me:2960: \"$ac_compiler -v </dev/null >&5\"") >&5
2961   (eval $ac_compiler -v </dev/null >&5) 2>&5
2962   ac_status=$?
2963   echo "$as_me:2963: \$? = $ac_status" >&5
2964   (exit $ac_status); }
2965 { (eval echo "$as_me:2965: \"$ac_compiler -V </dev/null >&5\"") >&5
2966   (eval $ac_compiler -V </dev/null >&5) 2>&5
2967   ac_status=$?
2968   echo "$as_me:2968: \$? = $ac_status" >&5
2969   (exit $ac_status); }
2970
2971 echo "$as_me:2971: checking whether we are using the GNU C++ compiler" >&5
2972 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
2973 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
2974   echo $ECHO_N "(cached) $ECHO_C" >&6
2975 else
2976   cat >conftest.$ac_ext <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979
2980 int
2981 main ()
2982 {
2983 #ifndef __GNUC__
2984        choke me
2985 #endif
2986
2987   ;
2988   return 0;
2989 }
2990 _ACEOF
2991 rm -f conftest.$ac_objext
2992 if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993   (eval $ac_compile) 2>&5
2994   ac_status=$?
2995   echo "$as_me:2995: \$? = $ac_status" >&5
2996   (exit $ac_status); } &&
2997          { ac_try='test -s conftest.$ac_objext'
2998   { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999   (eval $ac_try) 2>&5
3000   ac_status=$?
3001   echo "$as_me:3001: \$? = $ac_status" >&5
3002   (exit $ac_status); }; }; then
3003   ac_compiler_gnu=yes
3004 else
3005   echo "$as_me: failed program was:" >&5
3006 cat conftest.$ac_ext >&5
3007 ac_compiler_gnu=no
3008 fi
3009 rm -f conftest.$ac_objext conftest.$ac_ext
3010 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3011
3012 fi
3013 echo "$as_me:3013: result: $ac_cv_cxx_compiler_gnu" >&5
3014 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3015 GXX=`test $ac_compiler_gnu = yes && echo yes`
3016 ac_test_CXXFLAGS=${CXXFLAGS+set}
3017 ac_save_CXXFLAGS=$CXXFLAGS
3018 CXXFLAGS="-g"
3019 echo "$as_me:3019: checking whether $CXX accepts -g" >&5
3020 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3021 if test "${ac_cv_prog_cxx_g+set}" = set; then
3022   echo $ECHO_N "(cached) $ECHO_C" >&6
3023 else
3024   cat >conftest.$ac_ext <<_ACEOF
3025 #line 3025 "configure"
3026 #include "confdefs.h"
3027
3028 int
3029 main ()
3030 {
3031
3032   ;
3033   return 0;
3034 }
3035 _ACEOF
3036 rm -f conftest.$ac_objext
3037 if { (eval echo "$as_me:3037: \"$ac_compile\"") >&5
3038   (eval $ac_compile) 2>&5
3039   ac_status=$?
3040   echo "$as_me:3040: \$? = $ac_status" >&5
3041   (exit $ac_status); } &&
3042          { ac_try='test -s conftest.$ac_objext'
3043   { (eval echo "$as_me:3043: \"$ac_try\"") >&5
3044   (eval $ac_try) 2>&5
3045   ac_status=$?
3046   echo "$as_me:3046: \$? = $ac_status" >&5
3047   (exit $ac_status); }; }; then
3048   ac_cv_prog_cxx_g=yes
3049 else
3050   echo "$as_me: failed program was:" >&5
3051 cat conftest.$ac_ext >&5
3052 ac_cv_prog_cxx_g=no
3053 fi
3054 rm -f conftest.$ac_objext conftest.$ac_ext
3055 fi
3056 echo "$as_me:3056: result: $ac_cv_prog_cxx_g" >&5
3057 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3058 if test "$ac_test_CXXFLAGS" = set; then
3059   CXXFLAGS=$ac_save_CXXFLAGS
3060 elif test $ac_cv_prog_cxx_g = yes; then
3061   if test "$GXX" = yes; then
3062     CXXFLAGS="-g -O2"
3063   else
3064     CXXFLAGS="-g"
3065   fi
3066 else
3067   if test "$GXX" = yes; then
3068     CXXFLAGS="-O2"
3069   else
3070     CXXFLAGS=
3071   fi
3072 fi
3073 for ac_declaration in \
3074    ''\
3075    '#include <stdlib.h>' \
3076    'extern "C" void std::exit (int) throw (); using std::exit;' \
3077    'extern "C" void std::exit (int); using std::exit;' \
3078    'extern "C" void exit (int) throw ();' \
3079    'extern "C" void exit (int);' \
3080    'void exit (int);'
3081 do
3082   cat >conftest.$ac_ext <<_ACEOF
3083 #line 3083 "configure"
3084 #include "confdefs.h"
3085 #include <stdlib.h>
3086 $ac_declaration
3087 int
3088 main ()
3089 {
3090 exit (42);
3091   ;
3092   return 0;
3093 }
3094 _ACEOF
3095 rm -f conftest.$ac_objext
3096 if { (eval echo "$as_me:3096: \"$ac_compile\"") >&5
3097   (eval $ac_compile) 2>&5
3098   ac_status=$?
3099   echo "$as_me:3099: \$? = $ac_status" >&5
3100   (exit $ac_status); } &&
3101          { ac_try='test -s conftest.$ac_objext'
3102   { (eval echo "$as_me:3102: \"$ac_try\"") >&5
3103   (eval $ac_try) 2>&5
3104   ac_status=$?
3105   echo "$as_me:3105: \$? = $ac_status" >&5
3106   (exit $ac_status); }; }; then
3107   :
3108 else
3109   echo "$as_me: failed program was:" >&5
3110 cat conftest.$ac_ext >&5
3111 continue
3112 fi
3113 rm -f conftest.$ac_objext conftest.$ac_ext
3114   cat >conftest.$ac_ext <<_ACEOF
3115 #line 3115 "configure"
3116 #include "confdefs.h"
3117 $ac_declaration
3118 int
3119 main ()
3120 {
3121 exit (42);
3122   ;
3123   return 0;
3124 }
3125 _ACEOF
3126 rm -f conftest.$ac_objext
3127 if { (eval echo "$as_me:3127: \"$ac_compile\"") >&5
3128   (eval $ac_compile) 2>&5
3129   ac_status=$?
3130   echo "$as_me:3130: \$? = $ac_status" >&5
3131   (exit $ac_status); } &&
3132          { ac_try='test -s conftest.$ac_objext'
3133   { (eval echo "$as_me:3133: \"$ac_try\"") >&5
3134   (eval $ac_try) 2>&5
3135   ac_status=$?
3136   echo "$as_me:3136: \$? = $ac_status" >&5
3137   (exit $ac_status); }; }; then
3138   break
3139 else
3140   echo "$as_me: failed program was:" >&5
3141 cat conftest.$ac_ext >&5
3142 fi
3143 rm -f conftest.$ac_objext conftest.$ac_ext
3144 done
3145 rm -rf conftest*
3146 if test -n "$ac_declaration"; then
3147   echo '#ifdef __cplusplus' >>confdefs.h
3148   echo $ac_declaration      >>confdefs.h
3149   echo '#endif'             >>confdefs.h
3150 fi
3151
3152 ac_ext=c
3153 ac_cpp='$CPP $CPPFLAGS'
3154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3157 ac_main_return=return
3158
3159                 # autoconf 2.5x removed the error - by hardcoding it to g++.
3160         if test "$CXX" = "g++" ; then
3161                 # Extract the first word of "g++", so it can be a program name with args.
3162 set dummy g++; ac_word=$2
3163 echo "$as_me:3163: checking for $ac_word" >&5
3164 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3165 if test "${ac_cv_path_CXX+set}" = set; then
3166   echo $ECHO_N "(cached) $ECHO_C" >&6
3167 else
3168   case $CXX in
3169   [\\/]* | ?:[\\/]*)
3170   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3171   ;;
3172   *)
3173   ac_save_IFS=$IFS; IFS=$ac_path_separator
3174 ac_dummy="$PATH"
3175 for ac_dir in $ac_dummy; do
3176   IFS=$ac_save_IFS
3177   test -z "$ac_dir" && ac_dir=.
3178   if $as_executable_p "$ac_dir/$ac_word"; then
3179    ac_cv_path_CXX="$ac_dir/$ac_word"
3180    echo "$as_me:3180: found $ac_dir/$ac_word" >&5
3181    break
3182 fi
3183 done
3184
3185   ;;
3186 esac
3187 fi
3188 CXX=$ac_cv_path_CXX
3189
3190 if test -n "$CXX"; then
3191   echo "$as_me:3191: result: $CXX" >&5
3192 echo "${ECHO_T}$CXX" >&6
3193 else
3194   echo "$as_me:3194: result: no" >&5
3195 echo "${ECHO_T}no" >&6
3196 fi
3197
3198         fi
3199         if test "$CXX" = "g++" ; then
3200                 { echo "$as_me:3200: WARNING: ignoring hardcoded g++" >&5
3201 echo "$as_me: WARNING: ignoring hardcoded g++" >&2;}
3202                 cf_with_cxx=no; CXX=""; GXX="";
3203         fi
3204 fi
3205
3206 GXX_VERSION=none
3207 if test "$GXX" = yes; then
3208         echo "$as_me:3208: checking version of g++" >&5
3209 echo $ECHO_N "checking version of g++... $ECHO_C" >&6
3210         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3211         test -z "$GXX_VERSION" && GXX_VERSION=unknown
3212         echo "$as_me:3212: result: $GXX_VERSION" >&5
3213 echo "${ECHO_T}$GXX_VERSION" >&6
3214 fi
3215
3216 case $GXX_VERSION in
3217 1*|2.[0-6]*)
3218         # GXX=""; CXX=""; ac_cv_prog_gxx=no
3219         # cf_cxx_library=no
3220         { echo "$as_me:3220: WARNING: templates do not work" >&5
3221 echo "$as_me: WARNING: templates do not work" >&2;}
3222         ;;
3223 esac
3224
3225 echo "$as_me:3225: checking if you want to build C++ binding and demo" >&5
3226 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3227
3228 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3229 if test "${with_cxx_binding+set}" = set; then
3230   withval="$with_cxx_binding"
3231   cf_with_cxx_binding=$withval
3232 else
3233   cf_with_cxx_binding=$cf_with_cxx
3234 fi;
3235 echo "$as_me:3235: result: $cf_with_cxx_binding" >&5
3236 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3237
3238 echo "$as_me:3238: checking if you want to build with Ada95" >&5
3239 echo $ECHO_N "checking if you want to build with Ada95... $ECHO_C" >&6
3240
3241 # Check whether --with-ada or --without-ada was given.
3242 if test "${with_ada+set}" = set; then
3243   withval="$with_ada"
3244   cf_with_ada=$withval
3245 else
3246   cf_with_ada=yes
3247 fi;
3248 echo "$as_me:3248: result: $cf_with_ada" >&5
3249 echo "${ECHO_T}$cf_with_ada" >&6
3250
3251 echo "$as_me:3251: checking if you want to install manpages" >&5
3252 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3253
3254 # Check whether --with-manpages or --without-manpages was given.
3255 if test "${with_manpages+set}" = set; then
3256   withval="$with_manpages"
3257   cf_with_manpages=$withval
3258 else
3259   cf_with_manpages=yes
3260 fi;
3261 echo "$as_me:3261: result: $cf_with_manpages" >&5
3262 echo "${ECHO_T}$cf_with_manpages" >&6
3263
3264 echo "$as_me:3264: checking if you want to build programs such as tic" >&5
3265 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3266
3267 # Check whether --with-progs or --without-progs was given.
3268 if test "${with_progs+set}" = set; then
3269   withval="$with_progs"
3270   cf_with_progs=$withval
3271 else
3272   cf_with_progs=yes
3273 fi;
3274 echo "$as_me:3274: result: $cf_with_progs" >&5
3275 echo "${ECHO_T}$cf_with_progs" >&6
3276
3277 echo "$as_me:3277: checking if you want to build test-programs" >&5
3278 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3279
3280 # Check whether --with-tests or --without-tests was given.
3281 if test "${with_tests+set}" = set; then
3282   withval="$with_tests"
3283   cf_with_tests=$withval
3284 else
3285   cf_with_tests=yes
3286 fi;
3287 echo "$as_me:3287: result: $cf_with_tests" >&5
3288 echo "${ECHO_T}$cf_with_tests" >&6
3289
3290 echo "$as_me:3290: checking if you wish to install curses.h" >&5
3291 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3292
3293 # Check whether --with-curses-h or --without-curses-h was given.
3294 if test "${with_curses_h+set}" = set; then
3295   withval="$with_curses_h"
3296   with_curses_h=$withval
3297 else
3298   with_curses_h=yes
3299 fi;
3300 echo "$as_me:3300: result: $with_curses_h" >&5
3301 echo "${ECHO_T}$with_curses_h" >&6
3302
3303 modules_to_build="ncurses"
3304 if test "X$cf_with_progs" != Xno ; then
3305 modules_to_build="$modules_to_build progs tack"
3306 fi
3307 modules_to_build="$modules_to_build panel menu form"
3308
3309 test "$program_prefix" != NONE &&
3310   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3311 # Use a double $ so make ignores it.
3312 test "$program_suffix" != NONE &&
3313   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3314 # Double any \ or $.  echo might interpret backslashes.
3315 # By default was `s,x,x', remove it if useless.
3316 cat <<\_ACEOF >conftest.sed
3317 s/[\\$]/&&/g;s/;s,x,x,$//
3318 _ACEOF
3319 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3320 rm conftest.sed
3321
3322 for ac_prog in mawk gawk nawk awk
3323 do
3324   # Extract the first word of "$ac_prog", so it can be a program name with args.
3325 set dummy $ac_prog; ac_word=$2
3326 echo "$as_me:3326: checking for $ac_word" >&5
3327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3328 if test "${ac_cv_prog_AWK+set}" = set; then
3329   echo $ECHO_N "(cached) $ECHO_C" >&6
3330 else
3331   if test -n "$AWK"; then
3332   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3333 else
3334   ac_save_IFS=$IFS; IFS=$ac_path_separator
3335 ac_dummy="$PATH"
3336 for ac_dir in $ac_dummy; do
3337   IFS=$ac_save_IFS
3338   test -z "$ac_dir" && ac_dir=.
3339   $as_executable_p "$ac_dir/$ac_word" || continue
3340 ac_cv_prog_AWK="$ac_prog"
3341 echo "$as_me:3341: found $ac_dir/$ac_word" >&5
3342 break
3343 done
3344
3345 fi
3346 fi
3347 AWK=$ac_cv_prog_AWK
3348 if test -n "$AWK"; then
3349   echo "$as_me:3349: result: $AWK" >&5
3350 echo "${ECHO_T}$AWK" >&6
3351 else
3352   echo "$as_me:3352: result: no" >&5
3353 echo "${ECHO_T}no" >&6
3354 fi
3355
3356   test -n "$AWK" && break
3357 done
3358
3359 test -z "$AWK" && { { echo "$as_me:3359: error: No awk program found" >&5
3360 echo "$as_me: error: No awk program found" >&2;}
3361    { (exit 1); exit 1; }; }
3362
3363 echo "$as_me:3363: checking for egrep" >&5
3364 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3365 if test "${ac_cv_prog_egrep+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   if echo a | (grep -E '(a|b)') >/dev/null 2>&1
3369     then ac_cv_prog_egrep='grep -E'
3370     else ac_cv_prog_egrep='egrep'
3371     fi
3372 fi
3373 echo "$as_me:3373: result: $ac_cv_prog_egrep" >&5
3374 echo "${ECHO_T}$ac_cv_prog_egrep" >&6
3375  EGREP=$ac_cv_prog_egrep
3376
3377 test -z "$EGREP" && { { echo "$as_me:3377: error: No egrep program found" >&5
3378 echo "$as_me: error: No egrep program found" >&2;}
3379    { (exit 1); exit 1; }; }
3380
3381 # Find a good install program.  We prefer a C program (faster),
3382 # so one script is as good as another.  But avoid the broken or
3383 # incompatible versions:
3384 # SysV /etc/install, /usr/sbin/install
3385 # SunOS /usr/etc/install
3386 # IRIX /sbin/install
3387 # AIX /bin/install
3388 # AmigaOS /C/install, which installs bootblocks on floppy discs
3389 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3390 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3391 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3392 # ./install, which can be erroneously created by make from ./install.sh.
3393 echo "$as_me:3393: checking for a BSD compatible install" >&5
3394 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3395 if test -z "$INSTALL"; then
3396 if test "${ac_cv_path_install+set}" = set; then
3397   echo $ECHO_N "(cached) $ECHO_C" >&6
3398 else
3399     ac_save_IFS=$IFS; IFS=$ac_path_separator
3400   for ac_dir in $PATH; do
3401     IFS=$ac_save_IFS
3402     # Account for people who put trailing slashes in PATH elements.
3403     case $ac_dir/ in
3404     / | ./ | .// | /cC/* \
3405     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3406     | /usr/ucb/* ) ;;
3407     *)
3408       # OSF1 and SCO ODT 3.0 have their own names for install.
3409       # Don't use installbsd from OSF since it installs stuff as root
3410       # by default.
3411       for ac_prog in ginstall scoinst install; do
3412         if $as_executable_p "$ac_dir/$ac_prog"; then
3413           if test $ac_prog = install &&
3414             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3415             # AIX install.  It has an incompatible calling convention.
3416             :
3417           elif test $ac_prog = install &&
3418             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3419             # program-specific install script used by HP pwplus--don't use.
3420             :
3421           else
3422             ac_cv_path_install="$ac_dir/$ac_prog -c"
3423             break 2
3424           fi
3425         fi
3426       done
3427       ;;
3428     esac
3429   done
3430
3431 fi
3432   if test "${ac_cv_path_install+set}" = set; then
3433     INSTALL=$ac_cv_path_install
3434   else
3435     # As a last resort, use the slow shell script.  We don't cache a
3436     # path for INSTALL within a source directory, because that will
3437     # break other packages using the cache if that directory is
3438     # removed, or if the path is relative.
3439     INSTALL=$ac_install_sh
3440   fi
3441 fi
3442 echo "$as_me:3442: result: $INSTALL" >&5
3443 echo "${ECHO_T}$INSTALL" >&6
3444
3445 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3446 # It thinks the first close brace ends the variable substitution.
3447 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3448
3449 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3450
3451 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3452
3453 case $INSTALL in
3454 /*)
3455   ;;
3456 *)
3457   cf_dir=`echo $INSTALL | sed -e 's%/[^/]*$%%'`
3458   test -z "$cf_dir" && cf_dir=.
3459   INSTALL=`cd $cf_dir && pwd`/`echo $INSTALL | sed -e 's%^.*/%%'`
3460   ;;
3461 esac
3462
3463 for ac_prog in tdlint lint alint splint lclint
3464 do
3465   # Extract the first word of "$ac_prog", so it can be a program name with args.
3466 set dummy $ac_prog; ac_word=$2
3467 echo "$as_me:3467: checking for $ac_word" >&5
3468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3469 if test "${ac_cv_prog_LINT+set}" = set; then
3470   echo $ECHO_N "(cached) $ECHO_C" >&6
3471 else
3472   if test -n "$LINT"; then
3473   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3474 else
3475   ac_save_IFS=$IFS; IFS=$ac_path_separator
3476 ac_dummy="$PATH"
3477 for ac_dir in $ac_dummy; do
3478   IFS=$ac_save_IFS
3479   test -z "$ac_dir" && ac_dir=.
3480   $as_executable_p "$ac_dir/$ac_word" || continue
3481 ac_cv_prog_LINT="$ac_prog"
3482 echo "$as_me:3482: found $ac_dir/$ac_word" >&5
3483 break
3484 done
3485
3486 fi
3487 fi
3488 LINT=$ac_cv_prog_LINT
3489 if test -n "$LINT"; then
3490   echo "$as_me:3490: result: $LINT" >&5
3491 echo "${ECHO_T}$LINT" >&6
3492 else
3493   echo "$as_me:3493: result: no" >&5
3494 echo "${ECHO_T}no" >&6
3495 fi
3496
3497   test -n "$LINT" && break
3498 done
3499
3500 echo "$as_me:3500: checking whether ln -s works" >&5
3501 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3502 LN_S=$as_ln_s
3503 if test "$LN_S" = "ln -s"; then
3504   echo "$as_me:3504: result: yes" >&5
3505 echo "${ECHO_T}yes" >&6
3506 else
3507   echo "$as_me:3507: result: no, using $LN_S" >&5
3508 echo "${ECHO_T}no, using $LN_S" >&6
3509 fi
3510
3511 echo "$as_me:3511: checking if $LN_S -f options work" >&5
3512 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3513
3514 rm -f conf$$.src conf$$dst
3515 echo >conf$$.dst
3516 echo first >conf$$.src
3517 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3518         cf_prog_ln_sf=yes
3519 else
3520         cf_prog_ln_sf=no
3521 fi
3522 rm -f conf$$.dst conf$$src
3523 echo "$as_me:3523: result: $cf_prog_ln_sf" >&5
3524 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3525
3526 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3527
3528 echo "$as_me:3528: checking for long file names" >&5
3529 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3530 if test "${ac_cv_sys_long_file_names+set}" = set; then
3531   echo $ECHO_N "(cached) $ECHO_C" >&6
3532 else
3533   ac_cv_sys_long_file_names=yes
3534 # Test for long file names in all the places we know might matter:
3535 #      .                the current directory, where building will happen
3536 #      $prefix/lib      where we will be installing things
3537 #      $exec_prefix/lib likewise
3538 # eval it to expand exec_prefix.
3539 #      $TMPDIR          if set, where it might want to write temporary files
3540 # if $TMPDIR is not set:
3541 #      /tmp             where it might want to write temporary files
3542 #      /var/tmp         likewise
3543 #      /usr/tmp         likewise
3544 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3545   ac_tmpdirs=$TMPDIR
3546 else
3547   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3548 fi
3549 for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
3550   test -d $ac_dir || continue
3551   test -w $ac_dir || continue # It is less confusing to not echo anything here.
3552   ac_xdir=$ac_dir/cf$$
3553   (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
3554   ac_tf1=$ac_xdir/conftest9012345
3555   ac_tf2=$ac_xdir/conftest9012346
3556   (echo 1 >$ac_tf1) 2>/dev/null
3557   (echo 2 >$ac_tf2) 2>/dev/null
3558   ac_val=`cat $ac_tf1 2>/dev/null`
3559   if test ! -f $ac_tf1 || test "$ac_val" != 1; then
3560     ac_cv_sys_long_file_names=no
3561     rm -rf $ac_xdir 2>/dev/null
3562     break
3563   fi
3564   rm -rf $ac_xdir 2>/dev/null
3565 done
3566 fi
3567 echo "$as_me:3567: result: $ac_cv_sys_long_file_names" >&5
3568 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3569 if test $ac_cv_sys_long_file_names = yes; then
3570
3571 cat >>confdefs.h <<\EOF
3572 #define HAVE_LONG_FILE_NAMES 1
3573 EOF
3574
3575 fi
3576
3577 # if we find pkg-config, check if we should install the ".pc" files.
3578
3579 echo "$as_me:3579: checking if you want to use pkg-config" >&5
3580 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3581
3582 # Check whether --with-pkg-config or --without-pkg-config was given.
3583 if test "${with_pkg_config+set}" = set; then
3584   withval="$with_pkg_config"
3585   cf_pkg_config=$withval
3586 else
3587   cf_pkg_config=yes
3588 fi;
3589 echo "$as_me:3589: result: $cf_pkg_config" >&5
3590 echo "${ECHO_T}$cf_pkg_config" >&6
3591
3592 case $cf_pkg_config in #(vi
3593 no) #(vi
3594         PKG_CONFIG=none
3595         ;;
3596 yes) #(vi
3597
3598 if test -n "$ac_tool_prefix"; then
3599   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
3600 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
3601 echo "$as_me:3601: checking for $ac_word" >&5
3602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3603 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
3604   echo $ECHO_N "(cached) $ECHO_C" >&6
3605 else
3606   case $PKG_CONFIG in
3607   [\\/]* | ?:[\\/]*)
3608   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
3609   ;;
3610   *)
3611   ac_save_IFS=$IFS; IFS=$ac_path_separator
3612 ac_dummy="$PATH"
3613 for ac_dir in $ac_dummy; do
3614   IFS=$ac_save_IFS
3615   test -z "$ac_dir" && ac_dir=.
3616   if $as_executable_p "$ac_dir/$ac_word"; then
3617    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
3618    echo "$as_me:3618: found $ac_dir/$ac_word" >&5
3619    break
3620 fi
3621 done
3622
3623   ;;
3624 esac
3625 fi
3626 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
3627
3628 if test -n "$PKG_CONFIG"; then
3629   echo "$as_me:3629: result: $PKG_CONFIG" >&5
3630 echo "${ECHO_T}$PKG_CONFIG" >&6
3631 else
3632   echo "$as_me:3632: result: no" >&5
3633 echo "${ECHO_T}no" >&6
3634 fi
3635
3636 fi
3637 if test -z "$ac_cv_path_PKG_CONFIG"; then
3638   ac_pt_PKG_CONFIG=$PKG_CONFIG
3639   # Extract the first word of "pkg-config", so it can be a program name with args.
3640 set dummy pkg-config; ac_word=$2
3641 echo "$as_me:3641: checking for $ac_word" >&5
3642 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3643 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
3644   echo $ECHO_N "(cached) $ECHO_C" >&6
3645 else
3646   case $ac_pt_PKG_CONFIG in
3647   [\\/]* | ?:[\\/]*)
3648   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
3649   ;;
3650   *)
3651   ac_save_IFS=$IFS; IFS=$ac_path_separator
3652 ac_dummy="$PATH"
3653 for ac_dir in $ac_dummy; do
3654   IFS=$ac_save_IFS
3655   test -z "$ac_dir" && ac_dir=.
3656   if $as_executable_p "$ac_dir/$ac_word"; then
3657    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
3658    echo "$as_me:3658: found $ac_dir/$ac_word" >&5
3659    break
3660 fi
3661 done
3662
3663   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
3664   ;;
3665 esac
3666 fi
3667 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
3668
3669 if test -n "$ac_pt_PKG_CONFIG"; then
3670   echo "$as_me:3670: result: $ac_pt_PKG_CONFIG" >&5
3671 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
3672 else
3673   echo "$as_me:3673: result: no" >&5
3674 echo "${ECHO_T}no" >&6
3675 fi
3676
3677   PKG_CONFIG=$ac_pt_PKG_CONFIG
3678 else
3679   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
3680 fi
3681
3682         ;;
3683 *)
3684         PKG_CONFIG=$withval
3685         ;;
3686 esac
3687
3688 test -z "$PKG_CONFIG" && PKG_CONFIG=none
3689 if test "$PKG_CONFIG" != none ; then
3690
3691 if test "x$prefix" != xNONE; then
3692   cf_path_syntax="$prefix"
3693 else
3694   cf_path_syntax="$ac_default_prefix"
3695 fi
3696
3697 case ".$PKG_CONFIG" in #(vi
3698 .\$\(*\)*|.\'*\'*) #(vi
3699   ;;
3700 ..|./*|.\\*) #(vi
3701   ;;
3702 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
3703   ;;
3704 .\${*prefix}*) #(vi
3705   eval PKG_CONFIG="$PKG_CONFIG"
3706   case ".$PKG_CONFIG" in #(vi
3707   .NONE/*)
3708     PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3709     ;;
3710   esac
3711   ;; #(vi
3712 .no|.NONE/*)
3713   PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
3714   ;;
3715 *)
3716   { { echo "$as_me:3716: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
3717 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
3718    { (exit 1); exit 1; }; }
3719   ;;
3720 esac
3721
3722 fi
3723
3724         case $cf_cv_system_name in
3725         os2*)   PATH_SEPARATOR=';'  ;;
3726         *)      PATH_SEPARATOR=':'  ;;
3727         esac
3728
3729 if test "$PKG_CONFIG" != no ; then
3730         echo "$as_me:3730: checking if we should install .pc files for $PKG_CONFIG" >&5
3731 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
3732
3733         # Leave this as something that can be overridden in the environment.
3734         if test -z "$PKG_CONFIG_LIBDIR" ; then
3735                 if test -n "$PKG_CONFIG_PATH" ; then
3736                         for cf_config in `echo "$PKG_CONFIG_PATH" | sed -e 's/'$PATH_SEPARATOR'/ /g'`
3737                         do
3738                                 if test -n "$cf_config" && test -d "$cf_config"
3739                                 then
3740                                         PKG_CONFIG_LIBDIR=$cf_config
3741                                         break
3742                                 fi
3743                         done
3744                 fi
3745                 if test -z "$PKG_CONFIG_LIBDIR" ; then
3746                         cf_path=`echo "$PKG_CONFIG" | sed -e 's,/[^/]*/[^/]*$,,'`
3747                         case x`arch 2>/dev/null` in #(vi
3748                         *64) #(vi
3749                                 for cf_config in $cf_path/lib64 $cf_path/lib32 $cf_path/lib
3750                                 do
3751                                         if test -d $cf_config/pkgconfig
3752                                         then
3753                                                 PKG_CONFIG_LIBDIR=$cf_config/pkgconfig
3754                                                 break
3755                                         fi
3756                                 done
3757                                 ;;
3758                         *)
3759                                 PKG_CONFIG_LIBDIR=$cf_path/lib/pkgconfig
3760                                 ;;
3761                         esac
3762                 fi
3763         else
3764                 PKG_CONFIG_LIBDIR=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/^://' -e 's/:.*//'`
3765         fi
3766         if test -n "$PKG_CONFIG_LIBDIR" && test -d "$PKG_CONFIG_LIBDIR" ; then
3767
3768 # Check whether --enable-pc-files or --disable-pc-files was given.
3769 if test "${enable_pc_files+set}" = set; then
3770   enableval="$enable_pc_files"
3771   enable_pc_files=$enableval
3772 else
3773   enable_pc_files=no
3774 fi;
3775                 echo "$as_me:3775: result: $enable_pc_files" >&5
3776 echo "${ECHO_T}$enable_pc_files" >&6
3777                 test -n "$verbose" && echo "    found library $PKG_CONFIG_LIBDIR" 1>&6
3778
3779 echo "${as_me:-configure}:3779: testing found library $PKG_CONFIG_LIBDIR ..." 1>&5
3780
3781         else
3782                 echo "$as_me:3782: result: no" >&5
3783 echo "${ECHO_T}no" >&6
3784                 { echo "$as_me:3784: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&5
3785 echo "$as_me: WARNING: did not find library $PKG_CONFIG_LIBDIR" >&2;}
3786                 enable_pc_files=no
3787         fi
3788 fi
3789
3790 echo "$as_me:3790: checking if we should assume mixed-case filenames" >&5
3791 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
3792
3793 # Check whether --enable-mixed-case or --disable-mixed-case was given.
3794 if test "${enable_mixed_case+set}" = set; then
3795   enableval="$enable_mixed_case"
3796   enable_mixedcase=$enableval
3797 else
3798   enable_mixedcase=auto
3799 fi;
3800 echo "$as_me:3800: result: $enable_mixedcase" >&5
3801 echo "${ECHO_T}$enable_mixedcase" >&6
3802 if test "$enable_mixedcase" = "auto" ; then
3803
3804 echo "$as_me:3804: checking if filesystem supports mixed-case filenames" >&5
3805 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3806 if test "${cf_cv_mixedcase+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809
3810 if test "$cross_compiling" = yes ; then
3811         case $target_alias in #(vi
3812         *-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-mingw32*|*-uwin*) #(vi
3813                 cf_cv_mixedcase=no
3814                 ;;
3815         *)
3816                 cf_cv_mixedcase=yes
3817                 ;;
3818         esac
3819 else
3820         rm -f conftest CONFTEST
3821         echo test >conftest
3822         if test -f CONFTEST ; then
3823                 cf_cv_mixedcase=no
3824         else
3825                 cf_cv_mixedcase=yes
3826         fi
3827         rm -f conftest CONFTEST
3828 fi
3829
3830 fi
3831 echo "$as_me:3831: result: $cf_cv_mixedcase" >&5
3832 echo "${ECHO_T}$cf_cv_mixedcase" >&6
3833 test "$cf_cv_mixedcase" = yes && cat >>confdefs.h <<\EOF
3834 #define MIXEDCASE_FILENAMES 1
3835 EOF
3836
3837 else
3838     cf_cv_mixedcase=$enable_mixedcase
3839     if test "$enable_mixedcase" = "yes" ; then
3840         cat >>confdefs.h <<\EOF
3841 #define MIXEDCASE_FILENAMES 1
3842 EOF
3843
3844     fi
3845 fi
3846
3847 # do this after mixed-case option (tags/TAGS is not as important as tic).
3848 echo "$as_me:3848: checking whether ${MAKE-make} sets \${MAKE}" >&5
3849 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
3850 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
3851 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
3852   echo $ECHO_N "(cached) $ECHO_C" >&6
3853 else
3854   cat >conftest.make <<\EOF
3855 all:
3856         @echo 'ac_maketemp="${MAKE}"'
3857 EOF
3858 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
3859 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
3860 if test -n "$ac_maketemp"; then
3861   eval ac_cv_prog_make_${ac_make}_set=yes
3862 else
3863   eval ac_cv_prog_make_${ac_make}_set=no
3864 fi
3865 rm -f conftest.make
3866 fi
3867 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
3868   echo "$as_me:3868: result: yes" >&5
3869 echo "${ECHO_T}yes" >&6
3870   SET_MAKE=
3871 else
3872   echo "$as_me:3872: result: no" >&5
3873 echo "${ECHO_T}no" >&6
3874   SET_MAKE="MAKE=${MAKE-make}"
3875 fi
3876
3877 for ac_prog in exctags ctags
3878 do
3879   # Extract the first word of "$ac_prog", so it can be a program name with args.
3880 set dummy $ac_prog; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_prog_CTAGS+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   if test -n "$CTAGS"; then
3887   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3888 else
3889   ac_save_IFS=$IFS; IFS=$ac_path_separator
3890 ac_dummy="$PATH"
3891 for ac_dir in $ac_dummy; do
3892   IFS=$ac_save_IFS
3893   test -z "$ac_dir" && ac_dir=.
3894   $as_executable_p "$ac_dir/$ac_word" || continue
3895 ac_cv_prog_CTAGS="$ac_prog"
3896 echo "$as_me:3896: found $ac_dir/$ac_word" >&5
3897 break
3898 done
3899
3900 fi
3901 fi
3902 CTAGS=$ac_cv_prog_CTAGS
3903 if test -n "$CTAGS"; then
3904   echo "$as_me:3904: result: $CTAGS" >&5
3905 echo "${ECHO_T}$CTAGS" >&6
3906 else
3907   echo "$as_me:3907: result: no" >&5
3908 echo "${ECHO_T}no" >&6
3909 fi
3910
3911   test -n "$CTAGS" && break
3912 done
3913
3914 for ac_prog in exetags etags
3915 do
3916   # Extract the first word of "$ac_prog", so it can be a program name with args.
3917 set dummy $ac_prog; ac_word=$2
3918 echo "$as_me:3918: checking for $ac_word" >&5
3919 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3920 if test "${ac_cv_prog_ETAGS+set}" = set; then
3921   echo $ECHO_N "(cached) $ECHO_C" >&6
3922 else
3923   if test -n "$ETAGS"; then
3924   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3925 else
3926   ac_save_IFS=$IFS; IFS=$ac_path_separator
3927 ac_dummy="$PATH"
3928 for ac_dir in $ac_dummy; do
3929   IFS=$ac_save_IFS
3930   test -z "$ac_dir" && ac_dir=.
3931   $as_executable_p "$ac_dir/$ac_word" || continue
3932 ac_cv_prog_ETAGS="$ac_prog"
3933 echo "$as_me:3933: found $ac_dir/$ac_word" >&5
3934 break
3935 done
3936
3937 fi
3938 fi
3939 ETAGS=$ac_cv_prog_ETAGS
3940 if test -n "$ETAGS"; then
3941   echo "$as_me:3941: result: $ETAGS" >&5
3942 echo "${ECHO_T}$ETAGS" >&6
3943 else
3944   echo "$as_me:3944: result: no" >&5
3945 echo "${ECHO_T}no" >&6
3946 fi
3947
3948   test -n "$ETAGS" && break
3949 done
3950
3951 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3952 set dummy ${CTAGS:-ctags}; ac_word=$2
3953 echo "$as_me:3953: checking for $ac_word" >&5
3954 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3955 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3956   echo $ECHO_N "(cached) $ECHO_C" >&6
3957 else
3958   if test -n "$MAKE_LOWER_TAGS"; then
3959   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3960 else
3961   ac_save_IFS=$IFS; IFS=$ac_path_separator
3962 ac_dummy="$PATH"
3963 for ac_dir in $ac_dummy; do
3964   IFS=$ac_save_IFS
3965   test -z "$ac_dir" && ac_dir=.
3966   $as_executable_p "$ac_dir/$ac_word" || continue
3967 ac_cv_prog_MAKE_LOWER_TAGS="yes"
3968 echo "$as_me:3968: found $ac_dir/$ac_word" >&5
3969 break
3970 done
3971
3972   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3973 fi
3974 fi
3975 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3976 if test -n "$MAKE_LOWER_TAGS"; then
3977   echo "$as_me:3977: result: $MAKE_LOWER_TAGS" >&5
3978 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3979 else
3980   echo "$as_me:3980: result: no" >&5
3981 echo "${ECHO_T}no" >&6
3982 fi
3983
3984 if test "$cf_cv_mixedcase" = yes ; then
3985         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3986 set dummy ${ETAGS:-etags}; ac_word=$2
3987 echo "$as_me:3987: checking for $ac_word" >&5
3988 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3989 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3990   echo $ECHO_N "(cached) $ECHO_C" >&6
3991 else
3992   if test -n "$MAKE_UPPER_TAGS"; then
3993   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3994 else
3995   ac_save_IFS=$IFS; IFS=$ac_path_separator
3996 ac_dummy="$PATH"
3997 for ac_dir in $ac_dummy; do
3998   IFS=$ac_save_IFS
3999   test -z "$ac_dir" && ac_dir=.
4000   $as_executable_p "$ac_dir/$ac_word" || continue
4001 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4002 echo "$as_me:4002: found $ac_dir/$ac_word" >&5
4003 break
4004 done
4005
4006   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4007 fi
4008 fi
4009 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4010 if test -n "$MAKE_UPPER_TAGS"; then
4011   echo "$as_me:4011: result: $MAKE_UPPER_TAGS" >&5
4012 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4013 else
4014   echo "$as_me:4014: result: no" >&5
4015 echo "${ECHO_T}no" >&6
4016 fi
4017
4018 else
4019         MAKE_UPPER_TAGS=no
4020 fi
4021
4022 if test "$MAKE_UPPER_TAGS" = yes ; then
4023         MAKE_UPPER_TAGS=
4024 else
4025         MAKE_UPPER_TAGS="#"
4026 fi
4027
4028 if test "$MAKE_LOWER_TAGS" = yes ; then
4029         MAKE_LOWER_TAGS=
4030 else
4031         MAKE_LOWER_TAGS="#"
4032 fi
4033
4034 echo "$as_me:4034: checking for makeflags variable" >&5
4035 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4036 if test "${cf_cv_makeflags+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039
4040         cf_cv_makeflags=''
4041         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4042         do
4043                 cat >cf_makeflags.tmp <<CF_EOF
4044 SHELL = /bin/sh
4045 all :
4046         @ echo '.$cf_option'
4047 CF_EOF
4048                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[    ]*$,,'`
4049                 case "$cf_result" in
4050                 .*k)
4051                         cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
4052                         case "$cf_result" in
4053                         .*CC=*) cf_cv_makeflags=
4054                                 ;;
4055                         *)      cf_cv_makeflags=$cf_option
4056                                 ;;
4057                         esac
4058                         break
4059                         ;;
4060                 .-)     ;;
4061                 *)      echo "given option \"$cf_option\", no match \"$cf_result\""
4062                         ;;
4063                 esac
4064         done
4065         rm -f cf_makeflags.tmp
4066
4067 fi
4068 echo "$as_me:4068: result: $cf_cv_makeflags" >&5
4069 echo "${ECHO_T}$cf_cv_makeflags" >&6
4070
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4073 set dummy ${ac_tool_prefix}ranlib; 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_RANLIB+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # 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_RANLIB="${ac_tool_prefix}ranlib"
4089 echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090 break
4091 done
4092
4093 fi
4094 fi
4095 RANLIB=$ac_cv_prog_RANLIB
4096 if test -n "$RANLIB"; then
4097   echo "$as_me:4097: result: $RANLIB" >&5
4098 echo "${ECHO_T}$RANLIB" >&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_RANLIB"; then
4106   ac_ct_RANLIB=$RANLIB
4107   # Extract the first word of "ranlib", so it can be a program name with args.
4108 set dummy ranlib; 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_RANLIB+set}" = set; then
4112   echo $ECHO_N "(cached) $ECHO_C" >&6
4113 else
4114   if test -n "$ac_ct_RANLIB"; then
4115   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # 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_RANLIB="ranlib"
4124 echo "$as_me:4124: found $ac_dir/$ac_word" >&5
4125 break
4126 done
4127
4128   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4129 fi
4130 fi
4131 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4132 if test -n "$ac_ct_RANLIB"; then
4133   echo "$as_me:4133: result: $ac_ct_RANLIB" >&5
4134 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4135 else
4136   echo "$as_me:4136: result: no" >&5
4137 echo "${ECHO_T}no" >&6
4138 fi
4139
4140   RANLIB=$ac_ct_RANLIB
4141 else
4142   RANLIB="$ac_cv_prog_RANLIB"
4143 fi
4144
4145 if test -n "$ac_tool_prefix"; then
4146   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4147 set dummy ${ac_tool_prefix}ld; ac_word=$2
4148 echo "$as_me:4148: checking for $ac_word" >&5
4149 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4150 if test "${ac_cv_prog_LD+set}" = set; then
4151   echo $ECHO_N "(cached) $ECHO_C" >&6
4152 else
4153   if test -n "$LD"; then
4154   ac_cv_prog_LD="$LD" # Let the user override the test.
4155 else
4156   ac_save_IFS=$IFS; IFS=$ac_path_separator
4157 ac_dummy="$PATH"
4158 for ac_dir in $ac_dummy; do
4159   IFS=$ac_save_IFS
4160   test -z "$ac_dir" && ac_dir=.
4161   $as_executable_p "$ac_dir/$ac_word" || continue
4162 ac_cv_prog_LD="${ac_tool_prefix}ld"
4163 echo "$as_me:4163: found $ac_dir/$ac_word" >&5
4164 break
4165 done
4166
4167 fi
4168 fi
4169 LD=$ac_cv_prog_LD
4170 if test -n "$LD"; then
4171   echo "$as_me:4171: result: $LD" >&5
4172 echo "${ECHO_T}$LD" >&6
4173 else
4174   echo "$as_me:4174: result: no" >&5
4175 echo "${ECHO_T}no" >&6
4176 fi
4177
4178 fi
4179 if test -z "$ac_cv_prog_LD"; then
4180   ac_ct_LD=$LD
4181   # Extract the first word of "ld", so it can be a program name with args.
4182 set dummy ld; ac_word=$2
4183 echo "$as_me:4183: checking for $ac_word" >&5
4184 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4185 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4186   echo $ECHO_N "(cached) $ECHO_C" >&6
4187 else
4188   if test -n "$ac_ct_LD"; then
4189   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4190 else
4191   ac_save_IFS=$IFS; IFS=$ac_path_separator
4192 ac_dummy="$PATH"
4193 for ac_dir in $ac_dummy; do
4194   IFS=$ac_save_IFS
4195   test -z "$ac_dir" && ac_dir=.
4196   $as_executable_p "$ac_dir/$ac_word" || continue
4197 ac_cv_prog_ac_ct_LD="ld"
4198 echo "$as_me:4198: found $ac_dir/$ac_word" >&5
4199 break
4200 done
4201
4202   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4203 fi
4204 fi
4205 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4206 if test -n "$ac_ct_LD"; then
4207   echo "$as_me:4207: result: $ac_ct_LD" >&5
4208 echo "${ECHO_T}$ac_ct_LD" >&6
4209 else
4210   echo "$as_me:4210: result: no" >&5
4211 echo "${ECHO_T}no" >&6
4212 fi
4213
4214   LD=$ac_ct_LD
4215 else
4216   LD="$ac_cv_prog_LD"
4217 fi
4218
4219 if test -n "$ac_tool_prefix"; then
4220   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4221 set dummy ${ac_tool_prefix}ar; ac_word=$2
4222 echo "$as_me:4222: checking for $ac_word" >&5
4223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4224 if test "${ac_cv_prog_AR+set}" = set; then
4225   echo $ECHO_N "(cached) $ECHO_C" >&6
4226 else
4227   if test -n "$AR"; then
4228   ac_cv_prog_AR="$AR" # Let the user override the test.
4229 else
4230   ac_save_IFS=$IFS; IFS=$ac_path_separator
4231 ac_dummy="$PATH"
4232 for ac_dir in $ac_dummy; do
4233   IFS=$ac_save_IFS
4234   test -z "$ac_dir" && ac_dir=.
4235   $as_executable_p "$ac_dir/$ac_word" || continue
4236 ac_cv_prog_AR="${ac_tool_prefix}ar"
4237 echo "$as_me:4237: found $ac_dir/$ac_word" >&5
4238 break
4239 done
4240
4241 fi
4242 fi
4243 AR=$ac_cv_prog_AR
4244 if test -n "$AR"; then
4245   echo "$as_me:4245: result: $AR" >&5
4246 echo "${ECHO_T}$AR" >&6
4247 else
4248   echo "$as_me:4248: result: no" >&5
4249 echo "${ECHO_T}no" >&6
4250 fi
4251
4252 fi
4253 if test -z "$ac_cv_prog_AR"; then
4254   ac_ct_AR=$AR
4255   # Extract the first word of "ar", so it can be a program name with args.
4256 set dummy ar; ac_word=$2
4257 echo "$as_me:4257: checking for $ac_word" >&5
4258 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4259 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4260   echo $ECHO_N "(cached) $ECHO_C" >&6
4261 else
4262   if test -n "$ac_ct_AR"; then
4263   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4264 else
4265   ac_save_IFS=$IFS; IFS=$ac_path_separator
4266 ac_dummy="$PATH"
4267 for ac_dir in $ac_dummy; do
4268   IFS=$ac_save_IFS
4269   test -z "$ac_dir" && ac_dir=.
4270   $as_executable_p "$ac_dir/$ac_word" || continue
4271 ac_cv_prog_ac_ct_AR="ar"
4272 echo "$as_me:4272: found $ac_dir/$ac_word" >&5
4273 break
4274 done
4275
4276   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4277 fi
4278 fi
4279 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4280 if test -n "$ac_ct_AR"; then
4281   echo "$as_me:4281: result: $ac_ct_AR" >&5
4282 echo "${ECHO_T}$ac_ct_AR" >&6
4283 else
4284   echo "$as_me:4284: result: no" >&5
4285 echo "${ECHO_T}no" >&6
4286 fi
4287
4288   AR=$ac_ct_AR
4289 else
4290   AR="$ac_cv_prog_AR"
4291 fi
4292
4293 if test -n "$ac_tool_prefix"; then
4294   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4295 set dummy ${ac_tool_prefix}ar; ac_word=$2
4296 echo "$as_me:4296: checking for $ac_word" >&5
4297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4298 if test "${ac_cv_prog_AR+set}" = set; then
4299   echo $ECHO_N "(cached) $ECHO_C" >&6
4300 else
4301   if test -n "$AR"; then
4302   ac_cv_prog_AR="$AR" # Let the user override the test.
4303 else
4304   ac_save_IFS=$IFS; IFS=$ac_path_separator
4305 ac_dummy="$PATH"
4306 for ac_dir in $ac_dummy; do
4307   IFS=$ac_save_IFS
4308   test -z "$ac_dir" && ac_dir=.
4309   $as_executable_p "$ac_dir/$ac_word" || continue
4310 ac_cv_prog_AR="${ac_tool_prefix}ar"
4311 echo "$as_me:4311: found $ac_dir/$ac_word" >&5
4312 break
4313 done
4314
4315 fi
4316 fi
4317 AR=$ac_cv_prog_AR
4318 if test -n "$AR"; then
4319   echo "$as_me:4319: result: $AR" >&5
4320 echo "${ECHO_T}$AR" >&6
4321 else
4322   echo "$as_me:4322: result: no" >&5
4323 echo "${ECHO_T}no" >&6
4324 fi
4325
4326 fi
4327 if test -z "$ac_cv_prog_AR"; then
4328   ac_ct_AR=$AR
4329   # Extract the first word of "ar", so it can be a program name with args.
4330 set dummy ar; ac_word=$2
4331 echo "$as_me:4331: checking for $ac_word" >&5
4332 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4333 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4334   echo $ECHO_N "(cached) $ECHO_C" >&6
4335 else
4336   if test -n "$ac_ct_AR"; then
4337   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4338 else
4339   ac_save_IFS=$IFS; IFS=$ac_path_separator
4340 ac_dummy="$PATH"
4341 for ac_dir in $ac_dummy; do
4342   IFS=$ac_save_IFS
4343   test -z "$ac_dir" && ac_dir=.
4344   $as_executable_p "$ac_dir/$ac_word" || continue
4345 ac_cv_prog_ac_ct_AR="ar"
4346 echo "$as_me:4346: found $ac_dir/$ac_word" >&5
4347 break
4348 done
4349
4350   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4351 fi
4352 fi
4353 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4354 if test -n "$ac_ct_AR"; then
4355   echo "$as_me:4355: result: $ac_ct_AR" >&5
4356 echo "${ECHO_T}$ac_ct_AR" >&6
4357 else
4358   echo "$as_me:4358: result: no" >&5
4359 echo "${ECHO_T}no" >&6
4360 fi
4361
4362   AR=$ac_ct_AR
4363 else
4364   AR="$ac_cv_prog_AR"
4365 fi
4366
4367 echo "$as_me:4367: checking for options to update archives" >&5
4368 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
4369 if test "${cf_cv_ar_flags+set}" = set; then
4370   echo $ECHO_N "(cached) $ECHO_C" >&6
4371 else
4372
4373         cf_cv_ar_flags=unknown
4374         for cf_ar_flags in -curv curv -crv crv -cqv cqv -rv rv
4375         do
4376
4377                 # check if $ARFLAGS already contains this choice
4378                 if test "x$ARFLAGS" != "x" ; then
4379                         cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
4380                         if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
4381                                 cf_cv_ar_flags=
4382                                 break
4383                         fi
4384                 fi
4385
4386                 rm -f conftest.$ac_cv_objext
4387                 rm -f conftest.a
4388
4389                 cat >conftest.$ac_ext <<EOF
4390 #line 4390 "configure"
4391 int     testdata[3] = { 123, 456, 789 };
4392 EOF
4393                 if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394   (eval $ac_compile) 2>&5
4395   ac_status=$?
4396   echo "$as_me:4396: \$? = $ac_status" >&5
4397   (exit $ac_status); } ; then
4398                         echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
4399                         $AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
4400                         if test -f conftest.a ; then
4401                                 cf_cv_ar_flags=$cf_ar_flags
4402                                 break
4403                         fi
4404                 else
4405                         test -n "$verbose" && echo "    cannot compile test-program" 1>&6
4406
4407 echo "${as_me:-configure}:4407: testing cannot compile test-program ..." 1>&5
4408
4409                         break
4410                 fi
4411         done
4412         rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
4413
4414 fi
4415 echo "$as_me:4415: result: $cf_cv_ar_flags" >&5
4416 echo "${ECHO_T}$cf_cv_ar_flags" >&6
4417
4418 if test -n "$ARFLAGS" ; then
4419         if test -n "$cf_cv_ar_flags" ; then
4420                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
4421         fi
4422 else
4423         ARFLAGS=$cf_cv_ar_flags
4424 fi
4425
4426 echo "$as_me:4426: checking if you have specified an install-prefix" >&5
4427 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
4428
4429 # Check whether --with-install-prefix or --without-install-prefix was given.
4430 if test "${with_install_prefix+set}" = set; then
4431   withval="$with_install_prefix"
4432   case "$withval" in #(vi
4433         yes|no) #(vi
4434                 ;;
4435         *)      DESTDIR="$withval"
4436                 ;;
4437         esac
4438 fi;
4439 echo "$as_me:4439: result: $DESTDIR" >&5
4440 echo "${ECHO_T}$DESTDIR" >&6
4441
4442 ###############################################################################
4443
4444 # If we're cross-compiling, allow the user to override the tools and their
4445 # options.  The configure script is oriented toward identifying the host
4446 # compiler, etc., but we need a build compiler to generate parts of the source.
4447
4448 if test "$cross_compiling" = yes ; then
4449
4450         # defaults that we might want to override
4451         : ${BUILD_CFLAGS:=''}
4452         : ${BUILD_CPPFLAGS:=''}
4453         : ${BUILD_LDFLAGS:=''}
4454         : ${BUILD_LIBS:=''}
4455         : ${BUILD_EXEEXT:='$x'}
4456         : ${BUILD_OBJEXT:='o'}
4457
4458 # Check whether --with-build-cc or --without-build-cc was given.
4459 if test "${with_build_cc+set}" = set; then
4460   withval="$with_build_cc"
4461   BUILD_CC="$withval"
4462 else
4463   for ac_prog in gcc cc cl
4464 do
4465   # Extract the first word of "$ac_prog", so it can be a program name with args.
4466 set dummy $ac_prog; ac_word=$2
4467 echo "$as_me:4467: checking for $ac_word" >&5
4468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4469 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
4470   echo $ECHO_N "(cached) $ECHO_C" >&6
4471 else
4472   if test -n "$BUILD_CC"; then
4473   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
4474 else
4475   ac_save_IFS=$IFS; IFS=$ac_path_separator
4476 ac_dummy="$PATH"
4477 for ac_dir in $ac_dummy; do
4478   IFS=$ac_save_IFS
4479   test -z "$ac_dir" && ac_dir=.
4480   $as_executable_p "$ac_dir/$ac_word" || continue
4481 ac_cv_prog_BUILD_CC="$ac_prog"
4482 echo "$as_me:4482: found $ac_dir/$ac_word" >&5
4483 break
4484 done
4485
4486 fi
4487 fi
4488 BUILD_CC=$ac_cv_prog_BUILD_CC
4489 if test -n "$BUILD_CC"; then
4490   echo "$as_me:4490: result: $BUILD_CC" >&5
4491 echo "${ECHO_T}$BUILD_CC" >&6
4492 else
4493   echo "$as_me:4493: result: no" >&5
4494 echo "${ECHO_T}no" >&6
4495 fi
4496
4497   test -n "$BUILD_CC" && break
4498 done
4499
4500 fi;
4501         echo "$as_me:4501: checking for native build C compiler" >&5
4502 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
4503         echo "$as_me:4503: result: $BUILD_CC" >&5
4504 echo "${ECHO_T}$BUILD_CC" >&6
4505
4506         echo "$as_me:4506: checking for native build C preprocessor" >&5
4507 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
4508
4509 # Check whether --with-build-cpp or --without-build-cpp was given.
4510 if test "${with_build_cpp+set}" = set; then
4511   withval="$with_build_cpp"
4512   BUILD_CPP="$withval"
4513 else
4514   BUILD_CPP='${BUILD_CC} -E'
4515 fi;
4516         echo "$as_me:4516: result: $BUILD_CPP" >&5
4517 echo "${ECHO_T}$BUILD_CPP" >&6
4518
4519         echo "$as_me:4519: checking for native build C flags" >&5
4520 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
4521
4522 # Check whether --with-build-cflags or --without-build-cflags was given.
4523 if test "${with_build_cflags+set}" = set; then
4524   withval="$with_build_cflags"
4525   BUILD_CFLAGS="$withval"
4526 fi;
4527         echo "$as_me:4527: result: $BUILD_CFLAGS" >&5
4528 echo "${ECHO_T}$BUILD_CFLAGS" >&6
4529
4530         echo "$as_me:4530: checking for native build C preprocessor-flags" >&5
4531 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
4532
4533 # Check whether --with-build-cppflags or --without-build-cppflags was given.
4534 if test "${with_build_cppflags+set}" = set; then
4535   withval="$with_build_cppflags"
4536   BUILD_CPPFLAGS="$withval"
4537 fi;
4538         echo "$as_me:4538: result: $BUILD_CPPFLAGS" >&5
4539 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
4540
4541         echo "$as_me:4541: checking for native build linker-flags" >&5
4542 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
4543
4544 # Check whether --with-build-ldflags or --without-build-ldflags was given.
4545 if test "${with_build_ldflags+set}" = set; then
4546   withval="$with_build_ldflags"
4547   BUILD_LDFLAGS="$withval"
4548 fi;
4549         echo "$as_me:4549: result: $BUILD_LDFLAGS" >&5
4550 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
4551
4552         echo "$as_me:4552: checking for native build linker-libraries" >&5
4553 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
4554
4555 # Check whether --with-build-libs or --without-build-libs was given.
4556 if test "${with_build_libs+set}" = set; then
4557   withval="$with_build_libs"
4558   BUILD_LIBS="$withval"
4559 fi;
4560         echo "$as_me:4560: result: $BUILD_LIBS" >&5
4561 echo "${ECHO_T}$BUILD_LIBS" >&6
4562
4563         # this assumes we're on Unix.
4564         BUILD_EXEEXT=
4565         BUILD_OBJEXT=o
4566
4567         : ${BUILD_CC:='${CC}'}
4568
4569         if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
4570                 { { echo "$as_me:4570: error: Cross-build requires two compilers.
4571 Use --with-build-cc to specify the native compiler." >&5
4572 echo "$as_me: error: Cross-build requires two compilers.
4573 Use --with-build-cc to specify the native compiler." >&2;}
4574    { (exit 1); exit 1; }; }
4575         fi
4576
4577 else
4578         : ${BUILD_CC:='${CC}'}
4579         : ${BUILD_CPP:='${CPP}'}
4580         : ${BUILD_CFLAGS:='${CFLAGS}'}
4581         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
4582         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
4583         : ${BUILD_LIBS:='${LIBS}'}
4584         : ${BUILD_EXEEXT:='$x'}
4585         : ${BUILD_OBJEXT:='o'}
4586 fi
4587
4588 ###############################################################################
4589
4590 ### Options to allow the user to specify the set of libraries which are used.
4591 ### Use "--without-normal --with-shared" to allow the default model to be
4592 ### shared, for example.
4593 cf_list_models=""
4594
4595 echo "$as_me:4595: checking if libtool -version-number should be used" >&5
4596 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
4597
4598 # Check whether --enable-libtool-version or --disable-libtool-version was given.
4599 if test "${enable_libtool_version+set}" = set; then
4600   enableval="$enable_libtool_version"
4601   test "$enableval" != no && enableval=yes
4602   if test "$enableval" != "yes" ; then
4603     cf_libtool_version=no
4604   else
4605     cf_libtool_version=yes
4606   fi
4607 else
4608   enableval=yes
4609   cf_libtool_version=yes
4610
4611 fi;
4612 echo "$as_me:4612: result: $cf_libtool_version" >&5
4613 echo "${ECHO_T}$cf_libtool_version" >&6
4614
4615 if test "$cf_libtool_version" = yes ; then
4616         LIBTOOL_VERSION="-version-number"
4617 else
4618         LIBTOOL_VERSION="-version-info"
4619 fi
4620
4621 LIBTOOL=
4622
4623 # common library maintenance symbols that are convenient for libtool scripts:
4624 LIB_CREATE='${AR} -cr'
4625 LIB_OBJECT='${OBJECTS}'
4626 LIB_SUFFIX=.a
4627 LIB_PREP="$RANLIB"
4628
4629 # symbols used to prop libtool up to enable it to determine what it should be
4630 # doing:
4631 LIB_CLEAN=
4632 LIB_COMPILE=
4633 LIB_LINK='${CC}'
4634 LIB_INSTALL=
4635 LIB_UNINSTALL=
4636
4637 echo "$as_me:4637: checking if you want to build libraries with libtool" >&5
4638 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
4639
4640 # Check whether --with-libtool or --without-libtool was given.
4641 if test "${with_libtool+set}" = set; then
4642   withval="$with_libtool"
4643   with_libtool=$withval
4644 else
4645   with_libtool=no
4646 fi;
4647 echo "$as_me:4647: result: $with_libtool" >&5
4648 echo "${ECHO_T}$with_libtool" >&6
4649 if test "$with_libtool" != "no"; then
4650
4651         if test "$with_libtool" != "yes" ; then
4652
4653 if test "x$prefix" != xNONE; then
4654   cf_path_syntax="$prefix"
4655 else
4656   cf_path_syntax="$ac_default_prefix"
4657 fi
4658
4659 case ".$with_libtool" in #(vi
4660 .\$\(*\)*|.\'*\'*) #(vi
4661   ;;
4662 ..|./*|.\\*) #(vi
4663   ;;
4664 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
4665   ;;
4666 .\${*prefix}*) #(vi
4667   eval with_libtool="$with_libtool"
4668   case ".$with_libtool" in #(vi
4669   .NONE/*)
4670     with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4671     ;;
4672   esac
4673   ;; #(vi
4674 .no|.NONE/*)
4675   with_libtool=`echo $with_libtool | sed -e s%NONE%$cf_path_syntax%`
4676   ;;
4677 *)
4678   { { echo "$as_me:4678: error: expected a pathname, not \"$with_libtool\"" >&5
4679 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
4680    { (exit 1); exit 1; }; }
4681   ;;
4682 esac
4683
4684                 LIBTOOL=$with_libtool
4685         else
4686                 # Extract the first word of "libtool", so it can be a program name with args.
4687 set dummy libtool; ac_word=$2
4688 echo "$as_me:4688: checking for $ac_word" >&5
4689 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4690 if test "${ac_cv_path_LIBTOOL+set}" = set; then
4691   echo $ECHO_N "(cached) $ECHO_C" >&6
4692 else
4693   case $LIBTOOL in
4694   [\\/]* | ?:[\\/]*)
4695   ac_cv_path_LIBTOOL="$LIBTOOL" # Let the user override the test with a path.
4696   ;;
4697   *)
4698   ac_save_IFS=$IFS; IFS=$ac_path_separator
4699 ac_dummy="$PATH"
4700 for ac_dir in $ac_dummy; do
4701   IFS=$ac_save_IFS
4702   test -z "$ac_dir" && ac_dir=.
4703   if $as_executable_p "$ac_dir/$ac_word"; then
4704    ac_cv_path_LIBTOOL="$ac_dir/$ac_word"
4705    echo "$as_me:4705: found $ac_dir/$ac_word" >&5
4706    break
4707 fi
4708 done
4709
4710   ;;
4711 esac
4712 fi
4713 LIBTOOL=$ac_cv_path_LIBTOOL
4714
4715 if test -n "$LIBTOOL"; then
4716   echo "$as_me:4716: result: $LIBTOOL" >&5
4717 echo "${ECHO_T}$LIBTOOL" >&6
4718 else
4719   echo "$as_me:4719: result: no" >&5
4720 echo "${ECHO_T}no" >&6
4721 fi
4722
4723         fi
4724         if test -z "$LIBTOOL" ; then
4725                 { { echo "$as_me:4725: error: Cannot find libtool" >&5
4726 echo "$as_me: error: Cannot find libtool" >&2;}
4727    { (exit 1); exit 1; }; }
4728         fi
4729         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${DESTDIR}${libdir} ${LIBTOOL_VERSION} `cut -f1 ${srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
4730         LIB_OBJECT='${OBJECTS:.o=.lo}'
4731         LIB_SUFFIX=.la
4732         LIB_CLEAN='${LIBTOOL} --mode=clean'
4733         LIB_COMPILE='${LIBTOOL} --mode=compile'
4734         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
4735         LIB_INSTALL='${LIBTOOL} --mode=install'
4736         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
4737         LIB_PREP=:
4738
4739         # Show the version of libtool
4740         echo "$as_me:4740: checking version of libtool" >&5
4741 echo $ECHO_N "checking version of libtool... $ECHO_C" >&6
4742
4743         # Save the version in a cache variable - this is not entirely a good
4744         # thing, but the version string from libtool is very ugly, and for
4745         # bug reports it might be useful to have the original string. "("
4746         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.].*//'`
4747         echo "$as_me:4747: result: $cf_cv_libtool_version" >&5
4748 echo "${ECHO_T}$cf_cv_libtool_version" >&6
4749         if test -z "$cf_cv_libtool_version" ; then
4750                 { { echo "$as_me:4750: error: This is not GNU libtool" >&5
4751 echo "$as_me: error: This is not GNU libtool" >&2;}
4752    { (exit 1); exit 1; }; }
4753         fi
4754
4755         # special hack to add -no-undefined (which libtool should do for itself)
4756         LT_UNDEF=
4757         case "$cf_cv_system_name" in #(vi
4758         cygwin*|mingw32*|uwin*|aix[4-7]) #(vi
4759                 LT_UNDEF=-no-undefined
4760                 ;;
4761         esac
4762
4763         # special hack to add --tag option for C++ compiler
4764         case $cf_cv_libtool_version in #(vi
4765         1.[5-9]*|[2-9].[0-9.a-z]*) #(vi
4766                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
4767                 LIBTOOL="$LIBTOOL --tag=CC"
4768                 ;;
4769         *)
4770                 LIBTOOL_CXX="$LIBTOOL"
4771                 ;;
4772         esac
4773 else
4774         LIBTOOL=""
4775         LIBTOOL_CXX=""
4776 fi
4777
4778 test -z "$LIBTOOL" && ECHO_LT=
4779
4780 if test "$with_libtool" != "no" ; then
4781
4782 cf_list_models="$cf_list_models libtool"
4783
4784 else
4785
4786 echo "$as_me:4786: checking if you want to build shared libraries" >&5
4787 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
4788
4789 # Check whether --with-shared or --without-shared was given.
4790 if test "${with_shared+set}" = set; then
4791   withval="$with_shared"
4792   with_shared=$withval
4793 else
4794   with_shared=no
4795 fi;
4796 echo "$as_me:4796: result: $with_shared" >&5
4797 echo "${ECHO_T}$with_shared" >&6
4798 test "$with_shared" = "yes" && cf_list_models="$cf_list_models shared"
4799
4800 echo "$as_me:4800: checking if you want to build static libraries" >&5
4801 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
4802
4803 # Check whether --with-normal or --without-normal was given.
4804 if test "${with_normal+set}" = set; then
4805   withval="$with_normal"
4806   with_normal=$withval
4807 else
4808   with_normal=yes
4809 fi;
4810 echo "$as_me:4810: result: $with_normal" >&5
4811 echo "${ECHO_T}$with_normal" >&6
4812 test "$with_normal" = "yes" && cf_list_models="$cf_list_models normal"
4813
4814 echo "$as_me:4814: checking if you want to build debug libraries" >&5
4815 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
4816
4817 # Check whether --with-debug or --without-debug was given.
4818 if test "${with_debug+set}" = set; then
4819   withval="$with_debug"
4820   with_debug=$withval
4821 else
4822   with_debug=yes
4823 fi;
4824 echo "$as_me:4824: result: $with_debug" >&5
4825 echo "${ECHO_T}$with_debug" >&6
4826 test "$with_debug" = "yes" && cf_list_models="$cf_list_models debug"
4827
4828 echo "$as_me:4828: checking if you want to build profiling libraries" >&5
4829 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
4830
4831 # Check whether --with-profile or --without-profile was given.
4832 if test "${with_profile+set}" = set; then
4833   withval="$with_profile"
4834   with_profile=$withval
4835 else
4836   with_profile=no
4837 fi;
4838 echo "$as_me:4838: result: $with_profile" >&5
4839 echo "${ECHO_T}$with_profile" >&6
4840 test "$with_profile" = "yes" && cf_list_models="$cf_list_models profile"
4841
4842 fi
4843
4844 ###############################################################################
4845
4846 echo "$as_me:4846: checking for specified models" >&5
4847 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
4848 test -z "$cf_list_models" && cf_list_models=normal
4849 test "$with_libtool" != "no" && cf_list_models=libtool
4850 echo "$as_me:4850: result: $cf_list_models" >&5
4851 echo "${ECHO_T}$cf_list_models" >&6
4852
4853 ### Use the first model as the default, and save its suffix for use in building
4854 ### up test-applications.
4855 echo "$as_me:4855: checking for default model" >&5
4856 echo $ECHO_N "checking for default model... $ECHO_C" >&6
4857 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
4858 echo "$as_me:4858: result: $DFT_LWR_MODEL" >&5
4859 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
4860
4861 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
4862
4863 TICS_NAME=tic
4864
4865 TINFO_NAME=tinfo
4866
4867 LIB_NAME=ncurses
4868
4869 LIB_DIR=../lib
4870 LIB_2ND=../../lib
4871
4872         case $cf_cv_system_name in #(vi
4873         OS/2*|os2*) #(vi
4874         LIB_PREFIX=''
4875         ;;
4876         *)      LIB_PREFIX='lib'
4877         ;;
4878         esac
4879 cf_prefix=$LIB_PREFIX
4880
4881 LIB_PREFIX=$cf_prefix
4882
4883 LIB_SUFFIX=
4884
4885 ###############################################################################
4886
4887 echo "$as_me:4887: checking if you want to build a separate terminfo library" >&5
4888 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
4889
4890 # Check whether --with-termlib or --without-termlib was given.
4891 if test "${with_termlib+set}" = set; then
4892   withval="$with_termlib"
4893   with_termlib=$withval
4894 else
4895   with_termlib=no
4896 fi;
4897 echo "$as_me:4897: result: $with_termlib" >&5
4898 echo "${ECHO_T}$with_termlib" >&6
4899
4900 echo "$as_me:4900: checking if you want to build a separate tic library" >&5
4901 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
4902
4903 # Check whether --with-ticlib or --without-ticlib was given.
4904 if test "${with_ticlib+set}" = set; then
4905   withval="$with_ticlib"
4906   with_ticlib=$withval
4907 else
4908   with_ticlib=no
4909 fi;
4910 echo "$as_me:4910: result: $with_ticlib" >&5
4911 echo "${ECHO_T}$with_ticlib" >&6
4912
4913 ### Checks for special libraries, must be done up-front.
4914 SHLIB_LIST=""
4915
4916 echo "$as_me:4916: checking if you want to link with the GPM mouse library" >&5
4917 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
4918
4919 # Check whether --with-gpm or --without-gpm was given.
4920 if test "${with_gpm+set}" = set; then
4921   withval="$with_gpm"
4922   with_gpm=$withval
4923 else
4924   with_gpm=maybe
4925 fi;
4926 echo "$as_me:4926: result: $with_gpm" >&5
4927 echo "${ECHO_T}$with_gpm" >&6
4928
4929 if test "$with_gpm" != no ; then
4930         echo "$as_me:4930: checking for gpm.h" >&5
4931 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
4932 if test "${ac_cv_header_gpm_h+set}" = set; then
4933   echo $ECHO_N "(cached) $ECHO_C" >&6
4934 else
4935   cat >conftest.$ac_ext <<_ACEOF
4936 #line 4936 "configure"
4937 #include "confdefs.h"
4938 #include <gpm.h>
4939 _ACEOF
4940 if { (eval echo "$as_me:4940: \"$ac_cpp conftest.$ac_ext\"") >&5
4941   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4942   ac_status=$?
4943   egrep -v '^ *\+' conftest.er1 >conftest.err
4944   rm -f conftest.er1
4945   cat conftest.err >&5
4946   echo "$as_me:4946: \$? = $ac_status" >&5
4947   (exit $ac_status); } >/dev/null; then
4948   if test -s conftest.err; then
4949     ac_cpp_err=$ac_c_preproc_warn_flag
4950   else
4951     ac_cpp_err=
4952   fi
4953 else
4954   ac_cpp_err=yes
4955 fi
4956 if test -z "$ac_cpp_err"; then
4957   ac_cv_header_gpm_h=yes
4958 else
4959   echo "$as_me: failed program was:" >&5
4960   cat conftest.$ac_ext >&5
4961   ac_cv_header_gpm_h=no
4962 fi
4963 rm -f conftest.err conftest.$ac_ext
4964 fi
4965 echo "$as_me:4965: result: $ac_cv_header_gpm_h" >&5
4966 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
4967 if test $ac_cv_header_gpm_h = yes; then
4968
4969                 cat >>confdefs.h <<\EOF
4970 #define HAVE_GPM_H 1
4971 EOF
4972
4973                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
4974                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
4975
4976 echo "${as_me:-configure}:4976: testing assuming we really have GPM library ..." 1>&5
4977
4978                         cat >>confdefs.h <<\EOF
4979 #define HAVE_LIBGPM 1
4980 EOF
4981
4982                 else
4983                         echo "$as_me:4983: checking for Gpm_Open in -lgpm" >&5
4984 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
4985 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
4986   echo $ECHO_N "(cached) $ECHO_C" >&6
4987 else
4988   ac_check_lib_save_LIBS=$LIBS
4989 LIBS="-lgpm  $LIBS"
4990 cat >conftest.$ac_ext <<_ACEOF
4991 #line 4991 "configure"
4992 #include "confdefs.h"
4993
4994 /* Override any gcc2 internal prototype to avoid an error.  */
4995 #ifdef __cplusplus
4996 extern "C"
4997 #endif
4998 /* We use char because int might match the return type of a gcc2
4999    builtin and then its argument prototype would still apply.  */
5000 char Gpm_Open ();
5001 int
5002 main ()
5003 {
5004 Gpm_Open ();
5005   ;
5006   return 0;
5007 }
5008 _ACEOF
5009 rm -f conftest.$ac_objext conftest$ac_exeext
5010 if { (eval echo "$as_me:5010: \"$ac_link\"") >&5
5011   (eval $ac_link) 2>&5
5012   ac_status=$?
5013   echo "$as_me:5013: \$? = $ac_status" >&5
5014   (exit $ac_status); } &&
5015          { ac_try='test -s conftest$ac_exeext'
5016   { (eval echo "$as_me:5016: \"$ac_try\"") >&5
5017   (eval $ac_try) 2>&5
5018   ac_status=$?
5019   echo "$as_me:5019: \$? = $ac_status" >&5
5020   (exit $ac_status); }; }; then
5021   ac_cv_lib_gpm_Gpm_Open=yes
5022 else
5023   echo "$as_me: failed program was:" >&5
5024 cat conftest.$ac_ext >&5
5025 ac_cv_lib_gpm_Gpm_Open=no
5026 fi
5027 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5028 LIBS=$ac_check_lib_save_LIBS
5029 fi
5030 echo "$as_me:5030: result: $ac_cv_lib_gpm_Gpm_Open" >&5
5031 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
5032 if test $ac_cv_lib_gpm_Gpm_Open = yes; then
5033   :
5034 else
5035
5036                                 { { echo "$as_me:5036: error: Cannot link with GPM library" >&5
5037 echo "$as_me: error: Cannot link with GPM library" >&2;}
5038    { (exit 1); exit 1; }; }
5039                 fi
5040                 with_gpm=yes
5041
5042 fi
5043
5044 else
5045
5046                 test "$with_gpm" != maybe && { echo "$as_me:5046: WARNING: Cannot find GPM header" >&5
5047 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
5048                 with_gpm=no
5049
5050 fi
5051
5052 fi
5053
5054 if test "$with_gpm" != no ; then
5055         echo "$as_me:5055: checking if you want to load GPM dynamically" >&5
5056 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
5057
5058 # Check whether --with-dlsym or --without-dlsym was given.
5059 if test "${with_dlsym+set}" = set; then
5060   withval="$with_dlsym"
5061   with_dlsym=$withval
5062 else
5063   with_dlsym=yes
5064 fi;
5065         echo "$as_me:5065: result: $with_dlsym" >&5
5066 echo "${ECHO_T}$with_dlsym" >&6
5067         if test "$with_dlsym" = yes ; then
5068
5069 cf_have_dlsym=no
5070 echo "$as_me:5070: checking for dlsym" >&5
5071 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
5072 if test "${ac_cv_func_dlsym+set}" = set; then
5073   echo $ECHO_N "(cached) $ECHO_C" >&6
5074 else
5075   cat >conftest.$ac_ext <<_ACEOF
5076 #line 5076 "configure"
5077 #include "confdefs.h"
5078 /* System header to define __stub macros and hopefully few prototypes,
5079     which can conflict with char dlsym (); below.  */
5080 #include <assert.h>
5081 /* Override any gcc2 internal prototype to avoid an error.  */
5082 #ifdef __cplusplus
5083 extern "C"
5084 #endif
5085 /* We use char because int might match the return type of a gcc2
5086    builtin and then its argument prototype would still apply.  */
5087 char dlsym ();
5088 char (*f) ();
5089
5090 int
5091 main ()
5092 {
5093 /* The GNU C library defines this for functions which it implements
5094     to always fail with ENOSYS.  Some functions are actually named
5095     something starting with __ and the normal name is an alias.  */
5096 #if defined (__stub_dlsym) || defined (__stub___dlsym)
5097 choke me
5098 #else
5099 f = dlsym;
5100 #endif
5101
5102   ;
5103   return 0;
5104 }
5105 _ACEOF
5106 rm -f conftest.$ac_objext conftest$ac_exeext
5107 if { (eval echo "$as_me:5107: \"$ac_link\"") >&5
5108   (eval $ac_link) 2>&5
5109   ac_status=$?
5110   echo "$as_me:5110: \$? = $ac_status" >&5
5111   (exit $ac_status); } &&
5112          { ac_try='test -s conftest$ac_exeext'
5113   { (eval echo "$as_me:5113: \"$ac_try\"") >&5
5114   (eval $ac_try) 2>&5
5115   ac_status=$?
5116   echo "$as_me:5116: \$? = $ac_status" >&5
5117   (exit $ac_status); }; }; then
5118   ac_cv_func_dlsym=yes
5119 else
5120   echo "$as_me: failed program was:" >&5
5121 cat conftest.$ac_ext >&5
5122 ac_cv_func_dlsym=no
5123 fi
5124 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5125 fi
5126 echo "$as_me:5126: result: $ac_cv_func_dlsym" >&5
5127 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
5128 if test $ac_cv_func_dlsym = yes; then
5129   cf_have_dlsym=yes
5130 else
5131
5132 cf_have_libdl=no
5133 echo "$as_me:5133: checking for dlsym in -ldl" >&5
5134 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
5135 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
5136   echo $ECHO_N "(cached) $ECHO_C" >&6
5137 else
5138   ac_check_lib_save_LIBS=$LIBS
5139 LIBS="-ldl  $LIBS"
5140 cat >conftest.$ac_ext <<_ACEOF
5141 #line 5141 "configure"
5142 #include "confdefs.h"
5143
5144 /* Override any gcc2 internal prototype to avoid an error.  */
5145 #ifdef __cplusplus
5146 extern "C"
5147 #endif
5148 /* We use char because int might match the return type of a gcc2
5149    builtin and then its argument prototype would still apply.  */
5150 char dlsym ();
5151 int
5152 main ()
5153 {
5154 dlsym ();
5155   ;
5156   return 0;
5157 }
5158 _ACEOF
5159 rm -f conftest.$ac_objext conftest$ac_exeext
5160 if { (eval echo "$as_me:5160: \"$ac_link\"") >&5
5161   (eval $ac_link) 2>&5
5162   ac_status=$?
5163   echo "$as_me:5163: \$? = $ac_status" >&5
5164   (exit $ac_status); } &&
5165          { ac_try='test -s conftest$ac_exeext'
5166   { (eval echo "$as_me:5166: \"$ac_try\"") >&5
5167   (eval $ac_try) 2>&5
5168   ac_status=$?
5169   echo "$as_me:5169: \$? = $ac_status" >&5
5170   (exit $ac_status); }; }; then
5171   ac_cv_lib_dl_dlsym=yes
5172 else
5173   echo "$as_me: failed program was:" >&5
5174 cat conftest.$ac_ext >&5
5175 ac_cv_lib_dl_dlsym=no
5176 fi
5177 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5178 LIBS=$ac_check_lib_save_LIBS
5179 fi
5180 echo "$as_me:5180: result: $ac_cv_lib_dl_dlsym" >&5
5181 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
5182 if test $ac_cv_lib_dl_dlsym = yes; then
5183
5184         cf_have_dlsym=yes
5185         cf_have_libdl=yes
5186 fi
5187
5188 fi
5189
5190 if test "$cf_have_dlsym" = yes ; then
5191         test "$cf_have_libdl" = yes && LIBS="-ldl $LIBS"
5192
5193         echo "$as_me:5193: checking whether able to link to dl*() functions" >&5
5194 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
5195         cat >conftest.$ac_ext <<_ACEOF
5196 #line 5196 "configure"
5197 #include "confdefs.h"
5198 #include <dlfcn.h>
5199 int
5200 main ()
5201 {
5202
5203                 void *obj;
5204                 if ((obj = dlopen("filename", 0)) != 0) {
5205                         if (dlsym(obj, "symbolname") == 0) {
5206                         dlclose(obj);
5207                         }
5208                 }
5209   ;
5210   return 0;
5211 }
5212 _ACEOF
5213 rm -f conftest.$ac_objext conftest$ac_exeext
5214 if { (eval echo "$as_me:5214: \"$ac_link\"") >&5
5215   (eval $ac_link) 2>&5
5216   ac_status=$?
5217   echo "$as_me:5217: \$? = $ac_status" >&5
5218   (exit $ac_status); } &&
5219          { ac_try='test -s conftest$ac_exeext'
5220   { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221   (eval $ac_try) 2>&5
5222   ac_status=$?
5223   echo "$as_me:5223: \$? = $ac_status" >&5
5224   (exit $ac_status); }; }; then
5225
5226                 cat >>confdefs.h <<\EOF
5227 #define HAVE_LIBDL 1
5228 EOF
5229
5230 else
5231   echo "$as_me: failed program was:" >&5
5232 cat conftest.$ac_ext >&5
5233
5234                 { { echo "$as_me:5234: error: Cannot link test program for libdl" >&5
5235 echo "$as_me: error: Cannot link test program for libdl" >&2;}
5236    { (exit 1); exit 1; }; }
5237 fi
5238 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5239         echo "$as_me:5239: result: ok" >&5
5240 echo "${ECHO_T}ok" >&6
5241 else
5242         { { echo "$as_me:5242: error: Cannot find dlsym function" >&5
5243 echo "$as_me: error: Cannot find dlsym function" >&2;}
5244    { (exit 1); exit 1; }; }
5245 fi
5246
5247                 if test "$with_gpm" != yes ; then
5248                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
5249
5250 echo "${as_me:-configure}:5250: testing assuming soname for gpm is $with_gpm ..." 1>&5
5251
5252                         cf_cv_gpm_soname="$with_gpm"
5253                 else
5254
5255 echo "$as_me:5255: checking for soname of gpm library" >&5
5256 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
5257 if test "${cf_cv_gpm_soname+set}" = set; then
5258   echo $ECHO_N "(cached) $ECHO_C" >&6
5259 else
5260
5261 cf_cv_gpm_soname=unknown
5262 if test "$cross_compiling" != yes ; then
5263 cat >conftest.$ac_ext <<CF_EOF
5264 #include <gpm.h>
5265 int main()
5266 {
5267 if (Gpm_Open(0,0)) Gpm_Close();
5268         ${cf_cv_main_return:-return}(0);
5269 }
5270 CF_EOF
5271 cf_save_LIBS="$LIBS"
5272         LIBS="-lgpm $LIBS"
5273         if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274   (eval $ac_compile) 2>&5
5275   ac_status=$?
5276   echo "$as_me:5276: \$? = $ac_status" >&5
5277   (exit $ac_status); } ; then
5278                 if { (eval echo "$as_me:5278: \"$ac_link\"") >&5
5279   (eval $ac_link) 2>&5
5280   ac_status=$?
5281   echo "$as_me:5281: \$? = $ac_status" >&5
5282   (exit $ac_status); } ; then
5283                         cf_cv_gpm_soname=`ldd conftest$ac_exeext 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | fgrep libgpm.`
5284                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
5285                 fi
5286         fi
5287 rm -rf conftest*
5288 LIBS="$cf_save_LIBS"
5289 fi
5290
5291 fi
5292 echo "$as_me:5292: result: $cf_cv_gpm_soname" >&5
5293 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
5294
5295                 fi
5296                 test "$cf_cv_gpm_soname" != "unknown" && cat >>confdefs.h <<EOF
5297 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
5298 EOF
5299
5300                 SHLIB_LIST="-ldl $SHLIB_LIST"
5301         else
5302                 SHLIB_LIST="-lgpm $SHLIB_LIST"
5303                 TEST_LIBS="-lgpm $TEST_LIBS"
5304         fi
5305         cat >>confdefs.h <<\EOF
5306 #define HAVE_LIBGPM 1
5307 EOF
5308
5309 echo "$as_me:5309: checking for Gpm_Wgetch in -lgpm" >&5
5310 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
5311 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
5312   echo $ECHO_N "(cached) $ECHO_C" >&6
5313 else
5314   ac_check_lib_save_LIBS=$LIBS
5315 LIBS="-lgpm  $LIBS"
5316 cat >conftest.$ac_ext <<_ACEOF
5317 #line 5317 "configure"
5318 #include "confdefs.h"
5319
5320 /* Override any gcc2 internal prototype to avoid an error.  */
5321 #ifdef __cplusplus
5322 extern "C"
5323 #endif
5324 /* We use char because int might match the return type of a gcc2
5325    builtin and then its argument prototype would still apply.  */
5326 char Gpm_Wgetch ();
5327 int
5328 main ()
5329 {
5330 Gpm_Wgetch ();
5331   ;
5332   return 0;
5333 }
5334 _ACEOF
5335 rm -f conftest.$ac_objext conftest$ac_exeext
5336 if { (eval echo "$as_me:5336: \"$ac_link\"") >&5
5337   (eval $ac_link) 2>&5
5338   ac_status=$?
5339   echo "$as_me:5339: \$? = $ac_status" >&5
5340   (exit $ac_status); } &&
5341          { ac_try='test -s conftest$ac_exeext'
5342   { (eval echo "$as_me:5342: \"$ac_try\"") >&5
5343   (eval $ac_try) 2>&5
5344   ac_status=$?
5345   echo "$as_me:5345: \$? = $ac_status" >&5
5346   (exit $ac_status); }; }; then
5347   ac_cv_lib_gpm_Gpm_Wgetch=yes
5348 else
5349   echo "$as_me: failed program was:" >&5
5350 cat conftest.$ac_ext >&5
5351 ac_cv_lib_gpm_Gpm_Wgetch=no
5352 fi
5353 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5354 LIBS=$ac_check_lib_save_LIBS
5355 fi
5356 echo "$as_me:5356: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
5357 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
5358 if test $ac_cv_lib_gpm_Gpm_Wgetch = yes; then
5359
5360 echo "$as_me:5360: checking if GPM is weakly bound to curses library" >&5
5361 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
5362 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
5363   echo $ECHO_N "(cached) $ECHO_C" >&6
5364 else
5365
5366 cf_cv_check_gpm_wgetch=unknown
5367 if test "$cross_compiling" != yes ; then
5368
5369 cat >conftest.$ac_ext <<CF_EOF
5370 #include <gpm.h>
5371 int main()
5372 {
5373         Gpm_Wgetch();
5374         ${cf_cv_main_return:-return}(0);
5375 }
5376 CF_EOF
5377
5378         cf_save_LIBS="$LIBS"
5379         # This only works if we can look at the symbol table.  If a shared
5380         # library is stripped for install, we cannot use that.  So we're forced
5381         # to rely on the static library, noting that some packagers may not
5382         # include it.
5383         LIBS="-static -lgpm -dynamic $LIBS"
5384         if { (eval echo "$as_me:5384: \"$ac_compile\"") >&5
5385   (eval $ac_compile) 2>&5
5386   ac_status=$?
5387   echo "$as_me:5387: \$? = $ac_status" >&5
5388   (exit $ac_status); } ; then
5389                 if { (eval echo "$as_me:5389: \"$ac_link\"") >&5
5390   (eval $ac_link) 2>&5
5391   ac_status=$?
5392   echo "$as_me:5392: \$? = $ac_status" >&5
5393   (exit $ac_status); } ; then
5394                         cf_cv_check_gpm_wgetch=`nm conftest$ac_exeext | egrep '\<wgetch\>' | egrep '\<[vVwW]\>'`
5395                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
5396                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
5397                 fi
5398         fi
5399         rm -rf conftest*
5400         LIBS="$cf_save_LIBS"
5401 fi
5402
5403 fi
5404 echo "$as_me:5404: result: $cf_cv_check_gpm_wgetch" >&5
5405 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
5406
5407 if test "$cf_cv_check_gpm_wgetch" != yes ; then
5408         { echo "$as_me:5408: WARNING: GPM library is already linked with curses - read the FAQ" >&5
5409 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
5410 fi
5411
5412 fi
5413
5414 fi
5415
5416 # not everyone has "test -c"
5417 if test -c /dev/sysmouse 2>/dev/null ; then
5418 echo "$as_me:5418: checking if you want to use sysmouse" >&5
5419 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
5420
5421 # Check whether --with-sysmouse or --without-sysmouse was given.
5422 if test "${with_sysmouse+set}" = set; then
5423   withval="$with_sysmouse"
5424   cf_with_sysmouse=$withval
5425 else
5426   cf_with_sysmouse=maybe
5427 fi;
5428         if test "$cf_with_sysmouse" != no ; then
5429         cat >conftest.$ac_ext <<_ACEOF
5430 #line 5430 "configure"
5431 #include "confdefs.h"
5432
5433 #include <osreldate.h>
5434 #if (__FreeBSD_version >= 400017)
5435 #include <sys/consio.h>
5436 #include <sys/fbio.h>
5437 #else
5438 #include <machine/console.h>
5439 #endif
5440
5441 int
5442 main ()
5443 {
5444
5445         struct mouse_info the_mouse;
5446         ioctl(0, CONS_MOUSECTL, &the_mouse);
5447
5448   ;
5449   return 0;
5450 }
5451 _ACEOF
5452 rm -f conftest.$ac_objext
5453 if { (eval echo "$as_me:5453: \"$ac_compile\"") >&5
5454   (eval $ac_compile) 2>&5
5455   ac_status=$?
5456   echo "$as_me:5456: \$? = $ac_status" >&5
5457   (exit $ac_status); } &&
5458          { ac_try='test -s conftest.$ac_objext'
5459   { (eval echo "$as_me:5459: \"$ac_try\"") >&5
5460   (eval $ac_try) 2>&5
5461   ac_status=$?
5462   echo "$as_me:5462: \$? = $ac_status" >&5
5463   (exit $ac_status); }; }; then
5464   cf_with_sysmouse=yes
5465 else
5466   echo "$as_me: failed program was:" >&5
5467 cat conftest.$ac_ext >&5
5468 cf_with_sysmouse=no
5469 fi
5470 rm -f conftest.$ac_objext conftest.$ac_ext
5471         fi
5472 echo "$as_me:5472: result: $cf_with_sysmouse" >&5
5473 echo "${ECHO_T}$cf_with_sysmouse" >&6
5474 test "$cf_with_sysmouse" = yes && cat >>confdefs.h <<\EOF
5475 #define USE_SYSMOUSE 1
5476 EOF
5477
5478 fi
5479
5480 if test X"$CC_G_OPT" = X"" ; then
5481         CC_G_OPT='-g'
5482         test -n "$GCC" && test "${ac_cv_prog_cc_g}" != yes && CC_G_OPT=''
5483 fi
5484
5485 if test X"$CXX_G_OPT" = X"" ; then
5486         CXX_G_OPT='-g'
5487         test -n "$GXX" && test "${ac_cv_prog_cxx_g}" != yes && CXX_G_OPT=''
5488 fi
5489
5490 echo "$as_me:5490: checking for default loader flags" >&5
5491 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5492 case $DFT_LWR_MODEL in
5493 libtool) LD_MODEL=''   ;;
5494 normal)  LD_MODEL=''   ;;
5495 debug)   LD_MODEL=$CC_G_OPT ;;
5496 profile) LD_MODEL='-pg';;
5497 shared)  LD_MODEL=''   ;;
5498 esac
5499 echo "$as_me:5499: result: $LD_MODEL" >&5
5500 echo "${ECHO_T}$LD_MODEL" >&6
5501
5502 case $DFT_LWR_MODEL in
5503 shared)
5504
5505 echo "$as_me:5505: checking if rpath option should be used" >&5
5506 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5507
5508 # Check whether --enable-rpath or --disable-rpath was given.
5509 if test "${enable_rpath+set}" = set; then
5510   enableval="$enable_rpath"
5511   cf_cv_enable_rpath=$enableval
5512 else
5513   cf_cv_enable_rpath=no
5514 fi;
5515 echo "$as_me:5515: result: $cf_cv_enable_rpath" >&5
5516 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5517
5518 echo "$as_me:5518: checking if shared libraries should be relinked during install" >&5
5519 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5520
5521 # Check whether --enable-relink or --disable-relink was given.
5522 if test "${enable_relink+set}" = set; then
5523   enableval="$enable_relink"
5524   cf_cv_do_relink=$enableval
5525 else
5526   cf_cv_do_relink=yes
5527 fi;
5528 echo "$as_me:5528: result: $cf_cv_do_relink" >&5
5529 echo "${ECHO_T}$cf_cv_do_relink" >&6
5530         ;;
5531 esac
5532
5533 LD_RPATH_OPT=
5534 echo "$as_me:5534: checking for an rpath option" >&5
5535 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5536 case $cf_cv_system_name in #(vi
5537 irix*) #(vi
5538         if test "$GCC" = yes; then
5539                 LD_RPATH_OPT="-Wl,-rpath,"
5540         else
5541                 LD_RPATH_OPT="-rpath "
5542         fi
5543         ;;
5544 linux*|gnu*|k*bsd*-gnu) #(vi
5545         LD_RPATH_OPT="-Wl,-rpath,"
5546         ;;
5547 openbsd[2-9].*|mirbsd*) #(vi
5548         LD_RPATH_OPT="-Wl,-rpath,"
5549         ;;
5550 dragonfly*|freebsd*) #(vi
5551         LD_RPATH_OPT="-rpath "
5552         ;;
5553 netbsd*) #(vi
5554         LD_RPATH_OPT="-Wl,-rpath,"
5555         ;;
5556 osf*|mls+*) #(vi
5557         LD_RPATH_OPT="-rpath "
5558         ;;
5559 solaris2*) #(vi
5560         LD_RPATH_OPT="-R"
5561         ;;
5562 *)
5563         ;;
5564 esac
5565 echo "$as_me:5565: result: $LD_RPATH_OPT" >&5
5566 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5567
5568 case "x$LD_RPATH_OPT" in #(vi
5569 x-R*)
5570         echo "$as_me:5570: checking if we need a space after rpath option" >&5
5571 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5572         cf_save_LIBS="$LIBS"
5573         LIBS="${LD_RPATH_OPT}$libdir $LIBS"
5574         cat >conftest.$ac_ext <<_ACEOF
5575 #line 5575 "configure"
5576 #include "confdefs.h"
5577
5578 int
5579 main ()
5580 {
5581
5582   ;
5583   return 0;
5584 }
5585 _ACEOF
5586 rm -f conftest.$ac_objext conftest$ac_exeext
5587 if { (eval echo "$as_me:5587: \"$ac_link\"") >&5
5588   (eval $ac_link) 2>&5
5589   ac_status=$?
5590   echo "$as_me:5590: \$? = $ac_status" >&5
5591   (exit $ac_status); } &&
5592          { ac_try='test -s conftest$ac_exeext'
5593   { (eval echo "$as_me:5593: \"$ac_try\"") >&5
5594   (eval $ac_try) 2>&5
5595   ac_status=$?
5596   echo "$as_me:5596: \$? = $ac_status" >&5
5597   (exit $ac_status); }; }; then
5598   cf_rpath_space=no
5599 else
5600   echo "$as_me: failed program was:" >&5
5601 cat conftest.$ac_ext >&5
5602 cf_rpath_space=yes
5603 fi
5604 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5605         LIBS="$cf_save_LIBS"
5606         echo "$as_me:5606: result: $cf_rpath_space" >&5
5607 echo "${ECHO_T}$cf_rpath_space" >&6
5608         test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
5609         ;;
5610 esac
5611
5612         LOCAL_LDFLAGS=
5613         LOCAL_LDFLAGS2=
5614         LD_SHARED_OPTS=
5615         INSTALL_LIB="-m 644"
5616
5617         cf_cv_do_symlinks=no
5618         cf_ld_rpath_opt=
5619         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
5620
5621         echo "$as_me:5621: checking if release/abi version should be used for shared libs" >&5
5622 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
5623
5624 # Check whether --with-shlib-version or --without-shlib-version was given.
5625 if test "${with_shlib_version+set}" = set; then
5626   withval="$with_shlib_version"
5627   test -z "$withval" && withval=auto
5628         case $withval in #(vi
5629         yes) #(vi
5630                 cf_cv_shlib_version=auto
5631                 ;;
5632         rel|abi|auto|no) #(vi
5633                 cf_cv_shlib_version=$withval
5634                 ;;
5635         *)
5636                 { { echo "$as_me:5636: error: option value must be one of: rel, abi, auto or no" >&5
5637 echo "$as_me: error: option value must be one of: rel, abi, auto or no" >&2;}
5638    { (exit 1); exit 1; }; }
5639                 ;;
5640         esac
5641
5642 else
5643   cf_cv_shlib_version=auto
5644 fi;
5645         echo "$as_me:5645: result: $cf_cv_shlib_version" >&5
5646 echo "${ECHO_T}$cf_cv_shlib_version" >&6
5647
5648         cf_cv_rm_so_locs=no
5649
5650         # Some less-capable ports of gcc support only -fpic
5651         CC_SHARED_OPTS=
5652         if test "$GCC" = yes
5653         then
5654                 echo "$as_me:5654: checking which $CC option to use" >&5
5655 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
5656                 cf_save_CFLAGS="$CFLAGS"
5657                 for CC_SHARED_OPTS in -fPIC -fpic ''
5658                 do
5659                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
5660                         cat >conftest.$ac_ext <<_ACEOF
5661 #line 5661 "configure"
5662 #include "confdefs.h"
5663 #include <stdio.h>
5664 int
5665 main ()
5666 {
5667 int x = 1
5668   ;
5669   return 0;
5670 }
5671 _ACEOF
5672 rm -f conftest.$ac_objext
5673 if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674   (eval $ac_compile) 2>&5
5675   ac_status=$?
5676   echo "$as_me:5676: \$? = $ac_status" >&5
5677   (exit $ac_status); } &&
5678          { ac_try='test -s conftest.$ac_objext'
5679   { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680   (eval $ac_try) 2>&5
5681   ac_status=$?
5682   echo "$as_me:5682: \$? = $ac_status" >&5
5683   (exit $ac_status); }; }; then
5684   break
5685 else
5686   echo "$as_me: failed program was:" >&5
5687 cat conftest.$ac_ext >&5
5688 fi
5689 rm -f conftest.$ac_objext conftest.$ac_ext
5690                 done
5691                 echo "$as_me:5691: result: $CC_SHARED_OPTS" >&5
5692 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
5693                 CFLAGS="$cf_save_CFLAGS"
5694         fi
5695
5696         cf_cv_shlib_version_infix=no
5697
5698         case $cf_cv_system_name in #(vi
5699         aix4.3-9*|aix[5-7]*) #(vi
5700                 if test "$GCC" = yes; then
5701                         CC_SHARED_OPTS=
5702                         MK_SHARED_LIB='${CC} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5703                 else
5704                         # CC_SHARED_OPTS='-qpic=large -G'
5705                         # perhaps "-bM:SRE -bnoentry -bexpall"
5706                         MK_SHARED_LIB='${CC} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
5707                 fi
5708                 ;;
5709         beos*) #(vi
5710                 MK_SHARED_LIB='${CC} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
5711                 ;;
5712         cygwin*) #(vi
5713                 CC_SHARED_OPTS=
5714                 MK_SHARED_LIB='sh ../mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
5715                 cf_cv_shlib_version=cygdll
5716                 cf_cv_shlib_version_infix=cygdll
5717                 cat >mk_shared_lib.sh <<-CF_EOF
5718                 #!/bin/sh
5719                 SHARED_LIB=\$1
5720                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
5721                 shift
5722                 cat <<-EOF
5723                 Linking shared library
5724                 ** SHARED_LIB \$SHARED_LIB
5725                 ** IMPORT_LIB \$IMPORT_LIB
5726 EOF
5727                 exec \$* -shared -Wl,--out-implib=../lib/\${IMPORT_LIB} -Wl,--export-all-symbols -o ../lib/\${SHARED_LIB}
5728 CF_EOF
5729                 chmod +x mk_shared_lib.sh
5730                 ;;
5731         darwin*) #(vi
5732                 EXTRA_CFLAGS="-no-cpp-precomp"
5733                 CC_SHARED_OPTS="-dynamic"
5734                 MK_SHARED_LIB='${CC} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
5735                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
5736                 cf_cv_shlib_version_infix=yes
5737                 echo "$as_me:5737: checking if ld -search_paths_first works" >&5
5738 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
5739 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
5740   echo $ECHO_N "(cached) $ECHO_C" >&6
5741 else
5742
5743                         cf_save_LDFLAGS=$LDFLAGS
5744                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5745                         cat >conftest.$ac_ext <<_ACEOF
5746 #line 5746 "configure"
5747 #include "confdefs.h"
5748
5749 int
5750 main ()
5751 {
5752 int i;
5753   ;
5754   return 0;
5755 }
5756 _ACEOF
5757 rm -f conftest.$ac_objext conftest$ac_exeext
5758 if { (eval echo "$as_me:5758: \"$ac_link\"") >&5
5759   (eval $ac_link) 2>&5
5760   ac_status=$?
5761   echo "$as_me:5761: \$? = $ac_status" >&5
5762   (exit $ac_status); } &&
5763          { ac_try='test -s conftest$ac_exeext'
5764   { (eval echo "$as_me:5764: \"$ac_try\"") >&5
5765   (eval $ac_try) 2>&5
5766   ac_status=$?
5767   echo "$as_me:5767: \$? = $ac_status" >&5
5768   (exit $ac_status); }; }; then
5769   cf_cv_ldflags_search_paths_first=yes
5770 else
5771   echo "$as_me: failed program was:" >&5
5772 cat conftest.$ac_ext >&5
5773 cf_cv_ldflags_search_paths_first=no
5774 fi
5775 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5776                                 LDFLAGS=$cf_save_LDFLAGS
5777 fi
5778 echo "$as_me:5778: result: $cf_cv_ldflags_search_paths_first" >&5
5779 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
5780                 if test $cf_cv_ldflags_search_paths_first = yes; then
5781                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
5782                 fi
5783                 ;;
5784         hpux*) #(vi
5785                 # (tested with gcc 2.7.2 -- I don't have c89)
5786                 if test "$GCC" = yes; then
5787                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
5788                 else
5789                         CC_SHARED_OPTS='+Z'
5790                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
5791                 fi
5792                 MK_SHARED_LIB='${LD} +b ${libdir} -b -o $@'
5793                 # HP-UX shared libraries must be executable, and should be
5794                 # readonly to exploit a quirk in the memory manager.
5795                 INSTALL_LIB="-m 555"
5796                 ;;
5797         interix*)
5798                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5799                 if test "$cf_cv_shlib_version" = rel; then
5800                         cf_shared_soname='`basename  .${REL_VERSION}`.${ABI_VERSION}'
5801                 else
5802                         cf_shared_soname='`basename `'
5803                 fi
5804                 CC_SHARED_OPTS=
5805                 MK_SHARED_LIB='${CC} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o '
5806                 ;;
5807         irix*) #(vi
5808                 if test "$cf_cv_enable_rpath" = yes ; then
5809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5810                 fi
5811                 # tested with IRIX 5.2 and 'cc'.
5812                 if test "$GCC" != yes; then
5813                         CC_SHARED_OPTS='-KPIC'
5814                         MK_SHARED_LIB='${CC} -shared -rdata_shared -soname `basename $@` -o $@'
5815                 else
5816                         MK_SHARED_LIB='${CC} -shared -Wl,-soname,`basename $@` -o $@'
5817                 fi
5818                 cf_cv_rm_so_locs=yes
5819                 ;;
5820         linux*|gnu*|k*bsd*-gnu) #(vi
5821                 if test "$DFT_LWR_MODEL" = "shared" ; then
5822                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5823                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5824                 fi
5825                 if test "$cf_cv_enable_rpath" = yes ; then
5826                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5827                 fi
5828
5829         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5830         if test "$cf_cv_shlib_version" = rel; then
5831                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5832         else
5833                 cf_cv_shared_soname='`basename $@`'
5834         fi
5835
5836                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5837                 ;;
5838         openbsd[2-9].*|mirbsd*) #(vi
5839                 if test "$DFT_LWR_MODEL" = "shared" ; then
5840                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5841                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5842                 fi
5843                 if test "$cf_cv_enable_rpath" = yes ; then
5844                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5845                 fi
5846                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5847
5848         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5849         if test "$cf_cv_shlib_version" = rel; then
5850                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5851         else
5852                 cf_cv_shared_soname='`basename $@`'
5853         fi
5854
5855                 MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
5856                 ;;
5857         nto-qnx*|openbsd*|freebsd[12].*) #(vi
5858                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5859                 MK_SHARED_LIB='${LD} -Bshareable -o $@'
5860                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5861                 ;;
5862         dragonfly*|freebsd*) #(vi
5863                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5864                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5865                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5866                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
5867                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5868                 fi
5869
5870         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5871         if test "$cf_cv_shlib_version" = rel; then
5872                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5873         else
5874                 cf_cv_shared_soname='`basename $@`'
5875         fi
5876
5877                 MK_SHARED_LIB='${LD} -shared -Bshareable -soname=`basename $@` -o $@'
5878                 ;;
5879         netbsd*) #(vi
5880                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
5881                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
5882                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
5883                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5884                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
5885                         if test "$cf_cv_shlib_version" = auto; then
5886                         if test -f /usr/libexec/ld.elf_so; then
5887                                 cf_cv_shlib_version=abi
5888                         else
5889                                 cf_cv_shlib_version=rel
5890                         fi
5891                         fi
5892
5893         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5894         if test "$cf_cv_shlib_version" = rel; then
5895                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5896         else
5897                 cf_cv_shared_soname='`basename $@`'
5898         fi
5899
5900                         MK_SHARED_LIB='${CC} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
5901                 else
5902                         MK_SHARED_LIB='${LD} -shared -Bshareable -o $@'
5903                 fi
5904                 ;;
5905         osf*|mls+*) #(vi
5906                 # tested with OSF/1 V3.2 and 'cc'
5907                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
5908                 # link with shared libs).
5909                 MK_SHARED_LIB='${LD} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
5910                 case $host_os in #(vi
5911                 osf4*)
5912                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
5913                         ;;
5914                 esac
5915                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
5916                 if test "$DFT_LWR_MODEL" = "shared" ; then
5917                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
5918                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5919                 fi
5920                 cf_cv_rm_so_locs=yes
5921                 ;;
5922         sco3.2v5*)  # (also uw2* and UW7: hops 13-Apr-98
5923                 # tested with osr5.0.5
5924                 if test "$GCC" != yes; then
5925                         CC_SHARED_OPTS='-belf -KPIC'
5926                 fi
5927                 MK_SHARED_LIB='${LD} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
5928                 if test "$cf_cv_enable_rpath" = yes ; then
5929                         # only way is to set LD_RUN_PATH but no switch for it
5930                         RUN_PATH=$libdir
5931                 fi
5932                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5933                 LINK_PROGS='LD_RUN_PATH=${libdir}'
5934                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
5935                 ;;
5936         sunos4*) #(vi
5937                 # tested with SunOS 4.1.1 and gcc 2.7.0
5938                 if test "$GCC" != yes; then
5939                         CC_SHARED_OPTS='-KPIC'
5940                 fi
5941                 MK_SHARED_LIB='${LD} -assert pure-text -o $@'
5942                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5943                 ;;
5944         solaris2*) #(vi
5945                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
5946                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
5947                 if test "$DFT_LWR_MODEL" = "shared" ; then
5948                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
5949                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
5950                 fi
5951                 if test "$cf_cv_enable_rpath" = yes ; then
5952                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
5953                 fi
5954
5955         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
5956         if test "$cf_cv_shlib_version" = rel; then
5957                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
5958         else
5959                 cf_cv_shared_soname='`basename $@`'
5960         fi
5961
5962                 if test "$GCC" != yes; then
5963                         cf_save_CFLAGS="$CFLAGS"
5964                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
5965                         do
5966                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
5967                                 cat >conftest.$ac_ext <<_ACEOF
5968 #line 5968 "configure"
5969 #include "confdefs.h"
5970 #include <stdio.h>
5971 int
5972 main ()
5973 {
5974 printf("Hello\n");
5975   ;
5976   return 0;
5977 }
5978 _ACEOF
5979 rm -f conftest.$ac_objext
5980 if { (eval echo "$as_me:5980: \"$ac_compile\"") >&5
5981   (eval $ac_compile) 2>&5
5982   ac_status=$?
5983   echo "$as_me:5983: \$? = $ac_status" >&5
5984   (exit $ac_status); } &&
5985          { ac_try='test -s conftest.$ac_objext'
5986   { (eval echo "$as_me:5986: \"$ac_try\"") >&5
5987   (eval $ac_try) 2>&5
5988   ac_status=$?
5989   echo "$as_me:5989: \$? = $ac_status" >&5
5990   (exit $ac_status); }; }; then
5991   break
5992 else
5993   echo "$as_me: failed program was:" >&5
5994 cat conftest.$ac_ext >&5
5995 fi
5996 rm -f conftest.$ac_objext conftest.$ac_ext
5997                         done
5998                         CFLAGS="$cf_save_CFLAGS"
5999                         CC_SHARED_OPTS=$cf_shared_opts
6000                         MK_SHARED_LIB='${CC} -dy -G -h '$cf_cv_shared_soname' -o $@'
6001                 else
6002                         MK_SHARED_LIB='${CC} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6003                 fi
6004                 ;;
6005         sysv5uw7*|unix_sv*) #(vi
6006                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6007                 if test "$GCC" != yes; then
6008                         CC_SHARED_OPTS='-KPIC'
6009                 fi
6010                 MK_SHARED_LIB='${LD} -d y -G -o $@'
6011                 ;;
6012         *)
6013                 CC_SHARED_OPTS='unknown'
6014                 MK_SHARED_LIB='echo unknown'
6015                 ;;
6016         esac
6017
6018         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6019         case "$cf_cv_shlib_version" in #(vi
6020         rel|abi)
6021                 case "$MK_SHARED_LIB" in #(vi
6022                 *'-o $@') #(vi
6023                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6024                         ;;
6025                 *)
6026                         { echo "$as_me:6026: WARNING: ignored --with-shlib-version" >&5
6027 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6028                         ;;
6029                 esac
6030                 ;;
6031         esac
6032
6033         # RPATH_LIST is a colon-separated list of directories
6034         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6035         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6036
6037 if test "$CC_SHARED_OPTS" = "unknown"; then
6038         for model in $cf_list_models; do
6039                 if test "$model" = "shared"; then
6040                         { { echo "$as_me:6040: error: Shared libraries are not supported in this version" >&5
6041 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6042    { (exit 1); exit 1; }; }
6043                 fi
6044         done
6045 fi
6046
6047 ### If we're building with rpath, try to link non-standard libs that way too.
6048 if test "$DFT_LWR_MODEL" = "shared"; then
6049
6050 echo "$as_me:6050: checking if rpath-hack should be disabled" >&5
6051 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
6052
6053 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
6054 if test "${enable_rpath_hack+set}" = set; then
6055   enableval="$enable_rpath_hack"
6056   test "$enableval" != no && enableval=yes
6057   if test "$enableval" != "yes" ; then
6058     cf_disable_rpath_hack=yes
6059   else
6060     cf_disable_rpath_hack=no
6061   fi
6062 else
6063   enableval=yes
6064   cf_disable_rpath_hack=no
6065
6066 fi;
6067 echo "$as_me:6067: result: $cf_disable_rpath_hack" >&5
6068 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
6069 if test "$cf_disable_rpath_hack" = no ; then
6070
6071 echo "$as_me:6071: checking for updated LDFLAGS" >&5
6072 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
6073 if test -n "$LD_RPATH_OPT" ; then
6074         echo "$as_me:6074: result: maybe" >&5
6075 echo "${ECHO_T}maybe" >&6
6076
6077         for ac_prog in ldd
6078 do
6079   # Extract the first word of "$ac_prog", so it can be a program name with args.
6080 set dummy $ac_prog; ac_word=$2
6081 echo "$as_me:6081: checking for $ac_word" >&5
6082 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6083 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
6084   echo $ECHO_N "(cached) $ECHO_C" >&6
6085 else
6086   if test -n "$cf_ldd_prog"; then
6087   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
6088 else
6089   ac_save_IFS=$IFS; IFS=$ac_path_separator
6090 ac_dummy="$PATH"
6091 for ac_dir in $ac_dummy; do
6092   IFS=$ac_save_IFS
6093   test -z "$ac_dir" && ac_dir=.
6094   $as_executable_p "$ac_dir/$ac_word" || continue
6095 ac_cv_prog_cf_ldd_prog="$ac_prog"
6096 echo "$as_me:6096: found $ac_dir/$ac_word" >&5
6097 break
6098 done
6099
6100 fi
6101 fi
6102 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
6103 if test -n "$cf_ldd_prog"; then
6104   echo "$as_me:6104: result: $cf_ldd_prog" >&5
6105 echo "${ECHO_T}$cf_ldd_prog" >&6
6106 else
6107   echo "$as_me:6107: result: no" >&5
6108 echo "${ECHO_T}no" >&6
6109 fi
6110
6111   test -n "$cf_ldd_prog" && break
6112 done
6113 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
6114
6115         cf_rpath_list="/usr/lib /lib"
6116         if test "$cf_ldd_prog" != no
6117         then
6118                 cf_rpath_oops=
6119
6120 cat >conftest.$ac_ext <<_ACEOF
6121 #line 6121 "configure"
6122 #include "confdefs.h"
6123 #include <stdio.h>
6124 int
6125 main ()
6126 {
6127 printf("Hello");
6128   ;
6129   return 0;
6130 }
6131 _ACEOF
6132 rm -f conftest.$ac_objext conftest$ac_exeext
6133 if { (eval echo "$as_me:6133: \"$ac_link\"") >&5
6134   (eval $ac_link) 2>&5
6135   ac_status=$?
6136   echo "$as_me:6136: \$? = $ac_status" >&5
6137   (exit $ac_status); } &&
6138          { ac_try='test -s conftest$ac_exeext'
6139   { (eval echo "$as_me:6139: \"$ac_try\"") >&5
6140   (eval $ac_try) 2>&5
6141   ac_status=$?
6142   echo "$as_me:6142: \$? = $ac_status" >&5
6143   (exit $ac_status); }; }; then
6144   cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort -u`
6145                  cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[      ]/%/%' -e 's%/[^/][^/]*$%%' |sort -u`
6146 else
6147   echo "$as_me: failed program was:" >&5
6148 cat conftest.$ac_ext >&5
6149 fi
6150 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6151
6152                 # If we passed the link-test, but get a "not found" on a given library,
6153                 # this could be due to inept reconfiguration of gcc to make it only
6154                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
6155                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
6156                 # /usr/local libraries.
6157                 if test -n "$cf_rpath_oops"
6158                 then
6159                         for cf_rpath_src in $cf_rpath_oops
6160                         do
6161                                 for cf_rpath_dir in \
6162                                         /usr/local \
6163                                         /usr/pkg \
6164                                         /opt/sfw
6165                                 do
6166                                         if test -f $cf_rpath_dir/lib/$cf_rpath_src
6167                                         then
6168                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
6169
6170 echo "${as_me:-configure}:6170: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
6171
6172                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
6173                                                 break
6174                                         fi
6175                                 done
6176                         done
6177                 fi
6178         fi
6179
6180         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6181
6182 echo "${as_me:-configure}:6182: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6183
6184 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
6185
6186 echo "${as_me:-configure}:6186: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
6187
6188 cf_rpath_dst=
6189 for cf_rpath_src in $LDFLAGS
6190 do
6191         case $cf_rpath_src in #(vi
6192         -L*) #(vi
6193
6194                 # check if this refers to a directory which we will ignore
6195                 cf_rpath_skip=no
6196                 if test -n "$cf_rpath_list"
6197                 then
6198                         for cf_rpath_item in $cf_rpath_list
6199                         do
6200                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6201                                 then
6202                                         cf_rpath_skip=yes
6203                                         break
6204                                 fi
6205                         done
6206                 fi
6207
6208                 if test "$cf_rpath_skip" = no
6209                 then
6210                         # transform the option
6211                         if test "$LD_RPATH_OPT" = "-R " ; then
6212                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6213                         else
6214                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6215                         fi
6216
6217                         # if we have not already added this, add it now
6218                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6219                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6220                         then
6221                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6222
6223 echo "${as_me:-configure}:6223: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6224
6225                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6226                         fi
6227                 fi
6228                 ;;
6229         esac
6230         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6231 done
6232 LDFLAGS=$cf_rpath_dst
6233
6234 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
6235
6236 echo "${as_me:-configure}:6236: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
6237
6238 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
6239
6240 echo "${as_me:-configure}:6240: testing ...checking LIBS $LIBS ..." 1>&5
6241
6242 cf_rpath_dst=
6243 for cf_rpath_src in $LIBS
6244 do
6245         case $cf_rpath_src in #(vi
6246         -L*) #(vi
6247
6248                 # check if this refers to a directory which we will ignore
6249                 cf_rpath_skip=no
6250                 if test -n "$cf_rpath_list"
6251                 then
6252                         for cf_rpath_item in $cf_rpath_list
6253                         do
6254                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
6255                                 then
6256                                         cf_rpath_skip=yes
6257                                         break
6258                                 fi
6259                         done
6260                 fi
6261
6262                 if test "$cf_rpath_skip" = no
6263                 then
6264                         # transform the option
6265                         if test "$LD_RPATH_OPT" = "-R " ; then
6266                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
6267                         else
6268                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
6269                         fi
6270
6271                         # if we have not already added this, add it now
6272                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
6273                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
6274                         then
6275                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
6276
6277 echo "${as_me:-configure}:6277: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
6278
6279                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
6280                         fi
6281                 fi
6282                 ;;
6283         esac
6284         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
6285 done
6286 LIBS=$cf_rpath_dst
6287
6288 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
6289
6290 echo "${as_me:-configure}:6290: testing ...checked LIBS $LIBS ..." 1>&5
6291
6292         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
6293
6294 echo "${as_me:-configure}:6294: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
6295
6296 fi
6297
6298 fi
6299
6300 fi
6301
6302 ###############################################################################
6303
6304 ###     use option --disable-overwrite to leave out the link to -lcurses
6305 echo "$as_me:6305: checking if you wish to install ncurses overwriting curses" >&5
6306 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
6307
6308 # Check whether --enable-overwrite or --disable-overwrite was given.
6309 if test "${enable_overwrite+set}" = set; then
6310   enableval="$enable_overwrite"
6311   with_overwrite=$enableval
6312 else
6313   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
6314 fi;
6315 echo "$as_me:6315: result: $with_overwrite" >&5
6316 echo "${ECHO_T}$with_overwrite" >&6
6317
6318 echo "$as_me:6318: checking if external terminfo-database is used" >&5
6319 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
6320
6321 # Check whether --enable-database or --disable-database was given.
6322 if test "${enable_database+set}" = set; then
6323   enableval="$enable_database"
6324   use_database=$enableval
6325 else
6326   use_database=yes
6327 fi;
6328 echo "$as_me:6328: result: $use_database" >&5
6329 echo "${ECHO_T}$use_database" >&6
6330
6331 case $host_os in #(vi
6332 os2*) #(vi
6333         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
6334         ;;
6335 *) #(vi
6336         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
6337         ;;
6338 esac
6339
6340 if test "$use_database" != no ; then
6341         cat >>confdefs.h <<\EOF
6342 #define USE_DATABASE 1
6343 EOF
6344
6345         echo "$as_me:6345: checking which terminfo source-file will be installed" >&5
6346 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
6347
6348 # Check whether --with-database or --without-database was given.
6349 if test "${with_database+set}" = set; then
6350   withval="$with_database"
6351   TERMINFO_SRC=$withval
6352 fi;
6353         echo "$as_me:6353: result: $TERMINFO_SRC" >&5
6354 echo "${ECHO_T}$TERMINFO_SRC" >&6
6355
6356         echo "$as_me:6356: checking whether to use hashed database instead of directory/tree" >&5
6357 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
6358
6359 # Check whether --with-hashed-db or --without-hashed-db was given.
6360 if test "${with_hashed_db+set}" = set; then
6361   withval="$with_hashed_db"
6362
6363 else
6364   with_hashed_db=no
6365 fi;
6366         echo "$as_me:6366: result: $with_hashed_db" >&5
6367 echo "${ECHO_T}$with_hashed_db" >&6
6368 else
6369         with_hashed_db=no
6370 fi
6371
6372 echo "$as_me:6372: checking for list of fallback descriptions" >&5
6373 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
6374
6375 # Check whether --with-fallbacks or --without-fallbacks was given.
6376 if test "${with_fallbacks+set}" = set; then
6377   withval="$with_fallbacks"
6378   with_fallback=$withval
6379 else
6380   with_fallback=
6381 fi;
6382 echo "$as_me:6382: result: $with_fallback" >&5
6383 echo "${ECHO_T}$with_fallback" >&6
6384 FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
6385
6386 echo "$as_me:6386: checking if you want modern xterm or antique" >&5
6387 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
6388
6389 # Check whether --with-xterm-new or --without-xterm-new was given.
6390 if test "${with_xterm_new+set}" = set; then
6391   withval="$with_xterm_new"
6392   with_xterm_new=$withval
6393 else
6394   with_xterm_new=yes
6395 fi;
6396 case $with_xterm_new in
6397 no)     with_xterm_new=xterm-old;;
6398 *)      with_xterm_new=xterm-new;;
6399 esac
6400 echo "$as_me:6400: result: $with_xterm_new" >&5
6401 echo "${ECHO_T}$with_xterm_new" >&6
6402 WHICH_XTERM=$with_xterm_new
6403
6404 MAKE_TERMINFO=
6405 if test "$use_database" = no ; then
6406         TERMINFO="${datadir}/terminfo"
6407         MAKE_TERMINFO="#"
6408 else
6409
6410 echo "$as_me:6410: checking for list of terminfo directories" >&5
6411 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
6412
6413 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
6414 if test "${with_terminfo_dirs+set}" = set; then
6415   withval="$with_terminfo_dirs"
6416
6417 else
6418   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
6419 fi;
6420 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6421 cf_dst_path=
6422 for cf_src_path in $withval
6423 do
6424
6425 if test "x$prefix" != xNONE; then
6426   cf_path_syntax="$prefix"
6427 else
6428   cf_path_syntax="$ac_default_prefix"
6429 fi
6430
6431 case ".$cf_src_path" in #(vi
6432 .\$\(*\)*|.\'*\'*) #(vi
6433   ;;
6434 ..|./*|.\\*) #(vi
6435   ;;
6436 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6437   ;;
6438 .\${*prefix}*) #(vi
6439   eval cf_src_path="$cf_src_path"
6440   case ".$cf_src_path" in #(vi
6441   .NONE/*)
6442     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6443     ;;
6444   esac
6445   ;; #(vi
6446 .no|.NONE/*)
6447   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6448   ;;
6449 *)
6450   { { echo "$as_me:6450: error: expected a pathname, not \"$cf_src_path\"" >&5
6451 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6452    { (exit 1); exit 1; }; }
6453   ;;
6454 esac
6455
6456   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6457   cf_dst_path="${cf_dst_path}${cf_src_path}"
6458 done
6459 IFS="$ac_save_ifs"
6460
6461 eval 'TERMINFO_DIRS="$cf_dst_path"'
6462
6463 echo "$as_me:6463: result: $TERMINFO_DIRS" >&5
6464 echo "${ECHO_T}$TERMINFO_DIRS" >&6
6465 test -n "$TERMINFO_DIRS" && cat >>confdefs.h <<EOF
6466 #define TERMINFO_DIRS "$TERMINFO_DIRS"
6467 EOF
6468
6469 echo "$as_me:6469: checking for default terminfo directory" >&5
6470 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
6471
6472 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
6473 if test "${with_default_terminfo_dir+set}" = set; then
6474   withval="$with_default_terminfo_dir"
6475
6476 else
6477   withval="${TERMINFO:-${datadir}/terminfo}"
6478 fi; if test -n "${datadir}/terminfo" ; then
6479
6480 if test "x$prefix" != xNONE; then
6481   cf_path_syntax="$prefix"
6482 else
6483   cf_path_syntax="$ac_default_prefix"
6484 fi
6485
6486 case ".$withval" in #(vi
6487 .\$\(*\)*|.\'*\'*) #(vi
6488   ;;
6489 ..|./*|.\\*) #(vi
6490   ;;
6491 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6492   ;;
6493 .\${*prefix}*) #(vi
6494   eval withval="$withval"
6495   case ".$withval" in #(vi
6496   .NONE/*)
6497     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6498     ;;
6499   esac
6500   ;; #(vi
6501 .no|.NONE/*)
6502   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
6503   ;;
6504 *)
6505   { { echo "$as_me:6505: error: expected a pathname, not \"$withval\"" >&5
6506 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
6507    { (exit 1); exit 1; }; }
6508   ;;
6509 esac
6510
6511 fi
6512 TERMINFO="$withval"
6513
6514 echo "$as_me:6514: result: $TERMINFO" >&5
6515 echo "${ECHO_T}$TERMINFO" >&6
6516 cat >>confdefs.h <<EOF
6517 #define TERMINFO "$TERMINFO"
6518 EOF
6519
6520 fi
6521
6522 ###     use option --disable-big-core to make tic run on small machines
6523 ###     We need 4Mb, check if we can allocate 50% more than that.
6524 echo "$as_me:6524: checking if big-core option selected" >&5
6525 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
6526
6527 # Check whether --enable-big-core or --disable-big-core was given.
6528 if test "${enable_big_core+set}" = set; then
6529   enableval="$enable_big_core"
6530   with_big_core=$enableval
6531 else
6532   if test "$cross_compiling" = yes; then
6533   with_big_core=no
6534 else
6535   cat >conftest.$ac_ext <<_ACEOF
6536 #line 6536 "configure"
6537 #include "confdefs.h"
6538
6539 #include <stdlib.h>
6540 #include <string.h>
6541 int main() {
6542         unsigned long n = 6000000L;
6543         char *s = malloc(n);
6544         if (s != 0)
6545                 s[0] = s[n-1] = 0;
6546         ${cf_cv_main_return:-return}(s == 0);
6547 }
6548 _ACEOF
6549 rm -f conftest$ac_exeext
6550 if { (eval echo "$as_me:6550: \"$ac_link\"") >&5
6551   (eval $ac_link) 2>&5
6552   ac_status=$?
6553   echo "$as_me:6553: \$? = $ac_status" >&5
6554   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6555   { (eval echo "$as_me:6555: \"$ac_try\"") >&5
6556   (eval $ac_try) 2>&5
6557   ac_status=$?
6558   echo "$as_me:6558: \$? = $ac_status" >&5
6559   (exit $ac_status); }; }; then
6560   with_big_core=yes
6561 else
6562   echo "$as_me: program exited with status $ac_status" >&5
6563 echo "$as_me: failed program was:" >&5
6564 cat conftest.$ac_ext >&5
6565 with_big_core=no
6566 fi
6567 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6568 fi
6569 fi;
6570 echo "$as_me:6570: result: $with_big_core" >&5
6571 echo "${ECHO_T}$with_big_core" >&6
6572 test "$with_big_core" = "yes" && cat >>confdefs.h <<\EOF
6573 #define HAVE_BIG_CORE 1
6574 EOF
6575
6576 ### ISO C only guarantees 512-char strings, we have tables which load faster
6577 ### when constructed using "big" strings.  More than the C compiler, the awk
6578 ### program is a limit on most vendor UNIX systems.  Check that we can build.
6579 echo "$as_me:6579: checking if big-strings option selected" >&5
6580 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
6581
6582 # Check whether --enable-big-strings or --disable-big-strings was given.
6583 if test "${enable_big_strings+set}" = set; then
6584   enableval="$enable_big_strings"
6585   with_big_strings=$enableval
6586 else
6587
6588         case x$AWK in #(vi
6589         x)
6590                 eval with_big_strings=no
6591                 ;;
6592         *) #(vi
6593                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' \
6594                         | $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
6595                         eval with_big_strings=yes
6596                 else
6597                         eval with_big_strings=no
6598                 fi
6599                 ;;
6600         esac
6601
6602 fi;
6603 echo "$as_me:6603: result: $with_big_strings" >&5
6604 echo "${ECHO_T}$with_big_strings" >&6
6605
6606 USE_BIG_STRINGS=0
6607 test "$with_big_strings" = "yes" && USE_BIG_STRINGS=1
6608
6609 ###     use option --enable-termcap to compile in the termcap fallback support
6610 echo "$as_me:6610: checking if you want termcap-fallback support" >&5
6611 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
6612
6613 # Check whether --enable-termcap or --disable-termcap was given.
6614 if test "${enable_termcap+set}" = set; then
6615   enableval="$enable_termcap"
6616   with_termcap=$enableval
6617 else
6618   with_termcap=no
6619 fi;
6620 echo "$as_me:6620: result: $with_termcap" >&5
6621 echo "${ECHO_T}$with_termcap" >&6
6622
6623 if test "$with_termcap" != "yes" ; then
6624         if test "$use_database" = no ; then
6625                 if test -z "$with_fallback" ; then
6626                         { { echo "$as_me:6626: error: You have disabled the database w/o specifying fallbacks" >&5
6627 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
6628    { (exit 1); exit 1; }; }
6629                 fi
6630         fi
6631         cat >>confdefs.h <<\EOF
6632 #define PURE_TERMINFO 1
6633 EOF
6634
6635 else
6636
6637 if test "$with_ticlib" != no ; then
6638         { { echo "$as_me:6638: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
6639 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
6640    { (exit 1); exit 1; }; }
6641 fi
6642
6643 cat >>confdefs.h <<\EOF
6644 #define USE_TERMCAP 1
6645 EOF
6646
6647 echo "$as_me:6647: checking for list of termcap files" >&5
6648 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
6649
6650 # Check whether --with-termpath or --without-termpath was given.
6651 if test "${with_termpath+set}" = set; then
6652   withval="$with_termpath"
6653
6654 else
6655   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
6656 fi;
6657 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
6658 cf_dst_path=
6659 for cf_src_path in $withval
6660 do
6661
6662 if test "x$prefix" != xNONE; then
6663   cf_path_syntax="$prefix"
6664 else
6665   cf_path_syntax="$ac_default_prefix"
6666 fi
6667
6668 case ".$cf_src_path" in #(vi
6669 .\$\(*\)*|.\'*\'*) #(vi
6670   ;;
6671 ..|./*|.\\*) #(vi
6672   ;;
6673 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
6674   ;;
6675 .\${*prefix}*) #(vi
6676   eval cf_src_path="$cf_src_path"
6677   case ".$cf_src_path" in #(vi
6678   .NONE/*)
6679     cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6680     ;;
6681   esac
6682   ;; #(vi
6683 .no|.NONE/*)
6684   cf_src_path=`echo $cf_src_path | sed -e s%NONE%$cf_path_syntax%`
6685   ;;
6686 *)
6687   { { echo "$as_me:6687: error: expected a pathname, not \"$cf_src_path\"" >&5
6688 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
6689    { (exit 1); exit 1; }; }
6690   ;;
6691 esac
6692
6693   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}:"
6694   cf_dst_path="${cf_dst_path}${cf_src_path}"
6695 done
6696 IFS="$ac_save_ifs"
6697
6698 eval 'TERMPATH="$cf_dst_path"'
6699
6700 echo "$as_me:6700: result: $TERMPATH" >&5
6701 echo "${ECHO_T}$TERMPATH" >&6
6702 test -n "$TERMPATH" && cat >>confdefs.h <<EOF
6703 #define TERMPATH "$TERMPATH"
6704 EOF
6705
6706 ###     use option --enable-getcap to use a hacked getcap for reading termcaps
6707 echo "$as_me:6707: checking if fast termcap-loader is needed" >&5
6708 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
6709
6710 # Check whether --enable-getcap or --disable-getcap was given.
6711 if test "${enable_getcap+set}" = set; then
6712   enableval="$enable_getcap"
6713   with_getcap=$enableval
6714 else
6715   with_getcap=no
6716 fi;
6717 echo "$as_me:6717: result: $with_getcap" >&5
6718 echo "${ECHO_T}$with_getcap" >&6
6719 test "$with_getcap" = "yes" && cat >>confdefs.h <<\EOF
6720 #define USE_GETCAP 1
6721 EOF
6722
6723 echo "$as_me:6723: checking if translated termcaps will be cached in ~/.terminfo" >&5
6724 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
6725
6726 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
6727 if test "${enable_getcap_cache+set}" = set; then
6728   enableval="$enable_getcap_cache"
6729   with_getcap_cache=$enableval
6730 else
6731   with_getcap_cache=no
6732 fi;
6733 echo "$as_me:6733: result: $with_getcap_cache" >&5
6734 echo "${ECHO_T}$with_getcap_cache" >&6
6735 test "$with_getcap_cache" = "yes" && cat >>confdefs.h <<\EOF
6736 #define USE_GETCAP_CACHE 1
6737 EOF
6738
6739 fi
6740
6741 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
6742 echo "$as_me:6742: checking if ~/.terminfo is wanted" >&5
6743 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
6744
6745 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
6746 if test "${enable_home_terminfo+set}" = set; then
6747   enableval="$enable_home_terminfo"
6748   with_home_terminfo=$enableval
6749 else
6750   with_home_terminfo=yes
6751 fi;
6752 echo "$as_me:6752: result: $with_home_terminfo" >&5
6753 echo "${ECHO_T}$with_home_terminfo" >&6
6754 test "$with_home_terminfo" = "yes" && cat >>confdefs.h <<\EOF
6755 #define USE_HOME_TERMINFO 1
6756 EOF
6757
6758 echo "$as_me:6758: checking if you want to use restricted environment when running as root" >&5
6759 echo $ECHO_N "checking if you want to use restricted environment when running as root... $ECHO_C" >&6
6760
6761 # Check whether --enable-root-environ or --disable-root-environ was given.
6762 if test "${enable_root_environ+set}" = set; then
6763   enableval="$enable_root_environ"
6764   with_root_environ=$enableval
6765 else
6766   with_root_environ=yes
6767 fi;
6768 echo "$as_me:6768: result: $with_root_environ" >&5
6769 echo "${ECHO_T}$with_root_environ" >&6
6770 test "$with_root_environ" = yes && cat >>confdefs.h <<\EOF
6771 #define USE_ROOT_ENVIRON 1
6772 EOF
6773
6774 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
6775 ###   to reduce storage requirements for the terminfo database.
6776
6777 for ac_func in \
6778         remove \
6779         unlink
6780 do
6781 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6782 echo "$as_me:6782: checking for $ac_func" >&5
6783 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6784 if eval "test \"\${$as_ac_var+set}\" = set"; then
6785   echo $ECHO_N "(cached) $ECHO_C" >&6
6786 else
6787   cat >conftest.$ac_ext <<_ACEOF
6788 #line 6788 "configure"
6789 #include "confdefs.h"
6790 /* System header to define __stub macros and hopefully few prototypes,
6791     which can conflict with char $ac_func (); below.  */
6792 #include <assert.h>
6793 /* Override any gcc2 internal prototype to avoid an error.  */
6794 #ifdef __cplusplus
6795 extern "C"
6796 #endif
6797 /* We use char because int might match the return type of a gcc2
6798    builtin and then its argument prototype would still apply.  */
6799 char $ac_func ();
6800 char (*f) ();
6801
6802 int
6803 main ()
6804 {
6805 /* The GNU C library defines this for functions which it implements
6806     to always fail with ENOSYS.  Some functions are actually named
6807     something starting with __ and the normal name is an alias.  */
6808 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6809 choke me
6810 #else
6811 f = $ac_func;
6812 #endif
6813
6814   ;
6815   return 0;
6816 }
6817 _ACEOF
6818 rm -f conftest.$ac_objext conftest$ac_exeext
6819 if { (eval echo "$as_me:6819: \"$ac_link\"") >&5
6820   (eval $ac_link) 2>&5
6821   ac_status=$?
6822   echo "$as_me:6822: \$? = $ac_status" >&5
6823   (exit $ac_status); } &&
6824          { ac_try='test -s conftest$ac_exeext'
6825   { (eval echo "$as_me:6825: \"$ac_try\"") >&5
6826   (eval $ac_try) 2>&5
6827   ac_status=$?
6828   echo "$as_me:6828: \$? = $ac_status" >&5
6829   (exit $ac_status); }; }; then
6830   eval "$as_ac_var=yes"
6831 else
6832   echo "$as_me: failed program was:" >&5
6833 cat conftest.$ac_ext >&5
6834 eval "$as_ac_var=no"
6835 fi
6836 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6837 fi
6838 echo "$as_me:6838: result: `eval echo '${'$as_ac_var'}'`" >&5
6839 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6840 if test `eval echo '${'$as_ac_var'}'` = yes; then
6841   cat >>confdefs.h <<EOF
6842 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6843 EOF
6844
6845 fi
6846 done
6847
6848 if test "$cross_compiling" = yes ; then
6849
6850 for ac_func in \
6851                 link \
6852                 symlink
6853 do
6854 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
6855 echo "$as_me:6855: checking for $ac_func" >&5
6856 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
6857 if eval "test \"\${$as_ac_var+set}\" = set"; then
6858   echo $ECHO_N "(cached) $ECHO_C" >&6
6859 else
6860   cat >conftest.$ac_ext <<_ACEOF
6861 #line 6861 "configure"
6862 #include "confdefs.h"
6863 /* System header to define __stub macros and hopefully few prototypes,
6864     which can conflict with char $ac_func (); below.  */
6865 #include <assert.h>
6866 /* Override any gcc2 internal prototype to avoid an error.  */
6867 #ifdef __cplusplus
6868 extern "C"
6869 #endif
6870 /* We use char because int might match the return type of a gcc2
6871    builtin and then its argument prototype would still apply.  */
6872 char $ac_func ();
6873 char (*f) ();
6874
6875 int
6876 main ()
6877 {
6878 /* The GNU C library defines this for functions which it implements
6879     to always fail with ENOSYS.  Some functions are actually named
6880     something starting with __ and the normal name is an alias.  */
6881 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
6882 choke me
6883 #else
6884 f = $ac_func;
6885 #endif
6886
6887   ;
6888   return 0;
6889 }
6890 _ACEOF
6891 rm -f conftest.$ac_objext conftest$ac_exeext
6892 if { (eval echo "$as_me:6892: \"$ac_link\"") >&5
6893   (eval $ac_link) 2>&5
6894   ac_status=$?
6895   echo "$as_me:6895: \$? = $ac_status" >&5
6896   (exit $ac_status); } &&
6897          { ac_try='test -s conftest$ac_exeext'
6898   { (eval echo "$as_me:6898: \"$ac_try\"") >&5
6899   (eval $ac_try) 2>&5
6900   ac_status=$?
6901   echo "$as_me:6901: \$? = $ac_status" >&5
6902   (exit $ac_status); }; }; then
6903   eval "$as_ac_var=yes"
6904 else
6905   echo "$as_me: failed program was:" >&5
6906 cat conftest.$ac_ext >&5
6907 eval "$as_ac_var=no"
6908 fi
6909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6910 fi
6911 echo "$as_me:6911: result: `eval echo '${'$as_ac_var'}'`" >&5
6912 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
6913 if test `eval echo '${'$as_ac_var'}'` = yes; then
6914   cat >>confdefs.h <<EOF
6915 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
6916 EOF
6917
6918 fi
6919 done
6920
6921 else
6922         echo "$as_me:6922: checking if link/symlink functions work" >&5
6923 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
6924 if test "${cf_cv_link_funcs+set}" = set; then
6925   echo $ECHO_N "(cached) $ECHO_C" >&6
6926 else
6927
6928                 cf_cv_link_funcs=
6929                 for cf_func in link symlink ; do
6930                         if test "$cross_compiling" = yes; then
6931
6932                         eval 'ac_cv_func_'$cf_func'=error'
6933 else
6934   cat >conftest.$ac_ext <<_ACEOF
6935 #line 6935 "configure"
6936 #include "confdefs.h"
6937
6938 #include <sys/types.h>
6939 #include <sys/stat.h>
6940 #ifdef HAVE_UNISTD_H
6941 #include <unistd.h>
6942 #endif
6943 int main()
6944 {
6945         int fail = 0;
6946         char *src = "config.log";
6947         char *dst = "conftest.chk";
6948         struct stat src_sb;
6949         struct stat dst_sb;
6950
6951         stat(src, &src_sb);
6952         fail = ($cf_func("config.log", "conftest.chk") < 0)
6953             || (stat(dst, &dst_sb) < 0)
6954             || (dst_sb.st_mtime != src_sb.st_mtime);
6955 #ifdef HAVE_UNLINK
6956         unlink(dst);
6957 #else
6958         remove(dst);
6959 #endif
6960         ${cf_cv_main_return:-return} (fail);
6961 }
6962
6963 _ACEOF
6964 rm -f conftest$ac_exeext
6965 if { (eval echo "$as_me:6965: \"$ac_link\"") >&5
6966   (eval $ac_link) 2>&5
6967   ac_status=$?
6968   echo "$as_me:6968: \$? = $ac_status" >&5
6969   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6970   { (eval echo "$as_me:6970: \"$ac_try\"") >&5
6971   (eval $ac_try) 2>&5
6972   ac_status=$?
6973   echo "$as_me:6973: \$? = $ac_status" >&5
6974   (exit $ac_status); }; }; then
6975
6976                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
6977                         eval 'ac_cv_func_'$cf_func'=yes'
6978 else
6979   echo "$as_me: program exited with status $ac_status" >&5
6980 echo "$as_me: failed program was:" >&5
6981 cat conftest.$ac_ext >&5
6982
6983                         eval 'ac_cv_func_'$cf_func'=no'
6984 fi
6985 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6986 fi
6987                 done
6988                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
6989
6990 fi
6991 echo "$as_me:6991: result: $cf_cv_link_funcs" >&5
6992 echo "${ECHO_T}$cf_cv_link_funcs" >&6
6993         test "$ac_cv_func_link"    = yes && cat >>confdefs.h <<\EOF
6994 #define HAVE_LINK 1
6995 EOF
6996
6997         test "$ac_cv_func_symlink" = yes && cat >>confdefs.h <<\EOF
6998 #define HAVE_SYMLINK 1
6999 EOF
7000
7001 fi
7002
7003 with_links=no
7004 with_symlinks=no
7005
7006 # soft links (symbolic links) are useful for some systems where hard links do
7007 # not work, or to make it simpler to copy terminfo trees around.
7008 if test "$ac_cv_func_symlink" = yes ; then
7009     echo "$as_me:7009: checking if tic should use symbolic links" >&5
7010 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
7011
7012 # Check whether --enable-symlinks or --disable-symlinks was given.
7013 if test "${enable_symlinks+set}" = set; then
7014   enableval="$enable_symlinks"
7015   with_symlinks=$enableval
7016 else
7017   with_symlinks=no
7018 fi;
7019     echo "$as_me:7019: result: $with_symlinks" >&5
7020 echo "${ECHO_T}$with_symlinks" >&6
7021 fi
7022
7023 # If we have hard links and did not choose to use soft links instead, there is
7024 # no reason to make this choice optional - use the hard links.
7025 if test "$with_symlinks" = no ; then
7026     echo "$as_me:7026: checking if tic should use hard links" >&5
7027 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
7028     if test "$ac_cv_func_link" = yes ; then
7029         with_links=yes
7030     else
7031         with_links=no
7032     fi
7033     echo "$as_me:7033: result: $with_links" >&5
7034 echo "${ECHO_T}$with_links" >&6
7035 fi
7036
7037 test "$with_links" = yes && cat >>confdefs.h <<\EOF
7038 #define USE_LINKS 1
7039 EOF
7040
7041 test "$with_symlinks" = yes && cat >>confdefs.h <<\EOF
7042 #define USE_SYMLINKS 1
7043 EOF
7044
7045 ###   use option --enable-broken-linker to force on use of broken-linker support
7046 echo "$as_me:7046: checking if you want broken-linker support code" >&5
7047 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
7048
7049 # Check whether --enable-broken_linker or --disable-broken_linker was given.
7050 if test "${enable_broken_linker+set}" = set; then
7051   enableval="$enable_broken_linker"
7052   with_broken_linker=$enableval
7053 else
7054   with_broken_linker=${BROKEN_LINKER:-no}
7055 fi;
7056 echo "$as_me:7056: result: $with_broken_linker" >&5
7057 echo "${ECHO_T}$with_broken_linker" >&6
7058
7059 BROKEN_LINKER=0
7060 if test "$with_broken_linker" = yes ; then
7061         cat >>confdefs.h <<\EOF
7062 #define BROKEN_LINKER 1
7063 EOF
7064
7065         BROKEN_LINKER=1
7066 elif test "$DFT_LWR_MODEL" = shared ; then
7067         case $cf_cv_system_name in #(vi
7068         cygwin*)
7069                 cat >>confdefs.h <<\EOF
7070 #define BROKEN_LINKER 1
7071 EOF
7072
7073                 BROKEN_LINKER=1
7074                 test -n "$verbose" && echo "    cygwin linker is broken anyway" 1>&6
7075
7076 echo "${as_me:-configure}:7076: testing cygwin linker is broken anyway ..." 1>&5
7077
7078                 ;;
7079         esac
7080 fi
7081
7082 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
7083 echo "$as_me:7083: checking if tputs should process BSD-style prefix padding" >&5
7084 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
7085
7086 # Check whether --enable-bsdpad or --disable-bsdpad was given.
7087 if test "${enable_bsdpad+set}" = set; then
7088   enableval="$enable_bsdpad"
7089   with_bsdpad=$enableval
7090 else
7091   with_bsdpad=no
7092 fi;
7093 echo "$as_me:7093: result: $with_bsdpad" >&5
7094 echo "${ECHO_T}$with_bsdpad" >&6
7095 test "$with_bsdpad" = yes && cat >>confdefs.h <<\EOF
7096 #define BSD_TPUTS 1
7097 EOF
7098
7099 ###   use option --enable-widec to turn on use of wide-character support
7100 NCURSES_CH_T=chtype
7101 NCURSES_LIBUTF8=0
7102
7103 NEED_WCHAR_H=0
7104 NCURSES_MBSTATE_T=0
7105 NCURSES_WCHAR_T=0
7106 NCURSES_WINT_T=0
7107
7108 # Check to define _XOPEN_SOURCE "automatically"
7109
7110 cf_XOPEN_SOURCE=500
7111 cf_POSIX_C_SOURCE=199506L
7112 cf_xopen_source=
7113
7114 case $host_os in #(vi
7115 aix[4-7]*) #(vi
7116         cf_xopen_source="-D_ALL_SOURCE"
7117         ;;
7118 cygwin) #(vi
7119         cf_XOPEN_SOURCE=600
7120         ;;
7121 darwin[0-8].*) #(vi
7122         cf_xopen_source="-D_APPLE_C_SOURCE"
7123         ;;
7124 darwin*) #(vi
7125         cf_xopen_source="-D_DARWIN_C_SOURCE"
7126         ;;
7127 freebsd*|dragonfly*) #(vi
7128         # 5.x headers associate
7129         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
7130         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
7131         cf_POSIX_C_SOURCE=200112L
7132         cf_XOPEN_SOURCE=600
7133         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7134         ;;
7135 hpux11*) #(vi
7136         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
7137         ;;
7138 hpux*) #(vi
7139         cf_xopen_source="-D_HPUX_SOURCE"
7140         ;;
7141 irix[56].*) #(vi
7142         cf_xopen_source="-D_SGI_SOURCE"
7143         ;;
7144 linux*|gnu*|mint*|k*bsd*-gnu) #(vi
7145
7146 echo "$as_me:7146: checking if we must define _GNU_SOURCE" >&5
7147 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
7148 if test "${cf_cv_gnu_source+set}" = set; then
7149   echo $ECHO_N "(cached) $ECHO_C" >&6
7150 else
7151
7152 cat >conftest.$ac_ext <<_ACEOF
7153 #line 7153 "configure"
7154 #include "confdefs.h"
7155 #include <sys/types.h>
7156 int
7157 main ()
7158 {
7159
7160 #ifndef _XOPEN_SOURCE
7161 make an error
7162 #endif
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f conftest.$ac_objext
7168 if { (eval echo "$as_me:7168: \"$ac_compile\"") >&5
7169   (eval $ac_compile) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit $ac_status); } &&
7173          { ac_try='test -s conftest.$ac_objext'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit $ac_status); }; }; then
7179   cf_cv_gnu_source=no
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat conftest.$ac_ext >&5
7183 cf_save="$CPPFLAGS"
7184          CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7185          cat >conftest.$ac_ext <<_ACEOF
7186 #line 7186 "configure"
7187 #include "confdefs.h"
7188 #include <sys/types.h>
7189 int
7190 main ()
7191 {
7192
7193 #ifdef _XOPEN_SOURCE
7194 make an error
7195 #endif
7196   ;
7197   return 0;
7198 }
7199 _ACEOF
7200 rm -f conftest.$ac_objext
7201 if { (eval echo "$as_me:7201: \"$ac_compile\"") >&5
7202   (eval $ac_compile) 2>&5
7203   ac_status=$?
7204   echo "$as_me:7204: \$? = $ac_status" >&5
7205   (exit $ac_status); } &&
7206          { ac_try='test -s conftest.$ac_objext'
7207   { (eval echo "$as_me:7207: \"$ac_try\"") >&5
7208   (eval $ac_try) 2>&5
7209   ac_status=$?
7210   echo "$as_me:7210: \$? = $ac_status" >&5
7211   (exit $ac_status); }; }; then
7212   cf_cv_gnu_source=no
7213 else
7214   echo "$as_me: failed program was:" >&5
7215 cat conftest.$ac_ext >&5
7216 cf_cv_gnu_source=yes
7217 fi
7218 rm -f conftest.$ac_objext conftest.$ac_ext
7219         CPPFLAGS="$cf_save"
7220
7221 fi
7222 rm -f conftest.$ac_objext conftest.$ac_ext
7223
7224 fi
7225 echo "$as_me:7225: result: $cf_cv_gnu_source" >&5
7226 echo "${ECHO_T}$cf_cv_gnu_source" >&6
7227 test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
7228
7229         ;;
7230 mirbsd*) #(vi
7231         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <arpa/inet.h>
7232         ;;
7233 netbsd*) #(vi
7234         # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
7235         ;;
7236 openbsd*) #(vi
7237         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
7238         ;;
7239 osf[45]*) #(vi
7240         cf_xopen_source="-D_OSF_SOURCE"
7241         ;;
7242 nto-qnx*) #(vi
7243         cf_xopen_source="-D_QNX_SOURCE"
7244         ;;
7245 sco*) #(vi
7246         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
7247         ;;
7248 solaris2.1[0-9]) #(vi
7249         cf_xopen_source="-D__EXTENSIONS__ -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7250         ;;
7251 solaris2.[1-9]) #(vi
7252         cf_xopen_source="-D__EXTENSIONS__"
7253         ;;
7254 *)
7255         echo "$as_me:7255: checking if we should define _XOPEN_SOURCE" >&5
7256 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
7257 if test "${cf_cv_xopen_source+set}" = set; then
7258   echo $ECHO_N "(cached) $ECHO_C" >&6
7259 else
7260
7261         cat >conftest.$ac_ext <<_ACEOF
7262 #line 7262 "configure"
7263 #include "confdefs.h"
7264 #include <sys/types.h>
7265 int
7266 main ()
7267 {
7268
7269 #ifndef _XOPEN_SOURCE
7270 make an error
7271 #endif
7272   ;
7273   return 0;
7274 }
7275 _ACEOF
7276 rm -f conftest.$ac_objext
7277 if { (eval echo "$as_me:7277: \"$ac_compile\"") >&5
7278   (eval $ac_compile) 2>&5
7279   ac_status=$?
7280   echo "$as_me:7280: \$? = $ac_status" >&5
7281   (exit $ac_status); } &&
7282          { ac_try='test -s conftest.$ac_objext'
7283   { (eval echo "$as_me:7283: \"$ac_try\"") >&5
7284   (eval $ac_try) 2>&5
7285   ac_status=$?
7286   echo "$as_me:7286: \$? = $ac_status" >&5
7287   (exit $ac_status); }; }; then
7288   cf_cv_xopen_source=no
7289 else
7290   echo "$as_me: failed program was:" >&5
7291 cat conftest.$ac_ext >&5
7292 cf_save="$CPPFLAGS"
7293          CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
7294          cat >conftest.$ac_ext <<_ACEOF
7295 #line 7295 "configure"
7296 #include "confdefs.h"
7297 #include <sys/types.h>
7298 int
7299 main ()
7300 {
7301
7302 #ifdef _XOPEN_SOURCE
7303 make an error
7304 #endif
7305   ;
7306   return 0;
7307 }
7308 _ACEOF
7309 rm -f conftest.$ac_objext
7310 if { (eval echo "$as_me:7310: \"$ac_compile\"") >&5
7311   (eval $ac_compile) 2>&5
7312   ac_status=$?
7313   echo "$as_me:7313: \$? = $ac_status" >&5
7314   (exit $ac_status); } &&
7315          { ac_try='test -s conftest.$ac_objext'
7316   { (eval echo "$as_me:7316: \"$ac_try\"") >&5
7317   (eval $ac_try) 2>&5
7318   ac_status=$?
7319   echo "$as_me:7319: \$? = $ac_status" >&5
7320   (exit $ac_status); }; }; then
7321   cf_cv_xopen_source=no
7322 else
7323   echo "$as_me: failed program was:" >&5
7324 cat conftest.$ac_ext >&5
7325 cf_cv_xopen_source=$cf_XOPEN_SOURCE
7326 fi
7327 rm -f conftest.$ac_objext conftest.$ac_ext
7328         CPPFLAGS="$cf_save"
7329
7330 fi
7331 rm -f conftest.$ac_objext conftest.$ac_ext
7332
7333 fi
7334 echo "$as_me:7334: result: $cf_cv_xopen_source" >&5
7335 echo "${ECHO_T}$cf_cv_xopen_source" >&6
7336         if test "$cf_cv_xopen_source" != no ; then
7337
7338 CFLAGS=`echo "$CFLAGS" | \
7339         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7340                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7341
7342 CPPFLAGS=`echo "$CPPFLAGS" | \
7343         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
7344                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
7345
7346                 cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
7347
7348 cf_fix_cppflags=no
7349 cf_new_cflags=
7350 cf_new_cppflags=
7351 cf_new_extra_cppflags=
7352
7353 for cf_add_cflags in $cf_temp_xopen_source
7354 do
7355 case $cf_fix_cppflags in
7356 no)
7357         case $cf_add_cflags in #(vi
7358         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7359                 case $cf_add_cflags in
7360                 -D*)
7361                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7362
7363                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7364                                 && test -z "${cf_tst_cflags}" \
7365                                 && cf_fix_cppflags=yes
7366
7367                         if test $cf_fix_cppflags = yes ; then
7368                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7369                                 continue
7370                         elif test "${cf_tst_cflags}" = "\"'" ; then
7371                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7372                                 continue
7373                         fi
7374                         ;;
7375                 esac
7376                 case "$CPPFLAGS" in
7377                 *$cf_add_cflags) #(vi
7378                         ;;
7379                 *) #(vi
7380                         case $cf_add_cflags in #(vi
7381                         -D*)
7382                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7383
7384 CPPFLAGS=`echo "$CPPFLAGS" | \
7385         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7386                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7387
7388                                 ;;
7389                         esac
7390                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7391                         ;;
7392                 esac
7393                 ;;
7394         *)
7395                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7396                 ;;
7397         esac
7398         ;;
7399 yes)
7400         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7401
7402         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7403
7404         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7405                 && test -z "${cf_tst_cflags}" \
7406                 && cf_fix_cppflags=no
7407         ;;
7408 esac
7409 done
7410
7411 if test -n "$cf_new_cflags" ; then
7412
7413         CFLAGS="$CFLAGS $cf_new_cflags"
7414 fi
7415
7416 if test -n "$cf_new_cppflags" ; then
7417
7418         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7419 fi
7420
7421 if test -n "$cf_new_extra_cppflags" ; then
7422
7423         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7424 fi
7425
7426         fi
7427
7428 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
7429
7430 cf_save_CFLAGS="$CFLAGS"
7431 cf_save_CPPFLAGS="$CPPFLAGS"
7432
7433 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
7434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7436
7437 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
7438         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
7439                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
7440
7441 echo "$as_me:7441: checking if we should define _POSIX_C_SOURCE" >&5
7442 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
7443 if test "${cf_cv_posix_c_source+set}" = set; then
7444   echo $ECHO_N "(cached) $ECHO_C" >&6
7445 else
7446
7447 echo "${as_me:-configure}:7447: testing if the symbol is already defined go no further ..." 1>&5
7448
7449         cat >conftest.$ac_ext <<_ACEOF
7450 #line 7450 "configure"
7451 #include "confdefs.h"
7452 #include <sys/types.h>
7453 int
7454 main ()
7455 {
7456
7457 #ifndef _POSIX_C_SOURCE
7458 make an error
7459 #endif
7460   ;
7461   return 0;
7462 }
7463 _ACEOF
7464 rm -f conftest.$ac_objext
7465 if { (eval echo "$as_me:7465: \"$ac_compile\"") >&5
7466   (eval $ac_compile) 2>&5
7467   ac_status=$?
7468   echo "$as_me:7468: \$? = $ac_status" >&5
7469   (exit $ac_status); } &&
7470          { ac_try='test -s conftest.$ac_objext'
7471   { (eval echo "$as_me:7471: \"$ac_try\"") >&5
7472   (eval $ac_try) 2>&5
7473   ac_status=$?
7474   echo "$as_me:7474: \$? = $ac_status" >&5
7475   (exit $ac_status); }; }; then
7476   cf_cv_posix_c_source=no
7477 else
7478   echo "$as_me: failed program was:" >&5
7479 cat conftest.$ac_ext >&5
7480 cf_want_posix_source=no
7481          case .$cf_POSIX_C_SOURCE in #(vi
7482          .[12]??*) #(vi
7483                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7484                 ;;
7485          .2) #(vi
7486                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
7487                 cf_want_posix_source=yes
7488                 ;;
7489          .*)
7490                 cf_want_posix_source=yes
7491                 ;;
7492          esac
7493          if test "$cf_want_posix_source" = yes ; then
7494                 cat >conftest.$ac_ext <<_ACEOF
7495 #line 7495 "configure"
7496 #include "confdefs.h"
7497 #include <sys/types.h>
7498 int
7499 main ()
7500 {
7501
7502 #ifdef _POSIX_SOURCE
7503 make an error
7504 #endif
7505   ;
7506   return 0;
7507 }
7508 _ACEOF
7509 rm -f conftest.$ac_objext
7510 if { (eval echo "$as_me:7510: \"$ac_compile\"") >&5
7511   (eval $ac_compile) 2>&5
7512   ac_status=$?
7513   echo "$as_me:7513: \$? = $ac_status" >&5
7514   (exit $ac_status); } &&
7515          { ac_try='test -s conftest.$ac_objext'
7516   { (eval echo "$as_me:7516: \"$ac_try\"") >&5
7517   (eval $ac_try) 2>&5
7518   ac_status=$?
7519   echo "$as_me:7519: \$? = $ac_status" >&5
7520   (exit $ac_status); }; }; then
7521   :
7522 else
7523   echo "$as_me: failed program was:" >&5
7524 cat conftest.$ac_ext >&5
7525 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
7526 fi
7527 rm -f conftest.$ac_objext conftest.$ac_ext
7528          fi
7529
7530 echo "${as_me:-configure}:7530: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
7531
7532          CFLAGS="$cf_trim_CFLAGS"
7533          CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
7534
7535 echo "${as_me:-configure}:7535: testing if the second compile does not leave our definition intact error ..." 1>&5
7536
7537          cat >conftest.$ac_ext <<_ACEOF
7538 #line 7538 "configure"
7539 #include "confdefs.h"
7540 #include <sys/types.h>
7541 int
7542 main ()
7543 {
7544
7545 #ifndef _POSIX_C_SOURCE
7546 make an error
7547 #endif
7548   ;
7549   return 0;
7550 }
7551 _ACEOF
7552 rm -f conftest.$ac_objext
7553 if { (eval echo "$as_me:7553: \"$ac_compile\"") >&5
7554   (eval $ac_compile) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit $ac_status); } &&
7558          { ac_try='test -s conftest.$ac_objext'
7559   { (eval echo "$as_me:7559: \"$ac_try\"") >&5
7560   (eval $ac_try) 2>&5
7561   ac_status=$?
7562   echo "$as_me:7562: \$? = $ac_status" >&5
7563   (exit $ac_status); }; }; then
7564   :
7565 else
7566   echo "$as_me: failed program was:" >&5
7567 cat conftest.$ac_ext >&5
7568 cf_cv_posix_c_source=no
7569 fi
7570 rm -f conftest.$ac_objext conftest.$ac_ext
7571          CFLAGS="$cf_save_CFLAGS"
7572          CPPFLAGS="$cf_save_CPPFLAGS"
7573
7574 fi
7575 rm -f conftest.$ac_objext conftest.$ac_ext
7576
7577 fi
7578 echo "$as_me:7578: result: $cf_cv_posix_c_source" >&5
7579 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
7580
7581 if test "$cf_cv_posix_c_source" != no ; then
7582         CFLAGS="$cf_trim_CFLAGS"
7583         CPPFLAGS="$cf_trim_CPPFLAGS"
7584
7585 cf_fix_cppflags=no
7586 cf_new_cflags=
7587 cf_new_cppflags=
7588 cf_new_extra_cppflags=
7589
7590 for cf_add_cflags in $cf_cv_posix_c_source
7591 do
7592 case $cf_fix_cppflags in
7593 no)
7594         case $cf_add_cflags in #(vi
7595         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7596                 case $cf_add_cflags in
7597                 -D*)
7598                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7599
7600                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7601                                 && test -z "${cf_tst_cflags}" \
7602                                 && cf_fix_cppflags=yes
7603
7604                         if test $cf_fix_cppflags = yes ; then
7605                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7606                                 continue
7607                         elif test "${cf_tst_cflags}" = "\"'" ; then
7608                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7609                                 continue
7610                         fi
7611                         ;;
7612                 esac
7613                 case "$CPPFLAGS" in
7614                 *$cf_add_cflags) #(vi
7615                         ;;
7616                 *) #(vi
7617                         case $cf_add_cflags in #(vi
7618                         -D*)
7619                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7620
7621 CPPFLAGS=`echo "$CPPFLAGS" | \
7622         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7623                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7624
7625                                 ;;
7626                         esac
7627                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7628                         ;;
7629                 esac
7630                 ;;
7631         *)
7632                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7633                 ;;
7634         esac
7635         ;;
7636 yes)
7637         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7638
7639         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7640
7641         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7642                 && test -z "${cf_tst_cflags}" \
7643                 && cf_fix_cppflags=no
7644         ;;
7645 esac
7646 done
7647
7648 if test -n "$cf_new_cflags" ; then
7649
7650         CFLAGS="$CFLAGS $cf_new_cflags"
7651 fi
7652
7653 if test -n "$cf_new_cppflags" ; then
7654
7655         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7656 fi
7657
7658 if test -n "$cf_new_extra_cppflags" ; then
7659
7660         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7661 fi
7662
7663 fi
7664
7665         ;;
7666 esac
7667
7668 if test -n "$cf_xopen_source" ; then
7669
7670 cf_fix_cppflags=no
7671 cf_new_cflags=
7672 cf_new_cppflags=
7673 cf_new_extra_cppflags=
7674
7675 for cf_add_cflags in $cf_xopen_source
7676 do
7677 case $cf_fix_cppflags in
7678 no)
7679         case $cf_add_cflags in #(vi
7680         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
7681                 case $cf_add_cflags in
7682                 -D*)
7683                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7684
7685                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7686                                 && test -z "${cf_tst_cflags}" \
7687                                 && cf_fix_cppflags=yes
7688
7689                         if test $cf_fix_cppflags = yes ; then
7690                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7691                                 continue
7692                         elif test "${cf_tst_cflags}" = "\"'" ; then
7693                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7694                                 continue
7695                         fi
7696                         ;;
7697                 esac
7698                 case "$CPPFLAGS" in
7699                 *$cf_add_cflags) #(vi
7700                         ;;
7701                 *) #(vi
7702                         case $cf_add_cflags in #(vi
7703                         -D*)
7704                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7705
7706 CPPFLAGS=`echo "$CPPFLAGS" | \
7707         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7708                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7709
7710                                 ;;
7711                         esac
7712                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
7713                         ;;
7714                 esac
7715                 ;;
7716         *)
7717                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
7718                 ;;
7719         esac
7720         ;;
7721 yes)
7722         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
7723
7724         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
7725
7726         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
7727                 && test -z "${cf_tst_cflags}" \
7728                 && cf_fix_cppflags=no
7729         ;;
7730 esac
7731 done
7732
7733 if test -n "$cf_new_cflags" ; then
7734
7735         CFLAGS="$CFLAGS $cf_new_cflags"
7736 fi
7737
7738 if test -n "$cf_new_cppflags" ; then
7739
7740         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
7741 fi
7742
7743 if test -n "$cf_new_extra_cppflags" ; then
7744
7745         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
7746 fi
7747
7748 fi
7749
7750 # Work around breakage on OS X
7751
7752 echo "$as_me:7752: checking if SIGWINCH is defined" >&5
7753 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
7754 if test "${cf_cv_define_sigwinch+set}" = set; then
7755   echo $ECHO_N "(cached) $ECHO_C" >&6
7756 else
7757
7758         cat >conftest.$ac_ext <<_ACEOF
7759 #line 7759 "configure"
7760 #include "confdefs.h"
7761
7762 #include <sys/types.h>
7763 #include <sys/signal.h>
7764
7765 int
7766 main ()
7767 {
7768 int x = SIGWINCH
7769   ;
7770   return 0;
7771 }
7772 _ACEOF
7773 rm -f conftest.$ac_objext
7774 if { (eval echo "$as_me:7774: \"$ac_compile\"") >&5
7775   (eval $ac_compile) 2>&5
7776   ac_status=$?
7777   echo "$as_me:7777: \$? = $ac_status" >&5
7778   (exit $ac_status); } &&
7779          { ac_try='test -s conftest.$ac_objext'
7780   { (eval echo "$as_me:7780: \"$ac_try\"") >&5
7781   (eval $ac_try) 2>&5
7782   ac_status=$?
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit $ac_status); }; }; then
7785   cf_cv_define_sigwinch=yes
7786 else
7787   echo "$as_me: failed program was:" >&5
7788 cat conftest.$ac_ext >&5
7789 cat >conftest.$ac_ext <<_ACEOF
7790 #line 7790 "configure"
7791 #include "confdefs.h"
7792
7793 #undef _XOPEN_SOURCE
7794 #undef _POSIX_SOURCE
7795 #undef _POSIX_C_SOURCE
7796 #include <sys/types.h>
7797 #include <sys/signal.h>
7798
7799 int
7800 main ()
7801 {
7802 int x = SIGWINCH
7803   ;
7804   return 0;
7805 }
7806 _ACEOF
7807 rm -f conftest.$ac_objext
7808 if { (eval echo "$as_me:7808: \"$ac_compile\"") >&5
7809   (eval $ac_compile) 2>&5
7810   ac_status=$?
7811   echo "$as_me:7811: \$? = $ac_status" >&5
7812   (exit $ac_status); } &&
7813          { ac_try='test -s conftest.$ac_objext'
7814   { (eval echo "$as_me:7814: \"$ac_try\"") >&5
7815   (eval $ac_try) 2>&5
7816   ac_status=$?
7817   echo "$as_me:7817: \$? = $ac_status" >&5
7818   (exit $ac_status); }; }; then
7819   cf_cv_define_sigwinch=maybe
7820 else
7821   echo "$as_me: failed program was:" >&5
7822 cat conftest.$ac_ext >&5
7823 cf_cv_define_sigwinch=no
7824 fi
7825 rm -f conftest.$ac_objext conftest.$ac_ext
7826
7827 fi
7828 rm -f conftest.$ac_objext conftest.$ac_ext
7829
7830 fi
7831 echo "$as_me:7831: result: $cf_cv_define_sigwinch" >&5
7832 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
7833
7834 if test "$cf_cv_define_sigwinch" = maybe ; then
7835 echo "$as_me:7835: checking for actual SIGWINCH definition" >&5
7836 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
7837 if test "${cf_cv_fixup_sigwinch+set}" = set; then
7838   echo $ECHO_N "(cached) $ECHO_C" >&6
7839 else
7840
7841 cf_cv_fixup_sigwinch=unknown
7842 cf_sigwinch=32
7843 while test $cf_sigwinch != 1
7844 do
7845         cat >conftest.$ac_ext <<_ACEOF
7846 #line 7846 "configure"
7847 #include "confdefs.h"
7848
7849 #undef _XOPEN_SOURCE
7850 #undef _POSIX_SOURCE
7851 #undef _POSIX_C_SOURCE
7852 #include <sys/types.h>
7853 #include <sys/signal.h>
7854
7855 int
7856 main ()
7857 {
7858
7859 #if SIGWINCH != $cf_sigwinch
7860 make an error
7861 #endif
7862 int x = SIGWINCH
7863   ;
7864   return 0;
7865 }
7866 _ACEOF
7867 rm -f conftest.$ac_objext
7868 if { (eval echo "$as_me:7868: \"$ac_compile\"") >&5
7869   (eval $ac_compile) 2>&5
7870   ac_status=$?
7871   echo "$as_me:7871: \$? = $ac_status" >&5
7872   (exit $ac_status); } &&
7873          { ac_try='test -s conftest.$ac_objext'
7874   { (eval echo "$as_me:7874: \"$ac_try\"") >&5
7875   (eval $ac_try) 2>&5
7876   ac_status=$?
7877   echo "$as_me:7877: \$? = $ac_status" >&5
7878   (exit $ac_status); }; }; then
7879   cf_cv_fixup_sigwinch=$cf_sigwinch
7880          break
7881 else
7882   echo "$as_me: failed program was:" >&5
7883 cat conftest.$ac_ext >&5
7884 fi
7885 rm -f conftest.$ac_objext conftest.$ac_ext
7886
7887 cf_sigwinch=`expr $cf_sigwinch - 1`
7888 done
7889
7890 fi
7891 echo "$as_me:7891: result: $cf_cv_fixup_sigwinch" >&5
7892 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
7893
7894         if test "$cf_cv_fixup_sigwinch" != unknown ; then
7895                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
7896         fi
7897 fi
7898
7899 # Checks for CODESET support.
7900
7901   echo "$as_me:7901: checking for nl_langinfo and CODESET" >&5
7902 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
7903 if test "${am_cv_langinfo_codeset+set}" = set; then
7904   echo $ECHO_N "(cached) $ECHO_C" >&6
7905 else
7906   cat >conftest.$ac_ext <<_ACEOF
7907 #line 7907 "configure"
7908 #include "confdefs.h"
7909 #include <langinfo.h>
7910 int
7911 main ()
7912 {
7913 char* cs = nl_langinfo(CODESET);
7914   ;
7915   return 0;
7916 }
7917 _ACEOF
7918 rm -f conftest.$ac_objext conftest$ac_exeext
7919 if { (eval echo "$as_me:7919: \"$ac_link\"") >&5
7920   (eval $ac_link) 2>&5
7921   ac_status=$?
7922   echo "$as_me:7922: \$? = $ac_status" >&5
7923   (exit $ac_status); } &&
7924          { ac_try='test -s conftest$ac_exeext'
7925   { (eval echo "$as_me:7925: \"$ac_try\"") >&5
7926   (eval $ac_try) 2>&5
7927   ac_status=$?
7928   echo "$as_me:7928: \$? = $ac_status" >&5
7929   (exit $ac_status); }; }; then
7930   am_cv_langinfo_codeset=yes
7931 else
7932   echo "$as_me: failed program was:" >&5
7933 cat conftest.$ac_ext >&5
7934 am_cv_langinfo_codeset=no
7935 fi
7936 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7937
7938 fi
7939 echo "$as_me:7939: result: $am_cv_langinfo_codeset" >&5
7940 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
7941   if test $am_cv_langinfo_codeset = yes; then
7942
7943 cat >>confdefs.h <<\EOF
7944 #define HAVE_LANGINFO_CODESET 1
7945 EOF
7946
7947   fi
7948
7949 # use these variables to work around a defect in gcc's fixincludes.
7950 NCURSES_OK_WCHAR_T=
7951 NCURSES_OK_WINT_T=
7952
7953 echo "$as_me:7953: checking if you want wide-character code" >&5
7954 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
7955
7956 # Check whether --enable-widec or --disable-widec was given.
7957 if test "${enable_widec+set}" = set; then
7958   enableval="$enable_widec"
7959   with_widec=$enableval
7960 else
7961   with_widec=no
7962 fi;
7963 echo "$as_me:7963: result: $with_widec" >&5
7964 echo "${ECHO_T}$with_widec" >&6
7965 if test "$with_widec" = yes ; then
7966         LIB_SUFFIX="w${LIB_SUFFIX}"
7967         cat >>confdefs.h <<\EOF
7968 #define USE_WIDEC_SUPPORT 1
7969 EOF
7970
7971         case "$CFLAGS $CPPFLAGS" in #(vi
7972         *-D_XOPEN_SOURCE=500) #(vi
7973                 ;;
7974         *)
7975
7976 echo "$as_me:7976: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
7977 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
7978 cat >conftest.$ac_ext <<_ACEOF
7979 #line 7979 "configure"
7980 #include "confdefs.h"
7981 #include <sys/types.h>
7982
7983 int
7984 main ()
7985 {
7986
7987 #ifndef _XOPEN_SOURCE_EXTENDED
7988 make an error
7989 #endif
7990   ;
7991   return 0;
7992 }
7993 _ACEOF
7994 rm -f conftest.$ac_objext
7995 if { (eval echo "$as_me:7995: \"$ac_compile\"") >&5
7996   (eval $ac_compile) 2>&5
7997   ac_status=$?
7998   echo "$as_me:7998: \$? = $ac_status" >&5
7999   (exit $ac_status); } &&
8000          { ac_try='test -s conftest.$ac_objext'
8001   { (eval echo "$as_me:8001: \"$ac_try\"") >&5
8002   (eval $ac_try) 2>&5
8003   ac_status=$?
8004   echo "$as_me:8004: \$? = $ac_status" >&5
8005   (exit $ac_status); }; }; then
8006   cf_result=no
8007 else
8008   echo "$as_me: failed program was:" >&5
8009 cat conftest.$ac_ext >&5
8010 cf_result=yes
8011 fi
8012 rm -f conftest.$ac_objext conftest.$ac_ext
8013 echo "$as_me:8013: result: $cf_result" >&5
8014 echo "${ECHO_T}$cf_result" >&6
8015
8016 if test "$cf_result" = yes ; then
8017         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
8018 elif test "x" != "x" ; then
8019         echo "$as_me:8019: checking checking for compatible value versus " >&5
8020 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
8021         cat >conftest.$ac_ext <<_ACEOF
8022 #line 8022 "configure"
8023 #include "confdefs.h"
8024 #include <sys/types.h>
8025
8026 int
8027 main ()
8028 {
8029
8030 #if _XOPEN_SOURCE_EXTENDED- < 0
8031 make an error
8032 #endif
8033   ;
8034   return 0;
8035 }
8036 _ACEOF
8037 rm -f conftest.$ac_objext
8038 if { (eval echo "$as_me:8038: \"$ac_compile\"") >&5
8039   (eval $ac_compile) 2>&5
8040   ac_status=$?
8041   echo "$as_me:8041: \$? = $ac_status" >&5
8042   (exit $ac_status); } &&
8043          { ac_try='test -s conftest.$ac_objext'
8044   { (eval echo "$as_me:8044: \"$ac_try\"") >&5
8045   (eval $ac_try) 2>&5
8046   ac_status=$?
8047   echo "$as_me:8047: \$? = $ac_status" >&5
8048   (exit $ac_status); }; }; then
8049   cf_result=yes
8050 else
8051   echo "$as_me: failed program was:" >&5
8052 cat conftest.$ac_ext >&5
8053 cf_result=no
8054 fi
8055 rm -f conftest.$ac_objext conftest.$ac_ext
8056         echo "$as_me:8056: result: $cf_result" >&5
8057 echo "${ECHO_T}$cf_result" >&6
8058         if test "$cf_result" = no ; then
8059                 # perhaps we can override it - try...
8060                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
8061         fi
8062 fi
8063
8064                 ;;
8065         esac
8066
8067         # with_overwrite=no
8068         NCURSES_CH_T=cchar_t
8069
8070 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
8071 do
8072 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8073 echo "$as_me:8073: checking for $ac_func" >&5
8074 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8075 if eval "test \"\${$as_ac_var+set}\" = set"; then
8076   echo $ECHO_N "(cached) $ECHO_C" >&6
8077 else
8078   cat >conftest.$ac_ext <<_ACEOF
8079 #line 8079 "configure"
8080 #include "confdefs.h"
8081 /* System header to define __stub macros and hopefully few prototypes,
8082     which can conflict with char $ac_func (); below.  */
8083 #include <assert.h>
8084 /* Override any gcc2 internal prototype to avoid an error.  */
8085 #ifdef __cplusplus
8086 extern "C"
8087 #endif
8088 /* We use char because int might match the return type of a gcc2
8089    builtin and then its argument prototype would still apply.  */
8090 char $ac_func ();
8091 char (*f) ();
8092
8093 int
8094 main ()
8095 {
8096 /* The GNU C library defines this for functions which it implements
8097     to always fail with ENOSYS.  Some functions are actually named
8098     something starting with __ and the normal name is an alias.  */
8099 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8100 choke me
8101 #else
8102 f = $ac_func;
8103 #endif
8104
8105   ;
8106   return 0;
8107 }
8108 _ACEOF
8109 rm -f conftest.$ac_objext conftest$ac_exeext
8110 if { (eval echo "$as_me:8110: \"$ac_link\"") >&5
8111   (eval $ac_link) 2>&5
8112   ac_status=$?
8113   echo "$as_me:8113: \$? = $ac_status" >&5
8114   (exit $ac_status); } &&
8115          { ac_try='test -s conftest$ac_exeext'
8116   { (eval echo "$as_me:8116: \"$ac_try\"") >&5
8117   (eval $ac_try) 2>&5
8118   ac_status=$?
8119   echo "$as_me:8119: \$? = $ac_status" >&5
8120   (exit $ac_status); }; }; then
8121   eval "$as_ac_var=yes"
8122 else
8123   echo "$as_me: failed program was:" >&5
8124 cat conftest.$ac_ext >&5
8125 eval "$as_ac_var=no"
8126 fi
8127 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8128 fi
8129 echo "$as_me:8129: result: `eval echo '${'$as_ac_var'}'`" >&5
8130 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
8131 if test `eval echo '${'$as_ac_var'}'` = yes; then
8132   cat >>confdefs.h <<EOF
8133 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8134 EOF
8135
8136 fi
8137 done
8138
8139         if test "$ac_cv_func_putwc" != yes ; then
8140
8141 echo "$as_me:8141: checking for multibyte character support" >&5
8142 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
8143 if test "${cf_cv_utf8_lib+set}" = set; then
8144   echo $ECHO_N "(cached) $ECHO_C" >&6
8145 else
8146
8147         cf_save_LIBS="$LIBS"
8148         cat >conftest.$ac_ext <<_ACEOF
8149 #line 8149 "configure"
8150 #include "confdefs.h"
8151
8152 #include <stdlib.h>
8153 int
8154 main ()
8155 {
8156 putwc(0,0);
8157   ;
8158   return 0;
8159 }
8160 _ACEOF
8161 rm -f conftest.$ac_objext conftest$ac_exeext
8162 if { (eval echo "$as_me:8162: \"$ac_link\"") >&5
8163   (eval $ac_link) 2>&5
8164   ac_status=$?
8165   echo "$as_me:8165: \$? = $ac_status" >&5
8166   (exit $ac_status); } &&
8167          { ac_try='test -s conftest$ac_exeext'
8168   { (eval echo "$as_me:8168: \"$ac_try\"") >&5
8169   (eval $ac_try) 2>&5
8170   ac_status=$?
8171   echo "$as_me:8171: \$? = $ac_status" >&5
8172   (exit $ac_status); }; }; then
8173   cf_cv_utf8_lib=yes
8174 else
8175   echo "$as_me: failed program was:" >&5
8176 cat conftest.$ac_ext >&5
8177
8178 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8179 # will be set on completion of the AC_TRY_LINK below.
8180 cf_cv_header_path_utf8=
8181 cf_cv_library_path_utf8=
8182
8183 echo "${as_me:-configure}:8183: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
8184
8185 cf_save_LIBS="$LIBS"
8186
8187 cat >conftest.$ac_ext <<_ACEOF
8188 #line 8188 "configure"
8189 #include "confdefs.h"
8190
8191 #include <libutf8.h>
8192 int
8193 main ()
8194 {
8195 putwc(0,0);
8196   ;
8197   return 0;
8198 }
8199 _ACEOF
8200 rm -f conftest.$ac_objext conftest$ac_exeext
8201 if { (eval echo "$as_me:8201: \"$ac_link\"") >&5
8202   (eval $ac_link) 2>&5
8203   ac_status=$?
8204   echo "$as_me:8204: \$? = $ac_status" >&5
8205   (exit $ac_status); } &&
8206          { ac_try='test -s conftest$ac_exeext'
8207   { (eval echo "$as_me:8207: \"$ac_try\"") >&5
8208   (eval $ac_try) 2>&5
8209   ac_status=$?
8210   echo "$as_me:8210: \$? = $ac_status" >&5
8211   (exit $ac_status); }; }; then
8212
8213         cf_cv_find_linkage_utf8=yes
8214         cf_cv_header_path_utf8=/usr/include
8215         cf_cv_library_path_utf8=/usr/lib
8216
8217 else
8218   echo "$as_me: failed program was:" >&5
8219 cat conftest.$ac_ext >&5
8220
8221 LIBS="-lutf8  $cf_save_LIBS"
8222
8223 cat >conftest.$ac_ext <<_ACEOF
8224 #line 8224 "configure"
8225 #include "confdefs.h"
8226
8227 #include <libutf8.h>
8228 int
8229 main ()
8230 {
8231 putwc(0,0);
8232   ;
8233   return 0;
8234 }
8235 _ACEOF
8236 rm -f conftest.$ac_objext conftest$ac_exeext
8237 if { (eval echo "$as_me:8237: \"$ac_link\"") >&5
8238   (eval $ac_link) 2>&5
8239   ac_status=$?
8240   echo "$as_me:8240: \$? = $ac_status" >&5
8241   (exit $ac_status); } &&
8242          { ac_try='test -s conftest$ac_exeext'
8243   { (eval echo "$as_me:8243: \"$ac_try\"") >&5
8244   (eval $ac_try) 2>&5
8245   ac_status=$?
8246   echo "$as_me:8246: \$? = $ac_status" >&5
8247   (exit $ac_status); }; }; then
8248
8249         cf_cv_find_linkage_utf8=yes
8250         cf_cv_header_path_utf8=/usr/include
8251         cf_cv_library_path_utf8=/usr/lib
8252         cf_cv_library_file_utf8="-lutf8"
8253
8254 else
8255   echo "$as_me: failed program was:" >&5
8256 cat conftest.$ac_ext >&5
8257
8258         cf_cv_find_linkage_utf8=no
8259         LIBS="$cf_save_LIBS"
8260
8261     test -n "$verbose" && echo "        find linkage for utf8 library" 1>&6
8262
8263 echo "${as_me:-configure}:8263: testing find linkage for utf8 library ..." 1>&5
8264
8265 echo "${as_me:-configure}:8265: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
8266
8267     cf_save_CPPFLAGS="$CPPFLAGS"
8268     cf_test_CPPFLAGS="$CPPFLAGS"
8269
8270 cf_search=
8271
8272 # collect the current set of include-directories from compiler flags
8273 cf_header_path_list=""
8274 if test -n "${CFLAGS}${CPPFLAGS}" ; then
8275         for cf_header_path in $CPPFLAGS $CFLAGS
8276         do
8277                 case $cf_header_path in #(vi
8278                 -I*)
8279                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8280
8281 test "$cf_header_path" != "NONE" && \
8282 test -d "$cf_header_path" && \
8283  {
8284         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
8285         test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8286         test -d $cf_header_path/include/utf8 &&       cf_search="$cf_search $cf_header_path/include/utf8"
8287         test -d $cf_header_path/include/utf8/include &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
8288         test -d $cf_header_path/utf8/include &&       cf_search="$cf_search $cf_header_path/utf8/include"
8289         test -d $cf_header_path/utf8/include/utf8 &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
8290 }
8291
8292                         cf_header_path_list="$cf_header_path_list $cf_search"
8293                         ;;
8294                 esac
8295         done
8296 fi
8297
8298 # add the variations for the package we are looking for
8299
8300 cf_search=
8301
8302 test "/usr" != "$prefix" && \
8303 test -d "/usr" && \
8304 (test $prefix = NONE || test "/usr" != "$prefix") && {
8305         test -n "$verbose" && echo "    ... testing for include-directories under /usr"
8306         test -d /usr/include &&          cf_search="$cf_search /usr/include"
8307         test -d /usr/include/utf8 &&       cf_search="$cf_search /usr/include/utf8"
8308         test -d /usr/include/utf8/include &&    cf_search="$cf_search /usr/include/utf8/include"
8309         test -d /usr/utf8/include &&       cf_search="$cf_search /usr/utf8/include"
8310         test -d /usr/utf8/include/utf8 &&    cf_search="$cf_search /usr/utf8/include/utf8"
8311 }
8312
8313 test "$prefix" != "NONE" && \
8314 test -d "$prefix" && \
8315  {
8316         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
8317         test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
8318         test -d $prefix/include/utf8 &&       cf_search="$cf_search $prefix/include/utf8"
8319         test -d $prefix/include/utf8/include &&    cf_search="$cf_search $prefix/include/utf8/include"
8320         test -d $prefix/utf8/include &&       cf_search="$cf_search $prefix/utf8/include"
8321         test -d $prefix/utf8/include/utf8 &&    cf_search="$cf_search $prefix/utf8/include/utf8"
8322 }
8323
8324 test "/usr/local" != "$prefix" && \
8325 test -d "/usr/local" && \
8326 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8327         test -n "$verbose" && echo "    ... testing for include-directories under /usr/local"
8328         test -d /usr/local/include &&          cf_search="$cf_search /usr/local/include"
8329         test -d /usr/local/include/utf8 &&       cf_search="$cf_search /usr/local/include/utf8"
8330         test -d /usr/local/include/utf8/include &&    cf_search="$cf_search /usr/local/include/utf8/include"
8331         test -d /usr/local/utf8/include &&       cf_search="$cf_search /usr/local/utf8/include"
8332         test -d /usr/local/utf8/include/utf8 &&    cf_search="$cf_search /usr/local/utf8/include/utf8"
8333 }
8334
8335 test "/opt" != "$prefix" && \
8336 test -d "/opt" && \
8337 (test $prefix = NONE || test "/opt" != "$prefix") && {
8338         test -n "$verbose" && echo "    ... testing for include-directories under /opt"
8339         test -d /opt/include &&          cf_search="$cf_search /opt/include"
8340         test -d /opt/include/utf8 &&       cf_search="$cf_search /opt/include/utf8"
8341         test -d /opt/include/utf8/include &&    cf_search="$cf_search /opt/include/utf8/include"
8342         test -d /opt/utf8/include &&       cf_search="$cf_search /opt/utf8/include"
8343         test -d /opt/utf8/include/utf8 &&    cf_search="$cf_search /opt/utf8/include/utf8"
8344 }
8345
8346 test "$HOME" != "$prefix" && \
8347 test -d "$HOME" && \
8348 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8349         test -n "$verbose" && echo "    ... testing for include-directories under $HOME"
8350         test -d $HOME/include &&          cf_search="$cf_search $HOME/include"
8351         test -d $HOME/include/utf8 &&       cf_search="$cf_search $HOME/include/utf8"
8352         test -d $HOME/include/utf8/include &&    cf_search="$cf_search $HOME/include/utf8/include"
8353         test -d $HOME/utf8/include &&       cf_search="$cf_search $HOME/utf8/include"
8354         test -d $HOME/utf8/include/utf8 &&    cf_search="$cf_search $HOME/utf8/include/utf8"
8355 }
8356
8357 test "$includedir" != NONE && \
8358 test "$includedir" != "/usr/include" && \
8359 test -d "$includedir" && {
8360         test -d $includedir &&    cf_search="$cf_search $includedir"
8361         test -d $includedir/utf8 && cf_search="$cf_search $includedir/utf8"
8362 }
8363
8364 test "$oldincludedir" != NONE && \
8365 test "$oldincludedir" != "/usr/include" && \
8366 test -d "$oldincludedir" && {
8367         test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
8368         test -d $oldincludedir/utf8 && cf_search="$cf_search $oldincludedir/utf8"
8369 }
8370
8371 cf_search="$cf_search $cf_header_path_list"
8372
8373     for cf_cv_header_path_utf8 in $cf_search
8374     do
8375       if test -d $cf_cv_header_path_utf8 ; then
8376         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
8377
8378 echo "${as_me:-configure}:8378: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
8379
8380         CPPFLAGS="$cf_save_CPPFLAGS -I$cf_cv_header_path_utf8"
8381         cat >conftest.$ac_ext <<_ACEOF
8382 #line 8382 "configure"
8383 #include "confdefs.h"
8384
8385 #include <libutf8.h>
8386 int
8387 main ()
8388 {
8389 putwc(0,0);
8390   ;
8391   return 0;
8392 }
8393 _ACEOF
8394 rm -f conftest.$ac_objext
8395 if { (eval echo "$as_me:8395: \"$ac_compile\"") >&5
8396   (eval $ac_compile) 2>&5
8397   ac_status=$?
8398   echo "$as_me:8398: \$? = $ac_status" >&5
8399   (exit $ac_status); } &&
8400          { ac_try='test -s conftest.$ac_objext'
8401   { (eval echo "$as_me:8401: \"$ac_try\"") >&5
8402   (eval $ac_try) 2>&5
8403   ac_status=$?
8404   echo "$as_me:8404: \$? = $ac_status" >&5
8405   (exit $ac_status); }; }; then
8406
8407             test -n "$verbose" && echo "        ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
8408
8409 echo "${as_me:-configure}:8409: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
8410
8411             cf_cv_find_linkage_utf8=maybe
8412             cf_test_CPPFLAGS="$CPPFLAGS"
8413             break
8414 else
8415   echo "$as_me: failed program was:" >&5
8416 cat conftest.$ac_ext >&5
8417
8418             CPPFLAGS="$cf_save_CPPFLAGS"
8419
8420 fi
8421 rm -f conftest.$ac_objext conftest.$ac_ext
8422       fi
8423     done
8424
8425     if test "$cf_cv_find_linkage_utf8" = maybe ; then
8426
8427 echo "${as_me:-configure}:8427: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
8428
8429       cf_save_LIBS="$LIBS"
8430       cf_save_LDFLAGS="$LDFLAGS"
8431
8432       if test "$cf_cv_find_linkage_utf8" != yes ; then
8433
8434 cf_search=
8435 cf_library_path_list=""
8436 if test -n "${LDFLAGS}${LIBS}" ; then
8437         for cf_library_path in $LDFLAGS $LIBS
8438         do
8439                 case $cf_library_path in #(vi
8440                 -L*)
8441                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
8442
8443 test "$cf_library_path" != "NONE" && \
8444 test -d "$cf_library_path" && \
8445  {
8446         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
8447         test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
8448         test -d $cf_library_path/lib/utf8 &&       cf_search="$cf_search $cf_library_path/lib/utf8"
8449         test -d $cf_library_path/lib/utf8/lib &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
8450         test -d $cf_library_path/utf8/lib &&       cf_search="$cf_search $cf_library_path/utf8/lib"
8451         test -d $cf_library_path/utf8/lib/utf8 &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
8452 }
8453
8454                         cf_library_path_list="$cf_library_path_list $cf_search"
8455                         ;;
8456                 esac
8457         done
8458 fi
8459
8460 cf_search=
8461
8462 test "/usr" != "$prefix" && \
8463 test -d "/usr" && \
8464 (test $prefix = NONE || test "/usr" != "$prefix") && {
8465         test -n "$verbose" && echo "    ... testing for lib-directories under /usr"
8466         test -d /usr/lib &&          cf_search="$cf_search /usr/lib"
8467         test -d /usr/lib/utf8 &&       cf_search="$cf_search /usr/lib/utf8"
8468         test -d /usr/lib/utf8/lib &&    cf_search="$cf_search /usr/lib/utf8/lib"
8469         test -d /usr/utf8/lib &&       cf_search="$cf_search /usr/utf8/lib"
8470         test -d /usr/utf8/lib/utf8 &&    cf_search="$cf_search /usr/utf8/lib/utf8"
8471 }
8472
8473 test "$prefix" != "NONE" && \
8474 test -d "$prefix" && \
8475  {
8476         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
8477         test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
8478         test -d $prefix/lib/utf8 &&       cf_search="$cf_search $prefix/lib/utf8"
8479         test -d $prefix/lib/utf8/lib &&    cf_search="$cf_search $prefix/lib/utf8/lib"
8480         test -d $prefix/utf8/lib &&       cf_search="$cf_search $prefix/utf8/lib"
8481         test -d $prefix/utf8/lib/utf8 &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
8482 }
8483
8484 test "/usr/local" != "$prefix" && \
8485 test -d "/usr/local" && \
8486 (test $prefix = NONE || test "/usr/local" != "$prefix") && {
8487         test -n "$verbose" && echo "    ... testing for lib-directories under /usr/local"
8488         test -d /usr/local/lib &&          cf_search="$cf_search /usr/local/lib"
8489         test -d /usr/local/lib/utf8 &&       cf_search="$cf_search /usr/local/lib/utf8"
8490         test -d /usr/local/lib/utf8/lib &&    cf_search="$cf_search /usr/local/lib/utf8/lib"
8491         test -d /usr/local/utf8/lib &&       cf_search="$cf_search /usr/local/utf8/lib"
8492         test -d /usr/local/utf8/lib/utf8 &&    cf_search="$cf_search /usr/local/utf8/lib/utf8"
8493 }
8494
8495 test "/opt" != "$prefix" && \
8496 test -d "/opt" && \
8497 (test $prefix = NONE || test "/opt" != "$prefix") && {
8498         test -n "$verbose" && echo "    ... testing for lib-directories under /opt"
8499         test -d /opt/lib &&          cf_search="$cf_search /opt/lib"
8500         test -d /opt/lib/utf8 &&       cf_search="$cf_search /opt/lib/utf8"
8501         test -d /opt/lib/utf8/lib &&    cf_search="$cf_search /opt/lib/utf8/lib"
8502         test -d /opt/utf8/lib &&       cf_search="$cf_search /opt/utf8/lib"
8503         test -d /opt/utf8/lib/utf8 &&    cf_search="$cf_search /opt/utf8/lib/utf8"
8504 }
8505
8506 test "$HOME" != "$prefix" && \
8507 test -d "$HOME" && \
8508 (test $prefix = NONE || test "$HOME" != "$prefix") && {
8509         test -n "$verbose" && echo "    ... testing for lib-directories under $HOME"
8510         test -d $HOME/lib &&          cf_search="$cf_search $HOME/lib"
8511         test -d $HOME/lib/utf8 &&       cf_search="$cf_search $HOME/lib/utf8"
8512         test -d $HOME/lib/utf8/lib &&    cf_search="$cf_search $HOME/lib/utf8/lib"
8513         test -d $HOME/utf8/lib &&       cf_search="$cf_search $HOME/utf8/lib"
8514         test -d $HOME/utf8/lib/utf8 &&    cf_search="$cf_search $HOME/utf8/lib/utf8"
8515 }
8516
8517 cf_search="$cf_library_path_list $cf_search"
8518
8519         for cf_cv_library_path_utf8 in $cf_search
8520         do
8521           if test -d $cf_cv_library_path_utf8 ; then
8522             test -n "$verbose" && echo "        ... testing $cf_cv_library_path_utf8" 1>&6
8523
8524 echo "${as_me:-configure}:8524: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
8525
8526             CPPFLAGS="$cf_test_CPPFLAGS"
8527             LIBS="-lutf8  $cf_save_LIBS"
8528             LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
8529             cat >conftest.$ac_ext <<_ACEOF
8530 #line 8530 "configure"
8531 #include "confdefs.h"
8532
8533 #include <libutf8.h>
8534 int
8535 main ()
8536 {
8537 putwc(0,0);
8538   ;
8539   return 0;
8540 }
8541 _ACEOF
8542 rm -f conftest.$ac_objext conftest$ac_exeext
8543 if { (eval echo "$as_me:8543: \"$ac_link\"") >&5
8544   (eval $ac_link) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit $ac_status); } &&
8548          { ac_try='test -s conftest$ac_exeext'
8549   { (eval echo "$as_me:8549: \"$ac_try\"") >&5
8550   (eval $ac_try) 2>&5
8551   ac_status=$?
8552   echo "$as_me:8552: \$? = $ac_status" >&5
8553   (exit $ac_status); }; }; then
8554
8555                 test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
8556
8557 echo "${as_me:-configure}:8557: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
8558
8559                 cf_cv_find_linkage_utf8=yes
8560                 cf_cv_library_file_utf8="-lutf8"
8561                 break
8562 else
8563   echo "$as_me: failed program was:" >&5
8564 cat conftest.$ac_ext >&5
8565
8566                 CPPFLAGS="$cf_save_CPPFLAGS"
8567                 LIBS="$cf_save_LIBS"
8568                 LDFLAGS="$cf_save_LDFLAGS"
8569
8570 fi
8571 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8572           fi
8573         done
8574         CPPFLAGS="$cf_save_CPPFLAGS"
8575         LDFLAGS="$cf_save_LDFLAGS"
8576       fi
8577
8578     else
8579       cf_cv_find_linkage_utf8=no
8580     fi
8581
8582 fi
8583 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8584
8585 fi
8586 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8587
8588 LIBS="$cf_save_LIBS"
8589
8590 if test "$cf_cv_find_linkage_utf8" = yes ; then
8591 cf_cv_utf8_lib=add-on
8592 else
8593 cf_cv_utf8_lib=no
8594 fi
8595
8596 fi
8597 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8598 fi
8599 echo "$as_me:8599: result: $cf_cv_utf8_lib" >&5
8600 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
8601
8602 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
8603 # ncurses/ncursesw:
8604 if test "$cf_cv_utf8_lib" = "add-on" ; then
8605         cat >>confdefs.h <<\EOF
8606 #define HAVE_LIBUTF8_H 1
8607 EOF
8608
8609 if test -n "$cf_cv_header_path_utf8" ; then
8610   for cf_add_incdir in $cf_cv_header_path_utf8
8611   do
8612         while test $cf_add_incdir != /usr/include
8613         do
8614           if test -d $cf_add_incdir
8615           then
8616                 cf_have_incdir=no
8617                 if test -n "$CFLAGS$CPPFLAGS" ; then
8618                   # a loop is needed to ensure we can add subdirs of existing dirs
8619                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8620                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8621                           cf_have_incdir=yes; break
8622                         fi
8623                   done
8624                 fi
8625
8626                 if test "$cf_have_incdir" = no ; then
8627                   if test "$cf_add_incdir" = /usr/local/include ; then
8628                         if test "$GCC" = yes
8629                         then
8630                           cf_save_CPPFLAGS=$CPPFLAGS
8631                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8632                           cat >conftest.$ac_ext <<_ACEOF
8633 #line 8633 "configure"
8634 #include "confdefs.h"
8635 #include <stdio.h>
8636 int
8637 main ()
8638 {
8639 printf("Hello")
8640   ;
8641   return 0;
8642 }
8643 _ACEOF
8644 rm -f conftest.$ac_objext
8645 if { (eval echo "$as_me:8645: \"$ac_compile\"") >&5
8646   (eval $ac_compile) 2>&5
8647   ac_status=$?
8648   echo "$as_me:8648: \$? = $ac_status" >&5
8649   (exit $ac_status); } &&
8650          { ac_try='test -s conftest.$ac_objext'
8651   { (eval echo "$as_me:8651: \"$ac_try\"") >&5
8652   (eval $ac_try) 2>&5
8653   ac_status=$?
8654   echo "$as_me:8654: \$? = $ac_status" >&5
8655   (exit $ac_status); }; }; then
8656   :
8657 else
8658   echo "$as_me: failed program was:" >&5
8659 cat conftest.$ac_ext >&5
8660 cf_have_incdir=yes
8661 fi
8662 rm -f conftest.$ac_objext conftest.$ac_ext
8663                           CPPFLAGS=$cf_save_CPPFLAGS
8664                         fi
8665                   fi
8666                 fi
8667
8668                 if test "$cf_have_incdir" = no ; then
8669                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
8670
8671 echo "${as_me:-configure}:8671: testing adding $cf_add_incdir to include-path ..." 1>&5
8672
8673                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8674
8675                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8676                   test "$cf_top_incdir" = "$cf_add_incdir" && break
8677                   cf_add_incdir="$cf_top_incdir"
8678                 else
8679                   break
8680                 fi
8681           fi
8682         done
8683   done
8684 fi
8685
8686 if test -n "$cf_cv_library_path_utf8" ; then
8687   for cf_add_libdir in $cf_cv_library_path_utf8
8688   do
8689     if test $cf_add_libdir = /usr/lib ; then
8690       :
8691     elif test -d $cf_add_libdir
8692     then
8693       cf_have_libdir=no
8694       if test -n "$LDFLAGS$LIBS" ; then
8695         # a loop is needed to ensure we can add subdirs of existing dirs
8696         for cf_test_libdir in $LDFLAGS $LIBS ; do
8697           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8698             cf_have_libdir=yes; break
8699           fi
8700         done
8701       fi
8702       if test "$cf_have_libdir" = no ; then
8703         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
8704
8705 echo "${as_me:-configure}:8705: testing adding $cf_add_libdir to library-path ..." 1>&5
8706
8707         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8708       fi
8709     fi
8710   done
8711 fi
8712
8713         LIBS="$cf_cv_library_file_utf8 $LIBS"
8714 fi
8715
8716                 if test "$cf_cv_utf8_lib" != no ; then
8717                         NCURSES_LIBUTF8=1
8718                 fi
8719         fi
8720
8721 # This is needed on Tru64 5.0 to declare mbstate_t
8722 echo "$as_me:8722: checking if we must include wchar.h to declare mbstate_t" >&5
8723 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
8724 if test "${cf_cv_mbstate_t+set}" = set; then
8725   echo $ECHO_N "(cached) $ECHO_C" >&6
8726 else
8727
8728 cat >conftest.$ac_ext <<_ACEOF
8729 #line 8729 "configure"
8730 #include "confdefs.h"
8731
8732 #include <stdlib.h>
8733 #include <stdarg.h>
8734 #include <stdio.h>
8735 #ifdef HAVE_LIBUTF8_H
8736 #include <libutf8.h>
8737 #endif
8738 int
8739 main ()
8740 {
8741 mbstate_t state
8742   ;
8743   return 0;
8744 }
8745 _ACEOF
8746 rm -f conftest.$ac_objext
8747 if { (eval echo "$as_me:8747: \"$ac_compile\"") >&5
8748   (eval $ac_compile) 2>&5
8749   ac_status=$?
8750   echo "$as_me:8750: \$? = $ac_status" >&5
8751   (exit $ac_status); } &&
8752          { ac_try='test -s conftest.$ac_objext'
8753   { (eval echo "$as_me:8753: \"$ac_try\"") >&5
8754   (eval $ac_try) 2>&5
8755   ac_status=$?
8756   echo "$as_me:8756: \$? = $ac_status" >&5
8757   (exit $ac_status); }; }; then
8758   cf_cv_mbstate_t=no
8759 else
8760   echo "$as_me: failed program was:" >&5
8761 cat conftest.$ac_ext >&5
8762 cat >conftest.$ac_ext <<_ACEOF
8763 #line 8763 "configure"
8764 #include "confdefs.h"
8765
8766 #include <stdlib.h>
8767 #include <stdarg.h>
8768 #include <stdio.h>
8769 #include <wchar.h>
8770 #ifdef HAVE_LIBUTF8_H
8771 #include <libutf8.h>
8772 #endif
8773 int
8774 main ()
8775 {
8776 mbstate_t value
8777   ;
8778   return 0;
8779 }
8780 _ACEOF
8781 rm -f conftest.$ac_objext
8782 if { (eval echo "$as_me:8782: \"$ac_compile\"") >&5
8783   (eval $ac_compile) 2>&5
8784   ac_status=$?
8785   echo "$as_me:8785: \$? = $ac_status" >&5
8786   (exit $ac_status); } &&
8787          { ac_try='test -s conftest.$ac_objext'
8788   { (eval echo "$as_me:8788: \"$ac_try\"") >&5
8789   (eval $ac_try) 2>&5
8790   ac_status=$?
8791   echo "$as_me:8791: \$? = $ac_status" >&5
8792   (exit $ac_status); }; }; then
8793   cf_cv_mbstate_t=yes
8794 else
8795   echo "$as_me: failed program was:" >&5
8796 cat conftest.$ac_ext >&5
8797 cf_cv_mbstate_t=unknown
8798 fi
8799 rm -f conftest.$ac_objext conftest.$ac_ext
8800 fi
8801 rm -f conftest.$ac_objext conftest.$ac_ext
8802 fi
8803 echo "$as_me:8803: result: $cf_cv_mbstate_t" >&5
8804 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
8805
8806 if test "$cf_cv_mbstate_t" = yes ; then
8807         cat >>confdefs.h <<\EOF
8808 #define NEED_WCHAR_H 1
8809 EOF
8810
8811         NEED_WCHAR_H=1
8812 fi
8813
8814 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
8815 if test "$cf_cv_mbstate_t" = unknown ; then
8816         NCURSES_MBSTATE_T=1
8817 fi
8818
8819 # This is needed on Tru64 5.0 to declare wchar_t
8820 echo "$as_me:8820: checking if we must include wchar.h to declare wchar_t" >&5
8821 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
8822 if test "${cf_cv_wchar_t+set}" = set; then
8823   echo $ECHO_N "(cached) $ECHO_C" >&6
8824 else
8825
8826 cat >conftest.$ac_ext <<_ACEOF
8827 #line 8827 "configure"
8828 #include "confdefs.h"
8829
8830 #include <stdlib.h>
8831 #include <stdarg.h>
8832 #include <stdio.h>
8833 #ifdef HAVE_LIBUTF8_H
8834 #include <libutf8.h>
8835 #endif
8836 int
8837 main ()
8838 {
8839 wchar_t state
8840   ;
8841   return 0;
8842 }
8843 _ACEOF
8844 rm -f conftest.$ac_objext
8845 if { (eval echo "$as_me:8845: \"$ac_compile\"") >&5
8846   (eval $ac_compile) 2>&5
8847   ac_status=$?
8848   echo "$as_me:8848: \$? = $ac_status" >&5
8849   (exit $ac_status); } &&
8850          { ac_try='test -s conftest.$ac_objext'
8851   { (eval echo "$as_me:8851: \"$ac_try\"") >&5
8852   (eval $ac_try) 2>&5
8853   ac_status=$?
8854   echo "$as_me:8854: \$? = $ac_status" >&5
8855   (exit $ac_status); }; }; then
8856   cf_cv_wchar_t=no
8857 else
8858   echo "$as_me: failed program was:" >&5
8859 cat conftest.$ac_ext >&5
8860 cat >conftest.$ac_ext <<_ACEOF
8861 #line 8861 "configure"
8862 #include "confdefs.h"
8863
8864 #include <stdlib.h>
8865 #include <stdarg.h>
8866 #include <stdio.h>
8867 #include <wchar.h>
8868 #ifdef HAVE_LIBUTF8_H
8869 #include <libutf8.h>
8870 #endif
8871 int
8872 main ()
8873 {
8874 wchar_t value
8875   ;
8876   return 0;
8877 }
8878 _ACEOF
8879 rm -f conftest.$ac_objext
8880 if { (eval echo "$as_me:8880: \"$ac_compile\"") >&5
8881   (eval $ac_compile) 2>&5
8882   ac_status=$?
8883   echo "$as_me:8883: \$? = $ac_status" >&5
8884   (exit $ac_status); } &&
8885          { ac_try='test -s conftest.$ac_objext'
8886   { (eval echo "$as_me:8886: \"$ac_try\"") >&5
8887   (eval $ac_try) 2>&5
8888   ac_status=$?
8889   echo "$as_me:8889: \$? = $ac_status" >&5
8890   (exit $ac_status); }; }; then
8891   cf_cv_wchar_t=yes
8892 else
8893   echo "$as_me: failed program was:" >&5
8894 cat conftest.$ac_ext >&5
8895 cf_cv_wchar_t=unknown
8896 fi
8897 rm -f conftest.$ac_objext conftest.$ac_ext
8898 fi
8899 rm -f conftest.$ac_objext conftest.$ac_ext
8900 fi
8901 echo "$as_me:8901: result: $cf_cv_wchar_t" >&5
8902 echo "${ECHO_T}$cf_cv_wchar_t" >&6
8903
8904 if test "$cf_cv_wchar_t" = yes ; then
8905         cat >>confdefs.h <<\EOF
8906 #define NEED_WCHAR_H 1
8907 EOF
8908
8909         NEED_WCHAR_H=1
8910 fi
8911
8912 # if we do not find wchar_t in either place, use substitution to provide a fallback.
8913 if test "$cf_cv_wchar_t" = unknown ; then
8914         NCURSES_WCHAR_T=1
8915 fi
8916
8917 # if we find wchar_t in either place, use substitution to provide a fallback.
8918 if test "$cf_cv_wchar_t" != unknown ; then
8919         NCURSES_OK_WCHAR_T=1
8920 fi
8921
8922 # This is needed on Tru64 5.0 to declare wint_t
8923 echo "$as_me:8923: checking if we must include wchar.h to declare wint_t" >&5
8924 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
8925 if test "${cf_cv_wint_t+set}" = set; then
8926   echo $ECHO_N "(cached) $ECHO_C" >&6
8927 else
8928
8929 cat >conftest.$ac_ext <<_ACEOF
8930 #line 8930 "configure"
8931 #include "confdefs.h"
8932
8933 #include <stdlib.h>
8934 #include <stdarg.h>
8935 #include <stdio.h>
8936 #ifdef HAVE_LIBUTF8_H
8937 #include <libutf8.h>
8938 #endif
8939 int
8940 main ()
8941 {
8942 wint_t state
8943   ;
8944   return 0;
8945 }
8946 _ACEOF
8947 rm -f conftest.$ac_objext
8948 if { (eval echo "$as_me:8948: \"$ac_compile\"") >&5
8949   (eval $ac_compile) 2>&5
8950   ac_status=$?
8951   echo "$as_me:8951: \$? = $ac_status" >&5
8952   (exit $ac_status); } &&
8953          { ac_try='test -s conftest.$ac_objext'
8954   { (eval echo "$as_me:8954: \"$ac_try\"") >&5
8955   (eval $ac_try) 2>&5
8956   ac_status=$?
8957   echo "$as_me:8957: \$? = $ac_status" >&5
8958   (exit $ac_status); }; }; then
8959   cf_cv_wint_t=no
8960 else
8961   echo "$as_me: failed program was:" >&5
8962 cat conftest.$ac_ext >&5
8963 cat >conftest.$ac_ext <<_ACEOF
8964 #line 8964 "configure"
8965 #include "confdefs.h"
8966
8967 #include <stdlib.h>
8968 #include <stdarg.h>
8969 #include <stdio.h>
8970 #include <wchar.h>
8971 #ifdef HAVE_LIBUTF8_H
8972 #include <libutf8.h>
8973 #endif
8974 int
8975 main ()
8976 {
8977 wint_t value
8978   ;
8979   return 0;
8980 }
8981 _ACEOF
8982 rm -f conftest.$ac_objext
8983 if { (eval echo "$as_me:8983: \"$ac_compile\"") >&5
8984   (eval $ac_compile) 2>&5
8985   ac_status=$?
8986   echo "$as_me:8986: \$? = $ac_status" >&5
8987   (exit $ac_status); } &&
8988          { ac_try='test -s conftest.$ac_objext'
8989   { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8990   (eval $ac_try) 2>&5
8991   ac_status=$?
8992   echo "$as_me:8992: \$? = $ac_status" >&5
8993   (exit $ac_status); }; }; then
8994   cf_cv_wint_t=yes
8995 else
8996   echo "$as_me: failed program was:" >&5
8997 cat conftest.$ac_ext >&5
8998 cf_cv_wint_t=unknown
8999 fi
9000 rm -f conftest.$ac_objext conftest.$ac_ext
9001 fi
9002 rm -f conftest.$ac_objext conftest.$ac_ext
9003 fi
9004 echo "$as_me:9004: result: $cf_cv_wint_t" >&5
9005 echo "${ECHO_T}$cf_cv_wint_t" >&6
9006
9007 if test "$cf_cv_wint_t" = yes ; then
9008         cat >>confdefs.h <<\EOF
9009 #define NEED_WCHAR_H 1
9010 EOF
9011
9012         NEED_WCHAR_H=1
9013 fi
9014
9015 # if we do not find wint_t in either place, use substitution to provide a fallback.
9016 if test "$cf_cv_wint_t" = unknown ; then
9017         NCURSES_WINT_T=1
9018 fi
9019
9020 # if we find wint_t in either place, use substitution to provide a fallback.
9021 if test "$cf_cv_wint_t" != unknown ; then
9022         NCURSES_OK_WINT_T=1
9023 fi
9024
9025         if test "$NCURSES_MBSTATE_T" != 0; then
9026                 cat >>confdefs.h <<\EOF
9027 #define NEED_MBSTATE_T_DEF 1
9028 EOF
9029
9030         fi
9031 fi
9032
9033 ###   use option --disable-lp64 to allow long chtype
9034 case $cf_cv_abi_version in
9035 [345]*)
9036         default_with_lp64=no
9037         ;;
9038 *)
9039         default_with_lp64=yes
9040         ;;
9041 esac
9042
9043 echo "$as_me:9043: checking whether to enable _LP64 definition in curses.h" >&5
9044 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
9045
9046 # Check whether --enable-lp64 or --disable-lp64 was given.
9047 if test "${enable_lp64+set}" = set; then
9048   enableval="$enable_lp64"
9049   with_lp64=$enableval
9050 else
9051   with_lp64=$default_with_lp64
9052 fi;
9053 echo "$as_me:9053: result: $with_lp64" >&5
9054 echo "${ECHO_T}$with_lp64" >&6
9055
9056 if test "$with_lp64" = yes ; then
9057         cf_cv_enable_lp64=1
9058 else
9059         cf_cv_enable_lp64=0
9060 fi
9061
9062 # Check whether --enable-largefile or --disable-largefile was given.
9063 if test "${enable_largefile+set}" = set; then
9064   enableval="$enable_largefile"
9065
9066 fi;
9067 if test "$enable_largefile" != no; then
9068
9069   echo "$as_me:9069: checking for special C compiler options needed for large files" >&5
9070 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
9071 if test "${ac_cv_sys_largefile_CC+set}" = set; then
9072   echo $ECHO_N "(cached) $ECHO_C" >&6
9073 else
9074   ac_cv_sys_largefile_CC=no
9075      if test "$GCC" != yes; then
9076        ac_save_CC=$CC
9077        while :; do
9078          # IRIX 6.2 and later do not support large files by default,
9079          # so use the C compiler's -n32 option if that helps.
9080          cat >conftest.$ac_ext <<_ACEOF
9081 #line 9081 "configure"
9082 #include "confdefs.h"
9083 #include <sys/types.h>
9084  /* Check that off_t can represent 2**63 - 1 correctly.
9085     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9086     since some C++ compilers masquerading as C compilers
9087     incorrectly reject 9223372036854775807.  */
9088 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9089   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9090                        && LARGE_OFF_T % 2147483647 == 1)
9091                       ? 1 : -1];
9092 int
9093 main ()
9094 {
9095
9096   ;
9097   return 0;
9098 }
9099 _ACEOF
9100          rm -f conftest.$ac_objext
9101 if { (eval echo "$as_me:9101: \"$ac_compile\"") >&5
9102   (eval $ac_compile) 2>&5
9103   ac_status=$?
9104   echo "$as_me:9104: \$? = $ac_status" >&5
9105   (exit $ac_status); } &&
9106          { ac_try='test -s conftest.$ac_objext'
9107   { (eval echo "$as_me:9107: \"$ac_try\"") >&5
9108   (eval $ac_try) 2>&5
9109   ac_status=$?
9110   echo "$as_me:9110: \$? = $ac_status" >&5
9111   (exit $ac_status); }; }; then
9112   break
9113 else
9114   echo "$as_me: failed program was:" >&5
9115 cat conftest.$ac_ext >&5
9116 fi
9117 rm -f conftest.$ac_objext
9118          CC="$CC -n32"
9119          rm -f conftest.$ac_objext
9120 if { (eval echo "$as_me:9120: \"$ac_compile\"") >&5
9121   (eval $ac_compile) 2>&5
9122   ac_status=$?
9123   echo "$as_me:9123: \$? = $ac_status" >&5
9124   (exit $ac_status); } &&
9125          { ac_try='test -s conftest.$ac_objext'
9126   { (eval echo "$as_me:9126: \"$ac_try\"") >&5
9127   (eval $ac_try) 2>&5
9128   ac_status=$?
9129   echo "$as_me:9129: \$? = $ac_status" >&5
9130   (exit $ac_status); }; }; then
9131   ac_cv_sys_largefile_CC=' -n32'; break
9132 else
9133   echo "$as_me: failed program was:" >&5
9134 cat conftest.$ac_ext >&5
9135 fi
9136 rm -f conftest.$ac_objext
9137          break
9138        done
9139        CC=$ac_save_CC
9140        rm -f conftest.$ac_ext
9141     fi
9142 fi
9143 echo "$as_me:9143: result: $ac_cv_sys_largefile_CC" >&5
9144 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
9145   if test "$ac_cv_sys_largefile_CC" != no; then
9146     CC=$CC$ac_cv_sys_largefile_CC
9147   fi
9148
9149   echo "$as_me:9149: checking for _FILE_OFFSET_BITS value needed for large files" >&5
9150 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
9151 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
9152   echo $ECHO_N "(cached) $ECHO_C" >&6
9153 else
9154   while :; do
9155   ac_cv_sys_file_offset_bits=no
9156   cat >conftest.$ac_ext <<_ACEOF
9157 #line 9157 "configure"
9158 #include "confdefs.h"
9159 #include <sys/types.h>
9160  /* Check that off_t can represent 2**63 - 1 correctly.
9161     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9162     since some C++ compilers masquerading as C compilers
9163     incorrectly reject 9223372036854775807.  */
9164 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9165   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9166                        && LARGE_OFF_T % 2147483647 == 1)
9167                       ? 1 : -1];
9168 int
9169 main ()
9170 {
9171
9172   ;
9173   return 0;
9174 }
9175 _ACEOF
9176 rm -f conftest.$ac_objext
9177 if { (eval echo "$as_me:9177: \"$ac_compile\"") >&5
9178   (eval $ac_compile) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit $ac_status); } &&
9182          { ac_try='test -s conftest.$ac_objext'
9183   { (eval echo "$as_me:9183: \"$ac_try\"") >&5
9184   (eval $ac_try) 2>&5
9185   ac_status=$?
9186   echo "$as_me:9186: \$? = $ac_status" >&5
9187   (exit $ac_status); }; }; then
9188   break
9189 else
9190   echo "$as_me: failed program was:" >&5
9191 cat conftest.$ac_ext >&5
9192 fi
9193 rm -f conftest.$ac_objext conftest.$ac_ext
9194   cat >conftest.$ac_ext <<_ACEOF
9195 #line 9195 "configure"
9196 #include "confdefs.h"
9197 #define _FILE_OFFSET_BITS 64
9198 #include <sys/types.h>
9199  /* Check that off_t can represent 2**63 - 1 correctly.
9200     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9201     since some C++ compilers masquerading as C compilers
9202     incorrectly reject 9223372036854775807.  */
9203 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9204   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9205                        && LARGE_OFF_T % 2147483647 == 1)
9206                       ? 1 : -1];
9207 int
9208 main ()
9209 {
9210
9211   ;
9212   return 0;
9213 }
9214 _ACEOF
9215 rm -f conftest.$ac_objext
9216 if { (eval echo "$as_me:9216: \"$ac_compile\"") >&5
9217   (eval $ac_compile) 2>&5
9218   ac_status=$?
9219   echo "$as_me:9219: \$? = $ac_status" >&5
9220   (exit $ac_status); } &&
9221          { ac_try='test -s conftest.$ac_objext'
9222   { (eval echo "$as_me:9222: \"$ac_try\"") >&5
9223   (eval $ac_try) 2>&5
9224   ac_status=$?
9225   echo "$as_me:9225: \$? = $ac_status" >&5
9226   (exit $ac_status); }; }; then
9227   ac_cv_sys_file_offset_bits=64; break
9228 else
9229   echo "$as_me: failed program was:" >&5
9230 cat conftest.$ac_ext >&5
9231 fi
9232 rm -f conftest.$ac_objext conftest.$ac_ext
9233   break
9234 done
9235 fi
9236 echo "$as_me:9236: result: $ac_cv_sys_file_offset_bits" >&5
9237 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
9238 if test "$ac_cv_sys_file_offset_bits" != no; then
9239
9240 cat >>confdefs.h <<EOF
9241 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
9242 EOF
9243
9244 fi
9245 rm -rf conftest*
9246   echo "$as_me:9246: checking for _LARGE_FILES value needed for large files" >&5
9247 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
9248 if test "${ac_cv_sys_large_files+set}" = set; then
9249   echo $ECHO_N "(cached) $ECHO_C" >&6
9250 else
9251   while :; do
9252   ac_cv_sys_large_files=no
9253   cat >conftest.$ac_ext <<_ACEOF
9254 #line 9254 "configure"
9255 #include "confdefs.h"
9256 #include <sys/types.h>
9257  /* Check that off_t can represent 2**63 - 1 correctly.
9258     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9259     since some C++ compilers masquerading as C compilers
9260     incorrectly reject 9223372036854775807.  */
9261 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9262   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9263                        && LARGE_OFF_T % 2147483647 == 1)
9264                       ? 1 : -1];
9265 int
9266 main ()
9267 {
9268
9269   ;
9270   return 0;
9271 }
9272 _ACEOF
9273 rm -f conftest.$ac_objext
9274 if { (eval echo "$as_me:9274: \"$ac_compile\"") >&5
9275   (eval $ac_compile) 2>&5
9276   ac_status=$?
9277   echo "$as_me:9277: \$? = $ac_status" >&5
9278   (exit $ac_status); } &&
9279          { ac_try='test -s conftest.$ac_objext'
9280   { (eval echo "$as_me:9280: \"$ac_try\"") >&5
9281   (eval $ac_try) 2>&5
9282   ac_status=$?
9283   echo "$as_me:9283: \$? = $ac_status" >&5
9284   (exit $ac_status); }; }; then
9285   break
9286 else
9287   echo "$as_me: failed program was:" >&5
9288 cat conftest.$ac_ext >&5
9289 fi
9290 rm -f conftest.$ac_objext conftest.$ac_ext
9291   cat >conftest.$ac_ext <<_ACEOF
9292 #line 9292 "configure"
9293 #include "confdefs.h"
9294 #define _LARGE_FILES 1
9295 #include <sys/types.h>
9296  /* Check that off_t can represent 2**63 - 1 correctly.
9297     We can't simply define LARGE_OFF_T to be 9223372036854775807,
9298     since some C++ compilers masquerading as C compilers
9299     incorrectly reject 9223372036854775807.  */
9300 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
9301   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
9302                        && LARGE_OFF_T % 2147483647 == 1)
9303                       ? 1 : -1];
9304 int
9305 main ()
9306 {
9307
9308   ;
9309   return 0;
9310 }
9311 _ACEOF
9312 rm -f conftest.$ac_objext
9313 if { (eval echo "$as_me:9313: \"$ac_compile\"") >&5
9314   (eval $ac_compile) 2>&5
9315   ac_status=$?
9316   echo "$as_me:9316: \$? = $ac_status" >&5
9317   (exit $ac_status); } &&
9318          { ac_try='test -s conftest.$ac_objext'
9319   { (eval echo "$as_me:9319: \"$ac_try\"") >&5
9320   (eval $ac_try) 2>&5
9321   ac_status=$?
9322   echo "$as_me:9322: \$? = $ac_status" >&5
9323   (exit $ac_status); }; }; then
9324   ac_cv_sys_large_files=1; break
9325 else
9326   echo "$as_me: failed program was:" >&5
9327 cat conftest.$ac_ext >&5
9328 fi
9329 rm -f conftest.$ac_objext conftest.$ac_ext
9330   break
9331 done
9332 fi
9333 echo "$as_me:9333: result: $ac_cv_sys_large_files" >&5
9334 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
9335 if test "$ac_cv_sys_large_files" != no; then
9336
9337 cat >>confdefs.h <<EOF
9338 #define _LARGE_FILES $ac_cv_sys_large_files
9339 EOF
9340
9341 fi
9342 rm -rf conftest*
9343 fi
9344
9345     if test "$enable_largefile" != no ; then
9346         echo "$as_me:9346: checking for _LARGEFILE_SOURCE value needed for large files" >&5
9347 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
9348 if test "${ac_cv_sys_largefile_source+set}" = set; then
9349   echo $ECHO_N "(cached) $ECHO_C" >&6
9350 else
9351   while :; do
9352   ac_cv_sys_largefile_source=no
9353   cat >conftest.$ac_ext <<_ACEOF
9354 #line 9354 "configure"
9355 #include "confdefs.h"
9356 #include <stdio.h>
9357 int
9358 main ()
9359 {
9360 return !fseeko;
9361   ;
9362   return 0;
9363 }
9364 _ACEOF
9365 rm -f conftest.$ac_objext
9366 if { (eval echo "$as_me:9366: \"$ac_compile\"") >&5
9367   (eval $ac_compile) 2>&5
9368   ac_status=$?
9369   echo "$as_me:9369: \$? = $ac_status" >&5
9370   (exit $ac_status); } &&
9371          { ac_try='test -s conftest.$ac_objext'
9372   { (eval echo "$as_me:9372: \"$ac_try\"") >&5
9373   (eval $ac_try) 2>&5
9374   ac_status=$?
9375   echo "$as_me:9375: \$? = $ac_status" >&5
9376   (exit $ac_status); }; }; then
9377   break
9378 else
9379   echo "$as_me: failed program was:" >&5
9380 cat conftest.$ac_ext >&5
9381 fi
9382 rm -f conftest.$ac_objext conftest.$ac_ext
9383   cat >conftest.$ac_ext <<_ACEOF
9384 #line 9384 "configure"
9385 #include "confdefs.h"
9386 #define _LARGEFILE_SOURCE 1
9387 #include <stdio.h>
9388 int
9389 main ()
9390 {
9391 return !fseeko;
9392   ;
9393   return 0;
9394 }
9395 _ACEOF
9396 rm -f conftest.$ac_objext
9397 if { (eval echo "$as_me:9397: \"$ac_compile\"") >&5
9398   (eval $ac_compile) 2>&5
9399   ac_status=$?
9400   echo "$as_me:9400: \$? = $ac_status" >&5
9401   (exit $ac_status); } &&
9402          { ac_try='test -s conftest.$ac_objext'
9403   { (eval echo "$as_me:9403: \"$ac_try\"") >&5
9404   (eval $ac_try) 2>&5
9405   ac_status=$?
9406   echo "$as_me:9406: \$? = $ac_status" >&5
9407   (exit $ac_status); }; }; then
9408   ac_cv_sys_largefile_source=1; break
9409 else
9410   echo "$as_me: failed program was:" >&5
9411 cat conftest.$ac_ext >&5
9412 fi
9413 rm -f conftest.$ac_objext conftest.$ac_ext
9414   break
9415 done
9416 fi
9417 echo "$as_me:9417: result: $ac_cv_sys_largefile_source" >&5
9418 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
9419 if test "$ac_cv_sys_largefile_source" != no; then
9420
9421 cat >>confdefs.h <<EOF
9422 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
9423 EOF
9424
9425 fi
9426 rm -rf conftest*
9427
9428 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
9429 # in glibc 2.1.3, but that breaks too many other things.
9430 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
9431 echo "$as_me:9431: checking for fseeko" >&5
9432 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
9433 if test "${ac_cv_func_fseeko+set}" = set; then
9434   echo $ECHO_N "(cached) $ECHO_C" >&6
9435 else
9436   cat >conftest.$ac_ext <<_ACEOF
9437 #line 9437 "configure"
9438 #include "confdefs.h"
9439 #include <stdio.h>
9440 int
9441 main ()
9442 {
9443 return fseeko && fseeko (stdin, 0, 0);
9444   ;
9445   return 0;
9446 }
9447 _ACEOF
9448 rm -f conftest.$ac_objext conftest$ac_exeext
9449 if { (eval echo "$as_me:9449: \"$ac_link\"") >&5
9450   (eval $ac_link) 2>&5
9451   ac_status=$?
9452   echo "$as_me:9452: \$? = $ac_status" >&5
9453   (exit $ac_status); } &&
9454          { ac_try='test -s conftest$ac_exeext'
9455   { (eval echo "$as_me:9455: \"$ac_try\"") >&5
9456   (eval $ac_try) 2>&5
9457   ac_status=$?
9458   echo "$as_me:9458: \$? = $ac_status" >&5
9459   (exit $ac_status); }; }; then
9460   ac_cv_func_fseeko=yes
9461 else
9462   echo "$as_me: failed program was:" >&5
9463 cat conftest.$ac_ext >&5
9464 ac_cv_func_fseeko=no
9465 fi
9466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9467 fi
9468 echo "$as_me:9468: result: $ac_cv_func_fseeko" >&5
9469 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
9470 if test $ac_cv_func_fseeko = yes; then
9471
9472 cat >>confdefs.h <<\EOF
9473 #define HAVE_FSEEKO 1
9474 EOF
9475
9476 fi
9477
9478         # Normally we would collect these definitions in the config.h,
9479         # but (like _XOPEN_SOURCE), some environments rely on having these
9480         # defined before any of the system headers are included.  Another
9481         # case comes up with C++, e.g., on AIX the compiler compiles the
9482         # header files by themselves before looking at the body files it is
9483         # told to compile.  For ncurses, those header files do not include
9484         # the config.h
9485         test "$ac_cv_sys_large_files"      != no && CPPFLAGS="$CPPFLAGS -D_LARGE_FILES "
9486         test "$ac_cv_sys_largefile_source" != no && CPPFLAGS="$CPPFLAGS -D_LARGEFILE_SOURCE "
9487         test "$ac_cv_sys_file_offset_bits" != no && CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits "
9488
9489         echo "$as_me:9489: checking whether to use struct dirent64" >&5
9490 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
9491 if test "${cf_cv_struct_dirent64+set}" = set; then
9492   echo $ECHO_N "(cached) $ECHO_C" >&6
9493 else
9494
9495                 cat >conftest.$ac_ext <<_ACEOF
9496 #line 9496 "configure"
9497 #include "confdefs.h"
9498
9499 #include <sys/types.h>
9500 #include <dirent.h>
9501
9502 int
9503 main ()
9504 {
9505
9506                 /* if transitional largefile support is setup, this is true */
9507                 extern struct dirent64 * readdir(DIR *);
9508                 struct dirent64 *x = readdir((DIR *)0);
9509                 struct dirent *y = readdir((DIR *)0);
9510                 int z = x - y;
9511
9512   ;
9513   return 0;
9514 }
9515 _ACEOF
9516 rm -f conftest.$ac_objext
9517 if { (eval echo "$as_me:9517: \"$ac_compile\"") >&5
9518   (eval $ac_compile) 2>&5
9519   ac_status=$?
9520   echo "$as_me:9520: \$? = $ac_status" >&5
9521   (exit $ac_status); } &&
9522          { ac_try='test -s conftest.$ac_objext'
9523   { (eval echo "$as_me:9523: \"$ac_try\"") >&5
9524   (eval $ac_try) 2>&5
9525   ac_status=$?
9526   echo "$as_me:9526: \$? = $ac_status" >&5
9527   (exit $ac_status); }; }; then
9528   cf_cv_struct_dirent64=yes
9529 else
9530   echo "$as_me: failed program was:" >&5
9531 cat conftest.$ac_ext >&5
9532 cf_cv_struct_dirent64=no
9533 fi
9534 rm -f conftest.$ac_objext conftest.$ac_ext
9535
9536 fi
9537 echo "$as_me:9537: result: $cf_cv_struct_dirent64" >&5
9538 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
9539         test "$cf_cv_struct_dirent64" = yes && cat >>confdefs.h <<\EOF
9540 #define HAVE_STRUCT_DIRENT64 1
9541 EOF
9542
9543     fi
9544
9545 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
9546 echo "$as_me:9546: checking if you want tparm not to use X/Open fixed-parameter list" >&5
9547 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
9548
9549 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
9550 if test "${enable_tparm_varargs+set}" = set; then
9551   enableval="$enable_tparm_varargs"
9552   with_tparm_varargs=$enableval
9553 else
9554   with_tparm_varargs=yes
9555 fi;
9556 echo "$as_me:9556: result: $with_tparm_varargs" >&5
9557 echo "${ECHO_T}$with_tparm_varargs" >&6
9558 NCURSES_TPARM_VARARGS=0
9559 test "$with_tparm_varargs" = yes && NCURSES_TPARM_VARARGS=1
9560
9561 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
9562 if test "$with_ticlib" != no ; then
9563 echo "$as_me:9563: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
9564 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
9565
9566 # Check whether --enable-tic-depends or --disable-tic-depends was given.
9567 if test "${enable_tic_depends+set}" = set; then
9568   enableval="$enable_tic_depends"
9569   with_tic_depends=$enableval
9570 else
9571   with_tic_depends=yes
9572 fi;
9573 echo "$as_me:9573: result: $with_tic_depends" >&5
9574 echo "${ECHO_T}$with_tic_depends" >&6
9575 else
9576         with_tic_depends=no
9577 fi
9578
9579 ###   use option --with-bool to override bool's type
9580 echo "$as_me:9580: checking for type of bool" >&5
9581 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
9582
9583 # Check whether --with-bool or --without-bool was given.
9584 if test "${with_bool+set}" = set; then
9585   withval="$with_bool"
9586   NCURSES_BOOL="$withval"
9587 else
9588   NCURSES_BOOL=auto
9589 fi;
9590 echo "$as_me:9590: result: $NCURSES_BOOL" >&5
9591 echo "${ECHO_T}$NCURSES_BOOL" >&6
9592
9593 echo "$as_me:9593: checking for alternate terminal capabilities file" >&5
9594 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
9595
9596 # Check whether --with-caps or --without-caps was given.
9597 if test "${with_caps+set}" = set; then
9598   withval="$with_caps"
9599   TERMINFO_CAPS=Caps.$withval
9600 else
9601   TERMINFO_CAPS=Caps
9602 fi;
9603 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
9604 echo "$as_me:9604: result: $TERMINFO_CAPS" >&5
9605 echo "${ECHO_T}$TERMINFO_CAPS" >&6
9606
9607 ###   use option --with-chtype to override chtype's type
9608 echo "$as_me:9608: checking for type of chtype" >&5
9609 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
9610
9611 # Check whether --with-chtype or --without-chtype was given.
9612 if test "${with_chtype+set}" = set; then
9613   withval="$with_chtype"
9614   NCURSES_CHTYPE="$withval"
9615 else
9616   NCURSES_CHTYPE=auto
9617 fi;
9618 echo "$as_me:9618: result: $NCURSES_CHTYPE" >&5
9619 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
9620
9621 ###   use option --with-ospeed to override ospeed's type
9622 echo "$as_me:9622: checking for type of ospeed" >&5
9623 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
9624
9625 # Check whether --with-ospeed or --without-ospeed was given.
9626 if test "${with_ospeed+set}" = set; then
9627   withval="$with_ospeed"
9628   NCURSES_OSPEED="$withval"
9629 else
9630   NCURSES_OSPEED=short
9631 fi;
9632 echo "$as_me:9632: result: $NCURSES_OSPEED" >&5
9633 echo "${ECHO_T}$NCURSES_OSPEED" >&6
9634
9635 ###   use option --with-mmask-t to override mmask_t's type
9636 echo "$as_me:9636: checking for type of mmask_t" >&5
9637 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
9638
9639 # Check whether --with-mmask-t or --without-mmask-t was given.
9640 if test "${with_mmask_t+set}" = set; then
9641   withval="$with_mmask_t"
9642   NCURSES_MMASK_T="$withval"
9643 else
9644   NCURSES_MMASK_T=auto
9645 fi;
9646 echo "$as_me:9646: result: $NCURSES_MMASK_T" >&5
9647 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
9648
9649 ###   use option --with-ccharw-max to override CCHARW_MAX size
9650 echo "$as_me:9650: checking for size CCHARW_MAX" >&5
9651 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
9652
9653 # Check whether --with-ccharw-max or --without-ccharw-max was given.
9654 if test "${with_ccharw_max+set}" = set; then
9655   withval="$with_ccharw_max"
9656   NCURSES_CCHARW_MAX="$withval"
9657 else
9658   NCURSES_CCHARW_MAX=5
9659 fi;
9660 echo "$as_me:9660: result: $NCURSES_CCHARW_MAX" >&5
9661 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
9662
9663 ### Enable compiling-in rcs id's
9664 echo "$as_me:9664: checking if RCS identifiers should be compiled-in" >&5
9665 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
9666
9667 # Check whether --with-rcs-ids or --without-rcs-ids was given.
9668 if test "${with_rcs_ids+set}" = set; then
9669   withval="$with_rcs_ids"
9670   with_rcs_ids=$withval
9671 else
9672   with_rcs_ids=no
9673 fi;
9674 echo "$as_me:9674: result: $with_rcs_ids" >&5
9675 echo "${ECHO_T}$with_rcs_ids" >&6
9676 test "$with_rcs_ids" = yes && cat >>confdefs.h <<\EOF
9677 #define USE_RCS_IDS 1
9678 EOF
9679
9680 ###############################################################################
9681
9682 echo "$as_me:9682: checking format of man-pages" >&5
9683 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
9684
9685 # Check whether --with-manpage-format or --without-manpage-format was given.
9686 if test "${with_manpage_format+set}" = set; then
9687   withval="$with_manpage_format"
9688   MANPAGE_FORMAT=$withval
9689 else
9690   MANPAGE_FORMAT=unknown
9691 fi;
9692
9693 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
9694 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
9695
9696 cf_unknown=
9697
9698 case $MANPAGE_FORMAT in
9699 unknown)
9700   if test -z "$MANPATH" ; then
9701     MANPATH="/usr/man:/usr/share/man"
9702   fi
9703
9704   # look for the 'date' man-page (it's most likely to be installed!)
9705   MANPAGE_FORMAT=
9706   cf_preform=no
9707   cf_catonly=yes
9708   cf_example=date
9709
9710   IFS="${IFS:-  }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
9711   for cf_dir in $MANPATH; do
9712     test -z "$cf_dir" && cf_dir=/usr/man
9713     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
9714     do
9715       cf_test=`echo $cf_name | sed -e 's/*//'`
9716       if test "x$cf_test" = "x$cf_name" ; then
9717
9718         case "$cf_name" in
9719         *.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
9720         *.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
9721         *.0)    MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
9722         *)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
9723         esac
9724
9725         case "$cf_name" in
9726         $cf_dir/man*)
9727           cf_catonly=no
9728           ;;
9729         $cf_dir/cat*)
9730           cf_preform=yes
9731           ;;
9732         esac
9733         break
9734       fi
9735
9736       # if we found a match in either man* or cat*, stop looking
9737       if test -n "$MANPAGE_FORMAT" ; then
9738         cf_found=no
9739         test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
9740         test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
9741         case "$cf_name" in
9742         $cf_dir/cat*)
9743           cf_found=yes
9744           ;;
9745         esac
9746         test $cf_found=yes && break
9747       fi
9748     done
9749     # only check the first directory in $MANPATH where we find manpages
9750     if test -n "$MANPAGE_FORMAT" ; then
9751        break
9752     fi
9753   done
9754   # if we did not find the example, just assume it is normal
9755   test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
9756   IFS="$ac_save_ifs"
9757   ;;
9758 *)
9759   for cf_option in $MANPAGE_FORMAT; do
9760      case $cf_option in #(vi
9761      gzip|compress|BSDI|normal|formatted|catonly)
9762        ;;
9763      *)
9764        cf_unknown="$cf_unknown $cf_option"
9765        ;;
9766      esac
9767   done
9768   ;;
9769 esac
9770
9771 echo "$as_me:9771: result: $MANPAGE_FORMAT" >&5
9772 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
9773 if test -n "$cf_unknown" ; then
9774   { echo "$as_me:9774: WARNING: Unexpected manpage-format $cf_unknown" >&5
9775 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
9776 fi
9777
9778 echo "$as_me:9778: checking for manpage renaming" >&5
9779 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
9780
9781 # Check whether --with-manpage-renames or --without-manpage-renames was given.
9782 if test "${with_manpage_renames+set}" = set; then
9783   withval="$with_manpage_renames"
9784   MANPAGE_RENAMES=$withval
9785 else
9786   MANPAGE_RENAMES=yes
9787 fi;
9788
9789 case ".$MANPAGE_RENAMES" in #(vi
9790 .no) #(vi
9791   ;;
9792 .|.yes)
9793   # Debian 'man' program?
9794   if test -f /etc/debian_version ; then
9795     MANPAGE_RENAMES=`cd $srcdir && pwd`/man/man_db.renames
9796   else
9797     MANPAGE_RENAMES=no
9798   fi
9799   ;;
9800 esac
9801
9802 if test "$MANPAGE_RENAMES" != no ; then
9803   if test -f $srcdir/man/$MANPAGE_RENAMES ; then
9804     MANPAGE_RENAMES=`cd $srcdir/man && pwd`/$MANPAGE_RENAMES
9805   elif test ! -f $MANPAGE_RENAMES ; then
9806     { { echo "$as_me:9806: error: not a filename: $MANPAGE_RENAMES" >&5
9807 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
9808    { (exit 1); exit 1; }; }
9809   fi
9810
9811   test ! -d man && mkdir man
9812
9813   # Construct a sed-script to perform renaming within man-pages
9814   if test -n "$MANPAGE_RENAMES" ; then
9815     test ! -d man && mkdir man
9816     sh $srcdir/man/make_sed.sh $MANPAGE_RENAMES >./edit_man.sed
9817   fi
9818 fi
9819
9820 echo "$as_me:9820: result: $MANPAGE_RENAMES" >&5
9821 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
9822
9823 echo "$as_me:9823: checking if manpage aliases will be installed" >&5
9824 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
9825
9826 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
9827 if test "${with_manpage_aliases+set}" = set; then
9828   withval="$with_manpage_aliases"
9829   MANPAGE_ALIASES=$withval
9830 else
9831   MANPAGE_ALIASES=yes
9832 fi;
9833
9834 echo "$as_me:9834: result: $MANPAGE_ALIASES" >&5
9835 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
9836
9837 case "x$LN_S" in #(vi
9838 xln*) #(vi
9839         cf_use_symlinks=yes
9840         ;;
9841 *)
9842         cf_use_symlinks=no
9843         ;;
9844 esac
9845
9846 MANPAGE_SYMLINKS=no
9847 if test "$MANPAGE_ALIASES" = yes ; then
9848 echo "$as_me:9848: checking if manpage symlinks should be used" >&5
9849 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
9850
9851 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
9852 if test "${with_manpage_symlinks+set}" = set; then
9853   withval="$with_manpage_symlinks"
9854   MANPAGE_SYMLINKS=$withval
9855 else
9856   MANPAGE_SYMLINKS=$cf_use_symlinks
9857 fi;
9858
9859 if test "$$cf_use_symlinks" = no; then
9860 if test "$MANPAGE_SYMLINKS" = yes ; then
9861         { echo "$as_me:9861: WARNING: cannot make symlinks" >&5
9862 echo "$as_me: WARNING: cannot make symlinks" >&2;}
9863         MANPAGE_SYMLINKS=no
9864 fi
9865 fi
9866
9867 echo "$as_me:9867: result: $MANPAGE_SYMLINKS" >&5
9868 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
9869 fi
9870
9871 echo "$as_me:9871: checking for manpage tbl" >&5
9872 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
9873
9874 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
9875 if test "${with_manpage_tbl+set}" = set; then
9876   withval="$with_manpage_tbl"
9877   MANPAGE_TBL=$withval
9878 else
9879   MANPAGE_TBL=no
9880 fi;
9881
9882 echo "$as_me:9882: result: $MANPAGE_TBL" >&5
9883 echo "${ECHO_T}$MANPAGE_TBL" >&6
9884
9885   if test "$prefix" = "NONE" ; then
9886      cf_prefix="$ac_default_prefix"
9887   else
9888      cf_prefix="$prefix"
9889   fi
9890
9891   case "$MANPAGE_FORMAT" in # (vi
9892   *catonly*) # (vi
9893     cf_format=yes
9894     cf_inboth=no
9895     ;;
9896   *formatted*) # (vi
9897     cf_format=yes
9898     cf_inboth=yes
9899     ;;
9900   *)
9901     cf_format=no
9902     cf_inboth=no
9903     ;;
9904   esac
9905
9906 test ! -d man && mkdir man
9907
9908 cf_so_strip=
9909 cf_compress=
9910 case "$MANPAGE_FORMAT" in #(vi
9911 *compress*) #(vi
9912         cf_so_strip="Z"
9913         cf_compress=compress
9914   ;;
9915 *gzip*)
9916         cf_so_strip="gz"
9917         cf_compress=gzip
9918   ;;
9919 esac
9920
9921 cf_edit_man=./edit_man.sh
9922 cf_man_alias=`pwd`/man_alias.sed
9923
9924 cat >$cf_edit_man <<CF_EOF
9925 #! /bin/sh
9926 # this script is generated by the configure-script CF_MAN_PAGES macro.
9927
9928 prefix="$cf_prefix"
9929 datadir="$datadir"
9930
9931 NCURSES_MAJOR="$NCURSES_MAJOR"
9932 NCURSES_MINOR="$NCURSES_MINOR"
9933 NCURSES_PATCH="$NCURSES_PATCH"
9934
9935 NCURSES_OSPEED="$NCURSES_OSPEED"
9936 TERMINFO="$TERMINFO"
9937
9938 INSTALL="$INSTALL"
9939 INSTALL_DATA="$INSTALL_DATA"
9940
9941 transform="$program_transform_name"
9942
9943 TMP=\${TMPDIR:=/tmp}/man\$\$
9944 trap "rm -f \$TMP" 0 1 2 5 15
9945
9946 form=\$1
9947 shift || exit 1
9948
9949 verb=\$1
9950 shift || exit 1
9951
9952 mandir=\$1
9953 shift || exit 1
9954
9955 srcdir=\$1
9956 top_srcdir=\$srcdir/..
9957 shift || exit 1
9958
9959 if test "\$form" = normal ; then
9960         if test "$cf_format" = yes ; then
9961         if test "$cf_inboth" = no ; then
9962                 sh \$0 format \$verb \$mandir \$srcdir \$*
9963                 exit $?
9964         fi
9965         fi
9966         cf_subdir=\$mandir/man
9967         cf_tables=$MANPAGE_TBL
9968 else
9969         cf_subdir=\$mandir/cat
9970         cf_tables=yes
9971 fi
9972
9973 # process the list of source-files
9974 for i in \$* ; do
9975 case \$i in #(vi
9976 *.orig|*.rej) ;; #(vi
9977 *.[0-9]*)
9978         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
9979         if test \$verb = installing ; then
9980         if test ! -d \$cf_subdir\${section} ; then
9981                 mkdir -p \$cf_subdir\$section
9982         fi
9983         fi
9984
9985         # replace variables in man page
9986         if test ! -f $cf_man_alias ; then
9987 cat >>$cf_man_alias <<-CF_EOF2
9988                 s,@DATADIR@,\$datadir,g
9989                 s,@TERMINFO@,\$TERMINFO,g
9990                 s,@NCURSES_MAJOR@,\$NCURSES_MAJOR,g
9991                 s,@NCURSES_MINOR@,\$NCURSES_MINOR,g
9992                 s,@NCURSES_PATCH@,\$NCURSES_PATCH,g
9993                 s,@NCURSES_OSPEED@,\$NCURSES_OSPEED,g
9994 CF_EOF
9995
9996         for cf_name in  captoinfo clear infocmp infotocap tabs tic toe tput tset
9997         do
9998                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9999                 cf_name=`echo $cf_name|sed "$program_transform_name"`
10000 cat >>$cf_edit_man <<-CF_EOF
10001                 s,@$cf_NAME@,$cf_name,g
10002 CF_EOF
10003         done
10004
10005 cat >>$cf_edit_man <<CF_EOF
10006 CF_EOF2
10007                 echo "...made $cf_man_alias"
10008         fi
10009
10010         aliases=
10011         cf_source=\`basename \$i\`
10012         inalias=\$cf_source
10013         test ! -f \$inalias && inalias="\$srcdir/\$inalias"
10014         if test ! -f \$inalias ; then
10015                 echo .. skipped \$cf_source
10016                 continue
10017         fi
10018 CF_EOF
10019
10020 if test "$MANPAGE_ALIASES" != no ; then
10021 cat >>$cf_edit_man <<CF_EOF
10022         aliases=\`sed -f \$top_srcdir/man/manlinks.sed \$inalias |sed -f $cf_man_alias | sort -u\`
10023 CF_EOF
10024 fi
10025
10026 if test "$MANPAGE_RENAMES" = no ; then
10027 cat >>$cf_edit_man <<CF_EOF
10028         # perform program transformations for section 1 man pages
10029         if test \$section = 1 ; then
10030                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
10031         else
10032                 cf_target=\$cf_subdir\${section}/\$cf_source
10033         fi
10034 CF_EOF
10035 else
10036 cat >>$cf_edit_man <<CF_EOF
10037         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
10038         if test -z "\$cf_target" ; then
10039                 echo '? missing rename for '\$cf_source
10040                 cf_target="\$cf_source"
10041         fi
10042         cf_target="\$cf_subdir\${section}/\${cf_target}"
10043
10044 CF_EOF
10045 fi
10046
10047 cat >>$cf_edit_man <<CF_EOF
10048         sed     -f $cf_man_alias \\
10049 CF_EOF
10050
10051 if test -f $MANPAGE_RENAMES ; then
10052 cat >>$cf_edit_man <<CF_EOF
10053                 < \$i | sed -f `pwd`/edit_man.sed >\$TMP
10054 CF_EOF
10055 else
10056 cat >>$cf_edit_man <<CF_EOF
10057                 < \$i >\$TMP
10058 CF_EOF
10059 fi
10060
10061 cat >>$cf_edit_man <<CF_EOF
10062 if test \$cf_tables = yes ; then
10063         tbl \$TMP >\$TMP.out
10064         mv \$TMP.out \$TMP
10065 fi
10066 CF_EOF
10067
10068 if test $with_curses_h != yes ; then
10069 cat >>$cf_edit_man <<CF_EOF
10070         sed -e "/\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
10071         mv \$TMP.out \$TMP
10072 CF_EOF
10073 fi
10074
10075 cat >>$cf_edit_man <<CF_EOF
10076         if test \$form = format ; then
10077                 nroff -man \$TMP >\$TMP.out
10078                 mv \$TMP.out \$TMP
10079         fi
10080 CF_EOF
10081
10082 if test -n "$cf_compress" ; then
10083 cat >>$cf_edit_man <<CF_EOF
10084         if test \$verb = installing ; then
10085         if ( $cf_compress -f \$TMP )
10086         then
10087                 mv \$TMP.$cf_so_strip \$TMP
10088         fi
10089         fi
10090         cf_target="\$cf_target.$cf_so_strip"
10091 CF_EOF
10092 fi
10093
10094 case "$MANPAGE_FORMAT" in #(vi
10095 *BSDI*)
10096 cat >>$cf_edit_man <<CF_EOF
10097         if test \$form = format ; then
10098                 # BSDI installs only .0 suffixes in the cat directories
10099                 cf_target="\`echo \$cf_target|sed -e 's/\.[1-9]\+[a-z]*/.0/'\`"
10100         fi
10101 CF_EOF
10102   ;;
10103 esac
10104
10105 cat >>$cf_edit_man <<CF_EOF
10106         suffix=\`basename \$cf_target | sed -e 's%^[^.]*%%'\`
10107         if test \$verb = installing ; then
10108                 echo \$verb \$cf_target
10109                 \$INSTALL_DATA \$TMP \$cf_target
10110                 test -d \$cf_subdir\${section} &&
10111                 test -n "\$aliases" && (
10112                         cd \$cf_subdir\${section} && (
10113                                 cf_source=\`echo \$cf_target |sed -e 's%^.*/\([^/][^/]*/[^/][^/]*$\)%\1%'\`
10114                                 test -n "$cf_so_strip" && cf_source=\`echo \$cf_source |sed -e 's%\.$cf_so_strip\$%%'\`
10115                                 cf_target=\`basename \$cf_target\`
10116                                 for cf_alias in \$aliases
10117                                 do
10118                                         if test \$section = 1 ; then
10119                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10120                                         fi
10121
10122                                         if test "$MANPAGE_SYMLINKS" = yes ; then
10123                                                 if test -f \$cf_alias\${suffix} ; then
10124                                                         if ( cmp -s \$cf_target \$cf_alias\${suffix} )
10125                                                         then
10126                                                                 continue
10127                                                         fi
10128                                                 fi
10129                                                 echo .. \$verb alias \$cf_alias\${suffix}
10130 CF_EOF
10131 case "x$LN_S" in #(vi
10132 *-f) #(vi
10133 cat >>$cf_edit_man <<CF_EOF
10134                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10135 CF_EOF
10136         ;;
10137 *)
10138 cat >>$cf_edit_man <<CF_EOF
10139                                                 rm -f \$cf_alias\${suffix}
10140                                                 $LN_S \$cf_target \$cf_alias\${suffix}
10141 CF_EOF
10142         ;;
10143 esac
10144 cat >>$cf_edit_man <<CF_EOF
10145                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
10146                                                 echo ".so \$cf_source" >\$TMP
10147 CF_EOF
10148 if test -n "$cf_compress" ; then
10149 cat >>$cf_edit_man <<CF_EOF
10150                                                 if test -n "$cf_so_strip" ; then
10151                                                         $cf_compress -f \$TMP
10152                                                         mv \$TMP.$cf_so_strip \$TMP
10153                                                 fi
10154 CF_EOF
10155 fi
10156 cat >>$cf_edit_man <<CF_EOF
10157                                                 echo .. \$verb alias \$cf_alias\${suffix}
10158                                                 rm -f \$cf_alias\${suffix}
10159                                                 \$INSTALL_DATA \$TMP \$cf_alias\${suffix}
10160                                         fi
10161                                 done
10162                         )
10163                 )
10164         elif test \$verb = removing ; then
10165                 test -f \$cf_target && (
10166                         echo \$verb \$cf_target
10167                         rm -f \$cf_target
10168                 )
10169                 test -d \$cf_subdir\${section} &&
10170                 test -n "\$aliases" && (
10171                         cd \$cf_subdir\${section} && (
10172                                 for cf_alias in \$aliases
10173                                 do
10174                                         if test \$section = 1 ; then
10175                                                 cf_alias=\`echo \$cf_alias|sed "\${transform}"\`
10176                                         fi
10177
10178                                         echo .. \$verb alias \$cf_alias\${suffix}
10179                                         rm -f \$cf_alias\${suffix}
10180                                 done
10181                         )
10182                 )
10183         else
10184 #               echo ".hy 0"
10185                 cat \$TMP
10186         fi
10187         ;;
10188 esac
10189 done
10190
10191 if test $cf_inboth = yes ; then
10192 if test \$form != format ; then
10193         sh \$0 format \$verb \$mandir \$srcdir \$*
10194 fi
10195 fi
10196
10197 exit 0
10198 CF_EOF
10199 chmod 755 $cf_edit_man
10200
10201 ###############################################################################
10202
10203 ### Note that some functions (such as const) are normally disabled anyway.
10204 echo "$as_me:10204: checking if you want to build with function extensions" >&5
10205 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
10206
10207 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
10208 if test "${enable_ext_funcs+set}" = set; then
10209   enableval="$enable_ext_funcs"
10210   with_ext_funcs=$enableval
10211 else
10212   with_ext_funcs=yes
10213 fi;
10214 echo "$as_me:10214: result: $with_ext_funcs" >&5
10215 echo "${ECHO_T}$with_ext_funcs" >&6
10216 if test "$with_ext_funcs" = yes ; then
10217         NCURSES_EXT_FUNCS=1
10218         cat >>confdefs.h <<\EOF
10219 #define HAVE_ASSUME_DEFAULT_COLORS 1
10220 EOF
10221
10222         cat >>confdefs.h <<\EOF
10223 #define HAVE_CURSES_VERSION 1
10224 EOF
10225
10226         cat >>confdefs.h <<\EOF
10227 #define HAVE_HAS_KEY 1
10228 EOF
10229
10230         cat >>confdefs.h <<\EOF
10231 #define HAVE_RESIZETERM 1
10232 EOF
10233
10234         cat >>confdefs.h <<\EOF
10235 #define HAVE_RESIZE_TERM 1
10236 EOF
10237
10238         cat >>confdefs.h <<\EOF
10239 #define HAVE_TERM_ENTRY_H 1
10240 EOF
10241
10242         cat >>confdefs.h <<\EOF
10243 #define HAVE_USE_DEFAULT_COLORS 1
10244 EOF
10245
10246         cat >>confdefs.h <<\EOF
10247 #define HAVE_USE_SCREEN 1
10248 EOF
10249
10250         cat >>confdefs.h <<\EOF
10251 #define HAVE_USE_WINDOW 1
10252 EOF
10253
10254         cat >>confdefs.h <<\EOF
10255 #define HAVE_WRESIZE 1
10256 EOF
10257
10258         cat >>confdefs.h <<\EOF
10259 #define NCURSES_EXT_FUNCS 1
10260 EOF
10261
10262         GENERATED_EXT_FUNCS=generated
10263 else
10264         NCURSES_EXT_FUNCS=0
10265         GENERATED_EXT_FUNCS=
10266 fi
10267
10268 echo "$as_me:10268: checking if you want to build with experimental SCREEN extensions" >&5
10269 echo $ECHO_N "checking if you want to build with experimental SCREEN extensions... $ECHO_C" >&6
10270
10271 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
10272 if test "${enable_sp_funcs+set}" = set; then
10273   enableval="$enable_sp_funcs"
10274   with_sp_funcs=$enableval
10275 else
10276   with_sp_funcs=no
10277 fi;
10278 echo "$as_me:10278: result: $with_sp_funcs" >&5
10279 echo "${ECHO_T}$with_sp_funcs" >&6
10280 if test "$with_sp_funcs" = yes ; then
10281         NCURSES_SP_FUNCS=1
10282         cat >>confdefs.h <<\EOF
10283 #define NCURSES_SP_FUNCS 1
10284 EOF
10285
10286         GENERATED_SP_FUNCS=generated
10287 else
10288         NCURSES_SP_FUNCS=0
10289         GENERATED_SP_FUNCS=
10290 fi
10291
10292 echo "$as_me:10292: checking if you want to build with experimental terminal-driver" >&5
10293 echo $ECHO_N "checking if you want to build with experimental terminal-driver... $ECHO_C" >&6
10294
10295 # Check whether --enable-term-driver or --disable-term-driver was given.
10296 if test "${enable_term_driver+set}" = set; then
10297   enableval="$enable_term_driver"
10298   with_term_driver=$enableval
10299 else
10300   with_term_driver=no
10301 fi;
10302 echo "$as_me:10302: result: $with_term_driver" >&5
10303 echo "${ECHO_T}$with_term_driver" >&6
10304 if test "$with_term_driver" = yes ; then
10305         cat >>confdefs.h <<\EOF
10306 #define USE_TERM_DRIVER 1
10307 EOF
10308
10309         if test "$with_sp_funcs" != yes ; then
10310                 { { echo "$as_me:10310: error: The term-driver option relies upon sp-funcs" >&5
10311 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
10312    { (exit 1); exit 1; }; }
10313         fi
10314 fi
10315
10316 ###   use option --enable-const to turn on use of const beyond that in XSI.
10317 echo "$as_me:10317: checking for extended use of const keyword" >&5
10318 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
10319
10320 # Check whether --enable-const or --disable-const was given.
10321 if test "${enable_const+set}" = set; then
10322   enableval="$enable_const"
10323   with_ext_const=$enableval
10324 else
10325   with_ext_const=no
10326 fi;
10327 echo "$as_me:10327: result: $with_ext_const" >&5
10328 echo "${ECHO_T}$with_ext_const" >&6
10329 NCURSES_CONST='/*nothing*/'
10330 if test "$with_ext_const" = yes ; then
10331         NCURSES_CONST=const
10332 fi
10333
10334 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
10335 echo "$as_me:10335: checking if you want to use extended colors" >&5
10336 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
10337
10338 # Check whether --enable-ext-colors or --disable-ext-colors was given.
10339 if test "${enable_ext_colors+set}" = set; then
10340   enableval="$enable_ext_colors"
10341   with_ext_colors=$enableval
10342 else
10343   with_ext_colors=no
10344 fi;
10345 echo "$as_me:10345: result: $with_ext_colors" >&5
10346 echo "${ECHO_T}$with_ext_colors" >&6
10347 NCURSES_EXT_COLORS=0
10348 if test "$with_ext_colors" = yes ; then
10349         if test "$with_widec" != yes ; then
10350                 { { echo "$as_me:10350: error: This option applies only to wide-character library" >&5
10351 echo "$as_me: error: This option applies only to wide-character library" >&2;}
10352    { (exit 1); exit 1; }; }
10353         else
10354                 # cannot be ABI 5 since it changes sizeof(cchar_t)
10355
10356 if test "${with_abi_version+set}" != set; then
10357         case $cf_cv_rel_version in
10358         5.*)
10359                 cf_cv_rel_version=6.0
10360                 cf_cv_abi_version=6
10361                 { echo "$as_me:10361: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10362 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10363                 ;;
10364         esac
10365 fi
10366
10367         fi
10368         NCURSES_EXT_COLORS=1
10369         cat >>confdefs.h <<\EOF
10370 #define NCURSES_EXT_COLORS 1
10371 EOF
10372
10373 fi
10374
10375 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
10376 echo "$as_me:10376: checking if you want to use extended mouse encoding" >&5
10377 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
10378
10379 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
10380 if test "${enable_ext_mouse+set}" = set; then
10381   enableval="$enable_ext_mouse"
10382   with_ext_mouse=$enableval
10383 else
10384   with_ext_mouse=no
10385 fi;
10386 echo "$as_me:10386: result: $with_ext_mouse" >&5
10387 echo "${ECHO_T}$with_ext_mouse" >&6
10388 NCURSES_MOUSE_VERSION=1
10389 if test "$with_ext_mouse" = yes ; then
10390         NCURSES_MOUSE_VERSION=2
10391
10392 if test "${with_abi_version+set}" != set; then
10393         case $cf_cv_rel_version in
10394         5.*)
10395                 cf_cv_rel_version=6.0
10396                 cf_cv_abi_version=6
10397                 { echo "$as_me:10397: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
10398 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
10399                 ;;
10400         esac
10401 fi
10402
10403 fi
10404
10405 echo "$as_me:10405: checking if you want \$NCURSES_NO_PADDING code" >&5
10406 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
10407
10408 # Check whether --enable-no-padding or --disable-no-padding was given.
10409 if test "${enable_no_padding+set}" = set; then
10410   enableval="$enable_no_padding"
10411   with_no_padding=$enableval
10412 else
10413   with_no_padding=$with_ext_funcs
10414 fi;
10415 echo "$as_me:10415: result: $with_no_padding" >&5
10416 echo "${ECHO_T}$with_no_padding" >&6
10417 test "$with_no_padding" = yes && cat >>confdefs.h <<\EOF
10418 #define NCURSES_NO_PADDING 1
10419 EOF
10420
10421 echo "$as_me:10421: checking for ANSI C header files" >&5
10422 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
10423 if test "${ac_cv_header_stdc+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426   cat >conftest.$ac_ext <<_ACEOF
10427 #line 10427 "configure"
10428 #include "confdefs.h"
10429 #include <stdlib.h>
10430 #include <stdarg.h>
10431 #include <string.h>
10432 #include <float.h>
10433
10434 _ACEOF
10435 if { (eval echo "$as_me:10435: \"$ac_cpp conftest.$ac_ext\"") >&5
10436   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10437   ac_status=$?
10438   egrep -v '^ *\+' conftest.er1 >conftest.err
10439   rm -f conftest.er1
10440   cat conftest.err >&5
10441   echo "$as_me:10441: \$? = $ac_status" >&5
10442   (exit $ac_status); } >/dev/null; then
10443   if test -s conftest.err; then
10444     ac_cpp_err=$ac_c_preproc_warn_flag
10445   else
10446     ac_cpp_err=
10447   fi
10448 else
10449   ac_cpp_err=yes
10450 fi
10451 if test -z "$ac_cpp_err"; then
10452   ac_cv_header_stdc=yes
10453 else
10454   echo "$as_me: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   ac_cv_header_stdc=no
10457 fi
10458 rm -f conftest.err conftest.$ac_ext
10459
10460 if test $ac_cv_header_stdc = yes; then
10461   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
10462   cat >conftest.$ac_ext <<_ACEOF
10463 #line 10463 "configure"
10464 #include "confdefs.h"
10465 #include <string.h>
10466
10467 _ACEOF
10468 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10469   egrep "memchr" >/dev/null 2>&1; then
10470   :
10471 else
10472   ac_cv_header_stdc=no
10473 fi
10474 rm -rf conftest*
10475
10476 fi
10477
10478 if test $ac_cv_header_stdc = yes; then
10479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
10480   cat >conftest.$ac_ext <<_ACEOF
10481 #line 10481 "configure"
10482 #include "confdefs.h"
10483 #include <stdlib.h>
10484
10485 _ACEOF
10486 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10487   egrep "free" >/dev/null 2>&1; then
10488   :
10489 else
10490   ac_cv_header_stdc=no
10491 fi
10492 rm -rf conftest*
10493
10494 fi
10495
10496 if test $ac_cv_header_stdc = yes; then
10497   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
10498   if test "$cross_compiling" = yes; then
10499   :
10500 else
10501   cat >conftest.$ac_ext <<_ACEOF
10502 #line 10502 "configure"
10503 #include "confdefs.h"
10504 #include <ctype.h>
10505 #if ((' ' & 0x0FF) == 0x020)
10506 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
10507 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
10508 #else
10509 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
10510                      || ('j' <= (c) && (c) <= 'r') \
10511                      || ('s' <= (c) && (c) <= 'z'))
10512 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
10513 #endif
10514
10515 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
10516 int
10517 main ()
10518 {
10519   int i;
10520   for (i = 0; i < 256; i++)
10521     if (XOR (islower (i), ISLOWER (i))
10522         || toupper (i) != TOUPPER (i))
10523       $ac_main_return(2);
10524   $ac_main_return (0);
10525 }
10526 _ACEOF
10527 rm -f conftest$ac_exeext
10528 if { (eval echo "$as_me:10528: \"$ac_link\"") >&5
10529   (eval $ac_link) 2>&5
10530   ac_status=$?
10531   echo "$as_me:10531: \$? = $ac_status" >&5
10532   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10533   { (eval echo "$as_me:10533: \"$ac_try\"") >&5
10534   (eval $ac_try) 2>&5
10535   ac_status=$?
10536   echo "$as_me:10536: \$? = $ac_status" >&5
10537   (exit $ac_status); }; }; then
10538   :
10539 else
10540   echo "$as_me: program exited with status $ac_status" >&5
10541 echo "$as_me: failed program was:" >&5
10542 cat conftest.$ac_ext >&5
10543 ac_cv_header_stdc=no
10544 fi
10545 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10546 fi
10547 fi
10548 fi
10549 echo "$as_me:10549: result: $ac_cv_header_stdc" >&5
10550 echo "${ECHO_T}$ac_cv_header_stdc" >&6
10551 if test $ac_cv_header_stdc = yes; then
10552
10553 cat >>confdefs.h <<\EOF
10554 #define STDC_HEADERS 1
10555 EOF
10556
10557 fi
10558
10559 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
10560
10561 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
10562                   inttypes.h stdint.h unistd.h
10563 do
10564 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10565 echo "$as_me:10565: checking for $ac_header" >&5
10566 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10567 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10568   echo $ECHO_N "(cached) $ECHO_C" >&6
10569 else
10570   cat >conftest.$ac_ext <<_ACEOF
10571 #line 10571 "configure"
10572 #include "confdefs.h"
10573 $ac_includes_default
10574 #include <$ac_header>
10575 _ACEOF
10576 rm -f conftest.$ac_objext
10577 if { (eval echo "$as_me:10577: \"$ac_compile\"") >&5
10578   (eval $ac_compile) 2>&5
10579   ac_status=$?
10580   echo "$as_me:10580: \$? = $ac_status" >&5
10581   (exit $ac_status); } &&
10582          { ac_try='test -s conftest.$ac_objext'
10583   { (eval echo "$as_me:10583: \"$ac_try\"") >&5
10584   (eval $ac_try) 2>&5
10585   ac_status=$?
10586   echo "$as_me:10586: \$? = $ac_status" >&5
10587   (exit $ac_status); }; }; then
10588   eval "$as_ac_Header=yes"
10589 else
10590   echo "$as_me: failed program was:" >&5
10591 cat conftest.$ac_ext >&5
10592 eval "$as_ac_Header=no"
10593 fi
10594 rm -f conftest.$ac_objext conftest.$ac_ext
10595 fi
10596 echo "$as_me:10596: result: `eval echo '${'$as_ac_Header'}'`" >&5
10597 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10598 if test `eval echo '${'$as_ac_Header'}'` = yes; then
10599   cat >>confdefs.h <<EOF
10600 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10601 EOF
10602
10603 fi
10604 done
10605
10606 echo "$as_me:10606: checking for signed char" >&5
10607 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
10608 if test "${ac_cv_type_signed_char+set}" = set; then
10609   echo $ECHO_N "(cached) $ECHO_C" >&6
10610 else
10611   cat >conftest.$ac_ext <<_ACEOF
10612 #line 10612 "configure"
10613 #include "confdefs.h"
10614 $ac_includes_default
10615 int
10616 main ()
10617 {
10618 if ((signed char *) 0)
10619   return 0;
10620 if (sizeof (signed char))
10621   return 0;
10622   ;
10623   return 0;
10624 }
10625 _ACEOF
10626 rm -f conftest.$ac_objext
10627 if { (eval echo "$as_me:10627: \"$ac_compile\"") >&5
10628   (eval $ac_compile) 2>&5
10629   ac_status=$?
10630   echo "$as_me:10630: \$? = $ac_status" >&5
10631   (exit $ac_status); } &&
10632          { ac_try='test -s conftest.$ac_objext'
10633   { (eval echo "$as_me:10633: \"$ac_try\"") >&5
10634   (eval $ac_try) 2>&5
10635   ac_status=$?
10636   echo "$as_me:10636: \$? = $ac_status" >&5
10637   (exit $ac_status); }; }; then
10638   ac_cv_type_signed_char=yes
10639 else
10640   echo "$as_me: failed program was:" >&5
10641 cat conftest.$ac_ext >&5
10642 ac_cv_type_signed_char=no
10643 fi
10644 rm -f conftest.$ac_objext conftest.$ac_ext
10645 fi
10646 echo "$as_me:10646: result: $ac_cv_type_signed_char" >&5
10647 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
10648
10649 echo "$as_me:10649: checking size of signed char" >&5
10650 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
10651 if test "${ac_cv_sizeof_signed_char+set}" = set; then
10652   echo $ECHO_N "(cached) $ECHO_C" >&6
10653 else
10654   if test "$ac_cv_type_signed_char" = yes; then
10655   if test "$cross_compiling" = yes; then
10656   # Depending upon the size, compute the lo and hi bounds.
10657 cat >conftest.$ac_ext <<_ACEOF
10658 #line 10658 "configure"
10659 #include "confdefs.h"
10660 $ac_includes_default
10661 int
10662 main ()
10663 {
10664 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
10665   ;
10666   return 0;
10667 }
10668 _ACEOF
10669 rm -f conftest.$ac_objext
10670 if { (eval echo "$as_me:10670: \"$ac_compile\"") >&5
10671   (eval $ac_compile) 2>&5
10672   ac_status=$?
10673   echo "$as_me:10673: \$? = $ac_status" >&5
10674   (exit $ac_status); } &&
10675          { ac_try='test -s conftest.$ac_objext'
10676   { (eval echo "$as_me:10676: \"$ac_try\"") >&5
10677   (eval $ac_try) 2>&5
10678   ac_status=$?
10679   echo "$as_me:10679: \$? = $ac_status" >&5
10680   (exit $ac_status); }; }; then
10681   ac_lo=0 ac_mid=0
10682   while :; do
10683     cat >conftest.$ac_ext <<_ACEOF
10684 #line 10684 "configure"
10685 #include "confdefs.h"
10686 $ac_includes_default
10687 int
10688 main ()
10689 {
10690 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10691   ;
10692   return 0;
10693 }
10694 _ACEOF
10695 rm -f conftest.$ac_objext
10696 if { (eval echo "$as_me:10696: \"$ac_compile\"") >&5
10697   (eval $ac_compile) 2>&5
10698   ac_status=$?
10699   echo "$as_me:10699: \$? = $ac_status" >&5
10700   (exit $ac_status); } &&
10701          { ac_try='test -s conftest.$ac_objext'
10702   { (eval echo "$as_me:10702: \"$ac_try\"") >&5
10703   (eval $ac_try) 2>&5
10704   ac_status=$?
10705   echo "$as_me:10705: \$? = $ac_status" >&5
10706   (exit $ac_status); }; }; then
10707   ac_hi=$ac_mid; break
10708 else
10709   echo "$as_me: failed program was:" >&5
10710 cat conftest.$ac_ext >&5
10711 ac_lo=`expr $ac_mid + 1`; ac_mid=`expr 2 '*' $ac_mid + 1`
10712 fi
10713 rm -f conftest.$ac_objext conftest.$ac_ext
10714   done
10715 else
10716   echo "$as_me: failed program was:" >&5
10717 cat conftest.$ac_ext >&5
10718 ac_hi=-1 ac_mid=-1
10719   while :; do
10720     cat >conftest.$ac_ext <<_ACEOF
10721 #line 10721 "configure"
10722 #include "confdefs.h"
10723 $ac_includes_default
10724 int
10725 main ()
10726 {
10727 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
10728   ;
10729   return 0;
10730 }
10731 _ACEOF
10732 rm -f conftest.$ac_objext
10733 if { (eval echo "$as_me:10733: \"$ac_compile\"") >&5
10734   (eval $ac_compile) 2>&5
10735   ac_status=$?
10736   echo "$as_me:10736: \$? = $ac_status" >&5
10737   (exit $ac_status); } &&
10738          { ac_try='test -s conftest.$ac_objext'
10739   { (eval echo "$as_me:10739: \"$ac_try\"") >&5
10740   (eval $ac_try) 2>&5
10741   ac_status=$?
10742   echo "$as_me:10742: \$? = $ac_status" >&5
10743   (exit $ac_status); }; }; then
10744   ac_lo=$ac_mid; break
10745 else
10746   echo "$as_me: failed program was:" >&5
10747 cat conftest.$ac_ext >&5
10748 ac_hi=`expr $ac_mid - 1`; ac_mid=`expr 2 '*' $ac_mid`
10749 fi
10750 rm -f conftest.$ac_objext conftest.$ac_ext
10751   done
10752 fi
10753 rm -f conftest.$ac_objext conftest.$ac_ext
10754 # Binary search between lo and hi bounds.
10755 while test "x$ac_lo" != "x$ac_hi"; do
10756   ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10757   cat >conftest.$ac_ext <<_ACEOF
10758 #line 10758 "configure"
10759 #include "confdefs.h"
10760 $ac_includes_default
10761 int
10762 main ()
10763 {
10764 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
10765   ;
10766   return 0;
10767 }
10768 _ACEOF
10769 rm -f conftest.$ac_objext
10770 if { (eval echo "$as_me:10770: \"$ac_compile\"") >&5
10771   (eval $ac_compile) 2>&5
10772   ac_status=$?
10773   echo "$as_me:10773: \$? = $ac_status" >&5
10774   (exit $ac_status); } &&
10775          { ac_try='test -s conftest.$ac_objext'
10776   { (eval echo "$as_me:10776: \"$ac_try\"") >&5
10777   (eval $ac_try) 2>&5
10778   ac_status=$?
10779   echo "$as_me:10779: \$? = $ac_status" >&5
10780   (exit $ac_status); }; }; then
10781   ac_hi=$ac_mid
10782 else
10783   echo "$as_me: failed program was:" >&5
10784 cat conftest.$ac_ext >&5
10785 ac_lo=`expr $ac_mid + 1`
10786 fi
10787 rm -f conftest.$ac_objext conftest.$ac_ext
10788 done
10789 ac_cv_sizeof_signed_char=$ac_lo
10790 else
10791   if test "$cross_compiling" = yes; then
10792   { { echo "$as_me:10792: error: cannot run test program while cross compiling" >&5
10793 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
10794    { (exit 1); exit 1; }; }
10795 else
10796   cat >conftest.$ac_ext <<_ACEOF
10797 #line 10797 "configure"
10798 #include "confdefs.h"
10799 $ac_includes_default
10800 int
10801 main ()
10802 {
10803 FILE *f = fopen ("conftest.val", "w");
10804 if (!f)
10805   $ac_main_return (1);
10806 fprintf (f, "%d", (sizeof (signed char)));
10807 fclose (f);
10808   ;
10809   return 0;
10810 }
10811 _ACEOF
10812 rm -f conftest$ac_exeext
10813 if { (eval echo "$as_me:10813: \"$ac_link\"") >&5
10814   (eval $ac_link) 2>&5
10815   ac_status=$?
10816   echo "$as_me:10816: \$? = $ac_status" >&5
10817   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10818   { (eval echo "$as_me:10818: \"$ac_try\"") >&5
10819   (eval $ac_try) 2>&5
10820   ac_status=$?
10821   echo "$as_me:10821: \$? = $ac_status" >&5
10822   (exit $ac_status); }; }; then
10823   ac_cv_sizeof_signed_char=`cat conftest.val`
10824 else
10825   echo "$as_me: program exited with status $ac_status" >&5
10826 echo "$as_me: failed program was:" >&5
10827 cat conftest.$ac_ext >&5
10828 fi
10829 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10830 fi
10831 fi
10832 rm -f conftest.val
10833 else
10834   ac_cv_sizeof_signed_char=0
10835 fi
10836 fi
10837 echo "$as_me:10837: result: $ac_cv_sizeof_signed_char" >&5
10838 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
10839 cat >>confdefs.h <<EOF
10840 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
10841 EOF
10842
10843 if test "$ac_cv_sizeof_signed_char" = 1 ; then
10844         NCURSES_SBOOL="signed char"
10845 else
10846         NCURSES_SBOOL="char"
10847 fi
10848 echo "$as_me:10848: checking if you want to use signed Boolean array in term.h" >&5
10849 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
10850
10851 # Check whether --enable-signed-char or --disable-signed-char was given.
10852 if test "${enable_signed_char+set}" = set; then
10853   enableval="$enable_signed_char"
10854   with_signed_char=$enableval
10855 else
10856   with_signed_char=no
10857 fi;
10858 echo "$as_me:10858: result: $with_signed_char" >&5
10859 echo "${ECHO_T}$with_signed_char" >&6
10860 test "$with_signed_char" != yes && NCURSES_SBOOL="char"
10861
10862 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
10863 echo "$as_me:10863: checking if you want SIGWINCH handler" >&5
10864 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
10865
10866 # Check whether --enable-sigwinch or --disable-sigwinch was given.
10867 if test "${enable_sigwinch+set}" = set; then
10868   enableval="$enable_sigwinch"
10869   with_sigwinch=$enableval
10870 else
10871   with_sigwinch=$with_ext_funcs
10872 fi;
10873 echo "$as_me:10873: result: $with_sigwinch" >&5
10874 echo "${ECHO_T}$with_sigwinch" >&6
10875 test "$with_sigwinch" = yes && cat >>confdefs.h <<\EOF
10876 #define USE_SIGWINCH 1
10877 EOF
10878
10879 ###   use option --enable-tcap-names to allow user to define new capabilities
10880 echo "$as_me:10880: checking if you want user-definable terminal capabilities like termcap" >&5
10881 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
10882
10883 # Check whether --enable-tcap-names or --disable-tcap-names was given.
10884 if test "${enable_tcap_names+set}" = set; then
10885   enableval="$enable_tcap_names"
10886   with_tcap_names=$enableval
10887 else
10888   with_tcap_names=$with_ext_funcs
10889 fi;
10890 echo "$as_me:10890: result: $with_tcap_names" >&5
10891 echo "${ECHO_T}$with_tcap_names" >&6
10892 NCURSES_XNAMES=0
10893 test "$with_tcap_names" = yes && NCURSES_XNAMES=1
10894
10895 ###############################################################################
10896 # These options are relatively safe to experiment with.
10897
10898 echo "$as_me:10898: checking if you want all development code" >&5
10899 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
10900
10901 # Check whether --with-develop or --without-develop was given.
10902 if test "${with_develop+set}" = set; then
10903   withval="$with_develop"
10904   with_develop=$withval
10905 else
10906   with_develop=no
10907 fi;
10908 echo "$as_me:10908: result: $with_develop" >&5
10909 echo "${ECHO_T}$with_develop" >&6
10910
10911 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
10912 echo "$as_me:10912: checking if you want hard-tabs code" >&5
10913 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
10914
10915 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
10916 if test "${enable_hard_tabs+set}" = set; then
10917   enableval="$enable_hard_tabs"
10918
10919 else
10920   enable_hard_tabs=$with_develop
10921 fi;
10922 echo "$as_me:10922: result: $enable_hard_tabs" >&5
10923 echo "${ECHO_T}$enable_hard_tabs" >&6
10924 test "$enable_hard_tabs" = yes && cat >>confdefs.h <<\EOF
10925 #define USE_HARD_TABS 1
10926 EOF
10927
10928 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
10929 echo "$as_me:10929: checking if you want limited support for xmc" >&5
10930 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
10931
10932 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
10933 if test "${enable_xmc_glitch+set}" = set; then
10934   enableval="$enable_xmc_glitch"
10935
10936 else
10937   enable_xmc_glitch=$with_develop
10938 fi;
10939 echo "$as_me:10939: result: $enable_xmc_glitch" >&5
10940 echo "${ECHO_T}$enable_xmc_glitch" >&6
10941 test "$enable_xmc_glitch" = yes && cat >>confdefs.h <<\EOF
10942 #define USE_XMC_SUPPORT 1
10943 EOF
10944
10945 ###############################################################################
10946 # These are just experimental, probably should not be in a package:
10947
10948 echo "$as_me:10948: checking if you do not want to assume colors are white-on-black" >&5
10949 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
10950
10951 # Check whether --enable-assumed-color or --disable-assumed-color was given.
10952 if test "${enable_assumed_color+set}" = set; then
10953   enableval="$enable_assumed_color"
10954   with_assumed_color=$enableval
10955 else
10956   with_assumed_color=yes
10957 fi;
10958 echo "$as_me:10958: result: $with_assumed_color" >&5
10959 echo "${ECHO_T}$with_assumed_color" >&6
10960 test "$with_assumed_color" = yes && cat >>confdefs.h <<\EOF
10961 #define USE_ASSUMED_COLOR 1
10962 EOF
10963
10964 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
10965 echo "$as_me:10965: checking if you want hashmap scrolling-optimization code" >&5
10966 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
10967
10968 # Check whether --enable-hashmap or --disable-hashmap was given.
10969 if test "${enable_hashmap+set}" = set; then
10970   enableval="$enable_hashmap"
10971   with_hashmap=$enableval
10972 else
10973   with_hashmap=yes
10974 fi;
10975 echo "$as_me:10975: result: $with_hashmap" >&5
10976 echo "${ECHO_T}$with_hashmap" >&6
10977 test "$with_hashmap" = yes && cat >>confdefs.h <<\EOF
10978 #define USE_HASHMAP 1
10979 EOF
10980
10981 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
10982 echo "$as_me:10982: checking if you want colorfgbg code" >&5
10983 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
10984
10985 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
10986 if test "${enable_colorfgbg+set}" = set; then
10987   enableval="$enable_colorfgbg"
10988   with_colorfgbg=$enableval
10989 else
10990   with_colorfgbg=no
10991 fi;
10992 echo "$as_me:10992: result: $with_colorfgbg" >&5
10993 echo "${ECHO_T}$with_colorfgbg" >&6
10994 test "$with_colorfgbg" = yes && cat >>confdefs.h <<\EOF
10995 #define USE_COLORFGBG 1
10996 EOF
10997
10998 ###   use option --enable-interop to turn on use of bindings used for interop
10999 echo "$as_me:10999: checking if you want interop bindings" >&5
11000 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
11001
11002 # Check whether --enable-interop or --disable-interop was given.
11003 if test "${enable_interop+set}" = set; then
11004   enableval="$enable_interop"
11005   with_exp_interop=$enableval
11006 else
11007   with_exp_interop=no
11008 fi;
11009 echo "$as_me:11009: result: $with_exp_interop" >&5
11010 echo "${ECHO_T}$with_exp_interop" >&6
11011
11012 NCURSES_INTEROP_FUNCS=0
11013 test "$with_exp_interop" = yes && NCURSES_INTEROP_FUNCS=1
11014
11015 # This is still experimental (20080329), but should ultimately be moved to
11016 # the script-block --with-normal, etc.
11017
11018 echo "$as_me:11018: checking if you want to link with the pthread library" >&5
11019 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
11020
11021 # Check whether --with-pthread or --without-pthread was given.
11022 if test "${with_pthread+set}" = set; then
11023   withval="$with_pthread"
11024   with_pthread=$withval
11025 else
11026   with_pthread=no
11027 fi;
11028 echo "$as_me:11028: result: $with_pthread" >&5
11029 echo "${ECHO_T}$with_pthread" >&6
11030
11031 if test "$with_pthread" != no ; then
11032     echo "$as_me:11032: checking for pthread.h" >&5
11033 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
11034 if test "${ac_cv_header_pthread_h+set}" = set; then
11035   echo $ECHO_N "(cached) $ECHO_C" >&6
11036 else
11037   cat >conftest.$ac_ext <<_ACEOF
11038 #line 11038 "configure"
11039 #include "confdefs.h"
11040 #include <pthread.h>
11041 _ACEOF
11042 if { (eval echo "$as_me:11042: \"$ac_cpp conftest.$ac_ext\"") >&5
11043   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11044   ac_status=$?
11045   egrep -v '^ *\+' conftest.er1 >conftest.err
11046   rm -f conftest.er1
11047   cat conftest.err >&5
11048   echo "$as_me:11048: \$? = $ac_status" >&5
11049   (exit $ac_status); } >/dev/null; then
11050   if test -s conftest.err; then
11051     ac_cpp_err=$ac_c_preproc_warn_flag
11052   else
11053     ac_cpp_err=
11054   fi
11055 else
11056   ac_cpp_err=yes
11057 fi
11058 if test -z "$ac_cpp_err"; then
11059   ac_cv_header_pthread_h=yes
11060 else
11061   echo "$as_me: failed program was:" >&5
11062   cat conftest.$ac_ext >&5
11063   ac_cv_header_pthread_h=no
11064 fi
11065 rm -f conftest.err conftest.$ac_ext
11066 fi
11067 echo "$as_me:11067: result: $ac_cv_header_pthread_h" >&5
11068 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
11069 if test $ac_cv_header_pthread_h = yes; then
11070
11071         cat >>confdefs.h <<\EOF
11072 #define HAVE_PTHREADS_H 1
11073 EOF
11074
11075         echo "$as_me:11075: checking if we can link with the pthread library" >&5
11076 echo $ECHO_N "checking if we can link with the pthread library... $ECHO_C" >&6
11077         cf_save_LIBS="$LIBS"
11078         LIBS="-lpthread $LIBS"
11079         cat >conftest.$ac_ext <<_ACEOF
11080 #line 11080 "configure"
11081 #include "confdefs.h"
11082
11083 #include <pthread.h>
11084
11085 int
11086 main ()
11087 {
11088
11089         int rc = pthread_create(0,0,0,0);
11090
11091   ;
11092   return 0;
11093 }
11094 _ACEOF
11095 rm -f conftest.$ac_objext conftest$ac_exeext
11096 if { (eval echo "$as_me:11096: \"$ac_link\"") >&5
11097   (eval $ac_link) 2>&5
11098   ac_status=$?
11099   echo "$as_me:11099: \$? = $ac_status" >&5
11100   (exit $ac_status); } &&
11101          { ac_try='test -s conftest$ac_exeext'
11102   { (eval echo "$as_me:11102: \"$ac_try\"") >&5
11103   (eval $ac_try) 2>&5
11104   ac_status=$?
11105   echo "$as_me:11105: \$? = $ac_status" >&5
11106   (exit $ac_status); }; }; then
11107   with_pthread=yes
11108 else
11109   echo "$as_me: failed program was:" >&5
11110 cat conftest.$ac_ext >&5
11111 with_pthread=no
11112 fi
11113 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11114         LIBS="$cf_save_LIBS"
11115         echo "$as_me:11115: result: $with_pthread" >&5
11116 echo "${ECHO_T}$with_pthread" >&6
11117
11118         if test "$with_pthread" = yes ; then
11119             LIBS="-lpthread $LIBS"
11120             cat >>confdefs.h <<\EOF
11121 #define HAVE_LIBPTHREADS 1
11122 EOF
11123
11124         else
11125             { { echo "$as_me:11125: error: Cannot link with pthread library" >&5
11126 echo "$as_me: error: Cannot link with pthread library" >&2;}
11127    { (exit 1); exit 1; }; }
11128         fi
11129
11130 fi
11131
11132 fi
11133
11134 if test "x$with_pthread" != xno; then
11135         echo "$as_me:11135: checking for pthread_kill" >&5
11136 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
11137 if test "${ac_cv_func_pthread_kill+set}" = set; then
11138   echo $ECHO_N "(cached) $ECHO_C" >&6
11139 else
11140   cat >conftest.$ac_ext <<_ACEOF
11141 #line 11141 "configure"
11142 #include "confdefs.h"
11143 /* System header to define __stub macros and hopefully few prototypes,
11144     which can conflict with char pthread_kill (); below.  */
11145 #include <assert.h>
11146 /* Override any gcc2 internal prototype to avoid an error.  */
11147 #ifdef __cplusplus
11148 extern "C"
11149 #endif
11150 /* We use char because int might match the return type of a gcc2
11151    builtin and then its argument prototype would still apply.  */
11152 char pthread_kill ();
11153 char (*f) ();
11154
11155 int
11156 main ()
11157 {
11158 /* The GNU C library defines this for functions which it implements
11159     to always fail with ENOSYS.  Some functions are actually named
11160     something starting with __ and the normal name is an alias.  */
11161 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
11162 choke me
11163 #else
11164 f = pthread_kill;
11165 #endif
11166
11167   ;
11168   return 0;
11169 }
11170 _ACEOF
11171 rm -f conftest.$ac_objext conftest$ac_exeext
11172 if { (eval echo "$as_me:11172: \"$ac_link\"") >&5
11173   (eval $ac_link) 2>&5
11174   ac_status=$?
11175   echo "$as_me:11175: \$? = $ac_status" >&5
11176   (exit $ac_status); } &&
11177          { ac_try='test -s conftest$ac_exeext'
11178   { (eval echo "$as_me:11178: \"$ac_try\"") >&5
11179   (eval $ac_try) 2>&5
11180   ac_status=$?
11181   echo "$as_me:11181: \$? = $ac_status" >&5
11182   (exit $ac_status); }; }; then
11183   ac_cv_func_pthread_kill=yes
11184 else
11185   echo "$as_me: failed program was:" >&5
11186 cat conftest.$ac_ext >&5
11187 ac_cv_func_pthread_kill=no
11188 fi
11189 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11190 fi
11191 echo "$as_me:11191: result: $ac_cv_func_pthread_kill" >&5
11192 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
11193 if test $ac_cv_func_pthread_kill = yes; then
11194
11195                 echo "$as_me:11195: checking if you want to allow EINTR in wgetch with pthreads" >&5
11196 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
11197
11198 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
11199 if test "${enable_pthreads_eintr+set}" = set; then
11200   enableval="$enable_pthreads_eintr"
11201   use_pthreads_eintr=$enableval
11202 else
11203   use_pthreads_eintr=no
11204 fi;
11205                 echo "$as_me:11205: result: $use_pthreads_eintr" >&5
11206 echo "${ECHO_T}$use_pthreads_eintr" >&6
11207                 if test $use_pthreads_eintr = yes ; then
11208                         cat >>confdefs.h <<\EOF
11209 #define USE_PTHREADS_EINTR 1
11210 EOF
11211
11212                 fi
11213 fi
11214
11215         echo "$as_me:11215: checking if you want to use weak-symbols for pthreads" >&5
11216 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
11217
11218 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
11219 if test "${enable_weak_symbols+set}" = set; then
11220   enableval="$enable_weak_symbols"
11221   use_weak_symbols=$enableval
11222 else
11223   use_weak_symbols=no
11224 fi;
11225         echo "$as_me:11225: result: $use_weak_symbols" >&5
11226 echo "${ECHO_T}$use_weak_symbols" >&6
11227         if test "$use_weak_symbols" = yes ; then
11228
11229 echo "$as_me:11229: checking if $CC supports weak symbols" >&5
11230 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
11231 if test "${cf_cv_weak_symbols+set}" = set; then
11232   echo $ECHO_N "(cached) $ECHO_C" >&6
11233 else
11234
11235 cat >conftest.$ac_ext <<_ACEOF
11236 #line 11236 "configure"
11237 #include "confdefs.h"
11238
11239 #include <stdio.h>
11240 int
11241 main ()
11242 {
11243
11244 #if defined(__GNUC__)
11245 #  if defined __USE_ISOC99
11246 #    define _cat_pragma(exp)    _Pragma(#exp)
11247 #    define _weak_pragma(exp)   _cat_pragma(weak name)
11248 #  else
11249 #    define _weak_pragma(exp)
11250 #  endif
11251 #  define _declare(name)        __extension__ extern __typeof__(name) name
11252 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
11253 #endif
11254
11255 weak_symbol(fopen);
11256
11257   ;
11258   return 0;
11259 }
11260 _ACEOF
11261 rm -f conftest.$ac_objext
11262 if { (eval echo "$as_me:11262: \"$ac_compile\"") >&5
11263   (eval $ac_compile) 2>&5
11264   ac_status=$?
11265   echo "$as_me:11265: \$? = $ac_status" >&5
11266   (exit $ac_status); } &&
11267          { ac_try='test -s conftest.$ac_objext'
11268   { (eval echo "$as_me:11268: \"$ac_try\"") >&5
11269   (eval $ac_try) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit $ac_status); }; }; then
11273   cf_cv_weak_symbols=yes
11274 else
11275   echo "$as_me: failed program was:" >&5
11276 cat conftest.$ac_ext >&5
11277 cf_cv_weak_symbols=no
11278 fi
11279 rm -f conftest.$ac_objext conftest.$ac_ext
11280
11281 fi
11282 echo "$as_me:11282: result: $cf_cv_weak_symbols" >&5
11283 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
11284
11285         else
11286                 cf_cv_weak_symbols=no
11287         fi
11288
11289         if test $cf_cv_weak_symbols = yes ; then
11290                 cat >>confdefs.h <<\EOF
11291 #define USE_WEAK_SYMBOLS 1
11292 EOF
11293
11294         fi
11295 fi
11296
11297 PTHREAD=
11298 if test "$with_pthread" = "yes" ; then
11299     cat >>confdefs.h <<\EOF
11300 #define USE_PTHREADS 1
11301 EOF
11302
11303     enable_reentrant=yes
11304     if test $cf_cv_weak_symbols = yes ; then
11305         PTHREAD=-lpthread
11306     fi
11307 fi
11308
11309 # Reentrant code has to be opaque; there's little advantage to making ncurses
11310 # opaque outside of that, so there is no --enable-opaque option.  We can use
11311 # this option without --with-pthreads, but this will be always set for
11312 # pthreads.
11313 echo "$as_me:11313: checking if you want experimental reentrant code" >&5
11314 echo $ECHO_N "checking if you want experimental reentrant code... $ECHO_C" >&6
11315
11316 # Check whether --enable-reentrant or --disable-reentrant was given.
11317 if test "${enable_reentrant+set}" = set; then
11318   enableval="$enable_reentrant"
11319   with_reentrant=$enableval
11320 else
11321   with_reentrant=no
11322 fi;
11323 echo "$as_me:11323: result: $with_reentrant" >&5
11324 echo "${ECHO_T}$with_reentrant" >&6
11325 if test "$with_reentrant" = yes ; then
11326         cf_cv_enable_reentrant=1
11327         cf_cv_enable_opaque="NCURSES_INTERNALS"
11328         NCURSES_OPAQUE=1
11329         NCURSES_SIZE_T=int
11330         if test $cf_cv_weak_symbols = yes ; then
11331
11332 # remove pthread library from $LIBS
11333 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
11334
11335                 TEST_LIBS="-lpthread $TEST_LIBS"
11336                 TEST_LIBS2="-lpthread $TEST_LIBS2"
11337         else
11338                 LIB_SUFFIX="t${LIB_SUFFIX}"
11339         fi
11340         cat >>confdefs.h <<\EOF
11341 #define USE_REENTRANT 1
11342 EOF
11343
11344 if test "${with_abi_version+set}" != set; then
11345         case $cf_cv_rel_version in
11346         5.*)
11347                 cf_cv_rel_version=6.0
11348                 cf_cv_abi_version=6
11349                 { echo "$as_me:11349: WARNING: Overriding ABI version to $cf_cv_abi_version" >&5
11350 echo "$as_me: WARNING: Overriding ABI version to $cf_cv_abi_version" >&2;}
11351                 ;;
11352         esac
11353 fi
11354
11355 else
11356         cf_cv_enable_reentrant=0
11357         cf_cv_enable_opaque="NCURSES_OPAQUE"
11358         NCURSES_OPAQUE=0
11359         NCURSES_SIZE_T=short
11360 fi
11361
11362 ### Allow using a different wrap-prefix
11363 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
11364         echo "$as_me:11364: checking for prefix used to wrap public variables" >&5
11365 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
11366
11367 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
11368 if test "${with_wrap_prefix+set}" = set; then
11369   withval="$with_wrap_prefix"
11370   NCURSES_WRAP_PREFIX=$withval
11371 else
11372   NCURSES_WRAP_PREFIX=_nc_
11373 fi;
11374         echo "$as_me:11374: result: $NCURSES_WRAP_PREFIX" >&5
11375 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
11376 else
11377         NCURSES_WRAP_PREFIX=_nc_
11378 fi
11379
11380 cat >>confdefs.h <<EOF
11381 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
11382 EOF
11383
11384 echo "$as_me:11384: checking if you want experimental safe-sprintf code" >&5
11385 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
11386
11387 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
11388 if test "${enable_safe_sprintf+set}" = set; then
11389   enableval="$enable_safe_sprintf"
11390   with_safe_sprintf=$enableval
11391 else
11392   with_safe_sprintf=no
11393 fi;
11394 echo "$as_me:11394: result: $with_safe_sprintf" >&5
11395 echo "${ECHO_T}$with_safe_sprintf" >&6
11396 test "$with_safe_sprintf" = yes && cat >>confdefs.h <<\EOF
11397 #define USE_SAFE_SPRINTF 1
11398 EOF
11399
11400 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
11401 # when hashmap is used scroll hints are useless
11402 if test "$with_hashmap" = no ; then
11403 echo "$as_me:11403: checking if you want to experiment without scrolling-hints code" >&5
11404 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
11405
11406 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
11407 if test "${enable_scroll_hints+set}" = set; then
11408   enableval="$enable_scroll_hints"
11409   with_scroll_hints=$enableval
11410 else
11411   with_scroll_hints=yes
11412 fi;
11413 echo "$as_me:11413: result: $with_scroll_hints" >&5
11414 echo "${ECHO_T}$with_scroll_hints" >&6
11415 test "$with_scroll_hints" = yes && cat >>confdefs.h <<\EOF
11416 #define USE_SCROLL_HINTS 1
11417 EOF
11418
11419 fi
11420
11421 echo "$as_me:11421: checking if you want experimental wgetch-events code" >&5
11422 echo $ECHO_N "checking if you want experimental wgetch-events code... $ECHO_C" >&6
11423
11424 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
11425 if test "${enable_wgetch_events+set}" = set; then
11426   enableval="$enable_wgetch_events"
11427   with_wgetch_events=$enableval
11428 else
11429   with_wgetch_events=no
11430 fi;
11431 echo "$as_me:11431: result: $with_wgetch_events" >&5
11432 echo "${ECHO_T}$with_wgetch_events" >&6
11433 test "$with_wgetch_events" = yes && cat >>confdefs.h <<\EOF
11434 #define NCURSES_WGETCH_EVENTS 1
11435 EOF
11436
11437 ###############################################################################
11438
11439 ###     use option --disable-echo to suppress full display compiling commands
11440 echo "$as_me:11440: checking if you want to display full commands during build" >&5
11441 echo $ECHO_N "checking if you want to display full commands during build... $ECHO_C" >&6
11442
11443 # Check whether --enable-echo or --disable-echo was given.
11444 if test "${enable_echo+set}" = set; then
11445   enableval="$enable_echo"
11446   with_echo=$enableval
11447 else
11448   with_echo=yes
11449 fi;
11450 if test "$with_echo" = yes; then
11451         ECHO_LINK=
11452 else
11453         ECHO_LINK='@ echo linking $@ ... ;'
11454         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
11455         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
11456 fi
11457 echo "$as_me:11457: result: $with_echo" >&5
11458 echo "${ECHO_T}$with_echo" >&6
11459
11460 ###     use option --enable-warnings to turn on all gcc warnings
11461 echo "$as_me:11461: checking if you want to see compiler warnings" >&5
11462 echo $ECHO_N "checking if you want to see compiler warnings... $ECHO_C" >&6
11463
11464 # Check whether --enable-warnings or --disable-warnings was given.
11465 if test "${enable_warnings+set}" = set; then
11466   enableval="$enable_warnings"
11467   with_warnings=$enableval
11468 fi;
11469 echo "$as_me:11469: result: $with_warnings" >&5
11470 echo "${ECHO_T}$with_warnings" >&6
11471
11472 if test "x$with_warnings" = "xyes"; then
11473
11474         ADAFLAGS="$ADAFLAGS -gnatg"
11475
11476 INTEL_COMPILER=no
11477
11478 if test "$GCC" = yes ; then
11479         case $host_os in
11480         linux*|gnu*)
11481                 echo "$as_me:11481: checking if this is really Intel C compiler" >&5
11482 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
11483                 cf_save_CFLAGS="$CFLAGS"
11484                 CFLAGS="$CFLAGS -no-gcc"
11485                 cat >conftest.$ac_ext <<_ACEOF
11486 #line 11486 "configure"
11487 #include "confdefs.h"
11488
11489 int
11490 main ()
11491 {
11492
11493 #ifdef __INTEL_COMPILER
11494 #else
11495 make an error
11496 #endif
11497
11498   ;
11499   return 0;
11500 }
11501 _ACEOF
11502 rm -f conftest.$ac_objext
11503 if { (eval echo "$as_me:11503: \"$ac_compile\"") >&5
11504   (eval $ac_compile) 2>&5
11505   ac_status=$?
11506   echo "$as_me:11506: \$? = $ac_status" >&5
11507   (exit $ac_status); } &&
11508          { ac_try='test -s conftest.$ac_objext'
11509   { (eval echo "$as_me:11509: \"$ac_try\"") >&5
11510   (eval $ac_try) 2>&5
11511   ac_status=$?
11512   echo "$as_me:11512: \$? = $ac_status" >&5
11513   (exit $ac_status); }; }; then
11514   INTEL_COMPILER=yes
11515 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11516
11517 else
11518   echo "$as_me: failed program was:" >&5
11519 cat conftest.$ac_ext >&5
11520 fi
11521 rm -f conftest.$ac_objext conftest.$ac_ext
11522                 CFLAGS="$cf_save_CFLAGS"
11523                 echo "$as_me:11523: result: $INTEL_COMPILER" >&5
11524 echo "${ECHO_T}$INTEL_COMPILER" >&6
11525                 ;;
11526         esac
11527 fi
11528
11529 cat > conftest.$ac_ext <<EOF
11530 #line 11530 "${as_me:-configure}"
11531 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11532 EOF
11533
11534 if test "$INTEL_COMPILER" = yes
11535 then
11536 # The "-wdXXX" options suppress warnings:
11537 # remark #1419: external declaration in primary source file
11538 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11539 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11540 # remark #193: zero used for undefined preprocessing identifier
11541 # remark #593: variable "curs_sb_left_arrow" was set but never used
11542 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11543 # remark #869: parameter "tw" was never referenced
11544 # remark #981: operands are evaluated in unspecified order
11545 # warning #279: controlling expression is constant
11546
11547         { echo "$as_me:11547: checking for $CC warning options..." >&5
11548 echo "$as_me: checking for $CC warning options..." >&6;}
11549         cf_save_CFLAGS="$CFLAGS"
11550         EXTRA_CFLAGS="-Wall"
11551         for cf_opt in \
11552                 wd1419 \
11553                 wd1683 \
11554                 wd1684 \
11555                 wd193 \
11556                 wd593 \
11557                 wd279 \
11558                 wd810 \
11559                 wd869 \
11560                 wd981
11561         do
11562                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11563                 if { (eval echo "$as_me:11563: \"$ac_compile\"") >&5
11564   (eval $ac_compile) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit $ac_status); }; then
11568                         test -n "$verbose" && echo "$as_me:11568: result: ... -$cf_opt" >&5
11569 echo "${ECHO_T}... -$cf_opt" >&6
11570                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11571                 fi
11572         done
11573         CFLAGS="$cf_save_CFLAGS"
11574
11575 elif test "$GCC" = yes
11576 then
11577         { echo "$as_me:11577: checking for $CC warning options..." >&5
11578 echo "$as_me: checking for $CC warning options..." >&6;}
11579         cf_save_CFLAGS="$CFLAGS"
11580         EXTRA_CFLAGS=
11581         cf_warn_CONST=""
11582         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
11583         for cf_opt in W Wall \
11584                 Wbad-function-cast \
11585                 Wcast-align \
11586                 Wcast-qual \
11587                 Winline \
11588                 Wmissing-declarations \
11589                 Wmissing-prototypes \
11590                 Wnested-externs \
11591                 Wpointer-arith \
11592                 Wshadow \
11593                 Wstrict-prototypes \
11594                 Wundef $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
11595         do
11596                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
11597                 if { (eval echo "$as_me:11597: \"$ac_compile\"") >&5
11598   (eval $ac_compile) 2>&5
11599   ac_status=$?
11600   echo "$as_me:11600: \$? = $ac_status" >&5
11601   (exit $ac_status); }; then
11602                         test -n "$verbose" && echo "$as_me:11602: result: ... -$cf_opt" >&5
11603 echo "${ECHO_T}... -$cf_opt" >&6
11604                         case $cf_opt in #(vi
11605                         Wcast-qual) #(vi
11606                                 CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
11607                                 ;;
11608                         Winline) #(vi
11609                                 case $GCC_VERSION in
11610                                 [34].*)
11611                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
11612
11613 echo "${as_me:-configure}:11613: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
11614
11615                                         continue;;
11616                                 esac
11617                                 ;;
11618                         esac
11619                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
11620                 fi
11621         done
11622         CFLAGS="$cf_save_CFLAGS"
11623 fi
11624 rm -rf conftest*
11625
11626         if test "$cf_with_cxx" = yes ; then
11627
11628 INTEL_CPLUSPLUS=no
11629
11630 if test "$GCC" = yes ; then
11631         case $host_os in
11632         linux*|gnu*)
11633                 echo "$as_me:11633: checking if this is really Intel C++ compiler" >&5
11634 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
11635                 cf_save_CFLAGS="$CXXFLAGS"
11636                 CXXFLAGS="$CXXFLAGS -no-gcc"
11637                 cat >conftest.$ac_ext <<_ACEOF
11638 #line 11638 "configure"
11639 #include "confdefs.h"
11640
11641 int
11642 main ()
11643 {
11644
11645 #ifdef __INTEL_COMPILER
11646 #else
11647 make an error
11648 #endif
11649
11650   ;
11651   return 0;
11652 }
11653 _ACEOF
11654 rm -f conftest.$ac_objext
11655 if { (eval echo "$as_me:11655: \"$ac_compile\"") >&5
11656   (eval $ac_compile) 2>&5
11657   ac_status=$?
11658   echo "$as_me:11658: \$? = $ac_status" >&5
11659   (exit $ac_status); } &&
11660          { ac_try='test -s conftest.$ac_objext'
11661   { (eval echo "$as_me:11661: \"$ac_try\"") >&5
11662   (eval $ac_try) 2>&5
11663   ac_status=$?
11664   echo "$as_me:11664: \$? = $ac_status" >&5
11665   (exit $ac_status); }; }; then
11666   INTEL_CPLUSPLUS=yes
11667 cf_save_CFLAGS="$cf_save_CFLAGS -we147 -no-gcc"
11668
11669 else
11670   echo "$as_me: failed program was:" >&5
11671 cat conftest.$ac_ext >&5
11672 fi
11673 rm -f conftest.$ac_objext conftest.$ac_ext
11674                 CXXFLAGS="$cf_save_CFLAGS"
11675                 echo "$as_me:11675: result: $INTEL_CPLUSPLUS" >&5
11676 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
11677                 ;;
11678         esac
11679 fi
11680
11681 ac_ext=cc
11682 ac_cpp='$CXXCPP $CPPFLAGS'
11683 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11684 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11685 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
11686 ac_main_return=return
11687
11688 cat > conftest.$ac_ext <<EOF
11689 #line 11689 "configure"
11690 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
11691 EOF
11692
11693 if test "$INTEL_CPLUSPLUS" = yes
11694 then
11695 # The "-wdXXX" options suppress warnings:
11696 # remark #1419: external declaration in primary source file
11697 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11698 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
11699 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
11700 # remark #193: zero used for undefined preprocessing identifier
11701 # remark #593: variable "curs_sb_left_arrow" was set but never used
11702 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
11703 # remark #869: parameter "tw" was never referenced
11704 # remark #981: operands are evaluated in unspecified order
11705 # warning #269: invalid format string conversion
11706
11707         { echo "$as_me:11707: checking for $CC warning options..." >&5
11708 echo "$as_me: checking for $CC warning options..." >&6;}
11709         cf_save_CXXFLAGS="$CXXFLAGS"
11710         EXTRA_CXXFLAGS="-Wall"
11711         for cf_opt in \
11712                 wd1419 \
11713                 wd1682 \
11714                 wd1683 \
11715                 wd1684 \
11716                 wd193 \
11717                 wd279 \
11718                 wd593 \
11719                 wd810 \
11720                 wd869 \
11721                 wd981
11722         do
11723                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
11724                 if { (eval echo "$as_me:11724: \"$ac_compile\"") >&5
11725   (eval $ac_compile) 2>&5
11726   ac_status=$?
11727   echo "$as_me:11727: \$? = $ac_status" >&5
11728   (exit $ac_status); }; then
11729                         test -n "$verbose" && echo "$as_me:11729: result: ... -$cf_opt" >&5
11730 echo "${ECHO_T}... -$cf_opt" >&6
11731                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11732                 fi
11733         done
11734         CXXFLAGS="$cf_save_CXXFLAGS"
11735
11736 elif test "$GXX" = yes
11737 then
11738         { echo "$as_me:11738: checking for $CXX warning options..." >&5
11739 echo "$as_me: checking for $CXX warning options..." >&6;}
11740         cf_save_CXXFLAGS="$CXXFLAGS"
11741         EXTRA_CXXFLAGS="-W -Wall"
11742         cf_gxx_extra_warnings=""
11743         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
11744         case "$GCC_VERSION" in
11745         [1-2].*)
11746                 ;;
11747         *)
11748                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
11749                 ;;
11750         esac
11751         for cf_opt in \
11752                 Wabi \
11753                 fabi-version=0 \
11754                 Woverloaded-virtual \
11755                 Wsign-promo \
11756                 Wsynth \
11757                 Wold-style-cast \
11758                 Wcast-align \
11759                 Wcast-qual \
11760                 Wmissing-prototypes \
11761                 Wpointer-arith \
11762                 Wshadow \
11763                 Wstrict-prototypes \
11764                 Wundef $cf_gxx_extra_warnings Wno-unused
11765         do
11766                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
11767                 if { (eval echo "$as_me:11767: \"$ac_compile\"") >&5
11768   (eval $ac_compile) 2>&5
11769   ac_status=$?
11770   echo "$as_me:11770: \$? = $ac_status" >&5
11771   (exit $ac_status); }; then
11772                         test -n "$verbose" && echo "$as_me:11772: result: ... -$cf_opt" >&5
11773 echo "${ECHO_T}... -$cf_opt" >&6
11774                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
11775                 else
11776                         test -n "$verbose" && echo "$as_me:11776: result: ... no -$cf_opt" >&5
11777 echo "${ECHO_T}... no -$cf_opt" >&6
11778                 fi
11779         done
11780         CXXFLAGS="$cf_save_CXXFLAGS"
11781 fi
11782
11783 rm -rf conftest*
11784 ac_ext=c
11785 ac_cpp='$CPP $CPPFLAGS'
11786 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
11787 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
11788 ac_compiler_gnu=$ac_cv_c_compiler_gnu
11789 ac_main_return=return
11790
11791         fi
11792 fi
11793
11794 if test "$GCC" = yes
11795 then
11796 cat > conftest.i <<EOF
11797 #ifndef GCC_PRINTF
11798 #define GCC_PRINTF 0
11799 #endif
11800 #ifndef GCC_SCANF
11801 #define GCC_SCANF 0
11802 #endif
11803 #ifndef GCC_NORETURN
11804 #define GCC_NORETURN /* nothing */
11805 #endif
11806 #ifndef GCC_UNUSED
11807 #define GCC_UNUSED /* nothing */
11808 #endif
11809 EOF
11810 if test "$GCC" = yes
11811 then
11812         { echo "$as_me:11812: checking for $CC __attribute__ directives..." >&5
11813 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
11814 cat > conftest.$ac_ext <<EOF
11815 #line 11815 "${as_me:-configure}"
11816 #include "confdefs.h"
11817 #include "conftest.h"
11818 #include "conftest.i"
11819 #if     GCC_PRINTF
11820 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11821 #else
11822 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
11823 #endif
11824 #if     GCC_SCANF
11825 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11826 #else
11827 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
11828 #endif
11829 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
11830 extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
11831 extern void foo(void) GCC_NORETURN;
11832 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
11833 EOF
11834         cf_printf_attribute=no
11835         cf_scanf_attribute=no
11836         for cf_attribute in scanf printf unused noreturn
11837         do
11838
11839 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11840
11841                 cf_directive="__attribute__(($cf_attribute))"
11842                 echo "checking for $CC $cf_directive" 1>&5
11843
11844                 case $cf_attribute in #(vi
11845                 printf) #(vi
11846                         cf_printf_attribute=yes
11847                         cat >conftest.h <<EOF
11848 #define GCC_$cf_ATTRIBUTE 1
11849 EOF
11850                         ;;
11851                 scanf) #(vi
11852                         cf_scanf_attribute=yes
11853                         cat >conftest.h <<EOF
11854 #define GCC_$cf_ATTRIBUTE 1
11855 EOF
11856                         ;;
11857                 *) #(vi
11858                         cat >conftest.h <<EOF
11859 #define GCC_$cf_ATTRIBUTE $cf_directive
11860 EOF
11861                         ;;
11862                 esac
11863
11864                 if { (eval echo "$as_me:11864: \"$ac_compile\"") >&5
11865   (eval $ac_compile) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit $ac_status); }; then
11869                         test -n "$verbose" && echo "$as_me:11869: result: ... $cf_attribute" >&5
11870 echo "${ECHO_T}... $cf_attribute" >&6
11871                         cat conftest.h >>confdefs.h
11872                         case $cf_attribute in #(vi
11873                         printf) #(vi
11874                                 if test "$cf_printf_attribute" = no ; then
11875                                         cat >>confdefs.h <<EOF
11876 #define GCC_PRINTFLIKE(fmt,var) /* nothing */
11877 EOF
11878                                 else
11879                                         cat >>confdefs.h <<EOF
11880 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
11881 EOF
11882                                 fi
11883                                 ;;
11884                         scanf) #(vi
11885                                 if test "$cf_scanf_attribute" = no ; then
11886                                         cat >>confdefs.h <<EOF
11887 #define GCC_SCANFLIKE(fmt,var) /* nothing */
11888 EOF
11889                                 else
11890                                         cat >>confdefs.h <<EOF
11891 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
11892 EOF
11893                                 fi
11894                                 ;;
11895                         esac
11896                 fi
11897         done
11898 else
11899         fgrep define conftest.i >>confdefs.h
11900 fi
11901 rm -rf conftest*
11902 fi
11903
11904 ###     use option --enable-assertions to turn on generation of assertion code
11905 echo "$as_me:11905: checking if you want to enable runtime assertions" >&5
11906 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
11907
11908 # Check whether --enable-assertions or --disable-assertions was given.
11909 if test "${enable_assertions+set}" = set; then
11910   enableval="$enable_assertions"
11911   with_assertions=$enableval
11912 else
11913   with_assertions=no
11914 fi;
11915 echo "$as_me:11915: result: $with_assertions" >&5
11916 echo "${ECHO_T}$with_assertions" >&6
11917 if test -n "$GCC"
11918 then
11919         if test "$with_assertions" = no
11920         then
11921                 cat >>confdefs.h <<\EOF
11922 #define NDEBUG 1
11923 EOF
11924
11925                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
11926         else
11927
11928         ADAFLAGS="$ADAFLAGS -gnata"
11929
11930         fi
11931 fi
11932
11933 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
11934
11935 echo "$as_me:11935: checking if you want to use dmalloc for testing" >&5
11936 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
11937
11938 # Check whether --with-dmalloc or --without-dmalloc was given.
11939 if test "${with_dmalloc+set}" = set; then
11940   withval="$with_dmalloc"
11941   cat >>confdefs.h <<\EOF
11942 #define USE_DMALLOC 1
11943 EOF
11944
11945         : ${with_cflags:=-g}
11946         : ${with_no_leaks:=yes}
11947          with_dmalloc=yes
11948 else
11949   with_dmalloc=
11950 fi;
11951 echo "$as_me:11951: result: ${with_dmalloc:-no}" >&5
11952 echo "${ECHO_T}${with_dmalloc:-no}" >&6
11953
11954 case .$with_cflags in #(vi
11955 .*-g*)
11956         case .$CFLAGS in #(vi
11957         .*-g*) #(vi
11958                 ;;
11959         *)
11960
11961 cf_fix_cppflags=no
11962 cf_new_cflags=
11963 cf_new_cppflags=
11964 cf_new_extra_cppflags=
11965
11966 for cf_add_cflags in -g
11967 do
11968 case $cf_fix_cppflags in
11969 no)
11970         case $cf_add_cflags in #(vi
11971         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
11972                 case $cf_add_cflags in
11973                 -D*)
11974                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11975
11976                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
11977                                 && test -z "${cf_tst_cflags}" \
11978                                 && cf_fix_cppflags=yes
11979
11980                         if test $cf_fix_cppflags = yes ; then
11981                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11982                                 continue
11983                         elif test "${cf_tst_cflags}" = "\"'" ; then
11984                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11985                                 continue
11986                         fi
11987                         ;;
11988                 esac
11989                 case "$CPPFLAGS" in
11990                 *$cf_add_cflags) #(vi
11991                         ;;
11992                 *) #(vi
11993                         case $cf_add_cflags in #(vi
11994                         -D*)
11995                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11996
11997 CPPFLAGS=`echo "$CPPFLAGS" | \
11998         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11999                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12000
12001                                 ;;
12002                         esac
12003                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12004                         ;;
12005                 esac
12006                 ;;
12007         *)
12008                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12009                 ;;
12010         esac
12011         ;;
12012 yes)
12013         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12014
12015         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12016
12017         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12018                 && test -z "${cf_tst_cflags}" \
12019                 && cf_fix_cppflags=no
12020         ;;
12021 esac
12022 done
12023
12024 if test -n "$cf_new_cflags" ; then
12025
12026         CFLAGS="$CFLAGS $cf_new_cflags"
12027 fi
12028
12029 if test -n "$cf_new_cppflags" ; then
12030
12031         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12032 fi
12033
12034 if test -n "$cf_new_extra_cppflags" ; then
12035
12036         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12037 fi
12038
12039                 ;;
12040         esac
12041         ;;
12042 esac
12043
12044 if test "$with_dmalloc" = yes ; then
12045         echo "$as_me:12045: checking for dmalloc.h" >&5
12046 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
12047 if test "${ac_cv_header_dmalloc_h+set}" = set; then
12048   echo $ECHO_N "(cached) $ECHO_C" >&6
12049 else
12050   cat >conftest.$ac_ext <<_ACEOF
12051 #line 12051 "configure"
12052 #include "confdefs.h"
12053 #include <dmalloc.h>
12054 _ACEOF
12055 if { (eval echo "$as_me:12055: \"$ac_cpp conftest.$ac_ext\"") >&5
12056   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12057   ac_status=$?
12058   egrep -v '^ *\+' conftest.er1 >conftest.err
12059   rm -f conftest.er1
12060   cat conftest.err >&5
12061   echo "$as_me:12061: \$? = $ac_status" >&5
12062   (exit $ac_status); } >/dev/null; then
12063   if test -s conftest.err; then
12064     ac_cpp_err=$ac_c_preproc_warn_flag
12065   else
12066     ac_cpp_err=
12067   fi
12068 else
12069   ac_cpp_err=yes
12070 fi
12071 if test -z "$ac_cpp_err"; then
12072   ac_cv_header_dmalloc_h=yes
12073 else
12074   echo "$as_me: failed program was:" >&5
12075   cat conftest.$ac_ext >&5
12076   ac_cv_header_dmalloc_h=no
12077 fi
12078 rm -f conftest.err conftest.$ac_ext
12079 fi
12080 echo "$as_me:12080: result: $ac_cv_header_dmalloc_h" >&5
12081 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
12082 if test $ac_cv_header_dmalloc_h = yes; then
12083
12084 echo "$as_me:12084: checking for dmalloc_debug in -ldmalloc" >&5
12085 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
12086 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
12087   echo $ECHO_N "(cached) $ECHO_C" >&6
12088 else
12089   ac_check_lib_save_LIBS=$LIBS
12090 LIBS="-ldmalloc  $LIBS"
12091 cat >conftest.$ac_ext <<_ACEOF
12092 #line 12092 "configure"
12093 #include "confdefs.h"
12094
12095 /* Override any gcc2 internal prototype to avoid an error.  */
12096 #ifdef __cplusplus
12097 extern "C"
12098 #endif
12099 /* We use char because int might match the return type of a gcc2
12100    builtin and then its argument prototype would still apply.  */
12101 char dmalloc_debug ();
12102 int
12103 main ()
12104 {
12105 dmalloc_debug ();
12106   ;
12107   return 0;
12108 }
12109 _ACEOF
12110 rm -f conftest.$ac_objext conftest$ac_exeext
12111 if { (eval echo "$as_me:12111: \"$ac_link\"") >&5
12112   (eval $ac_link) 2>&5
12113   ac_status=$?
12114   echo "$as_me:12114: \$? = $ac_status" >&5
12115   (exit $ac_status); } &&
12116          { ac_try='test -s conftest$ac_exeext'
12117   { (eval echo "$as_me:12117: \"$ac_try\"") >&5
12118   (eval $ac_try) 2>&5
12119   ac_status=$?
12120   echo "$as_me:12120: \$? = $ac_status" >&5
12121   (exit $ac_status); }; }; then
12122   ac_cv_lib_dmalloc_dmalloc_debug=yes
12123 else
12124   echo "$as_me: failed program was:" >&5
12125 cat conftest.$ac_ext >&5
12126 ac_cv_lib_dmalloc_dmalloc_debug=no
12127 fi
12128 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12129 LIBS=$ac_check_lib_save_LIBS
12130 fi
12131 echo "$as_me:12131: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
12132 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
12133 if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
12134   cat >>confdefs.h <<EOF
12135 #define HAVE_LIBDMALLOC 1
12136 EOF
12137
12138   LIBS="-ldmalloc $LIBS"
12139
12140 fi
12141
12142 fi
12143
12144 fi
12145
12146 echo "$as_me:12146: checking if you want to use dbmalloc for testing" >&5
12147 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
12148
12149 # Check whether --with-dbmalloc or --without-dbmalloc was given.
12150 if test "${with_dbmalloc+set}" = set; then
12151   withval="$with_dbmalloc"
12152   cat >>confdefs.h <<\EOF
12153 #define USE_DBMALLOC 1
12154 EOF
12155
12156         : ${with_cflags:=-g}
12157         : ${with_no_leaks:=yes}
12158          with_dbmalloc=yes
12159 else
12160   with_dbmalloc=
12161 fi;
12162 echo "$as_me:12162: result: ${with_dbmalloc:-no}" >&5
12163 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
12164
12165 case .$with_cflags in #(vi
12166 .*-g*)
12167         case .$CFLAGS in #(vi
12168         .*-g*) #(vi
12169                 ;;
12170         *)
12171
12172 cf_fix_cppflags=no
12173 cf_new_cflags=
12174 cf_new_cppflags=
12175 cf_new_extra_cppflags=
12176
12177 for cf_add_cflags in -g
12178 do
12179 case $cf_fix_cppflags in
12180 no)
12181         case $cf_add_cflags in #(vi
12182         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12183                 case $cf_add_cflags in
12184                 -D*)
12185                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12186
12187                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12188                                 && test -z "${cf_tst_cflags}" \
12189                                 && cf_fix_cppflags=yes
12190
12191                         if test $cf_fix_cppflags = yes ; then
12192                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12193                                 continue
12194                         elif test "${cf_tst_cflags}" = "\"'" ; then
12195                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12196                                 continue
12197                         fi
12198                         ;;
12199                 esac
12200                 case "$CPPFLAGS" in
12201                 *$cf_add_cflags) #(vi
12202                         ;;
12203                 *) #(vi
12204                         case $cf_add_cflags in #(vi
12205                         -D*)
12206                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12207
12208 CPPFLAGS=`echo "$CPPFLAGS" | \
12209         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12210                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12211
12212                                 ;;
12213                         esac
12214                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12215                         ;;
12216                 esac
12217                 ;;
12218         *)
12219                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12220                 ;;
12221         esac
12222         ;;
12223 yes)
12224         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12225
12226         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12227
12228         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12229                 && test -z "${cf_tst_cflags}" \
12230                 && cf_fix_cppflags=no
12231         ;;
12232 esac
12233 done
12234
12235 if test -n "$cf_new_cflags" ; then
12236
12237         CFLAGS="$CFLAGS $cf_new_cflags"
12238 fi
12239
12240 if test -n "$cf_new_cppflags" ; then
12241
12242         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12243 fi
12244
12245 if test -n "$cf_new_extra_cppflags" ; then
12246
12247         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12248 fi
12249
12250                 ;;
12251         esac
12252         ;;
12253 esac
12254
12255 if test "$with_dbmalloc" = yes ; then
12256         echo "$as_me:12256: checking for dbmalloc.h" >&5
12257 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
12258 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
12259   echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261   cat >conftest.$ac_ext <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264 #include <dbmalloc.h>
12265 _ACEOF
12266 if { (eval echo "$as_me:12266: \"$ac_cpp conftest.$ac_ext\"") >&5
12267   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12268   ac_status=$?
12269   egrep -v '^ *\+' conftest.er1 >conftest.err
12270   rm -f conftest.er1
12271   cat conftest.err >&5
12272   echo "$as_me:12272: \$? = $ac_status" >&5
12273   (exit $ac_status); } >/dev/null; then
12274   if test -s conftest.err; then
12275     ac_cpp_err=$ac_c_preproc_warn_flag
12276   else
12277     ac_cpp_err=
12278   fi
12279 else
12280   ac_cpp_err=yes
12281 fi
12282 if test -z "$ac_cpp_err"; then
12283   ac_cv_header_dbmalloc_h=yes
12284 else
12285   echo "$as_me: failed program was:" >&5
12286   cat conftest.$ac_ext >&5
12287   ac_cv_header_dbmalloc_h=no
12288 fi
12289 rm -f conftest.err conftest.$ac_ext
12290 fi
12291 echo "$as_me:12291: result: $ac_cv_header_dbmalloc_h" >&5
12292 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
12293 if test $ac_cv_header_dbmalloc_h = yes; then
12294
12295 echo "$as_me:12295: checking for debug_malloc in -ldbmalloc" >&5
12296 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
12297 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
12298   echo $ECHO_N "(cached) $ECHO_C" >&6
12299 else
12300   ac_check_lib_save_LIBS=$LIBS
12301 LIBS="-ldbmalloc  $LIBS"
12302 cat >conftest.$ac_ext <<_ACEOF
12303 #line 12303 "configure"
12304 #include "confdefs.h"
12305
12306 /* Override any gcc2 internal prototype to avoid an error.  */
12307 #ifdef __cplusplus
12308 extern "C"
12309 #endif
12310 /* We use char because int might match the return type of a gcc2
12311    builtin and then its argument prototype would still apply.  */
12312 char debug_malloc ();
12313 int
12314 main ()
12315 {
12316 debug_malloc ();
12317   ;
12318   return 0;
12319 }
12320 _ACEOF
12321 rm -f conftest.$ac_objext conftest$ac_exeext
12322 if { (eval echo "$as_me:12322: \"$ac_link\"") >&5
12323   (eval $ac_link) 2>&5
12324   ac_status=$?
12325   echo "$as_me:12325: \$? = $ac_status" >&5
12326   (exit $ac_status); } &&
12327          { ac_try='test -s conftest$ac_exeext'
12328   { (eval echo "$as_me:12328: \"$ac_try\"") >&5
12329   (eval $ac_try) 2>&5
12330   ac_status=$?
12331   echo "$as_me:12331: \$? = $ac_status" >&5
12332   (exit $ac_status); }; }; then
12333   ac_cv_lib_dbmalloc_debug_malloc=yes
12334 else
12335   echo "$as_me: failed program was:" >&5
12336 cat conftest.$ac_ext >&5
12337 ac_cv_lib_dbmalloc_debug_malloc=no
12338 fi
12339 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12340 LIBS=$ac_check_lib_save_LIBS
12341 fi
12342 echo "$as_me:12342: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
12343 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
12344 if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
12345   cat >>confdefs.h <<EOF
12346 #define HAVE_LIBDBMALLOC 1
12347 EOF
12348
12349   LIBS="-ldbmalloc $LIBS"
12350
12351 fi
12352
12353 fi
12354
12355 fi
12356
12357 echo "$as_me:12357: checking if you want to use valgrind for testing" >&5
12358 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
12359
12360 # Check whether --with-valgrind or --without-valgrind was given.
12361 if test "${with_valgrind+set}" = set; then
12362   withval="$with_valgrind"
12363   cat >>confdefs.h <<\EOF
12364 #define USE_VALGRIND 1
12365 EOF
12366
12367         : ${with_cflags:=-g}
12368         : ${with_no_leaks:=yes}
12369          with_valgrind=yes
12370 else
12371   with_valgrind=
12372 fi;
12373 echo "$as_me:12373: result: ${with_valgrind:-no}" >&5
12374 echo "${ECHO_T}${with_valgrind:-no}" >&6
12375
12376 case .$with_cflags in #(vi
12377 .*-g*)
12378         case .$CFLAGS in #(vi
12379         .*-g*) #(vi
12380                 ;;
12381         *)
12382
12383 cf_fix_cppflags=no
12384 cf_new_cflags=
12385 cf_new_cppflags=
12386 cf_new_extra_cppflags=
12387
12388 for cf_add_cflags in -g
12389 do
12390 case $cf_fix_cppflags in
12391 no)
12392         case $cf_add_cflags in #(vi
12393         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12394                 case $cf_add_cflags in
12395                 -D*)
12396                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12397
12398                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12399                                 && test -z "${cf_tst_cflags}" \
12400                                 && cf_fix_cppflags=yes
12401
12402                         if test $cf_fix_cppflags = yes ; then
12403                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12404                                 continue
12405                         elif test "${cf_tst_cflags}" = "\"'" ; then
12406                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12407                                 continue
12408                         fi
12409                         ;;
12410                 esac
12411                 case "$CPPFLAGS" in
12412                 *$cf_add_cflags) #(vi
12413                         ;;
12414                 *) #(vi
12415                         case $cf_add_cflags in #(vi
12416                         -D*)
12417                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12418
12419 CPPFLAGS=`echo "$CPPFLAGS" | \
12420         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12421                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12422
12423                                 ;;
12424                         esac
12425                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12426                         ;;
12427                 esac
12428                 ;;
12429         *)
12430                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12431                 ;;
12432         esac
12433         ;;
12434 yes)
12435         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12436
12437         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12438
12439         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12440                 && test -z "${cf_tst_cflags}" \
12441                 && cf_fix_cppflags=no
12442         ;;
12443 esac
12444 done
12445
12446 if test -n "$cf_new_cflags" ; then
12447
12448         CFLAGS="$CFLAGS $cf_new_cflags"
12449 fi
12450
12451 if test -n "$cf_new_cppflags" ; then
12452
12453         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12454 fi
12455
12456 if test -n "$cf_new_extra_cppflags" ; then
12457
12458         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12459 fi
12460
12461                 ;;
12462         esac
12463         ;;
12464 esac
12465
12466 echo "$as_me:12466: checking if you want to perform memory-leak testing" >&5
12467 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
12468
12469 # Check whether --enable-leaks or --disable-leaks was given.
12470 if test "${enable_leaks+set}" = set; then
12471   enableval="$enable_leaks"
12472   if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
12473 else
12474   : ${with_no_leaks:=no}
12475 fi;
12476 echo "$as_me:12476: result: $with_no_leaks" >&5
12477 echo "${ECHO_T}$with_no_leaks" >&6
12478
12479 if test "$with_no_leaks" = yes ; then
12480         cat >>confdefs.h <<\EOF
12481 #define NO_LEAKS 1
12482 EOF
12483
12484         cat >>confdefs.h <<\EOF
12485 #define YY_NO_LEAKS 1
12486 EOF
12487
12488 fi
12489
12490 cat >>confdefs.h <<\EOF
12491 #define HAVE_NC_ALLOC_H 1
12492 EOF
12493
12494 ###     use option --enable-expanded to generate certain macros as functions
12495
12496 # Check whether --enable-expanded or --disable-expanded was given.
12497 if test "${enable_expanded+set}" = set; then
12498   enableval="$enable_expanded"
12499   test "$enableval" = yes && cat >>confdefs.h <<\EOF
12500 #define NCURSES_EXPANDED 1
12501 EOF
12502
12503 fi;
12504
12505 ###     use option --disable-macros to suppress macros in favor of functions
12506
12507 # Check whether --enable-macros or --disable-macros was given.
12508 if test "${enable_macros+set}" = set; then
12509   enableval="$enable_macros"
12510   test "$enableval" = no && cat >>confdefs.h <<\EOF
12511 #define NCURSES_NOMACROS 1
12512 EOF
12513
12514 fi;
12515
12516 # Normally we only add trace() to the debug-library.  Allow this to be
12517 # extended to all models of the ncurses library:
12518 cf_all_traces=no
12519 case "$CFLAGS $CPPFLAGS" in
12520 *-DTRACE*)
12521         cf_all_traces=yes
12522         ;;
12523 esac
12524
12525 echo "$as_me:12525: checking whether to add trace feature to all models" >&5
12526 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
12527
12528 # Check whether --with-trace or --without-trace was given.
12529 if test "${with_trace+set}" = set; then
12530   withval="$with_trace"
12531   cf_with_trace=$withval
12532 else
12533   cf_with_trace=$cf_all_traces
12534 fi;
12535 echo "$as_me:12535: result: $cf_with_trace" >&5
12536 echo "${ECHO_T}$cf_with_trace" >&6
12537
12538 if test "$cf_with_trace" = yes ; then
12539         LIB_TRACING=all
12540         ADA_TRACE=TRUE
12541
12542 cf_fix_cppflags=no
12543 cf_new_cflags=
12544 cf_new_cppflags=
12545 cf_new_extra_cppflags=
12546
12547 for cf_add_cflags in -DTRACE
12548 do
12549 case $cf_fix_cppflags in
12550 no)
12551         case $cf_add_cflags in #(vi
12552         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
12553                 case $cf_add_cflags in
12554                 -D*)
12555                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12556
12557                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12558                                 && test -z "${cf_tst_cflags}" \
12559                                 && cf_fix_cppflags=yes
12560
12561                         if test $cf_fix_cppflags = yes ; then
12562                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12563                                 continue
12564                         elif test "${cf_tst_cflags}" = "\"'" ; then
12565                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12566                                 continue
12567                         fi
12568                         ;;
12569                 esac
12570                 case "$CPPFLAGS" in
12571                 *$cf_add_cflags) #(vi
12572                         ;;
12573                 *) #(vi
12574                         case $cf_add_cflags in #(vi
12575                         -D*)
12576                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12577
12578 CPPFLAGS=`echo "$CPPFLAGS" | \
12579         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12580                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12581
12582                                 ;;
12583                         esac
12584                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12585                         ;;
12586                 esac
12587                 ;;
12588         *)
12589                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12590                 ;;
12591         esac
12592         ;;
12593 yes)
12594         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12595
12596         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12597
12598         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
12599                 && test -z "${cf_tst_cflags}" \
12600                 && cf_fix_cppflags=no
12601         ;;
12602 esac
12603 done
12604
12605 if test -n "$cf_new_cflags" ; then
12606
12607         CFLAGS="$CFLAGS $cf_new_cflags"
12608 fi
12609
12610 if test -n "$cf_new_cppflags" ; then
12611
12612         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12613 fi
12614
12615 if test -n "$cf_new_extra_cppflags" ; then
12616
12617         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12618 fi
12619
12620 else
12621         LIB_TRACING=DEBUG
12622         ADA_TRACE=FALSE
12623 fi
12624
12625 ###     Checks for libraries.
12626 case $cf_cv_system_name in #(vi
12627 *mingw32*) #(vi
12628         ;;
12629 *)
12630 echo "$as_me:12630: checking for gettimeofday" >&5
12631 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
12632 if test "${ac_cv_func_gettimeofday+set}" = set; then
12633   echo $ECHO_N "(cached) $ECHO_C" >&6
12634 else
12635   cat >conftest.$ac_ext <<_ACEOF
12636 #line 12636 "configure"
12637 #include "confdefs.h"
12638 /* System header to define __stub macros and hopefully few prototypes,
12639     which can conflict with char gettimeofday (); below.  */
12640 #include <assert.h>
12641 /* Override any gcc2 internal prototype to avoid an error.  */
12642 #ifdef __cplusplus
12643 extern "C"
12644 #endif
12645 /* We use char because int might match the return type of a gcc2
12646    builtin and then its argument prototype would still apply.  */
12647 char gettimeofday ();
12648 char (*f) ();
12649
12650 int
12651 main ()
12652 {
12653 /* The GNU C library defines this for functions which it implements
12654     to always fail with ENOSYS.  Some functions are actually named
12655     something starting with __ and the normal name is an alias.  */
12656 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
12657 choke me
12658 #else
12659 f = gettimeofday;
12660 #endif
12661
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 rm -f conftest.$ac_objext conftest$ac_exeext
12667 if { (eval echo "$as_me:12667: \"$ac_link\"") >&5
12668   (eval $ac_link) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit $ac_status); } &&
12672          { ac_try='test -s conftest$ac_exeext'
12673   { (eval echo "$as_me:12673: \"$ac_try\"") >&5
12674   (eval $ac_try) 2>&5
12675   ac_status=$?
12676   echo "$as_me:12676: \$? = $ac_status" >&5
12677   (exit $ac_status); }; }; then
12678   ac_cv_func_gettimeofday=yes
12679 else
12680   echo "$as_me: failed program was:" >&5
12681 cat conftest.$ac_ext >&5
12682 ac_cv_func_gettimeofday=no
12683 fi
12684 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12685 fi
12686 echo "$as_me:12686: result: $ac_cv_func_gettimeofday" >&5
12687 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
12688 if test $ac_cv_func_gettimeofday = yes; then
12689   cat >>confdefs.h <<\EOF
12690 #define HAVE_GETTIMEOFDAY 1
12691 EOF
12692
12693 else
12694
12695 echo "$as_me:12695: checking for gettimeofday in -lbsd" >&5
12696 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
12697 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
12698   echo $ECHO_N "(cached) $ECHO_C" >&6
12699 else
12700   ac_check_lib_save_LIBS=$LIBS
12701 LIBS="-lbsd  $LIBS"
12702 cat >conftest.$ac_ext <<_ACEOF
12703 #line 12703 "configure"
12704 #include "confdefs.h"
12705
12706 /* Override any gcc2 internal prototype to avoid an error.  */
12707 #ifdef __cplusplus
12708 extern "C"
12709 #endif
12710 /* We use char because int might match the return type of a gcc2
12711    builtin and then its argument prototype would still apply.  */
12712 char gettimeofday ();
12713 int
12714 main ()
12715 {
12716 gettimeofday ();
12717   ;
12718   return 0;
12719 }
12720 _ACEOF
12721 rm -f conftest.$ac_objext conftest$ac_exeext
12722 if { (eval echo "$as_me:12722: \"$ac_link\"") >&5
12723   (eval $ac_link) 2>&5
12724   ac_status=$?
12725   echo "$as_me:12725: \$? = $ac_status" >&5
12726   (exit $ac_status); } &&
12727          { ac_try='test -s conftest$ac_exeext'
12728   { (eval echo "$as_me:12728: \"$ac_try\"") >&5
12729   (eval $ac_try) 2>&5
12730   ac_status=$?
12731   echo "$as_me:12731: \$? = $ac_status" >&5
12732   (exit $ac_status); }; }; then
12733   ac_cv_lib_bsd_gettimeofday=yes
12734 else
12735   echo "$as_me: failed program was:" >&5
12736 cat conftest.$ac_ext >&5
12737 ac_cv_lib_bsd_gettimeofday=no
12738 fi
12739 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12740 LIBS=$ac_check_lib_save_LIBS
12741 fi
12742 echo "$as_me:12742: result: $ac_cv_lib_bsd_gettimeofday" >&5
12743 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
12744 if test $ac_cv_lib_bsd_gettimeofday = yes; then
12745   cat >>confdefs.h <<\EOF
12746 #define HAVE_GETTIMEOFDAY 1
12747 EOF
12748
12749         LIBS="-lbsd $LIBS"
12750 fi
12751
12752 fi
12753         ;;
12754 esac
12755
12756 echo "$as_me:12756: checking if -lm needed for math functions" >&5
12757 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
12758 if test "${cf_cv_need_libm+set}" = set; then
12759   echo $ECHO_N "(cached) $ECHO_C" >&6
12760 else
12761
12762         cat >conftest.$ac_ext <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765
12766         #include <stdio.h>
12767         #include <math.h>
12768
12769 int
12770 main ()
12771 {
12772 double x = rand(); printf("result = %g\n", sin(x))
12773   ;
12774   return 0;
12775 }
12776 _ACEOF
12777 rm -f conftest.$ac_objext conftest$ac_exeext
12778 if { (eval echo "$as_me:12778: \"$ac_link\"") >&5
12779   (eval $ac_link) 2>&5
12780   ac_status=$?
12781   echo "$as_me:12781: \$? = $ac_status" >&5
12782   (exit $ac_status); } &&
12783          { ac_try='test -s conftest$ac_exeext'
12784   { (eval echo "$as_me:12784: \"$ac_try\"") >&5
12785   (eval $ac_try) 2>&5
12786   ac_status=$?
12787   echo "$as_me:12787: \$? = $ac_status" >&5
12788   (exit $ac_status); }; }; then
12789   cf_cv_need_libm=no
12790 else
12791   echo "$as_me: failed program was:" >&5
12792 cat conftest.$ac_ext >&5
12793 cf_cv_need_libm=yes
12794 fi
12795 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12796 fi
12797 echo "$as_me:12797: result: $cf_cv_need_libm" >&5
12798 echo "${ECHO_T}$cf_cv_need_libm" >&6
12799 if test "$cf_cv_need_libm" = yes
12800 then
12801 MATH_LIB=-lm
12802 fi
12803
12804 ###     Checks for header files.
12805 echo "$as_me:12805: checking for ANSI C header files" >&5
12806 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
12807 if test "${ac_cv_header_stdc+set}" = set; then
12808   echo $ECHO_N "(cached) $ECHO_C" >&6
12809 else
12810   cat >conftest.$ac_ext <<_ACEOF
12811 #line 12811 "configure"
12812 #include "confdefs.h"
12813 #include <stdlib.h>
12814 #include <stdarg.h>
12815 #include <string.h>
12816 #include <float.h>
12817
12818 _ACEOF
12819 if { (eval echo "$as_me:12819: \"$ac_cpp conftest.$ac_ext\"") >&5
12820   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12821   ac_status=$?
12822   egrep -v '^ *\+' conftest.er1 >conftest.err
12823   rm -f conftest.er1
12824   cat conftest.err >&5
12825   echo "$as_me:12825: \$? = $ac_status" >&5
12826   (exit $ac_status); } >/dev/null; then
12827   if test -s conftest.err; then
12828     ac_cpp_err=$ac_c_preproc_warn_flag
12829   else
12830     ac_cpp_err=
12831   fi
12832 else
12833   ac_cpp_err=yes
12834 fi
12835 if test -z "$ac_cpp_err"; then
12836   ac_cv_header_stdc=yes
12837 else
12838   echo "$as_me: failed program was:" >&5
12839   cat conftest.$ac_ext >&5
12840   ac_cv_header_stdc=no
12841 fi
12842 rm -f conftest.err conftest.$ac_ext
12843
12844 if test $ac_cv_header_stdc = yes; then
12845   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12846   cat >conftest.$ac_ext <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 #include <string.h>
12850
12851 _ACEOF
12852 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12853   egrep "memchr" >/dev/null 2>&1; then
12854   :
12855 else
12856   ac_cv_header_stdc=no
12857 fi
12858 rm -rf conftest*
12859
12860 fi
12861
12862 if test $ac_cv_header_stdc = yes; then
12863   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12864   cat >conftest.$ac_ext <<_ACEOF
12865 #line 12865 "configure"
12866 #include "confdefs.h"
12867 #include <stdlib.h>
12868
12869 _ACEOF
12870 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12871   egrep "free" >/dev/null 2>&1; then
12872   :
12873 else
12874   ac_cv_header_stdc=no
12875 fi
12876 rm -rf conftest*
12877
12878 fi
12879
12880 if test $ac_cv_header_stdc = yes; then
12881   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12882   if test "$cross_compiling" = yes; then
12883   :
12884 else
12885   cat >conftest.$ac_ext <<_ACEOF
12886 #line 12886 "configure"
12887 #include "confdefs.h"
12888 #include <ctype.h>
12889 #if ((' ' & 0x0FF) == 0x020)
12890 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12891 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12892 #else
12893 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
12894                      || ('j' <= (c) && (c) <= 'r') \
12895                      || ('s' <= (c) && (c) <= 'z'))
12896 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12897 #endif
12898
12899 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12900 int
12901 main ()
12902 {
12903   int i;
12904   for (i = 0; i < 256; i++)
12905     if (XOR (islower (i), ISLOWER (i))
12906         || toupper (i) != TOUPPER (i))
12907       $ac_main_return(2);
12908   $ac_main_return (0);
12909 }
12910 _ACEOF
12911 rm -f conftest$ac_exeext
12912 if { (eval echo "$as_me:12912: \"$ac_link\"") >&5
12913   (eval $ac_link) 2>&5
12914   ac_status=$?
12915   echo "$as_me:12915: \$? = $ac_status" >&5
12916   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12917   { (eval echo "$as_me:12917: \"$ac_try\"") >&5
12918   (eval $ac_try) 2>&5
12919   ac_status=$?
12920   echo "$as_me:12920: \$? = $ac_status" >&5
12921   (exit $ac_status); }; }; then
12922   :
12923 else
12924   echo "$as_me: program exited with status $ac_status" >&5
12925 echo "$as_me: failed program was:" >&5
12926 cat conftest.$ac_ext >&5
12927 ac_cv_header_stdc=no
12928 fi
12929 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12930 fi
12931 fi
12932 fi
12933 echo "$as_me:12933: result: $ac_cv_header_stdc" >&5
12934 echo "${ECHO_T}$ac_cv_header_stdc" >&6
12935 if test $ac_cv_header_stdc = yes; then
12936
12937 cat >>confdefs.h <<\EOF
12938 #define STDC_HEADERS 1
12939 EOF
12940
12941 fi
12942
12943 ac_header_dirent=no
12944 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
12945   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
12946 echo "$as_me:12946: checking for $ac_hdr that defines DIR" >&5
12947 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
12948 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12949   echo $ECHO_N "(cached) $ECHO_C" >&6
12950 else
12951   cat >conftest.$ac_ext <<_ACEOF
12952 #line 12952 "configure"
12953 #include "confdefs.h"
12954 #include <sys/types.h>
12955 #include <$ac_hdr>
12956
12957 int
12958 main ()
12959 {
12960 if ((DIR *) 0)
12961 return 0;
12962   ;
12963   return 0;
12964 }
12965 _ACEOF
12966 rm -f conftest.$ac_objext
12967 if { (eval echo "$as_me:12967: \"$ac_compile\"") >&5
12968   (eval $ac_compile) 2>&5
12969   ac_status=$?
12970   echo "$as_me:12970: \$? = $ac_status" >&5
12971   (exit $ac_status); } &&
12972          { ac_try='test -s conftest.$ac_objext'
12973   { (eval echo "$as_me:12973: \"$ac_try\"") >&5
12974   (eval $ac_try) 2>&5
12975   ac_status=$?
12976   echo "$as_me:12976: \$? = $ac_status" >&5
12977   (exit $ac_status); }; }; then
12978   eval "$as_ac_Header=yes"
12979 else
12980   echo "$as_me: failed program was:" >&5
12981 cat conftest.$ac_ext >&5
12982 eval "$as_ac_Header=no"
12983 fi
12984 rm -f conftest.$ac_objext conftest.$ac_ext
12985 fi
12986 echo "$as_me:12986: result: `eval echo '${'$as_ac_Header'}'`" >&5
12987 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12988 if test `eval echo '${'$as_ac_Header'}'` = yes; then
12989   cat >>confdefs.h <<EOF
12990 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
12991 EOF
12992
12993 ac_header_dirent=$ac_hdr; break
12994 fi
12995
12996 done
12997 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
12998 if test $ac_header_dirent = dirent.h; then
12999   echo "$as_me:12999: checking for opendir in -ldir" >&5
13000 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
13001 if test "${ac_cv_lib_dir_opendir+set}" = set; then
13002   echo $ECHO_N "(cached) $ECHO_C" >&6
13003 else
13004   ac_check_lib_save_LIBS=$LIBS
13005 LIBS="-ldir  $LIBS"
13006 cat >conftest.$ac_ext <<_ACEOF
13007 #line 13007 "configure"
13008 #include "confdefs.h"
13009
13010 /* Override any gcc2 internal prototype to avoid an error.  */
13011 #ifdef __cplusplus
13012 extern "C"
13013 #endif
13014 /* We use char because int might match the return type of a gcc2
13015    builtin and then its argument prototype would still apply.  */
13016 char opendir ();
13017 int
13018 main ()
13019 {
13020 opendir ();
13021   ;
13022   return 0;
13023 }
13024 _ACEOF
13025 rm -f conftest.$ac_objext conftest$ac_exeext
13026 if { (eval echo "$as_me:13026: \"$ac_link\"") >&5
13027   (eval $ac_link) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit $ac_status); } &&
13031          { ac_try='test -s conftest$ac_exeext'
13032   { (eval echo "$as_me:13032: \"$ac_try\"") >&5
13033   (eval $ac_try) 2>&5
13034   ac_status=$?
13035   echo "$as_me:13035: \$? = $ac_status" >&5
13036   (exit $ac_status); }; }; then
13037   ac_cv_lib_dir_opendir=yes
13038 else
13039   echo "$as_me: failed program was:" >&5
13040 cat conftest.$ac_ext >&5
13041 ac_cv_lib_dir_opendir=no
13042 fi
13043 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13044 LIBS=$ac_check_lib_save_LIBS
13045 fi
13046 echo "$as_me:13046: result: $ac_cv_lib_dir_opendir" >&5
13047 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
13048 if test $ac_cv_lib_dir_opendir = yes; then
13049   LIBS="$LIBS -ldir"
13050 fi
13051
13052 else
13053   echo "$as_me:13053: checking for opendir in -lx" >&5
13054 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
13055 if test "${ac_cv_lib_x_opendir+set}" = set; then
13056   echo $ECHO_N "(cached) $ECHO_C" >&6
13057 else
13058   ac_check_lib_save_LIBS=$LIBS
13059 LIBS="-lx  $LIBS"
13060 cat >conftest.$ac_ext <<_ACEOF
13061 #line 13061 "configure"
13062 #include "confdefs.h"
13063
13064 /* Override any gcc2 internal prototype to avoid an error.  */
13065 #ifdef __cplusplus
13066 extern "C"
13067 #endif
13068 /* We use char because int might match the return type of a gcc2
13069    builtin and then its argument prototype would still apply.  */
13070 char opendir ();
13071 int
13072 main ()
13073 {
13074 opendir ();
13075   ;
13076   return 0;
13077 }
13078 _ACEOF
13079 rm -f conftest.$ac_objext conftest$ac_exeext
13080 if { (eval echo "$as_me:13080: \"$ac_link\"") >&5
13081   (eval $ac_link) 2>&5
13082   ac_status=$?
13083   echo "$as_me:13083: \$? = $ac_status" >&5
13084   (exit $ac_status); } &&
13085          { ac_try='test -s conftest$ac_exeext'
13086   { (eval echo "$as_me:13086: \"$ac_try\"") >&5
13087   (eval $ac_try) 2>&5
13088   ac_status=$?
13089   echo "$as_me:13089: \$? = $ac_status" >&5
13090   (exit $ac_status); }; }; then
13091   ac_cv_lib_x_opendir=yes
13092 else
13093   echo "$as_me: failed program was:" >&5
13094 cat conftest.$ac_ext >&5
13095 ac_cv_lib_x_opendir=no
13096 fi
13097 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13098 LIBS=$ac_check_lib_save_LIBS
13099 fi
13100 echo "$as_me:13100: result: $ac_cv_lib_x_opendir" >&5
13101 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
13102 if test $ac_cv_lib_x_opendir = yes; then
13103   LIBS="$LIBS -lx"
13104 fi
13105
13106 fi
13107
13108 echo "$as_me:13108: checking whether time.h and sys/time.h may both be included" >&5
13109 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
13110 if test "${ac_cv_header_time+set}" = set; then
13111   echo $ECHO_N "(cached) $ECHO_C" >&6
13112 else
13113   cat >conftest.$ac_ext <<_ACEOF
13114 #line 13114 "configure"
13115 #include "confdefs.h"
13116 #include <sys/types.h>
13117 #include <sys/time.h>
13118 #include <time.h>
13119
13120 int
13121 main ()
13122 {
13123 if ((struct tm *) 0)
13124 return 0;
13125   ;
13126   return 0;
13127 }
13128 _ACEOF
13129 rm -f conftest.$ac_objext
13130 if { (eval echo "$as_me:13130: \"$ac_compile\"") >&5
13131   (eval $ac_compile) 2>&5
13132   ac_status=$?
13133   echo "$as_me:13133: \$? = $ac_status" >&5
13134   (exit $ac_status); } &&
13135          { ac_try='test -s conftest.$ac_objext'
13136   { (eval echo "$as_me:13136: \"$ac_try\"") >&5
13137   (eval $ac_try) 2>&5
13138   ac_status=$?
13139   echo "$as_me:13139: \$? = $ac_status" >&5
13140   (exit $ac_status); }; }; then
13141   ac_cv_header_time=yes
13142 else
13143   echo "$as_me: failed program was:" >&5
13144 cat conftest.$ac_ext >&5
13145 ac_cv_header_time=no
13146 fi
13147 rm -f conftest.$ac_objext conftest.$ac_ext
13148 fi
13149 echo "$as_me:13149: result: $ac_cv_header_time" >&5
13150 echo "${ECHO_T}$ac_cv_header_time" >&6
13151 if test $ac_cv_header_time = yes; then
13152
13153 cat >>confdefs.h <<\EOF
13154 #define TIME_WITH_SYS_TIME 1
13155 EOF
13156
13157 fi
13158
13159 cf_regex_func=no
13160
13161 cf_regex_libs="regex re"
13162 case $host_os in #(vi
13163 mingw*)
13164         cf_regex_libs="regex.dll $cf_regex_libs"
13165         ;;
13166 esac
13167
13168 echo "$as_me:13168: checking for regcomp" >&5
13169 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
13170 if test "${ac_cv_func_regcomp+set}" = set; then
13171   echo $ECHO_N "(cached) $ECHO_C" >&6
13172 else
13173   cat >conftest.$ac_ext <<_ACEOF
13174 #line 13174 "configure"
13175 #include "confdefs.h"
13176 /* System header to define __stub macros and hopefully few prototypes,
13177     which can conflict with char regcomp (); below.  */
13178 #include <assert.h>
13179 /* Override any gcc2 internal prototype to avoid an error.  */
13180 #ifdef __cplusplus
13181 extern "C"
13182 #endif
13183 /* We use char because int might match the return type of a gcc2
13184    builtin and then its argument prototype would still apply.  */
13185 char regcomp ();
13186 char (*f) ();
13187
13188 int
13189 main ()
13190 {
13191 /* The GNU C library defines this for functions which it implements
13192     to always fail with ENOSYS.  Some functions are actually named
13193     something starting with __ and the normal name is an alias.  */
13194 #if defined (__stub_regcomp) || defined (__stub___regcomp)
13195 choke me
13196 #else
13197 f = regcomp;
13198 #endif
13199
13200   ;
13201   return 0;
13202 }
13203 _ACEOF
13204 rm -f conftest.$ac_objext conftest$ac_exeext
13205 if { (eval echo "$as_me:13205: \"$ac_link\"") >&5
13206   (eval $ac_link) 2>&5
13207   ac_status=$?
13208   echo "$as_me:13208: \$? = $ac_status" >&5
13209   (exit $ac_status); } &&
13210          { ac_try='test -s conftest$ac_exeext'
13211   { (eval echo "$as_me:13211: \"$ac_try\"") >&5
13212   (eval $ac_try) 2>&5
13213   ac_status=$?
13214   echo "$as_me:13214: \$? = $ac_status" >&5
13215   (exit $ac_status); }; }; then
13216   ac_cv_func_regcomp=yes
13217 else
13218   echo "$as_me: failed program was:" >&5
13219 cat conftest.$ac_ext >&5
13220 ac_cv_func_regcomp=no
13221 fi
13222 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13223 fi
13224 echo "$as_me:13224: result: $ac_cv_func_regcomp" >&5
13225 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
13226 if test $ac_cv_func_regcomp = yes; then
13227   cf_regex_func=regcomp
13228 else
13229
13230         for cf_regex_lib in $cf_regex_libs
13231         do
13232                 as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
13233 echo "$as_me:13233: checking for regcomp in -l$cf_regex_lib" >&5
13234 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
13235 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
13236   echo $ECHO_N "(cached) $ECHO_C" >&6
13237 else
13238   ac_check_lib_save_LIBS=$LIBS
13239 LIBS="-l$cf_regex_lib  $LIBS"
13240 cat >conftest.$ac_ext <<_ACEOF
13241 #line 13241 "configure"
13242 #include "confdefs.h"
13243
13244 /* Override any gcc2 internal prototype to avoid an error.  */
13245 #ifdef __cplusplus
13246 extern "C"
13247 #endif
13248 /* We use char because int might match the return type of a gcc2
13249    builtin and then its argument prototype would still apply.  */
13250 char regcomp ();
13251 int
13252 main ()
13253 {
13254 regcomp ();
13255   ;
13256   return 0;
13257 }
13258 _ACEOF
13259 rm -f conftest.$ac_objext conftest$ac_exeext
13260 if { (eval echo "$as_me:13260: \"$ac_link\"") >&5
13261   (eval $ac_link) 2>&5
13262   ac_status=$?
13263   echo "$as_me:13263: \$? = $ac_status" >&5
13264   (exit $ac_status); } &&
13265          { ac_try='test -s conftest$ac_exeext'
13266   { (eval echo "$as_me:13266: \"$ac_try\"") >&5
13267   (eval $ac_try) 2>&5
13268   ac_status=$?
13269   echo "$as_me:13269: \$? = $ac_status" >&5
13270   (exit $ac_status); }; }; then
13271   eval "$as_ac_Lib=yes"
13272 else
13273   echo "$as_me: failed program was:" >&5
13274 cat conftest.$ac_ext >&5
13275 eval "$as_ac_Lib=no"
13276 fi
13277 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13278 LIBS=$ac_check_lib_save_LIBS
13279 fi
13280 echo "$as_me:13280: result: `eval echo '${'$as_ac_Lib'}'`" >&5
13281 echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
13282 if test `eval echo '${'$as_ac_Lib'}'` = yes; then
13283
13284                                 LIBS="-l$cf_regex_lib $LIBS"
13285                                 cf_regex_func=regcomp
13286                                 break
13287 fi
13288
13289         done
13290
13291 fi
13292
13293 if test "$cf_regex_func" = no ; then
13294         echo "$as_me:13294: checking for compile" >&5
13295 echo $ECHO_N "checking for compile... $ECHO_C" >&6
13296 if test "${ac_cv_func_compile+set}" = set; then
13297   echo $ECHO_N "(cached) $ECHO_C" >&6
13298 else
13299   cat >conftest.$ac_ext <<_ACEOF
13300 #line 13300 "configure"
13301 #include "confdefs.h"
13302 /* System header to define __stub macros and hopefully few prototypes,
13303     which can conflict with char compile (); below.  */
13304 #include <assert.h>
13305 /* Override any gcc2 internal prototype to avoid an error.  */
13306 #ifdef __cplusplus
13307 extern "C"
13308 #endif
13309 /* We use char because int might match the return type of a gcc2
13310    builtin and then its argument prototype would still apply.  */
13311 char compile ();
13312 char (*f) ();
13313
13314 int
13315 main ()
13316 {
13317 /* The GNU C library defines this for functions which it implements
13318     to always fail with ENOSYS.  Some functions are actually named
13319     something starting with __ and the normal name is an alias.  */
13320 #if defined (__stub_compile) || defined (__stub___compile)
13321 choke me
13322 #else
13323 f = compile;
13324 #endif
13325
13326   ;
13327   return 0;
13328 }
13329 _ACEOF
13330 rm -f conftest.$ac_objext conftest$ac_exeext
13331 if { (eval echo "$as_me:13331: \"$ac_link\"") >&5
13332   (eval $ac_link) 2>&5
13333   ac_status=$?
13334   echo "$as_me:13334: \$? = $ac_status" >&5
13335   (exit $ac_status); } &&
13336          { ac_try='test -s conftest$ac_exeext'
13337   { (eval echo "$as_me:13337: \"$ac_try\"") >&5
13338   (eval $ac_try) 2>&5
13339   ac_status=$?
13340   echo "$as_me:13340: \$? = $ac_status" >&5
13341   (exit $ac_status); }; }; then
13342   ac_cv_func_compile=yes
13343 else
13344   echo "$as_me: failed program was:" >&5
13345 cat conftest.$ac_ext >&5
13346 ac_cv_func_compile=no
13347 fi
13348 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13349 fi
13350 echo "$as_me:13350: result: $ac_cv_func_compile" >&5
13351 echo "${ECHO_T}$ac_cv_func_compile" >&6
13352 if test $ac_cv_func_compile = yes; then
13353   cf_regex_func=compile
13354 else
13355
13356                 echo "$as_me:13356: checking for compile in -lgen" >&5
13357 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
13358 if test "${ac_cv_lib_gen_compile+set}" = set; then
13359   echo $ECHO_N "(cached) $ECHO_C" >&6
13360 else
13361   ac_check_lib_save_LIBS=$LIBS
13362 LIBS="-lgen  $LIBS"
13363 cat >conftest.$ac_ext <<_ACEOF
13364 #line 13364 "configure"
13365 #include "confdefs.h"
13366
13367 /* Override any gcc2 internal prototype to avoid an error.  */
13368 #ifdef __cplusplus
13369 extern "C"
13370 #endif
13371 /* We use char because int might match the return type of a gcc2
13372    builtin and then its argument prototype would still apply.  */
13373 char compile ();
13374 int
13375 main ()
13376 {
13377 compile ();
13378   ;
13379   return 0;
13380 }
13381 _ACEOF
13382 rm -f conftest.$ac_objext conftest$ac_exeext
13383 if { (eval echo "$as_me:13383: \"$ac_link\"") >&5
13384   (eval $ac_link) 2>&5
13385   ac_status=$?
13386   echo "$as_me:13386: \$? = $ac_status" >&5
13387   (exit $ac_status); } &&
13388          { ac_try='test -s conftest$ac_exeext'
13389   { (eval echo "$as_me:13389: \"$ac_try\"") >&5
13390   (eval $ac_try) 2>&5
13391   ac_status=$?
13392   echo "$as_me:13392: \$? = $ac_status" >&5
13393   (exit $ac_status); }; }; then
13394   ac_cv_lib_gen_compile=yes
13395 else
13396   echo "$as_me: failed program was:" >&5
13397 cat conftest.$ac_ext >&5
13398 ac_cv_lib_gen_compile=no
13399 fi
13400 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13401 LIBS=$ac_check_lib_save_LIBS
13402 fi
13403 echo "$as_me:13403: result: $ac_cv_lib_gen_compile" >&5
13404 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
13405 if test $ac_cv_lib_gen_compile = yes; then
13406
13407                                 LIBS="-lgen $LIBS"
13408                                 cf_regex_func=compile
13409 fi
13410
13411 fi
13412
13413 fi
13414
13415 if test "$cf_regex_func" = no ; then
13416         { echo "$as_me:13416: WARNING: cannot find regular expression library" >&5
13417 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
13418 fi
13419
13420 echo "$as_me:13420: checking for regular-expression headers" >&5
13421 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
13422 if test "${cf_cv_regex_hdrs+set}" = set; then
13423   echo $ECHO_N "(cached) $ECHO_C" >&6
13424 else
13425
13426 cf_cv_regex_hdrs=no
13427 case $cf_regex_func in #(vi
13428 compile) #(vi
13429         for cf_regex_hdr in regexp.h regexpr.h
13430         do
13431                 cat >conftest.$ac_ext <<_ACEOF
13432 #line 13432 "configure"
13433 #include "confdefs.h"
13434 #include <$cf_regex_hdr>
13435 int
13436 main ()
13437 {
13438
13439                         char *p = compile("", "", "", 0);
13440                         int x = step("", "");
13441
13442   ;
13443   return 0;
13444 }
13445 _ACEOF
13446 rm -f conftest.$ac_objext conftest$ac_exeext
13447 if { (eval echo "$as_me:13447: \"$ac_link\"") >&5
13448   (eval $ac_link) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit $ac_status); } &&
13452          { ac_try='test -s conftest$ac_exeext'
13453   { (eval echo "$as_me:13453: \"$ac_try\"") >&5
13454   (eval $ac_try) 2>&5
13455   ac_status=$?
13456   echo "$as_me:13456: \$? = $ac_status" >&5
13457   (exit $ac_status); }; }; then
13458
13459                         cf_cv_regex_hdrs=$cf_regex_hdr
13460                         break
13461
13462 else
13463   echo "$as_me: failed program was:" >&5
13464 cat conftest.$ac_ext >&5
13465 fi
13466 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13467         done
13468         ;;
13469 *)
13470         for cf_regex_hdr in regex.h
13471         do
13472                 cat >conftest.$ac_ext <<_ACEOF
13473 #line 13473 "configure"
13474 #include "confdefs.h"
13475 #include <sys/types.h>
13476 #include <$cf_regex_hdr>
13477 int
13478 main ()
13479 {
13480
13481                         regex_t *p;
13482                         int x = regcomp(p, "", 0);
13483                         int y = regexec(p, "", 0, 0, 0);
13484                         regfree(p);
13485
13486   ;
13487   return 0;
13488 }
13489 _ACEOF
13490 rm -f conftest.$ac_objext conftest$ac_exeext
13491 if { (eval echo "$as_me:13491: \"$ac_link\"") >&5
13492   (eval $ac_link) 2>&5
13493   ac_status=$?
13494   echo "$as_me:13494: \$? = $ac_status" >&5
13495   (exit $ac_status); } &&
13496          { ac_try='test -s conftest$ac_exeext'
13497   { (eval echo "$as_me:13497: \"$ac_try\"") >&5
13498   (eval $ac_try) 2>&5
13499   ac_status=$?
13500   echo "$as_me:13500: \$? = $ac_status" >&5
13501   (exit $ac_status); }; }; then
13502
13503                         cf_cv_regex_hdrs=$cf_regex_hdr
13504                         break
13505
13506 else
13507   echo "$as_me: failed program was:" >&5
13508 cat conftest.$ac_ext >&5
13509 fi
13510 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13511         done
13512         ;;
13513 esac
13514
13515 fi
13516 echo "$as_me:13516: result: $cf_cv_regex_hdrs" >&5
13517 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
13518
13519 case $cf_cv_regex_hdrs in #(vi
13520     no)        { echo "$as_me:13520: WARNING: no regular expression header found" >&5
13521 echo "$as_me: WARNING: no regular expression header found" >&2;} ;; #(vi
13522     regex.h)   cat >>confdefs.h <<\EOF
13523 #define HAVE_REGEX_H_FUNCS 1
13524 EOF
13525  ;; #(vi
13526     regexp.h)  cat >>confdefs.h <<\EOF
13527 #define HAVE_REGEXP_H_FUNCS 1
13528 EOF
13529  ;; #(vi
13530     regexpr.h) cat >>confdefs.h <<\EOF
13531 #define HAVE_REGEXPR_H_FUNCS 1
13532 EOF
13533  ;;
13534 esac
13535
13536 for ac_header in \
13537 fcntl.h \
13538 getopt.h \
13539 limits.h \
13540 locale.h \
13541 math.h \
13542 poll.h \
13543 sys/bsdtypes.h \
13544 sys/ioctl.h \
13545 sys/param.h \
13546 sys/poll.h \
13547 sys/select.h \
13548 sys/time.h \
13549 sys/times.h \
13550 ttyent.h \
13551 unistd.h \
13552 wctype.h \
13553
13554 do
13555 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13556 echo "$as_me:13556: checking for $ac_header" >&5
13557 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13558 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13559   echo $ECHO_N "(cached) $ECHO_C" >&6
13560 else
13561   cat >conftest.$ac_ext <<_ACEOF
13562 #line 13562 "configure"
13563 #include "confdefs.h"
13564 #include <$ac_header>
13565 _ACEOF
13566 if { (eval echo "$as_me:13566: \"$ac_cpp conftest.$ac_ext\"") >&5
13567   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13568   ac_status=$?
13569   egrep -v '^ *\+' conftest.er1 >conftest.err
13570   rm -f conftest.er1
13571   cat conftest.err >&5
13572   echo "$as_me:13572: \$? = $ac_status" >&5
13573   (exit $ac_status); } >/dev/null; then
13574   if test -s conftest.err; then
13575     ac_cpp_err=$ac_c_preproc_warn_flag
13576   else
13577     ac_cpp_err=
13578   fi
13579 else
13580   ac_cpp_err=yes
13581 fi
13582 if test -z "$ac_cpp_err"; then
13583   eval "$as_ac_Header=yes"
13584 else
13585   echo "$as_me: failed program was:" >&5
13586   cat conftest.$ac_ext >&5
13587   eval "$as_ac_Header=no"
13588 fi
13589 rm -f conftest.err conftest.$ac_ext
13590 fi
13591 echo "$as_me:13591: result: `eval echo '${'$as_ac_Header'}'`" >&5
13592 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13593 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13594   cat >>confdefs.h <<EOF
13595 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13596 EOF
13597
13598 fi
13599 done
13600
13601 for ac_header in unistd.h getopt.h
13602 do
13603 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13604 echo "$as_me:13604: checking for $ac_header" >&5
13605 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13606 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13607   echo $ECHO_N "(cached) $ECHO_C" >&6
13608 else
13609   cat >conftest.$ac_ext <<_ACEOF
13610 #line 13610 "configure"
13611 #include "confdefs.h"
13612 #include <$ac_header>
13613 _ACEOF
13614 if { (eval echo "$as_me:13614: \"$ac_cpp conftest.$ac_ext\"") >&5
13615   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13616   ac_status=$?
13617   egrep -v '^ *\+' conftest.er1 >conftest.err
13618   rm -f conftest.er1
13619   cat conftest.err >&5
13620   echo "$as_me:13620: \$? = $ac_status" >&5
13621   (exit $ac_status); } >/dev/null; then
13622   if test -s conftest.err; then
13623     ac_cpp_err=$ac_c_preproc_warn_flag
13624   else
13625     ac_cpp_err=
13626   fi
13627 else
13628   ac_cpp_err=yes
13629 fi
13630 if test -z "$ac_cpp_err"; then
13631   eval "$as_ac_Header=yes"
13632 else
13633   echo "$as_me: failed program was:" >&5
13634   cat conftest.$ac_ext >&5
13635   eval "$as_ac_Header=no"
13636 fi
13637 rm -f conftest.err conftest.$ac_ext
13638 fi
13639 echo "$as_me:13639: result: `eval echo '${'$as_ac_Header'}'`" >&5
13640 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13641 if test `eval echo '${'$as_ac_Header'}'` = yes; then
13642   cat >>confdefs.h <<EOF
13643 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13644 EOF
13645
13646 fi
13647 done
13648
13649 echo "$as_me:13649: checking for header declaring getopt variables" >&5
13650 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
13651 if test "${cf_cv_getopt_header+set}" = set; then
13652   echo $ECHO_N "(cached) $ECHO_C" >&6
13653 else
13654
13655 cf_cv_getopt_header=none
13656 for cf_header in stdio.h stdlib.h unistd.h getopt.h
13657 do
13658 cat >conftest.$ac_ext <<_ACEOF
13659 #line 13659 "configure"
13660 #include "confdefs.h"
13661
13662 #include <$cf_header>
13663 int
13664 main ()
13665 {
13666 int x = optind; char *y = optarg
13667   ;
13668   return 0;
13669 }
13670 _ACEOF
13671 rm -f conftest.$ac_objext
13672 if { (eval echo "$as_me:13672: \"$ac_compile\"") >&5
13673   (eval $ac_compile) 2>&5
13674   ac_status=$?
13675   echo "$as_me:13675: \$? = $ac_status" >&5
13676   (exit $ac_status); } &&
13677          { ac_try='test -s conftest.$ac_objext'
13678   { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679   (eval $ac_try) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit $ac_status); }; }; then
13683   cf_cv_getopt_header=$cf_header
13684  break
13685 else
13686   echo "$as_me: failed program was:" >&5
13687 cat conftest.$ac_ext >&5
13688 fi
13689 rm -f conftest.$ac_objext conftest.$ac_ext
13690 done
13691
13692 fi
13693 echo "$as_me:13693: result: $cf_cv_getopt_header" >&5
13694 echo "${ECHO_T}$cf_cv_getopt_header" >&6
13695 if test $cf_cv_getopt_header != none ; then
13696         cat >>confdefs.h <<\EOF
13697 #define HAVE_GETOPT_HEADER 1
13698 EOF
13699
13700 fi
13701
13702 # check for ISC (this may also define _POSIX_SOURCE)
13703 # Note: even non-Posix ISC needs <sys/bsdtypes.h> to declare fd_set
13704 if test "$ISC" = yes ; then
13705
13706 echo "$as_me:13706: checking for main in -lcposix" >&5
13707 echo $ECHO_N "checking for main in -lcposix... $ECHO_C" >&6
13708 if test "${ac_cv_lib_cposix_main+set}" = set; then
13709   echo $ECHO_N "(cached) $ECHO_C" >&6
13710 else
13711   ac_check_lib_save_LIBS=$LIBS
13712 LIBS="-lcposix  $LIBS"
13713 cat >conftest.$ac_ext <<_ACEOF
13714 #line 13714 "configure"
13715 #include "confdefs.h"
13716
13717 int
13718 main ()
13719 {
13720 main ();
13721   ;
13722   return 0;
13723 }
13724 _ACEOF
13725 rm -f conftest.$ac_objext conftest$ac_exeext
13726 if { (eval echo "$as_me:13726: \"$ac_link\"") >&5
13727   (eval $ac_link) 2>&5
13728   ac_status=$?
13729   echo "$as_me:13729: \$? = $ac_status" >&5
13730   (exit $ac_status); } &&
13731          { ac_try='test -s conftest$ac_exeext'
13732   { (eval echo "$as_me:13732: \"$ac_try\"") >&5
13733   (eval $ac_try) 2>&5
13734   ac_status=$?
13735   echo "$as_me:13735: \$? = $ac_status" >&5
13736   (exit $ac_status); }; }; then
13737   ac_cv_lib_cposix_main=yes
13738 else
13739   echo "$as_me: failed program was:" >&5
13740 cat conftest.$ac_ext >&5
13741 ac_cv_lib_cposix_main=no
13742 fi
13743 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13744 LIBS=$ac_check_lib_save_LIBS
13745 fi
13746 echo "$as_me:13746: result: $ac_cv_lib_cposix_main" >&5
13747 echo "${ECHO_T}$ac_cv_lib_cposix_main" >&6
13748 if test $ac_cv_lib_cposix_main = yes; then
13749   cat >>confdefs.h <<EOF
13750 #define HAVE_LIBCPOSIX 1
13751 EOF
13752
13753   LIBS="-lcposix $LIBS"
13754
13755 fi
13756
13757         echo "$as_me:13757: checking for bzero in -linet" >&5
13758 echo $ECHO_N "checking for bzero in -linet... $ECHO_C" >&6
13759 if test "${ac_cv_lib_inet_bzero+set}" = set; then
13760   echo $ECHO_N "(cached) $ECHO_C" >&6
13761 else
13762   ac_check_lib_save_LIBS=$LIBS
13763 LIBS="-linet  $LIBS"
13764 cat >conftest.$ac_ext <<_ACEOF
13765 #line 13765 "configure"
13766 #include "confdefs.h"
13767
13768 /* Override any gcc2 internal prototype to avoid an error.  */
13769 #ifdef __cplusplus
13770 extern "C"
13771 #endif
13772 /* We use char because int might match the return type of a gcc2
13773    builtin and then its argument prototype would still apply.  */
13774 char bzero ();
13775 int
13776 main ()
13777 {
13778 bzero ();
13779   ;
13780   return 0;
13781 }
13782 _ACEOF
13783 rm -f conftest.$ac_objext conftest$ac_exeext
13784 if { (eval echo "$as_me:13784: \"$ac_link\"") >&5
13785   (eval $ac_link) 2>&5
13786   ac_status=$?
13787   echo "$as_me:13787: \$? = $ac_status" >&5
13788   (exit $ac_status); } &&
13789          { ac_try='test -s conftest$ac_exeext'
13790   { (eval echo "$as_me:13790: \"$ac_try\"") >&5
13791   (eval $ac_try) 2>&5
13792   ac_status=$?
13793   echo "$as_me:13793: \$? = $ac_status" >&5
13794   (exit $ac_status); }; }; then
13795   ac_cv_lib_inet_bzero=yes
13796 else
13797   echo "$as_me: failed program was:" >&5
13798 cat conftest.$ac_ext >&5
13799 ac_cv_lib_inet_bzero=no
13800 fi
13801 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13802 LIBS=$ac_check_lib_save_LIBS
13803 fi
13804 echo "$as_me:13804: result: $ac_cv_lib_inet_bzero" >&5
13805 echo "${ECHO_T}$ac_cv_lib_inet_bzero" >&6
13806 if test $ac_cv_lib_inet_bzero = yes; then
13807   LIBS="-linet $LIBS"
13808 fi
13809 fi
13810
13811 echo "$as_me:13811: checking if sys/time.h works with sys/select.h" >&5
13812 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
13813 if test "${cf_cv_sys_time_select+set}" = set; then
13814   echo $ECHO_N "(cached) $ECHO_C" >&6
13815 else
13816
13817 cat >conftest.$ac_ext <<_ACEOF
13818 #line 13818 "configure"
13819 #include "confdefs.h"
13820
13821 #include <sys/types.h>
13822 #ifdef HAVE_SYS_TIME_H
13823 #include <sys/time.h>
13824 #endif
13825 #ifdef HAVE_SYS_SELECT_H
13826 #include <sys/select.h>
13827 #endif
13828
13829 int
13830 main ()
13831 {
13832
13833   ;
13834   return 0;
13835 }
13836 _ACEOF
13837 rm -f conftest.$ac_objext
13838 if { (eval echo "$as_me:13838: \"$ac_compile\"") >&5
13839   (eval $ac_compile) 2>&5
13840   ac_status=$?
13841   echo "$as_me:13841: \$? = $ac_status" >&5
13842   (exit $ac_status); } &&
13843          { ac_try='test -s conftest.$ac_objext'
13844   { (eval echo "$as_me:13844: \"$ac_try\"") >&5
13845   (eval $ac_try) 2>&5
13846   ac_status=$?
13847   echo "$as_me:13847: \$? = $ac_status" >&5
13848   (exit $ac_status); }; }; then
13849   cf_cv_sys_time_select=yes
13850 else
13851   echo "$as_me: failed program was:" >&5
13852 cat conftest.$ac_ext >&5
13853 cf_cv_sys_time_select=no
13854 fi
13855 rm -f conftest.$ac_objext conftest.$ac_ext
13856
13857 fi
13858
13859 echo "$as_me:13859: result: $cf_cv_sys_time_select" >&5
13860 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
13861 test "$cf_cv_sys_time_select" = yes && cat >>confdefs.h <<\EOF
13862 #define HAVE_SYS_TIME_SELECT 1
13863 EOF
13864
13865 ###     checks for compiler characteristics
13866 ac_ext=c
13867 ac_cpp='$CPP $CPPFLAGS'
13868 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13869 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13870 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13871 ac_main_return=return
13872
13873 echo "$as_me:13873: checking for $CC option to accept ANSI C" >&5
13874 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
13875 if test "${ac_cv_prog_cc_stdc+set}" = set; then
13876   echo $ECHO_N "(cached) $ECHO_C" >&6
13877 else
13878   ac_cv_prog_cc_stdc=no
13879 ac_save_CC=$CC
13880 cat >conftest.$ac_ext <<_ACEOF
13881 #line 13881 "configure"
13882 #include "confdefs.h"
13883 #include <stdarg.h>
13884 #include <stdio.h>
13885 #include <sys/types.h>
13886 #include <sys/stat.h>
13887 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
13888 struct buf { int x; };
13889 FILE * (*rcsopen) (struct buf *, struct stat *, int);
13890 static char *e (p, i)
13891      char **p;
13892      int i;
13893 {
13894   return p[i];
13895 }
13896 static char *f (char * (*g) (char **, int), char **p, ...)
13897 {
13898   char *s;
13899   va_list v;
13900   va_start (v,p);
13901   s = g (p, va_arg (v,int));
13902   va_end (v);
13903   return s;
13904 }
13905 int test (int i, double x);
13906 struct s1 {int (*f) (int a);};
13907 struct s2 {int (*f) (double a);};
13908 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
13909 int argc;
13910 char **argv;
13911 int
13912 main ()
13913 {
13914 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
13915   ;
13916   return 0;
13917 }
13918 _ACEOF
13919 # Don't try gcc -ansi; that turns off useful extensions and
13920 # breaks some systems' header files.
13921 # AIX                   -qlanglvl=ansi
13922 # Ultrix and OSF/1      -std1
13923 # HP-UX 10.20 and later -Ae
13924 # HP-UX older versions  -Aa -D_HPUX_SOURCE
13925 # SVR4                  -Xc -D__EXTENSIONS__
13926 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
13927 do
13928   CC="$ac_save_CC $ac_arg"
13929   rm -f conftest.$ac_objext
13930 if { (eval echo "$as_me:13930: \"$ac_compile\"") >&5
13931   (eval $ac_compile) 2>&5
13932   ac_status=$?
13933   echo "$as_me:13933: \$? = $ac_status" >&5
13934   (exit $ac_status); } &&
13935          { ac_try='test -s conftest.$ac_objext'
13936   { (eval echo "$as_me:13936: \"$ac_try\"") >&5
13937   (eval $ac_try) 2>&5
13938   ac_status=$?
13939   echo "$as_me:13939: \$? = $ac_status" >&5
13940   (exit $ac_status); }; }; then
13941   ac_cv_prog_cc_stdc=$ac_arg
13942 break
13943 else
13944   echo "$as_me: failed program was:" >&5
13945 cat conftest.$ac_ext >&5
13946 fi
13947 rm -f conftest.$ac_objext
13948 done
13949 rm -f conftest.$ac_ext conftest.$ac_objext
13950 CC=$ac_save_CC
13951
13952 fi
13953
13954 case "x$ac_cv_prog_cc_stdc" in
13955   x|xno)
13956     echo "$as_me:13956: result: none needed" >&5
13957 echo "${ECHO_T}none needed" >&6 ;;
13958   *)
13959     echo "$as_me:13959: result: $ac_cv_prog_cc_stdc" >&5
13960 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
13961     CC="$CC $ac_cv_prog_cc_stdc" ;;
13962 esac
13963
13964 echo "$as_me:13964: checking for an ANSI C-conforming const" >&5
13965 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
13966 if test "${ac_cv_c_const+set}" = set; then
13967   echo $ECHO_N "(cached) $ECHO_C" >&6
13968 else
13969   cat >conftest.$ac_ext <<_ACEOF
13970 #line 13970 "configure"
13971 #include "confdefs.h"
13972
13973 int
13974 main ()
13975 {
13976 /* FIXME: Include the comments suggested by Paul. */
13977 #ifndef __cplusplus
13978   /* Ultrix mips cc rejects this.  */
13979   typedef int charset[2];
13980   const charset x;
13981   /* SunOS 4.1.1 cc rejects this.  */
13982   char const *const *ccp;
13983   char **p;
13984   /* NEC SVR4.0.2 mips cc rejects this.  */
13985   struct point {int x, y;};
13986   static struct point const zero = {0,0};
13987   /* AIX XL C 1.02.0.0 rejects this.
13988      It does not let you subtract one const X* pointer from another in
13989      an arm of an if-expression whose if-part is not a constant
13990      expression */
13991   const char *g = "string";
13992   ccp = &g + (g ? g-g : 0);
13993   /* HPUX 7.0 cc rejects these. */
13994   ++ccp;
13995   p = (char**) ccp;
13996   ccp = (char const *const *) p;
13997   { /* SCO 3.2v4 cc rejects this.  */
13998     char *t;
13999     char const *s = 0 ? (char *) 0 : (char const *) 0;
14000
14001     *t++ = 0;
14002   }
14003   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
14004     int x[] = {25, 17};
14005     const int *foo = &x[0];
14006     ++foo;
14007   }
14008   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
14009     typedef const int *iptr;
14010     iptr p = 0;
14011     ++p;
14012   }
14013   { /* AIX XL C 1.02.0.0 rejects this saying
14014        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
14015     struct s { int j; const int *ap[3]; };
14016     struct s *b; b->j = 5;
14017   }
14018   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
14019     const int foo = 10;
14020   }
14021 #endif
14022
14023   ;
14024   return 0;
14025 }
14026 _ACEOF
14027 rm -f conftest.$ac_objext
14028 if { (eval echo "$as_me:14028: \"$ac_compile\"") >&5
14029   (eval $ac_compile) 2>&5
14030   ac_status=$?
14031   echo "$as_me:14031: \$? = $ac_status" >&5
14032   (exit $ac_status); } &&
14033          { ac_try='test -s conftest.$ac_objext'
14034   { (eval echo "$as_me:14034: \"$ac_try\"") >&5
14035   (eval $ac_try) 2>&5
14036   ac_status=$?
14037   echo "$as_me:14037: \$? = $ac_status" >&5
14038   (exit $ac_status); }; }; then
14039   ac_cv_c_const=yes
14040 else
14041   echo "$as_me: failed program was:" >&5
14042 cat conftest.$ac_ext >&5
14043 ac_cv_c_const=no
14044 fi
14045 rm -f conftest.$ac_objext conftest.$ac_ext
14046 fi
14047 echo "$as_me:14047: result: $ac_cv_c_const" >&5
14048 echo "${ECHO_T}$ac_cv_c_const" >&6
14049 if test $ac_cv_c_const = no; then
14050
14051 cat >>confdefs.h <<\EOF
14052 #define const
14053 EOF
14054
14055 fi
14056
14057 echo "$as_me:14057: checking for inline" >&5
14058 echo $ECHO_N "checking for inline... $ECHO_C" >&6
14059 if test "${ac_cv_c_inline+set}" = set; then
14060   echo $ECHO_N "(cached) $ECHO_C" >&6
14061 else
14062   ac_cv_c_inline=no
14063 for ac_kw in inline __inline__ __inline; do
14064   cat >conftest.$ac_ext <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067 #ifndef __cplusplus
14068 static $ac_kw int static_foo () {return 0; }
14069 $ac_kw int foo () {return 0; }
14070 #endif
14071
14072 _ACEOF
14073 rm -f conftest.$ac_objext
14074 if { (eval echo "$as_me:14074: \"$ac_compile\"") >&5
14075   (eval $ac_compile) 2>&5
14076   ac_status=$?
14077   echo "$as_me:14077: \$? = $ac_status" >&5
14078   (exit $ac_status); } &&
14079          { ac_try='test -s conftest.$ac_objext'
14080   { (eval echo "$as_me:14080: \"$ac_try\"") >&5
14081   (eval $ac_try) 2>&5
14082   ac_status=$?
14083   echo "$as_me:14083: \$? = $ac_status" >&5
14084   (exit $ac_status); }; }; then
14085   ac_cv_c_inline=$ac_kw; break
14086 else
14087   echo "$as_me: failed program was:" >&5
14088 cat conftest.$ac_ext >&5
14089 fi
14090 rm -f conftest.$ac_objext conftest.$ac_ext
14091 done
14092
14093 fi
14094 echo "$as_me:14094: result: $ac_cv_c_inline" >&5
14095 echo "${ECHO_T}$ac_cv_c_inline" >&6
14096 case $ac_cv_c_inline in
14097   inline | yes) ;;
14098   no)
14099 cat >>confdefs.h <<\EOF
14100 #define inline
14101 EOF
14102  ;;
14103   *)  cat >>confdefs.h <<EOF
14104 #define inline $ac_cv_c_inline
14105 EOF
14106  ;;
14107 esac
14108
14109 NCURSES_INLINE=
14110 if test "$ac_cv_c_inline" != no ; then
14111   NCURSES_INLINE=inline
14112   if test "$INTEL_COMPILER" = yes
14113   then
14114     :
14115   elif test "$GCC" = yes
14116   then
14117     echo "$as_me:14117: checking if $CC supports options to tune inlining" >&5
14118 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
14119 if test "${cf_cv_gcc_inline+set}" = set; then
14120   echo $ECHO_N "(cached) $ECHO_C" >&6
14121 else
14122
14123       cf_save_CFLAGS=$CFLAGS
14124       CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
14125       cat >conftest.$ac_ext <<_ACEOF
14126 #line 14126 "configure"
14127 #include "confdefs.h"
14128 inline int foo(void) { return 1; }
14129 int
14130 main ()
14131 {
14132 ${cf_cv_main_return:-return} foo()
14133   ;
14134   return 0;
14135 }
14136 _ACEOF
14137 rm -f conftest.$ac_objext
14138 if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139   (eval $ac_compile) 2>&5
14140   ac_status=$?
14141   echo "$as_me:14141: \$? = $ac_status" >&5
14142   (exit $ac_status); } &&
14143          { ac_try='test -s conftest.$ac_objext'
14144   { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145   (eval $ac_try) 2>&5
14146   ac_status=$?
14147   echo "$as_me:14147: \$? = $ac_status" >&5
14148   (exit $ac_status); }; }; then
14149   cf_cv_gcc_inline=yes
14150 else
14151   echo "$as_me: failed program was:" >&5
14152 cat conftest.$ac_ext >&5
14153 cf_cv_gcc_inline=no
14154 fi
14155 rm -f conftest.$ac_objext conftest.$ac_ext
14156       CFLAGS=$cf_save_CFLAGS
14157
14158 fi
14159 echo "$as_me:14159: result: $cf_cv_gcc_inline" >&5
14160 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
14161     if test "$cf_cv_gcc_inline" = yes ; then
14162
14163 cf_fix_cppflags=no
14164 cf_new_cflags=
14165 cf_new_cppflags=
14166 cf_new_extra_cppflags=
14167
14168 for cf_add_cflags in --param max-inline-insns-single=1200
14169 do
14170 case $cf_fix_cppflags in
14171 no)
14172         case $cf_add_cflags in #(vi
14173         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
14174                 case $cf_add_cflags in
14175                 -D*)
14176                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14177
14178                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14179                                 && test -z "${cf_tst_cflags}" \
14180                                 && cf_fix_cppflags=yes
14181
14182                         if test $cf_fix_cppflags = yes ; then
14183                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14184                                 continue
14185                         elif test "${cf_tst_cflags}" = "\"'" ; then
14186                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14187                                 continue
14188                         fi
14189                         ;;
14190                 esac
14191                 case "$CPPFLAGS" in
14192                 *$cf_add_cflags) #(vi
14193                         ;;
14194                 *) #(vi
14195                         case $cf_add_cflags in #(vi
14196                         -D*)
14197                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14198
14199 CPPFLAGS=`echo "$CPPFLAGS" | \
14200         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
14201                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
14202
14203                                 ;;
14204                         esac
14205                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14206                         ;;
14207                 esac
14208                 ;;
14209         *)
14210                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14211                 ;;
14212         esac
14213         ;;
14214 yes)
14215         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14216
14217         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14218
14219         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
14220                 && test -z "${cf_tst_cflags}" \
14221                 && cf_fix_cppflags=no
14222         ;;
14223 esac
14224 done
14225
14226 if test -n "$cf_new_cflags" ; then
14227
14228         CFLAGS="$CFLAGS $cf_new_cflags"
14229 fi
14230
14231 if test -n "$cf_new_cppflags" ; then
14232
14233         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14234 fi
14235
14236 if test -n "$cf_new_extra_cppflags" ; then
14237
14238         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14239 fi
14240
14241     fi
14242   fi
14243 fi
14244
14245 echo "$as_me:14245: checking for signal global datatype" >&5
14246 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
14247 if test "${cf_cv_sig_atomic_t+set}" = set; then
14248   echo $ECHO_N "(cached) $ECHO_C" >&6
14249 else
14250
14251         for cf_type in \
14252                 "volatile sig_atomic_t" \
14253                 "sig_atomic_t" \
14254                 "int"
14255         do
14256         cat >conftest.$ac_ext <<_ACEOF
14257 #line 14257 "configure"
14258 #include "confdefs.h"
14259
14260 #include <sys/types.h>
14261 #include <signal.h>
14262 #include <stdio.h>
14263
14264 extern $cf_type x;
14265 $cf_type x;
14266 static void handler(int sig)
14267 {
14268         x = 5;
14269 }
14270 int
14271 main ()
14272 {
14273 signal(SIGINT, handler);
14274                  x = 1
14275   ;
14276   return 0;
14277 }
14278 _ACEOF
14279 rm -f conftest.$ac_objext
14280 if { (eval echo "$as_me:14280: \"$ac_compile\"") >&5
14281   (eval $ac_compile) 2>&5
14282   ac_status=$?
14283   echo "$as_me:14283: \$? = $ac_status" >&5
14284   (exit $ac_status); } &&
14285          { ac_try='test -s conftest.$ac_objext'
14286   { (eval echo "$as_me:14286: \"$ac_try\"") >&5
14287   (eval $ac_try) 2>&5
14288   ac_status=$?
14289   echo "$as_me:14289: \$? = $ac_status" >&5
14290   (exit $ac_status); }; }; then
14291   cf_cv_sig_atomic_t=$cf_type
14292 else
14293   echo "$as_me: failed program was:" >&5
14294 cat conftest.$ac_ext >&5
14295 cf_cv_sig_atomic_t=no
14296 fi
14297 rm -f conftest.$ac_objext conftest.$ac_ext
14298                 test "$cf_cv_sig_atomic_t" != no && break
14299         done
14300
14301 fi
14302
14303 echo "$as_me:14303: result: $cf_cv_sig_atomic_t" >&5
14304 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
14305 test "$cf_cv_sig_atomic_t" != no && cat >>confdefs.h <<EOF
14306 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
14307 EOF
14308
14309 if test $NCURSES_CHTYPE = auto ; then
14310
14311 echo "$as_me:14311: checking for type of chtype" >&5
14312 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14313 if test "${cf_cv_typeof_chtype+set}" = set; then
14314   echo $ECHO_N "(cached) $ECHO_C" >&6
14315 else
14316
14317                 if test "$cross_compiling" = yes; then
14318   cf_cv_typeof_chtype=long
14319 else
14320   cat >conftest.$ac_ext <<_ACEOF
14321 #line 14321 "configure"
14322 #include "confdefs.h"
14323
14324 #define WANT_BITS 31
14325 #include <stdio.h>
14326 int main()
14327 {
14328         FILE *fp = fopen("cf_test.out", "w");
14329         if (fp != 0) {
14330                 char *result = "long";
14331                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
14332                         int n;
14333                         unsigned int x, y;
14334                         for (n = 0; n < WANT_BITS; n++) {
14335                                 x = (1 << n);
14336                                 y = (x >> n);
14337                                 if (y != 1 || x == 0) {
14338                                         x = 0;
14339                                         break;
14340                                 }
14341                         }
14342                         /*
14343                          * If x is nonzero, an int is big enough for the bits
14344                          * that we want.
14345                          */
14346                         result = (x != 0) ? "int" : "long";
14347                 }
14348                 fputs(result, fp);
14349                 fclose(fp);
14350         }
14351         ${cf_cv_main_return:-return}(0);
14352 }
14353
14354 _ACEOF
14355 rm -f conftest$ac_exeext
14356 if { (eval echo "$as_me:14356: \"$ac_link\"") >&5
14357   (eval $ac_link) 2>&5
14358   ac_status=$?
14359   echo "$as_me:14359: \$? = $ac_status" >&5
14360   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14361   { (eval echo "$as_me:14361: \"$ac_try\"") >&5
14362   (eval $ac_try) 2>&5
14363   ac_status=$?
14364   echo "$as_me:14364: \$? = $ac_status" >&5
14365   (exit $ac_status); }; }; then
14366   cf_cv_typeof_chtype=`cat cf_test.out`
14367 else
14368   echo "$as_me: program exited with status $ac_status" >&5
14369 echo "$as_me: failed program was:" >&5
14370 cat conftest.$ac_ext >&5
14371 cf_cv_typeof_chtype=long
14372 fi
14373 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14374 fi
14375                 rm -f cf_test.out
14376
14377 fi
14378
14379 echo "$as_me:14379: result: $cf_cv_typeof_chtype" >&5
14380 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
14381
14382 cat >>confdefs.h <<EOF
14383 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
14384 EOF
14385
14386 else
14387         cf_cv_typeof_chtype=$NCURSES_CHTYPE
14388 fi
14389 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
14390
14391 echo "$as_me:14391: checking if unsigned literals are legal" >&5
14392 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
14393 if test "${cf_cv_unsigned_literals+set}" = set; then
14394   echo $ECHO_N "(cached) $ECHO_C" >&6
14395 else
14396
14397         cat >conftest.$ac_ext <<_ACEOF
14398 #line 14398 "configure"
14399 #include "confdefs.h"
14400
14401 int
14402 main ()
14403 {
14404 long x = 1L + 1UL + 1U + 1
14405   ;
14406   return 0;
14407 }
14408 _ACEOF
14409 rm -f conftest.$ac_objext
14410 if { (eval echo "$as_me:14410: \"$ac_compile\"") >&5
14411   (eval $ac_compile) 2>&5
14412   ac_status=$?
14413   echo "$as_me:14413: \$? = $ac_status" >&5
14414   (exit $ac_status); } &&
14415          { ac_try='test -s conftest.$ac_objext'
14416   { (eval echo "$as_me:14416: \"$ac_try\"") >&5
14417   (eval $ac_try) 2>&5
14418   ac_status=$?
14419   echo "$as_me:14419: \$? = $ac_status" >&5
14420   (exit $ac_status); }; }; then
14421   cf_cv_unsigned_literals=yes
14422 else
14423   echo "$as_me: failed program was:" >&5
14424 cat conftest.$ac_ext >&5
14425 cf_cv_unsigned_literals=no
14426 fi
14427 rm -f conftest.$ac_objext conftest.$ac_ext
14428
14429 fi
14430
14431 echo "$as_me:14431: result: $cf_cv_unsigned_literals" >&5
14432 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
14433
14434 cf_cv_1UL="1"
14435 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
14436 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
14437
14438 if test $NCURSES_MMASK_T = auto ; then
14439         cf_cv_typeof_mmask_t=long
14440 else
14441         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
14442 fi
14443 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
14444
14445 ###     Checks for external-data
14446
14447 echo "$as_me:14447: checking if external errno is declared" >&5
14448 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
14449 if test "${cf_cv_dcl_errno+set}" = set; then
14450   echo $ECHO_N "(cached) $ECHO_C" >&6
14451 else
14452
14453     cat >conftest.$ac_ext <<_ACEOF
14454 #line 14454 "configure"
14455 #include "confdefs.h"
14456
14457 #ifdef HAVE_STDLIB_H
14458 #include <stdlib.h>
14459 #endif
14460 #include <stdio.h>
14461 #include <sys/types.h>
14462 #include <errno.h>
14463 int
14464 main ()
14465 {
14466 int x = (int) errno
14467   ;
14468   return 0;
14469 }
14470 _ACEOF
14471 rm -f conftest.$ac_objext
14472 if { (eval echo "$as_me:14472: \"$ac_compile\"") >&5
14473   (eval $ac_compile) 2>&5
14474   ac_status=$?
14475   echo "$as_me:14475: \$? = $ac_status" >&5
14476   (exit $ac_status); } &&
14477          { ac_try='test -s conftest.$ac_objext'
14478   { (eval echo "$as_me:14478: \"$ac_try\"") >&5
14479   (eval $ac_try) 2>&5
14480   ac_status=$?
14481   echo "$as_me:14481: \$? = $ac_status" >&5
14482   (exit $ac_status); }; }; then
14483   cf_cv_dcl_errno=yes
14484 else
14485   echo "$as_me: failed program was:" >&5
14486 cat conftest.$ac_ext >&5
14487 cf_cv_dcl_errno=no
14488 fi
14489 rm -f conftest.$ac_objext conftest.$ac_ext
14490
14491 fi
14492 echo "$as_me:14492: result: $cf_cv_dcl_errno" >&5
14493 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
14494
14495 if test "$cf_cv_dcl_errno" = no ; then
14496
14497 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14498
14499     cat >>confdefs.h <<EOF
14500 #define $cf_result 1
14501 EOF
14502
14503 fi
14504
14505 # It's possible (for near-UNIX clones) that the data doesn't exist
14506
14507 echo "$as_me:14507: checking if external errno exists" >&5
14508 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
14509 if test "${cf_cv_have_errno+set}" = set; then
14510   echo $ECHO_N "(cached) $ECHO_C" >&6
14511 else
14512
14513     cat >conftest.$ac_ext <<_ACEOF
14514 #line 14514 "configure"
14515 #include "confdefs.h"
14516
14517 #undef errno
14518 extern int errno;
14519
14520 int
14521 main ()
14522 {
14523 errno = 2
14524   ;
14525   return 0;
14526 }
14527 _ACEOF
14528 rm -f conftest.$ac_objext conftest$ac_exeext
14529 if { (eval echo "$as_me:14529: \"$ac_link\"") >&5
14530   (eval $ac_link) 2>&5
14531   ac_status=$?
14532   echo "$as_me:14532: \$? = $ac_status" >&5
14533   (exit $ac_status); } &&
14534          { ac_try='test -s conftest$ac_exeext'
14535   { (eval echo "$as_me:14535: \"$ac_try\"") >&5
14536   (eval $ac_try) 2>&5
14537   ac_status=$?
14538   echo "$as_me:14538: \$? = $ac_status" >&5
14539   (exit $ac_status); }; }; then
14540   cf_cv_have_errno=yes
14541 else
14542   echo "$as_me: failed program was:" >&5
14543 cat conftest.$ac_ext >&5
14544 cf_cv_have_errno=no
14545 fi
14546 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14547
14548 fi
14549 echo "$as_me:14549: result: $cf_cv_have_errno" >&5
14550 echo "${ECHO_T}$cf_cv_have_errno" >&6
14551
14552 if test "$cf_cv_have_errno" = yes ; then
14553
14554 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14555
14556     cat >>confdefs.h <<EOF
14557 #define $cf_result 1
14558 EOF
14559
14560 fi
14561
14562 echo "$as_me:14562: checking if data-only library module links" >&5
14563 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
14564 if test "${cf_cv_link_dataonly+set}" = set; then
14565   echo $ECHO_N "(cached) $ECHO_C" >&6
14566 else
14567
14568         rm -f conftest.a
14569         cat >conftest.$ac_ext <<EOF
14570 #line 14570 "configure"
14571 int     testdata[3] = { 123, 456, 789 };
14572 EOF
14573         if { (eval echo "$as_me:14573: \"$ac_compile\"") >&5
14574   (eval $ac_compile) 2>&5
14575   ac_status=$?
14576   echo "$as_me:14576: \$? = $ac_status" >&5
14577   (exit $ac_status); } ; then
14578                 mv conftest.o data.o && \
14579                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
14580         fi
14581         rm -f conftest.$ac_ext data.o
14582         cat >conftest.$ac_ext <<EOF
14583 #line 14583 "configure"
14584 int     testfunc()
14585 {
14586 #if defined(NeXT)
14587         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
14588 #else
14589         extern int testdata[3];
14590         return testdata[0] == 123
14591            &&  testdata[1] == 456
14592            &&  testdata[2] == 789;
14593 #endif
14594 }
14595 EOF
14596         if { (eval echo "$as_me:14596: \"$ac_compile\"") >&5
14597   (eval $ac_compile) 2>&5
14598   ac_status=$?
14599   echo "$as_me:14599: \$? = $ac_status" >&5
14600   (exit $ac_status); }; then
14601                 mv conftest.o func.o && \
14602                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
14603         fi
14604         rm -f conftest.$ac_ext func.o
14605         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
14606         cf_saveLIBS="$LIBS"
14607         LIBS="conftest.a $LIBS"
14608         if test "$cross_compiling" = yes; then
14609   cf_cv_link_dataonly=unknown
14610 else
14611   cat >conftest.$ac_ext <<_ACEOF
14612 #line 14612 "configure"
14613 #include "confdefs.h"
14614
14615         int main()
14616         {
14617                 extern int testfunc();
14618                 ${cf_cv_main_return:-return} (!testfunc());
14619         }
14620
14621 _ACEOF
14622 rm -f conftest$ac_exeext
14623 if { (eval echo "$as_me:14623: \"$ac_link\"") >&5
14624   (eval $ac_link) 2>&5
14625   ac_status=$?
14626   echo "$as_me:14626: \$? = $ac_status" >&5
14627   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14628   { (eval echo "$as_me:14628: \"$ac_try\"") >&5
14629   (eval $ac_try) 2>&5
14630   ac_status=$?
14631   echo "$as_me:14631: \$? = $ac_status" >&5
14632   (exit $ac_status); }; }; then
14633   cf_cv_link_dataonly=yes
14634 else
14635   echo "$as_me: program exited with status $ac_status" >&5
14636 echo "$as_me: failed program was:" >&5
14637 cat conftest.$ac_ext >&5
14638 cf_cv_link_dataonly=no
14639 fi
14640 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14641 fi
14642         LIBS="$cf_saveLIBS"
14643
14644 fi
14645
14646 echo "$as_me:14646: result: $cf_cv_link_dataonly" >&5
14647 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
14648
14649 if test "$cf_cv_link_dataonly" = no ; then
14650         cat >>confdefs.h <<\EOF
14651 #define BROKEN_LINKER 1
14652 EOF
14653
14654         BROKEN_LINKER=1
14655 fi
14656
14657 ###     Checks for library functions.
14658
14659 for ac_func in \
14660 getcwd \
14661 getegid \
14662 geteuid \
14663 getttynam \
14664 issetugid \
14665 poll \
14666 remove \
14667 select \
14668 setbuf \
14669 setbuffer \
14670 setvbuf \
14671 sigaction \
14672 sigvec \
14673 strdup \
14674 strstr \
14675 tcgetpgrp \
14676 times \
14677 vsnprintf \
14678
14679 do
14680 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14681 echo "$as_me:14681: checking for $ac_func" >&5
14682 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14683 if eval "test \"\${$as_ac_var+set}\" = set"; then
14684   echo $ECHO_N "(cached) $ECHO_C" >&6
14685 else
14686   cat >conftest.$ac_ext <<_ACEOF
14687 #line 14687 "configure"
14688 #include "confdefs.h"
14689 /* System header to define __stub macros and hopefully few prototypes,
14690     which can conflict with char $ac_func (); below.  */
14691 #include <assert.h>
14692 /* Override any gcc2 internal prototype to avoid an error.  */
14693 #ifdef __cplusplus
14694 extern "C"
14695 #endif
14696 /* We use char because int might match the return type of a gcc2
14697    builtin and then its argument prototype would still apply.  */
14698 char $ac_func ();
14699 char (*f) ();
14700
14701 int
14702 main ()
14703 {
14704 /* The GNU C library defines this for functions which it implements
14705     to always fail with ENOSYS.  Some functions are actually named
14706     something starting with __ and the normal name is an alias.  */
14707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14708 choke me
14709 #else
14710 f = $ac_func;
14711 #endif
14712
14713   ;
14714   return 0;
14715 }
14716 _ACEOF
14717 rm -f conftest.$ac_objext conftest$ac_exeext
14718 if { (eval echo "$as_me:14718: \"$ac_link\"") >&5
14719   (eval $ac_link) 2>&5
14720   ac_status=$?
14721   echo "$as_me:14721: \$? = $ac_status" >&5
14722   (exit $ac_status); } &&
14723          { ac_try='test -s conftest$ac_exeext'
14724   { (eval echo "$as_me:14724: \"$ac_try\"") >&5
14725   (eval $ac_try) 2>&5
14726   ac_status=$?
14727   echo "$as_me:14727: \$? = $ac_status" >&5
14728   (exit $ac_status); }; }; then
14729   eval "$as_ac_var=yes"
14730 else
14731   echo "$as_me: failed program was:" >&5
14732 cat conftest.$ac_ext >&5
14733 eval "$as_ac_var=no"
14734 fi
14735 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14736 fi
14737 echo "$as_me:14737: result: `eval echo '${'$as_ac_var'}'`" >&5
14738 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14739 if test `eval echo '${'$as_ac_var'}'` = yes; then
14740   cat >>confdefs.h <<EOF
14741 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14742 EOF
14743
14744 fi
14745 done
14746
14747 if test "$with_getcap" = "yes" ; then
14748
14749 echo "$as_me:14749: checking for terminal-capability database functions" >&5
14750 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
14751 if test "${cf_cv_cgetent+set}" = set; then
14752   echo $ECHO_N "(cached) $ECHO_C" >&6
14753 else
14754
14755 cat >conftest.$ac_ext <<_ACEOF
14756 #line 14756 "configure"
14757 #include "confdefs.h"
14758
14759 #include <stdlib.h>
14760 int
14761 main ()
14762 {
14763
14764         char temp[128];
14765         char *buf = temp;
14766         char *db_array = temp;
14767         cgetent(&buf, /* int *, */ &db_array, "vt100");
14768         cgetcap(buf, "tc", '=');
14769         cgetmatch(buf, "tc");
14770
14771   ;
14772   return 0;
14773 }
14774 _ACEOF
14775 rm -f conftest.$ac_objext conftest$ac_exeext
14776 if { (eval echo "$as_me:14776: \"$ac_link\"") >&5
14777   (eval $ac_link) 2>&5
14778   ac_status=$?
14779   echo "$as_me:14779: \$? = $ac_status" >&5
14780   (exit $ac_status); } &&
14781          { ac_try='test -s conftest$ac_exeext'
14782   { (eval echo "$as_me:14782: \"$ac_try\"") >&5
14783   (eval $ac_try) 2>&5
14784   ac_status=$?
14785   echo "$as_me:14785: \$? = $ac_status" >&5
14786   (exit $ac_status); }; }; then
14787   cf_cv_cgetent=yes
14788 else
14789   echo "$as_me: failed program was:" >&5
14790 cat conftest.$ac_ext >&5
14791 cf_cv_cgetent=no
14792 fi
14793 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14794
14795 fi
14796
14797 echo "$as_me:14797: result: $cf_cv_cgetent" >&5
14798 echo "${ECHO_T}$cf_cv_cgetent" >&6
14799 test "$cf_cv_cgetent" = yes && cat >>confdefs.h <<\EOF
14800 #define HAVE_BSD_CGETENT 1
14801 EOF
14802
14803 fi
14804
14805 echo "$as_me:14805: checking for isascii" >&5
14806 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
14807 if test "${cf_cv_have_isascii+set}" = set; then
14808   echo $ECHO_N "(cached) $ECHO_C" >&6
14809 else
14810
14811         cat >conftest.$ac_ext <<_ACEOF
14812 #line 14812 "configure"
14813 #include "confdefs.h"
14814 #include <ctype.h>
14815 int
14816 main ()
14817 {
14818 int x = isascii(' ')
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 rm -f conftest.$ac_objext conftest$ac_exeext
14824 if { (eval echo "$as_me:14824: \"$ac_link\"") >&5
14825   (eval $ac_link) 2>&5
14826   ac_status=$?
14827   echo "$as_me:14827: \$? = $ac_status" >&5
14828   (exit $ac_status); } &&
14829          { ac_try='test -s conftest$ac_exeext'
14830   { (eval echo "$as_me:14830: \"$ac_try\"") >&5
14831   (eval $ac_try) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit $ac_status); }; }; then
14835   cf_cv_have_isascii=yes
14836 else
14837   echo "$as_me: failed program was:" >&5
14838 cat conftest.$ac_ext >&5
14839 cf_cv_have_isascii=no
14840 fi
14841 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14842
14843 fi
14844 echo "$as_me:14844: result: $cf_cv_have_isascii" >&5
14845 echo "${ECHO_T}$cf_cv_have_isascii" >&6
14846 test "$cf_cv_have_isascii" = yes && cat >>confdefs.h <<\EOF
14847 #define HAVE_ISASCII 1
14848 EOF
14849
14850 if test "$ac_cv_func_sigaction" = yes; then
14851 echo "$as_me:14851: checking whether sigaction needs _POSIX_SOURCE" >&5
14852 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
14853 cat >conftest.$ac_ext <<_ACEOF
14854 #line 14854 "configure"
14855 #include "confdefs.h"
14856
14857 #include <sys/types.h>
14858 #include <signal.h>
14859 int
14860 main ()
14861 {
14862 struct sigaction act
14863   ;
14864   return 0;
14865 }
14866 _ACEOF
14867 rm -f conftest.$ac_objext
14868 if { (eval echo "$as_me:14868: \"$ac_compile\"") >&5
14869   (eval $ac_compile) 2>&5
14870   ac_status=$?
14871   echo "$as_me:14871: \$? = $ac_status" >&5
14872   (exit $ac_status); } &&
14873          { ac_try='test -s conftest.$ac_objext'
14874   { (eval echo "$as_me:14874: \"$ac_try\"") >&5
14875   (eval $ac_try) 2>&5
14876   ac_status=$?
14877   echo "$as_me:14877: \$? = $ac_status" >&5
14878   (exit $ac_status); }; }; then
14879   sigact_bad=no
14880 else
14881   echo "$as_me: failed program was:" >&5
14882 cat conftest.$ac_ext >&5
14883
14884 cat >conftest.$ac_ext <<_ACEOF
14885 #line 14885 "configure"
14886 #include "confdefs.h"
14887
14888 #define _POSIX_SOURCE
14889 #include <sys/types.h>
14890 #include <signal.h>
14891 int
14892 main ()
14893 {
14894 struct sigaction act
14895   ;
14896   return 0;
14897 }
14898 _ACEOF
14899 rm -f conftest.$ac_objext
14900 if { (eval echo "$as_me:14900: \"$ac_compile\"") >&5
14901   (eval $ac_compile) 2>&5
14902   ac_status=$?
14903   echo "$as_me:14903: \$? = $ac_status" >&5
14904   (exit $ac_status); } &&
14905          { ac_try='test -s conftest.$ac_objext'
14906   { (eval echo "$as_me:14906: \"$ac_try\"") >&5
14907   (eval $ac_try) 2>&5
14908   ac_status=$?
14909   echo "$as_me:14909: \$? = $ac_status" >&5
14910   (exit $ac_status); }; }; then
14911   sigact_bad=yes
14912          cat >>confdefs.h <<\EOF
14913 #define _POSIX_SOURCE 1
14914 EOF
14915
14916 else
14917   echo "$as_me: failed program was:" >&5
14918 cat conftest.$ac_ext >&5
14919 sigact_bad=unknown
14920 fi
14921 rm -f conftest.$ac_objext conftest.$ac_ext
14922 fi
14923 rm -f conftest.$ac_objext conftest.$ac_ext
14924 echo "$as_me:14924: result: $sigact_bad" >&5
14925 echo "${ECHO_T}$sigact_bad" >&6
14926 fi
14927
14928 echo "$as_me:14928: checking if nanosleep really works" >&5
14929 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
14930 if test "${cf_cv_func_nanosleep+set}" = set; then
14931   echo $ECHO_N "(cached) $ECHO_C" >&6
14932 else
14933
14934 if test "$cross_compiling" = yes; then
14935   cf_cv_func_nanosleep=unknown
14936 else
14937   cat >conftest.$ac_ext <<_ACEOF
14938 #line 14938 "configure"
14939 #include "confdefs.h"
14940
14941 #include <stdio.h>
14942 #include <errno.h>
14943 #include <time.h>
14944
14945 #ifdef HAVE_SYS_TIME_H
14946 #include <sys/time.h>
14947 #endif
14948
14949 int main() {
14950         struct timespec ts1, ts2;
14951         int code;
14952         ts1.tv_sec  = 0;
14953         ts1.tv_nsec = 750000000;
14954         ts2.tv_sec  = 0;
14955         ts2.tv_nsec = 0;
14956         errno = 0;
14957         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
14958         ${cf_cv_main_return:-return}(code != 0);
14959 }
14960
14961 _ACEOF
14962 rm -f conftest$ac_exeext
14963 if { (eval echo "$as_me:14963: \"$ac_link\"") >&5
14964   (eval $ac_link) 2>&5
14965   ac_status=$?
14966   echo "$as_me:14966: \$? = $ac_status" >&5
14967   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14968   { (eval echo "$as_me:14968: \"$ac_try\"") >&5
14969   (eval $ac_try) 2>&5
14970   ac_status=$?
14971   echo "$as_me:14971: \$? = $ac_status" >&5
14972   (exit $ac_status); }; }; then
14973   cf_cv_func_nanosleep=yes
14974 else
14975   echo "$as_me: program exited with status $ac_status" >&5
14976 echo "$as_me: failed program was:" >&5
14977 cat conftest.$ac_ext >&5
14978 cf_cv_func_nanosleep=no
14979 fi
14980 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14981 fi
14982 fi
14983 echo "$as_me:14983: result: $cf_cv_func_nanosleep" >&5
14984 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
14985
14986 test "$cf_cv_func_nanosleep" = "yes" && cat >>confdefs.h <<\EOF
14987 #define HAVE_NANOSLEEP 1
14988 EOF
14989
14990 for ac_header in \
14991 termio.h \
14992 termios.h \
14993 unistd.h \
14994
14995 do
14996 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14997 echo "$as_me:14997: checking for $ac_header" >&5
14998 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14999 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15000   echo $ECHO_N "(cached) $ECHO_C" >&6
15001 else
15002   cat >conftest.$ac_ext <<_ACEOF
15003 #line 15003 "configure"
15004 #include "confdefs.h"
15005 #include <$ac_header>
15006 _ACEOF
15007 if { (eval echo "$as_me:15007: \"$ac_cpp conftest.$ac_ext\"") >&5
15008   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15009   ac_status=$?
15010   egrep -v '^ *\+' conftest.er1 >conftest.err
15011   rm -f conftest.er1
15012   cat conftest.err >&5
15013   echo "$as_me:15013: \$? = $ac_status" >&5
15014   (exit $ac_status); } >/dev/null; then
15015   if test -s conftest.err; then
15016     ac_cpp_err=$ac_c_preproc_warn_flag
15017   else
15018     ac_cpp_err=
15019   fi
15020 else
15021   ac_cpp_err=yes
15022 fi
15023 if test -z "$ac_cpp_err"; then
15024   eval "$as_ac_Header=yes"
15025 else
15026   echo "$as_me: failed program was:" >&5
15027   cat conftest.$ac_ext >&5
15028   eval "$as_ac_Header=no"
15029 fi
15030 rm -f conftest.err conftest.$ac_ext
15031 fi
15032 echo "$as_me:15032: result: `eval echo '${'$as_ac_Header'}'`" >&5
15033 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15034 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15035   cat >>confdefs.h <<EOF
15036 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15037 EOF
15038
15039 fi
15040 done
15041
15042 if test "$ISC" = yes ; then
15043
15044 for ac_header in sys/termio.h
15045 do
15046 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15047 echo "$as_me:15047: checking for $ac_header" >&5
15048 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15049 if eval "test \"\${$as_ac_Header+set}\" = set"; then
15050   echo $ECHO_N "(cached) $ECHO_C" >&6
15051 else
15052   cat >conftest.$ac_ext <<_ACEOF
15053 #line 15053 "configure"
15054 #include "confdefs.h"
15055 #include <$ac_header>
15056 _ACEOF
15057 if { (eval echo "$as_me:15057: \"$ac_cpp conftest.$ac_ext\"") >&5
15058   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
15059   ac_status=$?
15060   egrep -v '^ *\+' conftest.er1 >conftest.err
15061   rm -f conftest.er1
15062   cat conftest.err >&5
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit $ac_status); } >/dev/null; then
15065   if test -s conftest.err; then
15066     ac_cpp_err=$ac_c_preproc_warn_flag
15067   else
15068     ac_cpp_err=
15069   fi
15070 else
15071   ac_cpp_err=yes
15072 fi
15073 if test -z "$ac_cpp_err"; then
15074   eval "$as_ac_Header=yes"
15075 else
15076   echo "$as_me: failed program was:" >&5
15077   cat conftest.$ac_ext >&5
15078   eval "$as_ac_Header=no"
15079 fi
15080 rm -f conftest.err conftest.$ac_ext
15081 fi
15082 echo "$as_me:15082: result: `eval echo '${'$as_ac_Header'}'`" >&5
15083 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
15084 if test `eval echo '${'$as_ac_Header'}'` = yes; then
15085   cat >>confdefs.h <<EOF
15086 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15087 EOF
15088
15089 fi
15090 done
15091
15092 fi
15093 if test "$ac_cv_header_termios_h" = yes ; then
15094         case "$CFLAGS $CPPFLAGS" in
15095         *-D_POSIX_SOURCE*)
15096                 termios_bad=dunno ;;
15097         *)      termios_bad=maybe ;;
15098         esac
15099         if test "$termios_bad" = maybe ; then
15100         echo "$as_me:15100: checking whether termios.h needs _POSIX_SOURCE" >&5
15101 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
15102         cat >conftest.$ac_ext <<_ACEOF
15103 #line 15103 "configure"
15104 #include "confdefs.h"
15105 #include <termios.h>
15106 int
15107 main ()
15108 {
15109 struct termios foo; int x = foo.c_iflag
15110   ;
15111   return 0;
15112 }
15113 _ACEOF
15114 rm -f conftest.$ac_objext
15115 if { (eval echo "$as_me:15115: \"$ac_compile\"") >&5
15116   (eval $ac_compile) 2>&5
15117   ac_status=$?
15118   echo "$as_me:15118: \$? = $ac_status" >&5
15119   (exit $ac_status); } &&
15120          { ac_try='test -s conftest.$ac_objext'
15121   { (eval echo "$as_me:15121: \"$ac_try\"") >&5
15122   (eval $ac_try) 2>&5
15123   ac_status=$?
15124   echo "$as_me:15124: \$? = $ac_status" >&5
15125   (exit $ac_status); }; }; then
15126   termios_bad=no
15127 else
15128   echo "$as_me: failed program was:" >&5
15129 cat conftest.$ac_ext >&5
15130
15131                 cat >conftest.$ac_ext <<_ACEOF
15132 #line 15132 "configure"
15133 #include "confdefs.h"
15134
15135 #define _POSIX_SOURCE
15136 #include <termios.h>
15137 int
15138 main ()
15139 {
15140 struct termios foo; int x = foo.c_iflag
15141   ;
15142   return 0;
15143 }
15144 _ACEOF
15145 rm -f conftest.$ac_objext
15146 if { (eval echo "$as_me:15146: \"$ac_compile\"") >&5
15147   (eval $ac_compile) 2>&5
15148   ac_status=$?
15149   echo "$as_me:15149: \$? = $ac_status" >&5
15150   (exit $ac_status); } &&
15151          { ac_try='test -s conftest.$ac_objext'
15152   { (eval echo "$as_me:15152: \"$ac_try\"") >&5
15153   (eval $ac_try) 2>&5
15154   ac_status=$?
15155   echo "$as_me:15155: \$? = $ac_status" >&5
15156   (exit $ac_status); }; }; then
15157   termios_bad=unknown
15158 else
15159   echo "$as_me: failed program was:" >&5
15160 cat conftest.$ac_ext >&5
15161 termios_bad=yes cat >>confdefs.h <<\EOF
15162 #define _POSIX_SOURCE 1
15163 EOF
15164
15165 fi
15166 rm -f conftest.$ac_objext conftest.$ac_ext
15167
15168 fi
15169 rm -f conftest.$ac_objext conftest.$ac_ext
15170         echo "$as_me:15170: result: $termios_bad" >&5
15171 echo "${ECHO_T}$termios_bad" >&6
15172         fi
15173 fi
15174
15175 echo "$as_me:15175: checking for tcgetattr" >&5
15176 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
15177 if test "${cf_cv_have_tcgetattr+set}" = set; then
15178   echo $ECHO_N "(cached) $ECHO_C" >&6
15179 else
15180
15181 cat >conftest.$ac_ext <<_ACEOF
15182 #line 15182 "configure"
15183 #include "confdefs.h"
15184
15185 #include <sys/types.h>
15186 #ifdef HAVE_UNISTD_H
15187 #include <unistd.h>
15188 #endif
15189 #ifdef HAVE_TERMIOS_H
15190 #include <termios.h>
15191 #define TTY struct termios
15192 #else
15193 #ifdef HAVE_TERMIO_H
15194 #include <termio.h>
15195 #define TTY struct termio
15196 #endif
15197 #endif
15198
15199 int
15200 main ()
15201 {
15202
15203 TTY foo;
15204 tcgetattr(1, &foo);
15205   ;
15206   return 0;
15207 }
15208 _ACEOF
15209 rm -f conftest.$ac_objext conftest$ac_exeext
15210 if { (eval echo "$as_me:15210: \"$ac_link\"") >&5
15211   (eval $ac_link) 2>&5
15212   ac_status=$?
15213   echo "$as_me:15213: \$? = $ac_status" >&5
15214   (exit $ac_status); } &&
15215          { ac_try='test -s conftest$ac_exeext'
15216   { (eval echo "$as_me:15216: \"$ac_try\"") >&5
15217   (eval $ac_try) 2>&5
15218   ac_status=$?
15219   echo "$as_me:15219: \$? = $ac_status" >&5
15220   (exit $ac_status); }; }; then
15221   cf_cv_have_tcgetattr=yes
15222 else
15223   echo "$as_me: failed program was:" >&5
15224 cat conftest.$ac_ext >&5
15225 cf_cv_have_tcgetattr=no
15226 fi
15227 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15228 fi
15229 echo "$as_me:15229: result: $cf_cv_have_tcgetattr" >&5
15230 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
15231 test "$cf_cv_have_tcgetattr" = yes && cat >>confdefs.h <<\EOF
15232 #define HAVE_TCGETATTR 1
15233 EOF
15234
15235 echo "$as_me:15235: checking for vsscanf function or workaround" >&5
15236 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
15237 if test "${cf_cv_func_vsscanf+set}" = set; then
15238   echo $ECHO_N "(cached) $ECHO_C" >&6
15239 else
15240
15241 cat >conftest.$ac_ext <<_ACEOF
15242 #line 15242 "configure"
15243 #include "confdefs.h"
15244
15245 #include <stdarg.h>
15246 #include <stdio.h>
15247 int
15248 main ()
15249 {
15250
15251         va_list ap;
15252         vsscanf("from", "%d", ap)
15253   ;
15254   return 0;
15255 }
15256 _ACEOF
15257 rm -f conftest.$ac_objext conftest$ac_exeext
15258 if { (eval echo "$as_me:15258: \"$ac_link\"") >&5
15259   (eval $ac_link) 2>&5
15260   ac_status=$?
15261   echo "$as_me:15261: \$? = $ac_status" >&5
15262   (exit $ac_status); } &&
15263          { ac_try='test -s conftest$ac_exeext'
15264   { (eval echo "$as_me:15264: \"$ac_try\"") >&5
15265   (eval $ac_try) 2>&5
15266   ac_status=$?
15267   echo "$as_me:15267: \$? = $ac_status" >&5
15268   (exit $ac_status); }; }; then
15269   cf_cv_func_vsscanf=vsscanf
15270 else
15271   echo "$as_me: failed program was:" >&5
15272 cat conftest.$ac_ext >&5
15273
15274 cat >conftest.$ac_ext <<_ACEOF
15275 #line 15275 "configure"
15276 #include "confdefs.h"
15277
15278 #include <stdarg.h>
15279 #include <stdio.h>
15280 int
15281 main ()
15282 {
15283
15284     FILE strbuf;
15285     char *str = "from";
15286
15287     strbuf._flag = _IOREAD;
15288     strbuf._ptr = strbuf._base = (unsigned char *) str;
15289     strbuf._cnt = strlen(str);
15290     strbuf._file = _NFILE;
15291     return (vfscanf(&strbuf, "%d", ap))
15292   ;
15293   return 0;
15294 }
15295 _ACEOF
15296 rm -f conftest.$ac_objext conftest$ac_exeext
15297 if { (eval echo "$as_me:15297: \"$ac_link\"") >&5
15298   (eval $ac_link) 2>&5
15299   ac_status=$?
15300   echo "$as_me:15300: \$? = $ac_status" >&5
15301   (exit $ac_status); } &&
15302          { ac_try='test -s conftest$ac_exeext'
15303   { (eval echo "$as_me:15303: \"$ac_try\"") >&5
15304   (eval $ac_try) 2>&5
15305   ac_status=$?
15306   echo "$as_me:15306: \$? = $ac_status" >&5
15307   (exit $ac_status); }; }; then
15308   cf_cv_func_vsscanf=vfscanf
15309 else
15310   echo "$as_me: failed program was:" >&5
15311 cat conftest.$ac_ext >&5
15312
15313 cat >conftest.$ac_ext <<_ACEOF
15314 #line 15314 "configure"
15315 #include "confdefs.h"
15316
15317 #include <stdarg.h>
15318 #include <stdio.h>
15319 int
15320 main ()
15321 {
15322
15323     FILE strbuf;
15324     char *str = "from";
15325
15326     strbuf._flag = _IOREAD;
15327     strbuf._ptr = strbuf._base = (unsigned char *) str;
15328     strbuf._cnt = strlen(str);
15329     strbuf._file = _NFILE;
15330     return (_doscan(&strbuf, "%d", ap))
15331   ;
15332   return 0;
15333 }
15334 _ACEOF
15335 rm -f conftest.$ac_objext conftest$ac_exeext
15336 if { (eval echo "$as_me:15336: \"$ac_link\"") >&5
15337   (eval $ac_link) 2>&5
15338   ac_status=$?
15339   echo "$as_me:15339: \$? = $ac_status" >&5
15340   (exit $ac_status); } &&
15341          { ac_try='test -s conftest$ac_exeext'
15342   { (eval echo "$as_me:15342: \"$ac_try\"") >&5
15343   (eval $ac_try) 2>&5
15344   ac_status=$?
15345   echo "$as_me:15345: \$? = $ac_status" >&5
15346   (exit $ac_status); }; }; then
15347   cf_cv_func_vsscanf=_doscan
15348 else
15349   echo "$as_me: failed program was:" >&5
15350 cat conftest.$ac_ext >&5
15351
15352 cf_cv_func_vsscanf=no
15353 fi
15354 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15355 fi
15356 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15357 fi
15358 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15359 fi
15360 echo "$as_me:15360: result: $cf_cv_func_vsscanf" >&5
15361 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
15362
15363 case $cf_cv_func_vsscanf in #(vi
15364 vsscanf) cat >>confdefs.h <<\EOF
15365 #define HAVE_VSSCANF 1
15366 EOF
15367 ;; #(vi
15368 vfscanf) cat >>confdefs.h <<\EOF
15369 #define HAVE_VFSCANF 1
15370 EOF
15371 ;; #(vi
15372 _doscan) cat >>confdefs.h <<\EOF
15373 #define HAVE__DOSCAN 1
15374 EOF
15375 ;;
15376 esac
15377
15378 echo "$as_me:15378: checking for working mkstemp" >&5
15379 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
15380 if test "${cf_cv_func_mkstemp+set}" = set; then
15381   echo $ECHO_N "(cached) $ECHO_C" >&6
15382 else
15383
15384 rm -rf conftest*
15385 if test "$cross_compiling" = yes; then
15386   echo "$as_me:15386: checking for mkstemp" >&5
15387 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
15388 if test "${ac_cv_func_mkstemp+set}" = set; then
15389   echo $ECHO_N "(cached) $ECHO_C" >&6
15390 else
15391   cat >conftest.$ac_ext <<_ACEOF
15392 #line 15392 "configure"
15393 #include "confdefs.h"
15394 /* System header to define __stub macros and hopefully few prototypes,
15395     which can conflict with char mkstemp (); below.  */
15396 #include <assert.h>
15397 /* Override any gcc2 internal prototype to avoid an error.  */
15398 #ifdef __cplusplus
15399 extern "C"
15400 #endif
15401 /* We use char because int might match the return type of a gcc2
15402    builtin and then its argument prototype would still apply.  */
15403 char mkstemp ();
15404 char (*f) ();
15405
15406 int
15407 main ()
15408 {
15409 /* The GNU C library defines this for functions which it implements
15410     to always fail with ENOSYS.  Some functions are actually named
15411     something starting with __ and the normal name is an alias.  */
15412 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
15413 choke me
15414 #else
15415 f = mkstemp;
15416 #endif
15417
15418   ;
15419   return 0;
15420 }
15421 _ACEOF
15422 rm -f conftest.$ac_objext conftest$ac_exeext
15423 if { (eval echo "$as_me:15423: \"$ac_link\"") >&5
15424   (eval $ac_link) 2>&5
15425   ac_status=$?
15426   echo "$as_me:15426: \$? = $ac_status" >&5
15427   (exit $ac_status); } &&
15428          { ac_try='test -s conftest$ac_exeext'
15429   { (eval echo "$as_me:15429: \"$ac_try\"") >&5
15430   (eval $ac_try) 2>&5
15431   ac_status=$?
15432   echo "$as_me:15432: \$? = $ac_status" >&5
15433   (exit $ac_status); }; }; then
15434   ac_cv_func_mkstemp=yes
15435 else
15436   echo "$as_me: failed program was:" >&5
15437 cat conftest.$ac_ext >&5
15438 ac_cv_func_mkstemp=no
15439 fi
15440 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15441 fi
15442 echo "$as_me:15442: result: $ac_cv_func_mkstemp" >&5
15443 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
15444
15445 else
15446   cat >conftest.$ac_ext <<_ACEOF
15447 #line 15447 "configure"
15448 #include "confdefs.h"
15449
15450 #include <sys/types.h>
15451 #include <stdlib.h>
15452 #include <stdio.h>
15453 #include <string.h>
15454 #include <sys/stat.h>
15455 int main()
15456 {
15457         char *tmpl = "conftestXXXXXX";
15458         char name[2][80];
15459         int n;
15460         int result = 0;
15461         int fd;
15462         struct stat sb;
15463
15464         umask(077);
15465         for (n = 0; n < 2; ++n) {
15466                 strcpy(name[n], tmpl);
15467                 if ((fd = mkstemp(name[n])) >= 0) {
15468                         if (!strcmp(name[n], tmpl)
15469                          || stat(name[n], &sb) != 0
15470                          || (sb.st_mode & S_IFMT) != S_IFREG
15471                          || (sb.st_mode & 077) != 0) {
15472                                 result = 1;
15473                         }
15474                         close(fd);
15475                 }
15476         }
15477         if (result == 0
15478          && !strcmp(name[0], name[1]))
15479                 result = 1;
15480         ${cf_cv_main_return:-return}(result);
15481 }
15482
15483 _ACEOF
15484 rm -f conftest$ac_exeext
15485 if { (eval echo "$as_me:15485: \"$ac_link\"") >&5
15486   (eval $ac_link) 2>&5
15487   ac_status=$?
15488   echo "$as_me:15488: \$? = $ac_status" >&5
15489   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15490   { (eval echo "$as_me:15490: \"$ac_try\"") >&5
15491   (eval $ac_try) 2>&5
15492   ac_status=$?
15493   echo "$as_me:15493: \$? = $ac_status" >&5
15494   (exit $ac_status); }; }; then
15495   cf_cv_func_mkstemp=yes
15496
15497 else
15498   echo "$as_me: program exited with status $ac_status" >&5
15499 echo "$as_me: failed program was:" >&5
15500 cat conftest.$ac_ext >&5
15501 cf_cv_func_mkstemp=no
15502
15503 fi
15504 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15505 fi
15506
15507 fi
15508 echo "$as_me:15508: result: $cf_cv_func_mkstemp" >&5
15509 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
15510 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
15511         cat >>confdefs.h <<\EOF
15512 #define HAVE_MKSTEMP 1
15513 EOF
15514
15515 fi
15516
15517 # setup for prototype of fallback for vsscanf()
15518
15519 if test "$cf_cv_func_vsscanf" = vsscanf ; then
15520         HAVE_VSSCANF=1
15521 else
15522         HAVE_VSSCANF=0
15523 fi
15524
15525 if test "$cross_compiling" = yes ; then
15526         { echo "$as_me:15526: WARNING: cross compiling: assume setvbuf params not reversed" >&5
15527 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
15528 else
15529         echo "$as_me:15529: checking whether setvbuf arguments are reversed" >&5
15530 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
15531 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
15532   echo $ECHO_N "(cached) $ECHO_C" >&6
15533 else
15534   if test "$cross_compiling" = yes; then
15535   { { echo "$as_me:15535: error: cannot run test program while cross compiling" >&5
15536 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15537    { (exit 1); exit 1; }; }
15538 else
15539   cat >conftest.$ac_ext <<_ACEOF
15540 #line 15540 "configure"
15541 #include "confdefs.h"
15542 #include <stdio.h>
15543 /* If setvbuf has the reversed format, exit 0. */
15544 int
15545 main ()
15546 {
15547   /* This call has the arguments reversed.
15548      A reversed system may check and see that the address of main
15549      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
15550   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
15551     $ac_main_return(1);
15552   putc('\r', stdout);
15553   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
15554 }
15555 _ACEOF
15556 rm -f conftest$ac_exeext
15557 if { (eval echo "$as_me:15557: \"$ac_link\"") >&5
15558   (eval $ac_link) 2>&5
15559   ac_status=$?
15560   echo "$as_me:15560: \$? = $ac_status" >&5
15561   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15562   { (eval echo "$as_me:15562: \"$ac_try\"") >&5
15563   (eval $ac_try) 2>&5
15564   ac_status=$?
15565   echo "$as_me:15565: \$? = $ac_status" >&5
15566   (exit $ac_status); }; }; then
15567   ac_cv_func_setvbuf_reversed=yes
15568 else
15569   echo "$as_me: program exited with status $ac_status" >&5
15570 echo "$as_me: failed program was:" >&5
15571 cat conftest.$ac_ext >&5
15572 ac_cv_func_setvbuf_reversed=no
15573 fi
15574 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15575 fi
15576 rm -f core core.* *.core
15577 fi
15578 echo "$as_me:15578: result: $ac_cv_func_setvbuf_reversed" >&5
15579 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
15580 if test $ac_cv_func_setvbuf_reversed = yes; then
15581
15582 cat >>confdefs.h <<\EOF
15583 #define SETVBUF_REVERSED 1
15584 EOF
15585
15586 fi
15587
15588 fi
15589 echo "$as_me:15589: checking return type of signal handlers" >&5
15590 echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
15591 if test "${ac_cv_type_signal+set}" = set; then
15592   echo $ECHO_N "(cached) $ECHO_C" >&6
15593 else
15594   cat >conftest.$ac_ext <<_ACEOF
15595 #line 15595 "configure"
15596 #include "confdefs.h"
15597 #include <sys/types.h>
15598 #include <signal.h>
15599 #ifdef signal
15600 # undef signal
15601 #endif
15602 #ifdef __cplusplus
15603 extern "C" void (*signal (int, void (*)(int)))(int);
15604 #else
15605 void (*signal ()) ();
15606 #endif
15607
15608 int
15609 main ()
15610 {
15611 int i;
15612   ;
15613   return 0;
15614 }
15615 _ACEOF
15616 rm -f conftest.$ac_objext
15617 if { (eval echo "$as_me:15617: \"$ac_compile\"") >&5
15618   (eval $ac_compile) 2>&5
15619   ac_status=$?
15620   echo "$as_me:15620: \$? = $ac_status" >&5
15621   (exit $ac_status); } &&
15622          { ac_try='test -s conftest.$ac_objext'
15623   { (eval echo "$as_me:15623: \"$ac_try\"") >&5
15624   (eval $ac_try) 2>&5
15625   ac_status=$?
15626   echo "$as_me:15626: \$? = $ac_status" >&5
15627   (exit $ac_status); }; }; then
15628   ac_cv_type_signal=void
15629 else
15630   echo "$as_me: failed program was:" >&5
15631 cat conftest.$ac_ext >&5
15632 ac_cv_type_signal=int
15633 fi
15634 rm -f conftest.$ac_objext conftest.$ac_ext
15635 fi
15636 echo "$as_me:15636: result: $ac_cv_type_signal" >&5
15637 echo "${ECHO_T}$ac_cv_type_signal" >&6
15638
15639 cat >>confdefs.h <<EOF
15640 #define RETSIGTYPE $ac_cv_type_signal
15641 EOF
15642
15643 echo "$as_me:15643: checking for type sigaction_t" >&5
15644 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
15645 if test "${cf_cv_type_sigaction+set}" = set; then
15646   echo $ECHO_N "(cached) $ECHO_C" >&6
15647 else
15648
15649         cat >conftest.$ac_ext <<_ACEOF
15650 #line 15650 "configure"
15651 #include "confdefs.h"
15652
15653 #include <signal.h>
15654 int
15655 main ()
15656 {
15657 sigaction_t x
15658   ;
15659   return 0;
15660 }
15661 _ACEOF
15662 rm -f conftest.$ac_objext
15663 if { (eval echo "$as_me:15663: \"$ac_compile\"") >&5
15664   (eval $ac_compile) 2>&5
15665   ac_status=$?
15666   echo "$as_me:15666: \$? = $ac_status" >&5
15667   (exit $ac_status); } &&
15668          { ac_try='test -s conftest.$ac_objext'
15669   { (eval echo "$as_me:15669: \"$ac_try\"") >&5
15670   (eval $ac_try) 2>&5
15671   ac_status=$?
15672   echo "$as_me:15672: \$? = $ac_status" >&5
15673   (exit $ac_status); }; }; then
15674   cf_cv_type_sigaction=yes
15675 else
15676   echo "$as_me: failed program was:" >&5
15677 cat conftest.$ac_ext >&5
15678 cf_cv_type_sigaction=no
15679 fi
15680 rm -f conftest.$ac_objext conftest.$ac_ext
15681 fi
15682
15683 echo "$as_me:15683: result: $cf_cv_type_sigaction" >&5
15684 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
15685 test "$cf_cv_type_sigaction" = yes && cat >>confdefs.h <<\EOF
15686 #define HAVE_TYPE_SIGACTION 1
15687 EOF
15688
15689 echo "$as_me:15689: checking declaration of size-change" >&5
15690 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
15691 if test "${cf_cv_sizechange+set}" = set; then
15692   echo $ECHO_N "(cached) $ECHO_C" >&6
15693 else
15694
15695     cf_cv_sizechange=unknown
15696     cf_save_CPPFLAGS="$CPPFLAGS"
15697
15698 for cf_opts in "" "NEED_PTEM_H"
15699 do
15700
15701     CPPFLAGS="$cf_save_CPPFLAGS"
15702     test -n "$cf_opts" && CPPFLAGS="$CPPFLAGS -D$cf_opts"
15703     cat >conftest.$ac_ext <<_ACEOF
15704 #line 15704 "configure"
15705 #include "confdefs.h"
15706 #include <sys/types.h>
15707 #ifdef HAVE_TERMIOS_H
15708 #include <termios.h>
15709 #else
15710 #ifdef HAVE_TERMIO_H
15711 #include <termio.h>
15712 #endif
15713 #endif
15714 #ifdef NEED_PTEM_H
15715 /* This is a workaround for SCO:  they neglected to define struct winsize in
15716  * termios.h -- it's only in termio.h and ptem.h
15717  */
15718 #include        <sys/stream.h>
15719 #include        <sys/ptem.h>
15720 #endif
15721 #if !defined(sun) || !defined(HAVE_TERMIOS_H)
15722 #include <sys/ioctl.h>
15723 #endif
15724
15725 int
15726 main ()
15727 {
15728
15729 #ifdef TIOCGSIZE
15730         struct ttysize win;     /* FIXME: what system is this? */
15731         int y = win.ts_lines;
15732         int x = win.ts_cols;
15733 #else
15734 #ifdef TIOCGWINSZ
15735         struct winsize win;
15736         int y = win.ws_row;
15737         int x = win.ws_col;
15738 #else
15739         no TIOCGSIZE or TIOCGWINSZ
15740 #endif /* TIOCGWINSZ */
15741 #endif /* TIOCGSIZE */
15742
15743   ;
15744   return 0;
15745 }
15746 _ACEOF
15747 rm -f conftest.$ac_objext
15748 if { (eval echo "$as_me:15748: \"$ac_compile\"") >&5
15749   (eval $ac_compile) 2>&5
15750   ac_status=$?
15751   echo "$as_me:15751: \$? = $ac_status" >&5
15752   (exit $ac_status); } &&
15753          { ac_try='test -s conftest.$ac_objext'
15754   { (eval echo "$as_me:15754: \"$ac_try\"") >&5
15755   (eval $ac_try) 2>&5
15756   ac_status=$?
15757   echo "$as_me:15757: \$? = $ac_status" >&5
15758   (exit $ac_status); }; }; then
15759   cf_cv_sizechange=yes
15760 else
15761   echo "$as_me: failed program was:" >&5
15762 cat conftest.$ac_ext >&5
15763 cf_cv_sizechange=no
15764 fi
15765 rm -f conftest.$ac_objext conftest.$ac_ext
15766
15767         CPPFLAGS="$cf_save_CPPFLAGS"
15768         if test "$cf_cv_sizechange" = yes ; then
15769                 echo "size-change succeeded ($cf_opts)" >&5
15770                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
15771                 break
15772         fi
15773 done
15774
15775 fi
15776 echo "$as_me:15776: result: $cf_cv_sizechange" >&5
15777 echo "${ECHO_T}$cf_cv_sizechange" >&6
15778 if test "$cf_cv_sizechange" != no ; then
15779         cat >>confdefs.h <<\EOF
15780 #define HAVE_SIZECHANGE 1
15781 EOF
15782
15783         case $cf_cv_sizechange in #(vi
15784         NEED*)
15785                 cat >>confdefs.h <<EOF
15786 #define $cf_cv_sizechange  1
15787 EOF
15788
15789                 ;;
15790         esac
15791 fi
15792
15793 echo "$as_me:15793: checking for memmove" >&5
15794 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
15795 if test "${ac_cv_func_memmove+set}" = set; then
15796   echo $ECHO_N "(cached) $ECHO_C" >&6
15797 else
15798   cat >conftest.$ac_ext <<_ACEOF
15799 #line 15799 "configure"
15800 #include "confdefs.h"
15801 /* System header to define __stub macros and hopefully few prototypes,
15802     which can conflict with char memmove (); below.  */
15803 #include <assert.h>
15804 /* Override any gcc2 internal prototype to avoid an error.  */
15805 #ifdef __cplusplus
15806 extern "C"
15807 #endif
15808 /* We use char because int might match the return type of a gcc2
15809    builtin and then its argument prototype would still apply.  */
15810 char memmove ();
15811 char (*f) ();
15812
15813 int
15814 main ()
15815 {
15816 /* The GNU C library defines this for functions which it implements
15817     to always fail with ENOSYS.  Some functions are actually named
15818     something starting with __ and the normal name is an alias.  */
15819 #if defined (__stub_memmove) || defined (__stub___memmove)
15820 choke me
15821 #else
15822 f = memmove;
15823 #endif
15824
15825   ;
15826   return 0;
15827 }
15828 _ACEOF
15829 rm -f conftest.$ac_objext conftest$ac_exeext
15830 if { (eval echo "$as_me:15830: \"$ac_link\"") >&5
15831   (eval $ac_link) 2>&5
15832   ac_status=$?
15833   echo "$as_me:15833: \$? = $ac_status" >&5
15834   (exit $ac_status); } &&
15835          { ac_try='test -s conftest$ac_exeext'
15836   { (eval echo "$as_me:15836: \"$ac_try\"") >&5
15837   (eval $ac_try) 2>&5
15838   ac_status=$?
15839   echo "$as_me:15839: \$? = $ac_status" >&5
15840   (exit $ac_status); }; }; then
15841   ac_cv_func_memmove=yes
15842 else
15843   echo "$as_me: failed program was:" >&5
15844 cat conftest.$ac_ext >&5
15845 ac_cv_func_memmove=no
15846 fi
15847 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15848 fi
15849 echo "$as_me:15849: result: $ac_cv_func_memmove" >&5
15850 echo "${ECHO_T}$ac_cv_func_memmove" >&6
15851 if test $ac_cv_func_memmove = yes; then
15852   :
15853 else
15854
15855 echo "$as_me:15855: checking for bcopy" >&5
15856 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
15857 if test "${ac_cv_func_bcopy+set}" = set; then
15858   echo $ECHO_N "(cached) $ECHO_C" >&6
15859 else
15860   cat >conftest.$ac_ext <<_ACEOF
15861 #line 15861 "configure"
15862 #include "confdefs.h"
15863 /* System header to define __stub macros and hopefully few prototypes,
15864     which can conflict with char bcopy (); below.  */
15865 #include <assert.h>
15866 /* Override any gcc2 internal prototype to avoid an error.  */
15867 #ifdef __cplusplus
15868 extern "C"
15869 #endif
15870 /* We use char because int might match the return type of a gcc2
15871    builtin and then its argument prototype would still apply.  */
15872 char bcopy ();
15873 char (*f) ();
15874
15875 int
15876 main ()
15877 {
15878 /* The GNU C library defines this for functions which it implements
15879     to always fail with ENOSYS.  Some functions are actually named
15880     something starting with __ and the normal name is an alias.  */
15881 #if defined (__stub_bcopy) || defined (__stub___bcopy)
15882 choke me
15883 #else
15884 f = bcopy;
15885 #endif
15886
15887   ;
15888   return 0;
15889 }
15890 _ACEOF
15891 rm -f conftest.$ac_objext conftest$ac_exeext
15892 if { (eval echo "$as_me:15892: \"$ac_link\"") >&5
15893   (eval $ac_link) 2>&5
15894   ac_status=$?
15895   echo "$as_me:15895: \$? = $ac_status" >&5
15896   (exit $ac_status); } &&
15897          { ac_try='test -s conftest$ac_exeext'
15898   { (eval echo "$as_me:15898: \"$ac_try\"") >&5
15899   (eval $ac_try) 2>&5
15900   ac_status=$?
15901   echo "$as_me:15901: \$? = $ac_status" >&5
15902   (exit $ac_status); }; }; then
15903   ac_cv_func_bcopy=yes
15904 else
15905   echo "$as_me: failed program was:" >&5
15906 cat conftest.$ac_ext >&5
15907 ac_cv_func_bcopy=no
15908 fi
15909 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15910 fi
15911 echo "$as_me:15911: result: $ac_cv_func_bcopy" >&5
15912 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
15913 if test $ac_cv_func_bcopy = yes; then
15914
15915         echo "$as_me:15915: checking if bcopy does overlapping moves" >&5
15916 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
15917 if test "${cf_cv_good_bcopy+set}" = set; then
15918   echo $ECHO_N "(cached) $ECHO_C" >&6
15919 else
15920
15921                 if test "$cross_compiling" = yes; then
15922   cf_cv_good_bcopy=unknown
15923 else
15924   cat >conftest.$ac_ext <<_ACEOF
15925 #line 15925 "configure"
15926 #include "confdefs.h"
15927
15928 int main() {
15929         static char data[] = "abcdefghijklmnopqrstuwwxyz";
15930         char temp[40];
15931         bcopy(data, temp, sizeof(data));
15932         bcopy(temp+10, temp, 15);
15933         bcopy(temp+5, temp+15, 10);
15934         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
15935 }
15936
15937 _ACEOF
15938 rm -f conftest$ac_exeext
15939 if { (eval echo "$as_me:15939: \"$ac_link\"") >&5
15940   (eval $ac_link) 2>&5
15941   ac_status=$?
15942   echo "$as_me:15942: \$? = $ac_status" >&5
15943   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15944   { (eval echo "$as_me:15944: \"$ac_try\"") >&5
15945   (eval $ac_try) 2>&5
15946   ac_status=$?
15947   echo "$as_me:15947: \$? = $ac_status" >&5
15948   (exit $ac_status); }; }; then
15949   cf_cv_good_bcopy=yes
15950 else
15951   echo "$as_me: program exited with status $ac_status" >&5
15952 echo "$as_me: failed program was:" >&5
15953 cat conftest.$ac_ext >&5
15954 cf_cv_good_bcopy=no
15955 fi
15956 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15957 fi
15958
15959 fi
15960 echo "$as_me:15960: result: $cf_cv_good_bcopy" >&5
15961 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
15962
15963 else
15964   cf_cv_good_bcopy=no
15965 fi
15966
15967         if test "$cf_cv_good_bcopy" = yes ; then
15968                 cat >>confdefs.h <<\EOF
15969 #define USE_OK_BCOPY 1
15970 EOF
15971
15972         else
15973                 cat >>confdefs.h <<\EOF
15974 #define USE_MY_MEMMOVE 1
15975 EOF
15976
15977         fi
15978
15979 fi
15980
15981 echo "$as_me:15981: checking if poll really works" >&5
15982 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
15983 if test "${cf_cv_working_poll+set}" = set; then
15984   echo $ECHO_N "(cached) $ECHO_C" >&6
15985 else
15986
15987 if test "$cross_compiling" = yes; then
15988   cf_cv_working_poll=unknown
15989 else
15990   cat >conftest.$ac_ext <<_ACEOF
15991 #line 15991 "configure"
15992 #include "confdefs.h"
15993
15994 #include <stdio.h>
15995 #ifdef HAVE_POLL_H
15996 #include <poll.h>
15997 #else
15998 #include <sys/poll.h>
15999 #endif
16000 int main() {
16001         struct pollfd myfds;
16002         int ret;
16003
16004         myfds.fd = 0;
16005         myfds.events = POLLIN;
16006
16007         ret = poll(&myfds, 1, 100);
16008         ${cf_cv_main_return:-return}(ret != 0);
16009 }
16010 _ACEOF
16011 rm -f conftest$ac_exeext
16012 if { (eval echo "$as_me:16012: \"$ac_link\"") >&5
16013   (eval $ac_link) 2>&5
16014   ac_status=$?
16015   echo "$as_me:16015: \$? = $ac_status" >&5
16016   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16017   { (eval echo "$as_me:16017: \"$ac_try\"") >&5
16018   (eval $ac_try) 2>&5
16019   ac_status=$?
16020   echo "$as_me:16020: \$? = $ac_status" >&5
16021   (exit $ac_status); }; }; then
16022   cf_cv_working_poll=yes
16023 else
16024   echo "$as_me: program exited with status $ac_status" >&5
16025 echo "$as_me: failed program was:" >&5
16026 cat conftest.$ac_ext >&5
16027 cf_cv_working_poll=no
16028 fi
16029 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16030 fi
16031 fi
16032 echo "$as_me:16032: result: $cf_cv_working_poll" >&5
16033 echo "${ECHO_T}$cf_cv_working_poll" >&6
16034 test "$cf_cv_working_poll" = "yes" && cat >>confdefs.h <<\EOF
16035 #define HAVE_WORKING_POLL 1
16036 EOF
16037
16038 echo "$as_me:16038: checking for va_copy" >&5
16039 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
16040 if test "${cf_cv_have_va_copy+set}" = set; then
16041   echo $ECHO_N "(cached) $ECHO_C" >&6
16042 else
16043
16044 cat >conftest.$ac_ext <<_ACEOF
16045 #line 16045 "configure"
16046 #include "confdefs.h"
16047
16048 #include <stdarg.h>
16049
16050 int
16051 main ()
16052 {
16053
16054         static va_list dst;
16055         static va_list src;
16056         va_copy(dst, src)
16057   ;
16058   return 0;
16059 }
16060 _ACEOF
16061 rm -f conftest.$ac_objext conftest$ac_exeext
16062 if { (eval echo "$as_me:16062: \"$ac_link\"") >&5
16063   (eval $ac_link) 2>&5
16064   ac_status=$?
16065   echo "$as_me:16065: \$? = $ac_status" >&5
16066   (exit $ac_status); } &&
16067          { ac_try='test -s conftest$ac_exeext'
16068   { (eval echo "$as_me:16068: \"$ac_try\"") >&5
16069   (eval $ac_try) 2>&5
16070   ac_status=$?
16071   echo "$as_me:16071: \$? = $ac_status" >&5
16072   (exit $ac_status); }; }; then
16073   cf_cv_have_va_copy=yes
16074 else
16075   echo "$as_me: failed program was:" >&5
16076 cat conftest.$ac_ext >&5
16077 cf_cv_have_va_copy=no
16078 fi
16079 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16080 fi
16081 echo "$as_me:16081: result: $cf_cv_have_va_copy" >&5
16082 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
16083
16084 test "$cf_cv_have_va_copy" = yes && cat >>confdefs.h <<\EOF
16085 #define HAVE_VA_COPY 1
16086 EOF
16087
16088 echo "$as_me:16088: checking for __va_copy" >&5
16089 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
16090 if test "${cf_cv_have___va_copy+set}" = set; then
16091   echo $ECHO_N "(cached) $ECHO_C" >&6
16092 else
16093
16094 cat >conftest.$ac_ext <<_ACEOF
16095 #line 16095 "configure"
16096 #include "confdefs.h"
16097
16098 #include <stdarg.h>
16099
16100 int
16101 main ()
16102 {
16103
16104         static va_list dst;
16105         static va_list src;
16106         __va_copy(dst, src)
16107   ;
16108   return 0;
16109 }
16110 _ACEOF
16111 rm -f conftest.$ac_objext conftest$ac_exeext
16112 if { (eval echo "$as_me:16112: \"$ac_link\"") >&5
16113   (eval $ac_link) 2>&5
16114   ac_status=$?
16115   echo "$as_me:16115: \$? = $ac_status" >&5
16116   (exit $ac_status); } &&
16117          { ac_try='test -s conftest$ac_exeext'
16118   { (eval echo "$as_me:16118: \"$ac_try\"") >&5
16119   (eval $ac_try) 2>&5
16120   ac_status=$?
16121   echo "$as_me:16121: \$? = $ac_status" >&5
16122   (exit $ac_status); }; }; then
16123   cf_cv_have___va_copy=yes
16124 else
16125   echo "$as_me: failed program was:" >&5
16126 cat conftest.$ac_ext >&5
16127 cf_cv_have___va_copy=no
16128 fi
16129 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16130 fi
16131 echo "$as_me:16131: result: $cf_cv_have___va_copy" >&5
16132 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
16133
16134 test "$cf_cv_have___va_copy" = yes && cat >>confdefs.h <<\EOF
16135 #define HAVE___VA_COPY 1
16136 EOF
16137
16138 echo "$as_me:16138: checking for pid_t" >&5
16139 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
16140 if test "${ac_cv_type_pid_t+set}" = set; then
16141   echo $ECHO_N "(cached) $ECHO_C" >&6
16142 else
16143   cat >conftest.$ac_ext <<_ACEOF
16144 #line 16144 "configure"
16145 #include "confdefs.h"
16146 $ac_includes_default
16147 int
16148 main ()
16149 {
16150 if ((pid_t *) 0)
16151   return 0;
16152 if (sizeof (pid_t))
16153   return 0;
16154   ;
16155   return 0;
16156 }
16157 _ACEOF
16158 rm -f conftest.$ac_objext
16159 if { (eval echo "$as_me:16159: \"$ac_compile\"") >&5
16160   (eval $ac_compile) 2>&5
16161   ac_status=$?
16162   echo "$as_me:16162: \$? = $ac_status" >&5
16163   (exit $ac_status); } &&
16164          { ac_try='test -s conftest.$ac_objext'
16165   { (eval echo "$as_me:16165: \"$ac_try\"") >&5
16166   (eval $ac_try) 2>&5
16167   ac_status=$?
16168   echo "$as_me:16168: \$? = $ac_status" >&5
16169   (exit $ac_status); }; }; then
16170   ac_cv_type_pid_t=yes
16171 else
16172   echo "$as_me: failed program was:" >&5
16173 cat conftest.$ac_ext >&5
16174 ac_cv_type_pid_t=no
16175 fi
16176 rm -f conftest.$ac_objext conftest.$ac_ext
16177 fi
16178 echo "$as_me:16178: result: $ac_cv_type_pid_t" >&5
16179 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
16180 if test $ac_cv_type_pid_t = yes; then
16181   :
16182 else
16183
16184 cat >>confdefs.h <<EOF
16185 #define pid_t int
16186 EOF
16187
16188 fi
16189
16190 for ac_header in unistd.h vfork.h
16191 do
16192 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16193 echo "$as_me:16193: checking for $ac_header" >&5
16194 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16195 if eval "test \"\${$as_ac_Header+set}\" = set"; then
16196   echo $ECHO_N "(cached) $ECHO_C" >&6
16197 else
16198   cat >conftest.$ac_ext <<_ACEOF
16199 #line 16199 "configure"
16200 #include "confdefs.h"
16201 #include <$ac_header>
16202 _ACEOF
16203 if { (eval echo "$as_me:16203: \"$ac_cpp conftest.$ac_ext\"") >&5
16204   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16205   ac_status=$?
16206   egrep -v '^ *\+' conftest.er1 >conftest.err
16207   rm -f conftest.er1
16208   cat conftest.err >&5
16209   echo "$as_me:16209: \$? = $ac_status" >&5
16210   (exit $ac_status); } >/dev/null; then
16211   if test -s conftest.err; then
16212     ac_cpp_err=$ac_c_preproc_warn_flag
16213   else
16214     ac_cpp_err=
16215   fi
16216 else
16217   ac_cpp_err=yes
16218 fi
16219 if test -z "$ac_cpp_err"; then
16220   eval "$as_ac_Header=yes"
16221 else
16222   echo "$as_me: failed program was:" >&5
16223   cat conftest.$ac_ext >&5
16224   eval "$as_ac_Header=no"
16225 fi
16226 rm -f conftest.err conftest.$ac_ext
16227 fi
16228 echo "$as_me:16228: result: `eval echo '${'$as_ac_Header'}'`" >&5
16229 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16230 if test `eval echo '${'$as_ac_Header'}'` = yes; then
16231   cat >>confdefs.h <<EOF
16232 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16233 EOF
16234
16235 fi
16236 done
16237
16238 for ac_func in fork vfork
16239 do
16240 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16241 echo "$as_me:16241: checking for $ac_func" >&5
16242 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16243 if eval "test \"\${$as_ac_var+set}\" = set"; then
16244   echo $ECHO_N "(cached) $ECHO_C" >&6
16245 else
16246   cat >conftest.$ac_ext <<_ACEOF
16247 #line 16247 "configure"
16248 #include "confdefs.h"
16249 /* System header to define __stub macros and hopefully few prototypes,
16250     which can conflict with char $ac_func (); below.  */
16251 #include <assert.h>
16252 /* Override any gcc2 internal prototype to avoid an error.  */
16253 #ifdef __cplusplus
16254 extern "C"
16255 #endif
16256 /* We use char because int might match the return type of a gcc2
16257    builtin and then its argument prototype would still apply.  */
16258 char $ac_func ();
16259 char (*f) ();
16260
16261 int
16262 main ()
16263 {
16264 /* The GNU C library defines this for functions which it implements
16265     to always fail with ENOSYS.  Some functions are actually named
16266     something starting with __ and the normal name is an alias.  */
16267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16268 choke me
16269 #else
16270 f = $ac_func;
16271 #endif
16272
16273   ;
16274   return 0;
16275 }
16276 _ACEOF
16277 rm -f conftest.$ac_objext conftest$ac_exeext
16278 if { (eval echo "$as_me:16278: \"$ac_link\"") >&5
16279   (eval $ac_link) 2>&5
16280   ac_status=$?
16281   echo "$as_me:16281: \$? = $ac_status" >&5
16282   (exit $ac_status); } &&
16283          { ac_try='test -s conftest$ac_exeext'
16284   { (eval echo "$as_me:16284: \"$ac_try\"") >&5
16285   (eval $ac_try) 2>&5
16286   ac_status=$?
16287   echo "$as_me:16287: \$? = $ac_status" >&5
16288   (exit $ac_status); }; }; then
16289   eval "$as_ac_var=yes"
16290 else
16291   echo "$as_me: failed program was:" >&5
16292 cat conftest.$ac_ext >&5
16293 eval "$as_ac_var=no"
16294 fi
16295 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16296 fi
16297 echo "$as_me:16297: result: `eval echo '${'$as_ac_var'}'`" >&5
16298 echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16299 if test `eval echo '${'$as_ac_var'}'` = yes; then
16300   cat >>confdefs.h <<EOF
16301 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16302 EOF
16303
16304 fi
16305 done
16306
16307 ac_cv_func_fork_works=$ac_cv_func_fork
16308 if test "x$ac_cv_func_fork" = xyes; then
16309   echo "$as_me:16309: checking for working fork" >&5
16310 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
16311 if test "${ac_cv_func_fork_works+set}" = set; then
16312   echo $ECHO_N "(cached) $ECHO_C" >&6
16313 else
16314   if test "$cross_compiling" = yes; then
16315   ac_cv_func_fork_works=cross
16316 else
16317   cat >conftest.$ac_ext <<_ACEOF
16318 /* By Rüdiger Kuhlmann. */
16319       #include <sys/types.h>
16320       #if HAVE_UNISTD_H
16321       # include <unistd.h>
16322       #endif
16323       /* Some systems only have a dummy stub for fork() */
16324       int main ()
16325       {
16326         if (fork() < 0)
16327           $ac_main_return (1);
16328         $ac_main_return (0);
16329       }
16330 _ACEOF
16331 rm -f conftest$ac_exeext
16332 if { (eval echo "$as_me:16332: \"$ac_link\"") >&5
16333   (eval $ac_link) 2>&5
16334   ac_status=$?
16335   echo "$as_me:16335: \$? = $ac_status" >&5
16336   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16337   { (eval echo "$as_me:16337: \"$ac_try\"") >&5
16338   (eval $ac_try) 2>&5
16339   ac_status=$?
16340   echo "$as_me:16340: \$? = $ac_status" >&5
16341   (exit $ac_status); }; }; then
16342   ac_cv_func_fork_works=yes
16343 else
16344   echo "$as_me: program exited with status $ac_status" >&5
16345 echo "$as_me: failed program was:" >&5
16346 cat conftest.$ac_ext >&5
16347 ac_cv_func_fork_works=no
16348 fi
16349 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16350 fi
16351 fi
16352 echo "$as_me:16352: result: $ac_cv_func_fork_works" >&5
16353 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
16354
16355 fi
16356 if test "x$ac_cv_func_fork_works" = xcross; then
16357   case $host in
16358     *-*-amigaos* | *-*-msdosdjgpp*)
16359       # Override, as these systems have only a dummy fork() stub
16360       ac_cv_func_fork_works=no
16361       ;;
16362     *)
16363       ac_cv_func_fork_works=yes
16364       ;;
16365   esac
16366   { echo "$as_me:16366: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
16367 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
16368 fi
16369 ac_cv_func_vfork_works=$ac_cv_func_vfork
16370 if test "x$ac_cv_func_vfork" = xyes; then
16371   echo "$as_me:16371: checking for working vfork" >&5
16372 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
16373 if test "${ac_cv_func_vfork_works+set}" = set; then
16374   echo $ECHO_N "(cached) $ECHO_C" >&6
16375 else
16376   if test "$cross_compiling" = yes; then
16377   ac_cv_func_vfork_works=cross
16378 else
16379   cat >conftest.$ac_ext <<_ACEOF
16380 #line 16380 "configure"
16381 #include "confdefs.h"
16382 /* Thanks to Paul Eggert for this test.  */
16383 #include <stdio.h>
16384 #include <sys/types.h>
16385 #include <sys/stat.h>
16386 #if HAVE_UNISTD_H
16387 # include <unistd.h>
16388 #endif
16389 #if HAVE_VFORK_H
16390 # include <vfork.h>
16391 #endif
16392 /* On some sparc systems, changes by the child to local and incoming
16393    argument registers are propagated back to the parent.  The compiler
16394    is told about this with #include <vfork.h>, but some compilers
16395    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
16396    static variable whose address is put into a register that is
16397    clobbered by the vfork.  */
16398 static
16399 #ifdef __cplusplus
16400 sparc_address_test (int arg)
16401 # else
16402 sparc_address_test (arg) int arg;
16403 #endif
16404 {
16405   static pid_t child;
16406   if (!child) {
16407     child = vfork ();
16408     if (child < 0) {
16409       perror ("vfork");
16410       _exit(2);
16411     }
16412     if (!child) {
16413       arg = getpid();
16414       write(-1, "", 0);
16415       _exit (arg);
16416     }
16417   }
16418 }
16419
16420 int
16421 main ()
16422 {
16423   pid_t parent = getpid ();
16424   pid_t child;
16425
16426   sparc_address_test ();
16427
16428   child = vfork ();
16429
16430   if (child == 0) {
16431     /* Here is another test for sparc vfork register problems.  This
16432        test uses lots of local variables, at least as many local
16433        variables as main has allocated so far including compiler
16434        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
16435        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
16436        reuse the register of parent for one of the local variables,
16437        since it will think that parent can't possibly be used any more
16438        in this routine.  Assigning to the local variable will thus
16439        munge parent in the parent process.  */
16440     pid_t
16441       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
16442       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
16443     /* Convince the compiler that p..p7 are live; otherwise, it might
16444        use the same hardware register for all 8 local variables.  */
16445     if (p != p1 || p != p2 || p != p3 || p != p4
16446         || p != p5 || p != p6 || p != p7)
16447       _exit(1);
16448
16449     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
16450        from child file descriptors.  If the child closes a descriptor
16451        before it execs or exits, this munges the parent's descriptor
16452        as well.  Test for this by closing stdout in the child.  */
16453     _exit(close(fileno(stdout)) != 0);
16454   } else {
16455     int status;
16456     struct stat st;
16457
16458     while (wait(&status) != child)
16459       ;
16460     $ac_main_return(
16461          /* Was there some problem with vforking?  */
16462          child < 0
16463
16464          /* Did the child fail?  (This shouldn't happen.)  */
16465          || status
16466
16467          /* Did the vfork/compiler bug occur?  */
16468          || parent != getpid()
16469
16470          /* Did the file descriptor bug occur?  */
16471          || fstat(fileno(stdout), &st) != 0
16472          );
16473   }
16474 }
16475 _ACEOF
16476 rm -f conftest$ac_exeext
16477 if { (eval echo "$as_me:16477: \"$ac_link\"") >&5
16478   (eval $ac_link) 2>&5
16479   ac_status=$?
16480   echo "$as_me:16480: \$? = $ac_status" >&5
16481   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16482   { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483   (eval $ac_try) 2>&5
16484   ac_status=$?
16485   echo "$as_me:16485: \$? = $ac_status" >&5
16486   (exit $ac_status); }; }; then
16487   ac_cv_func_vfork_works=yes
16488 else
16489   echo "$as_me: program exited with status $ac_status" >&5
16490 echo "$as_me: failed program was:" >&5
16491 cat conftest.$ac_ext >&5
16492 ac_cv_func_vfork_works=no
16493 fi
16494 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16495 fi
16496 fi
16497 echo "$as_me:16497: result: $ac_cv_func_vfork_works" >&5
16498 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
16499
16500 fi;
16501 if test "x$ac_cv_func_fork_works" = xcross; then
16502   ac_cv_func_vfork_works=ac_cv_func_vfork
16503   { echo "$as_me:16503: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
16504 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
16505 fi
16506
16507 if test "x$ac_cv_func_vfork_works" = xyes; then
16508
16509 cat >>confdefs.h <<\EOF
16510 #define HAVE_WORKING_VFORK 1
16511 EOF
16512
16513 else
16514
16515 cat >>confdefs.h <<\EOF
16516 #define vfork fork
16517 EOF
16518
16519 fi
16520 if test "x$ac_cv_func_fork_works" = xyes; then
16521
16522 cat >>confdefs.h <<\EOF
16523 #define HAVE_WORKING_FORK 1
16524 EOF
16525
16526 fi
16527
16528 # special check for test/ditto.c
16529
16530 echo "$as_me:16530: checking for openpty in -lutil" >&5
16531 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16532 if test "${ac_cv_lib_util_openpty+set}" = set; then
16533   echo $ECHO_N "(cached) $ECHO_C" >&6
16534 else
16535   ac_check_lib_save_LIBS=$LIBS
16536 LIBS="-lutil  $LIBS"
16537 cat >conftest.$ac_ext <<_ACEOF
16538 #line 16538 "configure"
16539 #include "confdefs.h"
16540
16541 /* Override any gcc2 internal prototype to avoid an error.  */
16542 #ifdef __cplusplus
16543 extern "C"
16544 #endif
16545 /* We use char because int might match the return type of a gcc2
16546    builtin and then its argument prototype would still apply.  */
16547 char openpty ();
16548 int
16549 main ()
16550 {
16551 openpty ();
16552   ;
16553   return 0;
16554 }
16555 _ACEOF
16556 rm -f conftest.$ac_objext conftest$ac_exeext
16557 if { (eval echo "$as_me:16557: \"$ac_link\"") >&5
16558   (eval $ac_link) 2>&5
16559   ac_status=$?
16560   echo "$as_me:16560: \$? = $ac_status" >&5
16561   (exit $ac_status); } &&
16562          { ac_try='test -s conftest$ac_exeext'
16563   { (eval echo "$as_me:16563: \"$ac_try\"") >&5
16564   (eval $ac_try) 2>&5
16565   ac_status=$?
16566   echo "$as_me:16566: \$? = $ac_status" >&5
16567   (exit $ac_status); }; }; then
16568   ac_cv_lib_util_openpty=yes
16569 else
16570   echo "$as_me: failed program was:" >&5
16571 cat conftest.$ac_ext >&5
16572 ac_cv_lib_util_openpty=no
16573 fi
16574 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16575 LIBS=$ac_check_lib_save_LIBS
16576 fi
16577 echo "$as_me:16577: result: $ac_cv_lib_util_openpty" >&5
16578 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16579 if test $ac_cv_lib_util_openpty = yes; then
16580   cf_cv_lib_util=yes
16581 else
16582   cf_cv_lib_util=no
16583 fi
16584
16585 echo "$as_me:16585: checking for openpty header" >&5
16586 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
16587 if test "${cf_cv_func_openpty+set}" = set; then
16588   echo $ECHO_N "(cached) $ECHO_C" >&6
16589 else
16590
16591     cf_save_LIBS="$LIBS"
16592     test $cf_cv_lib_util = yes && LIBS="-lutil $LIBS"
16593     for cf_header in pty.h libutil.h util.h
16594     do
16595     cat >conftest.$ac_ext <<_ACEOF
16596 #line 16596 "configure"
16597 #include "confdefs.h"
16598
16599 #include <$cf_header>
16600
16601 int
16602 main ()
16603 {
16604
16605     int x = openpty((int *)0, (int *)0, (char *)0,
16606                    (struct termios *)0, (struct winsize *)0);
16607
16608   ;
16609   return 0;
16610 }
16611 _ACEOF
16612 rm -f conftest.$ac_objext conftest$ac_exeext
16613 if { (eval echo "$as_me:16613: \"$ac_link\"") >&5
16614   (eval $ac_link) 2>&5
16615   ac_status=$?
16616   echo "$as_me:16616: \$? = $ac_status" >&5
16617   (exit $ac_status); } &&
16618          { ac_try='test -s conftest$ac_exeext'
16619   { (eval echo "$as_me:16619: \"$ac_try\"") >&5
16620   (eval $ac_try) 2>&5
16621   ac_status=$?
16622   echo "$as_me:16622: \$? = $ac_status" >&5
16623   (exit $ac_status); }; }; then
16624
16625         cf_cv_func_openpty=$cf_header
16626         break
16627
16628 else
16629   echo "$as_me: failed program was:" >&5
16630 cat conftest.$ac_ext >&5
16631
16632         cf_cv_func_openpty=no
16633
16634 fi
16635 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16636     done
16637     LIBS="$cf_save_LIBS"
16638
16639 fi
16640 echo "$as_me:16640: result: $cf_cv_func_openpty" >&5
16641 echo "${ECHO_T}$cf_cv_func_openpty" >&6
16642
16643 if test "$cf_cv_func_openpty" != no ; then
16644     cat >>confdefs.h <<EOF
16645 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
16646 EOF
16647
16648     cat >>confdefs.h <<\EOF
16649 #define USE_XTERM_PTY 1
16650 EOF
16651
16652     if test "$cf_cv_lib_util" = yes ; then
16653         TEST_LIBS="-lutil $TEST_LIBS"
16654     fi
16655 fi
16656
16657 if test "$with_hashed_db" != no ; then
16658         cat >>confdefs.h <<\EOF
16659 #define USE_HASHED_DB 1
16660 EOF
16661
16662 case $with_hashed_db in #(vi
16663 yes|*able*) #(vi
16664     ;;
16665 *)
16666     if test -d "$with_hashed_db" ; then
16667
16668 if test -n "$with_hashed_db/include" ; then
16669   for cf_add_incdir in $with_hashed_db/include
16670   do
16671         while test $cf_add_incdir != /usr/include
16672         do
16673           if test -d $cf_add_incdir
16674           then
16675                 cf_have_incdir=no
16676                 if test -n "$CFLAGS$CPPFLAGS" ; then
16677                   # a loop is needed to ensure we can add subdirs of existing dirs
16678                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16679                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16680                           cf_have_incdir=yes; break
16681                         fi
16682                   done
16683                 fi
16684
16685                 if test "$cf_have_incdir" = no ; then
16686                   if test "$cf_add_incdir" = /usr/local/include ; then
16687                         if test "$GCC" = yes
16688                         then
16689                           cf_save_CPPFLAGS=$CPPFLAGS
16690                           CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16691                           cat >conftest.$ac_ext <<_ACEOF
16692 #line 16692 "configure"
16693 #include "confdefs.h"
16694 #include <stdio.h>
16695 int
16696 main ()
16697 {
16698 printf("Hello")
16699   ;
16700   return 0;
16701 }
16702 _ACEOF
16703 rm -f conftest.$ac_objext
16704 if { (eval echo "$as_me:16704: \"$ac_compile\"") >&5
16705   (eval $ac_compile) 2>&5
16706   ac_status=$?
16707   echo "$as_me:16707: \$? = $ac_status" >&5
16708   (exit $ac_status); } &&
16709          { ac_try='test -s conftest.$ac_objext'
16710   { (eval echo "$as_me:16710: \"$ac_try\"") >&5
16711   (eval $ac_try) 2>&5
16712   ac_status=$?
16713   echo "$as_me:16713: \$? = $ac_status" >&5
16714   (exit $ac_status); }; }; then
16715   :
16716 else
16717   echo "$as_me: failed program was:" >&5
16718 cat conftest.$ac_ext >&5
16719 cf_have_incdir=yes
16720 fi
16721 rm -f conftest.$ac_objext conftest.$ac_ext
16722                           CPPFLAGS=$cf_save_CPPFLAGS
16723                         fi
16724                   fi
16725                 fi
16726
16727                 if test "$cf_have_incdir" = no ; then
16728                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
16729
16730 echo "${as_me:-configure}:16730: testing adding $cf_add_incdir to include-path ..." 1>&5
16731
16732                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16733
16734                   cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
16735                   test "$cf_top_incdir" = "$cf_add_incdir" && break
16736                   cf_add_incdir="$cf_top_incdir"
16737                 else
16738                   break
16739                 fi
16740           fi
16741         done
16742   done
16743 fi
16744
16745 if test -n "$with_hashed_db/lib" ; then
16746   for cf_add_libdir in $with_hashed_db/lib
16747   do
16748     if test $cf_add_libdir = /usr/lib ; then
16749       :
16750     elif test -d $cf_add_libdir
16751     then
16752       cf_have_libdir=no
16753       if test -n "$LDFLAGS$LIBS" ; then
16754         # a loop is needed to ensure we can add subdirs of existing dirs
16755         for cf_test_libdir in $LDFLAGS $LIBS ; do
16756           if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16757             cf_have_libdir=yes; break
16758           fi
16759         done
16760       fi
16761       if test "$cf_have_libdir" = no ; then
16762         test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
16763
16764 echo "${as_me:-configure}:16764: testing adding $cf_add_libdir to library-path ..." 1>&5
16765
16766         LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16767       fi
16768     fi
16769   done
16770 fi
16771
16772     fi
16773 esac
16774
16775 echo "$as_me:16775: checking for db.h" >&5
16776 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
16777 if test "${ac_cv_header_db_h+set}" = set; then
16778   echo $ECHO_N "(cached) $ECHO_C" >&6
16779 else
16780   cat >conftest.$ac_ext <<_ACEOF
16781 #line 16781 "configure"
16782 #include "confdefs.h"
16783 #include <db.h>
16784 _ACEOF
16785 if { (eval echo "$as_me:16785: \"$ac_cpp conftest.$ac_ext\"") >&5
16786   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16787   ac_status=$?
16788   egrep -v '^ *\+' conftest.er1 >conftest.err
16789   rm -f conftest.er1
16790   cat conftest.err >&5
16791   echo "$as_me:16791: \$? = $ac_status" >&5
16792   (exit $ac_status); } >/dev/null; then
16793   if test -s conftest.err; then
16794     ac_cpp_err=$ac_c_preproc_warn_flag
16795   else
16796     ac_cpp_err=
16797   fi
16798 else
16799   ac_cpp_err=yes
16800 fi
16801 if test -z "$ac_cpp_err"; then
16802   ac_cv_header_db_h=yes
16803 else
16804   echo "$as_me: failed program was:" >&5
16805   cat conftest.$ac_ext >&5
16806   ac_cv_header_db_h=no
16807 fi
16808 rm -f conftest.err conftest.$ac_ext
16809 fi
16810 echo "$as_me:16810: result: $ac_cv_header_db_h" >&5
16811 echo "${ECHO_T}$ac_cv_header_db_h" >&6
16812 if test $ac_cv_header_db_h = yes; then
16813
16814 echo "$as_me:16814: checking for version of db" >&5
16815 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
16816 if test "${cf_cv_hashed_db_version+set}" = set; then
16817   echo $ECHO_N "(cached) $ECHO_C" >&6
16818 else
16819
16820 cf_cv_hashed_db_version=unknown
16821
16822 for cf_db_version in 1 2 3 4 5
16823 do
16824
16825 echo "${as_me:-configure}:16825: testing checking for db version $cf_db_version ..." 1>&5
16826
16827         cat >conftest.$ac_ext <<_ACEOF
16828 #line 16828 "configure"
16829 #include "confdefs.h"
16830
16831 $ac_includes_default
16832 #include <db.h>
16833
16834 #ifdef DB_VERSION_MAJOR
16835         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
16836 #if $cf_db_version == DB_VERSION_MAJOR
16837         /* ok */
16838 #else
16839         make an error
16840 #endif
16841 #else
16842 #if $cf_db_version == 1
16843         /* ok: assuming this is DB 1.8.5 */
16844 #else
16845         make an error
16846 #endif
16847 #endif
16848
16849 int
16850 main ()
16851 {
16852 DBT *foo = 0
16853   ;
16854   return 0;
16855 }
16856 _ACEOF
16857 rm -f conftest.$ac_objext
16858 if { (eval echo "$as_me:16858: \"$ac_compile\"") >&5
16859   (eval $ac_compile) 2>&5
16860   ac_status=$?
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit $ac_status); } &&
16863          { ac_try='test -s conftest.$ac_objext'
16864   { (eval echo "$as_me:16864: \"$ac_try\"") >&5
16865   (eval $ac_try) 2>&5
16866   ac_status=$?
16867   echo "$as_me:16867: \$? = $ac_status" >&5
16868   (exit $ac_status); }; }; then
16869
16870         cf_cv_hashed_db_version=$cf_db_version
16871         break
16872
16873 else
16874   echo "$as_me: failed program was:" >&5
16875 cat conftest.$ac_ext >&5
16876 fi
16877 rm -f conftest.$ac_objext conftest.$ac_ext
16878 done
16879
16880 fi
16881 echo "$as_me:16881: result: $cf_cv_hashed_db_version" >&5
16882 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
16883
16884 if test "$cf_cv_hashed_db_version" = unknown ; then
16885         { { echo "$as_me:16885: error: Cannot determine version of db" >&5
16886 echo "$as_me: error: Cannot determine version of db" >&2;}
16887    { (exit 1); exit 1; }; }
16888 else
16889
16890 echo "$as_me:16890: checking for db libraries" >&5
16891 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
16892 if test "${cf_cv_hashed_db_libs+set}" = set; then
16893   echo $ECHO_N "(cached) $ECHO_C" >&6
16894 else
16895
16896 cf_cv_hashed_db_libs=unknown
16897 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
16898 do
16899         cf_save_libs="$LIBS"
16900         if test -n "$cf_db_libs"; then
16901                 LIBS="-l$cf_db_libs $LIBS"
16902         fi
16903
16904 echo "${as_me:-configure}:16904: testing checking for library "$cf_db_libs" ..." 1>&5
16905
16906         cat >conftest.$ac_ext <<_ACEOF
16907 #line 16907 "configure"
16908 #include "confdefs.h"
16909
16910 $ac_includes_default
16911 #include <db.h>
16912
16913 int
16914 main ()
16915 {
16916
16917         char *path = "/tmp/foo";
16918 #ifdef DB_VERSION_MAJOR
16919 #if DB_VERSION_MAJOR >= 4
16920         DB *result = 0;
16921         db_create(&result, NULL, 0);
16922         result->open(result,
16923                 NULL,
16924                 path,
16925                 path,
16926                 DB_HASH,
16927                 DB_CREATE,
16928                 0644);
16929 #elif DB_VERSION_MAJOR >= 3
16930         DB *result = 0;
16931         db_create(&result, NULL, 0);
16932         result->open(result,
16933                 path,
16934                 path,
16935                 DB_HASH,
16936                 DB_CREATE,
16937                 0644);
16938 #elif DB_VERSION_MAJOR >= 2
16939         DB *result = 0;
16940         db_open(path,
16941                 DB_HASH,
16942                 DB_CREATE,
16943                 0644,
16944                 (DB_ENV *) 0,
16945                 (DB_INFO *) 0,
16946                 &result);
16947 #endif /* DB_VERSION_MAJOR */
16948 #else
16949         DB *result = dbopen(path,
16950                      2,
16951                      0644,
16952                      DB_HASH,
16953                      0);
16954 #endif
16955         ${cf_cv_main_return:-return}(result != 0)
16956
16957   ;
16958   return 0;
16959 }
16960 _ACEOF
16961 rm -f conftest.$ac_objext conftest$ac_exeext
16962 if { (eval echo "$as_me:16962: \"$ac_link\"") >&5
16963   (eval $ac_link) 2>&5
16964   ac_status=$?
16965   echo "$as_me:16965: \$? = $ac_status" >&5
16966   (exit $ac_status); } &&
16967          { ac_try='test -s conftest$ac_exeext'
16968   { (eval echo "$as_me:16968: \"$ac_try\"") >&5
16969   (eval $ac_try) 2>&5
16970   ac_status=$?
16971   echo "$as_me:16971: \$? = $ac_status" >&5
16972   (exit $ac_status); }; }; then
16973
16974         if test -n "$cf_db_libs" ; then
16975                 cf_cv_hashed_db_libs=$cf_db_libs
16976         else
16977                 cf_cv_hashed_db_libs=default
16978         fi
16979         LIBS="$cf_save_libs"
16980         break
16981
16982 else
16983   echo "$as_me: failed program was:" >&5
16984 cat conftest.$ac_ext >&5
16985 fi
16986 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16987         LIBS="$cf_save_libs"
16988 done
16989
16990 fi
16991 echo "$as_me:16991: result: $cf_cv_hashed_db_libs" >&5
16992 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
16993
16994         if test "$cf_cv_hashed_db_libs" = unknown ; then
16995                 { { echo "$as_me:16995: error: Cannot determine library for db" >&5
16996 echo "$as_me: error: Cannot determine library for db" >&2;}
16997    { (exit 1); exit 1; }; }
16998         elif test "$cf_cv_hashed_db_libs" != default ; then
16999                 LIBS="-l$cf_cv_hashed_db_libs $LIBS"
17000         fi
17001 fi
17002
17003 else
17004
17005         { { echo "$as_me:17005: error: Cannot find db.h" >&5
17006 echo "$as_me: error: Cannot find db.h" >&2;}
17007    { (exit 1); exit 1; }; }
17008
17009 fi
17010
17011 fi
17012
17013 if test -z "$cf_user_CFLAGS" && test "$with_no_leaks" = no ; then
17014         CFLAGS=`echo ${CFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17015         CXXFLAGS=`echo ${CXXFLAGS} | sed -e 's%-g %%' -e 's%-g$%%'`
17016 fi
17017
17018 # Just in case, check if the C compiler has a bool type.
17019
17020 echo "$as_me:17020: checking if we should include stdbool.h" >&5
17021 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17022
17023 if test "${cf_cv_header_stdbool_h+set}" = set; then
17024   echo $ECHO_N "(cached) $ECHO_C" >&6
17025 else
17026
17027         cat >conftest.$ac_ext <<_ACEOF
17028 #line 17028 "configure"
17029 #include "confdefs.h"
17030
17031 int
17032 main ()
17033 {
17034 bool foo = false
17035   ;
17036   return 0;
17037 }
17038 _ACEOF
17039 rm -f conftest.$ac_objext
17040 if { (eval echo "$as_me:17040: \"$ac_compile\"") >&5
17041   (eval $ac_compile) 2>&5
17042   ac_status=$?
17043   echo "$as_me:17043: \$? = $ac_status" >&5
17044   (exit $ac_status); } &&
17045          { ac_try='test -s conftest.$ac_objext'
17046   { (eval echo "$as_me:17046: \"$ac_try\"") >&5
17047   (eval $ac_try) 2>&5
17048   ac_status=$?
17049   echo "$as_me:17049: \$? = $ac_status" >&5
17050   (exit $ac_status); }; }; then
17051   cf_cv_header_stdbool_h=0
17052 else
17053   echo "$as_me: failed program was:" >&5
17054 cat conftest.$ac_ext >&5
17055 cat >conftest.$ac_ext <<_ACEOF
17056 #line 17056 "configure"
17057 #include "confdefs.h"
17058
17059 #ifndef __BEOS__
17060 #include <stdbool.h>
17061 #endif
17062
17063 int
17064 main ()
17065 {
17066 bool foo = false
17067   ;
17068   return 0;
17069 }
17070 _ACEOF
17071 rm -f conftest.$ac_objext
17072 if { (eval echo "$as_me:17072: \"$ac_compile\"") >&5
17073   (eval $ac_compile) 2>&5
17074   ac_status=$?
17075   echo "$as_me:17075: \$? = $ac_status" >&5
17076   (exit $ac_status); } &&
17077          { ac_try='test -s conftest.$ac_objext'
17078   { (eval echo "$as_me:17078: \"$ac_try\"") >&5
17079   (eval $ac_try) 2>&5
17080   ac_status=$?
17081   echo "$as_me:17081: \$? = $ac_status" >&5
17082   (exit $ac_status); }; }; then
17083   cf_cv_header_stdbool_h=1
17084 else
17085   echo "$as_me: failed program was:" >&5
17086 cat conftest.$ac_ext >&5
17087 cf_cv_header_stdbool_h=0
17088 fi
17089 rm -f conftest.$ac_objext conftest.$ac_ext
17090 fi
17091 rm -f conftest.$ac_objext conftest.$ac_ext
17092 fi
17093
17094 if test "$cf_cv_header_stdbool_h" = 1
17095 then    echo "$as_me:17095: result: yes" >&5
17096 echo "${ECHO_T}yes" >&6
17097 else    echo "$as_me:17097: result: no" >&5
17098 echo "${ECHO_T}no" >&6
17099 fi
17100
17101 echo "$as_me:17101: checking for builtin bool type" >&5
17102 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17103
17104 if test "${cf_cv_cc_bool_type+set}" = set; then
17105   echo $ECHO_N "(cached) $ECHO_C" >&6
17106 else
17107
17108         cat >conftest.$ac_ext <<_ACEOF
17109 #line 17109 "configure"
17110 #include "confdefs.h"
17111
17112 #include <stdio.h>
17113 #include <sys/types.h>
17114
17115 int
17116 main ()
17117 {
17118 bool x = false
17119   ;
17120   return 0;
17121 }
17122 _ACEOF
17123 rm -f conftest.$ac_objext
17124 if { (eval echo "$as_me:17124: \"$ac_compile\"") >&5
17125   (eval $ac_compile) 2>&5
17126   ac_status=$?
17127   echo "$as_me:17127: \$? = $ac_status" >&5
17128   (exit $ac_status); } &&
17129          { ac_try='test -s conftest.$ac_objext'
17130   { (eval echo "$as_me:17130: \"$ac_try\"") >&5
17131   (eval $ac_try) 2>&5
17132   ac_status=$?
17133   echo "$as_me:17133: \$? = $ac_status" >&5
17134   (exit $ac_status); }; }; then
17135   cf_cv_cc_bool_type=1
17136 else
17137   echo "$as_me: failed program was:" >&5
17138 cat conftest.$ac_ext >&5
17139 cf_cv_cc_bool_type=0
17140 fi
17141 rm -f conftest.$ac_objext conftest.$ac_ext
17142
17143 fi
17144
17145 if test "$cf_cv_cc_bool_type" = 1
17146 then    echo "$as_me:17146: result: yes" >&5
17147 echo "${ECHO_T}yes" >&6
17148 else    echo "$as_me:17148: result: no" >&5
17149 echo "${ECHO_T}no" >&6
17150 fi
17151
17152 # Check for C++ compiler characteristics (and ensure that it's there!)
17153 if test -n "$CXX" ; then
17154         ac_ext=cc
17155 ac_cpp='$CXXCPP $CPPFLAGS'
17156 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17157 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17158 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17159 ac_main_return=return
17160
17161 if test -n "$GXX" ; then
17162 case $cf_cv_system_name in #(vi
17163 os2*) #(vi
17164         cf_stdcpp_libname=stdcpp
17165         ;;
17166 *)
17167         cf_stdcpp_libname=stdc++
17168         ;;
17169 esac
17170 echo "$as_me:17170: checking for library $cf_stdcpp_libname" >&5
17171 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
17172 if test "${cf_cv_libstdcpp+set}" = set; then
17173   echo $ECHO_N "(cached) $ECHO_C" >&6
17174 else
17175
17176         cf_save="$LIBS"
17177         LIBS="-l$cf_stdcpp_libname $LIBS"
17178 cat >conftest.$ac_ext <<_ACEOF
17179 #line 17179 "configure"
17180 #include "confdefs.h"
17181
17182 #include <strstream.h>
17183 int
17184 main ()
17185 {
17186
17187 char buf[80];
17188 strstreambuf foo(buf, sizeof(buf))
17189
17190   ;
17191   return 0;
17192 }
17193 _ACEOF
17194 rm -f conftest.$ac_objext conftest$ac_exeext
17195 if { (eval echo "$as_me:17195: \"$ac_link\"") >&5
17196   (eval $ac_link) 2>&5
17197   ac_status=$?
17198   echo "$as_me:17198: \$? = $ac_status" >&5
17199   (exit $ac_status); } &&
17200          { ac_try='test -s conftest$ac_exeext'
17201   { (eval echo "$as_me:17201: \"$ac_try\"") >&5
17202   (eval $ac_try) 2>&5
17203   ac_status=$?
17204   echo "$as_me:17204: \$? = $ac_status" >&5
17205   (exit $ac_status); }; }; then
17206   cf_cv_libstdcpp=yes
17207 else
17208   echo "$as_me: failed program was:" >&5
17209 cat conftest.$ac_ext >&5
17210 cf_cv_libstdcpp=no
17211 fi
17212 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17213         LIBS="$cf_save"
17214
17215 fi
17216 echo "$as_me:17216: result: $cf_cv_libstdcpp" >&5
17217 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
17218 test "$cf_cv_libstdcpp" = yes && CXXLIBS="-l$cf_stdcpp_libname $CXXLIBS"
17219 fi
17220
17221         echo "$as_me:17221: checking whether $CXX understands -c and -o together" >&5
17222 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
17223 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
17224   echo $ECHO_N "(cached) $ECHO_C" >&6
17225 else
17226
17227 cat > conftest.$ac_ext <<CF_EOF
17228 #include <stdio.h>
17229 int main()
17230 {
17231         ${cf_cv_main_return:-return}(0);
17232 }
17233 CF_EOF
17234 # We do the test twice because some compilers refuse to overwrite an
17235 # existing .o file with -o, though they will create one.
17236 ac_try='$CXX -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
17237 if { (eval echo "$as_me:17237: \"$ac_try\"") >&5
17238   (eval $ac_try) 2>&5
17239   ac_status=$?
17240   echo "$as_me:17240: \$? = $ac_status" >&5
17241   (exit $ac_status); } &&
17242   test -f conftest2.$ac_objext && { (eval echo "$as_me:17242: \"$ac_try\"") >&5
17243   (eval $ac_try) 2>&5
17244   ac_status=$?
17245   echo "$as_me:17245: \$? = $ac_status" >&5
17246   (exit $ac_status); };
17247 then
17248   eval cf_cv_prog_CXX_c_o=yes
17249 else
17250   eval cf_cv_prog_CXX_c_o=no
17251 fi
17252 rm -rf conftest*
17253
17254 fi
17255 if test $cf_cv_prog_CXX_c_o = yes; then
17256   echo "$as_me:17256: result: yes" >&5
17257 echo "${ECHO_T}yes" >&6
17258 else
17259   echo "$as_me:17259: result: no" >&5
17260 echo "${ECHO_T}no" >&6
17261 fi
17262
17263         case $GXX_VERSION in
17264         1*|2.0-6*)
17265                 cf_cxx_library=yes
17266                 ;;
17267         *-2.7*|2.7*)
17268
17269 cf_cxx_library=unknown
17270 case $cf_cv_system_name in #(vi
17271 os2*) #(vi
17272         cf_gpp_libname=gpp
17273         ;;
17274 *)
17275         cf_gpp_libname=g++
17276         ;;
17277 esac
17278 if test "$GXX" = yes; then
17279         echo "$as_me:17279: checking for lib$cf_gpp_libname" >&5
17280 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
17281         cf_save="$LIBS"
17282         LIBS="-l$cf_gpp_libname $LIBS"
17283         cat >conftest.$ac_ext <<_ACEOF
17284 #line 17284 "configure"
17285 #include "confdefs.h"
17286
17287 #include <$cf_gpp_libname/builtin.h>
17288
17289 int
17290 main ()
17291 {
17292 two_arg_error_handler_t foo2 = lib_error_handler
17293   ;
17294   return 0;
17295 }
17296 _ACEOF
17297 rm -f conftest.$ac_objext conftest$ac_exeext
17298 if { (eval echo "$as_me:17298: \"$ac_link\"") >&5
17299   (eval $ac_link) 2>&5
17300   ac_status=$?
17301   echo "$as_me:17301: \$? = $ac_status" >&5
17302   (exit $ac_status); } &&
17303          { ac_try='test -s conftest$ac_exeext'
17304   { (eval echo "$as_me:17304: \"$ac_try\"") >&5
17305   (eval $ac_try) 2>&5
17306   ac_status=$?
17307   echo "$as_me:17307: \$? = $ac_status" >&5
17308   (exit $ac_status); }; }; then
17309   cf_cxx_library=yes
17310          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17311          if test "$cf_gpp_libname" = cpp ; then
17312             cat >>confdefs.h <<\EOF
17313 #define HAVE_GPP_BUILTIN_H 1
17314 EOF
17315
17316          else
17317             cat >>confdefs.h <<\EOF
17318 #define HAVE_GXX_BUILTIN_H 1
17319 EOF
17320
17321          fi
17322 else
17323   echo "$as_me: failed program was:" >&5
17324 cat conftest.$ac_ext >&5
17325 cat >conftest.$ac_ext <<_ACEOF
17326 #line 17326 "configure"
17327 #include "confdefs.h"
17328
17329 #include <builtin.h>
17330
17331 int
17332 main ()
17333 {
17334 two_arg_error_handler_t foo2 = lib_error_handler
17335   ;
17336   return 0;
17337 }
17338 _ACEOF
17339 rm -f conftest.$ac_objext conftest$ac_exeext
17340 if { (eval echo "$as_me:17340: \"$ac_link\"") >&5
17341   (eval $ac_link) 2>&5
17342   ac_status=$?
17343   echo "$as_me:17343: \$? = $ac_status" >&5
17344   (exit $ac_status); } &&
17345          { ac_try='test -s conftest$ac_exeext'
17346   { (eval echo "$as_me:17346: \"$ac_try\"") >&5
17347   (eval $ac_try) 2>&5
17348   ac_status=$?
17349   echo "$as_me:17349: \$? = $ac_status" >&5
17350   (exit $ac_status); }; }; then
17351   cf_cxx_library=yes
17352          CXXLIBS="-l$cf_gpp_libname $CXXLIBS"
17353          cat >>confdefs.h <<\EOF
17354 #define HAVE_BUILTIN_H 1
17355 EOF
17356
17357 else
17358   echo "$as_me: failed program was:" >&5
17359 cat conftest.$ac_ext >&5
17360 cf_cxx_library=no
17361 fi
17362 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17363 fi
17364 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17365         LIBS="$cf_save"
17366         echo "$as_me:17366: result: $cf_cxx_library" >&5
17367 echo "${ECHO_T}$cf_cxx_library" >&6
17368 fi
17369
17370                 ;;
17371         *)
17372                 cf_cxx_library=no
17373                 ;;
17374         esac
17375
17376         ac_ext=cc
17377 ac_cpp='$CXXCPP $CPPFLAGS'
17378 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17379 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17380 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17381 ac_main_return=return
17382 echo "$as_me:17382: checking how to run the C++ preprocessor" >&5
17383 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
17384 if test -z "$CXXCPP"; then
17385   if test "${ac_cv_prog_CXXCPP+set}" = set; then
17386   echo $ECHO_N "(cached) $ECHO_C" >&6
17387 else
17388       # Double quotes because CXXCPP needs to be expanded
17389     for CXXCPP in "$CXX -E" "/lib/cpp"
17390     do
17391       ac_preproc_ok=false
17392 for ac_cxx_preproc_warn_flag in '' yes
17393 do
17394   # Use a header file that comes with gcc, so configuring glibc
17395   # with a fresh cross-compiler works.
17396   # On the NeXT, cc -E runs the code through the compiler's parser,
17397   # not just through cpp. "Syntax error" is here to catch this case.
17398   cat >conftest.$ac_ext <<_ACEOF
17399 #line 17399 "configure"
17400 #include "confdefs.h"
17401 #include <assert.h>
17402                      Syntax error
17403 _ACEOF
17404 if { (eval echo "$as_me:17404: \"$ac_cpp conftest.$ac_ext\"") >&5
17405   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17406   ac_status=$?
17407   egrep -v '^ *\+' conftest.er1 >conftest.err
17408   rm -f conftest.er1
17409   cat conftest.err >&5
17410   echo "$as_me:17410: \$? = $ac_status" >&5
17411   (exit $ac_status); } >/dev/null; then
17412   if test -s conftest.err; then
17413     ac_cpp_err=$ac_cxx_preproc_warn_flag
17414   else
17415     ac_cpp_err=
17416   fi
17417 else
17418   ac_cpp_err=yes
17419 fi
17420 if test -z "$ac_cpp_err"; then
17421   :
17422 else
17423   echo "$as_me: failed program was:" >&5
17424   cat conftest.$ac_ext >&5
17425   # Broken: fails on valid input.
17426 continue
17427 fi
17428 rm -f conftest.err conftest.$ac_ext
17429
17430   # OK, works on sane cases.  Now check whether non-existent headers
17431   # can be detected and how.
17432   cat >conftest.$ac_ext <<_ACEOF
17433 #line 17433 "configure"
17434 #include "confdefs.h"
17435 #include <ac_nonexistent.h>
17436 _ACEOF
17437 if { (eval echo "$as_me:17437: \"$ac_cpp conftest.$ac_ext\"") >&5
17438   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17439   ac_status=$?
17440   egrep -v '^ *\+' conftest.er1 >conftest.err
17441   rm -f conftest.er1
17442   cat conftest.err >&5
17443   echo "$as_me:17443: \$? = $ac_status" >&5
17444   (exit $ac_status); } >/dev/null; then
17445   if test -s conftest.err; then
17446     ac_cpp_err=$ac_cxx_preproc_warn_flag
17447   else
17448     ac_cpp_err=
17449   fi
17450 else
17451   ac_cpp_err=yes
17452 fi
17453 if test -z "$ac_cpp_err"; then
17454   # Broken: success on invalid input.
17455 continue
17456 else
17457   echo "$as_me: failed program was:" >&5
17458   cat conftest.$ac_ext >&5
17459   # Passes both tests.
17460 ac_preproc_ok=:
17461 break
17462 fi
17463 rm -f conftest.err conftest.$ac_ext
17464
17465 done
17466 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17467 rm -f conftest.err conftest.$ac_ext
17468 if $ac_preproc_ok; then
17469   break
17470 fi
17471
17472     done
17473     ac_cv_prog_CXXCPP=$CXXCPP
17474
17475 fi
17476   CXXCPP=$ac_cv_prog_CXXCPP
17477 else
17478   ac_cv_prog_CXXCPP=$CXXCPP
17479 fi
17480 echo "$as_me:17480: result: $CXXCPP" >&5
17481 echo "${ECHO_T}$CXXCPP" >&6
17482 ac_preproc_ok=false
17483 for ac_cxx_preproc_warn_flag in '' yes
17484 do
17485   # Use a header file that comes with gcc, so configuring glibc
17486   # with a fresh cross-compiler works.
17487   # On the NeXT, cc -E runs the code through the compiler's parser,
17488   # not just through cpp. "Syntax error" is here to catch this case.
17489   cat >conftest.$ac_ext <<_ACEOF
17490 #line 17490 "configure"
17491 #include "confdefs.h"
17492 #include <assert.h>
17493                      Syntax error
17494 _ACEOF
17495 if { (eval echo "$as_me:17495: \"$ac_cpp conftest.$ac_ext\"") >&5
17496   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17497   ac_status=$?
17498   egrep -v '^ *\+' conftest.er1 >conftest.err
17499   rm -f conftest.er1
17500   cat conftest.err >&5
17501   echo "$as_me:17501: \$? = $ac_status" >&5
17502   (exit $ac_status); } >/dev/null; then
17503   if test -s conftest.err; then
17504     ac_cpp_err=$ac_cxx_preproc_warn_flag
17505   else
17506     ac_cpp_err=
17507   fi
17508 else
17509   ac_cpp_err=yes
17510 fi
17511 if test -z "$ac_cpp_err"; then
17512   :
17513 else
17514   echo "$as_me: failed program was:" >&5
17515   cat conftest.$ac_ext >&5
17516   # Broken: fails on valid input.
17517 continue
17518 fi
17519 rm -f conftest.err conftest.$ac_ext
17520
17521   # OK, works on sane cases.  Now check whether non-existent headers
17522   # can be detected and how.
17523   cat >conftest.$ac_ext <<_ACEOF
17524 #line 17524 "configure"
17525 #include "confdefs.h"
17526 #include <ac_nonexistent.h>
17527 _ACEOF
17528 if { (eval echo "$as_me:17528: \"$ac_cpp conftest.$ac_ext\"") >&5
17529   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17530   ac_status=$?
17531   egrep -v '^ *\+' conftest.er1 >conftest.err
17532   rm -f conftest.er1
17533   cat conftest.err >&5
17534   echo "$as_me:17534: \$? = $ac_status" >&5
17535   (exit $ac_status); } >/dev/null; then
17536   if test -s conftest.err; then
17537     ac_cpp_err=$ac_cxx_preproc_warn_flag
17538   else
17539     ac_cpp_err=
17540   fi
17541 else
17542   ac_cpp_err=yes
17543 fi
17544 if test -z "$ac_cpp_err"; then
17545   # Broken: success on invalid input.
17546 continue
17547 else
17548   echo "$as_me: failed program was:" >&5
17549   cat conftest.$ac_ext >&5
17550   # Passes both tests.
17551 ac_preproc_ok=:
17552 break
17553 fi
17554 rm -f conftest.err conftest.$ac_ext
17555
17556 done
17557 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
17558 rm -f conftest.err conftest.$ac_ext
17559 if $ac_preproc_ok; then
17560   :
17561 else
17562   { { echo "$as_me:17562: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
17563 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
17564    { (exit 1); exit 1; }; }
17565 fi
17566
17567 ac_ext=cc
17568 ac_cpp='$CXXCPP $CPPFLAGS'
17569 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17570 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17571 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17572 ac_main_return=return
17573
17574 for ac_header in iostream typeinfo
17575 do
17576 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17577 echo "$as_me:17577: checking for $ac_header" >&5
17578 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17579 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17580   echo $ECHO_N "(cached) $ECHO_C" >&6
17581 else
17582   cat >conftest.$ac_ext <<_ACEOF
17583 #line 17583 "configure"
17584 #include "confdefs.h"
17585 #include <$ac_header>
17586 _ACEOF
17587 if { (eval echo "$as_me:17587: \"$ac_cpp conftest.$ac_ext\"") >&5
17588   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
17589   ac_status=$?
17590   egrep -v '^ *\+' conftest.er1 >conftest.err
17591   rm -f conftest.er1
17592   cat conftest.err >&5
17593   echo "$as_me:17593: \$? = $ac_status" >&5
17594   (exit $ac_status); } >/dev/null; then
17595   if test -s conftest.err; then
17596     ac_cpp_err=$ac_cxx_preproc_warn_flag
17597   else
17598     ac_cpp_err=
17599   fi
17600 else
17601   ac_cpp_err=yes
17602 fi
17603 if test -z "$ac_cpp_err"; then
17604   eval "$as_ac_Header=yes"
17605 else
17606   echo "$as_me: failed program was:" >&5
17607   cat conftest.$ac_ext >&5
17608   eval "$as_ac_Header=no"
17609 fi
17610 rm -f conftest.err conftest.$ac_ext
17611 fi
17612 echo "$as_me:17612: result: `eval echo '${'$as_ac_Header'}'`" >&5
17613 echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
17614 if test `eval echo '${'$as_ac_Header'}'` = yes; then
17615   cat >>confdefs.h <<EOF
17616 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17617 EOF
17618
17619 fi
17620 done
17621
17622     if test x"$ac_cv_header_iostream" = xyes ; then
17623         echo "$as_me:17623: checking if iostream uses std-namespace" >&5
17624 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
17625         cat >conftest.$ac_ext <<_ACEOF
17626 #line 17626 "configure"
17627 #include "confdefs.h"
17628
17629 #include <iostream>
17630 using std::endl;
17631 using std::cerr;
17632 int
17633 main ()
17634 {
17635
17636 cerr << "testing" << endl;
17637
17638   ;
17639   return 0;
17640 }
17641 _ACEOF
17642 rm -f conftest.$ac_objext
17643 if { (eval echo "$as_me:17643: \"$ac_compile\"") >&5
17644   (eval $ac_compile) 2>&5
17645   ac_status=$?
17646   echo "$as_me:17646: \$? = $ac_status" >&5
17647   (exit $ac_status); } &&
17648          { ac_try='test -s conftest.$ac_objext'
17649   { (eval echo "$as_me:17649: \"$ac_try\"") >&5
17650   (eval $ac_try) 2>&5
17651   ac_status=$?
17652   echo "$as_me:17652: \$? = $ac_status" >&5
17653   (exit $ac_status); }; }; then
17654   cf_iostream_namespace=yes
17655 else
17656   echo "$as_me: failed program was:" >&5
17657 cat conftest.$ac_ext >&5
17658 cf_iostream_namespace=no
17659 fi
17660 rm -f conftest.$ac_objext conftest.$ac_ext
17661         echo "$as_me:17661: result: $cf_iostream_namespace" >&5
17662 echo "${ECHO_T}$cf_iostream_namespace" >&6
17663         if test "$cf_iostream_namespace" = yes ; then
17664             cat >>confdefs.h <<\EOF
17665 #define IOSTREAM_NAMESPACE 1
17666 EOF
17667
17668         fi
17669     fi
17670
17671 echo "$as_me:17671: checking if we should include stdbool.h" >&5
17672 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
17673
17674 if test "${cf_cv_header_stdbool_h+set}" = set; then
17675   echo $ECHO_N "(cached) $ECHO_C" >&6
17676 else
17677
17678         cat >conftest.$ac_ext <<_ACEOF
17679 #line 17679 "configure"
17680 #include "confdefs.h"
17681
17682 int
17683 main ()
17684 {
17685 bool foo = false
17686   ;
17687   return 0;
17688 }
17689 _ACEOF
17690 rm -f conftest.$ac_objext
17691 if { (eval echo "$as_me:17691: \"$ac_compile\"") >&5
17692   (eval $ac_compile) 2>&5
17693   ac_status=$?
17694   echo "$as_me:17694: \$? = $ac_status" >&5
17695   (exit $ac_status); } &&
17696          { ac_try='test -s conftest.$ac_objext'
17697   { (eval echo "$as_me:17697: \"$ac_try\"") >&5
17698   (eval $ac_try) 2>&5
17699   ac_status=$?
17700   echo "$as_me:17700: \$? = $ac_status" >&5
17701   (exit $ac_status); }; }; then
17702   cf_cv_header_stdbool_h=0
17703 else
17704   echo "$as_me: failed program was:" >&5
17705 cat conftest.$ac_ext >&5
17706 cat >conftest.$ac_ext <<_ACEOF
17707 #line 17707 "configure"
17708 #include "confdefs.h"
17709
17710 #ifndef __BEOS__
17711 #include <stdbool.h>
17712 #endif
17713
17714 int
17715 main ()
17716 {
17717 bool foo = false
17718   ;
17719   return 0;
17720 }
17721 _ACEOF
17722 rm -f conftest.$ac_objext
17723 if { (eval echo "$as_me:17723: \"$ac_compile\"") >&5
17724   (eval $ac_compile) 2>&5
17725   ac_status=$?
17726   echo "$as_me:17726: \$? = $ac_status" >&5
17727   (exit $ac_status); } &&
17728          { ac_try='test -s conftest.$ac_objext'
17729   { (eval echo "$as_me:17729: \"$ac_try\"") >&5
17730   (eval $ac_try) 2>&5
17731   ac_status=$?
17732   echo "$as_me:17732: \$? = $ac_status" >&5
17733   (exit $ac_status); }; }; then
17734   cf_cv_header_stdbool_h=1
17735 else
17736   echo "$as_me: failed program was:" >&5
17737 cat conftest.$ac_ext >&5
17738 cf_cv_header_stdbool_h=0
17739 fi
17740 rm -f conftest.$ac_objext conftest.$ac_ext
17741 fi
17742 rm -f conftest.$ac_objext conftest.$ac_ext
17743 fi
17744
17745 if test "$cf_cv_header_stdbool_h" = 1
17746 then    echo "$as_me:17746: result: yes" >&5
17747 echo "${ECHO_T}yes" >&6
17748 else    echo "$as_me:17748: result: no" >&5
17749 echo "${ECHO_T}no" >&6
17750 fi
17751
17752 echo "$as_me:17752: checking for builtin bool type" >&5
17753 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
17754
17755 if test "${cf_cv_builtin_bool+set}" = set; then
17756   echo $ECHO_N "(cached) $ECHO_C" >&6
17757 else
17758
17759         cat >conftest.$ac_ext <<_ACEOF
17760 #line 17760 "configure"
17761 #include "confdefs.h"
17762
17763 #include <stdio.h>
17764 #include <sys/types.h>
17765
17766 int
17767 main ()
17768 {
17769 bool x = false
17770   ;
17771   return 0;
17772 }
17773 _ACEOF
17774 rm -f conftest.$ac_objext
17775 if { (eval echo "$as_me:17775: \"$ac_compile\"") >&5
17776   (eval $ac_compile) 2>&5
17777   ac_status=$?
17778   echo "$as_me:17778: \$? = $ac_status" >&5
17779   (exit $ac_status); } &&
17780          { ac_try='test -s conftest.$ac_objext'
17781   { (eval echo "$as_me:17781: \"$ac_try\"") >&5
17782   (eval $ac_try) 2>&5
17783   ac_status=$?
17784   echo "$as_me:17784: \$? = $ac_status" >&5
17785   (exit $ac_status); }; }; then
17786   cf_cv_builtin_bool=1
17787 else
17788   echo "$as_me: failed program was:" >&5
17789 cat conftest.$ac_ext >&5
17790 cf_cv_builtin_bool=0
17791 fi
17792 rm -f conftest.$ac_objext conftest.$ac_ext
17793
17794 fi
17795
17796 if test "$cf_cv_builtin_bool" = 1
17797 then    echo "$as_me:17797: result: yes" >&5
17798 echo "${ECHO_T}yes" >&6
17799 else    echo "$as_me:17799: result: no" >&5
17800 echo "${ECHO_T}no" >&6
17801 fi
17802
17803 echo "$as_me:17803: checking for size of bool" >&5
17804 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
17805 if test "${cf_cv_type_of_bool+set}" = set; then
17806   echo $ECHO_N "(cached) $ECHO_C" >&6
17807 else
17808
17809         rm -f cf_test.out
17810         if test "$cross_compiling" = yes; then
17811   cf_cv_type_of_bool=unknown
17812 else
17813   cat >conftest.$ac_ext <<_ACEOF
17814 #line 17814 "configure"
17815 #include "confdefs.h"
17816
17817 #include <stdlib.h>
17818 #include <stdio.h>
17819
17820 #if defined(__cplusplus)
17821
17822 #ifdef HAVE_GXX_BUILTIN_H
17823 #include <g++/builtin.h>
17824 #elif HAVE_GPP_BUILTIN_H
17825 #include <gpp/builtin.h>
17826 #elif HAVE_BUILTIN_H
17827 #include <builtin.h>
17828 #endif
17829
17830 #else
17831
17832 #if $cf_cv_header_stdbool_h
17833 #include <stdbool.h>
17834 #endif
17835
17836 #endif
17837
17838 main()
17839 {
17840         FILE *fp = fopen("cf_test.out", "w");
17841         if (fp != 0) {
17842                 bool x = true;
17843                 if ((bool)(-x) >= 0)
17844                         fputs("unsigned ", fp);
17845                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
17846                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
17847                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
17848                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
17849                 fclose(fp);
17850         }
17851         ${cf_cv_main_return:-return}(0);
17852 }
17853
17854 _ACEOF
17855 rm -f conftest$ac_exeext
17856 if { (eval echo "$as_me:17856: \"$ac_link\"") >&5
17857   (eval $ac_link) 2>&5
17858   ac_status=$?
17859   echo "$as_me:17859: \$? = $ac_status" >&5
17860   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17861   { (eval echo "$as_me:17861: \"$ac_try\"") >&5
17862   (eval $ac_try) 2>&5
17863   ac_status=$?
17864   echo "$as_me:17864: \$? = $ac_status" >&5
17865   (exit $ac_status); }; }; then
17866   cf_cv_type_of_bool=`cat cf_test.out`
17867                  if test -z "$cf_cv_type_of_bool"; then
17868                    cf_cv_type_of_bool=unknown
17869                  fi
17870 else
17871   echo "$as_me: program exited with status $ac_status" >&5
17872 echo "$as_me: failed program was:" >&5
17873 cat conftest.$ac_ext >&5
17874 cf_cv_type_of_bool=unknown
17875 fi
17876 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17877 fi
17878
17879 fi
17880
17881         rm -f cf_test.out
17882 echo "$as_me:17882: result: $cf_cv_type_of_bool" >&5
17883 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
17884 if test "$cf_cv_type_of_bool" = unknown ; then
17885         case .$NCURSES_BOOL in #(vi
17886         .auto|.) NCURSES_BOOL=unsigned;;
17887         esac
17888         { echo "$as_me:17888: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
17889 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
17890         cf_cv_type_of_bool=$NCURSES_BOOL
17891 fi
17892
17893 echo "$as_me:17893: checking for special defines needed for etip.h" >&5
17894 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
17895 cf_save_CXXFLAGS="$CXXFLAGS"
17896 cf_result="none"
17897 for cf_math in "" MATH_H
17898 do
17899 for cf_excp in "" MATH_EXCEPTION
17900 do
17901         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -I${srcdir}/include"
17902         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
17903         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
17904 cat >conftest.$ac_ext <<_ACEOF
17905 #line 17905 "configure"
17906 #include "confdefs.h"
17907
17908 #include <etip.h.in>
17909
17910 int
17911 main ()
17912 {
17913
17914   ;
17915   return 0;
17916 }
17917 _ACEOF
17918 rm -f conftest.$ac_objext
17919 if { (eval echo "$as_me:17919: \"$ac_compile\"") >&5
17920   (eval $ac_compile) 2>&5
17921   ac_status=$?
17922   echo "$as_me:17922: \$? = $ac_status" >&5
17923   (exit $ac_status); } &&
17924          { ac_try='test -s conftest.$ac_objext'
17925   { (eval echo "$as_me:17925: \"$ac_try\"") >&5
17926   (eval $ac_try) 2>&5
17927   ac_status=$?
17928   echo "$as_me:17928: \$? = $ac_status" >&5
17929   (exit $ac_status); }; }; then
17930
17931         test -n "$cf_math" && cat >>confdefs.h <<EOF
17932 #define ETIP_NEEDS_${cf_math} 1
17933 EOF
17934
17935         test -n "$cf_excp" && cat >>confdefs.h <<EOF
17936 #define ETIP_NEEDS_${cf_excp} 1
17937 EOF
17938
17939         cf_result="$cf_math $cf_excp"
17940         break
17941
17942 else
17943   echo "$as_me: failed program was:" >&5
17944 cat conftest.$ac_ext >&5
17945 fi
17946 rm -f conftest.$ac_objext conftest.$ac_ext
17947 done
17948 done
17949 echo "$as_me:17949: result: $cf_result" >&5
17950 echo "${ECHO_T}$cf_result" >&6
17951 CXXFLAGS="$cf_save_CXXFLAGS"
17952
17953 if test -n "$CXX"; then
17954 echo "$as_me:17954: checking if $CXX accepts parameter initialization" >&5
17955 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
17956 if test "${cf_cv_cpp_param_init+set}" = set; then
17957   echo $ECHO_N "(cached) $ECHO_C" >&6
17958 else
17959
17960         ac_ext=cc
17961 ac_cpp='$CXXCPP $CPPFLAGS'
17962 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
17963 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
17964 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17965 ac_main_return=return
17966
17967         if test "$cross_compiling" = yes; then
17968   cf_cv_cpp_param_init=unknown
17969 else
17970   cat >conftest.$ac_ext <<_ACEOF
17971 #line 17971 "configure"
17972 #include "confdefs.h"
17973
17974 class TEST {
17975 private:
17976         int value;
17977 public:
17978         TEST(int x = 1);
17979         ~TEST();
17980 };
17981
17982 TEST::TEST(int x = 1)   // some compilers do not like second initializer
17983 {
17984         value = x;
17985 }
17986 void main() { }
17987
17988 _ACEOF
17989 rm -f conftest$ac_exeext
17990 if { (eval echo "$as_me:17990: \"$ac_link\"") >&5
17991   (eval $ac_link) 2>&5
17992   ac_status=$?
17993   echo "$as_me:17993: \$? = $ac_status" >&5
17994   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17995   { (eval echo "$as_me:17995: \"$ac_try\"") >&5
17996   (eval $ac_try) 2>&5
17997   ac_status=$?
17998   echo "$as_me:17998: \$? = $ac_status" >&5
17999   (exit $ac_status); }; }; then
18000   cf_cv_cpp_param_init=yes
18001 else
18002   echo "$as_me: program exited with status $ac_status" >&5
18003 echo "$as_me: failed program was:" >&5
18004 cat conftest.$ac_ext >&5
18005 cf_cv_cpp_param_init=no
18006 fi
18007 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18008 fi
18009         ac_ext=cc
18010 ac_cpp='$CXXCPP $CPPFLAGS'
18011 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18012 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18013 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18014 ac_main_return=return
18015
18016 fi
18017 echo "$as_me:18017: result: $cf_cv_cpp_param_init" >&5
18018 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
18019 fi
18020 test "$cf_cv_cpp_param_init" = yes && cat >>confdefs.h <<\EOF
18021 #define CPP_HAS_PARAM_INIT 1
18022 EOF
18023
18024 if test -n "$CXX"; then
18025
18026 echo "$as_me:18026: checking if $CXX accepts static_cast" >&5
18027 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
18028 if test "${cf_cv_cpp_static_cast+set}" = set; then
18029   echo $ECHO_N "(cached) $ECHO_C" >&6
18030 else
18031
18032         ac_ext=cc
18033 ac_cpp='$CXXCPP $CPPFLAGS'
18034 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18035 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18036 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18037 ac_main_return=return
18038
18039         cat >conftest.$ac_ext <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042
18043 class NCursesPanel
18044 {
18045 public:
18046   NCursesPanel(int nlines,
18047                int ncols,
18048                int begin_y = 0,
18049                int begin_x = 0)
18050   {
18051   }
18052
18053   ~NCursesPanel();
18054 };
18055
18056 template<class T> class NCursesUserPanel : public NCursesPanel
18057 {
18058 public:
18059   NCursesUserPanel (int nlines,
18060                     int ncols,
18061                     int begin_y = 0,
18062                     int begin_x = 0,
18063                     const T* p_UserData = static_cast<T*>(0))
18064     : NCursesPanel (nlines, ncols, begin_y, begin_x)
18065   {
18066   };
18067   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
18068   {
18069   };
18070
18071   virtual ~NCursesUserPanel() {};
18072 };
18073
18074 int
18075 main ()
18076 {
18077
18078         const char* p_UserData = static_cast<char*>(0)
18079   ;
18080   return 0;
18081 }
18082 _ACEOF
18083 rm -f conftest.$ac_objext
18084 if { (eval echo "$as_me:18084: \"$ac_compile\"") >&5
18085   (eval $ac_compile) 2>&5
18086   ac_status=$?
18087   echo "$as_me:18087: \$? = $ac_status" >&5
18088   (exit $ac_status); } &&
18089          { ac_try='test -s conftest.$ac_objext'
18090   { (eval echo "$as_me:18090: \"$ac_try\"") >&5
18091   (eval $ac_try) 2>&5
18092   ac_status=$?
18093   echo "$as_me:18093: \$? = $ac_status" >&5
18094   (exit $ac_status); }; }; then
18095   cf_cv_cpp_static_cast=yes
18096 else
18097   echo "$as_me: failed program was:" >&5
18098 cat conftest.$ac_ext >&5
18099 cf_cv_cpp_static_cast=no
18100 fi
18101 rm -f conftest.$ac_objext conftest.$ac_ext
18102
18103         ac_ext=cc
18104 ac_cpp='$CXXCPP $CPPFLAGS'
18105 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
18106 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
18107 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18108 ac_main_return=return
18109
18110 fi
18111 echo "$as_me:18111: result: $cf_cv_cpp_static_cast" >&5
18112 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
18113
18114 fi
18115
18116 test "$cf_cv_cpp_static_cast" = yes && cat >>confdefs.h <<\EOF
18117 #define CPP_HAS_STATIC_CAST 1
18118 EOF
18119
18120         CXX_AR='$(AR)'
18121         CXX_ARFLAGS='$(ARFLAGS)'
18122         case $cf_cv_system_name in #(vi
18123         irix*) #(vi
18124             if test "$GXX" != yes ; then
18125                 CXX_AR='$(CXX)'
18126                 CXX_ARFLAGS='-ar -o'
18127             fi
18128             ;;
18129         sco3.2v5*) #(vi
18130             CXXLDFLAGS="-u main"
18131             ;;
18132         solaris2*)
18133             if test "$GXX" != yes ; then
18134                 CXX_AR='$(CXX)'
18135                 CXX_ARFLAGS='-xar -o'
18136             fi
18137             ;;
18138         esac
18139
18140 else
18141         cf_cxx_library=no
18142         cf_cv_builtin_bool=1
18143
18144         # Just because we are not configuring against C++ right now does not
18145         # mean that a user will not want to use C++.  Some distributors disable
18146         # the C++ portion of this configuration as a shortcut (or just to avoid
18147         # compiling the demo in the c++ directory).  So we need a reasonable
18148         # default for the 'bool' type.
18149         #
18150         # Caveat: since the storage of the bool type is not standardized, it
18151         # may change.
18152
18153         if test "$NCURSES_BOOL" != auto ; then
18154                 cf_cv_type_of_bool=$NCURSES_BOOL
18155                 cf_cv_header_stdbool_h=0
18156         else
18157                 if test "$cf_cv_header_stdbool_h" = 1 ; then
18158
18159 echo "$as_me:18159: checking for size of bool" >&5
18160 echo $ECHO_N "checking for size of bool... $ECHO_C" >&6
18161 if test "${cf_cv_type_of_bool+set}" = set; then
18162   echo $ECHO_N "(cached) $ECHO_C" >&6
18163 else
18164
18165         rm -f cf_test.out
18166         if test "$cross_compiling" = yes; then
18167   cf_cv_type_of_bool=unknown
18168 else
18169   cat >conftest.$ac_ext <<_ACEOF
18170 #line 18170 "configure"
18171 #include "confdefs.h"
18172
18173 #include <stdlib.h>
18174 #include <stdio.h>
18175
18176 #if defined(__cplusplus)
18177
18178 #ifdef HAVE_GXX_BUILTIN_H
18179 #include <g++/builtin.h>
18180 #elif HAVE_GPP_BUILTIN_H
18181 #include <gpp/builtin.h>
18182 #elif HAVE_BUILTIN_H
18183 #include <builtin.h>
18184 #endif
18185
18186 #else
18187
18188 #if $cf_cv_header_stdbool_h
18189 #include <stdbool.h>
18190 #endif
18191
18192 #endif
18193
18194 main()
18195 {
18196         FILE *fp = fopen("cf_test.out", "w");
18197         if (fp != 0) {
18198                 bool x = true;
18199                 if ((bool)(-x) >= 0)
18200                         fputs("unsigned ", fp);
18201                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
18202                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
18203                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
18204                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
18205                 fclose(fp);
18206         }
18207         ${cf_cv_main_return:-return}(0);
18208 }
18209
18210 _ACEOF
18211 rm -f conftest$ac_exeext
18212 if { (eval echo "$as_me:18212: \"$ac_link\"") >&5
18213   (eval $ac_link) 2>&5
18214   ac_status=$?
18215   echo "$as_me:18215: \$? = $ac_status" >&5
18216   (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18217   { (eval echo "$as_me:18217: \"$ac_try\"") >&5
18218   (eval $ac_try) 2>&5
18219   ac_status=$?
18220   echo "$as_me:18220: \$? = $ac_status" >&5
18221   (exit $ac_status); }; }; then
18222   cf_cv_type_of_bool=`cat cf_test.out`
18223                  if test -z "$cf_cv_type_of_bool"; then
18224                    cf_cv_type_of_bool=unknown
18225                  fi
18226 else
18227   echo "$as_me: program exited with status $ac_status" >&5
18228 echo "$as_me: failed program was:" >&5
18229 cat conftest.$ac_ext >&5
18230 cf_cv_type_of_bool=unknown
18231 fi
18232 rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18233 fi
18234
18235 fi
18236
18237         rm -f cf_test.out
18238 echo "$as_me:18238: result: $cf_cv_type_of_bool" >&5
18239 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18240 if test "$cf_cv_type_of_bool" = unknown ; then
18241         case .$NCURSES_BOOL in #(vi
18242         .auto|.) NCURSES_BOOL=unsigned;;
18243         esac
18244         { echo "$as_me:18244: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
18245 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
18246         cf_cv_type_of_bool=$NCURSES_BOOL
18247 fi
18248
18249                 else
18250                         echo "$as_me:18250: checking for fallback type of bool" >&5
18251 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
18252                         case "$host_cpu" in #(vi
18253                         i?86)   cf_cv_type_of_bool=char ;; #(vi
18254                         *)      cf_cv_type_of_bool=int  ;;
18255                         esac
18256                         echo "$as_me:18256: result: $cf_cv_type_of_bool" >&5
18257 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
18258                 fi
18259         fi
18260 fi
18261
18262 # If the C compiler did not declare bool, and we did not determine that the C++
18263 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
18264 # ncurses library use the same type as C++ bool.  Note that this allows one to
18265 # specify the type of bool in a configure-script option and postpone
18266 # integration with the C++ compiler provided that the types are compatible.
18267 USE_CXX_BOOL=1
18268 if test $cf_cv_cc_bool_type = 1
18269 then
18270         # oops: C has a bool.  Unlikely, but C++ could differ.
18271         USE_CXX_BOOL=0
18272 elif test $cf_cv_builtin_bool = 0
18273 then
18274         # C++ has no bool
18275         USE_CXX_BOOL=0
18276 else
18277         # this is the normal case
18278         USE_CXX_BOOL='defined(__cplusplus)'
18279 fi
18280
18281 if test -f "${srcdir}/Ada95/Makefile.in" ; then
18282
18283         if test "$cf_with_ada" != "no" ; then
18284                 if test "$with_libtool" != "no"; then
18285                         { echo "$as_me:18285: WARNING: libtool does not support Ada - disabling feature" >&5
18286 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
18287                         cf_with_ada=no
18288                 fi
18289         fi
18290
18291         if test "$cf_with_ada" != "no" ; then
18292
18293 cf_ada_make=gnatmake
18294 # Extract the first word of "$cf_ada_make", so it can be a program name with args.
18295 set dummy $cf_ada_make; ac_word=$2
18296 echo "$as_me:18296: checking for $ac_word" >&5
18297 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18298 if test "${ac_cv_prog_gnat_exists+set}" = set; then
18299   echo $ECHO_N "(cached) $ECHO_C" >&6
18300 else
18301   if test -n "$gnat_exists"; then
18302   ac_cv_prog_gnat_exists="$gnat_exists" # Let the user override the test.
18303 else
18304   ac_save_IFS=$IFS; IFS=$ac_path_separator
18305 ac_dummy="$PATH"
18306 for ac_dir in $ac_dummy; do
18307   IFS=$ac_save_IFS
18308   test -z "$ac_dir" && ac_dir=.
18309   $as_executable_p "$ac_dir/$ac_word" || continue
18310 ac_cv_prog_gnat_exists="yes"
18311 echo "$as_me:18311: found $ac_dir/$ac_word" >&5
18312 break
18313 done
18314
18315   test -z "$ac_cv_prog_gnat_exists" && ac_cv_prog_gnat_exists="no"
18316 fi
18317 fi
18318 gnat_exists=$ac_cv_prog_gnat_exists
18319 if test -n "$gnat_exists"; then
18320   echo "$as_me:18320: result: $gnat_exists" >&5
18321 echo "${ECHO_T}$gnat_exists" >&6
18322 else
18323   echo "$as_me:18323: result: no" >&5
18324 echo "${ECHO_T}no" >&6
18325 fi
18326
18327 if test "$ac_cv_prog_gnat_exists" = no; then
18328    cf_ada_make=
18329 else
18330
18331 echo "$as_me:18331: checking for gnat version" >&5
18332 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
18333 cf_gnat_version=`${cf_ada_make:-gnatmake} -v 2>&1 | \
18334         grep '[0-9].[0-9][0-9]*' |\
18335     sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
18336 echo "$as_me:18336: result: $cf_gnat_version" >&5
18337 echo "${ECHO_T}$cf_gnat_version" >&6
18338
18339 case $cf_gnat_version in #(vi
18340 3.1[1-9]*|3.[2-9]*|[4-9].*) #(vi
18341         cf_cv_prog_gnat_correct=yes
18342         ;;
18343 *)
18344         { echo "$as_me:18344: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
18345 echo "$as_me: WARNING: Unsupported GNAT version $cf_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
18346         cf_cv_prog_gnat_correct=no
18347         ;;
18348 esac
18349
18350    # Extract the first word of "m4", so it can be a program name with args.
18351 set dummy m4; ac_word=$2
18352 echo "$as_me:18352: checking for $ac_word" >&5
18353 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18354 if test "${ac_cv_prog_M4_exists+set}" = set; then
18355   echo $ECHO_N "(cached) $ECHO_C" >&6
18356 else
18357   if test -n "$M4_exists"; then
18358   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
18359 else
18360   ac_save_IFS=$IFS; IFS=$ac_path_separator
18361 ac_dummy="$PATH"
18362 for ac_dir in $ac_dummy; do
18363   IFS=$ac_save_IFS
18364   test -z "$ac_dir" && ac_dir=.
18365   $as_executable_p "$ac_dir/$ac_word" || continue
18366 ac_cv_prog_M4_exists="yes"
18367 echo "$as_me:18367: found $ac_dir/$ac_word" >&5
18368 break
18369 done
18370
18371   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
18372 fi
18373 fi
18374 M4_exists=$ac_cv_prog_M4_exists
18375 if test -n "$M4_exists"; then
18376   echo "$as_me:18376: result: $M4_exists" >&5
18377 echo "${ECHO_T}$M4_exists" >&6
18378 else
18379   echo "$as_me:18379: result: no" >&5
18380 echo "${ECHO_T}no" >&6
18381 fi
18382
18383    if test "$ac_cv_prog_M4_exists" = no; then
18384       cf_cv_prog_gnat_correct=no
18385       echo Ada95 binding required program m4 not found. Ada95 binding disabled.
18386    fi
18387    if test "$cf_cv_prog_gnat_correct" = yes; then
18388       echo "$as_me:18388: checking if GNAT works" >&5
18389 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
18390
18391 rm -rf conftest* *~conftest*
18392 cat >>conftest.ads <<CF_EOF
18393 procedure conftest;
18394 CF_EOF
18395 cat >>conftest.adb <<CF_EOF
18396 with Text_IO;
18397 with GNAT.OS_Lib;
18398 procedure conftest is
18399 begin
18400    Text_IO.Put ("Hello World");
18401    Text_IO.New_Line;
18402    GNAT.OS_Lib.OS_Exit (0);
18403 end conftest;
18404 CF_EOF
18405 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18406    if ( ./conftest 1>&5 2>&1 ) ; then
18407       cf_cv_prog_gnat_correct=yes
18408    else
18409       cf_cv_prog_gnat_correct=no
18410    fi
18411 else
18412    cf_cv_prog_gnat_correct=no
18413 fi
18414 rm -rf conftest* *~conftest*
18415
18416       echo "$as_me:18416: result: $cf_cv_prog_gnat_correct" >&5
18417 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
18418    fi
18419 fi
18420
18421                 if test "$cf_cv_prog_gnat_correct" = yes; then
18422
18423         ADAFLAGS="$ADAFLAGS -gnatpn"
18424
18425                         # make ADAFLAGS consistent with CFLAGS
18426                         case "$CFLAGS" in
18427                         *-g*)
18428
18429         ADAFLAGS="$ADAFLAGS -g"
18430
18431                                 ;;
18432                         esac
18433                         case "$CFLAGS" in
18434                         *-O*)
18435
18436         ADAFLAGS="$ADAFLAGS -O3"
18437
18438                                 ;;
18439                         esac
18440
18441 echo "$as_me:18441: checking if GNAT supports generics" >&5
18442 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
18443 case $cf_gnat_version in #(vi
18444 3.[1-9]*|[4-9].*) #(vi
18445         cf_gnat_generics=yes
18446         ;;
18447 *)
18448         cf_gnat_generics=no
18449         ;;
18450 esac
18451 echo "$as_me:18451: result: $cf_gnat_generics" >&5
18452 echo "${ECHO_T}$cf_gnat_generics" >&6
18453
18454 if test "$cf_gnat_generics" = yes
18455 then
18456         cf_compile_generics=generics
18457         cf_generic_objects="\${GENOBJS}"
18458 else
18459         cf_compile_generics=
18460         cf_generic_objects=
18461 fi
18462
18463 echo "$as_me:18463: checking if GNAT supports SIGINT" >&5
18464 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
18465 if test "${cf_cv_gnat_sigint+set}" = set; then
18466   echo $ECHO_N "(cached) $ECHO_C" >&6
18467 else
18468
18469 rm -rf conftest* *~conftest*
18470 cat >>conftest.ads <<CF_EOF
18471 with Ada.Interrupts.Names;
18472
18473 package ConfTest is
18474
18475    pragma Warnings (Off);  --  the next pragma exists since 3.11p
18476    pragma Unreserve_All_Interrupts;
18477    pragma Warnings (On);
18478
18479    protected Process is
18480       procedure Stop;
18481       function Continue return Boolean;
18482       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
18483    private
18484       Done : Boolean := False;
18485    end Process;
18486
18487 end ConfTest;
18488 CF_EOF
18489 cat >>conftest.adb <<CF_EOF
18490 package body ConfTest is
18491    protected body Process is
18492       procedure Stop is
18493       begin
18494          Done := True;
18495       end Stop;
18496       function Continue return Boolean is
18497       begin
18498          return not Done;
18499       end Continue;
18500    end Process;
18501 end ConfTest;
18502 CF_EOF
18503 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18504       cf_cv_gnat_sigint=yes
18505 else
18506    cf_cv_gnat_sigint=no
18507 fi
18508 rm -rf conftest* *~conftest*
18509
18510 fi
18511 echo "$as_me:18511: result: $cf_cv_gnat_sigint" >&5
18512 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
18513
18514 if test $cf_cv_gnat_sigint = yes ; then
18515         USE_GNAT_SIGINT=""
18516 else
18517         USE_GNAT_SIGINT="#"
18518 fi
18519
18520 echo "$as_me:18520: checking if GNAT pragma Unreferenced works" >&5
18521 echo $ECHO_N "checking if GNAT pragma Unreferenced works... $ECHO_C" >&6
18522 if test "${cf_cv_pragma_unreferenced+set}" = set; then
18523   echo $ECHO_N "(cached) $ECHO_C" >&6
18524 else
18525
18526 rm -rf conftest* *~conftest*
18527 cat >>conftest.ads <<CF_EOF
18528 procedure conftest;
18529 CF_EOF
18530 cat >>conftest.adb <<CF_EOF
18531 with Text_IO;
18532 with GNAT.OS_Lib;
18533 procedure conftest is
18534    test : Integer;
18535    pragma Unreferenced (test);
18536 begin
18537    test := 1;
18538    Text_IO.Put ("Hello World");
18539    Text_IO.New_Line;
18540    GNAT.OS_Lib.OS_Exit (0);
18541 end conftest;
18542 CF_EOF
18543 if ( $cf_ada_make $ADAFLAGS conftest 1>&5 2>&1 ) ; then
18544       cf_cv_pragma_unreferenced=yes
18545 else
18546    cf_cv_pragma_unreferenced=no
18547 fi
18548 rm -rf conftest* *~conftest*
18549
18550 fi
18551 echo "$as_me:18551: result: $cf_cv_pragma_unreferenced" >&5
18552 echo "${ECHO_T}$cf_cv_pragma_unreferenced" >&6
18553
18554 # if the pragma is supported, use it (needed in the Trace code).
18555 if test $cf_cv_pragma_unreferenced = yes ; then
18556         PRAGMA_UNREF=TRUE
18557 else
18558         PRAGMA_UNREF=FALSE
18559 fi
18560
18561 cf_gnat_libraries=no
18562 cf_gnat_projects=no
18563
18564 echo "$as_me:18564: checking if GNAT supports project files" >&5
18565 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
18566 case $cf_gnat_version in #(vi
18567 3.[0-9]*) #(vi
18568         ;;
18569 *)
18570         case $cf_cv_system_name in #(vi
18571         cygwin*) #(vi
18572                 ;;
18573         *)
18574                 mkdir conftest.src conftest.bin conftest.lib
18575                 cd conftest.src
18576                 rm -rf conftest* *~conftest*
18577                 cat >>library.gpr <<CF_EOF
18578 project Library is
18579   Kind := External ("LIB_KIND");
18580   for Library_Name use "ConfTest";
18581   for Object_Dir use ".";
18582   for Library_ALI_Dir use External("LIBRARY_DIR");
18583   for Library_Version use External ("SONAME");
18584   for Library_Kind use Kind;
18585   for Library_Dir use External("BUILD_DIR");
18586   Source_Dir := External ("SOURCE_DIR");
18587   for Source_Dirs use (Source_Dir);
18588   package Compiler is
18589      for Default_Switches ("Ada") use
18590        ("-g",
18591         "-O2",
18592         "-gnatafno",
18593         "-gnatVa",   -- All validity checks
18594         "-gnatwa");  -- Activate all optional errors
18595   end Compiler;
18596 end Library;
18597 CF_EOF
18598                 cat >>confpackage.ads <<CF_EOF
18599 package ConfPackage is
18600    procedure conftest;
18601 end ConfPackage;
18602 CF_EOF
18603                 cat >>confpackage.adb <<CF_EOF
18604 with Text_IO;
18605 package body ConfPackage is
18606    procedure conftest is
18607    begin
18608       Text_IO.Put ("Hello World");
18609       Text_IO.New_Line;
18610    end conftest;
18611 end ConfPackage;
18612 CF_EOF
18613                 if ( $cf_ada_make $ADAFLAGS \
18614                                 -Plibrary.gpr \
18615                                 -XBUILD_DIR=`cd ../conftest.bin;pwd` \
18616                                 -XLIBRARY_DIR=`cd ../conftest.lib;pwd` \
18617                                 -XSOURCE_DIR=`pwd` \
18618                                 -XSONAME=libConfTest.so.1 \
18619                                 -XLIB_KIND=static 1>&5 2>&1 ) ; then
18620                         cf_gnat_projects=yes
18621                 fi
18622                 cd ..
18623                 if test -f conftest.lib/confpackage.ali
18624                 then
18625                         cf_gnat_libraries=yes
18626                 fi
18627                 rm -rf conftest* *~conftest*
18628                 ;;
18629         esac
18630         ;;
18631 esac
18632 echo "$as_me:18632: result: $cf_gnat_projects" >&5
18633 echo "${ECHO_T}$cf_gnat_projects" >&6
18634
18635 if test $cf_gnat_projects = yes
18636 then
18637         echo "$as_me:18637: checking if GNAT supports libraries" >&5
18638 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
18639         echo "$as_me:18639: result: $cf_gnat_libraries" >&5
18640 echo "${ECHO_T}$cf_gnat_libraries" >&6
18641 fi
18642
18643 if test "$cf_gnat_projects" = yes
18644 then
18645         USE_OLD_MAKERULES="#"
18646         USE_GNAT_PROJECTS=""
18647 else
18648         USE_OLD_MAKERULES=""
18649         USE_GNAT_PROJECTS="#"
18650 fi
18651
18652 if test "$cf_gnat_libraries" = yes
18653 then
18654         USE_GNAT_LIBRARIES=""
18655 else
18656         USE_GNAT_LIBRARIES="#"
18657 fi
18658
18659 echo "$as_me:18659: checking for ada-compiler" >&5
18660 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
18661
18662 # Check whether --with-ada-compiler or --without-ada-compiler was given.
18663 if test "${with_ada_compiler+set}" = set; then
18664   withval="$with_ada_compiler"
18665   cf_ada_compiler=$withval
18666 else
18667   cf_ada_compiler=gnatmake
18668 fi;
18669
18670 echo "$as_me:18670: result: $cf_ada_compiler" >&5
18671 echo "${ECHO_T}$cf_ada_compiler" >&6
18672
18673                         cf_ada_package=terminal_interface
18674
18675 echo "$as_me:18675: checking for ada-include" >&5
18676 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
18677
18678 # Check whether --with-ada-include or --without-ada-include was given.
18679 if test "${with_ada_include+set}" = set; then
18680   withval="$with_ada_include"
18681
18682 else
18683   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
18684 fi; if test -n "$prefix/share/ada/adainclude" ; then
18685
18686 if test "x$prefix" != xNONE; then
18687   cf_path_syntax="$prefix"
18688 else
18689   cf_path_syntax="$ac_default_prefix"
18690 fi
18691
18692 case ".$withval" in #(vi
18693 .\$\(*\)*|.\'*\'*) #(vi
18694   ;;
18695 ..|./*|.\\*) #(vi
18696   ;;
18697 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18698   ;;
18699 .\${*prefix}*) #(vi
18700   eval withval="$withval"
18701   case ".$withval" in #(vi
18702   .NONE/*)
18703     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18704     ;;
18705   esac
18706   ;; #(vi
18707 .no|.NONE/*)
18708   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18709   ;;
18710 *)
18711   { { echo "$as_me:18711: error: expected a pathname, not \"$withval\"" >&5
18712 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18713    { (exit 1); exit 1; }; }
18714   ;;
18715 esac
18716
18717 fi
18718 ADA_INCLUDE="$withval"
18719
18720 echo "$as_me:18720: result: $ADA_INCLUDE" >&5
18721 echo "${ECHO_T}$ADA_INCLUDE" >&6
18722
18723 echo "$as_me:18723: checking for ada-objects" >&5
18724 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
18725
18726 # Check whether --with-ada-objects or --without-ada-objects was given.
18727 if test "${with_ada_objects+set}" = set; then
18728   withval="$with_ada_objects"
18729
18730 else
18731   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
18732 fi; if test -n "$prefix/lib/ada/adalib" ; then
18733
18734 if test "x$prefix" != xNONE; then
18735   cf_path_syntax="$prefix"
18736 else
18737   cf_path_syntax="$ac_default_prefix"
18738 fi
18739
18740 case ".$withval" in #(vi
18741 .\$\(*\)*|.\'*\'*) #(vi
18742   ;;
18743 ..|./*|.\\*) #(vi
18744   ;;
18745 .[a-zA-Z]:[\\/]*) #(vi OS/2 EMX
18746   ;;
18747 .\${*prefix}*) #(vi
18748   eval withval="$withval"
18749   case ".$withval" in #(vi
18750   .NONE/*)
18751     withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18752     ;;
18753   esac
18754   ;; #(vi
18755 .no|.NONE/*)
18756   withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
18757   ;;
18758 *)
18759   { { echo "$as_me:18759: error: expected a pathname, not \"$withval\"" >&5
18760 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
18761    { (exit 1); exit 1; }; }
18762   ;;
18763 esac
18764
18765 fi
18766 ADA_OBJECTS="$withval"
18767
18768 echo "$as_me:18768: result: $ADA_OBJECTS" >&5
18769 echo "${ECHO_T}$ADA_OBJECTS" >&6
18770
18771 echo "$as_me:18771: checking if an Ada95 shared-library should be built" >&5
18772 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
18773
18774 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
18775 if test "${with_ada_sharedlib+set}" = set; then
18776   withval="$with_ada_sharedlib"
18777   with_ada_sharedlib=$withval
18778 else
18779   with_ada_sharedlib=no
18780 fi;
18781 echo "$as_me:18781: result: $with_ada_sharedlib" >&5
18782 echo "${ECHO_T}$with_ada_sharedlib" >&6
18783
18784 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
18785 MAKE_ADA_SHAREDLIB="#"
18786
18787 if test "x$with_ada_sharedlib" != xno
18788 then
18789         MAKE_ADA_SHAREDLIB=
18790         if test "x$with_ada_sharedlib" != xyes
18791         then
18792                 ADA_SHAREDLIB="$with_ada_sharedlib"
18793         fi
18794 fi
18795
18796                 fi
18797         fi
18798 else
18799         cf_with_ada=no
18800 fi
18801
18802 ### Construct the ncurses library-subsets, if any, from this set of keywords:
18803 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
18804 ###
18805 ### ticlib modules may be a separate library, otherwise contained in termlib.
18806 ### termlib modules may be a separate library, otherwise contained in ncurses.
18807 ###
18808 ### The of "+" or " " between the tokens controls the way the script
18809 ### chooses to split module lists into libraries.
18810 ###
18811 ### (see CF_LIB_RULES).
18812 echo "$as_me:18812: checking for library subsets" >&5
18813 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
18814 LIB_SUBSETS=
18815
18816 if test "$cf_with_progs" = yes || test "$with_ticlib" != no || test "$with_termcap" != no; then
18817         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
18818         if test "$with_ticlib" != no ; then
18819                 LIB_SUBSETS="${LIB_SUBSETS} "
18820         else
18821                 LIB_SUBSETS="${LIB_SUBSETS}+"
18822         fi
18823 fi
18824
18825 LIB_SUBSETS="${LIB_SUBSETS}termlib"
18826 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
18827
18828 if test "$with_termlib" != no ; then
18829         LIB_SUBSETS="${LIB_SUBSETS} "
18830 else
18831         LIB_SUBSETS="${LIB_SUBSETS}+"
18832 fi
18833
18834 LIB_SUBSETS="${LIB_SUBSETS}base"
18835
18836 # Most term-driver calls are to tinfo, but some like init_pair are to the
18837 # base library (so it resides in base).
18838 if test "$with_term_driver" != no ; then
18839         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
18840         case $cf_cv_system_name in #(vi
18841         *mingw32*) #(vi
18842                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
18843                 ;;
18844         *) #(vi
18845                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
18846                 ;;
18847         esac
18848 fi
18849
18850 test "$with_widec"     = yes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
18851 test "$with_ext_funcs" = yes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
18852
18853 echo "$as_me:18853: result: $LIB_SUBSETS" >&5
18854 echo "${ECHO_T}$LIB_SUBSETS" >&6
18855
18856 ### Construct the list of include-directories to be generated
18857
18858 CPPFLAGS="$CPPFLAGS -I. -I../include"
18859 if test "$srcdir" != "."; then
18860         CPPFLAGS="$CPPFLAGS -I\${srcdir}/../include"
18861 fi
18862 if test "$GCC" != yes; then
18863         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18864 elif test "$includedir" != "/usr/include"; then
18865         if test "$includedir" = '${prefix}/include' ; then
18866                 if test $prefix != /usr ; then
18867                         CPPFLAGS="$CPPFLAGS -I\${includedir}"
18868                 fi
18869         else
18870                 CPPFLAGS="$CPPFLAGS -I\${includedir}"
18871         fi
18872 fi
18873
18874 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
18875 if test "$srcdir" != "."; then
18876         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
18877 fi
18878 if test "$GCC" != yes; then
18879         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18880 elif test "$includedir" != "/usr/include"; then
18881         if test "$includedir" = '${prefix}/include' ; then
18882                 if test $prefix != /usr ; then
18883                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18884                 fi
18885         else
18886                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
18887         fi
18888 fi
18889
18890 ### Build up pieces for makefile rules
18891 echo "$as_me:18891: checking default library suffix" >&5
18892 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
18893
18894         case $DFT_LWR_MODEL in
18895         libtool) DFT_ARG_SUFFIX=''   ;;
18896         normal)  DFT_ARG_SUFFIX=''   ;;
18897         debug)   DFT_ARG_SUFFIX='_g' ;;
18898         profile) DFT_ARG_SUFFIX='_p' ;;
18899         shared)  DFT_ARG_SUFFIX=''   ;;
18900         esac
18901         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
18902 echo "$as_me:18902: result: $DFT_ARG_SUFFIX" >&5
18903 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
18904
18905 echo "$as_me:18905: checking default library-dependency suffix" >&5
18906 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
18907
18908         case $DFT_LWR_MODEL in #(vi
18909         libtool) #(vi
18910                 DFT_LIB_SUFFIX='.la'
18911                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18912                 ;;
18913         normal) #(vi
18914                 DFT_LIB_SUFFIX='.a'
18915                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18916                 ;;
18917         debug) #(vi
18918                 DFT_LIB_SUFFIX='_g.a'
18919                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18920                 ;;
18921         profile) #(vi
18922                 DFT_LIB_SUFFIX='_p.a'
18923                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18924                 ;;
18925         shared) #(vi
18926                 case $cf_cv_system_name in
18927                 aix[5-7]*) #(vi
18928                         DFT_LIB_SUFFIX='.a'
18929                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18930                         ;;
18931                 cygwin*) #(vi
18932                         DFT_LIB_SUFFIX='.dll'
18933                         DFT_DEP_SUFFIX='.dll.a'
18934                         ;;
18935                 darwin*) #(vi
18936                         DFT_LIB_SUFFIX='.dylib'
18937                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18938                         ;;
18939                 hpux*) #(vi
18940                         case $target in
18941                         ia64*) #(vi
18942                                 DFT_LIB_SUFFIX='.so'
18943                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18944                                 ;;
18945                         *) #(vi
18946                                 DFT_LIB_SUFFIX='.sl'
18947                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18948                                 ;;
18949                         esac
18950                         ;;
18951                 *)      DFT_LIB_SUFFIX='.so'
18952                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
18953                         ;;
18954                 esac
18955         esac
18956         test -n "$LIB_SUFFIX" && DFT_LIB_SUFFIX="${LIB_SUFFIX}${DFT_LIB_SUFFIX}"
18957         test -n "$LIB_SUFFIX" && DFT_DEP_SUFFIX="${LIB_SUFFIX}${DFT_DEP_SUFFIX}"
18958 echo "$as_me:18958: result: $DFT_DEP_SUFFIX" >&5
18959 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
18960
18961 echo "$as_me:18961: checking default object directory" >&5
18962 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
18963
18964         case $DFT_LWR_MODEL in
18965         libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
18966         normal)  DFT_OBJ_SUBDIR='objects' ;;
18967         debug)   DFT_OBJ_SUBDIR='obj_g' ;;
18968         profile) DFT_OBJ_SUBDIR='obj_p' ;;
18969         shared)
18970                 case $cf_cv_system_name in #(vi
18971                 cygwin) #(vi
18972                         DFT_OBJ_SUBDIR='objects' ;;
18973                 *)
18974                         DFT_OBJ_SUBDIR='obj_s' ;;
18975                 esac
18976         esac
18977 echo "$as_me:18977: result: $DFT_OBJ_SUBDIR" >&5
18978 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
18979
18980 # libtool thinks it can make c++ shared libraries (perhaps only g++)
18981 if test "$cf_with_cxx" = yes ; then
18982 echo "$as_me:18982: checking c++ library-dependency suffix" >&5
18983 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
18984 if test "$with_libtool" != "no"; then
18985         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
18986 else
18987
18988         case normal in #(vi
18989         libtool) #(vi
18990                 CXX_LIB_SUFFIX='.la'
18991                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18992                 ;;
18993         normal) #(vi
18994                 CXX_LIB_SUFFIX='.a'
18995                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
18996                 ;;
18997         debug) #(vi
18998                 CXX_LIB_SUFFIX='_g.a'
18999                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19000                 ;;
19001         profile) #(vi
19002                 CXX_LIB_SUFFIX='_p.a'
19003                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19004                 ;;
19005         shared) #(vi
19006                 case $cf_cv_system_name in
19007                 aix[5-7]*) #(vi
19008                         CXX_LIB_SUFFIX='.a'
19009                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19010                         ;;
19011                 cygwin*) #(vi
19012                         CXX_LIB_SUFFIX='.dll'
19013                         CXX_DEP_SUFFIX='.dll.a'
19014                         ;;
19015                 darwin*) #(vi
19016                         CXX_LIB_SUFFIX='.dylib'
19017                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19018                         ;;
19019                 hpux*) #(vi
19020                         case $target in
19021                         ia64*) #(vi
19022                                 CXX_LIB_SUFFIX='.so'
19023                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19024                                 ;;
19025                         *) #(vi
19026                                 CXX_LIB_SUFFIX='.sl'
19027                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19028                                 ;;
19029                         esac
19030                         ;;
19031                 *)      CXX_LIB_SUFFIX='.so'
19032                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
19033                         ;;
19034                 esac
19035         esac
19036         test -n "$LIB_SUFFIX" && CXX_LIB_SUFFIX="${LIB_SUFFIX}${CXX_LIB_SUFFIX}"
19037         test -n "$LIB_SUFFIX" && CXX_DEP_SUFFIX="${LIB_SUFFIX}${CXX_DEP_SUFFIX}"
19038 fi
19039 echo "$as_me:19039: result: $CXX_LIB_SUFFIX" >&5
19040 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
19041
19042 fi
19043
19044 # do not want -ldl in build except as needed for -lncurses dependency
19045 if test "$with_dlsym" = yes ; then
19046 if test $DFT_LWR_MODEL = shared || \
19047    test $DFT_LWR_MODEL = libtool ; then
19048
19049 # remove dl library from $LIBS
19050 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
19051
19052 fi
19053 fi
19054 ### Set up low-level terminfo dependencies for makefiles.
19055
19056 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
19057 # do not need libdl
19058 TICS_LIST=
19059 if test "$with_dlsym" = yes ; then
19060
19061 # remove dl library from $SHLIB_LIST
19062 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
19063
19064 fi
19065
19066 if test "$with_ticlib" != no ; then
19067
19068         if test "$with_ticlib" != yes ; then
19069                 TICS_NAME=$with_ticlib
19070                 TICS_ARG_SUFFIX="${with_ticlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19071                 TICS_DEP_SUFFIX="${with_ticlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19072                 TICS_LIB_SUFFIX="${with_ticlib}"
19073         else
19074                 TICS_ARG_SUFFIX="${TICS_NAME}${DFT_ARG_SUFFIX}"
19075                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
19076                 TICS_LIB_SUFFIX="${TICS_NAME}${LIB_SUFFIX}"
19077         fi
19078         TICS_ARGS="-L${LIB_DIR} -l${TICS_LIB_SUFFIX}"
19079 else
19080         TICS_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19081 fi
19082
19083 if test "$with_termlib" != no ; then
19084
19085         if test "$with_termlib" != yes ; then
19086                 TINFO_NAME=$with_termlib
19087                 TINFO_SUFFIX="`echo ${DFT_LIB_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19088                 TINFO_ARG_SUFFIX="${with_termlib}`echo ${DFT_ARG_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19089                 TINFO_DEP_SUFFIX="${with_termlib}`echo ${DFT_DEP_SUFFIX}|sed -e "s/^${LIB_SUFFIX}//"`"
19090                 TINFO_LIB_SUFFIX="${with_termlib}"
19091         else
19092                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19093                 TINFO_ARG_SUFFIX="${TINFO_NAME}${DFT_ARG_SUFFIX}"
19094                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
19095                 TINFO_LIB_SUFFIX="${TINFO_NAME}${LIB_SUFFIX}"
19096         fi
19097
19098         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19099         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
19100         if test "$DFT_LWR_MODEL" = "libtool"; then
19101                 TEST_ARGS="${TEST_DEPS}"
19102                 TEST_ARG2="${TEST_DEP2}"
19103                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19104                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
19105                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
19106         else
19107                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
19108                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
19109                 TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19110                 TINFO_ARGS="-L${LIB_DIR} $TEST_ARGS"
19111                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
19112         fi
19113 else
19114         # the next lines are needed for linking libtic over libncurses
19115         TINFO_NAME=${LIB_NAME}
19116         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
19117         TINFO_ARG_SUFFIX=${LIB_NAME}${DFT_ARG_SUFFIX}
19118         if test "$with_tic_depends" = yes ; then
19119                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19120         else
19121                 TICS_LIST="$SHLIB_LIST"
19122         fi
19123
19124         TINFO_ARGS="-L${LIB_DIR} -l${LIB_NAME}${DFT_ARG_SUFFIX}"
19125 fi
19126
19127 if test "$DFT_LWR_MODEL" = shared ; then
19128         case $cf_cv_system_name in #(vi
19129         cygwin*)
19130                 # "lib" files have ".dll.a" suffix, "cyg" files have ".dll"
19131                 TINFO_SUFFIX=.dll
19132                 ;;
19133         esac
19134 fi
19135
19136 if test "$with_dlsym" = yes ; then
19137
19138 # remove dl library from $TICS_LIST
19139 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
19140
19141 fi
19142
19143 if test "$DFT_LWR_MODEL" = "libtool"; then
19144     OBJEXT=lo
19145 fi
19146
19147 # needed for Ada95
19148 TINFO_ARGS2=`echo "$TINFO_ARGS" | sed -e 's,-L\.\./,-L../../,'`
19149
19150 case $DFT_LWR_MODEL in
19151 normal|debug|profile)
19152
19153 if test "$GCC" = yes ; then
19154         case $cf_cv_system_name in #(
19155         OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)     #( vi
19156                 LDFLAGS_STATIC=
19157                 LDFLAGS_SHARED=
19158                 ;;
19159     *)  #( normally, except when broken
19160         LDFLAGS_STATIC=-static
19161         LDFLAGS_SHARED=-dynamic
19162         ;;
19163     esac
19164 else
19165         case $cf_cv_system_name in #(
19166         aix[4-7]*)      #( from ld manpage
19167                 LDFLAGS_STATIC=-bstatic
19168                 LDFLAGS_SHARED=-bdynamic
19169                 ;;
19170         hpux*)          #( from ld manpage for hpux10.20, hpux11.11
19171                 # We could also use just "archive" and "shared".
19172                 LDFLAGS_STATIC=-Wl,-a,archive_shared
19173                 LDFLAGS_SHARED=-Wl,-a,shared_archive
19174                 ;;
19175         irix*)          #( from ld manpage IRIX64
19176                 LDFLAGS_STATIC=-Bstatic
19177                 LDFLAGS_SHARED=-Bdynamic
19178                 ;;
19179         osf[45]*)       #( from ld manpage osf4.0d, osf5.1
19180                 # alternative "-oldstyle_liblookup" (not in cc manpage)
19181                 LDFLAGS_STATIC=-noso
19182                 LDFLAGS_SHARED=-so_archive
19183                 ;;
19184         solaris2*)
19185                 LDFLAGS_STATIC=-Bstatic
19186                 LDFLAGS_SHARED=-Bdynamic
19187                 ;;
19188         esac
19189 fi
19190
19191 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
19192 then
19193         echo "$as_me:19193: checking if linker supports switching between static/dynamic" >&5
19194 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
19195
19196         rm -f libconftest.a
19197         cat >conftest.$ac_ext <<EOF
19198 #line 19198 "configure"
19199 #include <stdio.h>
19200 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
19201 EOF
19202         if { (eval echo "$as_me:19202: \"$ac_compile\"") >&5
19203   (eval $ac_compile) 2>&5
19204   ac_status=$?
19205   echo "$as_me:19205: \$? = $ac_status" >&5
19206   (exit $ac_status); } ; then
19207                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
19208                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
19209         fi
19210         rm -f conftest.*
19211
19212         cf_save_LIBS="$LIBS"
19213
19214         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
19215         cat >conftest.$ac_ext <<_ACEOF
19216 #line 19216 "configure"
19217 #include "confdefs.h"
19218
19219 #line 19219 "configure"
19220 #include <stdio.h>
19221 int cf_ldflags_static(FILE *fp);
19222
19223 int
19224 main ()
19225 {
19226
19227         return cf_ldflags_static(stdin);
19228
19229   ;
19230   return 0;
19231 }
19232 _ACEOF
19233 rm -f conftest.$ac_objext conftest$ac_exeext
19234 if { (eval echo "$as_me:19234: \"$ac_link\"") >&5
19235   (eval $ac_link) 2>&5
19236   ac_status=$?
19237   echo "$as_me:19237: \$? = $ac_status" >&5
19238   (exit $ac_status); } &&
19239          { ac_try='test -s conftest$ac_exeext'
19240   { (eval echo "$as_me:19240: \"$ac_try\"") >&5
19241   (eval $ac_try) 2>&5
19242   ac_status=$?
19243   echo "$as_me:19243: \$? = $ac_status" >&5
19244   (exit $ac_status); }; }; then
19245   cf_ldflags_static=yes
19246 else
19247   echo "$as_me: failed program was:" >&5
19248 cat conftest.$ac_ext >&5
19249 cf_ldflags_static=no
19250 fi
19251 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19252
19253         rm -f libconftest.*
19254         LIBS="$cf_save_LIBS"
19255
19256         echo "$as_me:19256: result: $cf_ldflags_static" >&5
19257 echo "${ECHO_T}$cf_ldflags_static" >&6
19258
19259         if test $cf_ldflags_static != yes
19260         then
19261                 LDFLAGS_STATIC=
19262                 LDFLAGS_SHARED=
19263         fi
19264 else
19265         LDFLAGS_STATIC=
19266         LDFLAGS_SHARED=
19267 fi
19268
19269         ;;
19270 esac
19271
19272 echo "$as_me:19272: checking where we will install curses.h" >&5
19273 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
19274 test "$with_overwrite" = no && \
19275 test "x$includedir" = 'x${prefix}/include' && \
19276         includedir='${prefix}/include/ncurses'${LIB_SUFFIX}
19277 echo "$as_me:19277: result: $includedir" >&5
19278 echo "${ECHO_T}$includedir" >&6
19279
19280 ### Resolve a conflict between normal and wide-curses by forcing applications
19281 ### that will need libutf8 to add it to their configure script.
19282 if test "$with_overwrite" != no ; then
19283 if test "$NCURSES_LIBUTF8" = 1 ; then
19284         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
19285         { echo "$as_me:19285: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
19286 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
19287 fi
19288 fi
19289 WITH_OVERWRITE=$with_overwrite
19290
19291 # used to separate tack out of the tree
19292 NCURSES_TREE=
19293
19294 ### predefined stuff for the test programs
19295 cat >>confdefs.h <<\EOF
19296 #define HAVE_SLK_COLOR 1
19297 EOF
19298
19299 ### Construct the list of subdirectories for which we'll customize makefiles
19300 ### with the appropriate compile-rules.
19301
19302 echo "$as_me:19302: checking for src modules" >&5
19303 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
19304
19305 # dependencies and linker-arguments for test-programs
19306 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
19307 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
19308 if test "$DFT_LWR_MODEL" = "libtool"; then
19309         TEST_ARGS="${TEST_DEPS}"
19310         TEST_ARG2="${TEST_DEP2}"
19311 else
19312         TEST_ARGS="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARGS"
19313         TEST_ARG2="-l${LIB_NAME}${DFT_ARG_SUFFIX} $TEST_ARG2"
19314 fi
19315
19316 cf_cv_src_modules=
19317 for cf_dir in $modules_to_build
19318 do
19319         if test -f $srcdir/$cf_dir/modules; then
19320
19321                 # We may/may not have tack in the distribution, though the
19322                 # makefile is.
19323                 if test $cf_dir = tack ; then
19324                         if test ! -f $srcdir/${cf_dir}/${cf_dir}.h; then
19325                                 continue
19326                         fi
19327                 fi
19328
19329                 if test -z "$cf_cv_src_modules"; then
19330                         cf_cv_src_modules=$cf_dir
19331                 else
19332                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
19333                 fi
19334
19335                 # Make the ncurses_cfg.h file record the library interface files as
19336                 # well.  These are header files that are the same name as their
19337                 # directory.  Ncurses is the only library that does not follow
19338                 # that pattern.
19339                 if test $cf_dir = tack ; then
19340                         continue
19341                 elif test -f $srcdir/${cf_dir}/${cf_dir}.h; then
19342
19343 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
19344
19345                         cat >>confdefs.h <<EOF
19346 #define HAVE_${cf_have_include}_H 1
19347 EOF
19348
19349                         cat >>confdefs.h <<EOF
19350 #define HAVE_LIB${cf_have_include} 1
19351 EOF
19352
19353                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEPS"
19354                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${cf_dir}${DFT_DEP_SUFFIX} $TEST_DEP2"
19355                         if test "$DFT_LWR_MODEL" = "libtool"; then
19356                                 TEST_ARGS="${TEST_DEPS}"
19357                                 TEST_ARG2="${TEST_DEP2}"
19358                         else
19359                                 TEST_ARGS="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARGS"
19360                                 TEST_ARG2="-l${cf_dir}${DFT_ARG_SUFFIX} $TEST_ARG2"
19361                         fi
19362                 fi
19363         fi
19364 done
19365 echo "$as_me:19365: result: $cf_cv_src_modules" >&5
19366 echo "${ECHO_T}$cf_cv_src_modules" >&6
19367
19368 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
19369 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
19370
19371 SRC_SUBDIRS=
19372 if test "x$cf_with_manpages" != xno ; then
19373         SRC_SUBDIRS="$SRC_SUBDIRS man"
19374 fi
19375 SRC_SUBDIRS="$SRC_SUBDIRS include"
19376 for cf_dir in $cf_cv_src_modules
19377 do
19378         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
19379 done
19380 if test "x$cf_with_tests" != "xno" ; then
19381         SRC_SUBDIRS="$SRC_SUBDIRS test"
19382 fi
19383 test -z "$MAKE_TERMINFO" && SRC_SUBDIRS="$SRC_SUBDIRS misc"
19384 test "$cf_with_cxx_binding" != no && SRC_SUBDIRS="$SRC_SUBDIRS c++"
19385
19386 ADA_SUBDIRS=
19387 if test "$cf_cv_prog_gnat_correct" = yes && test -f $srcdir/Ada95/Makefile.in; then
19388         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
19389         ADA_SUBDIRS="gen src"
19390         if test "x$cf_with_tests" != "xno" ; then
19391                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
19392         fi
19393 fi
19394
19395 SUB_MAKEFILES=
19396 for cf_dir in $SRC_SUBDIRS
19397 do
19398         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
19399 done
19400
19401 if test -n "$ADA_SUBDIRS"; then
19402         for cf_dir in $ADA_SUBDIRS
19403         do
19404                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
19405         done
19406
19407 fi
19408
19409 if test "$cf_with_ada" != "no" && test "$cf_cv_prog_gnat_correct" != "no"; then
19410    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${DFT_ARG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
19411    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${DFT_ARG_SUFFIX}-config.1:man/MKada_config.in"
19412 fi
19413
19414 DIRS_TO_MAKE="lib"
19415 for cf_item in $cf_list_models
19416 do
19417
19418         case $cf_item in
19419         libtool) cf_subdir='obj_lo'  ;;
19420         normal)  cf_subdir='objects' ;;
19421         debug)   cf_subdir='obj_g' ;;
19422         profile) cf_subdir='obj_p' ;;
19423         shared)
19424                 case $cf_cv_system_name in #(vi
19425                 cygwin) #(vi
19426                         cf_subdir='objects' ;;
19427                 *)
19428                         cf_subdir='obj_s' ;;
19429                 esac
19430         esac
19431
19432         for cf_item2 in $DIRS_TO_MAKE
19433         do
19434                 test $cf_item2 = $cf_subdir && break
19435         done
19436         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
19437 done
19438 for cf_dir in $DIRS_TO_MAKE
19439 do
19440         test ! -d $cf_dir && mkdir $cf_dir
19441 done
19442
19443 # symbols that differ when compiling Ada95 by itself.
19444 NCURSES_SHLIB2='sh $(top_srcdir)/misc/shlib'
19445
19446 # values to use as strings
19447 cat >>confdefs.h <<EOF
19448 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
19449 EOF
19450
19451 cat >>confdefs.h <<EOF
19452 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
19453 EOF
19454
19455 ### Now that we're done running tests, add the compiler-warnings, if any
19456
19457 cf_fix_cppflags=no
19458 cf_new_cflags=
19459 cf_new_cppflags=
19460 cf_new_extra_cppflags=
19461
19462 for cf_add_cflags in $EXTRA_CFLAGS
19463 do
19464 case $cf_fix_cppflags in
19465 no)
19466         case $cf_add_cflags in #(vi
19467         -undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C) #(vi
19468                 case $cf_add_cflags in
19469                 -D*)
19470                         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19471
19472                         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19473                                 && test -z "${cf_tst_cflags}" \
19474                                 && cf_fix_cppflags=yes
19475
19476                         if test $cf_fix_cppflags = yes ; then
19477                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19478                                 continue
19479                         elif test "${cf_tst_cflags}" = "\"'" ; then
19480                                 cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19481                                 continue
19482                         fi
19483                         ;;
19484                 esac
19485                 case "$CPPFLAGS" in
19486                 *$cf_add_cflags) #(vi
19487                         ;;
19488                 *) #(vi
19489                         case $cf_add_cflags in #(vi
19490                         -D*)
19491                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19492
19493 CPPFLAGS=`echo "$CPPFLAGS" | \
19494         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19495                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19496
19497                                 ;;
19498                         esac
19499                         cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19500                         ;;
19501                 esac
19502                 ;;
19503         *)
19504                 cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19505                 ;;
19506         esac
19507         ;;
19508 yes)
19509         cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19510
19511         cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19512
19513         test "${cf_add_cflags}" != "${cf_tst_cflags}" \
19514                 && test -z "${cf_tst_cflags}" \
19515                 && cf_fix_cppflags=no
19516         ;;
19517 esac
19518 done
19519
19520 if test -n "$cf_new_cflags" ; then
19521
19522         CFLAGS="$CFLAGS $cf_new_cflags"
19523 fi
19524
19525 if test -n "$cf_new_cppflags" ; then
19526
19527         CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19528 fi
19529
19530 if test -n "$cf_new_extra_cppflags" ; then
19531
19532         EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19533 fi
19534
19535 ### Define substitutions for header files to avoid name-pollution
19536
19537 if test "$cf_cv_have_tcgetattr" = yes ; then
19538         HAVE_TCGETATTR=1
19539 else
19540         HAVE_TCGETATTR=0
19541 fi
19542
19543 if test "$ac_cv_header_termio_h" = yes ; then
19544         HAVE_TERMIO_H=1
19545 else
19546         HAVE_TERMIO_H=0
19547 fi
19548
19549 if test "$ac_cv_header_termios_h" = yes ; then
19550         HAVE_TERMIOS_H=1
19551 else
19552         HAVE_TERMIOS_H=0
19553 fi
19554
19555 ################################################################################
19556 test "$use_database" = yes && \
19557 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
19558
19559 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
19560 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${DFT_ARG_SUFFIX}${cf_cv_abi_version}-config.1:man/MKncu_config.in"
19561
19562 if test x"$enable_pc_files" = xyes ; then \
19563 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
19564 MAKE_PC_FILES=
19565 else
19566 MAKE_PC_FILES="#"
19567 fi
19568
19569 # Extract the first word of "tic", so it can be a program name with args.
19570 set dummy tic; ac_word=$2
19571 echo "$as_me:19571: checking for $ac_word" >&5
19572 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19573 if test "${ac_cv_path_TIC_PATH+set}" = set; then
19574   echo $ECHO_N "(cached) $ECHO_C" >&6
19575 else
19576   case $TIC_PATH in
19577   [\\/]* | ?:[\\/]*)
19578   ac_cv_path_TIC_PATH="$TIC_PATH" # Let the user override the test with a path.
19579   ;;
19580   *)
19581   ac_save_IFS=$IFS; IFS=$ac_path_separator
19582 ac_dummy="$PATH:/usr/local/ncurses/bin"
19583 for ac_dir in $ac_dummy; do
19584   IFS=$ac_save_IFS
19585   test -z "$ac_dir" && ac_dir=.
19586   if $as_executable_p "$ac_dir/$ac_word"; then
19587    ac_cv_path_TIC_PATH="$ac_dir/$ac_word"
19588    echo "$as_me:19588: found $ac_dir/$ac_word" >&5
19589    break
19590 fi
19591 done
19592
19593   test -z "$ac_cv_path_TIC_PATH" && ac_cv_path_TIC_PATH="unknown"
19594   ;;
19595 esac
19596 fi
19597 TIC_PATH=$ac_cv_path_TIC_PATH
19598
19599 if test -n "$TIC_PATH"; then
19600   echo "$as_me:19600: result: $TIC_PATH" >&5
19601 echo "${ECHO_T}$TIC_PATH" >&6
19602 else
19603   echo "$as_me:19603: result: no" >&5
19604 echo "${ECHO_T}no" >&6
19605 fi
19606
19607 if test -n "$FALLBACK_LIST"
19608 then
19609         if test "$TIC_PATH" = unknown
19610         then
19611                 { echo "$as_me:19611: WARNING: no tic program found for fallbacks" >&5
19612 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
19613         fi
19614 fi
19615
19616 if test "x$cf_with_tests" != xno ; then
19617         MAKE_TESTS=
19618 else
19619         MAKE_TESTS="#"
19620 fi
19621
19622 ADAHTML_DIR=../../doc/html/ada
19623
19624 SUB_SCRIPTS=
19625 case $cf_cv_system_name in #(vi
19626 *mingw32*) #(vi
19627         SUB_SCRIPTS="mk-dlls.sh"
19628         ;;
19629 esac
19630
19631 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_SCRIPTS $SUB_MAKEFILES Makefile"
19632 ac_config_commands="$ac_config_commands default"
19633 cat >confcache <<\_ACEOF
19634 # This file is a shell script that caches the results of configure
19635 # tests run on this system so they can be shared between configure
19636 # scripts and configure runs, see configure's option --config-cache.
19637 # It is not useful on other systems.  If it contains results you don't
19638 # want to keep, you may remove or edit it.
19639 #
19640 # config.status only pays attention to the cache file if you give it
19641 # the --recheck option to rerun configure.
19642 #
19643 # `ac_cv_env_foo' variables (set or unset) will be overriden when
19644 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19645 # following values.
19646
19647 _ACEOF
19648
19649 # The following way of writing the cache mishandles newlines in values,
19650 # but we know of no workaround that is simple, portable, and efficient.
19651 # So, don't put newlines in cache variables' values.
19652 # Ultrix sh set writes to stderr and can't be redirected directly,
19653 # and sets the high bit in the cache file unless we assign to the vars.
19654 {
19655   (set) 2>&1 |
19656     case `(ac_space=' '; set | grep ac_space) 2>&1` in
19657     *ac_space=\ *)
19658       # `set' does not quote correctly, so add quotes (double-quote
19659       # substitution turns \\\\ into \\, and sed turns \\ into \).
19660       sed -n \
19661         "s/'/'\\\\''/g;
19662           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19663       ;;
19664     *)
19665       # `set' quotes correctly as required by POSIX, so do not add quotes.
19666       sed -n \
19667         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
19668       ;;
19669     esac;
19670 } |
19671   sed '
19672      t clear
19673      : clear
19674      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19675      t end
19676      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19677      : end' >>confcache
19678 if cmp -s $cache_file confcache; then :; else
19679   if test -w $cache_file; then
19680     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
19681     cat confcache >$cache_file
19682   else
19683     echo "not updating unwritable cache $cache_file"
19684   fi
19685 fi
19686 rm -f confcache
19687
19688 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19689 # Let make expand exec_prefix.
19690 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19691
19692 # VPATH may cause trouble with some makes, so we remove $(srcdir),
19693 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
19694 # trailing colons and then remove the whole line if VPATH becomes empty
19695 # (actually we leave an empty line to preserve line numbers).
19696 if test "x$srcdir" = x.; then
19697   ac_vpsub='/^[         ]*VPATH[        ]*=/{
19698 s/:*\$(srcdir):*/:/;
19699 s/:*\${srcdir}:*/:/;
19700 s/:*@srcdir@:*/:/;
19701 s/^\([^=]*=[    ]*\):*/\1/;
19702 s/:*$//;
19703 s/^[^=]*=[      ]*$//;
19704 }'
19705 fi
19706
19707 DEFS=-DHAVE_CONFIG_H
19708
19709 : ${CONFIG_STATUS=./config.status}
19710 ac_clean_files_save=$ac_clean_files
19711 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19712 { echo "$as_me:19712: creating $CONFIG_STATUS" >&5
19713 echo "$as_me: creating $CONFIG_STATUS" >&6;}
19714 cat >$CONFIG_STATUS <<_ACEOF
19715 #! $SHELL
19716 # Generated automatically by configure.
19717 # Run this file to recreate the current configuration.
19718 # Compiler output produced by configure, useful for debugging
19719 # configure, is in config.log if it exists.
19720
19721 debug=false
19722 SHELL=\${CONFIG_SHELL-$SHELL}
19723 ac_cs_invocation="\$0 \$@"
19724
19725 _ACEOF
19726
19727 cat >>$CONFIG_STATUS <<\_ACEOF
19728 # Be Bourne compatible
19729 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19730   emulate sh
19731   NULLCMD=:
19732 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
19733   set -o posix
19734 fi
19735
19736 # Name of the executable.
19737 as_me=`echo "$0" |sed 's,.*[\\/],,'`
19738
19739 if expr a : '\(a\)' >/dev/null 2>&1; then
19740   as_expr=expr
19741 else
19742   as_expr=false
19743 fi
19744
19745 rm -f conf$$ conf$$.exe conf$$.file
19746 echo >conf$$.file
19747 if ln -s conf$$.file conf$$ 2>/dev/null; then
19748   # We could just check for DJGPP; but this test a) works b) is more generic
19749   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
19750   if test -f conf$$.exe; then
19751     # Don't use ln at all; we don't have any links
19752     as_ln_s='cp -p'
19753   else
19754     as_ln_s='ln -s'
19755   fi
19756 elif ln conf$$.file conf$$ 2>/dev/null; then
19757   as_ln_s=ln
19758 else
19759   as_ln_s='cp -p'
19760 fi
19761 rm -f conf$$ conf$$.exe conf$$.file
19762
19763 as_executable_p="test -f"
19764
19765 # Support unset when possible.
19766 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
19767   as_unset=unset
19768 else
19769   as_unset=false
19770 fi
19771
19772 # NLS nuisances.
19773 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
19774 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
19775 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
19776 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
19777 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
19778 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
19779 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
19780 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
19781
19782 # IFS
19783 # We need space, tab and new line, in precisely that order.
19784 as_nl='
19785 '
19786 IFS="   $as_nl"
19787
19788 # CDPATH.
19789 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
19790
19791 exec 6>&1
19792
19793 _ACEOF
19794
19795 # Files that config.status was made for.
19796 if test -n "$ac_config_files"; then
19797   echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
19798 fi
19799
19800 if test -n "$ac_config_headers"; then
19801   echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
19802 fi
19803
19804 if test -n "$ac_config_links"; then
19805   echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
19806 fi
19807
19808 if test -n "$ac_config_commands"; then
19809   echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
19810 fi
19811
19812 cat >>$CONFIG_STATUS <<\EOF
19813
19814 ac_cs_usage="\
19815 \`$as_me' instantiates files from templates according to the
19816 current configuration.
19817
19818 Usage: $0 [OPTIONS] [FILE]...
19819
19820   -h, --help       print this help, then exit
19821   -V, --version    print version number, then exit
19822   -d, --debug      don't remove temporary files
19823       --recheck    update $as_me by reconfiguring in the same conditions
19824   --file=FILE[:TEMPLATE]
19825                    instantiate the configuration file FILE
19826   --header=FILE[:TEMPLATE]
19827                    instantiate the configuration header FILE
19828
19829 Configuration files:
19830 $config_files
19831
19832 Configuration headers:
19833 $config_headers
19834
19835 Configuration commands:
19836 $config_commands
19837
19838 Report bugs to <dickey@invisible-island.net>."
19839 EOF
19840
19841 cat >>$CONFIG_STATUS <<EOF
19842 ac_cs_version="\\
19843 config.status
19844 configured by $0, generated by GNU Autoconf 2.52.20101002,
19845   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
19846
19847 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
19848 Free Software Foundation, Inc.
19849 This config.status script is free software; the Free Software Foundation
19850 gives unlimited permission to copy, distribute and modify it."
19851 srcdir=$srcdir
19852 INSTALL="$INSTALL"
19853 EOF
19854
19855 cat >>$CONFIG_STATUS <<\EOF
19856 # If no file are specified by the user, then we need to provide default
19857 # value.  By we need to know if files were specified by the user.
19858 ac_need_defaults=:
19859 while test $# != 0
19860 do
19861   case $1 in
19862   --*=*)
19863     ac_option=`expr "x$1" : 'x\([^=]*\)='`
19864     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
19865     shift
19866     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
19867     shift
19868     ;;
19869   -*);;
19870   *) # This is not an option, so the user has probably given explicit
19871      # arguments.
19872      ac_need_defaults=false;;
19873   esac
19874
19875   case $1 in
19876   # Handling of the options.
19877 EOF
19878 cat >>$CONFIG_STATUS <<EOF
19879   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19880     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
19881     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
19882 EOF
19883 cat >>$CONFIG_STATUS <<\EOF
19884   --version | --vers* | -V )
19885     echo "$ac_cs_version"; exit 0 ;;
19886   --he | --h)
19887     # Conflict between --help and --header
19888     { { echo "$as_me:19888: error: ambiguous option: $1
19889 Try \`$0 --help' for more information." >&5
19890 echo "$as_me: error: ambiguous option: $1
19891 Try \`$0 --help' for more information." >&2;}
19892    { (exit 1); exit 1; }; };;
19893   --help | --hel | -h )
19894     echo "$ac_cs_usage"; exit 0 ;;
19895   --debug | --d* | -d )
19896     debug=: ;;
19897   --file | --fil | --fi | --f )
19898     shift
19899     CONFIG_FILES="$CONFIG_FILES $1"
19900     ac_need_defaults=false;;
19901   --header | --heade | --head | --hea )
19902     shift
19903     CONFIG_HEADERS="$CONFIG_HEADERS $1"
19904     ac_need_defaults=false;;
19905
19906   # This is an error.
19907   -*) { { echo "$as_me:19907: error: unrecognized option: $1
19908 Try \`$0 --help' for more information." >&5
19909 echo "$as_me: error: unrecognized option: $1
19910 Try \`$0 --help' for more information." >&2;}
19911    { (exit 1); exit 1; }; } ;;
19912
19913   *) ac_config_targets="$ac_config_targets $1" ;;
19914
19915   esac
19916   shift
19917 done
19918
19919 exec 5>>config.log
19920 cat >&5 << _ACEOF
19921
19922 ## ----------------------- ##
19923 ## Running config.status.  ##
19924 ## ----------------------- ##
19925
19926 This file was extended by $as_me 2.52.20101002, executed with
19927   CONFIG_FILES    = $CONFIG_FILES
19928   CONFIG_HEADERS  = $CONFIG_HEADERS
19929   CONFIG_LINKS    = $CONFIG_LINKS
19930   CONFIG_COMMANDS = $CONFIG_COMMANDS
19931   > $ac_cs_invocation
19932 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19933
19934 _ACEOF
19935 EOF
19936
19937 cat >>$CONFIG_STATUS <<EOF
19938 #
19939 # INIT-COMMANDS section.
19940 #
19941
19942 ### Special initialization commands, used to pass information from the
19943 ### configuration-run into config.status
19944
19945 AWK="$AWK"
19946 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
19947 DFT_LWR_MODEL="$DFT_LWR_MODEL"
19948 ECHO_LINK="$ECHO_LINK"
19949 LDCONFIG="$LDCONFIG"
19950 LIBTOOL_VERSION="$LIBTOOL_VERSION"
19951 LIB_NAME="$LIB_NAME"
19952 LIB_SUBSETS="$LIB_SUBSETS"
19953 LIB_SUFFIX="$LIB_SUFFIX"
19954 LIB_TRACING="$LIB_TRACING"
19955 LN_S="$LN_S"
19956 MAKE_TERMINFO="$MAKE_TERMINFO"
19957 NCURSES_MAJOR="$NCURSES_MAJOR"
19958 NCURSES_MINOR="$NCURSES_MINOR"
19959 NCURSES_OSPEED="$NCURSES_OSPEED"
19960 NCURSES_PATCH="$NCURSES_PATCH"
19961 SRC_SUBDIRS="$SRC_SUBDIRS"
19962 TERMINFO="$TERMINFO"
19963 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
19964 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
19965 TICS_NAME="$TICS_NAME"
19966 TIC_PATH="$TIC_PATH"
19967 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
19968 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
19969 TINFO_NAME="$TINFO_NAME"
19970 TINFO_SUFFIX="$TINFO_SUFFIX"
19971 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
19972 WITH_CURSES_H="$with_curses_h"
19973 WITH_ECHO="$with_echo"
19974 WITH_OVERWRITE="$with_overwrite"
19975 cf_LIST_MODELS="$cf_list_models"
19976 cf_cv_abi_version="$cf_cv_abi_version"
19977 cf_cv_do_relink="$cf_cv_do_relink"
19978 cf_cv_do_symlinks="$cf_cv_do_symlinks"
19979 cf_cv_enable_lp64="$cf_cv_enable_lp64"
19980 cf_cv_enable_opaque="$cf_cv_enable_opaque"
19981 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
19982 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
19983 cf_cv_rel_version="$cf_cv_rel_version"
19984 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
19985 cf_cv_shared_soname='$cf_cv_shared_soname'
19986 cf_cv_shlib_version="$cf_cv_shlib_version"
19987 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
19988 cf_cv_system_name="$cf_cv_system_name"
19989 cf_with_ada="$cf_with_ada"
19990 cf_with_cxx_binding="$cf_with_cxx_binding"
19991 cf_with_manpages="$cf_with_manpages"
19992 cf_with_tests="$cf_with_tests"
19993 host="$host"
19994 target="$target"
19995
19996 EOF
19997
19998 cat >>$CONFIG_STATUS <<\EOF
19999 for ac_config_target in $ac_config_targets
20000 do
20001   case "$ac_config_target" in
20002   # Handling of arguments.
20003   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
20004   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
20005   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
20006   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
20007   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
20008   "$SUB_SCRIPTS" ) CONFIG_FILES="$CONFIG_FILES $SUB_SCRIPTS" ;;
20009   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
20010   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20011   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
20012   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
20013   *) { { echo "$as_me:20013: error: invalid argument: $ac_config_target" >&5
20014 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
20015    { (exit 1); exit 1; }; };;
20016   esac
20017 done
20018
20019 # If the user did not use the arguments to specify the items to instantiate,
20020 # then the envvar interface is used.  Set only those that are not.
20021 # We use the long form for the default assignment because of an extremely
20022 # bizarre bug on SunOS 4.1.3.
20023 if $ac_need_defaults; then
20024   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20025   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20026   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
20027 fi
20028
20029 # Create a temporary directory, and hook for its removal unless debugging.
20030 $debug ||
20031 {
20032   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
20033   trap '{ (exit 1); exit 1; }' 1 2 13 15
20034 }
20035
20036 # Create a (secure) tmp directory for tmp files.
20037 : ${TMPDIR=/tmp}
20038 {
20039   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
20040   test -n "$tmp" && test -d "$tmp"
20041 }  ||
20042 {
20043   tmp=$TMPDIR/cs$$-$RANDOM
20044   (umask 077 && mkdir $tmp)
20045 } ||
20046 {
20047    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
20048    { (exit 1); exit 1; }
20049 }
20050
20051 EOF
20052
20053 cat >>$CONFIG_STATUS <<EOF
20054
20055 #
20056 # CONFIG_FILES section.
20057 #
20058
20059 # No need to generate the scripts if there are no CONFIG_FILES.
20060 # This happens for instance when ./config.status config.h
20061 if test -n "\$CONFIG_FILES"; then
20062   # Protect against being on the right side of a sed subst in config.status.
20063   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
20064    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
20065 s,@SHELL@,$SHELL,;t t
20066 s,@exec_prefix@,$exec_prefix,;t t
20067 s,@prefix@,$prefix,;t t
20068 s,@program_transform_name@,$program_transform_name,;t t
20069 s,@bindir@,$bindir,;t t
20070 s,@sbindir@,$sbindir,;t t
20071 s,@libexecdir@,$libexecdir,;t t
20072 s,@datadir@,$datadir,;t t
20073 s,@sysconfdir@,$sysconfdir,;t t
20074 s,@sharedstatedir@,$sharedstatedir,;t t
20075 s,@localstatedir@,$localstatedir,;t t
20076 s,@libdir@,$libdir,;t t
20077 s,@includedir@,$includedir,;t t
20078 s,@oldincludedir@,$oldincludedir,;t t
20079 s,@infodir@,$infodir,;t t
20080 s,@mandir@,$mandir,;t t
20081 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
20082 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
20083 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
20084 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
20085 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
20086 s,@build_alias@,$build_alias,;t t
20087 s,@host_alias@,$host_alias,;t t
20088 s,@target_alias@,$target_alias,;t t
20089 s,@ECHO_C@,$ECHO_C,;t t
20090 s,@ECHO_N@,$ECHO_N,;t t
20091 s,@ECHO_T@,$ECHO_T,;t t
20092 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
20093 s,@DEFS@,$DEFS,;t t
20094 s,@LIBS@,$LIBS,;t t
20095 s,@top_builddir@,$top_builddir,;t t
20096 s,@EGREP@,$EGREP,;t t
20097 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
20098 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
20099 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
20100 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
20101 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
20102 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
20103 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
20104 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
20105 s,@build@,$build,;t t
20106 s,@build_cpu@,$build_cpu,;t t
20107 s,@build_vendor@,$build_vendor,;t t
20108 s,@build_os@,$build_os,;t t
20109 s,@host@,$host,;t t
20110 s,@host_cpu@,$host_cpu,;t t
20111 s,@host_vendor@,$host_vendor,;t t
20112 s,@host_os@,$host_os,;t t
20113 s,@target@,$target,;t t
20114 s,@target_cpu@,$target_cpu,;t t
20115 s,@target_vendor@,$target_vendor,;t t
20116 s,@target_os@,$target_os,;t t
20117 s,@CC@,$CC,;t t
20118 s,@CFLAGS@,$CFLAGS,;t t
20119 s,@LDFLAGS@,$LDFLAGS,;t t
20120 s,@CPPFLAGS@,$CPPFLAGS,;t t
20121 s,@ac_ct_CC@,$ac_ct_CC,;t t
20122 s,@EXEEXT@,$EXEEXT,;t t
20123 s,@OBJEXT@,$OBJEXT,;t t
20124 s,@CPP@,$CPP,;t t
20125 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
20126 s,@PROG_EXT@,$PROG_EXT,;t t
20127 s,@LDCONFIG@,$LDCONFIG,;t t
20128 s,@CXX@,$CXX,;t t
20129 s,@CXXFLAGS@,$CXXFLAGS,;t t
20130 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
20131 s,@AWK@,$AWK,;t t
20132 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
20133 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
20134 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
20135 s,@LINT@,$LINT,;t t
20136 s,@LINT_OPTS@,$LINT_OPTS,;t t
20137 s,@LN_S@,$LN_S,;t t
20138 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
20139 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
20140 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
20141 s,@SET_MAKE@,$SET_MAKE,;t t
20142 s,@CTAGS@,$CTAGS,;t t
20143 s,@ETAGS@,$ETAGS,;t t
20144 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
20145 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
20146 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
20147 s,@RANLIB@,$RANLIB,;t t
20148 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
20149 s,@LD@,$LD,;t t
20150 s,@ac_ct_LD@,$ac_ct_LD,;t t
20151 s,@AR@,$AR,;t t
20152 s,@ac_ct_AR@,$ac_ct_AR,;t t
20153 s,@ARFLAGS@,$ARFLAGS,;t t
20154 s,@DESTDIR@,$DESTDIR,;t t
20155 s,@BUILD_CC@,$BUILD_CC,;t t
20156 s,@BUILD_CPP@,$BUILD_CPP,;t t
20157 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
20158 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
20159 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
20160 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
20161 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
20162 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
20163 s,@cf_list_models@,$cf_list_models,;t t
20164 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
20165 s,@LIBTOOL@,$LIBTOOL,;t t
20166 s,@LT_UNDEF@,$LT_UNDEF,;t t
20167 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
20168 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
20169 s,@LIB_CREATE@,$LIB_CREATE,;t t
20170 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
20171 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
20172 s,@LIB_PREP@,$LIB_PREP,;t t
20173 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
20174 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
20175 s,@LIB_LINK@,$LIB_LINK,;t t
20176 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
20177 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
20178 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
20179 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
20180 s,@TICS_NAME@,$TICS_NAME,;t t
20181 s,@TINFO_NAME@,$TINFO_NAME,;t t
20182 s,@LIB_NAME@,$LIB_NAME,;t t
20183 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
20184 s,@CC_G_OPT@,$CC_G_OPT,;t t
20185 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
20186 s,@LD_MODEL@,$LD_MODEL,;t t
20187 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
20188 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
20189 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
20190 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
20191 s,@LINK_PROGS@,$LINK_PROGS,;t t
20192 s,@LINK_TESTS@,$LINK_TESTS,;t t
20193 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
20194 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
20195 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
20196 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
20197 s,@RPATH_LIST@,$RPATH_LIST,;t t
20198 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
20199 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
20200 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
20201 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
20202 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
20203 s,@TERMINFO@,$TERMINFO,;t t
20204 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
20205 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
20206 s,@TERMPATH@,$TERMPATH,;t t
20207 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
20208 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
20209 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
20210 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
20211 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
20212 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
20213 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
20214 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
20215 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
20216 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
20217 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
20218 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
20219 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
20220 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
20221 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
20222 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
20223 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
20224 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
20225 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
20226 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
20227 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
20228 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
20229 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
20230 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
20231 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
20232 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
20233 s,@PTHREAD@,$PTHREAD,;t t
20234 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
20235 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
20236 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
20237 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
20238 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
20239 s,@ECHO_LINK@,$ECHO_LINK,;t t
20240 s,@ADAFLAGS@,$ADAFLAGS,;t t
20241 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
20242 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
20243 s,@ADA_TRACE@,$ADA_TRACE,;t t
20244 s,@MATH_LIB@,$MATH_LIB,;t t
20245 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
20246 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
20247 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
20248 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
20249 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
20250 s,@TEST_LIBS@,$TEST_LIBS,;t t
20251 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
20252 s,@CXXCPP@,$CXXCPP,;t t
20253 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
20254 s,@CXX_AR@,$CXX_AR,;t t
20255 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
20256 s,@CXXLIBS@,$CXXLIBS,;t t
20257 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
20258 s,@gnat_exists@,$gnat_exists,;t t
20259 s,@M4_exists@,$M4_exists,;t t
20260 s,@cf_ada_make@,$cf_ada_make,;t t
20261 s,@cf_compile_generics@,$cf_compile_generics,;t t
20262 s,@cf_generic_objects@,$cf_generic_objects,;t t
20263 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
20264 s,@PRAGMA_UNREF@,$PRAGMA_UNREF,;t t
20265 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
20266 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
20267 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
20268 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
20269 s,@cf_ada_package@,$cf_ada_package,;t t
20270 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
20271 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
20272 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
20273 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
20274 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
20275 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
20276 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
20277 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
20278 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
20279 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
20280 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
20281 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
20282 s,@TICS_ARGS@,$TICS_ARGS,;t t
20283 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
20284 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
20285 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
20286 s,@TINFO_ARGS@,$TINFO_ARGS,;t t
20287 s,@TINFO_ARGS2@,$TINFO_ARGS2,;t t
20288 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
20289 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
20290 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
20291 s,@TICS_LIST@,$TICS_LIST,;t t
20292 s,@TINFO_LIST@,$TINFO_LIST,;t t
20293 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
20294 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
20295 s,@TEST_ARGS@,$TEST_ARGS,;t t
20296 s,@TEST_DEPS@,$TEST_DEPS,;t t
20297 s,@TEST_ARG2@,$TEST_ARG2,;t t
20298 s,@TEST_DEP2@,$TEST_DEP2,;t t
20299 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
20300 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
20301 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
20302 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
20303 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
20304 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
20305 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
20306 s,@cross_compiling@,$cross_compiling,;t t
20307 s,@TIC_PATH@,$TIC_PATH,;t t
20308 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
20309 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
20310 CEOF
20311
20312 EOF
20313
20314   cat >>$CONFIG_STATUS <<\EOF
20315   # Split the substitutions into bite-sized pieces for seds with
20316   # small command number limits, like on Digital OSF/1 and HP-UX.
20317   ac_max_sed_lines=48
20318   ac_sed_frag=1 # Number of current file.
20319   ac_beg=1 # First line for current file.
20320   ac_end=$ac_max_sed_lines # Line after last line for current file.
20321   ac_more_lines=:
20322   ac_sed_cmds=
20323   while $ac_more_lines; do
20324     if test $ac_beg -gt 1; then
20325       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20326     else
20327       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
20328     fi
20329     if test ! -s $tmp/subs.frag; then
20330       ac_more_lines=false
20331     else
20332       # The purpose of the label and of the branching condition is to
20333       # speed up the sed processing (if there are no `@' at all, there
20334       # is no need to browse any of the substitutions).
20335       # These are the two extra sed commands mentioned above.
20336       (echo ':t
20337   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
20338       if test -z "$ac_sed_cmds"; then
20339         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
20340       else
20341         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
20342       fi
20343       ac_sed_frag=`expr $ac_sed_frag + 1`
20344       ac_beg=$ac_end
20345       ac_end=`expr $ac_end + $ac_max_sed_lines`
20346     fi
20347   done
20348   if test -z "$ac_sed_cmds"; then
20349     ac_sed_cmds=cat
20350   fi
20351 fi # test -n "$CONFIG_FILES"
20352
20353 EOF
20354 cat >>$CONFIG_STATUS <<\EOF
20355 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
20356   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20357   case $ac_file in
20358   - | *:- | *:-:* ) # input from stdin
20359         cat >$tmp/stdin
20360         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20361         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20362   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20363         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20364   * )   ac_file_in=$ac_file.in ;;
20365   esac
20366
20367   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
20368   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20369          X"$ac_file" : 'X\(//\)[^/]' \| \
20370          X"$ac_file" : 'X\(//\)$' \| \
20371          X"$ac_file" : 'X\(/\)' \| \
20372          .     : '\(.\)' 2>/dev/null ||
20373 echo X"$ac_file" |
20374     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20375           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20376           /^X\(\/\/\)$/{ s//\1/; q; }
20377           /^X\(\/\).*/{ s//\1/; q; }
20378           s/.*/./; q'`
20379   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20380     { case "$ac_dir" in
20381   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20382   *)                      as_incr_dir=.;;
20383 esac
20384 as_dummy="$ac_dir"
20385 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20386   case $as_mkdir_dir in
20387     # Skip DOS drivespec
20388     ?:) as_incr_dir=$as_mkdir_dir ;;
20389     *)
20390       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20391       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20392     ;;
20393   esac
20394 done; }
20395
20396     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
20397     # A "../" for each directory in $ac_dir_suffix.
20398     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
20399   else
20400     ac_dir_suffix= ac_dots=
20401   fi
20402
20403   case $srcdir in
20404   .)  ac_srcdir=.
20405       if test -z "$ac_dots"; then
20406          ac_top_srcdir=.
20407       else
20408          ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
20409       fi ;;
20410   [\\/]* | ?:[\\/]* )
20411       ac_srcdir=$srcdir$ac_dir_suffix;
20412       ac_top_srcdir=$srcdir ;;
20413   *) # Relative path.
20414     ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
20415     ac_top_srcdir=$ac_dots$srcdir ;;
20416   esac
20417
20418   case $INSTALL in
20419   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20420   *) ac_INSTALL=$ac_dots$INSTALL ;;
20421   esac
20422
20423   if test x"$ac_file" != x-; then
20424     { echo "$as_me:20424: creating $ac_file" >&5
20425 echo "$as_me: creating $ac_file" >&6;}
20426     rm -f "$ac_file"
20427   fi
20428   # Let's still pretend it is `configure' which instantiates (i.e., don't
20429   # use $as_me), people would be surprised to read:
20430   #    /* config.h.  Generated automatically by config.status.  */
20431   configure_input="Generated automatically from `echo $ac_file_in |
20432                                                  sed 's,.*/,,'` by configure."
20433
20434   # First look for the input files in the build tree, otherwise in the
20435   # src tree.
20436   ac_file_inputs=`IFS=:
20437     for f in $ac_file_in; do
20438       case $f in
20439       -) echo $tmp/stdin ;;
20440       [\\/$]*)
20441          # Absolute (can't be DOS-style, as IFS=:)
20442          test -f "$f" || { { echo "$as_me:20442: error: cannot find input file: $f" >&5
20443 echo "$as_me: error: cannot find input file: $f" >&2;}
20444    { (exit 1); exit 1; }; }
20445          echo $f;;
20446       *) # Relative
20447          if test -f "$f"; then
20448            # Build tree
20449            echo $f
20450          elif test -f "$srcdir/$f"; then
20451            # Source tree
20452            echo $srcdir/$f
20453          else
20454            # /dev/null tree
20455            { { echo "$as_me:20455: error: cannot find input file: $f" >&5
20456 echo "$as_me: error: cannot find input file: $f" >&2;}
20457    { (exit 1); exit 1; }; }
20458          fi;;
20459       esac
20460     done` || { (exit 1); exit 1; }
20461 EOF
20462 cat >>$CONFIG_STATUS <<EOF
20463   sed "$ac_vpsub
20464 $extrasub
20465 EOF
20466 cat >>$CONFIG_STATUS <<\EOF
20467 :t
20468 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20469 s,@configure_input@,$configure_input,;t t
20470 s,@srcdir@,$ac_srcdir,;t t
20471 s,@top_srcdir@,$ac_top_srcdir,;t t
20472 s,@INSTALL@,$ac_INSTALL,;t t
20473 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
20474   rm -f $tmp/stdin
20475   if test x"$ac_file" != x-; then
20476     mv $tmp/out $ac_file
20477   else
20478     cat $tmp/out
20479     rm -f $tmp/out
20480   fi
20481
20482 done
20483 EOF
20484 cat >>$CONFIG_STATUS <<\EOF
20485
20486 #
20487 # CONFIG_HEADER section.
20488 #
20489
20490 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
20491 # NAME is the cpp macro being defined and VALUE is the value it is being given.
20492 #
20493 # ac_d sets the value in "#define NAME VALUE" lines.
20494 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
20495 ac_dB='[        ].*$,\1#\2'
20496 ac_dC=' '
20497 ac_dD=',;t'
20498 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
20499 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20500 ac_iB='\([      ]\),\1#\2define\3'
20501 ac_iC=' '
20502 ac_iD='\4,;t'
20503 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
20504 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
20505 ac_uB='$,\1#\2define\3'
20506 ac_uC=' '
20507 ac_uD=',;t'
20508
20509 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
20510   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
20511   case $ac_file in
20512   - | *:- | *:-:* ) # input from stdin
20513         cat >$tmp/stdin
20514         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20515         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20516   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
20517         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
20518   * )   ac_file_in=$ac_file.in ;;
20519   esac
20520
20521   test x"$ac_file" != x- && { echo "$as_me:20521: creating $ac_file" >&5
20522 echo "$as_me: creating $ac_file" >&6;}
20523
20524   # First look for the input files in the build tree, otherwise in the
20525   # src tree.
20526   ac_file_inputs=`IFS=:
20527     for f in $ac_file_in; do
20528       case $f in
20529       -) echo $tmp/stdin ;;
20530       [\\/$]*)
20531          # Absolute (can't be DOS-style, as IFS=:)
20532          test -f "$f" || { { echo "$as_me:20532: error: cannot find input file: $f" >&5
20533 echo "$as_me: error: cannot find input file: $f" >&2;}
20534    { (exit 1); exit 1; }; }
20535          echo $f;;
20536       *) # Relative
20537          if test -f "$f"; then
20538            # Build tree
20539            echo $f
20540          elif test -f "$srcdir/$f"; then
20541            # Source tree
20542            echo $srcdir/$f
20543          else
20544            # /dev/null tree
20545            { { echo "$as_me:20545: error: cannot find input file: $f" >&5
20546 echo "$as_me: error: cannot find input file: $f" >&2;}
20547    { (exit 1); exit 1; }; }
20548          fi;;
20549       esac
20550     done` || { (exit 1); exit 1; }
20551   # Remove the trailing spaces.
20552   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
20553
20554 EOF
20555
20556 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
20557 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
20558 # be either 'cat' or 'sort'.
20559 cat confdefs.h | uniq >conftest.vals
20560
20561 # Break up conftest.vals because some shells have a limit on
20562 # the size of here documents, and old seds have small limits too.
20563
20564 rm -f conftest.tail
20565 echo '  rm -f conftest.frag' >> $CONFIG_STATUS
20566 while grep . conftest.vals >/dev/null
20567 do
20568   # Write chunks of a limited-size here document to conftest.frag.
20569   echo '  cat >> conftest.frag <<CEOF' >> $CONFIG_STATUS
20570   sed ${ac_max_here_lines}q conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> $CONFIG_STATUS
20571   echo 'CEOF' >> $CONFIG_STATUS
20572   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
20573   rm -f conftest.vals
20574   mv conftest.tail conftest.vals
20575 done
20576 rm -f conftest.vals
20577
20578 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
20579 # marker @DEFS@.
20580 echo '  cat >> conftest.edit <<CEOF
20581 /@DEFS@/r conftest.frag
20582 /@DEFS@/d
20583 CEOF
20584 sed -f conftest.edit $tmp/in > $tmp/out
20585 rm -f $tmp/in
20586 mv $tmp/out $tmp/in
20587 rm -f conftest.edit conftest.frag
20588 ' >> $CONFIG_STATUS
20589
20590 cat >>$CONFIG_STATUS <<\EOF
20591   # Let's still pretend it is `configure' which instantiates (i.e., don't
20592   # use $as_me), people would be surprised to read:
20593   #    /* config.h.  Generated automatically by config.status.  */
20594   if test x"$ac_file" = x-; then
20595     echo "/* Generated automatically by configure.  */" >$tmp/config.h
20596   else
20597     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
20598   fi
20599   cat $tmp/in >>$tmp/config.h
20600   rm -f $tmp/in
20601   if test x"$ac_file" != x-; then
20602     if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
20603       { echo "$as_me:20603: $ac_file is unchanged" >&5
20604 echo "$as_me: $ac_file is unchanged" >&6;}
20605     else
20606       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20607          X"$ac_file" : 'X\(//\)[^/]' \| \
20608          X"$ac_file" : 'X\(//\)$' \| \
20609          X"$ac_file" : 'X\(/\)' \| \
20610          .     : '\(.\)' 2>/dev/null ||
20611 echo X"$ac_file" |
20612     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
20613           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
20614           /^X\(\/\/\)$/{ s//\1/; q; }
20615           /^X\(\/\).*/{ s//\1/; q; }
20616           s/.*/./; q'`
20617       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
20618         { case "$ac_dir" in
20619   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
20620   *)                      as_incr_dir=.;;
20621 esac
20622 as_dummy="$ac_dir"
20623 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
20624   case $as_mkdir_dir in
20625     # Skip DOS drivespec
20626     ?:) as_incr_dir=$as_mkdir_dir ;;
20627     *)
20628       as_incr_dir=$as_incr_dir/$as_mkdir_dir
20629       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
20630     ;;
20631   esac
20632 done; }
20633
20634       fi
20635       rm -f $ac_file
20636       mv $tmp/config.h $ac_file
20637     fi
20638   else
20639     cat $tmp/config.h
20640     rm -f $tmp/config.h
20641   fi
20642 done
20643 EOF
20644 cat >>$CONFIG_STATUS <<\EOF
20645 #
20646 # CONFIG_COMMANDS section.
20647 #
20648 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
20649   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
20650   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
20651
20652   case $ac_dest in
20653     default )
20654 if test "x$cf_with_tests" != xno ; then
20655
20656 for cf_dir in test
20657 do
20658         if test ! -d $srcdir/$cf_dir; then
20659                 continue
20660         elif test -f $srcdir/$cf_dir/programs; then
20661                 $AWK -f $srcdir/test/mk-test.awk INSTALL=no ECHO_LINK="$ECHO_LINK" $srcdir/$cf_dir/programs >>$cf_dir/Makefile
20662         fi
20663 done
20664
20665 fi
20666
20667         case $cf_cv_system_name in #(vi
20668         OS/2*|os2*) #(vi
20669         LIB_PREFIX=''
20670         ;;
20671         *)      LIB_PREFIX='lib'
20672         ;;
20673         esac
20674 cf_prefix=$LIB_PREFIX
20675
20676 if test $cf_cv_shlib_version = cygdll ; then
20677         TINFO_NAME=$TINFO_ARG_SUFFIX
20678         TINFO_SUFFIX=.dll
20679 fi
20680
20681 if test -n "$TINFO_SUFFIX" ; then
20682         case $TINFO_SUFFIX in
20683         tw*)
20684                 TINFO_NAME="${TINFO_NAME}tw"
20685                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^tw//'`
20686                 ;;
20687         t*)
20688                 TINFO_NAME="${TINFO_NAME}t"
20689                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^t//'`
20690                 ;;
20691         w*)
20692                 TINFO_NAME="${TINFO_NAME}w"
20693                 TINFO_SUFFIX=`echo $TINFO_SUFFIX | sed 's/^w//'`
20694                 ;;
20695         esac
20696 fi
20697
20698 for cf_dir in $SRC_SUBDIRS
20699 do
20700         if test ! -d $srcdir/$cf_dir ; then
20701                 continue
20702         elif test -f $srcdir/$cf_dir/modules; then
20703
20704                 SHARED_LIB=
20705                 LIBS_TO_MAKE=
20706                 for cf_item in $cf_LIST_MODELS
20707                 do
20708
20709         case $cf_item in #(vi
20710         libtool) #(vi
20711                 cf_suffix='.la'
20712                 cf_depsuf=$cf_suffix
20713                 ;;
20714         normal) #(vi
20715                 cf_suffix='.a'
20716                 cf_depsuf=$cf_suffix
20717                 ;;
20718         debug) #(vi
20719                 cf_suffix='_g.a'
20720                 cf_depsuf=$cf_suffix
20721                 ;;
20722         profile) #(vi
20723                 cf_suffix='_p.a'
20724                 cf_depsuf=$cf_suffix
20725                 ;;
20726         shared) #(vi
20727                 case $cf_cv_system_name in
20728                 aix[5-7]*) #(vi
20729                         cf_suffix='.a'
20730                         cf_depsuf=$cf_suffix
20731                         ;;
20732                 cygwin*) #(vi
20733                         cf_suffix='.dll'
20734                         cf_depsuf='.dll.a'
20735                         ;;
20736                 darwin*) #(vi
20737                         cf_suffix='.dylib'
20738                         cf_depsuf=$cf_suffix
20739                         ;;
20740                 hpux*) #(vi
20741                         case $target in
20742                         ia64*) #(vi
20743                                 cf_suffix='.so'
20744                                 cf_depsuf=$cf_suffix
20745                                 ;;
20746                         *) #(vi
20747                                 cf_suffix='.sl'
20748                                 cf_depsuf=$cf_suffix
20749                                 ;;
20750                         esac
20751                         ;;
20752                 *)      cf_suffix='.so'
20753                         cf_depsuf=$cf_suffix
20754                         ;;
20755                 esac
20756         esac
20757         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20758         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20759
20760                         if test $cf_item = shared ; then
20761                         if test "$cf_cv_do_symlinks" = yes ; then
20762                                 case "$cf_cv_shlib_version" in #(vi
20763                                 rel) #(vi
20764                                         case "$cf_cv_system_name" in #(vi
20765                                         darwin*)
20766                                         case .${LIB_SUFFIX} in
20767                                         .tw*)
20768                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20769                                                 cf_suffix=tw'.${REL_VERSION}'"$cf_suffix"
20770                                                 ;;
20771                                         .t*)
20772                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20773                                                 cf_suffix=t'.${REL_VERSION}'"$cf_suffix"
20774                                                 ;;
20775                                         .w*)
20776                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20777                                                 cf_suffix=w'.${REL_VERSION}'"$cf_suffix"
20778                                                 ;;
20779                                         *)
20780                                                 cf_suffix='.${REL_VERSION}'"$cf_suffix"
20781                                                 ;;
20782                                         esac
20783                                         ;; #(vi
20784                                         *) cf_suffix="$cf_suffix"'.${REL_VERSION}' ;;
20785                                         esac
20786                                         ;;
20787                                 abi)
20788                                         case "$cf_cv_system_name" in #(vi
20789                                         darwin*)
20790                                         case .${LIB_SUFFIX} in
20791                                         .tw*)
20792                                                 cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20793                                                 cf_suffix=tw'.${ABI_VERSION}'"$cf_suffix"
20794                                                 ;;
20795                                         .t*)
20796                                                 cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20797                                                 cf_suffix=t'.${ABI_VERSION}'"$cf_suffix"
20798                                                 ;;
20799                                         .w*)
20800                                                 cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20801                                                 cf_suffix=w'.${ABI_VERSION}'"$cf_suffix"
20802                                                 ;;
20803                                         *)
20804                                                 cf_suffix='.${ABI_VERSION}'"$cf_suffix"
20805                                                 ;;
20806                                         esac
20807                                         ;; #(vi
20808                                         *) cf_suffix="$cf_suffix"'.${ABI_VERSION}' ;;
20809                                         esac
20810                                         ;;
20811                                 esac
20812                         fi
20813                         # cygwin needs import library, and has unique naming convention
20814                         # use autodetected ${cf_prefix} for import lib and static lib, but
20815                         # use 'cyg' prefix for shared lib.
20816                         if test $cf_cv_shlib_version = cygdll ; then
20817                                 cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
20818                                 LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/cyg${cf_dir}${cf_cygsuf}"
20819                                 continue
20820                         fi
20821                         fi
20822                         LIBS_TO_MAKE="$LIBS_TO_MAKE ../lib/${cf_prefix}${cf_dir}${cf_suffix}"
20823                 done
20824
20825                 if test $cf_dir = ncurses ; then
20826                         cf_subsets="$LIB_SUBSETS"
20827                         cf_r_parts="$cf_subsets"
20828                         cf_liblist="$LIBS_TO_MAKE"
20829
20830                         while test -n "$cf_r_parts"
20831                         do
20832                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
20833                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
20834                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
20835                                         cf_item=
20836                                         case $cf_l_parts in #(vi
20837                                         *termlib*) #(vi
20838                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
20839                                                 ;;
20840                                         *ticlib*)
20841                                                 cf_item=`echo $cf_liblist |sed -e s%${LIB_NAME}${LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
20842                                                 ;;
20843                                         *)
20844                                                 break
20845                                                 ;;
20846                                         esac
20847                                         if test -n "$cf_item"; then
20848                                                 LIBS_TO_MAKE="$cf_item $LIBS_TO_MAKE"
20849                                         fi
20850                                 else
20851                                         break
20852                                 fi
20853                         done
20854                 else
20855                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
20856                 fi
20857
20858                 sed -e "s%@LIBS_TO_MAKE@%$LIBS_TO_MAKE%" \
20859                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
20860                         $cf_dir/Makefile >$cf_dir/Makefile.out
20861                 mv $cf_dir/Makefile.out $cf_dir/Makefile
20862
20863                 $AWK -f $srcdir/mk-0th.awk \
20864                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" \
20865                         $srcdir/$cf_dir/modules >>$cf_dir/Makefile
20866
20867                 for cf_subset in $cf_subsets
20868                 do
20869                         cf_subdirs=
20870                         for cf_item in $cf_LIST_MODELS
20871                         do
20872                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
20873
20874 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20875
20876         case $cf_item in #(vi
20877         libtool) #(vi
20878                 cf_suffix='.la'
20879                 cf_depsuf=$cf_suffix
20880                 ;;
20881         normal) #(vi
20882                 cf_suffix='.a'
20883                 cf_depsuf=$cf_suffix
20884                 ;;
20885         debug) #(vi
20886                 cf_suffix='_g.a'
20887                 cf_depsuf=$cf_suffix
20888                 ;;
20889         profile) #(vi
20890                 cf_suffix='_p.a'
20891                 cf_depsuf=$cf_suffix
20892                 ;;
20893         shared) #(vi
20894                 case $cf_cv_system_name in
20895                 aix[5-7]*) #(vi
20896                         cf_suffix='.a'
20897                         cf_depsuf=$cf_suffix
20898                         ;;
20899                 cygwin*) #(vi
20900                         cf_suffix='.dll'
20901                         cf_depsuf='.dll.a'
20902                         ;;
20903                 darwin*) #(vi
20904                         cf_suffix='.dylib'
20905                         cf_depsuf=$cf_suffix
20906                         ;;
20907                 hpux*) #(vi
20908                         case $target in
20909                         ia64*) #(vi
20910                                 cf_suffix='.so'
20911                                 cf_depsuf=$cf_suffix
20912                                 ;;
20913                         *) #(vi
20914                                 cf_suffix='.sl'
20915                                 cf_depsuf=$cf_suffix
20916                                 ;;
20917                         esac
20918                         ;;
20919                 *)      cf_suffix='.so'
20920                         cf_depsuf=$cf_suffix
20921                         ;;
20922                 esac
20923         esac
20924         test -n "$LIB_SUFFIX" && cf_suffix="${LIB_SUFFIX}${cf_suffix}"
20925         test -n "$LIB_SUFFIX" && cf_depsuf="${LIB_SUFFIX}${cf_depsuf}"
20926
20927         case $cf_item in
20928         libtool) cf_subdir='obj_lo'  ;;
20929         normal)  cf_subdir='objects' ;;
20930         debug)   cf_subdir='obj_g' ;;
20931         profile) cf_subdir='obj_p' ;;
20932         shared)
20933                 case $cf_cv_system_name in #(vi
20934                 cygwin) #(vi
20935                         cf_subdir='objects' ;;
20936                 *)
20937                         cf_subdir='obj_s' ;;
20938                 esac
20939         esac
20940
20941                         # Test for case where we build libtinfo with a different name.
20942                         cf_libname=$cf_dir
20943                         if test $cf_dir = ncurses ; then
20944                                 case $cf_subset in
20945                                 *base*)
20946                                         cf_libname=${cf_libname}$LIB_SUFFIX
20947                                         ;;
20948                                 *termlib*)
20949                                         cf_libname=$TINFO_LIB_SUFFIX
20950                                         ;;
20951                                 ticlib*)
20952                                         cf_libname=$TICS_LIB_SUFFIX
20953                                         ;;
20954                                 esac
20955                         else
20956                                 cf_libname=${cf_libname}$LIB_SUFFIX
20957                         fi
20958                         if test -n "${DFT_ARG_SUFFIX}" ; then
20959                                 # undo $LIB_SUFFIX add-on in CF_LIB_SUFFIX
20960                                 cf_suffix=`echo $cf_suffix |sed -e "s%^${LIB_SUFFIX}%%"`
20961                         fi
20962
20963                         # These dependencies really are for development, not
20964                         # builds, but they are useful in porting, too.
20965                         cf_depend="../include/ncurses_cfg.h"
20966                         if test "$srcdir" = "."; then
20967                                 cf_reldir="."
20968                         else
20969                                 cf_reldir="\${srcdir}"
20970                         fi
20971
20972                         if test -f $srcdir/$cf_dir/$cf_dir.priv.h; then
20973                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
20974                         elif test -f $srcdir/$cf_dir/curses.priv.h; then
20975                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
20976                         fi
20977
20978                         cf_dir_suffix=
20979                         old_cf_suffix="$cf_suffix"
20980                         if test "$cf_cv_shlib_version_infix" = yes ; then
20981                         if test -n "$LIB_SUFFIX" ; then
20982                                 case $LIB_SUFFIX in
20983                                 tw*)
20984                                         cf_libname=`echo $cf_libname | sed 's/tw$//'`
20985                                         cf_suffix=`echo $cf_suffix | sed 's/^tw//'`
20986                                         cf_dir_suffix=tw
20987                                         ;;
20988                                 t*)
20989                                         cf_libname=`echo $cf_libname | sed 's/t$//'`
20990                                         cf_suffix=`echo $cf_suffix | sed 's/^t//'`
20991                                         cf_dir_suffix=t
20992                                         ;;
20993                                 w*)
20994                                         cf_libname=`echo $cf_libname | sed 's/w$//'`
20995                                         cf_suffix=`echo $cf_suffix | sed 's/^w//'`
20996                                         cf_dir_suffix=w
20997                                         ;;
20998                                 esac
20999                         fi
21000                         fi
21001
21002                         $AWK -f $srcdir/mk-1st.awk \
21003                                 name=${cf_libname}${cf_dir_suffix} \
21004                                 traces=$LIB_TRACING \
21005                                 MODEL=$cf_ITEM \
21006                                 model=$cf_subdir \
21007                                 prefix=$cf_prefix \
21008                                 suffix=$cf_suffix \
21009                                 subset=$cf_subset \
21010                                 SymLink="$LN_S" \
21011                                 TermlibRoot=$TINFO_NAME \
21012                                 TermlibSuffix=$TINFO_SUFFIX \
21013                                 ShlibVer=$cf_cv_shlib_version \
21014                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
21015                                 ReLink=${cf_cv_do_relink:-no} \
21016                                 DoLinks=$cf_cv_do_symlinks \
21017                                 rmSoLocs=$cf_cv_rm_so_locs \
21018                                 ldconfig="$LDCONFIG" \
21019                                 overwrite=$WITH_OVERWRITE \
21020                                 depend="$cf_depend" \
21021                                 host="$host" \
21022                                 libtool_version="$LIBTOOL_VERSION" \
21023                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21024
21025                         cf_suffix="$old_cf_suffix"
21026
21027                         for cf_subdir2 in $cf_subdirs lib
21028                         do
21029                                 test $cf_subdir = $cf_subdir2 && break
21030                         done
21031                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
21032                         $AWK -f $srcdir/mk-2nd.awk \
21033                                 name=$cf_dir \
21034                                 traces=$LIB_TRACING \
21035                                 MODEL=$cf_ITEM \
21036                                 model=$cf_subdir \
21037                                 subset=$cf_subset \
21038                                 srcdir=$srcdir \
21039                                 echo=$WITH_ECHO \
21040                                 crenames=$cf_cv_prog_CC_c_o \
21041                                 cxxrenames=$cf_cv_prog_CXX_c_o \
21042                                 $srcdir/$cf_dir/modules >>$cf_dir/Makefile
21043                         cf_subdirs="$cf_subdirs $cf_subdir"
21044                         done
21045                 done
21046         fi
21047
21048         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >>Makefile
21049 done
21050
21051 for cf_dir in $SRC_SUBDIRS
21052 do
21053         if test ! -d $srcdir/$cf_dir ; then
21054                 continue
21055         fi
21056
21057         if test -f $cf_dir/Makefile ; then
21058                 case "$cf_dir" in
21059                 Ada95) #(vi
21060                         echo 'libs \' >> Makefile
21061                         echo 'install.libs \' >> Makefile
21062                         echo 'uninstall.libs ::' >> Makefile
21063                         echo '  cd '$cf_dir' && ${MAKE} ${CF_MFLAGS} $@' >> Makefile
21064                         ;;
21065                 esac
21066         fi
21067
21068         if test -f $srcdir/$cf_dir/modules; then
21069                 echo >> Makefile
21070                 if test -f $srcdir/$cf_dir/headers; then
21071 cat >> Makefile <<CF_EOF
21072 install.includes \\
21073 uninstall.includes \\
21074 CF_EOF
21075                 fi
21076 if test "$cf_dir" != "c++" ; then
21077 echo 'lint \' >> Makefile
21078 fi
21079 cat >> Makefile <<CF_EOF
21080 libs \\
21081 lintlib \\
21082 install.libs \\
21083 uninstall.libs \\
21084 install.$cf_dir \\
21085 uninstall.$cf_dir ::
21086         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21087 CF_EOF
21088         elif test -f $srcdir/$cf_dir/headers; then
21089 cat >> Makefile <<CF_EOF
21090
21091 libs \\
21092 install.libs \\
21093 uninstall.libs \\
21094 install.includes \\
21095 uninstall.includes ::
21096         cd $cf_dir && \${MAKE} \${CF_MFLAGS} \$@
21097 CF_EOF
21098 fi
21099 done
21100
21101 cat >> Makefile <<CF_EOF
21102
21103 install.libs uninstall.libs \\
21104 install.data uninstall.data ::
21105 $MAKE_TERMINFO  cd misc && \${MAKE} \${CF_MFLAGS} \$@
21106 CF_EOF
21107
21108 if test "x$cf_with_manpages" = xyes; then
21109 cat >> Makefile <<CF_EOF
21110
21111 install.man \\
21112 uninstall.man ::
21113         cd man && \${MAKE} \${CF_MFLAGS} \$@
21114 CF_EOF
21115 fi
21116
21117 cat >> Makefile <<CF_EOF
21118
21119 distclean ::
21120         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
21121         rm -f headers.sh headers.sed mk_shared_lib.sh
21122         rm -f edit_man.* man_alias.*
21123         rm -rf \${DIRS_TO_MAKE}
21124 CF_EOF
21125
21126 # Special case: tack's manpage lives in its own directory.
21127 if test "x$cf_with_manpages" = xyes; then
21128 if test -d tack ; then
21129 if test -f $srcdir/$tack.h; then
21130 cat >> Makefile <<CF_EOF
21131
21132 install.man \\
21133 uninstall.man ::
21134         cd tack && \${MAKE} \${CF_MFLAGS} \$@
21135 CF_EOF
21136 fi
21137 fi
21138 fi
21139
21140 rm -f headers.sed headers.sh
21141
21142 echo creating headers.sh
21143 cat >headers.sh <<CF_EOF
21144 #! /bin/sh
21145 # This shell script is generated by the 'configure' script.  It is invoked in a
21146 # subdirectory of the build tree.  It generates a sed-script in the parent
21147 # directory that is used to adjust includes for header files that reside in a
21148 # subdirectory of /usr/include, etc.
21149 PRG=""
21150 while test \$# != 3
21151 do
21152 PRG="\$PRG \$1"; shift
21153 done
21154 DST=\$1
21155 REF=\$2
21156 SRC=\$3
21157 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
21158 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
21159 echo installing \$SRC in \$DST
21160 CF_EOF
21161
21162 if test $WITH_CURSES_H = yes; then
21163         cat >>headers.sh <<CF_EOF
21164 case \$DST in
21165 /*/include/*)
21166         END=\`basename \$DST\`
21167         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21168         do
21169                 NAME=\`basename \$i\`
21170                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21171         done
21172         ;;
21173 *)
21174         echo "" >> \$TMPSED
21175         ;;
21176 esac
21177 CF_EOF
21178
21179 else
21180         cat >>headers.sh <<CF_EOF
21181 case \$DST in
21182 /*/include/*)
21183         END=\`basename \$DST\`
21184         for i in \`cat \$REF/../*/headers |fgrep -v "#"\`
21185         do
21186                 NAME=\`basename \$i\`
21187                 if test "\$NAME" = "curses.h"
21188                 then
21189                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21190                         NAME=ncurses.h
21191                 fi
21192                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
21193         done
21194         ;;
21195 *)
21196         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
21197         ;;
21198 esac
21199 CF_EOF
21200 fi
21201 cat >>headers.sh <<CF_EOF
21202 rm -f \$TMPSRC
21203 sed -f \$TMPSED \$SRC > \$TMPSRC
21204 NAME=\`basename \$SRC\`
21205 CF_EOF
21206 if test $WITH_CURSES_H != yes; then
21207         cat >>headers.sh <<CF_EOF
21208 test "\$NAME" = "curses.h" && NAME=ncurses.h
21209 CF_EOF
21210 fi
21211 cat >>headers.sh <<CF_EOF
21212 # Just in case someone gzip'd manpages, remove the conflicting copy.
21213 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
21214
21215 eval \$PRG \$TMPSRC \$DST/\$NAME
21216 rm -f \$TMPSRC \$TMPSED
21217 CF_EOF
21218
21219 chmod 0755 headers.sh
21220
21221 for cf_dir in $SRC_SUBDIRS
21222 do
21223         if test ! -d $srcdir/$cf_dir ; then
21224                 continue
21225         fi
21226
21227         if test -f $srcdir/$cf_dir/headers; then
21228                 $AWK -f $srcdir/mk-hdr.awk \
21229                         subset="$LIB_SUBSETS" \
21230                         compat="$WITH_CURSES_H" \
21231                         $srcdir/$cf_dir/headers >>$cf_dir/Makefile
21232         fi
21233
21234         if test -f $srcdir/$cf_dir/modules; then
21235                 if test "$cf_dir" != "c++" ; then
21236                         cat >>$cf_dir/Makefile <<"CF_EOF"
21237 depend : ${AUTO_SRC}
21238         makedepend -- ${CPPFLAGS} -- ${C_SRC}
21239
21240 # DO NOT DELETE THIS LINE -- make depend depends on it.
21241 CF_EOF
21242                 fi
21243         fi
21244 done
21245
21246 if test "x$cf_with_ada" != xno ; then
21247 if test -z "$USE_OLD_MAKERULES" ; then
21248         $AWK -f $srcdir/Ada95/mk-1st.awk <$srcdir/Ada95/src/modules >>Ada95/src/Makefile
21249 fi
21250 fi
21251  ;;
21252   esac
21253 done
21254 EOF
21255
21256 cat >>$CONFIG_STATUS <<\EOF
21257
21258 { (exit 0); exit 0; }
21259 EOF
21260 chmod +x $CONFIG_STATUS
21261 ac_clean_files=$ac_clean_files_save
21262
21263 # configure is writing to config.log, and then calls config.status.
21264 # config.status does its own redirection, appending to config.log.
21265 # Unfortunately, on DOS this fails, as config.log is still kept open
21266 # by configure, so config.status won't be able to write to it; its
21267 # output is simply discarded.  So we exec the FD to /dev/null,
21268 # effectively closing config.log, so it can be properly (re)opened and
21269 # appended to by config.status.  When coming back to configure, we
21270 # need to make the FD available again.
21271 if test "$no_create" != yes; then
21272   ac_cs_success=:
21273   exec 5>/dev/null
21274   $SHELL $CONFIG_STATUS || ac_cs_success=false
21275   exec 5>>config.log
21276   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21277   # would make configure fail if this is the last instruction.
21278   $ac_cs_success || { (exit 1); exit 1; }
21279 fi
21280 ${MAKE:-make} preinstall